diff --git a/SConstruct b/SConstruct index 67af088d7f..761c93fef5 100644 --- a/SConstruct +++ b/SConstruct @@ -515,6 +515,12 @@ libraries['gtk2'].ParseConfig ('pkg-config --cflags --libs gtk+-2.0') libraries['pango'] = LibraryInfo() libraries['pango'].ParseConfig ('pkg-config --cflags --libs pango') +libraries['cairo'] = LibraryInfo() +libraries['cairo'].ParseConfig ('pkg-config --cflags --libs cairo') + +libraries['gtk2-unix-print'] = LibraryInfo() +libraries['gtk2-unix-print'].ParseConfig ('pkg-config --cflags --libs gtk+-unix-print-2.0') + libraries['libgnomecanvas2'] = LibraryInfo() libraries['libgnomecanvas2'].ParseConfig ('pkg-config --cflags --libs libgnomecanvas-2.0') @@ -905,6 +911,8 @@ if env['SYSLIBS']: libraries['atkmm'].ParseConfig ('pkg-config --cflags --libs atkmm-1.6') libraries['pangomm'] = LibraryInfo() libraries['pangomm'].ParseConfig ('pkg-config --cflags --libs pangomm-1.4') + libraries['cairomm'] = LibraryInfo() + libraries['cairomm'].ParseConfig ('pkg-config --cflags --libs cairomm-1.0') libraries['libgnomecanvasmm'] = LibraryInfo() libraries['libgnomecanvasmm'].ParseConfig ('pkg-config --cflags --libs libgnomecanvasmm-2.6') @@ -963,7 +971,10 @@ else: CPPPATH='#libs/sigc++2') libraries['glibmm2'] = LibraryInfo(LIBS='glibmm2', LIBPATH='#libs/glibmm2', - CPPPATH='#libs/glibmm2') + CPPPATH=['#libs/glibmm2/glib', '#libs/glibmm2']) + libraries['cairomm'] = LibraryInfo(LIBS='cairomm', + LIBPATH="#libs/cairomm", + CPPPATH='#libs/cairomm') libraries['pangomm'] = LibraryInfo(LIBS='pangomm', LIBPATH='#libs/gtkmm2/pango', CPPPATH='#libs/gtkmm2/pango') @@ -1022,6 +1033,7 @@ else: 'libs/gtkmm2/atk', 'libs/gtkmm2/gdk', 'libs/gtkmm2/gtk', + 'libs/cairomm', 'libs/libgnomecanvasmm', # 'libs/flowcanvas', 'libs/gtkmm2ext', diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript index 4cf990f816..552a9ef5b8 100644 --- a/gtk2_ardour/SConscript +++ b/gtk2_ardour/SConscript @@ -18,7 +18,7 @@ domain = 'gtk2_ardour' gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2) gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"") gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"") -gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED") +gtkardour.Append(CXXFLAGS=["-DLIBSIGC_DISABLE_DEPRECATED", "-DGLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED", "-DGLIBMM_EXCEPTIONS_ENABLED", "-DGLIBMM_PROPERTIES_ENABLED"]) gtkardour.Append(CPPPATH="#/") # for top level svn_revision.h #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA") gtkardour.Append(PACKAGE=domain) @@ -53,7 +53,8 @@ gtkardour.Merge ([ libraries['rubberband'], libraries['samplerate'], libraries['jack'], - libraries['sysaudio'] + libraries['sysaudio'], + libraries['cairomm'] ]) gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED") diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript index 2d030ac70a..6661ea16a2 100644 --- a/libs/ardour/SConscript +++ b/libs/ardour/SConscript @@ -16,7 +16,7 @@ domain = 'libardour' ardour.Append(DOMAIN = domain, MAJOR = 2, MINOR = 0, MICRO = 0) ardour.Append(CXXFLAGS = "-DPACKAGE=\\\"" + domain + "\\\"") -ardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED") +ardour.Append(CXXFLAGS=["-DLIBSIGC_DISABLE_DEPRECATED", "-DGLIBMM_EXCEPTIONS_ENABLED"]) ardour.Append(PACKAGE = domain) ardour.Append(POTFILE = domain + '.pot') diff --git a/libs/glibmm2/ChangeLog b/libs/glibmm2/ChangeLog index 0bddbef6b1..2862d348ff 100644 --- a/libs/glibmm2/ChangeLog +++ b/libs/glibmm2/ChangeLog @@ -1,3 +1,653 @@ +2.13.3: + +2006-11-28 Daniel Elstner + + * tools/pm/GtkDefs.pm (read_defs): Allow an empty pair of + parentheses in the innermost match. This fixes the problem of + gmmproc choking on "()" in the documentation strings. This would + still break on unmatched parentheses, though. Of course the + parser should just skip over quoted strings, but I wasn't able + to get that to work. + * glib/src/glib_enums.defs (GNormalizeMode): Manually fix the + improperly parsed value of G_NORMALIZE_NFD. Fortunately this + doesn't change anything since the "#error" token was interpreted + as zero, which happens to be the right value. + * glib/src/glib_functions.defs (g_iconv): Manually convert to + a function definition, as it was improperly parsed as a method + with a zero-length name (!) of object GIConv. This fixes the + annoying gmmproc warning about an allegedly unwrapped method. + +2006-11-28 Murray Cumming + + * glib/glibmm/propertyproxy_base.cc: Don't ifdef out + PropertyProxy_Base when properties are disabled. It is needed + for connect_property_changed(). + +2006-11-27 Daniel Elstner + + * tools/enum.pl (parse): Ignore whitespace in front of an enum + typedef. This fixes parsing of HildonTelephoneEditorFormat in + hildon-libs. + * tools/pm/Enum.pm (parse_values): Check whether the enumeration + constants actually have a common module prefix before attempting + to remove it. This fixes the incorrect parsing of inconsistently + named enums in hildon-libs. + +2006-11-27 Daniel Elstner + + * tools/enum.pl (form_names): Break the loop if the length of the + common prefix reaches zero. This fixes the infinite loop when + processing the inconsistently named enumeration constants of the + Hildon libraries. + +2006-11-20 Murray Cumming + + * docs/reference/libstdc++.tag.xml: Updated from the libstdc++ site. + Note that the original does not have an .xml extension. This is is + lots bigger, but that should mean there is more documentation now. + +2006-11-22 Oliver Nittka + + * glib/src/value_basictypes.cc.m4: When registering float parameters, + use -G_MAXFLOAT instead of G_MINFLOAT. Since we first implemented this, + the glib documentation has been updated to make it cleare that this is + the real minimum and G_MINFLOAT is the minimum positive value. + Do the same for doubles too. + +2006-11-10 Murray Cumming + + * tools/Makefile.am: Add enum.pl to the dist, so that it is in + tarballs. Someone saw it mentioned in the appendix, but could not + find it in the tarball. + +2006-11-10 Murray Cumming + + * docs/reference/Doxyfile.in: Add PREDEFINES for the optional API, + so that the documentation shows the regular API. + +2006-11-10 Murray Cumming + + * glib/glibmm/objectbase.cc: + * glib/glibmm/objectbase.h: Added connect_property_changed(), + as an alternative to use when the property proxies are not + available because GLIBMM_PROPERTIES_ENABLED is not defined. + SignalProxyProperty::connect(): Use notify::propertyname instead of + just notify, so do not have to check the property name later. This + should be more efficient (when this is used, rarely). + * glib/glibmm/propertyproxy_base.cc: + * glib/glibmm/propertyproxy_base.h: Move PropertyProxyConnectionNode + into the header, so we can reuse it for connect_property_changed(). + +2006-10-04 Murray Cumming + + * glib/glibmm/class.cc: + * glib/src/iochannel.ccg: + * glib/src/markup.ccg: Add a silly line to avoid unused parameters + when GLIBMM_EXCEPTIONS_ENABLED is not set. + * glib/glibmm/error.h: Do not use G_GNU_NO_RETURN on the version + of throw_exception() that returns, to avoid a warning. + +2006-10-01 Murray Cumming + + * Makefile.am: + * docs/Makefile.am: + * docs/Makefile_web.am_fragment: + * docs/images/Makefile.am: + * docs/reference/Makefile.am: + * docs/reference/README: + * examples/Makefile.am: Upload to the new hoster instead of to sourceforge. + Abstracted the host and path names into docs/Makefile_web.am_fragment to + avoid duplication. + +2.13.2: + +2006-09-28 Cedric Gustin + + * MSVC_Net2003/glibmm/glibmm.vcproj: Remove sarray from list of + source and header files. + +2006-09-26 Murray Cumming + + * glib/glibmmconfig.h.in: For win32, define + GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS to 1, + instead of just defining it to nothing. + * scripts/reduced.m4: In the AC_ARG_ENABLE() to + define (or not) GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS, + use api-default-signal-handlers as the first parameter + instead of api-exceptions (a copy/paste error), though it does + not seem to make any difference. + Bug #357830. + +2006-09-23 Jonathon Jongsma + + * glib/src/keyfile.ccg, glib/src/keyfile.hg: added new files that were + missed from an earlier commit + +2.13.1: + +2006-09-19 Ralf Stephan + + * glib/glibmm/ustring.h: + ustring(const ustring& src, size_type i, size_type n=npos) + and + ustring(const char* src, size_type n) constructors: + In the reference documentation, mention explicitly that + n is the number of _UTF-8_ characters, rather than + ASCII characters (bytes). + +2006-02-20 Rob Page + + Wraps GKeyFile (Bug #330535) + * glib/glibmm.h: Added include of keyfile.h + * glib/glibmm/Makefile.am: Added keyfile.h + * glib/glibmm/containerhandle_shared.h: Added a TypeTraits + specialization for converting between bool and gboolean*. + * glib/src/Makefile_list_of_hg.am_fragment: Added keyfile.hg + to files_general_hg. + * glib/src/keyfile.hg: KeyFile header + * glib/src/keyfile.ccg: KeyFile implementation + * tools/m4/convert_glib.m4: Added a conversion for KeyFileFlags + +2006-09-14 Johannes Schmid + + * tools/m4/class_shared.m4: Change _IMPLEMENTS_INTERFACE to + _IMPLEMENTS_INTERFACE_CC so we can have more control over it, + by generating the _IMPLEMENTS_INTERFACE_CC from the WrapParser.pm. + * tools/m4/method.m4: + * tools/m4/signal.m4: + * tools/m4/vfunc.m4: Added optional parameters that result in + #ifdefs around methods, signals, vfuncs, etc. + * tools/pm/Output.pm: Addef ifdef() and endif(). + output_wrap_vfunc_h(), output_wrap_vfunc_cc(), + output_wrap_default_signal_handler_h(), + output_wrap_default_signal_handler_cc(), + output_wrap_meth(), + output_wrap_create(), + output_wrap_sig_decl(): Support optional ifdefs around + declarations and implementations, by calling ifdef() and endif(), + or by passing the extra argument to the m4 macros. + * tools/pm/WrapParser.pm: parse_and_build_output(): + Parse _IMPLEMENTS_INTERFACE, and call the new on_implements_interface() + method, which uses the new output_implements_interface() method, + so it can have an optional ifdef parameter. + on_wrap_method(), on_wrap_create(), on_wrap_vfunc(), output_wrap_signal(), + output_wrap_vfunc(): Handle the optional ifdef (with a parameter) option + for the _WRAP*() macros. + + This adds support for disabling certain features by using the new + "ifdef" argument for methods, vfuncs, signals and interfaces. + +2006-09-05 Jonathon Jongsma + + * docs/reference/Makefile.am: rebuild docs when a .h files changes in + glib/glibmm + * glib/glibmm/miscutils.cc: + * glib/glibmm/miscutils.h: wrap g_get_user_data_dir(), + g_get_user_config_dir(), and g_get_user_cache_dir() + +This is the HEAD branch, for new API. There is also a glib-2-12 branch for +maintenance of the stable API. + +2006-08-18 Cedric Gustin + + * MSVC_Net2003/*.vcproj: Updated for glibmm-2.12. + +2.12.0: + +2.11.3: + +2006-04-25 Murray Cumming + + * configure.in: + * glib/glibmmconfig.h.in: + * scripts/reduced.m4: Added a --enable-api-default-signal-handlers option. This defines + GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED, which is used to #ifdef default signal handlers. + This saves on library code size (less code and API symbols) and application code size and + loading time (less virtual methods, which must be imported and resolved at load time) and + per-object memory size (smaller object sizes because of less virtual methods.) + * tools/m4/class_interface.m4: + * tools/m4/class_shared.m4: Put default signal handler code in #ifdefs. + +2.11.2: + +2006-07-17 Murray Cumming + + * configure.in: Reverted the previous patch slightly to unbreak glibmmconfig.h. + +2.11.1: + +2006-07-16 Murray Cumming + + * configure.in: Quote GLIBMM_*_VERSION to avoid m4 warnings. Patch from + Bug #347076 from Kevin McBride. + * scripts/sun.m4: Quote GLIBMM_PROG_CXX_SUN to avoid an m4 warning. + Patch from Bug #347077 from Kevin McBride. + +2006-07-16 Jonathon Jongsma + + * glib/src/date.ccg: fix implementation of Glib::Date::set_time_current() so + that it doesn't set the date to Dec 31, 1969. + +2006-06-19 Murray Cumming + + * glib/glibmm/object.h: Check whether DestroyNotify is defined, so we can warn about + including X11/Xlib.h before this header, which will break things. + Bug #316726 from Mert Tugcu and Javeed Shaikh. + +2006-06-09 Cedric Gustin + + * glib/glibmm/objectbase.h : Inline the set_property and + get_property methods. This is required by mingw32-gcc as + ObjectBase is explicitly dllexported. + +2006-06-05 Murray Cumming + + * glib/src/convert.ccg: When using --enable-api-exception=no, only try to get the Glib::Error + when the GError is not null. + +2006-05-18 Murray Cumming + + * tools/m4/method.m4: _METHOD(): When using errthrow, actually print the function call even if + the return type is 0. + +2006-05-16 Murray Cumming + + * tools/m4/method.m4: _METHOD(), _STATIC_METHOD(): Remove spaces before dnl statements, + to avoid unwanted indentation in .cc files. + +2006-05-16 Murray Cumming + + * tools/m4/convert_base.m4: _CONVERT(): If the return type is void, use the unconverted + statement, not no statement. This prevents some void methods from being totally empty. + This was a (very bad) regression introduced by the optional API changed. + Bug #341895 from Philip Langdale. + * tools/m4/method.m4: _METHOD(), _STATIC_METHOD(): Attempt to remove unnecessary newlines, + though some indenting spaces slipped in instead. Must fix that. + +2006-05-14 Murray Cumming + + * glib/glibmm/value.cc: + * glib/glibmm/value.h: Restored the init(GValue*) method that was lost when + merging changes from the glibmm-2-10 branch. + +2006-05-09 Murray Cumming + + * glib/glibmm/ustring.cc: + * glib/src/date.ccg: + * glib/src/convert.ccg: + * glib/src/convert.hg: Added #ifdefed versions for the case that + exceptions are disabled. + +2006-05-10 Murray Cumming + + * configure.in: + * scripts/reduced.m4: Moved --enable-deprecated-api macro into scripts/reduced.m4. + Added the --enable-api-exceptions macro that was missing from my last commit. + +2006-04-05 Murray Cumming + + * configure.in: + * scripts/reduced.m4: Added --enable-api-exceptions option. When this + is used, methods that would normally throw an exception will now take + an extra std::auto_ptr argument that should be checked with + auto_ptr::get(). + * glib/glibmmconfig.h.in: Undef the GLIBMM_EXCEPTIONS_ENABLED, + so it will be defined. + * tools/m4/gerror.m4: throw_func() returns an auto_ptr of a + Glib::Error when exceptions are disabled. + * tools/m4/method.m4: + * tools/pm/Output.pm: on_wrap_method(): Added alternative API with + #ifdefs + * tools/m4/signal.m4: + * tools/m4/signalproxy_custom.m4: + * tools/m4/vfunc.m4: Put #ifdefs around the exception re-throwing + try/catch blocks. + * glib/glibmm/dispatcher.cc: + * glib/glibmm/dispatcher.h: + * glib/glibmm/error.cc: + * glib/glibmm/error.h: + * glib/glibmm/exceptionhandler.cc: + * glib/glibmm/exceptionhandler.h: + * glib/glibmm/main.cc: + * glib/glibmm/signalproxy.cc: + * glib/glibmm/streamiochannel.cc: + * glib/glibmm/stringutils.cc: + * glib/glibmm/threadpool.cc: + * glib/src/iochannel.ccg: + * glib/src/iochannel.hg: + * glib/src/markup.ccg: + * glib/src/spawn.ccg: + * glib/src/thread.ccg: Put #ifdefs around try/catch blocks, and + use alternative API when appropriate. + * examples/iochannel_stream/fdstream.cc: + * examples/markup/parser.cc: + * examples/options/main.cc: Adapted examples to + the alternative API, with #ifdefs + * tools/m4/convert_base.m4: Avoid any conversion if the result is + void, to allow _WRAP_METHOD() to ignore bool results, so we can + generate some methods that are currently hand-coded. + +2006-05-09 Murray Cumming + + * glib/glibmm/value.cc: + * glib/glibmm/value.h: Added init(const GValue*), so that we can copy GValue instances + of any type at runtime. Needed by libgdamm, which returns const GValue* instances. + +This is the HEAD branch, for API additions. See also the glibmm-2-10 branch. + +2.10.1: + +2006-04-12 Murray Cumming + + * tools/m4/signalproxy_custom.m4: Remove this file because it is not installed and + does not seem to be used. + +2006-04-12 Murray Cumming + + * tools/m4/signal.m4: Mark the (private) signal info callback functions as + static, to save on code size. + +2006-04-12 Murray Cumming + + * tools/pm/WrapParser.pm: Parse a new optional constversion parameter for + _WRAP_METHOD(), to save on code size by just calling the non-const overload + instead of generating almost identical code. + * tools/m4/method.m4: _METHOD(): Take extra parameters for use when constversion is used. + * tools/pm/Output.pm: Send the extra parameters to _METHOD(). + * docs/internal/using_gmmproc.txt: Documented the new constversion option. + +2006-04-12 Murray Cumming + + * glib/glibmm/main.cc: + * glib/glibmm/objectbase.cc: + * glib/glibmm/property.cc: + * glib/glibmm/ustring.cc: + * glib/glibmm/value_custom.cc: + * glib/src/spawn.ccg: Mark private functions as + static, to stop them being exported in the API, to reduce the + library code size slightly. + * tools/m4/signal.m4: Make generated callback functions static, for + the same reasons. + +2006-04-07 Cedric Gustin + + * README.win32: Updated for Mingw-4.1. + +2006-04-06 Cedric Gustin + + * MSVC_Net2003/*.vcproj: Embed the manifest file into executables + in the case of the Debug target. + * README.win32: Fixed a few typos. + * build_shared/Makefile_build.am_fragment: Add -DGLIBMM_BUILD to + the extra_defines compiler flags (switch between + dllexport/dllimport on win32). + * glib/glibmmconfig.h.in: Define GLIBMM_DLL when building with + mingw32/cygwin. This makes the GLIBMM_API tag (and GTKMM_API for + gtkmm) active with these two platforms, as required by bug + #309030. + * glib/glibmm/object.h, glib/glibmm/objectbase.h : Tag the Object + and ObjectBase classes with GLIBMM_API to make Visual Studio happy. + +2.10.0: + +2006-02-25 Murray Cumming + + * tools/pm/DocsParser.pm: looklookup_documentation(): Put the + @deprecated text immediately after the main description, before + the parameters, so that Doxygen actually uses it. + +2006-02-25 Murray Cumming + + * tools/pm/DocsParser.pm: looklookup_documentation(): Accept an + extra deprecated_documentation parameter, to be appended to the + Doxygen documentation. + * tools/pm/Output.pm: output_wrap_meth(): Put the documentation + inside the deprecation #ifdef, for neatness. + * tools/pm/WrapParser.pm: on_wrap_method(): Read an optional string + after the optional deprecated parameter, used to say why the + method is deprecated, in case it was not deprecated by the C API, + in which case it would already have documentation for this. + +2006-02-27 Cedric Gustin + + * README.win32: Updated for glibmm-2.8 (MS Visual Studio 2005). + * glib/glibmm/ustring.h: Tag npos with GLIBMM_API, in order to + dllexport it on win32. Bug #332438. + * MSVC_Net2003/*.vcproj: Updated for Visual Studio 2005. Added the + /vd2 compiler flag (Bug #158040). + * MSVC_Net2003/glibmm.sln: Updated for Visual Studio 2005. + * MSVC_Net2003/gendef/gendef.cc: Redirect output of dumpbin to a + file. + * glib/glibmmconfig.h.in: Undefined + GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS for MSVC. + +2006-02-03 Murray Cumming + + * docs/internal/using_gmmproc.txt: Section about regenerating .defs: + Repeat the hint about extra_defs_gen here. + +2006-02-27 Cedric Gustin + + * glib/glibmm/ustring.h: Tag npos with GLIBMM_API, in order to + dllexport it on win32. Bug #332438. + +2006-02-07 Rob Page + + * glib/glibmm/ustring.h: fix a typo in the documentation for uppercase() + +2.9.1: + +2006-01-28 Murray Cumming + + * glib/src/optiongroup.ccg: add_entry_with_wrapper(): Copy the + CppOptionEntry into the map _after_ setting entry_ so that we + really delete it in release_c_arg(), to avoid a memory leak. + +2006-01-28 Rob Page + + * docs/reference/glibmm_header.html_fragment: Fix the link + to the Main page. Bug #328299. + +2006-01-27 Murray Cumming + + * glib/src/optionentry.ccg: Constructor: Avoid memory + leak caused by double instantiation of gobject_. + +2005-12-16 Murray Cumming + + * glib/glibmm/object.h: + * glib/glibmm/objectbase.h: Hide some internal stuff + from Doxygen. Add/Improve the Doxygen documentation. + * glib/src/convert.hg: Correct the declaration of + filename_display_name() to match the implementation. + Previously this would have been unusable due to a linker + error. + +2005-11-30 Murray Cumming + + * docs/reference/Doxyfile.in: Define the @newin aliases, + as in gtkmm. + * tools/pm/DocsParser.pm: Convert Since: in gtk-doc + text to @newin for our doxygen docs. + +2005-11-29 Murray Cumming + + * build_shared/Makefile_build.am_fragment: + * configure.in: Added --enable-use-deprecations, + defaulting to no (do not check for them), so that + the tarball will still build when newer versions + of glib deprecate some API. + * examples/Makefile.am_fragment: Use the + deprecation, if wanted. + +2005-11-29 Murray Cumming + + * build_shared/Makefile_build.am_fragment: + * configure.in: Added --enable-deprecated-api + option. When set to disabled, it does not build + deprecated API. This reduces the size of the library, + and might be useful for embedded devices. + * glib/src/date.ccg: + * glib/src/date.hg: Use _DEPRECATE_IFDEF_START/END + around the deprecated set_time() method. + +2005-11-29 Murray Cumming + + * tools/m4/base.m4: Add + _DEPRECATE_IFDEF_START and _DEPRECATE_IFDEF_END + macros, to #ifdef-out generated methods. + Added _DEPRECATE_IFDEF_CLASS_START and + _DEPRECATE_IFDEF_CLASS_END for whole classes. + Put _DEPRECATE_IFDEF_CLASS* around all generated + code. It does nothing if the class is not deprecated. + * tools/m4/class_gtkobject.m4: Add _DEPRECATED macro, + used to mark a class as deprecated. + * tools/m4/method.m4: Take an extra parameter, to + optionally mark the method as deprecated, to add + #ifdefs around the code, with + _DEPRECATE_IFDEF_START/END + * tools/pm/Output.pm: _DEPRECATE_IFDEF_START/END + around the declarations of deprecated methods. + * tools/pm/WrapParser.pm: Check for an optional + deprecated parameter to _WRAP_METHOD(). + * tools/m4/member.m4: Allow optional deprecated + method for _MEMBER_GET/SET*() to ifdef the code + out. + * tools/generate_wrap_init.pl.in: Put an #ifdef + around use of deprecated classes. + +2005-11-23 Murray Cumming + + * configure.in: Depend on glib 2.9, which + has new API. + * glib/src/date.ccg: + * glib/src/date.hg: Wrap glib_date_set_time_t() + and glib_date_set_time_val(). Deprecate + set_time(GTime) in favour of the new method + overloads. Added set_time_current(), wrapping the + case that the time_t is 0. + +This is the HEAD branch, for new API, targetting glib 2.9. See also the +glibmm-2-8 branch. + +2.8.2: + +2005-11-23 Murray Cumming + + * glib/glibmm/containers.h: Do not use g_assert() in + a header, because g++ sometimes warns that it has + no effect. + +2005-10-29 Murray Cumming + + * scripts/macros.m4: AL_PROG_GNU_MAKE(): + Use $MAKE-make instead of $ac_make, which + apparently fixes a build problem on some + Solaris systems. Thanks to Mark Rouchal in + bug #307480. + +2.8.1: + +2005-10-19 Murray Cumming + + * configure.in: Check for glib 2.8. Bug #317913. + +2.8.0: + +Updated NEWS and increased version to 2.8.0. + +2.7.3: + +2005-08-17 Murray Cumming + + * glib/src/glib_docs.xml: Regenerated with docextract_to_xml.py + * glib/src/glib_enums.defs: Regenerated with enums.pl + * glib/src/glib_functions.defs: Regenerated with h2defs.py + +2.7.2: + +2005-07-16 Murray Cumming ::get_value(), + PropertyProxy_WriteOnly<>::set_value(): Add implementations + instead of casting to unrelated PropertyProxy() and calling it + there. The AIX compiler did not like this hack. Bug #301610 + +2005-06-07 Cedric Gustin + + * glib/glibmm/miscutils.cc: In get_home_dir, return an empty + string when HOME is not defined (Win9x). Bug #306310 from Michael + Hofmann. + * glib/glibmm/miscutils.h: Updated docstring for the get_home_dir + method. + +2005-04-27 Murray Cumming + + * examples/child_watch/main.cc: + * examples/thread/dispatcher.cc: + * examples/thread/thread.cc: + * glib/glibmm/dispatcher.cc: Inherit signal handler objects from + sigc::trackable. This is necessary with some libsigc++ patches, + though not currently necessary with regular libsigc++. + +2005-04-22 Murray Cumming + + * glib/src/gmodule_enums.defs: Regenerate with enums.pl + * glib/src/gmodule_functions.defs: Regenerate with h2defs.py + This adds the BIND_LOCAL enum value. Bug #172748 from + Phillip Neiswanger. + +2005-04-05 Murray Cumming + + * tool/pm/Output.pm: output_wrap_property(): Do not add the + const read-only method override if the property can not be read. Be + careful because this removes a little API from generated code. You + should hand-code the wrongly-generated methods and mark them as + deprecated. + * glib/glibmm/refptr.h: Added cast_const<>, like the existing + cast_dynamic<> and cast_static. + +2005-03-31 Murray Cumming + + * glib/src/glib_functions.defs: Updated with + h2defs.py. + +2005-03-13 Yair Hershkovitz + + * glib/glibmm/main.h, + glib/glibmm/main.cc: Added MainContext::signal_child_watch() + * examples/: Added child_watch/ example + +2005-03-11 Yair Hershkovitz + + * glib/glibmm/main.h, glib/glibmm/main.cc: + Add Glib::SignalChildWatch class, Glib::signal_child_watch() + +This is the HEAD branch, for new API. Bug fixes that do not change or add +API should also be applied to the glibmm-2-6 branch. + +2005-03-09 Cedric Gustin + + * MSVC_Net2003/Makefile.am: Add blank.cpp to EXTRA_DIST. + * MSVC_Net2003/glibmm/glibmm.vcproj: Remove sarray.cc from the + list of source files. + * MSVC_Net2003/examples/*/*.vcproj, + MSVC_Net2003/tests/glibmm_value/glibmmvalue.vcproj: Change name of + PDB file to $(OutDir)/$(TargetName).pdb. + 2.6.1: 2005-03-07 Murray Cumming diff --git a/libs/glibmm2/INSTALL b/libs/glibmm2/INSTALL index 095b1eb406..23e5f25d0e 100644 --- a/libs/glibmm2/INSTALL +++ b/libs/glibmm2/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives @@ -102,16 +102,16 @@ 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'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', 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. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files 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 @@ -159,7 +159,7 @@ where SYSTEM can have one of these forms: 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 +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -189,8 +189,13 @@ 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). +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== diff --git a/libs/glibmm2/Makefile.am b/libs/glibmm2/Makefile.am index 8e49568562..97a0aee0eb 100644 --- a/libs/glibmm2/Makefile.am +++ b/libs/glibmm2/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I scripts -SUBDIRS = glibmm +SUBDIRS = tools glib examples docs scripts tests MSVC_Net2003 DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = build_shared/Makefile_build.am_fragment \ @@ -8,16 +8,57 @@ EXTRA_DIST = build_shared/Makefile_build.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 + CHANGES README.win32 -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 ***" + +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 + + +include $(top_srcdir)/docs/Makefile_web.am_fragment + +doc_tarball_files = \ + docs/images/*.gif \ + docs/internal/*.txt docs/internal/*.dia docs/reference/html + +# This doesn't work very well in a $(srcdir) != $(builddir) setup, +# but this target is for maintainer use only anyway. + +glibmm-docs.tar.gz: + find examples -name '*.cc' -o -name '*.h' -o -name '*.xpm' -o -name '*.xml' | \ + tar cf - --files-from - $(doc_tarball_files) | gzip -c --best >$@ + +# Upload documentation and examples: + +post-html-recursive: + list='docs examples'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) post-html); \ + done + +post-html-local: glibmm-docs.tar.gz + rsync $(rsync_args) glibmm-docs.tar.gz $$USER@$(web_host):$(web_path_gtkmm) + +post-html: post-html-recursive post-html-local + +doc-clean-recursive: + (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-clean) + +doc-clean: doc-clean-recursive + +doc-rebuild: + (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-rebuild) + +.PHONY: post-html post-html-local post-html-recursive doc-clean doc-clean-recursive doc-rebuild + diff --git a/libs/glibmm2/NEWS b/libs/glibmm2/NEWS index 9edbf66137..ec811b31ed 100644 --- a/libs/glibmm2/NEWS +++ b/libs/glibmm2/NEWS @@ -1,3 +1,160 @@ +2.13.3: + +* gmmproc improvements: + - gmmproc: Allow () in property and signal docuemntation. + - gmmproc: Do not try to remove a common prefix from the + C enam values, if there is no common prefix. + - enum.pl: Allow whitespace in front of an enum typedef. + (Daniel Elstner) + - enum.pl: Fix an infinite loop. + +* ObjectBase: Added connect_property_changed(), + as an alternative to use when the property proxies are not + available because GLIBMM_PROPERTIES_ENABLED is not defined. + (Murray Cumming) +* Value: When registering float parameters, use + G_MAXFLOAT as the minimum, instead of G_MINFLOAT. + Likewise for doubles. + (Oliver Nittka) + +2.13.2: + +*Build: + - Fix for api-default-signal-handlers option. + Bug #357830 (Matt Hoosier) + - win32: Remove unused source file from Visual Studio project. + (Cedric Gustin) + +2.13.1: + +* KeyFile class added, wrapping GKeyFile, + for parsing of .ini-style files. + (Rob Page) +* Added get_user_data_dir(), get_user_config_dir(), and + get_user_cache_dir(). + (Jonathon Jongsma) +* Support optional ifdef parameters in the .hg macros, + to allow, for instance the --enable-atk=no option, + to disable the build and use of the atkmm API, + for use in embedded environments. + (Johannes Schimd, Murray Cuming, Openismus) +* Documentation: + - Small ustring reference documentation improvement. + (Ralf Stephan) + +2.12.0: + +Changes sinze 2.10: +* Added the --enable-api-default-signal-handlers option, for use in + embedded environments that have reduced resources. See configure --help + for the other subsets. +* Value: Added init(const GValue*), so we can copy GValue instances + of any type at runtime. Needed by the new branch of libgdamm. + +2.11.3: + +* Build: Added the --enable-api-default-signal-handlers option, for use in + embedded environments that have reduced resources. See configure --help + for the other subsets. + +2.11.2: + +* Date: Fix implementation of Glib::Date::set_time_current() so + that it doesn't set the date to Dec 31, 1969. + (Jonathon Jongsma) +* Value: Added init(const GValue*), so we can copy GValue instances + of any type at runtime. Needed by the new branch of libgdamm. + (Murray Cumming) +* Added a #warning to warn about including X11/Xlib.h before a glibmm header, + which would break things. Bug #316726 from Mert Tugcu and Javeed Shaikh. + (Murray Cumming) +* Build: + - Quote some m4 macros to avoid warnings. Bugs (with patches) #347076 + and #347077 + (Kevin McBride). + - Fix exporting of get/set_property() on mingw32-gcc. + (Cedric Gustin) + + + + +2.10.1 + +* Windows Build: + - Define GLIBMM_DLL when building with mingw32 or cygwin, + because it is needed by gtkmm. Bug #309030 + (Cedric Gustin) +* OptionGroup: Allow default values, by not initializing them all. + (Armin Burgmeier) +* Slight code size reduction by marking private functions as static. + (Murray Cumming) + +2.10.0: + +* Windows Build: + - ustring.h: Tag npos with GLIBMM_API, in order to + dllexport it on win32. Bug #332438. + - Updated MSVC++ build files and README, for MS Visual Studio 2005. + (Cedric Gustin) +* gmmproc code generator: + - WRAP_METHOD() Take an extra optional argument: deprecated deprecationtext - + so that we can insert the appropriate doxygen tag in the documentation, where + the C documentation does not do it for us. + +2.9.1: + +* Date: + - Added set_time(time_t), set_time(GTimeVal), and deprecated + set_time(GTime) + - Added set_time_current(). + (Murray Cumming) +* Build: Added --enable-deprecated-api option. When set to disabled, + it does not build deprecated API. This reduces the size of the + library, and might be useful for embedded devices. + (Murray Cumming) + +2.8.2: + +* Solaris build fix: Correct the detection + of make. (Mark Rouchal) + +2.8.1: + +* Build: Check for glib 2.8. + +2.8.0: + +API additions since glibmm 2.6: + +* GModule: Add BIND_LOCAL enum value. + (Bug #172748 from Phillip Neiswanger). +* MainContext Added signal_child_watch() + and examples/child_watch. + (Yair Hershkovitz) +* OptionEntry: Added FLAG_NO_ARG, FLAG_FILENAME, + FLAG_OPTIONAL_ARG, and FLAG_NOALIAS enum values. + (Murray Cumming) + +2.7.3: + +* Updated reference documentation from glib documentation. + +2.7.2: + +* OptionEntry: Added FLAG_NO_ARG, FLAG_FILENAME, + FLAG_OPTIONAL_ARG, and FLAG_NOALIAS enum values. +* build_filename() and build_path(): Now use the implementation + from glib. + +2.7.1: + +* GModule: Add BIND_LOCAL enum value. + (Bug #172748 from Phillip Neiswanger). +* MainContext Added signal_child_watch() + and examples/child_watch. + (Yair Hershkovitz) +* Fixes from 2.6.2. + 2.6.1: * Interface::add_interface(): Disabled the check for a second call, diff --git a/libs/glibmm2/README b/libs/glibmm2/README index eef49fd1a7..341c67e439 100644 --- a/libs/glibmm2/README +++ b/libs/glibmm2/README @@ -1,31 +1,4 @@ -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. +This is glibmm, a C++ API for parts of glib that are useful for C++. +See http://www.gtkmm.org -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 index 267f846203..4c4f33068d 100644 --- a/libs/glibmm2/SConscript +++ b/libs/glibmm2/SConscript @@ -5,14 +5,14 @@ import os.path import glob -glibmm2_files = glob.glob('glibmm/*.cc') +glibmm2_files = glob.glob('glib/glibmm/*.cc') Import('env libraries install_prefix') glibmm2 = env.Copy() -glibmm2.Merge([libraries['sigc2'], libraries['glib2']]) +glibmm2.Merge([libraries['sigc2'], libraries['glib2'], libraries['glibmm2']]) -glibmm2.Append(CXXFLAGS='-DHAVE_CONFIG_H') +glibmm2.Append(CXXFLAGS=['-DHAVE_CONFIG_H', '-DGLIBMM_EXCEPTIONS_ENABLED', '-DGLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED', '-DGLIBMM_PROPERTIES_ENABLED']) #glibmm2.Append(CXXFLAGS='-DG_DISABLE_DEPRECATED') glibmm2.Append(CXXFLAGS='-DG_LOG_DOMAIN=\\\"glibmm\\\"') diff --git a/libs/glibmm2/scripts/macros.m4 b/libs/glibmm2/scripts/macros.m4 index dc125a3c9c..44a9c4de05 100644 --- a/libs/glibmm2/scripts/macros.m4 +++ b/libs/glibmm2/scripts/macros.m4 @@ -29,7 +29,7 @@ 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 +if ${MAKE-make} --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) diff --git a/libs/gtkmm2/ChangeLog b/libs/gtkmm2/ChangeLog index 9966e67673..264762a992 100644 --- a/libs/gtkmm2/ChangeLog +++ b/libs/gtkmm2/ChangeLog @@ -1,3 +1,2735 @@ +2.10.8: + +2007-03-03 Alan Ott + + * docs/tutorial/gtkmm-tut.xml: Added a new appendix, about using + Visual Studio 2005. + * docs/tutorial/figures/Makefile.am: Mention new screenshots, for the + new appendix. + Bug #409102 + +2007-02-15 Murray Cumming, + + * gdk/src/dragcontext.ccg: Use GDK_POINTER_TO_ATOM() instead of a simple + cast, which is more like GTK+ public API. + +2007-02-11 Marko Anastasov + + * docs/tutorial/gtkmm-tut.xml: Updated chapter on internationalization. + Explains how to set up an autotools-based project, the use of intltool, + basic instructions how to add a translation and a resources list. + +2007-01-28 Daniel Elstner + + * gtk/src/actiongroup.ccg (ActionGroup::add): Don't use NULL but + static_cast(0) to terminate the g_object_get() varargs list, + to prevent serious breakage on 64-bit systems without GCC magic. + Please, everyone, do me a favor and don't use NULL in C++ code, + especially not in conjunction with varargs. Thanks. + +2.10.7: + +2007-01-25 Murray Cumming + + * gtk/src/main.ccg: Destructor: Call the cleanup functions, instead of calling + init again. This seems to be a copy/paste error from April 2003. + Bug #383340 from Christopher Raine. + +2007-01-20 Murray Cumming + + * docs/index.html: Add a Google search, restricted to the gtkmm documentation. + +2007-01-12 Marko Anastasov + + * gtk/src/printoperation.ccg: Specify a template specialization for + Glib::unwrap() to avoid ambiguities detected and reported as errors + in Sun Workshop on OpenSolaris. Bug #395572 from Tim Mooney. + +2006-12-21 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: libglade with derived widgets: Add more explanation + about the BaseObjectType typedef. + Patch from Martin Nordholts in bug #387708. + +2006-12-11 Murray Cumming + + * gtk/src/sizegroup.hg: Added class documentation. + +2.10.6: + +2006-11-28 Murray Cumming + + * gdk/src/drawable.hg: create_cairo_context(): Specify true to + the Cairo::Context constructor because we have a starting reference. + This should prevent a leak an extra reference. + * gtk/src/printcontext.hg: get_cairo_context(): + * gtk/src/printjob.hg: get_surface(): Pass false to the Cairo constructor, + because we do not receive a reference, and do not use refreturn(). Previously + we did two references were one was needed. + +2.10.5: + +2006-11-24 Johannes Schmid + + * gtk/src/uimanager.ccg: + Fixed a crasher in error handling when exceptions are disabled + +2006-11-24 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: UIManager: Added notes about which + parts are human-readable and which parts are just IDs, with a + suggestion about what part to mark for translation. + +2006-11-23 Nate Nielsen + + * gtk/src/style.ccg: + * gtk/src/style.hg: lookup_icon_set(): Hand-code this method, + so we can copy the result of gtk_style_lookup_icon_set(), + because it does not give us a new instance. + Bug #374094 + +2006-11-22 Cedric Gustin + + * configure.in: Do not pkgconfig check gtk+-unix-print-2.0 on + win32, as gtk+-unix-print-2.0.pc is not always included in GTK+ + installers and/or binary archives (like in Tor's binaries). + Bug #371882 from Alexis Wilke. + +2.10.4: + +2006-11-21 Rémi Cardona + + * configure.in: + * gtk/gtkmm-2.4.pc.in: Define a GTKMM_PC_ATKMM_DEP conditional and + use it so that atkmm is only required when it is built, and not + when disbaled via --enable-api-atkmm=no. + Bug #366930 from John N. Laliberte. + +2006-11-14 Murray Cumming + + * configure.in: + * gtk/gtkmmconfig.h.in: + * scripts/reduced.m4: Added --enable-api-maemo-extensions + configure option, default to false, defining the + GTKMM_MAEMO_EXTENSIONS_ENABLED macro. + * gtk/src/textbuffer.hg: + * gtk/src/textbuffer.ccg: Put the Maemo-specific API in + ifdefs, using the optional _WRAP_METHOD() parameter. + +2006-11-20 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Optional API appendix: Use the + tag. + +2006-11-14 Daniel Elstner + + * autogen.sh: Wholly replace this script with a critter from one + of my personal projects, with slight modifications. This one does + some sophisticated stuff like probing version numbers of available + automake and aclocal executables, in order to choose the right one + accordingly. All this is necessary to make the build system work + robustly in custom environments such as Maemo where automake-1.9 + doesn't come preinstalled. + While we're at it, kill some old cruft such as the check for GNU + make. This test was kind of pointless as the $MAKE variable was + never exported. Also get rid of the --enable-warnings=hardcore + magic; this just doesn't belong here and could cause unnecessary + trouble to non-developers. + +2006-11-13 Murray Cumming + + * docs/reference/Doxyfile.in: Add missing PREDEFINES so that we build + documentation only for the normal API. + +2006-11-12 Ralf Stephan + + * gdk/src/drawable.hg: Add comment paragraph about using cairo. + +2006-11-10 Murray Cumming + + * configure.in: + * tests/Makefile.am: + * tests/main.cc: Add new test, with commented-out test for an alternative + API that I will add to glibmm. + +2.10.3: + +2006-11-08 Murray Cumming + + * gtk/src/adjustment.ccg: + * gtk/src/adjustment.hg: Hand-code the constructor so that we can provide + the g_object_new() properties in a non-standard order, so that the value + is not ignored. This is what gtk_adjustment_new() does too. + Bug #369335 from Daniel Holbach, via Vincent Levesque in the Ubuntu + Launchpad bug-tracker. + +2006-10-11 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Added an appendix describing the optional + API for reduced resources devices, and the corresponding ifdefable macros. + +2006-10-11 Murray Cumming + + * gdk/src/gdk_docs_override.xml: Provide a corrected version of the + Drawable::get_image() method, to avoid mentioning a function that + does not exist in gtkmm. Bug #358268 from Evgeny Rippi. + +2006-10-10 Murray Cumming + + * gtk/src/gtk_docs_override.xml: Correct the documentation for + gtk_container_remove() and gtk_widget_add_mnemonic_label() to + avoid mention of non-existant destroy signal and destroy() method. + Thanks to Nickolai Dobrynin for pointing this out. + +2006-10-10 Murray Cumming + + * docs/index.html: Correct the links to the Memory Management + and libglademm chapters. + +2006-10-02 Murray Cumming + + * gtk/gtkmm/listviewtext.cc: get_column_title(): + Use "" instead of Glib::ustring() in + g_return_val_if_fail() to fix an odd build problem with + gcc 3.3.6. Bug #352226. (Thomas Zajic) + +2006-10-01 Murray Cumming + + * Makefile.am: + * docs/FAQ/Makefile.am: + * docs/Makefile.am: + * docs/Makefile_web.am_fragment: + * docs/images/Makefile.am: + * docs/reference/Makefile.am: + * docs/tutorial/Makefile.am: + * examples/Makefile.am: Upload to the new hoster instead of to sourceforge. + Abstracted the host and path names into docs/Makefile_web.am_fragment to + avoid duplication. + +2.10.2: + +2006-09-21 Jonathon Jongsma + + * examples/book/socket/Makefile.am: remove source file dependency on a + non-existent file. This was part of an earlier example, but I simplified + the example and removed this file so that it would be easier to understand, + but forgot to remove it from the Makefile.am + +2006-09-19 Johannes Schmid + + * scripts/reduced.m4: Added GTKMM_ARG_ENABLE_API_ATKMM() to + add the --enable-api-atkmm configure option. + * configure.in: Use GTKMM_ARG_ENABLE_API_ATKMM, and optionally + use the atkmm subdirectory (and its children). + * gtk/gtkmmconfig.h.in: undef GTKMM_ATKMM_ENABLED so that + it will be defined (or not) in gtkmmconfig.h. + * Makefile.am: Optinally build in the atkmm directory.. + * demos/Makefile.am: + * demos/gtk-demo/Makefile.am: + * examples/Makefile.am_fragment: + * tests/Makefile.am_fragment: + * gtk/gtkmm/Makefile.am: Make linking and including of + atkmm optional. + * gtk/src/main.ccg: Only call Atk::wrap_init() if atkmm is enabled. + * gtk/src/widget.hg: Only derive from (and implement) + Atk::Implementor if atkmm is enabled. + get_accessible(): + * gtk/src/combobox.hg: get_popup_accessible(): + Use the extra ifdef GTKMM_ATKMM_ENABLED option to put ifdefs around this + API, so that it will not be built if we do not have atkmm. + Note that this needs the latest glibmm. + +2006-09-19 Jonathon Jongsma + + * configure.in, docs/tutorial/figures/Makefile.am, + docs/tutorial/figures/socket-fail.png, docs/tutorial/figures/socket.png, + docs/tutorial/gtkmm-tut.xml, examples/book/Makefile.am, + examples/book/socket/.cvsignore, examples/book/socket/Makefile.am, + examples/book/socket/plug.cc, examples/book/socket/socket.cc: added new + chapter to the tutorial on Gtk::Plug and Gtk::Socket, including a simple + example program and a couple of screenshots. + +2006-08-23 Jonathon Jongsma + + * configure.in: re-enabled --disable-demos configure option. It was + disabled due to a bit of stupidity on my part. + +2.10.1: + +2006-08-21 Jonathon Jongsma + + * NEWS: update for 2.10.1 release + +2006-08-21 Jonathon Jongsma + + * gtk/src/button.hg: fix a typo in the new API for + Gtk::Button::get_image_position() (was set_image_position()). Fixes bug + number 352088. + * configure.in: bumped revision to 2.10.1 for new release, disabled + configuration switch for disabling demos because it was breaking 'make + distcheck' and I couldn't get it figured out in time for a release. For now + it will just always build the demos. + +2006-08-21 Cedric Gustin + + * MSVC_Net2003/*.vcproj, MSVC_Net2003/gtkmm.sln: Updated for + gtkmm-2.10. + * MSVC_Net2003/examples/printing/*: Added printing example. + * gtk/src/Makefile_list_of_hg.am_fragment: Moved + pagesetupunixdialog.hg, printer.hg, printjob.hg and + printunixdialog.hg to files_posix_hg. + * gtk/src/pagesetupunixdialog.hg, gtk/src/printer.hg, + gtk/src/printjob.hg, gtk/src/printunixdialog.hg: Tag classes with + _GTKMMPROC_WIN32_NO_WRAP as they are not supported on win32. + * configure.in: Added MSVC project file for printing example to + AC_CONFIG_FILES list. Added pangocairo to the list of packages + checked by PKG_CHECK_MODULES (required for building DLLs on win32). + +2.10.0: + +2006-08-17 Murray Cumming + + * configure.in: Correct the needed cairomm version. + * gdk/gdkmm/general.h: Add documentation for Cairo::rectangle() and + Cairo::region(). + * gtk/src/scrolledwindow.hg: get_[v|h]scrollbar(): Do not use refreturn, + because they are widgets, not just refcountable objects. + +2006-08-17 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: Fix tutorial to include code for the simple + printing example + +2006-08-16 Marko Anastasov + + * examples/book/printing/advanced/examplewindow.cc: + * examples/book/printing/advanced/examplewindow.h: + Bind pointers to RefPtrs of PrintFormOperation. This solves the issue + of PFOs having unnecessarily increased refcount and makes them deleted + as soon as they're completed. + Removed on_printoperation_preview_done() as the settings stay in + the print dialog anyway. + * examples/book/printing/advanced/main.cc: Deleted a commented line. + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: + Explained the use of m_SpinAdjustment. + * examples/book/printing/advanced/printformoperation.cc: + * examples/book/printing/advanced/printformoperation.h: + Uncommented the code for custom tab in print dialog. Within + on_create_custom_widget(), use Gtk::manage() for the main vbox too. + Removed signal_preview_done. + + Also removed the g_debugs and reformatted some lines in all files. + +2006-08-15 Murray Cumming + + * configure.in: Require the latest cairomm (0.7.0), which we + apparently need. + +2006-08-11 Marko Anastasov + + * gtk/src/pagesetup.hg + * gtk/src/pagesetupunixdialog.hg + * gtk/src/printcontext.hg: + * gtk/src/printer.hg: + * gtk/src/printoperation.hg: + * gtk/src/printunixdialog.hg: + * gtk/src/recentchooser.hg: + * gtk/src/recentchooserdialog.hg: + * gtk/src/recentchoosermenu.hg: + * gtk/src/recentchooserwidget.hg: + * gtk/src/recentfilter.hg: + * gtk/src/recentinfo.hg: + * gtk/src/recentmanager.hg: Added or updated from C docs. + * gtk/src/printoperationpreview.hg: Removed a TODO about ready and + got_page_size signals. + +2006-08-11 Marko Anastasov + + * docs/tutorial/figures/Makefile.am: + * docs/tutorial/figures/printing.png: Added a screenshot of the main + window of the printing example(s). + * docs/tutorial/gtkmm-tut.xml: Minor changes to the printing chapter: + fixed end_print() explanation, mentioning of the advanced example and + the title of the example figure. + +2.9.10: + +2006-08-05 Johannes Schmid + + * docs/tutorial/gtkmm-tut.xml: + Utility is called enum.pl not enums.pl (#350028) + +2006-08-03 Murray Cumming + + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: + Store the print context as a member variable instead of using sigc::bind + to use it in on_drawing_area_realized(). Null the print context and preview + refptrs when we call end_preview(), because we have stopped using them, + and maybe we should not be keeping their objects alive. + +2006-08-03 Marko Anastasov + + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: + * examples/book/printing/advanced/printformoperation.cc: + Don't pass page_count as a ctor parameter but access it directly via + m_pOperation when needed. It's also incorrect the first way because + it has not yet been determined at the point of PreviewDialog's + construction. Added an Adjustment to use it with the spin button + in PreviewDialog so that spinning within multiple pages actually works. + +2006-08-03 Marko Anastasov + + * examples/book/printing/advanced/previewdialog.cc: + Added forgotten call to hide() in on_close_clicked(). + +2006-08-03 Marko Anastasov + + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: + Added on_hide(), so that we call PrintOperationPreview's end_preview() + on window manager's close action too. + +2006-08-02 Murray Cumming + + * examples/book/printing/advanced/previewdialog.cc: Constructor: + Improve the packing of the widgets. + on_popreview_got_page_size(): Add a comment to explain. + +2006-08-02 Murray Cumming + + * examples/book/printing/advanced/previewdialog.cc: + Constructor: Initialize m_DpiX and m_DpiY, as noticed by valgrind. + Connect to signals here instead of later, so we do not risk connecting + more than once. + on_drawing_area_realized(): Check gdk_window is not null before using it. + on_popreview_got_page_size(): Check that drawing_area is realized before + trying to get its allocation. Possibly not necessary. Check the pango + layout is not null before using it. + * examples/book/printing/advanced/printformoperation.cc: on_draw_page(): + Check that the print context and pango layout are not null before using + them. + * examples/book/printing/advanced/printformoperation.h: Connect to the + hide signal of the dialog instead of delete_event(). + +2006-08-02 Murray Cumming + + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: Rename the signal + handlers so it is is bit clearer. Use show_all_children() instead of + show_all() so that the caller can decided when to show the window. + * examples/book/printing/advanced/printformoperation.cc: Use show(), + and set the dialog pointer to 0 after deleting it. + +2006-08-02 Armin Burgmeier + + * gtk/src/fontbutton.hg: Renamed constructor argument to font_name + for gmmproc to produce the correct property name. + + +2006-08-02 Marko Anastasov + + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: + * examples/book/printing/advanced/printformoperation.cc: + * examples/book/printing/advanced/printformoperation.h: + Further efforts to fix #347857. See comment #14. + * gtk/src/pagesetup.hg: + Removed some commented conversions for PaperSize which haven't been + used ever since convert_gtk.m4 contains the necessary. + * gtk/src/printoperationpreview.hg: + Fixed the conversion for PrintContext which takes a reference and fixes + some of the problems in the bug. Uncommented ready and got_page_size + signals. + * tools/m4/convert_gtk.m4: + Made both conversions for PaperSize (C to Cpp) take a reference. + Removed two unnecessary conversions for PrintContext. + +2006-08-01 Jonathon Jongsma + + * docs/tutorial/figures/Makefile.am: + * docs/tutorial/figures/recentchooserdialog.png: + * docs/tutorial/gtkmm-tut.xml: added a screenshot of the RecentChooserDialog + and a bit of additional explanation to the example + +2006-08-01 Murray Cumming + + * gtk/src/recentchooser.ccg: + * gtk/src/recentchooser.hg: + * gtk/src/recentinfo.ccg: + * gtk/src/recentinfo.hg: + * gtk/src/recentmanager.ccg: + * gtk/src/recentmanager.hg: Move RecentInfoTraits into recentinfo.hg, and + use it for RecentManager::get_items() as well as the existing + RecentChooser::get_items(). + +2006-07-30 Murray Cumming + + * gtk/src/recentchooser.ccg: + * gtk/src/recentchooser.hg: + * gtk/src/recentinfo.hg: + * gtk/src/recentmanager.hg: Use RecentInfo via RefPtr always. + * tools/m4/convert_gtk.m4: + +2006-07-27 Murray Cumming + + * docs/index.html: Linked to the wiki page. + +20c06-07-26 Murray Cumming + + * gtk/src/recentinfo.hg: Use _CLASS_OPAQUE_REFCOUNTED instead of + _CLASS_OPAQUE_COPYABLE(), because this struct has ref/unref instead + of copy/free. This causes the reference() and unreference() methods + to generated. + * examples/book/printing/advanced/printformoperation.cc: + Wrapping C libraries section: Correct the _CLASS_OPAQUE_COPYABLE + section and mention _CLASS_OPAQUE_REFCOUNTED. + +2006-07-25 Jonathon Jongsma + + * examples/book/recent_files/examplewindow.cc: + * examples/book/recent_files/examplewindow.h: Fix recent files example so + that it actually pops up a dialog when you select the recent files menu + item. Also added _mnemonics to menu items for easy keyboard navigation :) + +2006-07-25 Murray Cumming + + * examples/book/printing/advanced/printformoperation.cc: + * examples/book/printing/advanced/printformoperation.h: Uncomment out + the on_preview() override again, and add an if that shows that m_refLayout is + null, because on on_begin_print() has never been called. + +2006-07-25 Murray Cumming + + * examples/book/printing/advanced/examplewindow.cc: + * examples/book/printing/advanced/printformoperation.cc: + * examples/book/printing/advanced/printformoperation.h: + * examples/book/printing/simple/examplewindow.cc: Made the two examples more + like each other, so that it is more obvious what is causing the crash, + though I commented out the crashing override, with a comment. + + +2006-07-24 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: Added preliminary chapter on using the new + recent files API (RecentManager, RecentChooser, etc). I really think that + the recent_files example could use some simplification, but I haven't + tackled that at all yet. I'm going to leave out any UIManager / Recent + files integration for now since it seems like it will be a big manual hack + until GtkRecentAction gets introduced in GTK+ 2.12 + * examples/book/recent_files/Makefile.am: renamed the executable name that + seemed to be a copy-paste error and was rather confusing + +2.9.9: + +2006-07-24 Murray Cumming + + * configure.in: Depend on glibmm 2.11.3 so that the new defines are available + for the (default) --enable-api-default-signal-handlers=yes case. + * gtk/src/printcontext.hg: + * gtk/src/printer.hg: + * gtk/src/printjob.hg: + * gtk/src/printoperation.hg: + * gtk/src/printoperationpreview.hg: + * gtk/src/printsettings.hg: + * gtk/src/printunixdialog.hg: Use our special newin2p10 doxygen keyword. + +2006-07-24 Murray Cumming + + * gtk/src/widget.hg: Moved the new composited_changed signal to the bottom + because that is where I like them, and because adding virtual methods in + the middle of other virtual methods changes the offsets of existing + virtual methods, breaking ABI. Also, used no_default_signal, to avoid + even having a virtual method, which would increase the object size, breaking + ABI. I have made this mistake before. This should fix bug #348241. + +2006-07-23 Jonathon Jongsma + + * gtk/src/recentmanager.hg: change API to use overloaded functions instead + of different function names. RecentManager::add_full() was changed to + RecentManager::add_item() per discussion on mailing list. + +2006-07-20 Marko Anastasov + + * gtk/src/printoperation.hg: Added the forgotten refreturn for + get_print_settings(), which fixes a part of #347857. + +2006-07-20 Marko Anastasov + + * examples/book/printing/advanced/examplewindow.h: + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/printformoperation.cc: + * examples/book/printing/simple/printformoperation.cc: + Replaced calls to pango_cairo_* functions with their wrappers; + removed some unnecessary comments. + +2006-07-20 Marko Anastasov + + * gtk/src/widget.hg: Fixed a typo for input_shape_combine_mask(), + to wrap the right GTK method. + +2006-07-19 Murray Cumming + + * gtk/src/container.ccg: + * gtk/src/entrycompletion.ccg: + * gtk/src/entrycompletion.hg: + * gtk/src/widget.ccg: Put custom default signal handlers in #ifdefs so that + gtkmm builds when --enable-api-default-signal-handlers was used with glibmm. + +2006-07-19 Murray Cumming + + * gtk/src/spinbutton.hg: Wrap the new wrapped signal, without + a default handler because that would break ABI. + +2006-07-18 Jonathon Jongsma + + * examples/*: reverted changes to includes in example programs + +2.9.8: + +2006-07-18 Murray Cumming + + * gtk/src/textbuffer.ccg: + * gtk/src/textbuffer.hg: Wrapped some of the functions from gtktextbufferrichtext.h, + but left some of it commented-out while I discover how it should work, to avoid + creating a bad API that we can not change later. + +2006-07-10 Jonathon Jongsma + + * gtk/src/widget.ccg: + * gtk/src/widget.hg: wrapped is_composited(), composited_changed signal, + input_shape_combine_mask(), unset_input_shape_combine_mask() + +2006-07-16 Murray Cumming + + * docs/index.html: Update links, because inserting the printing chapter increased + subsequent chapter numbers. + * docs/tutorial/gtkmm-tut.xml: Wrapping C libraries: Mentioned _WRAP_ENUM(). + * gtk/src/togglebutton.ccg: + * gtk/src/togglebutton.hg: Added a constructor that takes a stock item, like + Button already has. + +2006-07-13 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Minor corrections to the language in the + new printing chapter. + +2006-07-13 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: gmmproc appendix: Corrected the description of + the _DEFS() macro, and mention not to include C headers in C++ headers. + +2006-07-12 Marko Anastasov + + * docs/tutorial/gtkmm-tut.xml: Added a chapter about printing. + +2006-07-12 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Added an appendix about wrapping C libraries with + gmmproc, including the various things you need to change when copying an + existing project. + +2006-07-10 Jonathon Jongsma + + * docs/index.html: update to match the style of the new website a bit + * docs/tutorial/style.css: change the style of the tutorial slightly to + match the website style. These are just minor tweaks. Ideally I think they + should both get a bit more of an overhaul. + +2006-07-09 Jonathon Jongsma + + * .cvsignore: add a whole bunch of files to .cvsignore + +2006-07-09 Jonathon Jongsma + + * examples/*: Don't include if possible. Modified all examples to + only include the headers that they absolutely need. Hopefully this speeds + up compilation at least slightly and reduces the amount of recompilation + needed for examples due to unrelated changes. + +2006-07-08 Marko Anastasov + + * examples/book/printing/simple/examplewindow.cc: + * examples/book/printing/simple/main.cc: + * examples/book/printing/simple/printformoperation.cc: + Minor code cleanup to fit the tutorial. + +2006-07-08 Murray Cumming + + * gtk/src/entrycompletion.hg: + * gtk/src/iconview.hg: + * gtk/src/treeviewcolumn.hg: Added TODOs to mention new bases clases + (interfaces that these GTypes now implement) that we may not add as + base classes without breaking C++ ABI. + +2006-07-08 Murray Cumming + + * gtk/src/printoperationpreview.hg: Commented-out the signals, with a TODO, + for now because they seem to cause a crash when viewing the preview. + +2006-07-08 Murray Cumming + + * gtk/src/printoperation.hg: Derive from, and implement, PrintOperationPreview, + so that the dynamic_cast in the Glib::wrap() in on_preview() can succeed. + * examples/book/printing/advanced/examplewindow.cc: + * examples/book/printing/simple/examplewindow.cc: Do not set a window + border width. It looks odd, and it is not normal to have a border around the + menu. + +2006-07-08 Murray Cumming + + * examples/book/printing/advanced/Makefile.am: + * examples/book/printing/simple/Makefile.am: Rename the executable to + example, to match the other examples. + +2006-07-07 Marko Anastasov + + * configure.in + * examples/book/printing/Makefile.am: Split the printing example into + "simple" and "advanced". + * examples/book/printing/advanced/: + * examples/book/printing/advanced/Makefile.am: + * examples/book/printing/advanced/examplewindow.cc: + * examples/book/printing/advanced/examplewindow.h: + * examples/book/printing/advanced/main.cc: + * examples/book/printing/advanced/previewdialog.cc: + * examples/book/printing/advanced/previewdialog.h: + * examples/book/printing/advanced/printformoperation.cc: + * examples/book/printing/advanced/printformoperation.h: + Advanced example meant to demonstrate how to extend the print dialog + and create a custom preview dialog. + * examples/book/printing/simple: + * examples/book/printing/simple/Makefile.am: + * examples/book/printing/simple/examplewindow.cc: + * examples/book/printing/simple/examplewindow.h: + * examples/book/printing/simple/main.cc: + * examples/book/printing/simple/printformoperation.cc: + * examples/book/printing/simple/printformoperation.h: + Printing API example showing the essential work, relying on the + external viewer program (previewing still needs more work). + +2006-07-07 Murray Cumming + + * gtk/src/pagesetup.hg: + * gtk/src/papersize.hg: + * gtk/src/printer.hg: + * gtk/src/printjob.hg: + * gtk/src/printoperationpreview.hg: + * gtk/src/printsettings.hg: Added class documentation, based on the + C documentation. + * gtk/src/printoperation.ccg: + * gtk/src/printoperation.hg: custom_widget_appl signal: Pass the + widget by pointer, in case the C developers ever decide that it may be null. + SlotPrintSetupDone: Pass a _const_ RefPtr. + run_page_setup_dialog_async(), run_page_setup_dialog(): Pass _const_ PageSetup and + PrintSettings, because I think the function does not change them. + * examples/book/printing/examplewindow.cc: + * examples/book/printing/examplewindow.h: + * examples/book/printing/previewdialog.cc: + * examples/book/printing/previewdialog.h: + * examples/book/printing/printformoperation.cc: + * examples/book/printing/printformoperation.h: Some renaming and comments and TODOs. + +2006-07-07 Murray Cumming + + * configure.in: Remove the mention of examples/printing, because + it is in examples/book/printing instead. + +2006-07-06 Marko Anastasov + + * configure.in + * examples/book/Makefile.am: Include the printing example. + * examples/book/printing/ + * examples/book/printing/Makefile.am: + * examples/book/printing/examplewindow.cc: + * examples/book/printing/examplewindow.h: + * examples/book/printing/main.cc: + * examples/book/printing/previewdialog.cc: + * examples/book/printing/previewdialog.h: + * examples/book/printing/printformoperation.cc: + * examples/book/printing/printformoperation.h: New files - + example of the printing API. Previewing is not finished. + +2.9.7: + +2006-07-05 Marko Anastasov + + * demos/gtk-demo/example_change_display.cc: + * pango/src/tabarray.ccg: Fix the build by preventing warnings with + small workarounds. + * gtk/src/gtk_signals.defs: Restored defs for PrintOperationPreview. + * gtk/src/printcontext.hg: Removed a TODO for ctor - it's always + exposed through PrintOperation's signals. + +2006-07-05 Murray Cumming + + * gtk/src/gtk_signals.defs: Restored Printer and PrintJob defs. + +2006-07-05 Murray Cumming + + * gtk/src/gtk_signals.defs: Restored the Print*Unix stuff. + +2006-07-05 Murray Cumming + + * gtk/src/scrolledwindow.hg: Reimplemented get_h/vscrollbar() with the + new methods in GTK+. + * gtk/src/selectiondata.ccg: + * gtk/src/selectiondata.hg: Added targets_include_rich_text(). + * gtk/src/sizegroup.hg: Added get/set_ignore_hidden(). + * gtk/src/statusicon.hg: Added size_changed signal. + * gtk/src/gtk_signals.defs: Regenerated. + * gtk/src/notebook.hg: Added page_reordered, page_removed, and page_added + signals. + +2006-07-05 Murray Cumming + + * gtk/src/printoperation.hg: Wrap the preview signal, using PrintOperationPreview + via RefPtr, which might be appropriate. The refcounting might need examination. + +2006-07-05 Murray Cumming + + * gtk/src/printoperation.hg: Commented-out the preview signal for now, because + the conversion is bad/wrong, and it is difficult to do, because gmmproc + assumes that we want to deal with the interface via RefPtr. + +2006-06-30 Marko Anastasov + + * gtk/src/printoperation.hg: Added a default value of + PRINT_OPERATION_ACTION_PRINT_DIALOG to the version of run() without + std::auto_ptr. + +2006-06-25 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: add links to gtkmm_hello and gnomemm_hello + programs. Patch from Gezim Hoxha (fixes #345894) + +2006-06-25 Marko Anastasov + + * docs/tutorial/gtkmm-tut.xml: Fixed the sentence explaining + disconnect() in the Timeouts chapter. #345848 from Gezim Hoxha. + +2006-06-24 Marko Anastasov + + * gtk/src/printcontext.hg: Renamed the const function get_cairo() + to get_cairo_context(), to match the original. + +2006-06-24 Marko Anastasov + + * docs/tutorial/gtkmm-tut.xml: Typo correction in the Clipboard + chapter by Gezim Hoxha. + +2.9.6: + +2006-06-21 Murray Cumming + + * gtk/src/printjob.ccg: + * gtk/src/printjob.hg: send_job(): This no longer throws an + exception, because the C function no longer takes a GError*. + * gtk/src/statusicon.ccg: + * gtk/src/statusicon.hg: get_geometry(): Compilation fixes. + +2006-06-21 Murray Cumming + + * gtk/src/label.hg: Added get/set_line_wrap_mode() and property. + * gtk/src/menushell.hg: Added get/set_take_focus() and property. + * gtk/src/printsettings.ccg: + * gtk/src/printsettings.hg: Put the standard settings in a member + class as static const Glib::ustrings, initialized in the .cpp file. + * gtk/src/statusicon.ccg: + * gtk/src/statusicon.hg: Added get_geometry(). + +2006-06-21 Marko Anastasov + + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py. + * gtk/src/printer.ccg: + * gtk/src/printer.hg: Wrapped get_job_count() which was accidentaly + in the ignore list. New function: enumerate_printers(). + +2006-06-21 Murray Cumming + + * gtk/src/printunixdialog.ccg: Add the Gtk:: prefix for Label, to + fix the build, and include the label.h header. + +2006-06-20 Murray Cumming + + * gtk/src/printoperation.hg: Include the C header in the private/*.h + file, so that it can use the enum. + * gtk/src/printsettings.hg: Remove PRINT_SETTINGS_PRINT_TO_FILE. + We really need to make this more like the Stock IDs. + +2006-06-20 Murray Cumming + + * gtk/src/gtk_enums.defs: Updated with enums.pl + * gtk/src/messagedialog.hg: Added set_image() and property. + * gtk/src/printoperation.hg: Do not include gtkprintoperation.h. + preview signal: Pass parent window as pointer, in case it is null. + * gtk/src/printoperationpreview.hg: Signals: Do not use + no_default_handler, because this class is new so we do not need to + preserver ABI. + * gtk/src/printunixdialog.ccg: + * gtk/src/printunixdialog.hg: Added add_custom_tab() overload that + takes a ustring. + * gtk/src/printsettings.hg: Remove get/set_print_to_file(), because + the C function was removed from GTK+. + * gtk/src/treeview.hg: Correct return type of get_grid_lines(). + * tools/m4/convert_gtk.m4: Add conversion for TreeViewGridLines enum. + +2006-06-20 Marko Anastasov + + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py. + * gtk/src/gtk_signals.defs: Updated the whole section for + PrintOperation. + Added defs for PrintOperationPreview: ready and got_page_size. + Added accepts_pdf ans accepts_ps properties for Printer. + * gtk/src/gtk_vfuncs.defs: Added a section for PrintOperationPreview + with render_page, end_preview and is_selected. + * gtk/src/printer.hg: New functions (properties likewise): + accepts_pdf() and accepts_ps(). + * gtk/src/printjob.ccg: Include gtktypebuiltins.h. + * gtk/src/printjob.hg: New enum: PrintCapabilities. + * gtk/src/printoperation.ccg: + * gtk/src/printoperation.hg: Added a version of run() without + the Window parameter. + New signals: done, create_custom_widget, custom_widget_apply, + and preview. + Renamed properties: number_of_pages and pdf_target. Added n_pages + and export_filename instead, and custom_tab_label. + * gtk/src/printoperationpreview.ccg: + * gtk/src/printoperationpreview.hg: New files. + * gtk/gtkmm.h: + * gtk/src/Makefile_list_of_hg.am_fragment: Include the new files. + * gtk/src/printunixdialog.hg: New functions: add_custom_tab and + set_manual_capabilities. + * tools/m4/convert_gtk.m4: Added new conversions. + +2006-06-19 Murray Cumming + + * gtk/src/treeview.hg: Added get/set_rubber_banding(), + get/set_grid_lines(), get/set_enable_tree_lines(). + Added properties for show-expanders, level-indentation, + rubber-banding, enable-grid-lines, and enable-tree-lines. + +2.9.5: + +2006-06-19 Murray Cumming + + * gtk/src/treeview.ccg: Provide implementation for + set_search_position_func(). Bug #344787 from + Elijah Newren. + +2006-06-19 Elijah Newren + + * autogen.sh: Turn on -Werror for gcc-4.x too. #345245 + +2006-06-17 Jonathon Jongsma + + * gtk/gtkmm/accelmap.cc: add missing initializer (fixes #344788) + +2006-06-16 Elijah Newren + + * gtk/src/recentchooser.hg: release_c_type: fix an unused variable + warning. #344786 + +2006-06-16 Murray Cumming + + * gtk/src/notebook.ccg: SignalProxy_WindowCreation_gtk_callback: + Comment-out unused source parameter and return a value when an + exception is caught, to prevent compiler warnings. + Bug #344771 from Elijah Newren. + +2006-06-13 Jonathon Jongsma + + * pango/pangomm-1.4.pc.in: add pangocairo dependency (fixes #344802). + Thanks to Elijah Newren. + +2006-06-13 Jonathon Jongsma + + * examples/book/treeview/listviewtext/examplewindow.cc: + * examples/book/treeview/listviewtext/examplewindow.h: fixed an + initialization order error when compiling with -Werror (fixes #344789) + +2006-06-13 Murray Cumming + + * gtk/src/aboutdialog.ccg: set_url_hook(): Pass the slot pointer instead of a + pointer to the slot pointer, so that this works again. + +2006-06-11 Murray Cumming + + * gtk/src/assistant.hg: Added update_buttons_state(). + * gtk/src/button.hg: Added get/set_image_position() and property. + * gtk/src/clipboard.ccg: + * gtk/src/clipboard.hg: Added request_rich_text(), wait_for_rich_text(), + and wait_rich_text_is_available(). + util_convert_atoms_to_strings(): Prevent memory leak of the result of + gdk_atom_name(). + * gtk/src/entry.hg: Added get/set_inner_border(). + +2006-06-10 Murray Cumming + + * gdk/src/screen.hg: Added get_rgba_visual(), get_rgba_colormap(). + * pango/src/context.ccg: + * pango/src/context.hg: Added get_matrix(). + * pango/src/renderer.ccg: + * pango/src/renderer.hg: Added get_matrix(). + +2006-06-08 Murray Cumming + + * examples/book/custom/custom_widget/custom_gtkrc: + * examples/book/custom/custom_widget/mywidget.cc: + * examples/book/custom/custom_widget/mywidget.h: Make the RC file stuff + work - the secret is that the style value is only available when the + widget has been realized. However, this only works at the moment when + hacking glibmm to change the gtkmm_ prefix to Gtkmm_, due to bug #343012. + * gtk/src/notebook.ccg: set_window_creation_hook(): Adapt to the changed GTK+ C + API, supplying the destroy notification. + * gtk/src/printoperation.hg: Removed set_show_dialog(), set_pdf_target(), + set_track_print_status(), run_async(). + Added set_export_filename(), set_track_print_status(), + set_show_progress(), set_allow_async(), set_custom_tab_label(). + This is to match the C API. + * pango/src/font.ccg: + * pango/src/font.hg: Added describe_with_absolute_size(), get_font_map(). + * pango/src/fontdescription.hg: Added set_absolute_size(), get_size_is_absolute(). + * pango/src/layout.hg: Added get_font_description(), index_to_line_x(). + * tools/m4/convert_pango.m4: Added necessary conversion. + +2006-06-07 Murray Cumming + + * gtk/src/gtk_enums.defs: Updated with enumpl. + * gtk/src/gtk_methods.defs: Updated with h2defs.pyt + * gtk/src/notebook.ccg: + * gtk/src/notebook.hg: Added set_group_id(), get_group_id(), + get_tab_reorderable(), set_tab_reorderable(), + get_tab_detachable(), set_tab_detachable(). + * gtk/src/printcontext.hg: Added set_cairo_context(). + * gtk/src/printoperation.hg: run(): Added PrintOperationAction + parameter. + * tools/m4/convert_gtk.m4: Added necessary conversion. + +2.9.4: + +2006-06-06 Murray Cumming + + * gtk/src/gtk_methods.defs: Updated with h2defs.py. + +2006-06-05 Murray Cumming + + * gtk/src/printcontext.hg: get_cairo() renamed to get_cairo_context(), + get_fontmap() renamed to get_pango_fontmap(), + create_context() renamed to create_pango_context(), + create_layout() renamed to create_pango_layout(), to match the changes in + GTK+. + * gtk/src/printjob.ccg: + * gtk/src/printjob.hg: send(): Handle the exception and add the ifdefed + alternative for --enable-api-exceptions=no. + Comment out get_surface() const, because it does not seem to build with + --enable-api-exceptions at the moment. Added a TODO for that. + +2006-05-29 Murray Cumming + + * pango/src/Makefile_list_of_hg.am_fragment: + * pango/src/cairofontmap.ccg: + * pango/src/cairofontmap.hg: Added wrapper of the CairoFontMap interface. + * pango/src/context.ccg: + * pango/src/context.hg: Added update_from_cairo_context(), + set_cairo_font_options(), set_cairo_font_options(), get_font_options(), + set_resolution(), get_resolution(). + * pango/src/glyphstring.ccg: + * pango/src/glyphstring.hg: Added TODO for pango_cairo_glyph_string_path(). + * pango/src/layout.ccg: + * pango/src/layout.hg: Added create(Cairo::Context), update_from_cairo_context(), + add_to_cairo_context() + * pango/src/layoutline.ccg: + * pango/src/layoutline.hg: Added show_in_cairo_context(), add_to_cairo_context(). + * pango/src/pango_methods.defs: Updated with h2defs.py. + * tools/m4/convert_pango.m4: Added necessary conversions. + +2006-05-26 Jonathon Jongsma + + * examples/treemodelcustom/exampletreemodel.cc: remove interface + registration statements from constructor of the example custom treemodel + which were causing runtime warnings. + +2006-05-26 Murray Cumming + + * examples/book/custom/custom_widget/custom_gtkrc: Add the type prefix + in the style block, which is apparently needed, though it still says it + is an invalid identifier. + * examples/book/custom/custom_widget/mywidget.cc: Use _ instead of - + for the style name, in case that is a problem. + +2006-05-26 Murray Cumming + + * docs/reference/Doxyfile.in: In PREDEFINED, set + GLIBMM_VFUNCS_ENABLED, GLIBMM_PROPERTIES_ENABLED, and + GLIBMM_EXCEPTIONS_ENABLED so that those parts of the API + show up in the documentation. + * examples/book/custom/custom_widget/custom_gtkrc: + * examples/book/custom/custom_widget/mywidget.cc: + Attempt (so far unsuccessfully) to show how to make an + aspect of a custom widget themable. + +2006-05-22 Marko Anastasov + + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py. + * gtk/src/gtk_signals.defs: Added paginate signal for PrintOperation. + * gtk/src/printer.hg: Ignore gtk_printer_compare. + * gtk/src/printjob.hg: Added set/get_track_print_status(). + * gtk/src/printoperation.hg: Added set_track_print_status() and cancel() + methods, paginate signal. + +2006-05-19 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: RefPtr appendix: Reword the bit about using + an official shared_ptr<>. It would not be that easy. + * gtk/src/gtk_docs_override.xml: gtk_table_get_homogenous(). Override because + gtk_table_get_homogenous() is for some reason not being automatically changed to + get_homongenous(). + +2.9.3: + +2006-05-18 Murray Cumming + + * gdk/src/pixbufloader.hg: Add _CONVERSION() needed by write(), now that + glibmm actually does the conversion. + * gtk/src/editable.hg: Use _VFUNC_H() as we did before the big #ifdef changes. + There is no need to stop using it, and it keeps the vfunc order the same as before. + +2006-05-16 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: update the appendix of the tutorial about + building with jhbuild + +2006-05-16 Jonathon Jongsma + + * docs/tutorial/Makefile.am: fix tutorial stylesheet location so that + locally installed documentation can find the stylesheet. Now the locally + installed documentation and the published website documentation both install + the stylesheet in the same relative location. + +2006-05-16 Marko Anastasov + + * gtk/src/pagesetupunixdialog.ccg: + * gtk/src/pagesetupunixdialog.hg: Changed constructor to make parent be the + first parameter, and added an overload without it. + * gtk/src/printjob.hg: + * gtk/src/printoperation.hg: Fix some property wrappers to take RefPtrs when + a property is a Glib object. + * gtk/src/printunixdialog.ccg: + * gtk/src/printunixdialog.hg: Constructor and property changes as above. + +2006-05-16 Murray Cumming + + * gtk/src/actiongroup.ccg: add(): Pass char** instead of char*. + +2006-05-16 Murray Cumming + + * gtk/src/actiongroup.ccg: add(): Use NULL instead of 0 with g_object_get(), to + avoid the warning about a missing sentinel. + +2006-05-16 Murray Cumming + + * gtk/src/actiongroup.ccg: add(): Use g_object_get(), not + g_object_get_data() to get property data. Fixes a memory corruption crash. + This was another regression introduced by the optional API changes. + Bug #341895 from Philip Langdale. + +2006-05-16 Murray Cumming + + * gtk/src/pagesetupunixdialog.hg: + * gtk/src/printunixdialog.hg: Added TODO comments. + * gtk/src/printer.hg: + * gtk/src/printjob.hg: set_source_file(): Changed filename parameter + from ustring to std::string. + * tools/m4/convert_gtk.m4: Remove an unnecessary conversion. + +2006-05-16 Marko Anastasov + + * gtk/src/pagesetupunixdialog.ccg: + * gtk/src/pagesetupunixdialog.hg: + * gtk/src/printer.ccg: + * gtk/src/printer.hg: + * gtk/src/printjob.ccg: + * gtk/src/printjob.hg: + * gtk/src/printunixdialog.ccg: + * gtk/src/printunixdialog.hg: New files - Unix printing API. + * gtk/src/gtk_signals.defs: Added signal and property defs for new files. + * gtk/src/printcontext.hg : Fixed typo for get_cairo() + and brought back create_layout(). + * gtk/src/Makefile_list_of_hg.am_fragment: + * gtk/gtkmm.h: Include new files. + * tools/extra_defs_gen/generate_defs_gtk.cc: Added get_defs() calls + for new types, but commented because the current gtk.h doesn't include + their headers. + * tools/m4/convert_gtk.m4: Added conversions for GtkPrinter. + +2006-05-16 Paul Davis + + * gtk/src/table.hg: fix error when trying to remove a widget from a table + using Table_Helpers::TableList.erase() (fixes bug #341962) + +2006-05-15 Murray Cumming ("name", value) alternatives, + so gtkmm still builds when using this. + * examples/Makefile.am: Disable build of cellrenderercustom because + it needs properties (or too much #ifdefing) + +2006-05-10 Murray Cumming + + * gtk/src/printcontext.hg: Use an #m4 conversion and _WRAP_METHOD() to + generate get_cairo() instead of hand-coding it. + get_page_setup(), get_fontmap(): Return a const instance from the const + overloads. + Removed the const overload of create_layout(). If you are creating it then + you probably want to change it. + * gtk/src/printoperation.hg: Moved signals to the bottom, where we usually put them. + set_pdf_target(): Make the filename parameter a std::string, because the encoding of + filenames is unknown. + +2006-05-08 Marko Anastasov + + * gtk/src/pagesetup.hg + * gtk/src/pagesetup.ccg + * gtk/src/papersize.hg + * gtk/src/papersize.ccg + * gtk/src/printcontext.hg + * gtk/src/printcontext.ccg + * gtk/src/printoperation.hg + * gtk/src/printoperation.ccg + * gtk/src/printsettings.hg + * gtk/src/printsettings.ccg: New files - the platform-independent + part of the printing API. + * gtk/src/enums.hg: Added PageOrientation. + * gtk/src/Makefile_list_of_hg.am_fragment + * gtk/gtkmm.h: Include new files. + * tools/m4/convert_pango.m4 + * tools/m4/convert_gtk.m4: Added new conversions. + * tools/extra_defs_gen/generate_defs_gtk.cc: + Added GTK_TYPE_PRINT_OPERATION. + * gtk/src/gtk_enums.defs: Regenerated with enums.pl. + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py. + * gtk/src/gtk_signals.defs: Added new properties. + * configure.in: Added gtk+-unix-print dependency for upcoming updates. + +2006-04-26 Murray Cumming + + * gtk/src/widget.hg: Added doxygen documentation, marking + signal_get_accessible as deprecated, because it is useless. + Bug #338437. + +2006-04-24 Armin Burgmeier + + * gtk/src/statusicon.ccg: Return value of StatusIcon::create_from_file + was undefined, return created StatusIcon instead. + +2006-04-21 Murray Cumming + + * examples/book/recent_files/.cvsignore: + * examples/book/recent_files/Makefile.am: + * examples/book/recent_files/examplewindow.cc: + * examples/book/recent_files/examplewindow.h: + * examples/book/recent_files/main.cc: Added these missing files, to + fix the build. + * gtk/src/widget.hg: Use deprecated option with the + get_accessible keyword, because it should not exist, because it + is actually a vfunc, but a quirk of gmmproc means that it was generated + even though it is in the .defs file as a vfunc. + +2006-04-21 Murray Cumming + + * gtk/src/treesortable.hg: Correct the documentation for + SlotCompare. Bug #339129 from Kevin Daughtridge. + +2006-04-20 Murray Cumming + + * gtk/src/treeview.ccg: Mark treeview_target_row as static, to slightly + reduce code size by preventing it from being exported in the ABI. + +2006-04-20 Murray Cumming + + * pango/src/fontset.ccg: Remove unnecessary anonymous namespace. + +2006-04-18 Marko Anastasov + + * gtk/src/cellrendererspin.[hg|ccg]: New file. + * gtk/src/Makefile_list_of_hg.am_fragment: Include new hg file. + * gtk/gtkmm.h: Include the new header. + * gtk/src/recentchooser.ccg: + * gtk/src/recentchooser.hg: Fix some typos. + +2006-04-18 Armin Burgmeier + + * gtk/src/cellrenderertext.hg: Change type for ellipsize property from + bool to Pango::EllipsizeMode. Also added some new properties. + (Note: This is technically a small API break, but a break of something + that could not have worked before, and I don't think it's an ABI break + Murray.) + * gtk/src/gtk_signals.defs: Regenerated to contain the new properties. + +2006-04-18 Murray Cumming + + * gtk/src/filechooser.hg: Correct the signature of the confirm_overwrite + signature. This is technically a small API/ABI break, but any use of the + signal as it was would have caused crashes and memory corruption, so that's + not something that anyone could complain about us not preserving. + Bug #338439 from Maxim Udushlivy. + +2006-04-14 Murray Cumming + + * tools/m4/convert_base.m4: Remove this unused file. It is in glibmm already. + +2006-04-13 Murray Cumming + + * gtk/src/recentchooser.ccg: Convert the SignalProxy to the new style that + uses static functions instead. + +2006-04-12 Armin Burgmeier + + * gtk/src/recentchooser.hg: + * gtk/src/recentchooser.ccg: + * gtk/src/recentchooserwidget.hg: + * gtk/src/recentchooserwidget.ccg: + * gtk/src/recentchoosermenu.hg: + * gtk/src/recentchoosermenu.ccg: + * gtk/src/recentchooserdialog.hg: + * gtk/src/recentchooserdialog.ccg: Wrapped GtkRecentChooser, + GtkRecentChooserDialog, GtkRecentChooserMenu and + GtkRecentChooserWidget. + * tools/m4/convert_gtk.m4: Added new needed conversions. + * gtk/gtkmm.h: Include the new headers. + * examples/book/recent_files/: The beginning of an example. To complete + this we need to be able to use RecentFilesMenu with UIManager. The GTK+ + developer is working on this. + +2006-04-12 Marko Anastasov + + * gtk/src/recentinfo.[ccg|hg]: Added new get_applications() and get_groups() + functions that don't take length as a parameter but pass NULL to the + underlaying GTK+ functions. + * tools/m4/convert_gtk.m4: Removed now unnecessary gsize* to unsigned& conversion. + +2006-04-12 Murray Cumming + + * gtk/src/recentfilter.ccg: Fix some typos to fix the build. + Use the new non-class SignalProxy callbacks idea. (See below) + + * atk/src/hyperlink.hg: + * atk/src/hypertext.hg: + * atk/src/objectaccessible.hg: + * atk/src/table.hg: + * gdk/src/colormap.hg: + * gdk/src/cursor.hg: + * gdk/src/display.hg: + * gdk/src/displaymanager.hg: + * gdk/src/drawable.hg: + * gdk/src/event.hg: + * gdk/src/gc.hg: + * gdk/src/image.hg: + * gdk/src/screen.hg: + * gdk/src/visual.hg: + * gdk/src/window.hg: + * gtk/src/aboutdialog.hg: + * gtk/src/accellabel.hg: + * gtk/src/actiongroup.hg: + * gtk/src/assistant.hg: + * gtk/src/button.hg: + * gtk/src/clipboard.hg: + * gtk/src/combobox.hg: + * gtk/src/container.hg: + * gtk/src/entry.hg: + * gtk/src/entrycompletion.hg: + * gtk/src/expander.hg: + * gtk/src/filechooser.hg: + * gtk/src/frame.hg: + * gtk/src/iconinfo.hg: + * gtk/src/iconsource.hg: + * gtk/src/iconview.hg: + * gtk/src/image.hg: + * gtk/src/imagemenuitem.hg: + * gtk/src/invisible.hg: + * gtk/src/label.hg: + * gtk/src/layout.hg: + * gtk/src/menu.hg: + * gtk/src/menuitem.hg: + * gtk/src/menutoolbutton.hg: + * gtk/src/notebook.hg: + * gtk/src/optionmenu.hg: + * gtk/src/paned.hg: + * gtk/src/range.hg: + * gtk/src/scale.hg: + * gtk/src/scrolledwindow.hg: + * gtk/src/selectiondata.hg: + * gtk/src/spinbutton.hg: + * gtk/src/statusicon.hg: + * gtk/src/textbuffer.hg: + * gtk/src/textmark.hg: + * gtk/src/texttagtable.hg: + * gtk/src/textview.hg: + * gtk/src/toolbar.hg: + * gtk/src/toolbutton.hg: + * gtk/src/toolitem.hg: + * gtk/src/treemodelfilter.hg: + * gtk/src/treemodelsort.hg: + * gtk/src/treerowreference.hg: + * gtk/src/treeselection.ccg: + * gtk/src/treeselection.hg: + * gtk/src/treeview.hg: + * gtk/src/uimanager.hg: + * gtk/src/viewport.hg: + * gtk/src/widget.hg: + * gtk/src/window.hg: Use the new constversion option with _WRAP_METHOD() + to reduce code size a little. + +2006-04-07 Murray Cumming + + * gtk/gtkmm/treeview_private.cc: + * gtk/gtkmm/treeview_private.h: + * gtk/src/aboutdialog.ccg: + * gtk/src/assistant.ccg: + * gtk/src/celllayout.ccg: + * gtk/src/clipboard.ccg: + * gtk/src/combobox.ccg: + * gtk/src/entrycompletion.ccg: + * gtk/src/filefilter.ccg: + * gtk/src/menu.ccg: + * gtk/src/texttagtable.ccg: + * gtk/src/treemodelfilter.ccg: + * gtk/src/treeselection.ccg: + * gtk/src/treesortable.ccg: + * gtk/src/treeview.ccg: + * gtk/src/treeviewcolumn.ccg: For most hand-coded SignalProxy classes, used + for set_*func() methods, remove them and just pass a copy of the slot around. + The extra indirection is not necessary. Use standalone callback functions, so + that they can be static, saving a few bytes on the library size. + +2006-04-12 Murray Cumming + + * gdk/src/pixbuf.ccg: + * gdk/src/pixbufloader.ccg: + * gtk/src/colorselection.ccg: + * gtk/src/container.ccg: + * gtk/src/entrycompletion.ccg: + * gtk/src/iconview.ccg: + * gtk/src/treeiter.ccg: + * gtk/src/treemodel.ccg: + * gtk/src/treeselection.ccg: + * gtk/src/widget.ccg: + * pango/src/fontset.ccg: Mark private functions as static, + to stop them being exported in the library, to reduce code size + slightly. + +2006-04-11 Jonathon Jongsma + + * gtk/src/icontheme.ccg: (IconTheme::get_search_path) fixed a segfault + caused by de-referencing a NULL pointer, and also fixed a memory leak by + freeing the list of search paths whose storage was allocated by GTK+. + Closes bug #337874 and #337875 + +2006-04-11 Murray Cumming + + * gtk/src/recentfilter.ccg: + * gtk/src/recentfilter.hg: Added constructor for the Info + inner class, so that the member variables are initialized. + * gtk/src/recentinfo.hg: Split get_icon() into const and non-const + overloads. + * gtk/src/recentmanager.hg: Added TODO comment for documentation. + +2006-04-11 Marko Anastasov + + * gtk/src/recentfilter.[hg|ccg]: + * gtk/src/recentinfo.[hg|ccg]: + * gtk/src/recentmanager.[hg|ccg]: + * gtk/src/Makefile_list_of_hg.am_fragment: Added new files. + * tools/m4/convert_gtk.m4: Add new needed conversions. + * gtk/gtkmm.h: include the new headers. + +2006-04-11 Murray Cumming + + * configure.in: + * examples/book/treeview/Makefile.am: + * examples/book/treeview/modelsort/.cvsignore: + * examples/book/treeview/modelsort/Makefile.am: + * examples/book/treeview/modelsort/examplewindow.cc: + * examples/book/treeview/modelsort/examplewindow.h: + * examples/book/treeview/modelsort/main.cc: Added example of + independently sorted model, with the TreeModelSort parent model. + +2006-04-11 Murray Cumming + + * gtk/gtkmm/listviewtext.cc: Constructor: Use sprintf() instead of + std::stringstream because it is smaller (code size) and faster. + +2006-04-07 Cedric Gustin + + * README.win32: Updated for gtkmm-2.8 (MS Visual Studio 2005). + * MSVC_Net2003/*.vcproj: Updated for Visual Studio 2005. Added the + /vd2 compiler flag (Bug #158040). + * MSVC_Net2003/gtkmm.sln: Updated for Visual Studio 2005. + * MSVC_Net2003/gendef/gendef.cc: Redirect output of dumpbin to a + file. + * build_shared/Makefile_build.am_fragment: Add -DGTKMM_BUILD to + the extra_defines compiler flags (switch between + dllexport/dllimport on win32). + * gtk/src/treeviewcolumn.hg: Tag the TreeViewColumn class with + GTKMM_API to avoid auto-import errors with gcc on + mingw32/cygwin. Also inline some TreeViewColumn methods. Bug + #309030 (Toralf Lund). + * gtk/src/object.hg: Tag the Object class with GTKMM_API to make + Visual Studio happy. + +2006-04-04 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: fixed a few broken links in the jhbuild + appendix + +2006-03-31 Murray Cumming + + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py. + * tools/extra_defs_gen/generate_defs_gtk.cc: Added + GTK_TYPE_CELL_RENDERER_SPIN, GTK_TYPE_RECENT_CHOOSER, + GTK_TYPE_RECENT_CHOOSER_MENU, GTK_TYPE_RECENT_CHOOSER_WIDGET, + GTK_TYPE_RECENT_FILTER, GTK_TYPE_RECENT_MANAGER ) + * gtk/src/gtk_signals.defs: Added sections for the new types. + + +2006-03-28 Murray Cumming + + * gtk/src/gtk_docs_override.xml: Added override for + gtk_widget_render_icon(), because it mentioned unrefing the result. + +2006-03-26 Murray Cumming + + * gdk/src/gdk_docs_override.xml: Override the documentation for + create_cairo_context because it mentions destroying the result, + and says that it is since 2.8 instead of 2.10. + +2006-03-23 Murray Cumming + + * gdk/src/pixbufloader.hg: create(): Add documentation, based on + new C documentation. + +2006-03-22 Murray Cumming + + * docs/tutorial/Makefile.am: Add style.css to EXTRA_DIST. + * docs/tutorial/gtkmm-tut.xml: TreeView chapter: Add a + sub-section about sorting, mentioning the simple set_sort_column() + functions and TreeModelSort for independent sorting. Based on + code from the example from R. Douglas Barbieri in bug #334791. + +2006-03-22 Murray Cumming + + * gdk/src/dragcontext.hg: Added set_icon_name(). + * gtk/src/toolbutton.hg: Added set_icon_name() and + get_icon_name(). + * gdk/src/pixbuf.hg: + * gdk/src/pixbufloader.ccg: + * gdk/src/pixbufloader.hg: + * gtk/src/aboutdialog.hg: + * gtk/src/dialog.hg: + * gtk/src/iconview.hg: + * gtk/src/linkbutton.hg: + * gtk/src/textbuffer.hg: + * gtk/src/textchildanchor.hg: + * gtk/src/treemodelsort.hg: Added documentation, based on + the C documentation. + +2006-03-22 Murray Cumming + + * configure.in: + * examples/book/Makefile.am: + * examples/book/iconview/Makefile.am: + * examples/book/iconview/examplewindow.cc: + * examples/book/iconview/examplewindow.h: + * examples/book/iconview/main.cc: Added example from + R. Douglas Barbieri in bug #335388. + * examples/book/iconview/gnome-dice-1.svg: + * examples/book/iconview/gnome-dice-2.svg: + * examples/book/iconview/gnome-dice-3.svg: + * examples/book/iconview/gnome-dice-4.svg: + * examples/book/iconview/gnome-dice-5.svg: + * examples/book/iconview/gnome-dice-6.svg: + * examples/book/iconview/mozilla-firefox.png: + * examples/book/iconview/xmms.xpm: Sample images for the + example. + +2006-03-22 Murray Cumming + + * docs/index.html: Corrected links to chapters, now that + we added a chapter in the middle. Bug #334989 from Rob Page. + * gtk/gtkmm/listviewtext.h: Added groups and newin doxygen + tags. + +2006-03-22 Murray Cumming + + * gtk/gtkmm/listviewtext.cc: + * gtk/gtkmm/listviewtext.h: Renamed some member variables, and + used ModelColumns via member instance instead of pointer, to + simplify code. + * configure.in: + * examples/book/treeview/Makefile.am: + * examples/book/treeview/listviewtext/Makefile.am: + * examples/book/treeview/listviewtext/examplewindow.cc: + * examples/book/treeview/listviewtext/examplewindow.h: + * examples/book/treeview/listviewtext/main.cc: Added example, + based on treeview/list example. + * gtk/gtkmm.h: Include listviewtext.h + +2006-03-22 Murray Cumming + + * gtk/gtkmm/Makefile.am: + * gtk/gtkmm/listviewtext.cc: + * gtk/gtkmm/listviewtext.h: Added ListViewText, a very simple TreeView + convenience class, from J. Baltasar García Perez-Schofield in bug #329333, + with formatting and constness corrections. + +2006-03-10 Murray Cumming + + * examples/book/drawingarea/clock/clock.cc: + * examples/book/drawingarea/joins/myarea.cc: Update the cairomm enum values for the + latest cairomm API. + +2006-03-08 Murray Cumming + + * gtk/src/combobox.hg: Added get/set_title() and corresponding + tearoff-title property. + * gtk/src/iconview.ccg: + * gtk/src/iconview.hg: Added drag and drop methods. + * gtk/src/treeview.hg: Corrected a typo in the documentation. + * tools/m4/convert_gtk.m4: Added new enum conversion. + +2006-02-25 Murray Cumming + + * gtk/src/treeview.hg: Remove an extra : after a @deprecated. + +2006-02-25 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Signals appendix: Remove vague uninteresting stuff + about different functor types, and mention sigc::ptr_fun, mem_fun distinction earlier. + +o2006-02-25 Murray Cumming + + * gtk/src/gtk_docs.xml: Regenerate from the C files. + * gtk/src/gtk_docs_override.xml: Update the override for gtk_icon_theme_list_icons(), + so that it shows the correct subset examples. Fixes bug #330966 from John Spray + +2006-02-25 Murray Cumming + + * gtk/gtkmm.h: Include layout.h, cellview.h, and icontheme.h. + Bug #332447 from Maxim Udushlivy. + +2006-02-24 Rob Page + + * gtk/src/icontheme.ccg: Change int* to int to fix segfault. Bug #332437. + +2006-02-25 Murray Cumming + + * gtk/src/calendar.hg: + * gtk/src/cellrenderer.hg: + * gtk/src/messagedialog.hg: + * gtk/src/textview.hg: + * gtk/src/treemodelfilter.hg: + * gtk/src/treepath.hg: + * gtk/src/treeview.hg: + * gtk/src/widget.hg: Move the deprecated comment into the _WRAP_METHOD() call, + using the new feature in glibmm, so that it really shows up in the doxygen + documentation. + +2006-02-22 Jonathon Jongsma + + * configure.in: only generate Makefiles for specific features if those + features are enabled (e.g. docs, examples, etc) + +2006-02-22 Murray Cumming + + * gtk/src/gtk_docs_override.xml: Added an override for gtk_icon_theme_list_icons() + because it mentions GList, memory management of the items, and providing a NULL + parameter. + * gtk/src/icontheme.ccg: + * gtk/src/icontheme.hg: Added override of list_icons() that returns all icons, + regardless of context, to match the NULL context case. Bug #330945 from John Spray. + +2006-02-18 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: synchronized the list of widgets without + windows with the documentation from the Gtk+ tutorial (see + http://gtk.org/tutorial/x502.html) + +2006-02-18 Jonathon Jongsma + + * docs/tutorial/style.css: Fixed a couple of tutorial style issues + * docs/tutorial/gtkmm-tut.xml: updated and re-organized the installation + section of the tutorial a bit more -- added dependency on cairomm / cairo, + reworded a few things, etc. + Added a new appendix explaining how to build and install gtkmm from CVS + using jhbuild. + +2006-02-17 Murray Cumming + + * gdk/src/pixbuf.ccg: save_to_buffer(): Use a terminating NULL when + calling gdk_pixbuf_save_to_buffer() to avoid a warning about the sentinel. + +2006-02-13 Rob Page + + * docs/tutorial/gtkmm-tut.xml: minor fixes to gettext chapter, a typo and + a broken link (Bug #331077) + +2006-02-10 Murray Cumming + + * gtk/src/assistant.hg: Wrap the prepared signal, now that it is fixed in GTK+. + * gtk/src/entry.hg: Add a link to the email that says it is OK to wrap the + activate signal. + +2006-02-10 Murray Cumming + + * gtk/src/clipboard.hg: Wrap the owner-changed signal, which was new in + GTK+ 2.8, I think. Use no_default_handler to avoid an ABI break. + * gtk/src/gtk_signals.defs: Added defs for GtkClipboard. + * tools/extra_defs_gen/generate_defs_gtk.cc: Generate .defs for GtkClipboard. + Bug #330139 from Jonathan Jongsma. + +2006-01-30 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: fixed a minor typo in the clipboard section + of the tutorial that referred to get_data_as_text() instead of + get_data_as_string() + +2006-01-29 Murray Cumming + + * docs/tutorial/Makefile.am: Remove unnecessary icons installation line - + it happens in the sub-directory. + * docs/tutorial/figures/Makefile.am: + * docs/tutorial/figures/comboboxentry_complex.png: + * docs/tutorial/figures/comboboxentry_text.png: Added screenshots. + * docs/tutorial/gtkmm-tut.xml: Write basic Combo Boxes chapter, replacing the + text about the deprecated Combo widget, and moving it after the TreeView + chapter, because it needs knowledge of the TreeView. + * examples/book/combobox/complex/examplewindow.cc: + * examples/book/combobox/text/examplewindow.cc: + * examples/book/comboboxentry/complex/examplewindow.cc: + * examples/book/comboboxentry/text/examplewindow.cc: Removed useless + commented-out code. + +2006-01-29 Murray Cumming + + * gtk/src/treeview.hg: Added get_search_entry() and + get_headers_clickable(). + * tools/m4/convert_gtk.m4: Correct the Entry conversion. + +2006-01-29 Murray Cumming + + * gtk/src/widget.ccg: + * gtk/src/widget.hg: Added get_action(). + +2006-01-29 Murray Cumming + + * gdk/gdkmm/general.cc: + * gdk/gdkmm/general.h: Added set_source_pixmap(). + * gtk/src/Makefile_list_of_hg.am_fragment: + * gtk/src/action.ccg: + * gtk/src/assistant.ccg: + * gtk/src/assistant.hg: Added Assistant. + * gtk/src/linkbutton.ccg: + * gtk/src/linkbutton.hg: Added LinkButton + * gtk/gtkmm.h: include the new headers. + * gtk/src/cellrenderertoggle.hg: Added indicator-size property. + * gtk/src/messagedialog.hg: Added properties. + * gtk/src/radioaction.hg: Added set_current_value(). + * gtk/src/sizegroup.hg: Added get_widgets(). + * gtk/src/toolbutton.hg: Deprecated the clicked signal, because + it has become a keybinding/action signal. + * gtk/src/treeview.ccg: + * gtk/src/treeview.hg: Added set_search_position_func(). + * gtk/src/window.hg: Added get_group(). + * tools/extra_defs_gen/generate_defs_gtk.cc: Add the new GTK+ + GTypes. + * tools/m4/convert_gtk.m4: Add new needed conversions. + * gtk/src/gtk_enums.defs: Regenerated with enums.pl + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py + * gtk/src/gtk_signals.defs: Added parts with extra_defs. + +2006-01-28 Pierre Thierry + + * examples/book/buttons/radiobutton/radiobuttons.cc: add comments and + reorganize the example so that it's a bit more understandable for + beginners + * gtk/src/box.hg: add brief clarification of where widgets end up when + packed with a variety of pack_start() and pack_end() calls + +2006-01-24 Murray Cumming + + * docs/tutorial/Makefile.am: Restore html upload line. + * docs/tutorial/gtkmm-tut.xml: Contributing: Added links to bugs page. + * gtk/src/radiobutton.hg: Added documentation for get/set/reset_group(). + +2006-01-24 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Installation: Move section about + packages before the section about installing from source, so people + see the easiest/best way first. Add warning about installing + source-built stuff in /usr. + +2006-01-24 Murray Cumming + + * docs/tutorial/Makefile.am: Upload the style.css file when doing + post-html. + * docs/tutorial/gtkmm-tut.xml: Add para tags to tip and note tags, + as noticed by the validate-original make target. Remove some of + the initial paragraph about it being a draft. + +2006-01-24 Murray Cumming + + * docs/tutorial/Makefile.am: + * docs/tutorial/icons/Makefile.am: Restored some files I messed up + by copying stuff into the wrong place. + +2006-01-24 Murray Cumming + + * docs/tutorial/Makefile.am: + * docs/tutorial/icons/Makefile.am: + * docs/tutorial/icons/caution.png: + * docs/tutorial/icons/home.png: + * docs/tutorial/icons/important.png: + * docs/tutorial/icons/next.png: + * docs/tutorial/icons/note.png: + * docs/tutorial/icons/prev.png: + * docs/tutorial/icons/tip.png: + * docs/tutorial/icons/up.png: + * docs/tutorial/icons/warning.png: Added missing files. + +2006-01-23 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: improve the markup of the tutorial by + replacing a lot of the generic 'literal' tags with more specific ones like + 'classname' or 'function'. Also marked up a bunch of things that weren't + marked up at all. + +2006-01-18 Murray Cumming + + * docs/tutorial/figures/Makefile.am: + * docs/tutorial/figures/*.png: Several updated screenshots from + Jonathon Jongsma. Bug #327142. + +2006-01-18 Murray Cumming + + * gtk/src/gtk_docs_override.xml: Added some new overrides for functions that + mention free() or NULL. + +2006-01-15 Jonathon Jongsma + + * docs/tutorial/Makefile.am: Modified makefile to pass some XSL parameters + to the xsltproc. For example, where to find icon images, what filename to + use as a CSS stylesheet, etc. + * docs/tutorial/insert_example_code.pl: Modified script to mark up the + filename with a docbook 'filename' element so that it can be styled more + easily + * docs/tutorial/style.css: add a new CSS stylesheet for styling the + tutorial. The CSS is based on the GNOME stylesheets used for yelp but a + also designed to fit the theme of the gtkmm website. + * docs/tutorial/icons/*.png: add a bunch of images from the tango theme to + be used for informational and navigational icons. + +2005-12-31 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: Add screenshot for the aspectframe example. + The screenshot was already in CVS, just not linked from the tutorial. + +2005-12-31 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: updated section on prepackaged gtkmm + binaries for linux distributions + +2006-01-07 Michael J M Thomson + + * gtk/gtkmm.h: Include menutoolbutton.h and tearoffmenuitem.h + +2005-12-24 Jonathon Jongsma + + * docs/tutorial/gtkmm-tut.xml: quick fix for source code location of + cairo simple line drawing example + +2006-01-04 Cedric Gustin + + * gtk/src/Makefile_list_of_hg.am_fragment: Moved plug.hg and + socket.hg from files_posix_hg to files_general_hg as both GtkPlug + and GtkSocket are now supported on win32. + +2005-12-20 Murray Cumming + + * gtk/src/container.ccg: + * gtk/src/container.hg: Use custom_c_callback option + with _WRAP_SIGNAL for the remove signal, so we can + provide a custom signal callback (as well as the existing + custom default signal callback). This allows us to + check for already-deleted children in connected signal handler + callbacks as well as the default signal handler. This should + be a partial fix for bug #315874 from Philip Langdale. + +2005-12-23 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: DrawingArea chapter: Move GDK + stuff into an appendix, and remove reference to X, because it is + not always running on X. + +2005-12-23 Murray Cumming + + * docs/tutorial/figures/Makefile.am: Mention the new screenshots + so they are disted and uploaded. + * docs/tutorial/gtkmm-tut.xml: Fix a source code path. + +2005-12-21 Jonathon Jongsma + + * configure.in: added makefiles for new example directories + * docs/tutorial/Makefile.am: + * docs/tutorial/figures/drawingarea_lines.png: + * docs/tutorial/gtkmm-tut.xml: + * examples/book/Makefile.am: + * examples/book/drawingarea/main.cc: + * examples/book/drawingarea/myarea.cc: + * examples/book/drawingarea/myarea.h: complete rework of the drawing area + chapter of the gtkmm tutorial to use Cairomm for drawing instead of old + Gdk functions. Updated text and examples, and added several new examles. + +2005-12-21 Murray Cumming + + * gtk/src/texttagtable.ccg: Put a private class in a + anonymous namespace, theoretically to prevent it being + exported as ABI. + +2005-12-20 Murray Cumming + + * gtk/src/entry.hg: Added xalign and + truncate-multiline properties. + +2005-12-20 Murray Cumming + + * examples/book/drawingarea/myarea.cc: + * gdk/gdkmm/general.cc: + * gdk/gdkmm/general.h: + * gdk/src/drawable.hg: Use Cairo objects via + Cairo::RefPtr. + +2005-12-15 Murray Cumming + + * gtk/src/adjustment.ccg: + * gtk/src/adjustment.hg: Generate the constructor, + instead of hand coding it, because it now uses properties. + +2005-12-15 Murray Cumming + + * configure.in: + * examples/book/Makefile.am: + * examples/book/statusicon/.cvsignore: + * examples/book/statusicon/main.cc: + Add example. + * gtk/gtkmm.h: #include statusicon.h and + cellrendereraccel.h. + * gtk/src/statusicon.hg: Rename parameter name for + stock constructor, so it uses the correct property name. + +2005-12-15 Murray Cumming + + * gtk/src/object.hg: Add class documentation, based on + the C documentation. Add documentation for manage(). + +2005-12-14 Murray Cumming + + * gdk/src/types.hg: Hide traits from Doxygen. + +2005-12-14 Philip Langdale + + * gdk/src/window.hg: + * tools/m4/convert_gdk.m4: Correct the Cursor + conversion - it does not need to be copied/leaked. + Bug #323920. + +2005-12-12 Murray Cumming + + * configure.in: Depend on gtk+ 2.9. + * gtk/src/Makefile_list_of_hg.am_fragment: + * gtk/src/cellrendereraccel.ccg: + * gtk/src/cellrendereraccel.hg: New CellRenderer. + * gtk/gtkmm/cellrenderer_generation.cc: + * gtk/gtkmm/cellrenderer_generation.h: + Add a template specialization for AccelKey model + columns. + * gtk/src/filechooserbutton.hg: Add + set/get_focus_on_click() and property. + * gtk/src/menu.ccg: + * gtk/src/menu.hg: Add attach_to_widget() overload + without a destroy callback. + * gtk/src/range.hg: Added + get/set_lower_stepper_sensitivity(), + get/set_upper_stepper_sensitivity() and properties. + * gtk/src/selectiondata.hg: Added targets_include_uri(). + * gtk/src/statusicon.ccg: + * gtk/src/statusicon.hg: New class. + * gtk/src/style.hg: Added lookup_color(). + * gtk/src/textbuffer.hg: Added get_has_selection() and + property. Added text property. + * gtk/src/window.hg: Added get/set_deletable() and + property. + * tools/extra_defs_gen/generate_defs_gtk.cc: Add new types. + * tools/m4/convert_gtk.m4: Add new conversions. + * gtk/src/gtk_docs.xml: Update. + * gtk/src/gtk_enums.defs: Update + * gtk/src/gtk_methods.defs: Update + * gtk/src/gtk_signals.defs: Update + +2005-12-10 Murray Cumming + + * gtk/src/expander.hg: Add documentation, base on the + C documentation, mentioning property_expanded().signal_changed(). + +2005-12-10 Murray Cumming + + * gtk/src/object.ccg: Use g_object_sink_ref() and + friends instead of now-deprecated gtk_object_sink(). + Maybe it works. + +2005-12-06 Jonathon Jongsma + + * Makefile.am: + * configure.in: add configure option for enabling / disabling building of + documentation (--enable-docs / --disable-docs) + +2005-12-06 Jonathon Jongsma + + * configure.in: Look for gmmproc in generic libdir + directory, because that is not always lib/. This + fixes the build on some 64-bit systems. + +2005-12-06 Jonathon Jongsma + + * gdk/gdkmm-2.4.pc.in: Add cairomm to dependencies. + Bug #323347. + +2005-12-02 Murray Cumming + + * docs/reference/Doxyfile.in: Reword the title of the + since pages, to make it clear that they do not include + new API in subsequent versions. + +2005-12-01 Murray Cumming + + * gdk/gdkmm/general.h: Mark cairo API as new in 2.10. + +2005-12-01 Murray Cumming + + * gtk/src/treemodel.ccg: + * gtk/src/treemodel.hg: Added a method overload of + rows_reordered() without the iter, because the GTK+ docs + now say that it can be 0. Added documentation, based on the + C documentation. + +2005-12-01 Murray Cumming + + * configure.in: Depend on cairomm. + * gdk/gdkmm/general.cc: + * gdk/gdkmm/general.h: + * gdk/src/drawable.hg: Use C++ Cairo:: types instead of + C cairo_* types. + +2005-12-01 Murray Cumming + + * docs/reference/Doxyfile.in: Add a newline after the + newin xrefitem, to stop doxgygen associating the following + text with the xrefitem, so properties and returns do not + show up in the list of new API. + +2005-12-01 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Remove link to + non-existing drawing_area_text example. + Bug #311176 from Jonathon Jongsma. + +2005-11-30 Murray Cumming + + * docs/index.html: Change deprecated link to link to + deprecated and new pages page. + * gdk/src/gdk_docs_override.xml: + * gtk/src/gtk_docs_override.xml: Change Since: to + our @newin tags. + +2005-11-30 Murray Cumming + + * docs/reference/Doxyfile.in: Added ALIASES + for @newin2p2, @newin2p4, @newin2p6, @newin2p8, and + @newin2p10. API marked with these tags will then be + listed together on a page. Doxygen already has @since, + but that does not list them on one page. + * gdk/src/displaymanager.hg: + * gtk/gtkmm/accelmap.h: + * gtk/src/cellrenderer.hg: + * gtk/src/clipboard.hg: + * gtk/src/colorbutton.hg: + * gtk/src/entrycompletion.hg: + * gtk/src/expander.hg: + * gtk/src/filechooserwidget.hg: + * gtk/src/messagedialog.hg: + * gtk/src/radiotoolbutton.hg: + * gtk/src/rc.hg: + * gtk/src/uimanager.hg: + * pango/src/fontset.hg: Replace any Since: text with + the new tags. + +2005-11-30 Murray Cumming + + * configure.in: + * gtk/gtkmmconfig.h.in: Check for the mkifofs() + function (not available in windows, apparently), and + define HAVE_MKIFOFS. + * examples/book/input/main.cc: Do not use mkifofs + if it is not present, to fix build on Windows. + Bug #309031 from haleykd. + +2005-11-30 Murray Cumming + + * gtk/gtkmm/accelmap.cc: + * gtk/gtkmm/accelmap.h: Added lookup_entry(), wrapping + gtk_accel_map_lookup_entry, based on code provided by + Paul Davis in bug #318407. + +2005-11-30 Murray Cumming + + * gtk/src/style.ccg: Fix the cast, to fix the build + +2005-11-29 Murray Cumming + + * build_shared/Makefile_build.am_fragment: + * configure.in: Added --enable-deprecated-api option: + Set it to yes to remove deprecated API from the library, + for instance for embedded devices. + * gdk/src/color.ccg: + * gdk/src/color.hg: + * gdk/src/colormap.ccg: + * gdk/src/colormap.hg: + * gdk/src/image.hg: + * gdk/src/window.hg: + * gtk/src/calendar.hg: + * gtk/src/cellrenderer.hg: + * gtk/src/combo.hg: + * gtk/src/fileselection.hg: + * gtk/src/inputdialog.hg: + * gtk/src/messagedialog.hg: + * gtk/src/optionmenu.hg: + * gtk/src/progress.hg: + * gtk/src/textbuffer.ccg: + * gtk/src/textbuffer.hg: + * gtk/src/textview.ccg: + * gtk/src/textview.hg: + * gtk/src/toolbar.hg: + * gtk/src/treemodel.hg: + * gtk/src/treemodelfilter.hg: + * gtk/src/treepath.ccg: + * gtk/src/treepath.hg: + * gtk/src/treesortable.ccg: + * gtk/src/treesortable.hg: + * gtk/src/treeview.ccg: + * gtk/src/treeview.hg: + * gtk/src/treeviewcolumn.ccg: + * gtk/src/treeviewcolumn.hg: + * gtk/src/widget.hg: Use the new gmmproc features to + ifdef-out the deprecated API. + * tests/menu_destruction/main.cc: + * demos/gtk-demo/example_iconview.cc: + * demos/gtk-demo/example_menus.cc: + * demos/gtk-demo/example_sizegroup.cc: + * demos/gtk-demo/example_textview.cc: + * examples/Makefile.am_fragment: + * examples/book/custom/custom_container/mycontainer.cc: + * examples/book/dialogs/fileselection/examplewindow.cc: + * examples/book/range_widgets/labeledoptionmenu.cc: + * examples/book/range_widgets/labeledoptionmenu.h: + * examples/cellrenderercustom/popupentry.cc: + * examples/stock/stock.cc: Do not use deprecated API. + +2005-11-29 Murray Cumming + + * gtk/src/style.ccg: + * gtk/src/style.hg: Added an overload + of set_bg_pixmap() that takes a const + Pixmap, and deprecated the non-const one, + because the pixmap contents are not changed + by the method. Bug #313309 from Michael Hofmann. + +2005-11-29 Murray Cumming + + * docs/index.html: Added a link to the + generated list of deprecated API. + +2005-11-29 Murray Cumming + + * gdk/src/window.hg: Added set_urgency_hint(). + +2005-11-28 Murray Cumming + + * gtk/src/textbuffer.hg: Added const overloads of + get_text() and get_slice(), deprecating the non-const + versions. Bug #322338 from Ami Tavory. + +2005-11-22 Murray Cumming + + * configure.in: + * examples/book/Makefile.am: + * examples/book/update_ui/Makefile.am: + * examples/book/update_ui/examplewindow.cc: + * examples/book/update_ui/examplewindow.h: + * examples/book/update_ui/main.cc: Add an example + that uses events_pending() to update the UI, loosely + based on bug #317424 from Gareth Foster. + +2005-11-22 Murray Cumming + + * pango/src/attrlist.ccg: + * pango/src/attrlist.hg: Add operator(), because + some methods return null PangoAttrList*s. + +2005-11-21 Murray Cumming + + * gdk/gdkmm/general.cc: + * gdk/gdkmm/general.h: Added wrappers for gdk cairo functions, + though we need a real cairo Context class, from a real cairo C++ + API. + * gdk/src/drawable.hg: Add TODO about a gdk cairo function. + * gtk/src/treeview.hg: Do not use g_asssert in a header, to + avoid a warning about a useless command. + + +2005-11-16 Michael J M Thomson + + * gdk/src/gc.hg: GC::set_clip_rectangle(): Add a + method overload that takes a const argument, and + deprecate the non-const version. Bug #320631. + +2005-11-16 Murray Cumming + + * gtk/src/widget.hg: Made map() public, + because custom containers sometimes (e.g. GtkNotebook) + need to call it on their child widgets, though we are + not sure when. Bug #320631. + +This is the HEAD branch, for new API. + +2.8.1: + +2005-08-02 Marco Scholten + + * docs/tutorial/gtkmm-tut.xml: changed square to + Penrose triangle and added the missing screenshot + in the custom widget chapter. + Bug #311176. + +2005-10-19 Murray Cumming + + * gtk/src/uimanager.hg: Use OWNERSHIP_NONE + with get_action_groups(), because the GList + should not be freed. Bug #31865 from + Colin Law. + +2005-10-19 Murray Cumming + + * configure.in: Check for gtk+ 2.8. Bug #317913. + +2005-09-28 Murray Cumming + + * gtk/src/scrolledwindow.hg: get_*scrollbar_visible(): + get_hscrollbar_visible() returned vscrollbar_visible() + and vice-versa. Fixed. Bug #317309 by Bartek Kostrzewa. + +2.8.0: + +Updated NEWS and increased version. + +2.7.4: + +2005-08-17 Murray Cumming + + * gdk/src/dragcontext.hg: Corrected commented-out set_icon_name() + signature so we get it right when we can add it. + * gdk/src/gdk_extra.defs: Added gtk_drag_set_icon_name, copied from + gtk_methods.defs. + * gtk/src/gtk_signals.defs.patch: Added this patch to help us + modify the file after regenerating it in future. + * gtk/src/toolbutton.hg: Added commented-out set/get_icon_name() + for use during 2.9. + +2005-08-17 Murray Cumming + + * gdk/src/dragcontext.hg: Comment-out set_icon_name() with a + TODO comment because it is not getting the defs defintion for + some reason. + * gdk/src/gdk_signals.defs: Regenerated with generate_extra_defs. + * gtk/src/entrycompletion.hg: Properties: Correct key_length + to minimum_key_length, and popup_set_widgth to popup_set_width. + * gtk/src/gtk_enums.defs: Removed broken gtktreeprivate.h stuff. + * gtk/src/gtk_other.defs: Added new FileChooser signals and + properties. + * gtk/src/gtk_signals.defs: Regenerated with generate_extra_defs. + * tools/m4/convert_gtk.m4: Added GtkFileChooserConfirmation. + +2005-08-17 Murray Cumming + + * gdk/src/gdk_docs.xml: Regenerated with docextract_to_xml.py. + * gdk/src/gdk_enums.defs: Regenerated with enums.pl. + * gdk/src/gdk_methods.defs: Regenerated with h2defs.py + * gdk/src/gdk_pixbuf.defs: Regenerated with h2defs.py + * gtk/src/gtk_docs.xml: Regenerated with docextract_to_xml.py. + * gtk/src/gtk_enums.defs: Regenerated with enums.pl. + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py + +2005-08-01 Murray Cumming + + * gtk/src/treeview.ccg: unset_model(): Removed + extra ; that was breaking the build. + +2005-08-01 Murray Cumming + + * config.h.in: Added missing undefs, needed + by SUN and Tru64 compilers. Patch from + The Written Word. + +2005-08-01 Jonner + + * docs/tutorial/gtkmm-tut.xml: Fix the link to the + Gtk::Combo reference docs, though this should talk + about Gtk::ComboBox instead anyway. + +2005-08-01 Murray Cumming + + * gtk/src/settings.ccg: + * gtk/src/settings.hg: Autogenerate get_default(): + to stop it creating a second wrapper object. + Bug #311311. + +2005-07-31 Murray Cumming + + * gtk/src/treeview.ccg: + * gtk/src/treeview.hg: Added unset_model(). + +2.7.3: + +2005-07-16 Murray Cumming + + * gdk/src/pixbufloader.ccg: create_with_type(): + Really return the created GdkPixbufLoader. + +2005-07-16 Ishmal + + * gtk/src/treeviewcolumn.hg: TreeViewColumn: + Use GTKMM_API to add dllspec_export and dllspec_import + for MSVC++ 7.1 because it needs the extra help, even when using + --export-all and auto-import. See bug #309030. + +2005-07-16 Murray Cumming + + * atk/src/atk_docs.xml: + * gdk/src/gdk_docs.xml: + * gtk/src/gtk_docs.xml: + * gtk/src/gtk_enums.defs: + * gtk/src/gtk_methods.defs: + * pango/src/pango_docs.xml: Regenerated. + * gdk/src/display.hg: Added warp_pointer(). + +2005-07-15 Murray Cumming + + * atk/src/atk_enums.defs: + * gdk/src/gdk_enums.defs: + * pango/src/pango_enums.defs: + * gtk/src/gtk_enums.defs: Regenerated with + glibmm/tools/enums.pl + * gtk/src/filechooser.hg: Added + get/set_do_overwrite_confirmation() and property and signal. + * gtk/src/treerowreference.hg: Added get_model(). + * gtk/src/treeview.ccg: + * gtk/src/treeview.hg: Added const versions of get_path_at_pos(), + get_cell_area(), get_background_area(), get_visible_rect(), + widget_to_tree_coords(), tree_to_widget_coords(). + Added get_visible_range(). + * gtk/src/treeviewcolumn.hg: Added queue_resize() + +2.7.2: + +2005-07-12 Murray Cumming + + * docs/index.html: Remove links to useless bonobo stuff. Correct the name + of the canvas link, instead of having duplicate libglademm links. + * gdk/src/pixbuf.ccg: + * gdk/src/pixbuf.hg: Add a save_to_buffer() overload without the options + parameters. Added reference documentation. + * gtk/src/entrycompletion.hg: Remove extra ;. + +2.7.1: + +2005-07-11 Murray Cumming + + * gtk/src/textiter.hg: Added move_forward/backward_visible_line(s). + +2005-07-10 Murray Cumming + + * gdk/src/dragcontext.hg: Added set_icon(const Glib::ustring& name) + * gtk/src/aboutdialog.hg: Added set/get_wrap_license() and property. + * gtk/src/dialog.hg: Added get_response_for_widget(). + * gtk/src/widget.hg: Added drag_source_set_icon(const Glib::ustring& icon_name). + * gtk/src/entrycompletion.hg: Added properties, get/set_popup_set_width(), + get/set_popup_single_width(). + * gtk/src/iconview.hg: Added get_item_at_pos(), get_visible_range(), get/set_cursor(), + scroll_to_path(). + +2005-07-10 Murray Cumming + + * gdk/src/gdk_methods.defs: Regenerated with h2defs.py + * gdk/src/cursor.ccg: + * gdk/src/cursor.hg: Added get_image() and + a Cursor(name) constructor. + * gdk/src/window.hg: Added move_region() + * gtk/gtkmm/stock.cc: + * gtk/gtkmm/stock.h: Added FULLSCREEN, LEAVE_FULLSCREEN, and + INFO stock items. + * gtk/src/gtk_methods.defs: Regenerated with h2defs.py + * gtk/src/image.ccg: + * gtk/src/image.hg: Reimplemented clear() with the new + gtk_image_clear() function. + * gtk/src/sizegroup.hg: Added ignore_hidden property. + * gtk/src/window.hg: Added urgency_hint property, and + get/set_urgency_hint(). Added present(timestamp) overload. + +2005-07-06 Claudio Saavedra + + * docs/tutorial/gtkmm-tut.xml: Fixed typo in title of chapter about + constructors. + +2005-07-04 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Signals appendix: + Correct ptr_fun/mem_fun typo. + +2005-06-09 Daniel Glöckner + + * tools/m4/convert_gdk.m4: Use OWNERSHIP_NONE with + Glib::ListHandle< Glib::RefPtr instead of + OWNERSHIP_DEEP, to avoid memory problems with + Gdk::Display::list_devices(). + +2005-05-26 Murray Cumming + + * docs/Makefile_web.am_fragment: Use different + rsync args to fix recent problem with sourceforge. + * docs/tutorial/gtkmm-tut.xml: Fix URL prefix for + glibmm reference links. + * gtk/src/comboboxentry.hg: get_entry() docs: + Mention Bin::get_child() instead of get_entry(). + +2005-04-21 Alexander Nedotsukov + + * gdk/gdkmm/Makefile.am: + * gtk/gtkmm/Makefile.am: + Add inter-library dependencies, which might be + needed with some versions of pkg-config. + +2005-05-06 Murray Cumming + + * docs/tutorial/gtkmm-tut.xml: Signals apendix, + X Event signals section: Added explanation of + connect(slot, false); + +2005-05-03 Murray Cumming + + * gtk/gtkmm/comboboxentrytext.cc: + * gtk/gtkmm/comboboxentrytext.h: + * gtk/gtkmm/comboboxtext.cc: + * gtk/gtkmm/comboboxtext.h: + Deprecated clear() in favour of new + clear_items() method, because clear() exists + in the base CellLayout class and is very different. + Added remove_text() to remove items one at a time. + Added doxygen documentation comments. + +2005-05-03 Murray Cumming + + * gtk/src/cellrenderer.hg: Added the + sensitive property, which was maybe new in + GTK+ 2.6. + +2005-05-01 Murray Cumming + + * gdk/src/colormap.ccg: + * gdk/src/colormap.hg: Deprecated alloc_colors() and + free_colors(). Add free_color() for use with + alloc_color(). Bug #157744 + +2005-04-27 Philip Langdale + + * gtk/src/action.hg: + Override default wrap behaviour for get_proxies to + use the correct ownership semantics. (bug #172892) + +2005-04-24 Murray Cumming + + * gtk/src/button.hg: + * gtk/src/gtk_docs_override.xml: + * gtk/src/image.hg: + * gtk/src/toolbutton.hg: + Documentation: Change mentions of new_from_stock() + to mention the C++ constructors, and document those + constructors. + +2005-04-22 Murray Cumming + + * gtk/src/cellrenderer.hg: Add documentation + saying that signal_editing_started() does not + work, so use the C API. + * gtk/src/combobox.hg: Added TODO comment + for a future ABI break. + +2005-04-19 Murray Cumming + + * configure.in: + * examples/book/Makefile.am: + * examples/book/comboboxentry/.cvsignore: + * examples/book/comboboxentry/Makefile.am: + * examples/book/comboboxentry/complex/.cvsignore: + * examples/book/comboboxentry/complex/Makefile.am: + * examples/book/comboboxentry/complex/examplewindow.cc: + * examples/book/comboboxentry/complex/examplewindow.h: + * examples/book/comboboxentry/complex/main.cc: + * examples/book/comboboxentry/text/.cvsignore: + * examples/book/comboboxentry/text/Makefile.am: + * examples/book/comboboxentry/text/examplewindow.cc: + * examples/book/comboboxentry/text/examplewindow.h: + * examples/book/comboboxentry/text/main.cc: + Added ComboBoxEntry and ComboBoxEntryText examples, + based on the existing ComboBox and ComboBoxText + examples. + +2005-04-15 Murray Cumming + + * examples/book/menus_and_toolbars/Makefile.am: + * examples/book/menus_and_toolbars/rain.png: + Add missing rain.png file and distribute it. + * examples/book/menus_and_toolbars/examplewindow.cc: + Catch the exception if the pixbuf file is not found. + +2005-04-07 Murray Cumming + + * gdk/src/display.hg: + * gdk/src/displaymanager.hg: + * gdk/src/pixbufloader.hg: + * gdk/src/screen.hg: + * gtk/src/accelgroup.hg: + * gtk/src/action.hg: + * gtk/src/actiongroup.hg: + * gtk/src/cellrenderer.hg: + * gtk/src/cellrenderertoggle.hg: + * gtk/src/colorbutton.hg: + * gtk/src/combobox.hg: + * gtk/src/entrycompletion.hg: + * gtk/src/filechooser.hg: + * gtk/src/fontbutton.hg: + * gtk/src/radioaction.hg: + * gtk/src/radiomenuitem.hg: + * gtk/src/range.hg: + * gtk/src/textbuffer.hg: + * gtk/src/togglebutton.hg: + * gtk/src/toolbar.hg: + * gtk/src/toolbutton.hg: + * gtk/src/toolitem.hg: + * gtk/src/treeiter.hg: + * gtk/src/uimanager.hg: + * gtk/src/widget.hg: + Added doxygen documentation for signals, based on + the C documentation (in the .c files) where that + documentation exists. + +2005-04-07 Murray Cumming + + * gtk/src/treeview.ccg: + * gtk/src/treeview.hg: Rename + TreeView::_auto_store_on_cellrenderer_toggle_edited() to + TreeView::_auto_store_on_cellrenderer_toggle_edited_with_model() + and add back the old _auto_store_on_cellrenderer_toggle_edited(), + so that it still exists for apps built with the old templates. + This is the only non-template code that was changed in the + previous commit. + +2005-04-06 Murray Cumming + + * gtk/src/treeview.[hg|ccg]: append_*_(): Pass the model to the + private helper template functions, instead of the treeview, to + prevent the warning when closing the window while editing a cell. + Bug #170855. + +This is the HEAD branch. The stable branch is gtkmm-2-6. + +2005-03-19 Murray Cumming + + * demos/gtk-demo/example_treeview_editable_cells.cc: + * gtk/src/treeview.ccg: + * gtk/src/treeview.hg: + Test the result of _get_model_base() for a null refptr, + to help avoid a crash when closing a window while the + cell renderer is in edit mode. Bug #170855. + +2005-03-17 Claudio Saavedra + + * docs/tutorial/gtkmm-tut.xml: Fixes typo in #170730. Pointed out + by Jacek Wotka. + 2.6.1: 2005-03-12 Claudio Saavedra diff --git a/libs/gtkmm2/atk/atkmm/action.cc b/libs/gtkmm2/atk/atkmm/action.cc index 69a260463c..9af6fe0e85 100644 --- a/libs/gtkmm2/atk/atkmm/action.cc +++ b/libs/gtkmm2/atk/atkmm/action.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -72,14 +73,20 @@ void Action_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED gboolean Action_Class::do_action_vfunc_callback(AtkAction* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -92,16 +99,20 @@ gboolean Action_Class::do_action_vfunc_callback(AtkAction* self, gint i) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->do_action_vfunc(i )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -118,7 +129,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gint Action_Class::get_n_actions_vfunc_callback(AtkAction* self) { CppObjectType *const obj = dynamic_cast( @@ -131,15 +141,19 @@ gint Action_Class::get_n_actions_vfunc_callback(AtkAction* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_actions_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -156,7 +170,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - const gchar* Action_Class::get_description_vfunc_callback(AtkAction* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -169,16 +182,20 @@ const gchar* Action_Class::get_description_vfunc_callback(AtkAction* self, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_description_vfunc(i ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -195,7 +212,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef const gchar* RType; return RType(); } - const gchar* Action_Class::get_name_vfunc_callback(AtkAction* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -208,16 +224,20 @@ const gchar* Action_Class::get_name_vfunc_callback(AtkAction* self, gint i) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_name_vfunc(i ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -234,7 +254,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef const gchar* RType; return RType(); } - const gchar* Action_Class::get_keybinding_vfunc_callback(AtkAction* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -247,16 +266,20 @@ const gchar* Action_Class::get_keybinding_vfunc_callback(AtkAction* self, gint i // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_keybinding_vfunc(i ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -273,7 +296,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -286,17 +308,21 @@ gboolean Action_Class::set_description_vfunc_callback(AtkAction* self, gint i, c // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_description_vfunc(i , Glib::convert_const_gchar_ptr_to_ustring(desc) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -313,6 +339,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Action_Class::wrap_new(GObject* object) @@ -391,6 +421,10 @@ Glib::ustring Action::get_localized_name(int i) } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED bool Atk::Action::do_action_vfunc(int i) { BaseClassType *const base = static_cast( @@ -404,7 +438,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - int Atk::Action::get_n_actions_vfunc() const { BaseClassType *const base = static_cast( @@ -418,7 +451,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - const char* Atk::Action::get_description_vfunc(int i) const { BaseClassType *const base = static_cast( @@ -432,7 +464,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const char* RType; return RType(); } - const char* Atk::Action::get_name_vfunc(int i) const { BaseClassType *const base = static_cast( @@ -446,7 +477,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const char* RType; return RType(); } - const char* Atk::Action::get_keybinding_vfunc(int i) const { BaseClassType *const base = static_cast( @@ -460,7 +490,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const char* RType; return RType(); } - bool Atk::Action::set_description_vfunc(int i, const Glib::ustring& desc) { BaseClassType *const base = static_cast( @@ -474,6 +503,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/action.h b/libs/gtkmm2/atk/atkmm/action.h index af8a131378..c31a2c9e31 100644 --- a/libs/gtkmm2/atk/atkmm/action.h +++ b/libs/gtkmm2/atk/atkmm/action.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_ACTION_H #define _ATKMM_ACTION_H + #include /* $Id$ */ @@ -154,23 +155,46 @@ public: 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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool do_action_vfunc(int i); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_actions_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const char* get_description_vfunc(int i) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const char* get_name_vfunc(int i) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const char* get_keybinding_vfunc(int i) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_description_vfunc(int i, const Glib::ustring& desc); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -189,5 +213,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_ACTION_H */ diff --git a/libs/gtkmm2/atk/atkmm/component.cc b/libs/gtkmm2/atk/atkmm/component.cc index c4256e7699..8d51116bc1 100644 --- a/libs/gtkmm2/atk/atkmm/component.cc +++ b/libs/gtkmm2/atk/atkmm/component.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -86,6 +87,7 @@ void Component_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; @@ -99,8 +101,13 @@ void Component_Class::iface_init_function(void* g_iface, void*) klass->set_extents = &set_extents_vfunc_callback; klass->set_position = &set_position_vfunc_callback; klass->set_size = &set_size_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED guint Component_Class::add_focus_handler_vfunc_callback(AtkComponent* self, AtkFocusHandler handler) { CppObjectType *const obj = dynamic_cast( @@ -113,15 +120,19 @@ guint Component_Class::add_focus_handler_vfunc_callback(AtkComponent* self, AtkF // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->add_focus_handler_vfunc(handler); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -138,7 +149,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -151,18 +161,22 @@ gboolean Component_Class::contains_vfunc_callback(AtkComponent* self, gint x, gi // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->contains_vfunc(x , y , ((CoordType)(coord_type)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -179,7 +193,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -192,18 +205,22 @@ AtkObject* Component_Class::ref_accessible_at_point_vfunc_callback(AtkComponent* // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -220,7 +237,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -233,8 +249,10 @@ void Component_Class::get_extents_vfunc_callback(AtkComponent* self, gint* x, gi // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_extents_vfunc(*(x) , *(y) @@ -242,11 +260,13 @@ void Component_Class::get_extents_vfunc_callback(AtkComponent* self, gint* x, gi , *(height) , ((CoordType)(coord_type)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -260,7 +280,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -273,18 +292,22 @@ void Component_Class::get_position_vfunc_callback(AtkComponent* self, gint* x, g // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_position_vfunc(*(x) , *(y) , ((CoordType)(coord_type)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -298,7 +321,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -311,17 +333,21 @@ void Component_Class::get_size_vfunc_callback(AtkComponent* self, gint* width, g // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_size_vfunc(*(width) , *(height) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -335,7 +361,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->get_size)(self, width, height); } } - AtkLayer Component_Class::get_layer_vfunc_callback(AtkComponent* self) { CppObjectType *const obj = dynamic_cast( @@ -348,15 +373,19 @@ AtkLayer Component_Class::get_layer_vfunc_callback(AtkComponent* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return ((AtkLayer)(obj->get_layer_vfunc())); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -373,7 +402,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkLayer RType; return RType(); } - gint Component_Class::get_mdi_zorder_vfunc_callback(AtkComponent* self) { CppObjectType *const obj = dynamic_cast( @@ -386,15 +414,19 @@ gint Component_Class::get_mdi_zorder_vfunc_callback(AtkComponent* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_mdi_zorder_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -411,7 +443,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gboolean Component_Class::grab_focus_vfunc_callback(AtkComponent* self) { CppObjectType *const obj = dynamic_cast( @@ -424,15 +455,19 @@ gboolean Component_Class::grab_focus_vfunc_callback(AtkComponent* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->grab_focus_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -449,7 +484,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - void Component_Class::remove_focus_handler_vfunc_callback(AtkComponent* self, guint handler_id) { CppObjectType *const obj = dynamic_cast( @@ -462,15 +496,19 @@ void Component_Class::remove_focus_handler_vfunc_callback(AtkComponent* self, gu // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->remove_focus_handler_vfunc(handler_id); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -484,7 +522,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -497,8 +534,10 @@ gboolean Component_Class::set_extents_vfunc_callback(AtkComponent* self, gint x, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_extents_vfunc(x , y @@ -506,11 +545,13 @@ gboolean Component_Class::set_extents_vfunc_callback(AtkComponent* self, gint x, , height , ((CoordType)(coord_type)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -527,7 +568,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -540,18 +580,22 @@ gboolean Component_Class::set_position_vfunc_callback(AtkComponent* self, gint x // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_position_vfunc(x , y , ((CoordType)(coord_type)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -568,7 +612,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Component_Class::set_size_vfunc_callback(AtkComponent* self, gint width, gint height) { CppObjectType *const obj = dynamic_cast( @@ -581,17 +624,21 @@ gboolean Component_Class::set_size_vfunc_callback(AtkComponent* self, gint width // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_size_vfunc(width , height )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -608,6 +655,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Component_Class::wrap_new(GObject* object) @@ -667,17 +718,17 @@ Glib::RefPtr Component::get_accessible_at_point(int x, int y, Coord void Component::get_extents(int& x, int& y, int& width, int& height, CoordType coord_type) const { - atk_component_get_extents(const_cast(gobj()), &x, &y, &width, &height, ((AtkCoordType)(coord_type))); +atk_component_get_extents(const_cast(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(gobj()), &x, &y, ((AtkCoordType)(coord_type))); +atk_component_get_position(const_cast(gobj()), &x, &y, ((AtkCoordType)(coord_type))); } void Component::get_size(int& width, int& height) const { - atk_component_get_size(const_cast(gobj()), &width, &height); +atk_component_get_size(const_cast(gobj()), &width, &height); } Layer Component::get_layer() const @@ -697,7 +748,7 @@ bool Component::grab_focus() void Component::remove_focus_handler(guint handler_id) { - atk_component_remove_focus_handler(gobj(), 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) @@ -716,6 +767,10 @@ bool Component::set_size(int width, int height) } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED guint Atk::Component::add_focus_handler_vfunc(AtkFocusHandler handler) { BaseClassType *const base = static_cast( @@ -729,7 +784,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef guint RType; return RType(); } - bool Atk::Component::contains_vfunc(int x, int y, CoordType coord_type) const { BaseClassType *const base = static_cast( @@ -743,7 +797,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - Glib::RefPtr Atk::Component::get_accessible_at_point_vfunc(int x, int y, CoordType coord_type) { BaseClassType *const base = static_cast( @@ -757,7 +810,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::RefPtr 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( @@ -768,7 +820,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_extents) (*base->get_extents)(const_cast(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( @@ -779,7 +830,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_position) (*base->get_position)(const_cast(gobj()),&x,&y,((AtkCoordType)(coord_type))); } - void Atk::Component::get_size_vfunc(int& width, int& height) const { BaseClassType *const base = static_cast( @@ -790,7 +840,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_size) (*base->get_size)(const_cast(gobj()),&width,&height); } - Layer Atk::Component::get_layer_vfunc() const { BaseClassType *const base = static_cast( @@ -804,7 +853,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Layer RType; return RType(); } - int Atk::Component::get_mdi_zorder_vfunc() const { BaseClassType *const base = static_cast( @@ -818,7 +866,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - bool Atk::Component::grab_focus_vfunc() { BaseClassType *const base = static_cast( @@ -832,7 +879,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - void Atk::Component::remove_focus_handler_vfunc(guint handler_id) { BaseClassType *const base = static_cast( @@ -843,7 +889,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -857,7 +902,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Component::set_position_vfunc(int x, int y, CoordType coord_type) { BaseClassType *const base = static_cast( @@ -871,7 +915,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Component::set_size_vfunc(int width, int height) { BaseClassType *const base = static_cast( @@ -885,6 +928,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/component.h b/libs/gtkmm2/atk/atkmm/component.h index 889d626dae..ccde1fb22d 100644 --- a/libs/gtkmm2/atk/atkmm/component.h +++ b/libs/gtkmm2/atk/atkmm/component.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_COMPONENT_H #define _ATKMM_COMPONENT_H + #include /* $Id$ */ @@ -283,32 +284,76 @@ public: 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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual guint add_focus_handler_vfunc(AtkFocusHandler handler); +#endif //GLIBMM_VFUNCS_ENABLED - virtual Glib::RefPtr get_accessible_at_point_vfunc(int x, int y, CoordType coord_type); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool contains_vfunc(int x, int y, CoordType coord_type) const; +#endif //GLIBMM_VFUNCS_ENABLED - 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); + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_accessible_at_point_vfunc(int x, int y, CoordType coord_type); +#endif //GLIBMM_VFUNCS_ENABLED + + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_extents_vfunc(int& x, int& y, int& width, int& height, CoordType coord_type) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_position_vfunc(int& x, int& y, CoordType coord_type) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_size_vfunc(int& width, int& height) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Layer get_layer_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_mdi_zorder_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool grab_focus_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void remove_focus_handler_vfunc(guint handler_id); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_extents_vfunc(int x, int y, int width, int height, CoordType coord_type); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_position_vfunc(int x, int y, CoordType coord_type); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_size_vfunc(int width, int height); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -327,5 +372,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_COMPONENT_H */ diff --git a/libs/gtkmm2/atk/atkmm/document.cc b/libs/gtkmm2/atk/atkmm/document.cc index 64946c6f84..f27b4ff522 100644 --- a/libs/gtkmm2/atk/atkmm/document.cc +++ b/libs/gtkmm2/atk/atkmm/document.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -80,10 +81,16 @@ void Document_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED klass->get_document_type = &get_document_type_vfunc_callback; klass->get_document = &get_document_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED const gchar* Document_Class::get_document_type_vfunc_callback(AtkDocument* self) { CppObjectType *const obj = dynamic_cast( @@ -96,15 +103,19 @@ const gchar* Document_Class::get_document_type_vfunc_callback(AtkDocument* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_document_type_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -121,7 +132,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef const gchar* RType; return RType(); } - gpointer Document_Class::get_document_vfunc_callback(AtkDocument* self) { CppObjectType *const obj = dynamic_cast( @@ -134,15 +144,19 @@ gpointer Document_Class::get_document_vfunc_callback(AtkDocument* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_document_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -159,6 +173,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gpointer RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Document_Class::wrap_new(GObject* object) @@ -212,6 +230,10 @@ gpointer Document::get_document() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED const gchar* Atk::Document::get_document_type_vfunc() { BaseClassType *const base = static_cast( @@ -225,7 +247,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const gchar* RType; return RType(); } - gpointer Atk::Document::get_document_vfunc() const { BaseClassType *const base = static_cast( @@ -239,6 +260,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef gpointer RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/document.h b/libs/gtkmm2/atk/atkmm/document.h index 71808475c3..76c84a4007 100644 --- a/libs/gtkmm2/atk/atkmm/document.h +++ b/libs/gtkmm2/atk/atkmm/document.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_DOCUMENT_H #define _ATKMM_DOCUMENT_H + #include /* $Id$ */ @@ -110,19 +111,30 @@ public: gpointer get_document(); protected: - virtual const gchar* get_document_type_vfunc(); - virtual gpointer get_document_vfunc() const; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const gchar* get_document_type_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual gpointer get_document_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -141,5 +153,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_DOCUMENT_H */ diff --git a/libs/gtkmm2/atk/atkmm/editabletext.cc b/libs/gtkmm2/atk/atkmm/editabletext.cc index 10e58003b7..eb776c954c 100644 --- a/libs/gtkmm2/atk/atkmm/editabletext.cc +++ b/libs/gtkmm2/atk/atkmm/editabletext.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -73,6 +74,7 @@ void EditableText_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; @@ -80,8 +82,13 @@ void EditableText_Class::iface_init_function(void* g_iface, void*) klass->cut_text = &cut_text_vfunc_callback; klass->delete_text = &delete_text_vfunc_callback; klass->paste_text = &paste_text_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED gboolean EditableText_Class::set_run_attributes_vfunc_callback(AtkEditableText* self, AtkAttributeSet* attrib_set, gint start_offset, gint end_offset) { CppObjectType *const obj = dynamic_cast( @@ -94,17 +101,21 @@ gboolean EditableText_Class::set_run_attributes_vfunc_callback(AtkEditableText* // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_run_attributes_vfunc(attrib_set, start_offset , end_offset )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -121,7 +132,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - void EditableText_Class::set_text_contents_vfunc_callback(AtkEditableText* self, const gchar* string) { CppObjectType *const obj = dynamic_cast( @@ -134,16 +144,20 @@ void EditableText_Class::set_text_contents_vfunc_callback(AtkEditableText* self, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_text_contents_vfunc(Glib::convert_const_gchar_ptr_to_ustring(string) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -157,7 +171,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -170,18 +183,22 @@ void EditableText_Class::insert_text_vfunc_callback(AtkEditableText* self, const // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->insert_text_vfunc(Glib::convert_const_gchar_ptr_to_ustring(string) , length , *(position) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -195,7 +212,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -208,17 +224,21 @@ void EditableText_Class::copy_text_vfunc_callback(AtkEditableText* self, gint st // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->copy_text_vfunc(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -232,7 +252,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -245,17 +264,21 @@ void EditableText_Class::cut_text_vfunc_callback(AtkEditableText* self, gint sta // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->cut_text_vfunc(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -269,7 +292,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -282,17 +304,21 @@ void EditableText_Class::delete_text_vfunc_callback(AtkEditableText* self, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->delete_text_vfunc(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -306,7 +332,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->delete_text)(self, start_pos, end_pos); } } - void EditableText_Class::paste_text_vfunc_callback(AtkEditableText* self, gint position) { CppObjectType *const obj = dynamic_cast( @@ -319,16 +344,20 @@ void EditableText_Class::paste_text_vfunc_callback(AtkEditableText* self, gint p // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->paste_text_vfunc(position ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -342,6 +371,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->paste_text)(self, position); } } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* EditableText_Class::wrap_new(GObject* object) @@ -391,35 +424,39 @@ bool EditableText::set_run_attributes(const AttributeSet& attrib_set, int start_ void EditableText::set_text_contents(const Glib::ustring& string) { - atk_editable_text_set_text_contents(gobj(), string.c_str()); +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); +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); +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); +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); +atk_editable_text_delete_text(gobj(), start_pos, end_pos); } void EditableText::paste_text(int position) { - atk_editable_text_paste_text(gobj(), position); +atk_editable_text_paste_text(gobj(), position); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED bool Atk::EditableText::set_run_attributes_vfunc(AtkAttributeSet* attrib_set, int start_offset, int end_offset) { BaseClassType *const base = static_cast( @@ -433,7 +470,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - void Atk::EditableText::set_text_contents_vfunc(const Glib::ustring& string) { BaseClassType *const base = static_cast( @@ -444,7 +480,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -455,7 +490,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -466,7 +500,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -477,7 +510,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -488,7 +520,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -499,6 +530,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->paste_text) (*base->paste_text)(gobj(),position); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/editabletext.h b/libs/gtkmm2/atk/atkmm/editabletext.h index 233aa9e892..982673231c 100644 --- a/libs/gtkmm2/atk/atkmm/editabletext.h +++ b/libs/gtkmm2/atk/atkmm/editabletext.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_EDITABLETEXT_H #define _ATKMM_EDITABLETEXT_H + #include /* $Id$ */ @@ -153,24 +154,50 @@ public: 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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_run_attributes_vfunc(AtkAttributeSet* attrib_set, int start_offset, int end_offset); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_text_contents_vfunc(const Glib::ustring& string); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void insert_text_vfunc(const Glib::ustring& string, int length, int& position); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void copy_text_vfunc(int start_pos, int end_pos); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void cut_text_vfunc(int start_pos, int end_pos); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void delete_text_vfunc(int start_pos, int end_pos); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void paste_text_vfunc(int position); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -189,5 +216,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_EDITABLETEXT_H */ diff --git a/libs/gtkmm2/atk/atkmm/hyperlink.cc b/libs/gtkmm2/atk/atkmm/hyperlink.cc index d9e1050a7b..3bbf41c426 100644 --- a/libs/gtkmm2/atk/atkmm/hyperlink.cc +++ b/libs/gtkmm2/atk/atkmm/hyperlink.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -37,13 +38,15 @@ namespace Atk namespace { -const Glib::SignalProxyInfo Hyperlink_signal_link_activated_info = + +static const Glib::SignalProxyInfo Hyperlink_signal_link_activated_info = { "link_activated", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -91,6 +94,7 @@ void Hyperlink_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED klass->get_uri = &get_uri_vfunc_callback; klass->get_object = &get_object_vfunc_callback; klass->get_end_index = &get_end_index_vfunc_callback; @@ -99,9 +103,14 @@ void Hyperlink_Class::class_init_function(void* g_class, void* class_data) 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->link_activated = &link_activated_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED gchar* Hyperlink_Class::get_uri_vfunc_callback(AtkHyperlink* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -114,16 +123,20 @@ gchar* Hyperlink_Class::get_uri_vfunc_callback(AtkHyperlink* self, gint i) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_uri_vfunc(i ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -139,7 +152,6 @@ gchar* Hyperlink_Class::get_uri_vfunc_callback(AtkHyperlink* self, gint i) typedef gchar* RType; return RType(); } - AtkObject* Hyperlink_Class::get_object_vfunc_callback(AtkHyperlink* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -152,16 +164,20 @@ AtkObject* Hyperlink_Class::get_object_vfunc_callback(AtkHyperlink* self, gint i // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->get_object_vfunc(i )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -177,7 +193,6 @@ AtkObject* Hyperlink_Class::get_object_vfunc_callback(AtkHyperlink* self, gint i typedef AtkObject* RType; return RType(); } - gint Hyperlink_Class::get_end_index_vfunc_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -190,15 +205,19 @@ gint Hyperlink_Class::get_end_index_vfunc_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_end_index_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -214,7 +233,6 @@ gint Hyperlink_Class::get_end_index_vfunc_callback(AtkHyperlink* self) typedef gint RType; return RType(); } - gint Hyperlink_Class::get_start_index_vfunc_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -227,15 +245,19 @@ gint Hyperlink_Class::get_start_index_vfunc_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_start_index_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -251,7 +273,6 @@ gint Hyperlink_Class::get_start_index_vfunc_callback(AtkHyperlink* self) typedef gint RType; return RType(); } - gboolean Hyperlink_Class::is_valid_vfunc_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -264,15 +285,19 @@ gboolean Hyperlink_Class::is_valid_vfunc_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->is_valid_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -288,7 +313,6 @@ gboolean Hyperlink_Class::is_valid_vfunc_callback(AtkHyperlink* self) typedef gboolean RType; return RType(); } - gint Hyperlink_Class::get_n_anchors_vfunc_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -301,15 +325,19 @@ gint Hyperlink_Class::get_n_anchors_vfunc_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_anchors_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -325,7 +353,6 @@ gint Hyperlink_Class::get_n_anchors_vfunc_callback(AtkHyperlink* self) typedef gint RType; return RType(); } - guint Hyperlink_Class::link_state_vfunc_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -338,15 +365,19 @@ guint Hyperlink_Class::link_state_vfunc_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->link_state_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -362,7 +393,6 @@ guint Hyperlink_Class::link_state_vfunc_callback(AtkHyperlink* self) typedef guint RType; return RType(); } - gboolean Hyperlink_Class::is_selected_link_vfunc_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -375,15 +405,19 @@ gboolean Hyperlink_Class::is_selected_link_vfunc_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->is_selected_link_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -399,8 +433,9 @@ gboolean Hyperlink_Class::is_selected_link_vfunc_callback(AtkHyperlink* self) typedef gboolean RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Hyperlink_Class::link_activated_callback(AtkHyperlink* self) { CppObjectType *const obj = dynamic_cast( @@ -413,15 +448,19 @@ void Hyperlink_Class::link_activated_callback(AtkHyperlink* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_link_activated(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -434,6 +473,7 @@ void Hyperlink_Class::link_activated_callback(AtkHyperlink* self) (*base->link_activated)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Hyperlink_Class::wrap_new(GObject* object) @@ -486,20 +526,15 @@ Glib::RefPtr Hyperlink::get_object(int i) { Glib::RefPtr 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 Hyperlink::get_object(int i) const { - - Glib::RefPtr retvalue = Glib::wrap(atk_hyperlink_get_object(const_cast(gobj()), i)); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_object(i); } int Hyperlink::get_end_index() const @@ -539,27 +574,36 @@ Glib::SignalProxy0< void > Hyperlink::signal_link_activated() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Hyperlink::property_selected_link() const { return Glib::PropertyProxy_ReadOnly(this, "selected-link"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Hyperlink::property_number_of_anchors() const { return Glib::PropertyProxy_ReadOnly(this, "number-of-anchors"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Hyperlink::property_end_index() const { return Glib::PropertyProxy_ReadOnly(this, "end-index"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Hyperlink::property_start_index() const { return Glib::PropertyProxy_ReadOnly(this, "start-index"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Atk::Hyperlink::on_link_activated() { BaseClassType *const base = static_cast( @@ -569,8 +613,9 @@ void Atk::Hyperlink::on_link_activated() if(base && base->link_activated) (*base->link_activated)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED gchar* Atk::Hyperlink::get_uri_vfunc(int i) const { BaseClassType *const base = static_cast( @@ -583,7 +628,6 @@ gchar* Atk::Hyperlink::get_uri_vfunc(int i) const typedef gchar* RType; return RType(); } - Glib::RefPtr Atk::Hyperlink::get_object_vfunc(int i) { BaseClassType *const base = static_cast( @@ -596,7 +640,6 @@ Glib::RefPtr Atk::Hyperlink::get_object_vfunc(int i) typedef Glib::RefPtr RType; return RType(); } - int Atk::Hyperlink::get_end_index_vfunc() const { BaseClassType *const base = static_cast( @@ -609,7 +652,6 @@ int Atk::Hyperlink::get_end_index_vfunc() const typedef int RType; return RType(); } - int Atk::Hyperlink::get_start_index_vfunc() const { BaseClassType *const base = static_cast( @@ -622,7 +664,6 @@ int Atk::Hyperlink::get_start_index_vfunc() const typedef int RType; return RType(); } - bool Atk::Hyperlink::is_valid_vfunc() const { BaseClassType *const base = static_cast( @@ -635,7 +676,6 @@ bool Atk::Hyperlink::is_valid_vfunc() const typedef bool RType; return RType(); } - int Atk::Hyperlink::get_n_anchors_vfunc() const { BaseClassType *const base = static_cast( @@ -648,7 +688,6 @@ int Atk::Hyperlink::get_n_anchors_vfunc() const typedef int RType; return RType(); } - guint Atk::Hyperlink::link_state_vfunc() const { BaseClassType *const base = static_cast( @@ -661,7 +700,6 @@ guint Atk::Hyperlink::link_state_vfunc() const typedef guint RType; return RType(); } - bool Atk::Hyperlink::is_selected_link_vfunc() const { BaseClassType *const base = static_cast( @@ -674,6 +712,7 @@ bool Atk::Hyperlink::is_selected_link_vfunc() const typedef bool RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/hyperlink.h b/libs/gtkmm2/atk/atkmm/hyperlink.h index 293137afb0..5a529ec46b 100644 --- a/libs/gtkmm2/atk/atkmm/hyperlink.h +++ b/libs/gtkmm2/atk/atkmm/hyperlink.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_HYPERLINK_H #define _ATKMM_HYPERLINK_H + #include /* $Id$ */ @@ -170,66 +171,108 @@ public: bool is_selected_link() const; +/** + * @par Prototype: + * void %link_activated() + */ + Glib::SignalProxy0< void > signal_link_activated(); - /** Specifies whether the AtkHyperlink object is selected. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_selected_link() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The number of anchors associated with the AtkHyperlink object. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_number_of_anchors() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The end index of the AtkHyperlink object. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_end_index() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The start index of the AtkHyperlink object. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_start_index() const; +#endif //#GLIBMM_PROPERTIES_ENABLED protected: - virtual gchar* get_uri_vfunc(int i) const; - virtual Glib::RefPtr 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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual gchar* get_uri_vfunc(int i) const; +#endif //GLIBMM_VFUNCS_ENABLED + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_object_vfunc(int i); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_end_index_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_start_index_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool is_valid_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_anchors_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual guint link_state_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool is_selected_link_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_link_activated(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/hypertext.cc b/libs/gtkmm2/atk/atkmm/hypertext.cc index f383ba5e74..c0e2781cd2 100644 --- a/libs/gtkmm2/atk/atkmm/hypertext.cc +++ b/libs/gtkmm2/atk/atkmm/hypertext.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -37,7 +38,8 @@ namespace Atk namespace { -void Hypertext_signal_link_selected_callback(AtkHypertext* self, gint p0,void* data) + +static void Hypertext_signal_link_selected_callback(AtkHypertext* self, gint p0,void* data) { using namespace Atk; typedef sigc::slot< void,int > SlotType; @@ -45,26 +47,31 @@ void Hypertext_signal_link_selected_callback(AtkHypertext* self, gint p0,void* d // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Hypertext_signal_link_selected_info = +static const Glib::SignalProxyInfo Hypertext_signal_link_selected_info = { "link_selected", (GCallback) &Hypertext_signal_link_selected_callback, (GCallback) &Hypertext_signal_link_selected_callback }; + } // anonymous namespace @@ -109,12 +116,18 @@ void Hypertext_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->link_selected = &link_selected_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED AtkHyperlink* Hypertext_Class::get_link_vfunc_callback(AtkHypertext* self, gint link_index) { CppObjectType *const obj = dynamic_cast( @@ -127,16 +140,20 @@ AtkHyperlink* Hypertext_Class::get_link_vfunc_callback(AtkHypertext* self, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->get_link_vfunc(link_index )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -153,7 +170,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkHyperlink* RType; return RType(); } - gint Hypertext_Class::get_n_links_vfunc_callback(AtkHypertext* self) { CppObjectType *const obj = dynamic_cast( @@ -166,15 +182,19 @@ gint Hypertext_Class::get_n_links_vfunc_callback(AtkHypertext* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_links_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -191,7 +211,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Hypertext_Class::get_link_index_vfunc_callback(AtkHypertext* self, gint char_index) { CppObjectType *const obj = dynamic_cast( @@ -204,16 +223,20 @@ gint Hypertext_Class::get_link_index_vfunc_callback(AtkHypertext* self, gint cha // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_link_index_vfunc(char_index ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -230,8 +253,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Hypertext_Class::link_selected_callback(AtkHypertext* self, gint p0) { CppObjectType *const obj = dynamic_cast( @@ -244,16 +268,20 @@ void Hypertext_Class::link_selected_callback(AtkHypertext* self, gint p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_link_selected(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -267,6 +295,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->link_selected)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Hypertext_Class::wrap_new(GObject* object) @@ -316,7 +345,7 @@ Glib::RefPtr Hypertext::get_link(int link_index) Glib::RefPtr Hypertext::get_link(int link_index) const { - return Glib::wrap(atk_hypertext_get_link(const_cast(gobj()), link_index)); + return const_cast(this)->get_link(link_index); } int Hypertext::get_n_links() const @@ -336,6 +365,7 @@ Glib::SignalProxy1< void,int > Hypertext::signal_link_selected() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Atk::Hypertext::on_link_selected(int link_index) { BaseClassType *const base = static_cast( @@ -346,8 +376,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->link_selected) (*base->link_selected)(gobj(),link_index); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED Glib::RefPtr Atk::Hypertext::get_link_vfunc(int link_index) { BaseClassType *const base = static_cast( @@ -361,7 +392,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::RefPtr RType; return RType(); } - int Atk::Hypertext::get_n_links_vfunc() const { BaseClassType *const base = static_cast( @@ -375,7 +405,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Hypertext::get_link_index_vfunc(int char_index) const { BaseClassType *const base = static_cast( @@ -389,6 +418,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/hypertext.h b/libs/gtkmm2/atk/atkmm/hypertext.h index 090827662a..406b138dfb 100644 --- a/libs/gtkmm2/atk/atkmm/hypertext.h +++ b/libs/gtkmm2/atk/atkmm/hypertext.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_HYPERTEXT_H #define _ATKMM_HYPERTEXT_H + #include /* $Id$ */ @@ -127,24 +128,43 @@ public: int get_link_index(int char_index) const; +/** + * @par Prototype: + * void %link_selected(int link_index) + */ + Glib::SignalProxy1< void,int > signal_link_selected(); - virtual Glib::RefPtr get_link_vfunc(int link_index); - virtual int get_n_links_vfunc() const; - virtual int get_link_index_vfunc(int char_index) const; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_link_vfunc(int link_index); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_links_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_link_index_vfunc(int char_index) const; +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_link_selected(int link_index); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -163,5 +183,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_HYPERTEXT_H */ diff --git a/libs/gtkmm2/atk/atkmm/image.cc b/libs/gtkmm2/atk/atkmm/image.cc index 2f1df28c18..b557a6b929 100644 --- a/libs/gtkmm2/atk/atkmm/image.cc +++ b/libs/gtkmm2/atk/atkmm/image.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -73,12 +74,18 @@ void Image_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED gboolean Image_Class::set_image_description_vfunc_callback(AtkImage* self, const gchar* description) { CppObjectType *const obj = dynamic_cast( @@ -91,16 +98,20 @@ gboolean Image_Class::set_image_description_vfunc_callback(AtkImage* self, const // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_image_description_vfunc(Glib::convert_const_gchar_ptr_to_ustring(description) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -117,7 +128,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - const gchar* Image_Class::get_image_description_vfunc_callback(AtkImage* self) { CppObjectType *const obj = dynamic_cast( @@ -130,15 +140,19 @@ const gchar* Image_Class::get_image_description_vfunc_callback(AtkImage* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_image_description_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -155,7 +169,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -168,18 +181,22 @@ void Image_Class::get_image_position_vfunc_callback(AtkImage* self, gint* x, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_image_position_vfunc(*(x) , *(y) , ((CoordType)(coord_type)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -193,7 +210,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -206,17 +222,21 @@ void Image_Class::get_image_size_vfunc_callback(AtkImage* self, gint* width, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_image_size_vfunc(*(width) , *(height) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -230,6 +250,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->get_image_size)(self, width, height); } } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Image_Class::wrap_new(GObject* object) @@ -284,15 +308,19 @@ Glib::ustring Image::get_image_description() const void Image::get_image_size(int& width, int& height) const { - atk_image_get_image_size(const_cast(gobj()), &width, &height); +atk_image_get_image_size(const_cast(gobj()), &width, &height); } void Image::get_image_position(int& x, int& y, CoordType coord_type) const { - atk_image_get_image_position(const_cast(gobj()), &x, &y, ((AtkCoordType)(coord_type))); +atk_image_get_image_position(const_cast(gobj()), &x, &y, ((AtkCoordType)(coord_type))); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED bool Atk::Image::set_image_description_vfunc(const Glib::ustring& description) { BaseClassType *const base = static_cast( @@ -306,7 +334,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - const char* Atk::Image::get_image_description_vfunc() const { BaseClassType *const base = static_cast( @@ -320,7 +347,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -331,7 +357,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_image_position) (*base->get_image_position)(const_cast(gobj()),&x,&y,((AtkCoordType)(coord_type))); } - void Atk::Image::get_image_size_vfunc(int& width, int& height) const { BaseClassType *const base = static_cast( @@ -342,6 +367,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_image_size) (*base->get_image_size)(const_cast(gobj()),&width,&height); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/image.h b/libs/gtkmm2/atk/atkmm/image.h index a6af34884a..9c36aa57ef 100644 --- a/libs/gtkmm2/atk/atkmm/image.h +++ b/libs/gtkmm2/atk/atkmm/image.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_IMAGE_H #define _ATKMM_IMAGE_H + #include /* $Id$ */ @@ -135,22 +136,39 @@ public: 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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_image_description_vfunc(const Glib::ustring& description); +#endif //GLIBMM_VFUNCS_ENABLED - 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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const char* get_image_description_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_image_position_vfunc(int& x, int& y, CoordType coord_type) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_image_size_vfunc(int& width, int& height) const; +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -169,5 +187,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_IMAGE_H */ diff --git a/libs/gtkmm2/atk/atkmm/implementor.cc b/libs/gtkmm2/atk/atkmm/implementor.cc index 303bf3d0a1..fc70956d86 100644 --- a/libs/gtkmm2/atk/atkmm/implementor.cc +++ b/libs/gtkmm2/atk/atkmm/implementor.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -73,9 +74,15 @@ void Implementor_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED klass->ref_accessible = &ref_accessible_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED AtkObject* Implementor_Class::ref_accessible_vfunc_callback(AtkImplementor* self) { CppObjectType *const obj = dynamic_cast( @@ -88,15 +95,19 @@ AtkObject* Implementor_Class::ref_accessible_vfunc_callback(AtkImplementor* self // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->ref_accessibile_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -113,6 +124,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Implementor_Class::wrap_new(GObject* object) @@ -155,6 +170,10 @@ GType Implementor::get_base_type() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED Glib::RefPtr Atk::Implementor::ref_accessibile_vfunc() { BaseClassType *const base = static_cast( @@ -163,11 +182,12 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / ) ); if(base && base->ref_accessible) - return Glib::wrap((*base->ref_accessible)(gobj())); + return Glib::wrap((*base->ref_accessible)(gobj()), true); typedef Glib::RefPtr RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/implementor.h b/libs/gtkmm2/atk/atkmm/implementor.h index 7df786ce27..f25fe1a7db 100644 --- a/libs/gtkmm2/atk/atkmm/implementor.h +++ b/libs/gtkmm2/atk/atkmm/implementor.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_IMPLEMENTOR_H #define _ATKMM_IMPLEMENTOR_H + #include /* $Id$ */ @@ -93,18 +94,26 @@ private: protected: - virtual Glib::RefPtr ref_accessibile_vfunc(); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr ref_accessibile_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -123,5 +132,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_IMPLEMENTOR_H */ diff --git a/libs/gtkmm2/atk/atkmm/noopobject.cc b/libs/gtkmm2/atk/atkmm/noopobject.cc index c9c78627cd..ad39d3bed2 100644 --- a/libs/gtkmm2/atk/atkmm/noopobject.cc +++ b/libs/gtkmm2/atk/atkmm/noopobject.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -83,8 +84,19 @@ void NoOpObject_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* NoOpObject_Class::wrap_new(GObject* object) { @@ -127,6 +139,13 @@ GType NoOpObject::get_base_type() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/noopobject.h b/libs/gtkmm2/atk/atkmm/noopobject.h index b5ee9bed0c..1421c0f084 100644 --- a/libs/gtkmm2/atk/atkmm/noopobject.h +++ b/libs/gtkmm2/atk/atkmm/noopobject.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_NOOPOBJECT_H #define _ATKMM_NOOPOBJECT_H + #include /* $Id$ */ @@ -116,11 +117,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/object.cc b/libs/gtkmm2/atk/atkmm/object.cc index 44e7301691..b129a0af67 100644 --- a/libs/gtkmm2/atk/atkmm/object.cc +++ b/libs/gtkmm2/atk/atkmm/object.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -69,7 +70,8 @@ Glib::ObjectBase* Object_Class::wrap_new(GObject* object) namespace { -void Object_signal_children_changed_callback(AtkObject* self, guint p0,gpointer p1,void* data) + +static void Object_signal_children_changed_callback(AtkObject* self, guint p0,gpointer p1,void* data) { using namespace Atk; typedef sigc::slot< void,guint,gpointer > SlotType; @@ -77,19 +79,23 @@ void Object_signal_children_changed_callback(AtkObject* self, guint p0,gpointer // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0, p1); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Object_signal_children_changed_info = +static const Glib::SignalProxyInfo Object_signal_children_changed_info = { "children_changed", (GCallback) &Object_signal_children_changed_callback, @@ -97,7 +103,7 @@ const Glib::SignalProxyInfo Object_signal_children_changed_info = }; -void Object_signal_focus_event_callback(AtkObject* self, gboolean p0,void* data) +static void Object_signal_focus_event_callback(AtkObject* self, gboolean p0,void* data) { using namespace Atk; typedef sigc::slot< void,bool > SlotType; @@ -105,20 +111,24 @@ void Object_signal_focus_event_callback(AtkObject* self, gboolean p0,void* data) // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Object_signal_focus_event_info = +static const Glib::SignalProxyInfo Object_signal_focus_event_info = { "focus_event", (GCallback) &Object_signal_focus_event_callback, @@ -126,7 +136,7 @@ const Glib::SignalProxyInfo Object_signal_focus_event_info = }; -void Object_signal_property_change_callback(AtkObject* self, AtkPropertyValues* p0,void* data) +static void Object_signal_property_change_callback(AtkObject* self, AtkPropertyValues* p0,void* data) { using namespace Atk; typedef sigc::slot< void,AtkPropertyValues* > SlotType; @@ -134,19 +144,23 @@ void Object_signal_property_change_callback(AtkObject* self, AtkPropertyValues* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Object_signal_property_change_info = +static const Glib::SignalProxyInfo Object_signal_property_change_info = { "property_change", (GCallback) &Object_signal_property_change_callback, @@ -154,7 +168,7 @@ const Glib::SignalProxyInfo Object_signal_property_change_info = }; -void Object_signal_state_change_callback(AtkObject* self, const gchar* p0,gboolean p1,void* data) +static 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; @@ -162,21 +176,25 @@ void Object_signal_state_change_callback(AtkObject* self, const gchar* p0,gboole // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0) , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Object_signal_state_change_info = +static const Glib::SignalProxyInfo Object_signal_state_change_info = { "state_change", (GCallback) &Object_signal_state_change_callback, @@ -184,7 +202,7 @@ const Glib::SignalProxyInfo Object_signal_state_change_info = }; -const Glib::SignalProxyInfo Object_signal_visible_data_changed_info = +static const Glib::SignalProxyInfo Object_signal_visible_data_changed_info = { "visible_data_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -192,7 +210,7 @@ const Glib::SignalProxyInfo Object_signal_visible_data_changed_info = }; -void Object_signal_active_descendant_changed_callback(AtkObject* self, gpointer* p0,void* data) +static void Object_signal_active_descendant_changed_callback(AtkObject* self, gpointer* p0,void* data) { using namespace Atk; typedef sigc::slot< void,void** > SlotType; @@ -200,26 +218,31 @@ void Object_signal_active_descendant_changed_callback(AtkObject* self, gpointer* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Object_signal_active_descendant_changed_info = +static 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 @@ -272,15 +295,23 @@ void Object_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Object_Class::children_changed_callback(AtkObject* self, guint p0, gpointer p1) { CppObjectType *const obj = dynamic_cast( @@ -293,15 +324,19 @@ void Object_Class::children_changed_callback(AtkObject* self, guint p0, gpointer // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_children_changed(p0, p1); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -314,7 +349,6 @@ void Object_Class::children_changed_callback(AtkObject* self, guint p0, gpointer (*base->children_changed)(self, p0, p1); } } - void Object_Class::focus_event_callback(AtkObject* self, gboolean p0) { CppObjectType *const obj = dynamic_cast( @@ -327,16 +361,20 @@ void Object_Class::focus_event_callback(AtkObject* self, gboolean p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_focus_event(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -349,7 +387,6 @@ void Object_Class::focus_event_callback(AtkObject* self, gboolean p0) (*base->focus_event)(self, p0); } } - void Object_Class::property_change_callback(AtkObject* self, AtkPropertyValues* p0) { CppObjectType *const obj = dynamic_cast( @@ -362,15 +399,19 @@ void Object_Class::property_change_callback(AtkObject* self, AtkPropertyValues* // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_property_change(p0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -383,7 +424,6 @@ void Object_Class::property_change_callback(AtkObject* self, AtkPropertyValues* (*base->property_change)(self, p0); } } - void Object_Class::state_change_callback(AtkObject* self, const gchar* p0, gboolean p1) { CppObjectType *const obj = dynamic_cast( @@ -396,17 +436,21 @@ void Object_Class::state_change_callback(AtkObject* self, const gchar* p0, gbool // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_state_change(Glib::convert_const_gchar_ptr_to_ustring(p0) , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -419,7 +463,6 @@ void Object_Class::state_change_callback(AtkObject* self, const gchar* p0, gbool (*base->state_change)(self, p0, p1); } } - void Object_Class::visible_data_changed_callback(AtkObject* self) { CppObjectType *const obj = dynamic_cast( @@ -432,15 +475,19 @@ void Object_Class::visible_data_changed_callback(AtkObject* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_visible_data_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -453,7 +500,6 @@ void Object_Class::visible_data_changed_callback(AtkObject* self) (*base->visible_data_changed)(self); } } - void Object_Class::active_descendant_changed_callback(AtkObject* self, gpointer* p0) { CppObjectType *const obj = dynamic_cast( @@ -466,16 +512,20 @@ void Object_Class::active_descendant_changed_callback(AtkObject* self, gpointer* // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_active_descendant_changed(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -488,6 +538,7 @@ void Object_Class::active_descendant_changed_callback(AtkObject* self, gpointer* (*base->active_descendant_changed)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED /* The implementation: */ @@ -539,10 +590,10 @@ Glib::RefPtr Object::get_parent() { Glib::RefPtr 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 @@ -559,10 +610,10 @@ Glib::RefPtr Object::get_relation_set() { Glib::RefPtr 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 @@ -582,27 +633,27 @@ int Object::get_index_in_parent() void Object::set_name(const Glib::ustring& name) { - atk_object_set_name(gobj(), name.c_str()); +atk_object_set_name(gobj(), name.c_str()); } void Object::set_description(const Glib::ustring& description) { - atk_object_set_description(gobj(), description.c_str()); +atk_object_set_description(gobj(), description.c_str()); } void Object::set_parent(const Glib::RefPtr& parent) { - atk_object_set_parent(gobj(), Glib::unwrap(parent)); +atk_object_set_parent(gobj(), Glib::unwrap(parent)); } void Object::set_role(Role role) { - atk_object_set_role(gobj(), ((AtkRole)(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(value)); +atk_object_notify_state_change(gobj(), state, static_cast(value)); } bool Object::add_relationship(RelationType relationship, const Glib::RefPtr& target) @@ -621,153 +672,207 @@ 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_name() { return Glib::PropertyProxy(this, "accessible-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_name() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_description() { return Glib::PropertyProxy(this, "accessible-description"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_description() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-description"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > Object::property_accessible_parent() { return Glib::PropertyProxy< Glib::RefPtr >(this, "accessible-parent"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > Object::property_accessible_parent() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "accessible-parent"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_value() { return Glib::PropertyProxy(this, "accessible-value"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_value() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-value"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_role() { return Glib::PropertyProxy(this, "accessible-role"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_role() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-role"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_component_layer() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-component-layer"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_component_mdi_zorder() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-component-mdi-zorder"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_table_caption() { return Glib::PropertyProxy(this, "accessible-table-caption"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_table_caption() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-table-caption"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_table_column_description() { return Glib::PropertyProxy(this, "accessible-table-column-description"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_table_column_description() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-table-column-description"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > Object::property_accessible_table_column_header() { return Glib::PropertyProxy< Glib::RefPtr >(this, "accessible-table-column-header"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > Object::property_accessible_table_column_header() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "accessible-table-column-header"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Object::property_accessible_table_row_description() { return Glib::PropertyProxy(this, "accessible-table-row-description"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Object::property_accessible_table_row_description() const { return Glib::PropertyProxy_ReadOnly(this, "accessible-table-row-description"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > Object::property_accessible_table_row_header() { return Glib::PropertyProxy< Glib::RefPtr >(this, "accessible-table-row-header"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > Object::property_accessible_table_row_header() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "accessible-table-row-header"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > Object::property_accessible_table_summary() { return Glib::PropertyProxy< Glib::RefPtr >(this, "accessible-table-summary"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > Object::property_accessible_table_summary() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "accessible-table-summary"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Atk::Object::on_children_changed(guint change_index, gpointer changed_child) { BaseClassType *const base = static_cast( @@ -777,7 +882,6 @@ void Atk::Object::on_children_changed(guint change_index, gpointer changed_child 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( @@ -787,7 +891,6 @@ void Atk::Object::on_focus_event(bool focus_in) if(base && base->focus_event) (*base->focus_event)(gobj(),static_cast(focus_in)); } - void Atk::Object::on_property_change(AtkPropertyValues* values) { BaseClassType *const base = static_cast( @@ -797,7 +900,6 @@ void Atk::Object::on_property_change(AtkPropertyValues* values) 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( @@ -807,7 +909,6 @@ void Atk::Object::on_state_change(const Glib::ustring& name, bool state_set) if(base && base->state_change) (*base->state_change)(gobj(),name.c_str(),static_cast(state_set)); } - void Atk::Object::on_visible_data_changed() { BaseClassType *const base = static_cast( @@ -817,7 +918,6 @@ void Atk::Object::on_visible_data_changed() 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( @@ -827,6 +927,10 @@ void Atk::Object::on_active_descendant_changed(void** child) if(base && base->active_descendant_changed) (*base->active_descendant_changed)(gobj(),child); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/object.h b/libs/gtkmm2/atk/atkmm/object.h index 047cb2a254..5b2431b57a 100644 --- a/libs/gtkmm2/atk/atkmm/object.h +++ b/libs/gtkmm2/atk/atkmm/object.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_OBJECT_H #define _ATKMM_OBJECT_H + #include /* $Id$ */ @@ -320,32 +321,65 @@ public: bool remove_relationship(RelationType relationship, const Glib::RefPtr& target); +/** + * @par Prototype: + * void %children_changed(guint change_index, gpointer changed_child) + */ + Glib::SignalProxy2< void,guint,gpointer > signal_children_changed(); +/** + * @par Prototype: + * void %focus_event(bool focus_in) + */ + Glib::SignalProxy1< void,bool > signal_focus_event(); +/** + * @par Prototype: + * void %property_change(AtkPropertyValues* values) + */ + Glib::SignalProxy1< void,AtkPropertyValues* > signal_property_change(); +/** + * @par Prototype: + * void %state_change(const Glib::ustring& name, bool state_set) + */ + Glib::SignalProxy2< void,const Glib::ustring&,bool > signal_state_change(); +/** + * @par Prototype: + * void %visible_data_changed() + */ + Glib::SignalProxy0< void > signal_visible_data_changed(); +/** + * @par Prototype: + * void %active_descendant_changed(void** child) + */ + Glib::SignalProxy1< void,void** > signal_active_descendant_changed(); - /** Object instance's name formatted for assistive technology access. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_name() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -353,15 +387,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_name() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Description of an object + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_description() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Description of an object * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -369,15 +407,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_description() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the parent has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_accessible_parent() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -385,15 +427,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_accessible_parent() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the value has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_value() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -401,15 +447,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_value() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The accessible role of this object. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_role() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The accessible role of this object. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -417,33 +467,41 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_role() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The accessible layer of this object. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_component_layer() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The accessible MDI value of this object. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_component_mdi_zorder() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_table_caption() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -451,15 +509,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_table_caption() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the table column description has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_table_column_description() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -467,15 +529,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_table_column_description() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the table column header has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_accessible_table_column_header() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -483,15 +549,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_accessible_table_column_header() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the table row description has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accessible_table_row_description() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -499,15 +569,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accessible_table_row_description() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the table row header has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_accessible_table_row_header() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -515,15 +589,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_accessible_table_row_header() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Is used to notify that the table summary has changed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_accessible_table_summary() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -531,23 +609,30 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_accessible_table_summary() const; +#endif //#GLIBMM_PROPERTIES_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/objectaccessible.cc b/libs/gtkmm2/atk/atkmm/objectaccessible.cc index da4136bef7..265180b830 100644 --- a/libs/gtkmm2/atk/atkmm/objectaccessible.cc +++ b/libs/gtkmm2/atk/atkmm/objectaccessible.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -26,7 +27,6 @@ */ #include - namespace { } // anonymous namespace @@ -75,8 +75,19 @@ void ObjectAccessible_Class::class_init_function(void* g_class, void* class_data BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* ObjectAccessible_Class::wrap_new(GObject* object) { @@ -123,20 +134,15 @@ Glib::RefPtr ObjectAccessible::get_object() { Glib::RefPtr 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 ObjectAccessible::get_object() const { - - Glib::RefPtr retvalue = Glib::wrap(atk_gobject_accessible_get_object(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_object(); } Glib::RefPtr ObjectAccessible::for_object(const Glib::RefPtr& obj) @@ -149,6 +155,7 @@ Glib::RefPtr ObjectAccessible::for_object(const Glib::RefPtr ObjectAccessible::for_object(const Glib::RefPtr& obj) { @@ -160,6 +167,13 @@ Glib::RefPtr ObjectAccessible::for_object(const Glib::RefPtr< } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/objectaccessible.h b/libs/gtkmm2/atk/atkmm/objectaccessible.h index d266f9a97e..f3ed6f5b9c 100644 --- a/libs/gtkmm2/atk/atkmm/objectaccessible.h +++ b/libs/gtkmm2/atk/atkmm/objectaccessible.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_OBJECTACCESSIBLE_H #define _ATKMM_OBJECTACCESSIBLE_H + #include /* $Id$ */ @@ -118,11 +119,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/private/action_p.h b/libs/gtkmm2/atk/atkmm/private/action_p.h index bb3c5afa09..9372291a66 100644 --- a/libs/gtkmm2/atk/atkmm/private/action_p.h +++ b/libs/gtkmm2/atk/atkmm/private/action_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_ACTION_P_H #define _ATKMM_ACTION_P_H + + #include #include @@ -27,21 +29,26 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 010df9e92f..7526cdcb68 100644 --- a/libs/gtkmm2/atk/atkmm/private/component_p.h +++ b/libs/gtkmm2/atk/atkmm/private/component_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_COMPONENT_P_H #define _ATKMM_COMPONENT_P_H + + #include #include @@ -27,11 +29,14 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); @@ -45,10 +50,12 @@ protected: 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 01115486b5..387a5822e7 100644 --- a/libs/gtkmm2/atk/atkmm/private/document_p.h +++ b/libs/gtkmm2/atk/atkmm/private/document_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_DOCUMENT_P_H #define _ATKMM_DOCUMENT_P_H + + #include #include @@ -27,17 +29,22 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED static const gchar* get_document_type_vfunc_callback(AtkDocument* self); static gpointer get_document_vfunc_callback(AtkDocument* self); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index fb5004ed1d..e812f68489 100644 --- a/libs/gtkmm2/atk/atkmm/private/editabletext_p.h +++ b/libs/gtkmm2/atk/atkmm/private/editabletext_p.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_EDITABLETEXT_P_H #define _ATKMM_EDITABLETEXT_P_H + #include namespace Atk @@ -26,11 +27,14 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); @@ -38,10 +42,12 @@ protected: 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index a5d9e61275..b4b57fc745 100644 --- a/libs/gtkmm2/atk/atkmm/private/hyperlink_p.h +++ b/libs/gtkmm2/atk/atkmm/private/hyperlink_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_HYPERLINK_P_H #define _ATKMM_HYPERLINK_P_H + + #include #include @@ -31,12 +33,15 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); @@ -45,10 +50,12 @@ protected: 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 79eaad32c5..cf6ec7a240 100644 --- a/libs/gtkmm2/atk/atkmm/private/hypertext_p.h +++ b/libs/gtkmm2/atk/atkmm/private/hypertext_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_HYPERTEXT_P_H #define _ATKMM_HYPERTEXT_P_H + + #include #include @@ -27,19 +29,24 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index b2e8d327ca..f7275ba0c9 100644 --- a/libs/gtkmm2/atk/atkmm/private/image_p.h +++ b/libs/gtkmm2/atk/atkmm/private/image_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_IMAGE_P_H #define _ATKMM_IMAGE_P_H + + #include #include @@ -27,19 +29,24 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 7c5fc8804f..70359d4122 100644 --- a/libs/gtkmm2/atk/atkmm/private/implementor_p.h +++ b/libs/gtkmm2/atk/atkmm/private/implementor_p.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_IMPLEMENTOR_P_H #define _ATKMM_IMPLEMENTOR_P_H + #include namespace Atk @@ -26,16 +27,21 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED static AtkObject* ref_accessible_vfunc_callback(AtkImplementor* self); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index afa515b316..54b1f81709 100644 --- a/libs/gtkmm2/atk/atkmm/private/noopobject_p.h +++ b/libs/gtkmm2/atk/atkmm/private/noopobject_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_NOOPOBJECT_P_H #define _ATKMM_NOOPOBJECT_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index f65e8f8c08..8af90b1c95 100644 --- a/libs/gtkmm2/atk/atkmm/private/object_p.h +++ b/libs/gtkmm2/atk/atkmm/private/object_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_OBJECT_P_H #define _ATKMM_OBJECT_P_H + + #include #include @@ -30,6 +32,7 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. @@ -39,12 +42,16 @@ protected: 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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index b94c1320e5..37be5dd403 100644 --- a/libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h +++ b/libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_OBJECTACCESSIBLE_P_H #define _ATKMM_OBJECTACCESSIBLE_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 63513db828..075b012730 100644 --- a/libs/gtkmm2/atk/atkmm/private/relation_p.h +++ b/libs/gtkmm2/atk/atkmm/private/relation_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_RELATION_P_H #define _ATKMM_RELATION_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 8d3787e6e6..719ba5607e 100644 --- a/libs/gtkmm2/atk/atkmm/private/relationset_p.h +++ b/libs/gtkmm2/atk/atkmm/private/relationset_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_RELATIONSET_P_H #define _ATKMM_RELATIONSET_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index dd5f27702a..11956c38fc 100644 --- a/libs/gtkmm2/atk/atkmm/private/selection_p.h +++ b/libs/gtkmm2/atk/atkmm/private/selection_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_SELECTION_P_H #define _ATKMM_SELECTION_P_H + + #include #include @@ -27,12 +29,15 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); @@ -40,10 +45,12 @@ protected: 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 51dd352ec0..8d6691c0d2 100644 --- a/libs/gtkmm2/atk/atkmm/private/stateset_p.h +++ b/libs/gtkmm2/atk/atkmm/private/stateset_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_STATESET_P_H #define _ATKMM_STATESET_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 7c22e8c8ec..acc2aa6dbe 100644 --- a/libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h +++ b/libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_STREAMABLECONTENT_P_H #define _ATKMM_STREAMABLECONTENT_P_H + + #include #include @@ -27,18 +29,23 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 5516bb05c9..6d8d3d1cac 100644 --- a/libs/gtkmm2/atk/atkmm/private/table_p.h +++ b/libs/gtkmm2/atk/atkmm/private/table_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _ATKMM_TABLE_P_H #define _ATKMM_TABLE_P_H + + #include #include @@ -27,6 +29,7 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. @@ -37,8 +40,10 @@ protected: static void row_reordered_callback(AtkTable* self); static void column_reordered_callback(AtkTable* self); static void model_changed_callback(AtkTable* self); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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_); @@ -68,10 +73,12 @@ protected: 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 3ccc748965..8888776aca 100644 --- a/libs/gtkmm2/atk/atkmm/private/text_p.h +++ b/libs/gtkmm2/atk/atkmm/private/text_p.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_TEXT_P_H #define _ATKMM_TEXT_P_H + #include namespace Atk @@ -26,6 +27,7 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. @@ -33,8 +35,10 @@ protected: 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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); @@ -52,10 +56,12 @@ protected: 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index f712e3cd70..00fcb81ae8 100644 --- a/libs/gtkmm2/atk/atkmm/private/value_p.h +++ b/libs/gtkmm2/atk/atkmm/private/value_p.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_VALUE_P_H #define _ATKMM_VALUE_P_H + #include namespace Atk @@ -26,19 +27,24 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED 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); +#endif //GLIBMM_VFUNCS_ENABLED }; } // namespace Atk + #endif /* _ATKMM_VALUE_P_H */ diff --git a/libs/gtkmm2/atk/atkmm/relation.cc b/libs/gtkmm2/atk/atkmm/relation.cc index 94c3fe2d48..e56df0ee10 100644 --- a/libs/gtkmm2/atk/atkmm/relation.cc +++ b/libs/gtkmm2/atk/atkmm/relation.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -113,8 +114,19 @@ void Relation_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Relation_Class::wrap_new(GObject* object) { @@ -168,10 +180,17 @@ RelationType Relation::get_relation_type() const void Relation::add_target(const Glib::RefPtr& target) { - atk_relation_add_target(gobj(), Glib::unwrap(target)); +atk_relation_add_target(gobj(), Glib::unwrap(target)); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/relation.h b/libs/gtkmm2/atk/atkmm/relation.h index 683b938947..f0b1fe2f44 100644 --- a/libs/gtkmm2/atk/atkmm/relation.h +++ b/libs/gtkmm2/atk/atkmm/relation.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_RELATION_H #define _ATKMM_RELATION_H + #include /* $Id$ */ @@ -153,6 +154,12 @@ public: Glib::ArrayHandle< Glib::RefPtr > get_target() const; + /** Adds the specified AtkObject to the target for the relation, if it is + * not already present. + * + * Since: 1.9 + * @param target An Atk::Object. + */ void add_target(const Glib::RefPtr& target); @@ -160,11 +167,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/relationset.cc b/libs/gtkmm2/atk/atkmm/relationset.cc index 2060639bc1..3638f4ece1 100644 --- a/libs/gtkmm2/atk/atkmm/relationset.cc +++ b/libs/gtkmm2/atk/atkmm/relationset.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -75,8 +76,19 @@ void RelationSet_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* RelationSet_Class::wrap_new(GObject* object) { @@ -137,12 +149,12 @@ bool RelationSet::set_contains(RelationType relationship) void RelationSet::set_remove(const Glib::RefPtr& relation) { - atk_relation_set_remove(gobj(), Glib::unwrap(relation)); +atk_relation_set_remove(gobj(), Glib::unwrap(relation)); } void RelationSet::set_add(const Glib::RefPtr& relation) { - atk_relation_set_add(gobj(), Glib::unwrap(relation)); +atk_relation_set_add(gobj(), Glib::unwrap(relation)); } int RelationSet::get_n_relations() const @@ -154,28 +166,35 @@ Glib::RefPtr RelationSet::get_relation(gint i) { Glib::RefPtr 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 RelationSet::get_relation(RelationType relationship) { Glib::RefPtr 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& target) { - atk_relation_set_add_relation_by_type(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target)); +atk_relation_set_add_relation_by_type(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target)); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/relationset.h b/libs/gtkmm2/atk/atkmm/relationset.h index 3702083fa5..a2a52c2fac 100644 --- a/libs/gtkmm2/atk/atkmm/relationset.h +++ b/libs/gtkmm2/atk/atkmm/relationset.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_RELATIONSET_H #define _ATKMM_RELATIONSET_H + #include /* $Id$ */ @@ -137,6 +138,15 @@ public: Glib::RefPtr get_relation(RelationType relationship); + /** Add a new relation of the specified type with the specified target to + * the current relation set if the relation set does not contain a relation + * of that type. If it is does contain a relation of that typea the target + * is added to the relation. + * + * Since: 1.9 + * @param relationship An Atk::RelationType. + * @param target An Atk::Object. + */ void add_relation_by_type(RelationType relationship, const Glib::RefPtr& target); @@ -144,11 +154,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/selection.cc b/libs/gtkmm2/atk/atkmm/selection.cc index 95c6a0a60a..ed5fb629e7 100644 --- a/libs/gtkmm2/atk/atkmm/selection.cc +++ b/libs/gtkmm2/atk/atkmm/selection.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,13 +31,15 @@ namespace { -const Glib::SignalProxyInfo Selection_signal_selection_changed_info = + +static const Glib::SignalProxyInfo Selection_signal_selection_changed_info = { "selection_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -81,6 +84,7 @@ void Selection_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED klass->add_selection = &add_selection_vfunc_callback; klass->clear_selection = &clear_selection_vfunc_callback; klass->ref_selection = &ref_selection_vfunc_callback; @@ -88,9 +92,14 @@ void Selection_Class::iface_init_function(void* g_iface, void*) 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->selection_changed = &selection_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED gboolean Selection_Class::add_selection_vfunc_callback(AtkSelection* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -103,16 +112,20 @@ gboolean Selection_Class::add_selection_vfunc_callback(AtkSelection* self, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->add_selection_vfunc(i )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -129,7 +142,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Selection_Class::clear_selection_vfunc_callback(AtkSelection* self) { CppObjectType *const obj = dynamic_cast( @@ -142,15 +154,19 @@ gboolean Selection_Class::clear_selection_vfunc_callback(AtkSelection* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->clear_selection_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -167,7 +183,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - AtkObject* Selection_Class::ref_selection_vfunc_callback(AtkSelection* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -180,16 +195,20 @@ AtkObject* Selection_Class::ref_selection_vfunc_callback(AtkSelection* self, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap_copy(obj->get_selection_vfunc(i )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -206,7 +225,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } - gint Selection_Class::get_selection_count_vfunc_callback(AtkSelection* self) { CppObjectType *const obj = dynamic_cast( @@ -219,15 +237,19 @@ gint Selection_Class::get_selection_count_vfunc_callback(AtkSelection* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_selection_count_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -244,7 +266,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gboolean Selection_Class::is_child_selected_vfunc_callback(AtkSelection* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -257,16 +278,20 @@ gboolean Selection_Class::is_child_selected_vfunc_callback(AtkSelection* self, g // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->is_child_selected_vfunc(i )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -283,7 +308,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Selection_Class::remove_selection_vfunc_callback(AtkSelection* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -296,16 +320,20 @@ gboolean Selection_Class::remove_selection_vfunc_callback(AtkSelection* self, gi // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->remove_selection_vfunc(i )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -322,7 +350,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Selection_Class::select_all_selection_vfunc_callback(AtkSelection* self) { CppObjectType *const obj = dynamic_cast( @@ -335,15 +362,19 @@ gboolean Selection_Class::select_all_selection_vfunc_callback(AtkSelection* self // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->select_all_selection_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -360,8 +391,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Selection_Class::selection_changed_callback(AtkSelection* self) { CppObjectType *const obj = dynamic_cast( @@ -374,15 +406,19 @@ void Selection_Class::selection_changed_callback(AtkSelection* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_selection_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -396,6 +432,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->selection_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Selection_Class::wrap_new(GObject* object) @@ -480,6 +517,7 @@ Glib::SignalProxy0< void > Selection::signal_selection_changed() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Atk::Selection::on_selection_changed() { BaseClassType *const base = static_cast( @@ -490,8 +528,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->selection_changed) (*base->selection_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED bool Atk::Selection::add_selection_vfunc(int i) { BaseClassType *const base = static_cast( @@ -505,7 +544,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Selection::clear_selection_vfunc() { BaseClassType *const base = static_cast( @@ -519,7 +557,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - Glib::RefPtr Atk::Selection::get_selection_vfunc(int i) { BaseClassType *const base = static_cast( @@ -533,7 +570,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::RefPtr RType; return RType(); } - int Atk::Selection::get_selection_count_vfunc() const { BaseClassType *const base = static_cast( @@ -547,7 +583,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - bool Atk::Selection::is_child_selected_vfunc(int i) const { BaseClassType *const base = static_cast( @@ -561,7 +596,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Selection::remove_selection_vfunc(int i) { BaseClassType *const base = static_cast( @@ -575,7 +609,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Selection::select_all_selection_vfunc() { BaseClassType *const base = static_cast( @@ -589,6 +622,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/selection.h b/libs/gtkmm2/atk/atkmm/selection.h index 62185ed0d9..eaf17896a9 100644 --- a/libs/gtkmm2/atk/atkmm/selection.h +++ b/libs/gtkmm2/atk/atkmm/selection.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_SELECTION_H #define _ATKMM_SELECTION_H + #include /* $Id$ */ @@ -163,29 +164,60 @@ public: bool select_all_selection(); +/** + * @par Prototype: + * void %selection_changed() + */ + Glib::SignalProxy0< void > signal_selection_changed(); protected: - virtual bool add_selection_vfunc(int i); - virtual bool clear_selection_vfunc(); - virtual Glib::RefPtr 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(); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool add_selection_vfunc(int i); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool clear_selection_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_selection_vfunc(int i); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_selection_count_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool is_child_selected_vfunc(int i) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool remove_selection_vfunc(int i); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool select_all_selection_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_selection_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -204,5 +236,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_SELECTION_H */ diff --git a/libs/gtkmm2/atk/atkmm/stateset.cc b/libs/gtkmm2/atk/atkmm/stateset.cc index 6feb4d6ee3..bb8d7745fa 100644 --- a/libs/gtkmm2/atk/atkmm/stateset.cc +++ b/libs/gtkmm2/atk/atkmm/stateset.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -99,8 +100,19 @@ void StateSet_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* StateSet_Class::wrap_new(GObject* object) { @@ -166,7 +178,7 @@ bool StateSet::add_state(Atk::StateType type) void StateSet::clear_states() { - atk_state_set_clear_states(gobj()); +atk_state_set_clear_states(gobj()); } bool StateSet::contains_state(Atk::StateType type) @@ -195,6 +207,13 @@ Glib::RefPtr StateSet::xor_sets(const Glib::RefPtr& compare_ } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/stateset.h b/libs/gtkmm2/atk/atkmm/stateset.h index f3e8f70504..559e702cc4 100644 --- a/libs/gtkmm2/atk/atkmm/stateset.h +++ b/libs/gtkmm2/atk/atkmm/stateset.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_STATESET_H #define _ATKMM_STATESET_H + #include /* $Id$ */ @@ -76,6 +77,7 @@ enum StateType STATE_MANAGES_DESCENDANTS, STATE_INDETERMINATE, STATE_TRUNCATED, + STATE_REQUIRED, STATE_LAST_DEFINED }; @@ -220,11 +222,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/atk/atkmm/streamablecontent.cc b/libs/gtkmm2/atk/atkmm/streamablecontent.cc index 13916f861d..8c10a6b13d 100644 --- a/libs/gtkmm2/atk/atkmm/streamablecontent.cc +++ b/libs/gtkmm2/atk/atkmm/streamablecontent.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -80,11 +81,17 @@ void StreamableContent_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED int StreamableContent_Class::get_n_mime_types_vfunc_callback(AtkStreamableContent* self) { CppObjectType *const obj = dynamic_cast( @@ -97,15 +104,19 @@ int StreamableContent_Class::get_n_mime_types_vfunc_callback(AtkStreamableConten // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_mime_types_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -122,7 +133,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef int RType; return RType(); } - const gchar* StreamableContent_Class::get_mime_type_vfunc_callback(AtkStreamableContent* self, gint i) { CppObjectType *const obj = dynamic_cast( @@ -135,16 +145,20 @@ const gchar* StreamableContent_Class::get_mime_type_vfunc_callback(AtkStreamable // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_mime_type_vfunc(i ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -161,7 +175,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef const gchar* RType; return RType(); } - GIOChannel* StreamableContent_Class::get_stream_vfunc_callback(AtkStreamableContent* self, const gchar* mime_type) { CppObjectType *const obj = dynamic_cast( @@ -174,16 +187,20 @@ GIOChannel* StreamableContent_Class::get_stream_vfunc_callback(AtkStreamableCont // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_stream_vfunc(Glib::convert_const_gchar_ptr_to_ustring(mime_type) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -200,6 +217,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef GIOChannel* RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* StreamableContent_Class::wrap_new(GObject* object) @@ -258,6 +279,10 @@ Glib::RefPtr StreamableContent::get_stream(const Glib::ustring& } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED int Atk::StreamableContent::get_n_mime_types_vfunc() const { BaseClassType *const base = static_cast( @@ -271,7 +296,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - const gchar* Atk::StreamableContent::get_mime_type_vfunc(int i) const { BaseClassType *const base = static_cast( @@ -285,7 +309,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const gchar* RType; return RType(); } - GIOChannel* Atk::StreamableContent::get_stream_vfunc(const Glib::ustring& mime_type) { BaseClassType *const base = static_cast( @@ -299,6 +322,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef GIOChannel* RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/streamablecontent.h b/libs/gtkmm2/atk/atkmm/streamablecontent.h index 698aaef86b..fe93cf72cb 100644 --- a/libs/gtkmm2/atk/atkmm/streamablecontent.h +++ b/libs/gtkmm2/atk/atkmm/streamablecontent.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_STREAMABLECONTENT_H #define _ATKMM_STREAMABLECONTENT_H + #include /* $Id$ */ @@ -117,20 +118,34 @@ public: Glib::RefPtr 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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_mime_types_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const gchar* get_mime_type_vfunc(int i) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual GIOChannel* get_stream_vfunc(const Glib::ustring& mime_type); +#endif //GLIBMM_VFUNCS_ENABLED + public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -149,5 +164,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_STREAMABLECONTENT_H */ diff --git a/libs/gtkmm2/atk/atkmm/table.cc b/libs/gtkmm2/atk/atkmm/table.cc index 335fb55ece..c03cca5ac3 100644 --- a/libs/gtkmm2/atk/atkmm/table.cc +++ b/libs/gtkmm2/atk/atkmm/table.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -52,7 +53,8 @@ Glib::ArrayHandle Table::get_selected_rows() const namespace { -void Table_signal_row_inserted_callback(AtkTable* self, gint p0,gint p1,void* data) + +static void Table_signal_row_inserted_callback(AtkTable* self, gint p0,gint p1,void* data) { using namespace Atk; typedef sigc::slot< void,int,int > SlotType; @@ -60,21 +62,25 @@ void Table_signal_row_inserted_callback(AtkTable* self, gint p0,gint p1,void* da // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Table_signal_row_inserted_info = +static const Glib::SignalProxyInfo Table_signal_row_inserted_info = { "row_inserted", (GCallback) &Table_signal_row_inserted_callback, @@ -82,7 +88,7 @@ const Glib::SignalProxyInfo Table_signal_row_inserted_info = }; -void Table_signal_column_inserted_callback(AtkTable* self, gint p0,gint p1,void* data) +static void Table_signal_column_inserted_callback(AtkTable* self, gint p0,gint p1,void* data) { using namespace Atk; typedef sigc::slot< void,int,int > SlotType; @@ -90,21 +96,25 @@ void Table_signal_column_inserted_callback(AtkTable* self, gint p0,gint p1,void* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Table_signal_column_inserted_info = +static const Glib::SignalProxyInfo Table_signal_column_inserted_info = { "column_inserted", (GCallback) &Table_signal_column_inserted_callback, @@ -112,7 +122,7 @@ const Glib::SignalProxyInfo Table_signal_column_inserted_info = }; -void Table_signal_row_deleted_callback(AtkTable* self, gint p0,gint p1,void* data) +static void Table_signal_row_deleted_callback(AtkTable* self, gint p0,gint p1,void* data) { using namespace Atk; typedef sigc::slot< void,int,int > SlotType; @@ -120,21 +130,25 @@ void Table_signal_row_deleted_callback(AtkTable* self, gint p0,gint p1,void* dat // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Table_signal_row_deleted_info = +static const Glib::SignalProxyInfo Table_signal_row_deleted_info = { "row_deleted", (GCallback) &Table_signal_row_deleted_callback, @@ -142,7 +156,7 @@ const Glib::SignalProxyInfo Table_signal_row_deleted_info = }; -void Table_signal_column_deleted_callback(AtkTable* self, gint p0,gint p1,void* data) +static void Table_signal_column_deleted_callback(AtkTable* self, gint p0,gint p1,void* data) { using namespace Atk; typedef sigc::slot< void,int,int > SlotType; @@ -150,21 +164,25 @@ void Table_signal_column_deleted_callback(AtkTable* self, gint p0,gint p1,void* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Table_signal_column_deleted_info = +static const Glib::SignalProxyInfo Table_signal_column_deleted_info = { "column_deleted", (GCallback) &Table_signal_column_deleted_callback, @@ -172,7 +190,7 @@ const Glib::SignalProxyInfo Table_signal_column_deleted_info = }; -const Glib::SignalProxyInfo Table_signal_row_reordered_info = +static const Glib::SignalProxyInfo Table_signal_row_reordered_info = { "row_reordered", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -180,7 +198,7 @@ const Glib::SignalProxyInfo Table_signal_row_reordered_info = }; -const Glib::SignalProxyInfo Table_signal_column_reordered_info = +static const Glib::SignalProxyInfo Table_signal_column_reordered_info = { "column_reordered", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -188,13 +206,14 @@ const Glib::SignalProxyInfo Table_signal_column_reordered_info = }; -const Glib::SignalProxyInfo Table_signal_model_changed_info = +static const Glib::SignalProxyInfo Table_signal_model_changed_info = { "model_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -239,6 +258,7 @@ void Table_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; @@ -268,6 +288,9 @@ void Table_Class::iface_init_function(void* g_iface, void*) 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->row_inserted = &row_inserted_callback; klass->column_inserted = &column_inserted_callback; klass->row_deleted = &row_deleted_callback; @@ -275,8 +298,10 @@ void Table_Class::iface_init_function(void* g_iface, void*) klass->row_reordered = &row_reordered_callback; klass->column_reordered = &column_reordered_callback; klass->model_changed = &model_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED AtkObject* Table_Class::ref_at_vfunc_callback(AtkTable* self, gint row, gint column) { CppObjectType *const obj = dynamic_cast( @@ -289,17 +314,21 @@ AtkObject* Table_Class::ref_at_vfunc_callback(AtkTable* self, gint row, gint col // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap_copy(obj->get_at_vfunc(row , column )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -316,7 +345,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } - gint Table_Class::get_index_at_vfunc_callback(AtkTable* self, gint row, gint column) { CppObjectType *const obj = dynamic_cast( @@ -329,17 +357,21 @@ gint Table_Class::get_index_at_vfunc_callback(AtkTable* self, gint row, gint col // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_index_at_vfunc(row , column ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -356,7 +388,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Table_Class::get_column_at_index_vfunc_callback(AtkTable* self, gint index_) { CppObjectType *const obj = dynamic_cast( @@ -369,16 +400,20 @@ gint Table_Class::get_column_at_index_vfunc_callback(AtkTable* self, gint index_ // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_column_at_index_vfunc(index_ ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -395,7 +430,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Table_Class::get_row_at_index_vfunc_callback(AtkTable* self, gint index_) { CppObjectType *const obj = dynamic_cast( @@ -408,16 +442,20 @@ gint Table_Class::get_row_at_index_vfunc_callback(AtkTable* self, gint index_) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_row_at_index_vfunc(index_ ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -434,7 +472,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Table_Class::get_n_columns_vfunc_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -447,15 +484,19 @@ gint Table_Class::get_n_columns_vfunc_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_columns_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -472,7 +513,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Table_Class::get_n_rows_vfunc_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -485,15 +525,19 @@ gint Table_Class::get_n_rows_vfunc_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_rows_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -510,7 +554,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -523,17 +566,21 @@ gint Table_Class::get_column_extent_at_vfunc_callback(AtkTable* self, gint row, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_column_extent_at_vfunc(row , column ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -550,7 +597,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -563,17 +609,21 @@ gint Table_Class::get_row_extent_at_vfunc_callback(AtkTable* self, gint row, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_row_extent_at_vfunc(row , column ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -590,7 +640,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - AtkObject* Table_Class::get_caption_vfunc_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -603,15 +652,19 @@ AtkObject* Table_Class::get_caption_vfunc_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->get_caption_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -628,7 +681,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } - const gchar* Table_Class::get_column_description_vfunc_callback(AtkTable* self, gint column) { CppObjectType *const obj = dynamic_cast( @@ -641,16 +693,20 @@ const gchar* Table_Class::get_column_description_vfunc_callback(AtkTable* self, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_column_description_vfunc(column ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -667,7 +723,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef const gchar* RType; return RType(); } - AtkObject* Table_Class::get_column_header_vfunc_callback(AtkTable* self, gint column) { CppObjectType *const obj = dynamic_cast( @@ -680,16 +735,20 @@ AtkObject* Table_Class::get_column_header_vfunc_callback(AtkTable* self, gint co // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->get_column_header_vfunc(column )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -706,7 +765,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } - const gchar* Table_Class::get_row_description_vfunc_callback(AtkTable* self, gint row) { CppObjectType *const obj = dynamic_cast( @@ -719,16 +777,20 @@ const gchar* Table_Class::get_row_description_vfunc_callback(AtkTable* self, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_row_description_vfunc(row ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -745,7 +807,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef const gchar* RType; return RType(); } - AtkObject* Table_Class::get_row_header_vfunc_callback(AtkTable* self, gint row) { CppObjectType *const obj = dynamic_cast( @@ -758,16 +819,20 @@ AtkObject* Table_Class::get_row_header_vfunc_callback(AtkTable* self, gint row) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->get_row_header_vfunc(row )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -784,7 +849,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } - AtkObject* Table_Class::get_summary_vfunc_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -797,15 +861,19 @@ AtkObject* Table_Class::get_summary_vfunc_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return Glib::unwrap(obj->get_summary_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -822,7 +890,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkObject* RType; return RType(); } - void Table_Class::set_caption_vfunc_callback(AtkTable* self, AtkObject* caption) { CppObjectType *const obj = dynamic_cast( @@ -835,16 +902,20 @@ void Table_Class::set_caption_vfunc_callback(AtkTable* self, AtkObject* caption) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_caption_vfunc(Glib::wrap(caption, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -858,7 +929,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -871,17 +941,21 @@ void Table_Class::set_column_description_vfunc_callback(AtkTable* self, gint col // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_column_description_vfunc(column , description ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -895,7 +969,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -908,17 +981,21 @@ void Table_Class::set_column_header_vfunc_callback(AtkTable* self, gint column, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_column_header_vfunc(column , Glib::wrap(header, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -932,7 +1009,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -945,17 +1021,21 @@ void Table_Class::set_row_description_vfunc_callback(AtkTable* self, gint row, c // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_row_description_vfunc(row , description ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -969,7 +1049,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -982,17 +1061,21 @@ void Table_Class::set_row_header_vfunc_callback(AtkTable* self, gint row, AtkObj // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_row_header_vfunc(row , Glib::wrap(header, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1006,7 +1089,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->set_row_header)(self, row, header); } } - void Table_Class::set_summary_vfunc_callback(AtkTable* self, AtkObject* accessible) { CppObjectType *const obj = dynamic_cast( @@ -1019,16 +1101,20 @@ void Table_Class::set_summary_vfunc_callback(AtkTable* self, AtkObject* accessib // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_summary_vfunc(Glib::wrap(accessible, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1042,7 +1128,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->set_summary)(self, accessible); } } - gboolean Table_Class::is_column_selected_vfunc_callback(AtkTable* self, gint column) { CppObjectType *const obj = dynamic_cast( @@ -1055,16 +1140,20 @@ gboolean Table_Class::is_column_selected_vfunc_callback(AtkTable* self, gint col // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->is_column_selected_vfunc(column )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1081,7 +1170,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Table_Class::is_row_selected_vfunc_callback(AtkTable* self, gint row) { CppObjectType *const obj = dynamic_cast( @@ -1094,16 +1182,20 @@ gboolean Table_Class::is_row_selected_vfunc_callback(AtkTable* self, gint row) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->is_row_selected_vfunc(row )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1120,7 +1212,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Table_Class::is_selected_vfunc_callback(AtkTable* self, gint row, gint column) { CppObjectType *const obj = dynamic_cast( @@ -1133,17 +1224,21 @@ gboolean Table_Class::is_selected_vfunc_callback(AtkTable* self, gint row, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->is_selected_vfunc(row , column )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1160,7 +1255,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Table_Class::add_row_selection_vfunc_callback(AtkTable* self, gint row) { CppObjectType *const obj = dynamic_cast( @@ -1173,16 +1267,20 @@ gboolean Table_Class::add_row_selection_vfunc_callback(AtkTable* self, gint row) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->add_row_selection_vfunc(row )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1199,7 +1297,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Table_Class::remove_row_selection_vfunc_callback(AtkTable* self, gint row) { CppObjectType *const obj = dynamic_cast( @@ -1212,16 +1309,20 @@ gboolean Table_Class::remove_row_selection_vfunc_callback(AtkTable* self, gint r // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->remove_row_selection_vfunc(row )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1238,7 +1339,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Table_Class::add_column_selection_vfunc_callback(AtkTable* self, gint column) { CppObjectType *const obj = dynamic_cast( @@ -1251,16 +1351,20 @@ gboolean Table_Class::add_column_selection_vfunc_callback(AtkTable* self, gint c // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->add_column_selection_vfunc(column )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1277,7 +1381,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Table_Class::remove_column_selection_vfunc_callback(AtkTable* self, gint column) { CppObjectType *const obj = dynamic_cast( @@ -1290,16 +1393,20 @@ gboolean Table_Class::remove_column_selection_vfunc_callback(AtkTable* self, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->remove_column_selection_vfunc(column )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1316,7 +1423,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gint Table_Class::get_selected_columns_vfunc_callback(AtkTable* self, gint** selected) { CppObjectType *const obj = dynamic_cast( @@ -1329,16 +1435,20 @@ gint Table_Class::get_selected_columns_vfunc_callback(AtkTable* self, gint** sel // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_selected_columns_vfunc(selected ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1355,7 +1465,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Table_Class::get_selected_rows_vfunc_callback(AtkTable* self, gint** selected) { CppObjectType *const obj = dynamic_cast( @@ -1368,16 +1477,20 @@ gint Table_Class::get_selected_rows_vfunc_callback(AtkTable* self, gint** select // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_selected_rows_vfunc(selected ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1394,8 +1507,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Table_Class::row_inserted_callback(AtkTable* self, gint p0, gint p1) { CppObjectType *const obj = dynamic_cast( @@ -1408,17 +1522,21 @@ void Table_Class::row_inserted_callback(AtkTable* self, gint p0, gint p1) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_row_inserted(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1432,7 +1550,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->row_inserted)(self, p0, p1); } } - void Table_Class::column_inserted_callback(AtkTable* self, gint p0, gint p1) { CppObjectType *const obj = dynamic_cast( @@ -1445,17 +1562,21 @@ void Table_Class::column_inserted_callback(AtkTable* self, gint p0, gint p1) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_column_inserted(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1469,7 +1590,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->column_inserted)(self, p0, p1); } } - void Table_Class::row_deleted_callback(AtkTable* self, gint p0, gint p1) { CppObjectType *const obj = dynamic_cast( @@ -1482,17 +1602,21 @@ void Table_Class::row_deleted_callback(AtkTable* self, gint p0, gint p1) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_row_deleted(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1506,7 +1630,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->row_deleted)(self, p0, p1); } } - void Table_Class::column_deleted_callback(AtkTable* self, gint p0, gint p1) { CppObjectType *const obj = dynamic_cast( @@ -1519,17 +1642,21 @@ void Table_Class::column_deleted_callback(AtkTable* self, gint p0, gint p1) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_column_deleted(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1543,7 +1670,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->column_deleted)(self, p0, p1); } } - void Table_Class::row_reordered_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -1556,15 +1682,19 @@ void Table_Class::row_reordered_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_row_reordered(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1578,7 +1708,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->row_reordered)(self); } } - void Table_Class::column_reordered_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -1591,15 +1720,19 @@ void Table_Class::column_reordered_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_column_reordered(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1613,7 +1746,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->column_reordered)(self); } } - void Table_Class::model_changed_callback(AtkTable* self) { CppObjectType *const obj = dynamic_cast( @@ -1626,15 +1758,19 @@ void Table_Class::model_changed_callback(AtkTable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_model_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1648,6 +1784,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->model_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Table_Class::wrap_new(GObject* object) @@ -1734,20 +1871,15 @@ Glib::RefPtr Table::get_caption() { Glib::RefPtr 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 Table::get_caption() const { - - Glib::RefPtr retvalue = Glib::wrap(atk_table_get_caption(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_caption(); } Glib::ustring Table::get_column_description(int column) const @@ -1759,20 +1891,15 @@ Glib::RefPtr Table::get_column_header(int column) { Glib::RefPtr 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 Table::get_column_header(int column) const { - - Glib::RefPtr retvalue = Glib::wrap(atk_table_get_column_header(const_cast(gobj()), column)); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_column_header(column); } Glib::ustring Table::get_row_description(int row) const @@ -1784,70 +1911,60 @@ Glib::RefPtr Table::get_row_header(int row) { Glib::RefPtr 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 Table::get_row_header(int row) const { - - Glib::RefPtr retvalue = Glib::wrap(atk_table_get_row_header(const_cast(gobj()), row)); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_row_header(row); } Glib::RefPtr Table::get_summary() { Glib::RefPtr 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 Table::get_summary() const { - - Glib::RefPtr retvalue = Glib::wrap(atk_table_get_summary(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_summary(); } void Table::set_caption(const Glib::RefPtr& caption) { - atk_table_set_caption(gobj(), Glib::unwrap(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()); +atk_table_set_column_description(gobj(), column, description.c_str()); } void Table::set_column_header(int column, const Glib::RefPtr& header) { - atk_table_set_column_header(gobj(), column, Glib::unwrap(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()); +atk_table_set_row_description(gobj(), row, description.c_str()); } void Table::set_row_header(int row, const Glib::RefPtr& header) { - atk_table_set_row_header(gobj(), row, Glib::unwrap(header)); +atk_table_set_row_header(gobj(), row, Glib::unwrap(header)); } void Table::set_summary(const Glib::RefPtr& accessible) { - atk_table_set_summary(gobj(), Glib::unwrap(accessible)); +atk_table_set_summary(gobj(), Glib::unwrap(accessible)); } bool Table::is_column_selected(int column) const @@ -1891,37 +2008,44 @@ 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Atk::Table::on_row_inserted(int row, int num_inserted) { BaseClassType *const base = static_cast( @@ -1932,7 +2056,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1943,7 +2066,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1954,7 +2076,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1965,7 +2086,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->column_deleted) (*base->column_deleted)(gobj(),column,num_deleted); } - void Atk::Table::on_row_reordered() { BaseClassType *const base = static_cast( @@ -1976,7 +2096,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->row_reordered) (*base->row_reordered)(gobj()); } - void Atk::Table::on_column_reordered() { BaseClassType *const base = static_cast( @@ -1987,7 +2106,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->column_reordered) (*base->column_reordered)(gobj()); } - void Atk::Table::on_model_changed() { BaseClassType *const base = static_cast( @@ -1998,8 +2116,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->model_changed) (*base->model_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED Glib::RefPtr Atk::Table::get_at_vfunc(int row, int column) { BaseClassType *const base = static_cast( @@ -2013,7 +2132,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::RefPtr RType; return RType(); } - int Atk::Table::get_index_at_vfunc(int row, int column) const { BaseClassType *const base = static_cast( @@ -2027,7 +2145,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_column_at_index_vfunc(int index) const { BaseClassType *const base = static_cast( @@ -2041,7 +2158,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_row_at_index_vfunc(int index) const { BaseClassType *const base = static_cast( @@ -2055,7 +2171,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_n_columns_vfunc() const { BaseClassType *const base = static_cast( @@ -2069,7 +2184,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_n_rows_vfunc() const { BaseClassType *const base = static_cast( @@ -2083,7 +2197,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_column_extent_at_vfunc(int row, int column) const { BaseClassType *const base = static_cast( @@ -2097,7 +2210,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_row_extent_at_vfunc(int row, int column) const { BaseClassType *const base = static_cast( @@ -2111,7 +2223,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - Glib::RefPtr Atk::Table::get_caption_vfunc() { BaseClassType *const base = static_cast( @@ -2120,12 +2231,11 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / ) ); if(base && base->get_caption) - return Glib::wrap((*base->get_caption)(gobj())); + return Glib::wrap((*base->get_caption)(gobj()), true); typedef Glib::RefPtr RType; return RType(); } - const char* Atk::Table::get_column_description_vfunc(int column) const { BaseClassType *const base = static_cast( @@ -2139,7 +2249,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const char* RType; return RType(); } - Glib::RefPtr Atk::Table::get_column_header_vfunc(int column) { BaseClassType *const base = static_cast( @@ -2148,12 +2257,11 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / ) ); if(base && base->get_column_header) - return Glib::wrap((*base->get_column_header)(gobj(),column)); + return Glib::wrap((*base->get_column_header)(gobj(),column), true); typedef Glib::RefPtr RType; return RType(); } - const char* Atk::Table::get_row_description_vfunc(int row) const { BaseClassType *const base = static_cast( @@ -2167,7 +2275,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef const char* RType; return RType(); } - Glib::RefPtr Atk::Table::get_row_header_vfunc(int row) { BaseClassType *const base = static_cast( @@ -2176,12 +2283,11 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / ) ); if(base && base->get_row_header) - return Glib::wrap((*base->get_row_header)(gobj(),row)); + return Glib::wrap((*base->get_row_header)(gobj(),row), true); typedef Glib::RefPtr RType; return RType(); } - Glib::RefPtr Atk::Table::get_summary_vfunc() { BaseClassType *const base = static_cast( @@ -2190,12 +2296,11 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / ) ); if(base && base->get_summary) - return Glib::wrap((*base->get_summary)(gobj())); + return Glib::wrap((*base->get_summary)(gobj()), true); typedef Glib::RefPtr RType; return RType(); } - void Atk::Table::set_caption_vfunc(const Glib::RefPtr& caption) { BaseClassType *const base = static_cast( @@ -2206,7 +2311,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -2217,7 +2321,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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& header) { BaseClassType *const base = static_cast( @@ -2228,7 +2331,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -2239,7 +2341,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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& header) { BaseClassType *const base = static_cast( @@ -2250,7 +2351,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->set_row_header) (*base->set_row_header)(gobj(),row,Glib::unwrap(header)); } - void Atk::Table::set_summary_vfunc(const Glib::RefPtr& accessible) { BaseClassType *const base = static_cast( @@ -2261,7 +2361,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -2275,7 +2374,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Table::is_row_selected_vfunc(int row) const { BaseClassType *const base = static_cast( @@ -2289,7 +2387,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Table::is_selected_vfunc(int row, int column) const { BaseClassType *const base = static_cast( @@ -2303,7 +2400,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Table::add_row_selection_vfunc(int row) { BaseClassType *const base = static_cast( @@ -2317,7 +2413,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Table::remove_row_selection_vfunc(int row) { BaseClassType *const base = static_cast( @@ -2331,7 +2426,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Table::add_column_selection_vfunc(int column) { BaseClassType *const base = static_cast( @@ -2345,7 +2439,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Table::remove_column_selection_vfunc(int column) { BaseClassType *const base = static_cast( @@ -2359,7 +2452,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - int Atk::Table::get_selected_columns_vfunc(int** selected) const { BaseClassType *const base = static_cast( @@ -2373,7 +2465,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Table::get_selected_rows_vfunc(int** selected) const { BaseClassType *const base = static_cast( @@ -2387,6 +2478,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/table.h b/libs/gtkmm2/atk/atkmm/table.h index f1936afd49..c5b351f06a 100644 --- a/libs/gtkmm2/atk/atkmm/table.h +++ b/libs/gtkmm2/atk/atkmm/table.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_TABLE_H #define _ATKMM_TABLE_H + #include /* $Id$ */ @@ -336,68 +337,194 @@ public: bool remove_column_selection(int column); +/** + * @par Prototype: + * void %row_inserted(int row, int num_inserted) + */ + Glib::SignalProxy2< void,int,int > signal_row_inserted(); +/** + * @par Prototype: + * void %column_inserted(int column, int num_inserted) + */ + Glib::SignalProxy2< void,int,int > signal_column_inserted(); +/** + * @par Prototype: + * void %row_deleted(int row, int num_deleted) + */ + Glib::SignalProxy2< void,int,int > signal_row_deleted(); +/** + * @par Prototype: + * void %column_deleted(int column, int num_deleted) + */ + Glib::SignalProxy2< void,int,int > signal_column_deleted(); +/** + * @par Prototype: + * void %row_reordered() + */ + Glib::SignalProxy0< void > signal_row_reordered(); +/** + * @par Prototype: + * void %column_reordered() + */ + Glib::SignalProxy0< void > signal_column_reordered(); +/** + * @par Prototype: + * void %model_changed() + */ + Glib::SignalProxy0< void > signal_model_changed(); protected: - virtual Glib::RefPtr 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 get_caption_vfunc(); - virtual const char* get_column_description_vfunc(int column) const; - virtual Glib::RefPtr get_column_header_vfunc(int column); - virtual const char* get_row_description_vfunc(int row) const; - virtual Glib::RefPtr get_row_header_vfunc(int row); - virtual Glib::RefPtr get_summary_vfunc(); - virtual void set_caption_vfunc(const Glib::RefPtr& caption); - virtual void set_column_description_vfunc(int column, const char* description); - virtual void set_column_header_vfunc(int column, const Glib::RefPtr& header); - virtual void set_row_description_vfunc(int row, const char* description); - virtual void set_row_header_vfunc(int row, const Glib::RefPtr& header); - virtual void set_summary_vfunc(const Glib::RefPtr& 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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_at_vfunc(int row, int column); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_index_at_vfunc(int row, int column) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_column_at_index_vfunc(int index) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_row_at_index_vfunc(int index) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_columns_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_rows_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_column_extent_at_vfunc(int row, int column) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_row_extent_at_vfunc(int row, int column) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_caption_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const char* get_column_description_vfunc(int column) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_column_header_vfunc(int column); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual const char* get_row_description_vfunc(int row) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_row_header_vfunc(int row); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::RefPtr get_summary_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_caption_vfunc(const Glib::RefPtr& caption); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_column_description_vfunc(int column, const char* description); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_column_header_vfunc(int column, const Glib::RefPtr& header); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_row_description_vfunc(int row, const char* description); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_row_header_vfunc(int row, const Glib::RefPtr& header); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_summary_vfunc(const Glib::RefPtr& accessible); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool is_column_selected_vfunc(int column) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool is_row_selected_vfunc(int row) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool is_selected_vfunc(int row, int column) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool add_row_selection_vfunc(int row); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool remove_row_selection_vfunc(int row); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool add_column_selection_vfunc(int column); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool remove_column_selection_vfunc(int column); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_selected_columns_vfunc(int** selected) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_selected_rows_vfunc(int** selected) const; +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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); @@ -405,6 +532,7 @@ protected: virtual void on_row_reordered(); virtual void on_column_reordered(); virtual void on_model_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -423,5 +551,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_TABLE_H */ diff --git a/libs/gtkmm2/atk/atkmm/text.cc b/libs/gtkmm2/atk/atkmm/text.cc index af101a5117..1212ce18ff 100644 --- a/libs/gtkmm2/atk/atkmm/text.cc +++ b/libs/gtkmm2/atk/atkmm/text.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -119,7 +120,8 @@ Glib::ustring TextAttribute::get_value(TextAttribute attribute, int index) namespace { -void Text_signal_text_changed_callback(AtkText* self, gint p0,gint p1,void* data) + +static void Text_signal_text_changed_callback(AtkText* self, gint p0,gint p1,void* data) { using namespace Atk; typedef sigc::slot< void,int,int > SlotType; @@ -127,21 +129,25 @@ void Text_signal_text_changed_callback(AtkText* self, gint p0,gint p1,void* data // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Text_signal_text_changed_info = +static const Glib::SignalProxyInfo Text_signal_text_changed_info = { "text_changed", (GCallback) &Text_signal_text_changed_callback, @@ -149,7 +155,7 @@ const Glib::SignalProxyInfo Text_signal_text_changed_info = }; -void Text_signal_text_caret_moved_callback(AtkText* self, gint p0,void* data) +static void Text_signal_text_caret_moved_callback(AtkText* self, gint p0,void* data) { using namespace Atk; typedef sigc::slot< void,int > SlotType; @@ -157,20 +163,24 @@ void Text_signal_text_caret_moved_callback(AtkText* self, gint p0,void* data) // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Text_signal_text_caret_moved_info = +static const Glib::SignalProxyInfo Text_signal_text_caret_moved_info = { "text_caret_moved", (GCallback) &Text_signal_text_caret_moved_callback, @@ -178,7 +188,7 @@ const Glib::SignalProxyInfo Text_signal_text_caret_moved_info = }; -const Glib::SignalProxyInfo Text_signal_text_selection_changed_info = +static const Glib::SignalProxyInfo Text_signal_text_selection_changed_info = { "text_selection_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -186,13 +196,14 @@ const Glib::SignalProxyInfo Text_signal_text_selection_changed_info = }; -const Glib::SignalProxyInfo Text_signal_text_attributes_changed_info = +static 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 @@ -200,16 +211,16 @@ namespace Atk { -Glib::ustring Attribute::get_name() const + Glib::ustring Attribute::get_name() const { return Glib::convert_const_gchar_ptr_to_ustring(gobj()->name); } - -Glib::ustring Attribute::get_value() const + + Glib::ustring Attribute::get_value() const { return Glib::convert_const_gchar_ptr_to_ustring(gobj()->value); } - + } // namespace Atk @@ -273,6 +284,7 @@ void Text_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; @@ -290,12 +302,17 @@ void Text_Class::iface_init_function(void* g_iface, void*) klass->remove_selection = &remove_selection_vfunc_callback; klass->set_selection = &set_selection_vfunc_callback; klass->set_caret_offset = &set_caret_offset_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED gchar* Text_Class::get_text_vfunc_callback(AtkText* self, gint start_offset, gint end_offset) { CppObjectType *const obj = dynamic_cast( @@ -308,17 +325,21 @@ gchar* Text_Class::get_text_vfunc_callback(AtkText* self, gint start_offset, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return g_strdup((obj->get_text_vfunc(start_offset , end_offset )).c_str()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -335,7 +356,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gchar* RType; return RType(); } - gunichar Text_Class::get_character_at_offset_vfunc_callback(AtkText* self, gint offset) { CppObjectType *const obj = dynamic_cast( @@ -348,16 +368,20 @@ gunichar Text_Class::get_character_at_offset_vfunc_callback(AtkText* self, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_character_at_offset_vfunc(offset ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -374,7 +398,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -387,19 +410,23 @@ gchar* Text_Class::get_text_after_offset_vfunc_callback(AtkText* self, gint offs // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -416,7 +443,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -429,19 +455,23 @@ gchar* Text_Class::get_text_at_offset_vfunc_callback(AtkText* self, gint offset, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -458,7 +488,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -471,19 +500,23 @@ gchar* Text_Class::get_text_before_offset_vfunc_callback(AtkText* self, gint off // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -500,7 +533,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gchar* RType; return RType(); } - gint Text_Class::get_caret_offset_vfunc_callback(AtkText* self) { CppObjectType *const obj = dynamic_cast( @@ -513,15 +545,19 @@ gint Text_Class::get_caret_offset_vfunc_callback(AtkText* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_caret_offset_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -538,7 +574,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -551,8 +586,10 @@ void Text_Class::get_character_extents_vfunc_callback(AtkText* self, gint offset // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_character_extents_vfunc(offset , *(x) @@ -561,11 +598,13 @@ void Text_Class::get_character_extents_vfunc_callback(AtkText* self, gint offset , *(height) , ((CoordType)(coords)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -579,7 +618,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -592,18 +630,22 @@ AtkAttributeSet* Text_Class::get_run_attributes_vfunc_callback(AtkText* self, gi // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_run_attributes_vfunc(offset , *(start_offset) , *(end_offset) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -620,7 +662,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkAttributeSet* RType; return RType(); } - AtkAttributeSet* Text_Class::get_default_attributes_vfunc_callback(AtkText* self) { CppObjectType *const obj = dynamic_cast( @@ -633,15 +674,19 @@ AtkAttributeSet* Text_Class::get_default_attributes_vfunc_callback(AtkText* self // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_default_attributes_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -658,7 +703,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef AtkAttributeSet* RType; return RType(); } - gint Text_Class::get_character_count_vfunc_callback(AtkText* self) { CppObjectType *const obj = dynamic_cast( @@ -671,15 +715,19 @@ gint Text_Class::get_character_count_vfunc_callback(AtkText* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_character_count_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -696,7 +744,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -709,18 +756,22 @@ gint Text_Class::get_offset_at_point_vfunc_callback(AtkText* self, gint x, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_offset_at_point_vfunc(x , y , ((CoordType)(coords)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -737,7 +788,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } - gint Text_Class::get_n_selections_vfunc_callback(AtkText* self) { CppObjectType *const obj = dynamic_cast( @@ -750,15 +800,19 @@ gint Text_Class::get_n_selections_vfunc_callback(AtkText* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_n_selections_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -775,7 +829,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -788,18 +841,22 @@ gchar* Text_Class::get_selection_vfunc_callback(AtkText* self, gint selection_nu // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -816,7 +873,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -829,17 +885,21 @@ gboolean Text_Class::add_selection_vfunc_callback(AtkText* self, gint start_offs // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->add_selection_vfunc(start_offset , end_offset )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -856,7 +916,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Text_Class::remove_selection_vfunc_callback(AtkText* self, gint selection_num) { CppObjectType *const obj = dynamic_cast( @@ -869,16 +928,20 @@ gboolean Text_Class::remove_selection_vfunc_callback(AtkText* self, gint selecti // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->remove_selection_vfunc(selection_num )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -895,7 +958,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -908,18 +970,22 @@ gboolean Text_Class::set_selection_vfunc_callback(AtkText* self, gint selection_ // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_selection_vfunc(selection_num , start_offset , end_offset )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -936,7 +1002,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - gboolean Text_Class::set_caret_offset_vfunc_callback(AtkText* self, gint offset) { CppObjectType *const obj = dynamic_cast( @@ -949,16 +1014,20 @@ gboolean Text_Class::set_caret_offset_vfunc_callback(AtkText* self, gint offset) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_caret_offset_vfunc(offset )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -975,8 +1044,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Text_Class::text_changed_callback(AtkText* self, gint p0, gint p1) { CppObjectType *const obj = dynamic_cast( @@ -989,17 +1059,21 @@ void Text_Class::text_changed_callback(AtkText* self, gint p0, gint p1) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_text_changed(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1013,7 +1087,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->text_changed)(self, p0, p1); } } - void Text_Class::text_caret_moved_callback(AtkText* self, gint p0) { CppObjectType *const obj = dynamic_cast( @@ -1026,16 +1099,20 @@ void Text_Class::text_caret_moved_callback(AtkText* self, gint p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_text_caret_moved(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1049,7 +1126,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->text_caret_moved)(self, p0); } } - void Text_Class::text_selection_changed_callback(AtkText* self) { CppObjectType *const obj = dynamic_cast( @@ -1062,15 +1138,19 @@ void Text_Class::text_selection_changed_callback(AtkText* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_text_selection_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1084,7 +1164,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->text_selection_changed)(self); } } - void Text_Class::text_attributes_changed_callback(AtkText* self) { CppObjectType *const obj = dynamic_cast( @@ -1097,15 +1176,19 @@ void Text_Class::text_attributes_changed_callback(AtkText* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_text_attributes_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -1119,6 +1202,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->text_attributes_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Text_Class::wrap_new(GObject* object) @@ -1192,7 +1276,7 @@ int Text::get_caret_offset() const 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(gobj()), offset, &x, &y, &width, &height, ((AtkCoordType)(coords))); +atk_text_get_character_extents(const_cast(gobj()), offset, &x, &y, &width, &height, ((AtkCoordType)(coords))); } AttributeSet Text::get_run_attributes(int offset, int& start_offset, int& end_offset) const @@ -1247,7 +1331,7 @@ bool Text::set_caret_offset(int 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)); +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) @@ -1261,22 +1345,26 @@ 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Atk::Text::on_text_changed(int position, int length) { BaseClassType *const base = static_cast( @@ -1287,7 +1375,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1298,7 +1385,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->text_caret_moved) (*base->text_caret_moved)(gobj(),location); } - void Atk::Text::on_text_selection_changed() { BaseClassType *const base = static_cast( @@ -1309,7 +1395,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->text_selection_changed) (*base->text_selection_changed)(gobj()); } - void Atk::Text::on_text_attributes_changed() { BaseClassType *const base = static_cast( @@ -1320,8 +1405,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->text_attributes_changed) (*base->text_attributes_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED Glib::ustring Atk::Text::get_text_vfunc(int start_offset, int end_offset) const { BaseClassType *const base = static_cast( @@ -1335,7 +1421,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::ustring RType; return RType(); } - gunichar Atk::Text::get_character_at_offset_vfunc(int offset) const { BaseClassType *const base = static_cast( @@ -1349,7 +1434,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1363,7 +1447,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1377,7 +1460,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1391,7 +1473,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::ustring RType; return RType(); } - int Atk::Text::get_caret_offset_vfunc() const { BaseClassType *const base = static_cast( @@ -1405,7 +1486,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1416,7 +1496,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_character_extents) (*base->get_character_extents)(const_cast(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( @@ -1430,7 +1509,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef AtkAttributeSet* RType; return RType(); } - AtkAttributeSet* Atk::Text::get_default_attributes_vfunc() const { BaseClassType *const base = static_cast( @@ -1444,7 +1522,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef AtkAttributeSet* RType; return RType(); } - int Atk::Text::get_character_count_vfunc() const { BaseClassType *const base = static_cast( @@ -1458,7 +1535,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1472,7 +1548,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } - int Atk::Text::get_n_selections_vfunc() const { BaseClassType *const base = static_cast( @@ -1486,7 +1561,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1500,7 +1574,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::ustring RType; return RType(); } - bool Atk::Text::add_selection_vfunc(int start_offset, int end_offset) { BaseClassType *const base = static_cast( @@ -1514,7 +1587,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Text::remove_selection_vfunc(int selection_num) { BaseClassType *const base = static_cast( @@ -1528,7 +1600,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -1542,7 +1613,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - bool Atk::Text::set_caret_offset_vfunc(int offset) { BaseClassType *const base = static_cast( @@ -1556,6 +1626,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/text.h b/libs/gtkmm2/atk/atkmm/text.h index 86dee7ee39..01d10f4658 100644 --- a/libs/gtkmm2/atk/atkmm/text.h +++ b/libs/gtkmm2/atk/atkmm/text.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_TEXT_H #define _ATKMM_TEXT_H + #include /* $Id$ */ @@ -62,9 +63,9 @@ public: void swap(Attribute& other); - Glib::ustring get_name() const; - Glib::ustring get_value() const; - + Glib::ustring get_name() const; + Glib::ustring get_value() const; + /// Provides access to the underlying C GObject. AtkAttribute* gobj() { return &gobject_; } @@ -374,7 +375,8 @@ public: * @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. + * @param end_offset The offset of the first character after the + * returned substring. * @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; @@ -426,7 +428,8 @@ public: * @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. + * @param end_offset The offset of the first character after the + * returned substring. * @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; @@ -476,7 +479,8 @@ public: * @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. + * @param end_offset The offset of the first character after the + * returned substring. * @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; @@ -549,14 +553,15 @@ public: * 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. + * @param end_offset Passes back the end position of (e.g. offset immediately past) + * 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. + * @param end_offset The offset of the first character after the selected region. * @return true if success, false otherwise. */ bool add_selection(int start_offset, int end_offset); @@ -578,7 +583,8 @@ public: * 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. + * @param end_offset The new end position of (e.g. offset immediately past) + * the selection. * @return true if success, false otherwise. */ bool set_selection(int selection_num, int start_offset, int end_offset); @@ -616,38 +622,109 @@ public: TextClipType x_clip_type, TextClipType y_clip_type); +/** + * @par Prototype: + * void %text_changed(int position, int length) + */ + Glib::SignalProxy2< void,int,int > signal_text_changed(); +/** + * @par Prototype: + * void %text_caret_moved(int location) + */ + Glib::SignalProxy1< void,int > signal_text_caret_moved(); +/** + * @par Prototype: + * void %text_selection_changed() + */ + Glib::SignalProxy0< void > signal_text_selection_changed(); +/** + * @par Prototype: + * void %text_attributes_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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::ustring get_text_vfunc(int start_offset, int end_offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual gunichar get_character_at_offset_vfunc(int offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::ustring get_text_after_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::ustring get_text_at_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::ustring get_text_before_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_caret_offset_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_character_extents_vfunc(int offset, int& x, int& y, int& width, int& height, CoordType coords) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual AtkAttributeSet* get_run_attributes_vfunc(int offset, int& start_offset, int& end_offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual AtkAttributeSet* get_default_attributes_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_character_count_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_offset_at_point_vfunc(int x, int y, CoordType coords) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_n_selections_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::ustring get_selection_vfunc(int selection_num, int& start_offset, int& end_offset) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool add_selection_vfunc(int start_offset, int end_offset); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool remove_selection_vfunc(int selection_num); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_selection_vfunc(int selection_num, int start_offset, int end_offset); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_caret_offset_vfunc(int offset); +#endif //GLIBMM_VFUNCS_ENABLED + //TODO: Add get_range_extents(), and get_bounded_ranges() vfuncs when we can break ABI. @@ -656,15 +733,21 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -683,5 +766,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_TEXT_H */ diff --git a/libs/gtkmm2/atk/atkmm/value.cc b/libs/gtkmm2/atk/atkmm/value.cc index eeff7dfd2f..3a92b2df12 100644 --- a/libs/gtkmm2/atk/atkmm/value.cc +++ b/libs/gtkmm2/atk/atkmm/value.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -72,12 +73,18 @@ void Value_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void Value_Class::get_current_value_vfunc_callback(AtkValue* self, GValue* value) { CppObjectType *const obj = dynamic_cast( @@ -90,16 +97,20 @@ void Value_Class::get_current_value_vfunc_callback(AtkValue* self, GValue* value // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_current_value_vfunc(*reinterpret_cast(value) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -113,7 +124,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->get_current_value)(self, value); } } - void Value_Class::get_maximum_value_vfunc_callback(AtkValue* self, GValue* value) { CppObjectType *const obj = dynamic_cast( @@ -126,16 +136,20 @@ void Value_Class::get_maximum_value_vfunc_callback(AtkValue* self, GValue* value // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_maximum_value_vfunc(*reinterpret_cast(value) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -149,7 +163,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->get_maximum_value)(self, value); } } - void Value_Class::get_minimum_value_vfunc_callback(AtkValue* self, GValue* value) { CppObjectType *const obj = dynamic_cast( @@ -162,16 +175,20 @@ void Value_Class::get_minimum_value_vfunc_callback(AtkValue* self, GValue* value // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_minimum_value_vfunc(*reinterpret_cast(value) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -185,7 +202,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->get_minimum_value)(self, value); } } - gboolean Value_Class::set_current_value_vfunc_callback(AtkValue* self, const GValue* value) { CppObjectType *const obj = dynamic_cast( @@ -198,16 +214,20 @@ gboolean Value_Class::set_current_value_vfunc_callback(AtkValue* self, const GVa // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->set_current_value_vfunc(*reinterpret_cast(value) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -224,6 +244,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Value_Class::wrap_new(GObject* object) @@ -268,17 +292,17 @@ GType Value::get_base_type() void Value::get_current_value(Glib::ValueBase& value) const { - atk_value_get_current_value(const_cast(gobj()), (value).gobj()); +atk_value_get_current_value(const_cast(gobj()), (value).gobj()); } void Value::get_maximum_value(Glib::ValueBase& value) const { - atk_value_get_maximum_value(const_cast(gobj()), (value).gobj()); +atk_value_get_maximum_value(const_cast(gobj()), (value).gobj()); } void Value::get_minimum_value(Glib::ValueBase& value) const { - atk_value_get_minimum_value(const_cast(gobj()), (value).gobj()); +atk_value_get_minimum_value(const_cast(gobj()), (value).gobj()); } bool Value::set_current_value(const Glib::ValueBase& value) @@ -287,6 +311,10 @@ bool Value::set_current_value(const Glib::ValueBase& value) } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED void Atk::Value::get_current_value_vfunc(Glib::ValueBase& value) const { BaseClassType *const base = static_cast( @@ -297,7 +325,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_current_value) (*base->get_current_value)(const_cast(gobj()),(value).gobj()); } - void Atk::Value::get_maximum_value_vfunc(Glib::ValueBase& value) const { BaseClassType *const base = static_cast( @@ -308,7 +335,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_maximum_value) (*base->get_maximum_value)(const_cast(gobj()),(value).gobj()); } - void Atk::Value::get_minimum_value_vfunc(Glib::ValueBase& value) const { BaseClassType *const base = static_cast( @@ -319,7 +345,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->get_minimum_value) (*base->get_minimum_value)(const_cast(gobj()),(value).gobj()); } - bool Atk::Value::set_current_value_vfunc(const Glib::ValueBase& value) { BaseClassType *const base = static_cast( @@ -333,6 +358,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Atk diff --git a/libs/gtkmm2/atk/atkmm/value.h b/libs/gtkmm2/atk/atkmm/value.h index 25615dd92e..92f2e487fd 100644 --- a/libs/gtkmm2/atk/atkmm/value.h +++ b/libs/gtkmm2/atk/atkmm/value.h @@ -3,6 +3,7 @@ #ifndef _ATKMM_VALUE_H #define _ATKMM_VALUE_H + #include /* $Id$ */ @@ -120,21 +121,38 @@ public: 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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_current_value_vfunc(Glib::ValueBase& value) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_maximum_value_vfunc(Glib::ValueBase& value) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_minimum_value_vfunc(Glib::ValueBase& value) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool set_current_value_vfunc(const Glib::ValueBase& value); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -153,5 +171,6 @@ namespace Glib } // namespace Glib + #endif /* _ATKMM_VALUE_H */ diff --git a/libs/gtkmm2/gdk/SConscript b/libs/gtkmm2/gdk/SConscript index 6ea5c7cfef..5f86edb043 100644 --- a/libs/gtkmm2/gdk/SConscript +++ b/libs/gtkmm2/gdk/SConscript @@ -8,8 +8,8 @@ gdkmm2_files = glob.glob('gdkmm/*.cc') Import('env libraries install_prefix') gdkmm2 = env.Copy() -gdkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm']]) -gdkmm2.Append(CXXFLAGS="-Ilibs/gtkmm2/gtk") +gdkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['cairomm']]) +gdkmm2.Append(CXXFLAGS=["-Ilibs/gtkmm2/gtk", "-DGLIBMM_EXCEPTIONS_ENABLED"]) libgdkmm2 = gdkmm2.SharedLibrary('gdkmm2', gdkmm2_files) Default(libgdkmm2) diff --git a/libs/gtkmm2/gdk/gdkmm/bitmap.cc b/libs/gtkmm2/gdk/gdkmm/bitmap.cc index 27063537a6..d50b48945e 100644 --- a/libs/gtkmm2/gdk/gdkmm/bitmap.cc +++ b/libs/gtkmm2/gdk/gdkmm/bitmap.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include diff --git a/libs/gtkmm2/gdk/gdkmm/bitmap.h b/libs/gtkmm2/gdk/gdkmm/bitmap.h index 57dc9fb087..4f6728e721 100644 --- a/libs/gtkmm2/gdk/gdkmm/bitmap.h +++ b/libs/gtkmm2/gdk/gdkmm/bitmap.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_BITMAP_H #define _GDKMM_BITMAP_H + #include /* $Id$ */ diff --git a/libs/gtkmm2/gdk/gdkmm/color.cc b/libs/gtkmm2/gdk/gdkmm/color.cc index 06c8e70cf5..1d95cff54e 100644 --- a/libs/gtkmm2/gdk/gdkmm/color.cc +++ b/libs/gtkmm2/gdk/gdkmm/color.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -151,10 +152,14 @@ bool Color::set(const Glib::ustring& value) return gdk_color_parse(value.c_str(), gobj()); } +#ifndef GDKMM_DISABLE_DEPRECATED + bool Color::parse(const Glib::ustring& spec) { return set(spec); } +#endif // GDKMM_DISABLE_DEPRECATED + gushort Color::get_red() const { diff --git a/libs/gtkmm2/gdk/gdkmm/color.h b/libs/gtkmm2/gdk/gdkmm/color.h index c40ff67f25..167152d1fa 100644 --- a/libs/gtkmm2/gdk/gdkmm/color.h +++ b/libs/gtkmm2/gdk/gdkmm/color.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_COLOR_H #define _GDKMM_COLOR_H + #include /* $Id$ */ @@ -126,12 +127,14 @@ public: */ bool set(const Glib::ustring& value); - #ifndef GDKMM_DEPRECATED + #ifndef GDKMM_DISABLE_DEPRECATED + /** * @deprecated See set(). */ bool parse(const Glib::ustring& spec); - #endif //GDKMM_DEPRECATED + #endif // GDKMM_DISABLE_DEPRECATED + /** Get the red component of the color. * @result The red component of the color. @@ -270,5 +273,6 @@ class Value : public Glib::Value_Boxed } // namespace Glib + #endif /* _GDKMM_COLOR_H */ diff --git a/libs/gtkmm2/gdk/gdkmm/colormap.cc b/libs/gtkmm2/gdk/gdkmm/colormap.cc index af2d64aec1..64670009b3 100644 --- a/libs/gtkmm2/gdk/gdkmm/colormap.cc +++ b/libs/gtkmm2/gdk/gdkmm/colormap.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -34,7 +35,26 @@ Colormap::Colormap(const Glib::RefPtr& visual, bool allocate) : Glib::Object( G_OBJECT( gdk_colormap_new(visual->gobj(), (gboolean)allocate) ) ) {} -} /* namespace Gdk */ +#ifndef GDKMM_DISABLE_DEPRECATED + +int Colormap::alloc_colors(ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle& success) +{ + return gdk_colormap_alloc_colors(gobj(), const_cast(colors.data()), ncolors, static_cast(writeable), static_cast(best_match), (gboolean*)(success.data())); +} + +void Colormap::free_colors(Color& colors, int ncolors) +{ + gdk_colormap_free_colors(gobj(), (colors).gobj(), ncolors); +} +#endif // GDKMM_DISABLE_DEPRECATED + + +void Colormap::free_color(Color& color) +{ + gdk_colormap_free_colors(gobj(), color.gobj(), 1); +} + +} // namespace Gdk namespace @@ -85,8 +105,19 @@ void Colormap_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Colormap_Class::wrap_new(GObject* object) { @@ -143,67 +174,55 @@ Glib::RefPtr Colormap::get_system() return retvalue; } -int Colormap::alloc_colors(ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle& success) -{ - return gdk_colormap_alloc_colors(gobj(), const_cast(colors.data()), ncolors, static_cast(writeable), static_cast(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(writeable), static_cast(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()); +gdk_colormap_query_color(gobj(), pixel, (result).gobj()); } Glib::RefPtr Colormap::get_visual() { Glib::RefPtr 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 Colormap::get_visual() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_colormap_get_visual(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_visual(); } Glib::RefPtr Colormap::get_screen() { Glib::RefPtr 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 Colormap::get_screen() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_colormap_get_screen(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_screen(); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/colormap.h b/libs/gtkmm2/gdk/gdkmm/colormap.h index 5f73acbf59..2d2a4cd92e 100644 --- a/libs/gtkmm2/gdk/gdkmm/colormap.h +++ b/libs/gtkmm2/gdk/gdkmm/colormap.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_COLORMAP_H #define _GDKMM_COLORMAP_H + #include /* $Id$ */ @@ -114,27 +115,18 @@ public: //_WRAP_METHOD(void change(int ncolors), gdk_colormap_change) - // Both 'GdkColor* colors' and 'gboolean* success' are _array_ output arguments. - + #ifndef GDKMM_DISABLE_DEPRECATED - /** 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 true, 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 true, 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. - */ + ///@deprecated Use alloc_color(). int alloc_colors(ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle& success); - + + ///@deprecated Use free_color() + void free_colors(Color& colors, int ncolors); + + #endif // GDKMM_DISABLE_DEPRECATED + + /** Allocates a single color from a colormap. * @param color The color to allocate. On return the * <structfield>pixel</structfield> field will be @@ -147,12 +139,8 @@ public: * @return true 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); + void free_color(Color& color); + /** Locates the RGB color in @a colormap corresponding to the given * hardware pixel @a pixel . @a pixel must be a valid pixel in the @@ -184,14 +172,14 @@ public: /** Gets the screen for which this colormap was created. * @return The screen for which this colormap was created. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(); /** Gets the screen for which this colormap was created. * @return The screen for which this colormap was created. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen() const; @@ -200,11 +188,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/cursor.cc b/libs/gtkmm2/gdk/gdkmm/cursor.cc index 1a8e639472..0f449a6108 100644 --- a/libs/gtkmm2/gdk/gdkmm/cursor.cc +++ b/libs/gtkmm2/gdk/gdkmm/cursor.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -54,7 +55,12 @@ Cursor::Cursor(const Glib::RefPtr& display, CursorType cursor_type) Cursor::Cursor(const Glib::RefPtr& display, const Glib::RefPtr& pixbuf, int x, int y) { gobject_ = gdk_cursor_new_from_pixbuf(display->gobj(), pixbuf->gobj(), x, y); -} +} + +Cursor::Cursor(const Glib::RefPtr& display, const Glib::ustring& name) +{ + gobject_ = gdk_cursor_new_from_name(display->gobj(), name.c_str()); +} } //namespace Gdk @@ -139,20 +145,25 @@ Glib::RefPtr Cursor::get_display() { Glib::RefPtr 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 Cursor::get_display() const { + return const_cast(this)->get_display(); +} - Glib::RefPtr retvalue = Glib::wrap(gdk_cursor_get_display(const_cast(gobj()))); +Glib::RefPtr Cursor::get_image() +{ + return Glib::wrap(gdk_cursor_get_image(gobj())); +} - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; +Glib::RefPtr Cursor::get_image() const +{ + return const_cast(this)->get_image(); } diff --git a/libs/gtkmm2/gdk/gdkmm/cursor.h b/libs/gtkmm2/gdk/gdkmm/cursor.h index 59ab2f827f..19b6d6054b 100644 --- a/libs/gtkmm2/gdk/gdkmm/cursor.h +++ b/libs/gtkmm2/gdk/gdkmm/cursor.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_CURSOR_H #define _GDKMM_CURSOR_H + #include /* $Id$ */ @@ -195,22 +196,46 @@ public: int x, int y); explicit Cursor(const Glib::RefPtr& display, CursorType cursor_type); Cursor(const Glib::RefPtr& display, const Glib::RefPtr& pixbuf, int x, int y); + explicit Cursor(const Glib::RefPtr& display, const Glib::ustring& name); /** Returns the display on which the Gdk::Cursor is defined. * @return The Gdk::Display associated to @a cursor * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display(); /** Returns the display on which the Gdk::Cursor is defined. * @return The Gdk::Display associated to @a cursor * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display() const; + + /** Returns a Gdk::Pixbuf with the image used to display the cursor. + * + * Note that depending on the capabilities of the windowing system and + * on the cursor, GDK may not be able to obtain the image data. In this + * case, 0 is returned. + * @return A Gdk::Pixbuf representing @a cursor , or 0 + * + * @newin2p8. + */ + Glib::RefPtr get_image(); + + /** Returns a Gdk::Pixbuf with the image used to display the cursor. + * + * Note that depending on the capabilities of the windowing system and + * on the cursor, GDK may not be able to obtain the image data. In this + * case, 0 is returned. + * @return A Gdk::Pixbuf representing @a cursor , or 0 + * + * @newin2p8. + */ + Glib::RefPtr get_image() const; + }; @@ -247,5 +272,6 @@ class Value : public Glib::Value_Boxed } // namespace Glib + #endif /* _GDKMM_CURSOR_H */ diff --git a/libs/gtkmm2/gdk/gdkmm/device.cc b/libs/gtkmm2/gdk/gdkmm/device.cc index 78d223a363..5d29021169 100644 --- a/libs/gtkmm2/gdk/gdkmm/device.cc +++ b/libs/gtkmm2/gdk/gdkmm/device.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -92,8 +93,19 @@ void Device_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Device_Class::wrap_new(GObject* object) { @@ -145,7 +157,7 @@ Device::Device() void Device::set_source(InputSource source) { - gdk_device_set_source(gobj(), ((GdkInputSource)(source))); +gdk_device_set_source(gobj(), ((GdkInputSource)(source))); } bool Device::set_mode(InputMode mode) @@ -155,17 +167,17 @@ bool Device::set_mode(InputMode mode) void Device::set_key(guint index_, guint keyval, ModifierType modifiers) { - gdk_device_set_key(gobj(), index_, keyval, ((GdkModifierType)(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))); +gdk_device_set_axis_use(gobj(), index_, ((GdkAxisUse)(use))); } void Device::get_state(const Glib::RefPtr& window, double& axes, ModifierType& mask) { - gdk_device_get_state(gobj(), Glib::unwrap(window), &(axes), ((GdkModifierType*) &(mask))); +gdk_device_get_state(gobj(), Glib::unwrap(window), &(axes), ((GdkModifierType*) &(mask))); } bool Device::get_history(const Glib::RefPtr& window, guint32 start, guint32 stop, GdkTimeCoord**& events, int& n_events) @@ -178,25 +190,32 @@ bool Device::get_axis(double& axes, AxisUse use, double& value) const return gdk_device_get_axis(const_cast(gobj()), &(axes), ((GdkAxisUse)(use)), &(value)); } -Glib::ustring Device::get_name() const + Glib::ustring Device::get_name() const { return Glib::convert_const_gchar_ptr_to_ustring(gobj()->name); } - -InputSource Device::get_source() const + + InputSource Device::get_source() const { return ((InputSource)(gobj()->source)); } - -InputMode Device::get_mode() const + + InputMode Device::get_mode() const { return ((InputMode)(gobj()->mode)); } - -bool Device::get_has_cursor() const + + bool Device::get_has_cursor() const { return gobj()->has_cursor; } + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/device.h b/libs/gtkmm2/gdk/gdkmm/device.h index c3146c0010..2453396d73 100644 --- a/libs/gtkmm2/gdk/gdkmm/device.h +++ b/libs/gtkmm2/gdk/gdkmm/device.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_DEVICE_H #define _GDKMM_DEVICE_H + #include /* $Id$ */ @@ -198,23 +199,23 @@ public: /** Gets the name of this device. * @result The name of this device. */ - Glib::ustring get_name() const; - + Glib::ustring get_name() const; + /** Gets the type of this device. * @result The type of this device. */ - InputSource get_source() const; - + InputSource get_source() const; + /** Gets the mode of this device. * @result The mode of this device. */ - InputMode get_mode() const; - + InputMode get_mode() const; + /** Discover whether the pointer follows device motion. * @result true if the pointer follows device motion. */ - bool get_has_cursor() const; - + 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. @@ -227,11 +228,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/display.cc b/libs/gtkmm2/gdk/gdkmm/display.cc index ff3f528fff..fe4318c328 100644 --- a/libs/gtkmm2/gdk/gdkmm/display.cc +++ b/libs/gtkmm2/gdk/gdkmm/display.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -121,7 +122,8 @@ GdkDisplayPointerHooks* Display::unset_pointer_hooks() namespace { -void Display_signal_closed_callback(GdkDisplay* self, gboolean p0,void* data) + +static void Display_signal_closed_callback(GdkDisplay* self, gboolean p0,void* data) { using namespace Gdk; typedef sigc::slot< void,bool > SlotType; @@ -129,26 +131,31 @@ void Display_signal_closed_callback(GdkDisplay* self, gboolean p0,void* data) // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Display_signal_closed_info = +static const Glib::SignalProxyInfo Display_signal_closed_info = { "closed", (GCallback) &Display_signal_closed_callback, (GCallback) &Display_signal_closed_callback }; + } // anonymous namespace @@ -195,10 +202,18 @@ void Display_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->closed = &closed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Display_Class::closed_callback(GdkDisplay* self, gboolean p0) { CppObjectType *const obj = dynamic_cast( @@ -211,16 +226,20 @@ void Display_Class::closed_callback(GdkDisplay* self, gboolean p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_closed(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -233,6 +252,7 @@ void Display_Class::closed_callback(GdkDisplay* self, gboolean p0) (*base->closed)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Display_Class::wrap_new(GObject* object) @@ -293,6 +313,7 @@ Glib::RefPtr Display::open(const Glib::ustring& display_name) return retvalue; } + Glib::ustring Display::get_name() const { return Glib::convert_const_gchar_ptr_to_ustring(gdk_display_get_name(const_cast(gobj()))); @@ -307,50 +328,40 @@ Glib::RefPtr Display::get_screen(int screen_num) { Glib::RefPtr 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 Display::get_screen(int screen_num) const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_display_get_screen(const_cast(gobj()), screen_num)); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_screen(screen_num); } Glib::RefPtr Display::get_default_screen() { Glib::RefPtr 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 Display::get_default_screen() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_display_get_default_screen(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_default_screen(); } void Display::pointer_ungrab(guint32 timestamp) { - gdk_display_pointer_ungrab(gobj(), timestamp); +gdk_display_pointer_ungrab(gobj(), timestamp); } void Display::keyboard_ungrab(guint32 timestamp) { - gdk_display_keyboard_ungrab(gobj(), timestamp); +gdk_display_keyboard_ungrab(gobj(), timestamp); } bool Display::pointer_is_grabbed() const @@ -360,27 +371,27 @@ bool Display::pointer_is_grabbed() const void Display::beep() { - gdk_display_beep(gobj()); +gdk_display_beep(gobj()); } void Display::sync() { - gdk_display_sync(gobj()); +gdk_display_sync(gobj()); } void Display::close() { - gdk_display_close(gobj()); +gdk_display_close(gobj()); } Glib::ListHandle< Glib::RefPtr > Display::list_devices() { - return Glib::ListHandle< Glib::RefPtr >(gdk_display_list_devices(gobj()), Glib::OWNERSHIP_DEEP); + return Glib::ListHandle< Glib::RefPtr >(gdk_display_list_devices(gobj()), Glib::OWNERSHIP_NONE); } Glib::ListHandle< Glib::RefPtr > Display::list_devices() const { - return Glib::ListHandle< Glib::RefPtr >(gdk_display_list_devices(const_cast(gobj())), Glib::OWNERSHIP_DEEP); + return Glib::ListHandle< Glib::RefPtr >(gdk_display_list_devices(const_cast(gobj())), Glib::OWNERSHIP_NONE); } GdkEvent* Display::get_event() @@ -390,7 +401,7 @@ GdkEvent* Display::get_event() const GdkEvent* Display::get_event() const { - return (const GdkEvent*)(gdk_display_get_event(const_cast(gobj()))); + return const_cast(this)->get_event(); } GdkEvent* Display::peek_event() @@ -400,27 +411,27 @@ GdkEvent* Display::peek_event() GdkEvent* Display::peek_event() const { - return gdk_display_peek_event(const_cast(gobj())); + return const_cast(this)->peek_event(); } void Display::put_event(GdkEvent* event) { - gdk_display_put_event(gobj(), 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); +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); +gdk_display_set_double_click_time(gobj(), msec); } void Display::set_double_click_distance(guint distance) { - gdk_display_set_double_click_distance(gobj(), distance); +gdk_display_set_double_click_distance(gobj(), distance); } Glib::RefPtr Display::get_default() @@ -433,44 +444,45 @@ Glib::RefPtr Display::get_default() return retvalue; } + Glib::RefPtr Display::get_core_pointer() { Glib::RefPtr 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 Display::get_core_pointer() const { Glib::RefPtr retvalue = Glib::wrap(gdk_display_get_core_pointer(const_cast(gobj()))); - if(retvalue) retvalue->reference(); //The function does not do a ref for us. return retvalue; + } Glib::RefPtr Display::get_window_at_pointer(int& win_x, int& win_y) { Glib::RefPtr 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 Display::get_window_at_pointer(int& win_x, int& win_y) const { + return const_cast(this)->get_window_at_pointer(win_x, win_y); +} - Glib::RefPtr retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_window_at_pointer(const_cast(gobj()), &win_x, &win_y))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; +void Display::warp_pointer(const Glib::RefPtr& screen, int x, int y) +{ +gdk_display_warp_pointer(gobj(), Glib::unwrap(screen), x, y); } GdkDisplayPointerHooks* Display::set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks) @@ -488,6 +500,7 @@ Glib::RefPtr Display::open_default_libgtk_only() return retvalue; } + guint32 Display::get_drag_protocol(guint32 xid, GdkDragProtocol& protocol) { return gdk_drag_get_protocol_for_display(gobj(), xid, &(protocol)); @@ -500,7 +513,7 @@ GdkKeymap* Display::get_keymap() const GdkKeymap* Display::get_keymap() const { - return gdk_keymap_get_for_display(const_cast(gobj())); + return const_cast(this)->get_keymap(); } Glib::RefPtr Display::lookup_pixmap(NativeWindow anid) @@ -510,12 +523,12 @@ Glib::RefPtr Display::lookup_pixmap(NativeWindow anid) Glib::RefPtr Display::lookup_pixmap(NativeWindow anid) const { - return Glib::wrap((GdkPixmapObject*)(gdk_pixmap_lookup_for_display(const_cast(gobj()), (GdkNativeWindow)(anid)))); + return const_cast(this)->lookup_pixmap(anid); } void Display::flush() { - gdk_display_flush(gobj()); +gdk_display_flush(gobj()); } bool Display::supports_cursor_alpha() const @@ -535,27 +548,22 @@ guint Display::get_default_cursor_size() const void Display::get_maximal_cursor_size(guint& width, guint& height) { - gdk_display_get_maximal_cursor_size(gobj(), &(width), &(height)); +gdk_display_get_maximal_cursor_size(gobj(), &(width), &(height)); } Glib::RefPtr Display::get_default_group() { Glib::RefPtr 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 Display::get_default_group() const { - - Glib::RefPtr retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_default_group(const_cast(gobj())))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_default_group(); } bool Display::supports_selection_notification() const @@ -580,6 +588,7 @@ Glib::SignalProxy1< void,bool > Display::signal_closed() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gdk::Display::on_closed(bool is_error) { BaseClassType *const base = static_cast( @@ -589,6 +598,10 @@ void Gdk::Display::on_closed(bool is_error) if(base && base->closed) (*base->closed)(gobj(),static_cast(is_error)); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/display.h b/libs/gtkmm2/gdk/gdkmm/display.h index 238025599a..e99910af21 100644 --- a/libs/gtkmm2/gdk/gdkmm/display.h +++ b/libs/gtkmm2/gdk/gdkmm/display.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_DISPLAY_H #define _GDKMM_DISPLAY_H + #include /* $Id$ */ @@ -106,7 +107,7 @@ public: /** Opens a display. * - * Since: 2.2 + * @newin2p2 * @param display_name The name of the display to open. * @return A Gdk::Display, or 0 if the display * could not be opened. @@ -118,7 +119,7 @@ public: * @return A string representing the display name. This string is owned * by GDK and should not be modified or freed. * - * Since: 2.2. + * @newin2p2. */ Glib::ustring get_name() const; @@ -126,7 +127,7 @@ public: /** Gets the number of screen managed by the @a display . * @return Number of screens. * - * Since: 2.2. + * @newin2p2. */ int get_n_screens() const; @@ -134,7 +135,7 @@ public: * @param screen_num The screen number. * @return The Gdk::Screen object * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(int screen_num); @@ -142,7 +143,7 @@ public: * @param screen_num The screen number. * @return The Gdk::Screen object * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(int screen_num) const; @@ -150,28 +151,28 @@ public: /** Get the default Gdk::Screen for @a display . * @return The default Gdk::Screen object for @a display * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_default_screen(); /** Get the default Gdk::Screen for @a display . * @return The default Gdk::Screen object for @a display * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_default_screen() const; /** Release any pointer grab. * - * Since: 2.2 + * @newin2p2 * @param timestamp A timestap (e.g. GDK_CURRENT_TIME). */ void pointer_ungrab(guint32 timestamp); /** Release any keyboard grab * - * Since: 2.2 + * @newin2p2 * @param timestamp A timestap (e.g Gdk::CURRENT_TIME). */ void keyboard_ungrab(guint32 timestamp); @@ -179,13 +180,13 @@ public: /** Test if the pointer is grabbed. * @return true if an active X pointer grab is in effect * - * Since: 2.2. + * @newin2p2. */ bool pointer_is_grabbed() const; /** Emits a short beep on @a display * - * Since: 2.2 + * @newin2p2 */ void beep(); @@ -199,14 +200,14 @@ public: * This is most useful for X11. On windowing systems where requests are * handled synchronously, this function will do nothing. * - * Since: 2.2 + * @newin2p2 */ void sync(); /** Closes the connection to the windowing system for the given display, * and cleans up associated resources. * - * Since: 2.2 + * @newin2p2 */ void close(); @@ -215,7 +216,7 @@ public: * The list is statically allocated and should not be freed. * @return A list of Gdk::Device * - * Since: 2.2. + * @newin2p2. */ Glib::ListHandle< Glib::RefPtr > list_devices(); @@ -223,7 +224,7 @@ public: * The list is statically allocated and should not be freed. * @return A list of Gdk::Device * - * Since: 2.2. + * @newin2p2. */ Glib::ListHandle< Glib::RefPtr > list_devices() const; @@ -235,7 +236,7 @@ public: * @return The next Gdk::Event to be processed, or 0 if no events * are pending. The returned Gdk::Event should be freed with gdk_event_free(). * - * Since: 2.2. + * @newin2p2. */ GdkEvent* get_event(); @@ -244,7 +245,7 @@ public: * @return The next Gdk::Event to be processed, or 0 if no events * are pending. The returned Gdk::Event should be freed with gdk_event_free(). * - * Since: 2.2. + * @newin2p2. */ const GdkEvent* get_event() const; @@ -257,7 +258,7 @@ public: * if no events are in the queue. The returned Gdk::Event should be freed with * gdk_event_free(). * - * Since: 2.2. + * @newin2p2. */ GdkEvent* peek_event(); @@ -269,14 +270,14 @@ public: * if no events are in the queue. The returned Gdk::Event should be freed with * gdk_event_free(). * - * Since: 2.2. + * @newin2p2. */ GdkEvent* peek_event() const; /** Appends a copy of the given event onto the front of the event * queue for @a display . * - * Since: 2.2 + * @newin2p2 * @param event A Gdk::Event. */ void put_event(GdkEvent* event); @@ -286,7 +287,7 @@ public: /** Adds a filter to be called when X ClientMessage events are received. * - * Since: 2.2 + * @newin2p2 * @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. @@ -301,7 +302,7 @@ public: * Applications should not set this, it is a global * user-configured setting. * - * Since: 2.2 + * @newin2p2 * @param msec Double click time in milliseconds (thousandths of a second). */ void set_double_click_time(guint msec); @@ -312,7 +313,7 @@ public: * Applications should not set this, it is a global * user-configured setting. * - * Since: 2.4 + * @newin2p4 * @param distance Distance in pixels. */ void set_double_click_distance(guint distance); @@ -326,7 +327,7 @@ public: * @return A Gdk::Display, or 0 if there is no default * display. * - * Since: 2.2. + * @newin2p2. */ static Glib::RefPtr get_default(); @@ -335,7 +336,7 @@ public: * @return The core pointer device; this is owned by the * display and should not be freed. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_core_pointer(); @@ -343,7 +344,7 @@ public: * @return The core pointer device; this is owned by the * display and should not be freed. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_core_pointer() const; @@ -379,7 +380,7 @@ public: * @param win_y Return location for origin of the window under the pointer. * @return The window under the mouse pointer, or 0 * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_window_at_pointer(int& win_x, int& win_y); @@ -391,7 +392,7 @@ public: * @param win_y Return location for origin of the window under the pointer. * @return The window under the mouse pointer, or 0 * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_window_at_pointer(int& win_x, int& win_y) const; @@ -408,6 +409,26 @@ public: * @result The window underneath the mouse pointer. */ Glib::RefPtr get_window_at_pointer() const; + + + /** Warps the pointer of @a display to the point @a x , @a y on + * the screen @a screen , unless the pointer is confined + * to a window by a grab, in which case it will be moved + * as far as allowed by the grab. Warping the pointer + * creates events as if the user had moved the mouse + * instantaneously to the destination. + * + * Note that the pointer should normally be under the + * control of the user. This function was added to cover + * some rare use cases like keyboard navigation support + * for the color picker in the Gtk::ColorSelectionDialog. + * + * @newin2p8 + * @param screen The screen of @a display to warp the pointer to. + * @param x The x coordinate of the destination. + * @param y The y coordinate of the destination. + */ + void warp_pointer(const Glib::RefPtr& screen, int x, int y); /** This function allows for hooking into the operation @@ -415,11 +436,11 @@ public: * display. This is only useful for such low-level tools as an * event recorder. Applications should never have any * reason to use this facility. + * + * @a newin2p2 * @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. + * @return The previous pointer hook table. */ GdkDisplayPointerHooks* set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks); GdkDisplayPointerHooks* unset_pointer_hooks(); @@ -438,7 +459,7 @@ public: /** Finds out the DND protocol supported by a window. * - * Since: 2.2 + * @newin2p2 * @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 @@ -452,7 +473,7 @@ public: * @return The Gdk::Keymap attached to @a display . * the Gdk::Keymap attached to @a display . * - * Since: 2.2. + * @newin2p2. */ GdkKeymap* get_keymap(); @@ -460,7 +481,7 @@ public: * @return The Gdk::Keymap attached to @a display . * the Gdk::Keymap attached to @a display . * - * Since: 2.2. + * @newin2p2. */ const GdkKeymap* get_keymap() const; @@ -477,7 +498,7 @@ public: * @return The Gdk::Pixmap wrapper for the native pixmap, * or 0 if there is none. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr lookup_pixmap(NativeWindow anid); @@ -489,7 +510,7 @@ public: * @return The Gdk::Pixmap wrapper for the native pixmap, * or 0 if there is none. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr lookup_pixmap(NativeWindow anid) const; @@ -504,7 +525,7 @@ public: * This is most useful for X11. On windowing systems where requests are * handled synchronously, this function will do nothing. * - * Since: 2.4 + * @newin2p4 */ void flush(); @@ -513,7 +534,7 @@ public: * alpha (i.e. a mask). * @return Whether cursors can have alpha channels. * - * Since: 2.4. + * @newin2p4. */ bool supports_cursor_alpha() const; @@ -522,20 +543,20 @@ public: * and a background color. * @return Whether cursors can have multiple colors. * - * Since: 2.4. + * @newin2p4. */ bool supports_cursor_color() const; /** Returns the default size to use for cursors on @a display . * @return The default cursor size. * - * Since: 2.4. + * @newin2p4. */ guint get_default_cursor_size() const; /** Gets the maximal size to use for cursors on @a display . * - * Since: 2.4 + * @newin2p4 * @param width The return location for the maximal cursor width. * @param height The return location for the maximal cursor height. */ @@ -547,7 +568,7 @@ public: * See gdk_window_set_group(). * @return The default group leader window for @a display * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr get_default_group(); @@ -556,7 +577,7 @@ public: * See gdk_window_set_group(). * @return The default group leader window for @a display * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr get_default_group() const; @@ -568,7 +589,7 @@ public: * @return Whether Gdk::EventOwnerChange events will * be sent. * - * Since: 2.6. + * @newin2p6. */ bool supports_selection_notification() const; @@ -579,7 +600,7 @@ public: * @return Whether Gdk::EventOwnerChange events will * be sent. * - * Since: 2.6. + * @newin2p6. */ bool request_selection_notification(const Glib::ustring& selection); @@ -590,7 +611,7 @@ public: * running. * @return true if the display supports clipboard persistance. * - * Since: 2.6. + * @newin2p6. */ bool supports_clipboard_persistence() const; @@ -600,6 +621,17 @@ public: void store_clipboard(const Glib::RefPtr& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets); + /** The closed signal is emitted when the connection to the windowing + * system for this display is closed. + * + * @param is_error true if the display was closed due to an error + */ + +/** + * @par Prototype: + * void %closed(bool is_error) + */ + Glib::SignalProxy1< void,bool > signal_closed(); @@ -607,12 +639,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_closed(bool is_error); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/displaymanager.cc b/libs/gtkmm2/gdk/gdkmm/displaymanager.cc index 5edb22e506..3a2696788f 100644 --- a/libs/gtkmm2/gdk/gdkmm/displaymanager.cc +++ b/libs/gtkmm2/gdk/gdkmm/displaymanager.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -36,7 +37,8 @@ namespace Gdk namespace { -void DisplayManager_signal_display_opened_callback(GdkDisplayManager* self, GdkDisplay* p0,void* data) + +static void DisplayManager_signal_display_opened_callback(GdkDisplayManager* self, GdkDisplay* p0,void* data) { using namespace Gdk; typedef sigc::slot< void,const Glib::RefPtr& > SlotType; @@ -44,26 +46,31 @@ void DisplayManager_signal_display_opened_callback(GdkDisplayManager* self, GdkD // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo DisplayManager_signal_display_opened_info = +static const Glib::SignalProxyInfo DisplayManager_signal_display_opened_info = { "display-opened", (GCallback) &DisplayManager_signal_display_opened_callback, (GCallback) &DisplayManager_signal_display_opened_callback }; + } // anonymous namespace @@ -110,10 +117,18 @@ void DisplayManager_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->display_opened = &display_opened_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void DisplayManager_Class::display_opened_callback(GdkDisplayManager* self, GdkDisplay* p0) { CppObjectType *const obj = dynamic_cast( @@ -126,16 +141,20 @@ void DisplayManager_Class::display_opened_callback(GdkDisplayManager* self, GdkD // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_display_opened(Glib::wrap(p0, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -148,6 +167,7 @@ void DisplayManager_Class::display_opened_callback(GdkDisplayManager* self, GdkD (*base->display_opened)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* DisplayManager_Class::wrap_new(GObject* object) @@ -201,29 +221,25 @@ Glib::RefPtr DisplayManager::get() return retvalue; } + Glib::RefPtr DisplayManager::get_default_display() { Glib::RefPtr 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 DisplayManager::get_default_display() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_display_manager_get_default_display(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_default_display(); } void DisplayManager::set_default_display(const Glib::RefPtr& display) { - gdk_display_manager_set_default_display(gobj(), Glib::unwrap(display)); +gdk_display_manager_set_default_display(gobj(), Glib::unwrap(display)); } Glib::SListHandle< Glib::RefPtr > DisplayManager::list_displays() @@ -238,17 +254,22 @@ Glib::SignalProxy1< void,const Glib::RefPtr& > DisplayManager::signal_d } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > DisplayManager::property_default_display() { return Glib::PropertyProxy< Glib::RefPtr >(this, "default-display"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > DisplayManager::property_default_display() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "default-display"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gdk::DisplayManager::on_display_opened(const Glib::RefPtr& display) { BaseClassType *const base = static_cast( @@ -258,6 +279,10 @@ void Gdk::DisplayManager::on_display_opened(const Glib::RefPtr& display if(base && base->display_opened) (*base->display_opened)(gobj(),Glib::unwrap(display)); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/displaymanager.h b/libs/gtkmm2/gdk/gdkmm/displaymanager.h index fb223270d6..b15608b6f2 100644 --- a/libs/gtkmm2/gdk/gdkmm/displaymanager.h +++ b/libs/gtkmm2/gdk/gdkmm/displaymanager.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_DISPLAYMANAGER_H #define _GDKMM_DISPLAYMANAGER_H + #include /* $Id$ */ @@ -99,7 +100,7 @@ public: * the global Gdk::DisplayManager singleton; gdk_parse_pargs(), * gdk_init(), or gdk_init_check() must have been called first. * - * Since: 2.2. + * @newin2p2. */ static Glib::RefPtr get(); @@ -107,7 +108,7 @@ public: * @return A Gdk::Display, or 0 if there is no default * display. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_default_display(); @@ -115,33 +116,37 @@ public: * @return A Gdk::Display, or 0 if there is no default * display. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_default_display() const; /** Sets @a display as the default display. * - * Since: 2.2 + * @newin2p2 * @param display A Gdk::Display. */ void set_default_display(const Glib::RefPtr& display); /** List all currently open displays. + * + * @a newin2p2 * @return A list of Gdk::Display objects. - * Since: 2.2. */ Glib::SListHandle< Glib::RefPtr > list_displays(); - /** The default display for GDK. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_default_display() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The default display for GDK. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -149,8 +154,21 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_default_display() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + /** The display_opened signal is emitted when a display is opened. + * + * @newin2p2 + * + * @param display the opened display + */ + +/** + * @par Prototype: + * void %display_opened(const Glib::RefPtr& display) + */ + Glib::SignalProxy1< void,const Glib::RefPtr& > signal_display_opened(); @@ -158,12 +176,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_display_opened(const Glib::RefPtr& display); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/dragcontext.cc b/libs/gtkmm2/gdk/gdkmm/dragcontext.cc index 3a2574fb72..1daebcd9de 100644 --- a/libs/gtkmm2/gdk/gdkmm/dragcontext.cc +++ b/libs/gtkmm2/gdk/gdkmm/dragcontext.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -54,7 +55,7 @@ Glib::StringArrayHandle DragContext::get_targets() const GList* list = gobj()->targets; while(list) { - GdkAtom atom = (GdkAtom)list->data; + GdkAtom atom = GDK_POINTER_TO_ATOM(list->data); //Convert the atom to a string: gchar* const atom_name = gdk_atom_name(atom); @@ -73,7 +74,6 @@ Glib::StringArrayHandle DragContext::get_targets() const } /* namespace Gdk */ - namespace { } // anonymous namespace @@ -134,8 +134,19 @@ void DragContext_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* DragContext_Class::wrap_new(GObject* object) { @@ -191,17 +202,17 @@ Glib::RefPtr DragContext::create() } void DragContext::drag_status(DragAction action, guint32 time) { - gdk_drag_status(gobj(), ((GdkDragAction)(action)), time); +gdk_drag_status(gobj(), ((GdkDragAction)(action)), time); } void DragContext::drop_reply(bool ok, guint32 time) { - gdk_drop_reply(gobj(), static_cast(ok), time); +gdk_drop_reply(gobj(), static_cast(ok), time); } void DragContext::drop_finish(bool success, guint32 time) { - gdk_drop_finish(gobj(), static_cast(success), time); +gdk_drop_finish(gobj(), static_cast(success), time); } Glib::ustring DragContext::get_selection() const @@ -211,30 +222,35 @@ Glib::ustring DragContext::get_selection() const void DragContext::drag_finish(bool success, bool del, guint32 time) { - gtk_drag_finish(gobj(), static_cast(success), static_cast(del), time); +gtk_drag_finish(gobj(), static_cast(success), static_cast(del), time); } void DragContext::set_icon(const Glib::RefPtr& colormap, const Glib::RefPtr& pixmap, const Glib::RefPtr& 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); +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& pixbuf, int hot_x, int hot_y) { - gtk_drag_set_icon_pixbuf(gobj(), Glib::unwrap(pixbuf), hot_x, 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); +gtk_drag_set_icon_stock(gobj(), stock_id.c_str(), hot_x, hot_y); +} + +void DragContext::set_icon_name(const Glib::ustring& name, int hot_x, int hot_y) +{ +gtk_drag_set_icon_name(gobj(), name.c_str(), hot_x, hot_y); } void DragContext::set_icon() { - gtk_drag_set_icon_default(gobj()); +gtk_drag_set_icon_default(gobj()); } -Glib::RefPtr DragContext::get_source_window() + Glib::RefPtr DragContext::get_source_window() { Glib::RefPtr ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->source_window))); @@ -253,8 +269,8 @@ Glib::RefPtr DragContext::get_source_window() const return ref_ptr; } - -Glib::RefPtr DragContext::get_destination_window() + + Glib::RefPtr DragContext::get_destination_window() { Glib::RefPtr ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->dest_window))); @@ -273,36 +289,43 @@ Glib::RefPtr DragContext::get_destination_window() const return ref_ptr; } - -DragProtocol DragContext::get_protocol() const + + DragProtocol DragContext::get_protocol() const { return ((DragProtocol)(gobj()->protocol)); } - -bool DragContext::get_is_source() const + + bool DragContext::get_is_source() const { return gobj()->is_source; } - -DragAction DragContext::get_actions() const + + DragAction DragContext::get_actions() const { return ((DragAction)(gobj()->actions)); } - -DragAction DragContext::get_suggested_action() const + + DragAction DragContext::get_suggested_action() const { return ((DragAction)(gobj()->suggested_action)); } - -DragAction DragContext::get_action() const + + DragAction DragContext::get_action() const { return ((DragAction)(gobj()->action)); } - -guint32 DragContext::get_start_time() const + + guint32 DragContext::get_start_time() const { return gobj()->start_time; } + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/dragcontext.h b/libs/gtkmm2/gdk/gdkmm/dragcontext.h index 57507df105..b30d2f3715 100644 --- a/libs/gtkmm2/gdk/gdkmm/dragcontext.h +++ b/libs/gtkmm2/gdk/gdkmm/dragcontext.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_DRAGCONTEXT_H #define _GDKMM_DRAGCONTEXT_H + #include /* $Id$ */ @@ -269,20 +270,22 @@ public: void set_icon(const Glib::ustring& stock_id, int hot_x, int hot_y); + void set_icon_name(const Glib::ustring& name, 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 get_source_window(); + Glib::RefPtr get_source_window(); Glib::RefPtr get_source_window() const; - + /** Get the the source window of this drag. * @result the source window of this drag. */ - Glib::RefPtr get_destination_window(); + Glib::RefPtr get_destination_window(); Glib::RefPtr get_destination_window() const; - + /** Get a list of targets offered by the source. * @result a list of targets offered by the source. */ @@ -291,33 +294,33 @@ public: /** Get the DND protocol which governs this drag. * @result the DND protocol which governs this drag. */ - DragProtocol get_protocol() const; - + 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; - + 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; - + DragAction get_actions() const; + /** Get the action suggested by the source. * @result The action suggested by the source. */ - DragAction get_suggested_action() const; - + DragAction get_suggested_action() const; + /** Get the action chosen by the destination. * @result the action chosen byt the destination. */ - DragAction get_action() const; - + 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; - + guint32 get_start_time() const; + /** Finds the destination window and DND protocol to use at the * given pointer position. @@ -325,7 +328,7 @@ public: * 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 + * @newin2p2 * @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. @@ -342,11 +345,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/drawable.cc b/libs/gtkmm2/gdk/gdkmm/drawable.cc index 58adc15cec..2a57382d36 100644 --- a/libs/gtkmm2/gdk/gdkmm/drawable.cc +++ b/libs/gtkmm2/gdk/gdkmm/drawable.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -123,8 +124,19 @@ void Drawable_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Drawable_Class::wrap_new(GObject* object) { @@ -180,7 +192,7 @@ Glib::RefPtr Drawable::create() } void Drawable::get_size(int& width, int& height) { - gdk_drawable_get_size(gobj(), &width, &height); +gdk_drawable_get_size(gobj(), &width, &height); } int Drawable::get_depth() const @@ -190,92 +202,92 @@ int Drawable::get_depth() const void Drawable::set_colormap(const Glib::RefPtr& colormap) { - gdk_drawable_set_colormap(gobj(), Glib::unwrap(colormap)); +gdk_drawable_set_colormap(gobj(), Glib::unwrap(colormap)); } Glib::RefPtr Drawable::get_colormap() { Glib::RefPtr 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 Drawable::get_visual() { Glib::RefPtr 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& gc, int x, int y) { - gdk_draw_point(gobj(), const_cast(Glib::unwrap(gc)), x, y); +gdk_draw_point(gobj(), const_cast(Glib::unwrap(gc)), x, y); } void Drawable::draw_line(const Glib::RefPtr& gc, int x1, int y1, int x2, int y2) { - gdk_draw_line(gobj(), const_cast(Glib::unwrap(gc)), x1, y1, x2, y2); +gdk_draw_line(gobj(), const_cast(Glib::unwrap(gc)), x1, y1, x2, y2); } void Drawable::draw_rectangle(const Glib::RefPtr& gc, bool filled, int x, int y, int width, int height) { - gdk_draw_rectangle(gobj(), const_cast(Glib::unwrap(gc)), static_cast(filled), x, y, width, height); +gdk_draw_rectangle(gobj(), const_cast(Glib::unwrap(gc)), static_cast(filled), x, y, width, height); } void Drawable::draw_arc(const Glib::RefPtr& gc, bool filled, int x, int y, int width, int height, int angle1, int angle2) { - gdk_draw_arc(gobj(), const_cast(Glib::unwrap(gc)), static_cast(filled), x, y, width, height, angle1, angle2); +gdk_draw_arc(gobj(), const_cast(Glib::unwrap(gc)), static_cast(filled), x, y, width, height, angle1, angle2); } void Drawable::draw_drawable(const Glib::RefPtr& gc, const Glib::RefPtr& src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) { - gdk_draw_drawable(gobj(), const_cast(Glib::unwrap(gc)), const_cast(Glib::unwrap(src)), xsrc, ysrc, xdest, ydest, width, height); +gdk_draw_drawable(gobj(), const_cast(Glib::unwrap(gc)), const_cast(Glib::unwrap(src)), xsrc, ysrc, xdest, ydest, width, height); } void Drawable::draw_image(const Glib::RefPtr& gc, const Glib::RefPtr& image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) { - gdk_draw_image(gobj(), const_cast(Glib::unwrap(gc)), const_cast(Glib::unwrap(image)), xsrc, ysrc, xdest, ydest, width, height); +gdk_draw_image(gobj(), const_cast(Glib::unwrap(gc)), const_cast(Glib::unwrap(image)), xsrc, ysrc, xdest, ydest, width, height); } void Drawable::draw_segments(const Glib::RefPtr& gc, GdkSegment* segs, int nsegs) { - gdk_draw_segments(gobj(), const_cast(Glib::unwrap(gc)), segs, nsegs); +gdk_draw_segments(gobj(), const_cast(Glib::unwrap(gc)), segs, nsegs); } void Drawable::draw_glyphs(const Glib::RefPtr& gc, const Glib::RefPtr& font, int x, int y, const Pango::GlyphString& glyphs) { - gdk_draw_glyphs(gobj(), const_cast(Glib::unwrap(gc)), const_cast(Glib::unwrap(font)), x, y, const_cast(glyphs.gobj())); +gdk_draw_glyphs(gobj(), const_cast(Glib::unwrap(gc)), const_cast(Glib::unwrap(font)), x, y, const_cast(glyphs.gobj())); } void Drawable::draw_layout_line(const Glib::RefPtr& gc, int x, int y, const Glib::RefPtr& line) { - gdk_draw_layout_line(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(line))); +gdk_draw_layout_line(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(line))); } void Drawable::draw_layout_line(const Glib::RefPtr& gc, int x, int y, const Glib::RefPtr& line, const Color& foreground, const Color& background) { - gdk_draw_layout_line_with_colors(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(line)), (foreground).gobj(), (background).gobj()); +gdk_draw_layout_line_with_colors(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(line)), (foreground).gobj(), (background).gobj()); } void Drawable::draw_layout(const Glib::RefPtr& gc, int x, int y, const Glib::RefPtr& layout) { - gdk_draw_layout(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(layout))); +gdk_draw_layout(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(layout))); } void Drawable::draw_layout(const Glib::RefPtr& gc, int x, int y, const Glib::RefPtr& layout, const Color& foreground, const Color& background) { - gdk_draw_layout_with_colors(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(layout)), (foreground).gobj(), (background).gobj()); +gdk_draw_layout_with_colors(gobj(), const_cast(Glib::unwrap(gc)), x, y, const_cast(Glib::unwrap(layout)), (foreground).gobj(), (background).gobj()); } void Drawable::draw_pixbuf(const Glib::RefPtr& gc, const Glib::RefPtr& 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(Glib::unwrap(gc)), Glib::unwrap(pixbuf), src_x, src_y, dest_x, dest_y, width, height, ((GdkRgbDither)(dither)), x_dither, y_dither); +gdk_draw_pixbuf(gobj(), const_cast(Glib::unwrap(gc)), Glib::unwrap(pixbuf), src_x, src_y, dest_x, dest_y, width, height, ((GdkRgbDither)(dither)), x_dither, y_dither); } Glib::RefPtr Drawable::get_image(int x, int y, int width, int height) const @@ -295,74 +307,76 @@ Region Drawable::get_visible_region() const void Drawable::draw_rgb_image(const Glib::RefPtr& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride) { - gdk_draw_rgb_image(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride); +gdk_draw_rgb_image(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride); } void Drawable::draw_rgb_image_dithalign(const Glib::RefPtr& 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(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride, xdith, ydith); +gdk_draw_rgb_image_dithalign(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride, xdith, ydith); } void Drawable::draw_rgb_32_image(const Glib::RefPtr& 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(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride); +gdk_draw_rgb_32_image(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride); } void Drawable::draw_rgb_32_image_dithalign(const Glib::RefPtr& 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(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(buf), rowstride, xdith, ydith); +gdk_draw_rgb_32_image_dithalign(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(buf), rowstride, xdith, ydith); } void Drawable::draw_gray_image(const Glib::RefPtr& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride) { - gdk_draw_gray_image(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride); +gdk_draw_gray_image(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride); } void Drawable::draw_indexed_image(const Glib::RefPtr& 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(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride, const_cast(cmap.gobj())); +gdk_draw_indexed_image(gobj(), const_cast(Glib::unwrap(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast(rgb_buf), rowstride, const_cast(cmap.gobj())); } Glib::RefPtr Drawable::get_screen() { Glib::RefPtr 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 Drawable::get_screen() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_drawable_get_screen(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_screen(); } Glib::RefPtr Drawable::get_display() { Glib::RefPtr 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 Drawable::get_display() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_drawable_get_display(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_display(); } +Cairo::RefPtr Drawable::create_cairo_context() +{ + return Cairo::RefPtr(new Cairo::Context(gdk_cairo_create(gobj()), true /* has_reference */)); +} + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/drawable.h b/libs/gtkmm2/gdk/gdkmm/drawable.h index 6331e46ff2..ccf3310e57 100644 --- a/libs/gtkmm2/gdk/gdkmm/drawable.h +++ b/libs/gtkmm2/gdk/gdkmm/drawable.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_DRAWABLE_H #define _GDKMM_DRAWABLE_H + #include /* $Id$ */ @@ -36,6 +37,7 @@ #include #include #include +#include //#include @@ -95,7 +97,12 @@ class Pixbuf; * * 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. + * draw lines, text, arcs and such. + * + * An alternative is to create a Cairo::Context with get_cairo_context() + * while you handle the 'exposed' event of the drawable. For more about + * this, please see "Using cairo with GTK+" in the "Common questions" section + * of the GTK+ Reference Manual. */ class Drawable : public Glib::Object @@ -265,9 +272,9 @@ public: * 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. + * a color drawable. The way to draw a bitmap is to set the bitmap as + * the stipple on the Gdk::GC, set the fill mode to Gdk::STIPPLED, and + * then draw the rectangle. * @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. @@ -402,7 +409,7 @@ public: * The clip mask of @a gc is ignored, but clip rectangles and clip regions work * fine. * - * Since: 2.2 + * @newin2p2 * @param gc A Gdk::GC, used for clipping, or 0. * @param pixbuf A Gdk::Pixbuf. * @param src_x Source X coordinate within pixbuf. @@ -428,8 +435,8 @@ public: * 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 + * most cases you should use the Gdk::Pixbuf::create() method that takes a Gdk::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. @@ -543,14 +550,14 @@ public: /** Gets the Gdk::Screen associated with a Gdk::Drawable. * @return The Gdk::Screen associated with @a drawable * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(); /** Gets the Gdk::Screen associated with a Gdk::Drawable. * @return The Gdk::Screen associated with @a drawable * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen() const; @@ -558,27 +565,41 @@ public: /** Gets the Gdk::Display associated with a Gdk::Drawable. * @return The Gdk::Display associated with @a drawable * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display(); /** Gets the Gdk::Display associated with a Gdk::Drawable. * @return The Gdk::Display associated with @a drawable * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display() const; + + /** Creates a Cairo context for drawing to @a drawable . + * @return A newly created Cairo context. + * + * @newin2p10. + */ + Cairo::RefPtr create_cairo_context(); + public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/event.cc b/libs/gtkmm2/gdk/gdkmm/event.cc index e9a71e918c..14a1b4f272 100644 --- a/libs/gtkmm2/gdk/gdkmm/event.cc +++ b/libs/gtkmm2/gdk/gdkmm/event.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -132,19 +133,22 @@ 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) { return Event(gdk_event_get_graphics_expose(Glib::unwrap(window))); } + void Event::put() { - gdk_event_put(gobj()); +gdk_event_put(gobj()); } bool Event::events_pending() @@ -152,6 +156,7 @@ bool Event::events_pending() return gdk_events_pending(); } + guint32 Event::get_time() const { return gdk_event_get_time(const_cast(gobj())); @@ -179,37 +184,34 @@ bool Event::get_axis(AxisUse axis_use, double& value) const void Event::set_show_events(bool show_events) { - gdk_set_show_events(static_cast(show_events)); +gdk_set_show_events(static_cast(show_events)); } + bool Event::get_show_events() { return gdk_get_show_events(); } + void Event::set_screen(const Glib::RefPtr& screen) { - gdk_event_set_screen(gobj(), Glib::unwrap(screen)); +gdk_event_set_screen(gobj(), Glib::unwrap(screen)); } Glib::RefPtr Event::get_screen() { Glib::RefPtr 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 Event::get_screen() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_event_get_screen(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_screen(); } bool Event::send_client_message(NativeWindow winid) diff --git a/libs/gtkmm2/gdk/gdkmm/event.h b/libs/gtkmm2/gdk/gdkmm/event.h index 8d1095d46b..eecc131cf4 100644 --- a/libs/gtkmm2/gdk/gdkmm/event.h +++ b/libs/gtkmm2/gdk/gdkmm/event.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_EVENT_H #define _GDKMM_EVENT_H + #include /* $Id$ */ @@ -88,7 +89,8 @@ enum EventType SCROLL, WINDOW_STATE, SETTING, - OWNER_CHANGE + OWNER_CHANGE, + GRAB_BROKEN }; } // namespace Gdk @@ -316,7 +318,7 @@ public: * have been allocated by GTK+, for instance, by * gdk_event_copy(). * - * Since: 2.2 + * @newin2p2 * @param screen A Gdk::Screen. */ void set_screen(const Glib::RefPtr& screen); @@ -324,26 +326,26 @@ public: /** Returns the screen for the event. The screen is * typically the screen for event->any.window, but * for events such as mouse events, it is the screen - * where the the pointer was when the event occurs - + * where the pointer was when the event occurs - * that is, the screen which has the root window * to which event->motion.x_root and * event->motion.y_root are relative. * @return The screen for the event * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(); /** Returns the screen for the event. The screen is * typically the screen for event->any.window, but * for events such as mouse events, it is the screen - * where the the pointer was when the event occurs - + * where the pointer was when the event occurs - * that is, the screen which has the root window * to which event->motion.x_root and * event->motion.y_root are relative. * @return The screen for the event * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen() const; @@ -394,5 +396,6 @@ class Value : public Glib::Value_Boxed } // namespace Glib + #endif /* _GDKMM_EVENT_H */ diff --git a/libs/gtkmm2/gdk/gdkmm/gc.cc b/libs/gtkmm2/gdk/gdkmm/gc.cc index 456cad5f9e..eeddc82148 100644 --- a/libs/gtkmm2/gdk/gdkmm/gc.cc +++ b/libs/gtkmm2/gdk/gdkmm/gc.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -136,8 +137,19 @@ void GC_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* GC_Class::wrap_new(GObject* object) { @@ -197,130 +209,137 @@ Glib::RefPtr GC::create(const Glib::RefPtr& drawable) } void GC::set_foreground(const Color& color) { - gdk_gc_set_foreground(gobj(), (color).gobj()); +gdk_gc_set_foreground(gobj(), (color).gobj()); } void GC::set_background(const Color& color) { - gdk_gc_set_background(gobj(), (color).gobj()); +gdk_gc_set_background(gobj(), (color).gobj()); } void GC::set_function(Function function) { - gdk_gc_set_function(gobj(), ((GdkFunction)(function))); +gdk_gc_set_function(gobj(), ((GdkFunction)(function))); } void GC::set_fill(Fill fill) { - gdk_gc_set_fill(gobj(), ((GdkFill)(fill))); +gdk_gc_set_fill(gobj(), ((GdkFill)(fill))); } void GC::set_tile(const Glib::RefPtr& tile) { - gdk_gc_set_tile(gobj(), Glib::unwrap(tile)); +gdk_gc_set_tile(gobj(), Glib::unwrap(tile)); } void GC::set_stipple(const Glib::RefPtr& stipple) { - gdk_gc_set_stipple(gobj(), Glib::unwrap(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); +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); +gdk_gc_set_clip_origin(gobj(), x, y); } void GC::set_clip_mask(const Glib::RefPtr& mask) { - gdk_gc_set_clip_mask(gobj(), Glib::unwrap(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()); +gdk_gc_set_clip_rectangle(gobj(), (rectangle).gobj()); +} + +void GC::set_clip_rectangle(const Rectangle& rectangle) +{ +gdk_gc_set_clip_rectangle(gobj(), const_cast(rectangle.gobj())); } void GC::set_clip_region(const Region& region) { - gdk_gc_set_clip_region(gobj(), const_cast((region).gobj())); +gdk_gc_set_clip_region(gobj(), const_cast((region).gobj())); } void GC::set_subwindow(SubwindowMode mode) { - gdk_gc_set_subwindow(gobj(), ((GdkSubwindowMode)(mode))); +gdk_gc_set_subwindow(gobj(), ((GdkSubwindowMode)(mode))); } void GC::set_exposures(bool exposures) { - gdk_gc_set_exposures(gobj(), static_cast(exposures)); +gdk_gc_set_exposures(gobj(), static_cast(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))); +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); +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); +gdk_gc_offset(gobj(), x_offset, y_offset); } void GC::set_colormap(const Glib::RefPtr& colormap) { - gdk_gc_set_colormap(gobj(), Glib::unwrap(colormap)); +gdk_gc_set_colormap(gobj(), Glib::unwrap(colormap)); } Glib::RefPtr GC::get_colormap() { Glib::RefPtr 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()); +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()); +gdk_gc_set_rgb_bg_color(gobj(), (color).gobj()); } Glib::RefPtr GC::get_screen() { Glib::RefPtr 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 GC::get_screen() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_gc_get_screen(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_screen(); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/gc.h b/libs/gtkmm2/gdk/gdkmm/gc.h index 854995eee5..5c156d706e 100644 --- a/libs/gtkmm2/gdk/gdkmm/gc.h +++ b/libs/gtkmm2/gdk/gdkmm/gc.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_GC_H #define _GDKMM_GC_H + #include /* $Id$ */ @@ -469,6 +470,9 @@ public: * @param mask A bitmap. */ void set_clip_mask(const Glib::RefPtr& mask); + + /** @deprecated Use set_clip_rectangle(const Rectangle& rectangle) instead. + */ /** Sets the clip mask for a graphics context from a * rectangle. The clip mask is interpreted relative to the clip @@ -477,6 +481,14 @@ public: */ void set_clip_rectangle(Rectangle& rectangle); + /** 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(const 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()). @@ -574,14 +586,14 @@ public: /** Gets the Gdk::Screen for which @a gc was created * @return The Gdk::Screen for @a gc . * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(); /** Gets the Gdk::Screen for which @a gc was created * @return The Gdk::Screen for @a gc . * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen() const; @@ -590,11 +602,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/general.cc b/libs/gtkmm2/gdk/gdkmm/general.cc index f07cce2b14..48729f95a8 100644 --- a/libs/gtkmm2/gdk/gdkmm/general.cc +++ b/libs/gtkmm2/gdk/gdkmm/general.cc @@ -50,5 +50,35 @@ void flush() gdk_flush(); } +namespace Cairo +{ + +void set_source_color(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color) +{ + gdk_cairo_set_source_color(context->cobj(), const_cast(color.gobj())); +} + +void set_source_pixbuf(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr& pixbuf, double pixbuf_x, double pixbuf_y) +{ + gdk_cairo_set_source_pixbuf(context->cobj(), pixbuf->gobj(), pixbuf_x, pixbuf_y); +} + +void set_source_pixmap(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr& pixmap, double pixmap_x, double pixmap_y) +{ + gdk_cairo_set_source_pixmap(context->cobj(), pixmap->gobj(), pixmap_x, pixmap_y); +} + +void rectangle(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangle& rectangle) +{ + gdk_cairo_rectangle(context->cobj(), const_cast(rectangle.gobj())); +} + +void region(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Region& region) +{ + gdk_cairo_region(context->cobj(), const_cast(region.gobj())); +} + +} //namespace Cairo + } //namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/general.h b/libs/gtkmm2/gdk/gdkmm/general.h index 1d37ab0e3b..b5b6164a8d 100644 --- a/libs/gtkmm2/gdk/gdkmm/general.h +++ b/libs/gtkmm2/gdk/gdkmm/general.h @@ -20,6 +20,9 @@ #ifndef _GDKMM_GENERAL_H #define _GDKMM_GENERAL_H +#include +#include + namespace Gdk { @@ -31,6 +34,59 @@ int screen_height_mm(); void flush(); +namespace Cairo +{ + +/** Sets the specified Gdk::Color as the source color of the Cairo context. + * @param @context The cairo context. + * @param color The color to use as the source color. + * + * @newin2p10 + */ +void set_source_color(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color); + +/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y. + * @param @context The cairo context. + * @param pixbuf A Gdk::Pixbuf + * @param pixbuf_x X coordinate of location to place upper left corner of pixbuf. + * @param pixbuf_y Y coordinate of location to place upper left corner of pixbuf. + * + * @newin2p10 + */ +void set_source_pixbuf(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr& pixbuf, double pixbuf_x, double pixbuf_y); + +/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixmap_x, pixmap_y. + * @param @context The cairo context. + * @param pixmap A Gdk::Pixmap + * @param pixmap_x X coordinate of location to place upper left corner of pixmap. + * @param pixmap_y Y coordinate of location to place upper left corner of pixmap. + * + * @newin2p10 + */ +void set_source_pixmap(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr& pixmap, double pixmap_x, double pixmap_y); + +//TODO: Rename to add_rectangle_to_context_path and add_region_to_context_path(), and deprecate rectangle() and region()? + +/** Adds the given rectangle to the current path of the context. + * + * @param context A cairo context. + * @param rectangle A rectangle to add to the path of the context. + * + * @newin2p10 + */ +void rectangle(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangle& rectangle); + +/** Adds the given region to the current path of the context. + * + * @param context A cairo context. + * @param region A region to add to the path of the context. + * + * @newin2p10 + */ +void region(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Region& region); + +} //namespace Cairo + } //namespace Gdk #endif //_GDKMM_GENERAL_H diff --git a/libs/gtkmm2/gdk/gdkmm/image.cc b/libs/gtkmm2/gdk/gdkmm/image.cc index 787124f36f..0899ae0723 100644 --- a/libs/gtkmm2/gdk/gdkmm/image.cc +++ b/libs/gtkmm2/gdk/gdkmm/image.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -91,8 +92,19 @@ void Image_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Image_Class::wrap_new(GObject* object) { @@ -141,7 +153,7 @@ Glib::RefPtr Image::create(ImageType type, const Glib::RefPtr& vi } void Image::put_pixel(int x, int y, guint32 pixel) { - gdk_image_put_pixel(gobj(), x, y, pixel); +gdk_image_put_pixel(gobj(), x, y, pixel); } guint32 Image::get_pixel(int x, int y) const @@ -151,35 +163,30 @@ guint32 Image::get_pixel(int x, int y) const void Image::set_colormap(const Glib::RefPtr& colormap) { - gdk_image_set_colormap(gobj(), Glib::unwrap(colormap)); +gdk_image_set_colormap(gobj(), Glib::unwrap(colormap)); } Glib::RefPtr Image::get_colormap() { Glib::RefPtr 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 Image::get_colormap() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_image_get_colormap(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_colormap(); } -ImageType Image::get_image_type() const + ImageType Image::get_image_type() const { return ((ImageType)(gobj()->type)); } - -Glib::RefPtr Image::get_visual() + + Glib::RefPtr Image::get_visual() { Glib::RefPtr ref_ptr(Glib::wrap(gobj()->visual)); @@ -198,38 +205,38 @@ Glib::RefPtr Image::get_visual() const return ref_ptr; } - -ByteOrder Image::get_byte_order() const + + ByteOrder Image::get_byte_order() const { return ((ByteOrder)(gobj()->byte_order)); } - -int Image::get_width() const + + int Image::get_width() const { return gobj()->width; } - -int Image::get_height() const + + int Image::get_height() const { return gobj()->height; } - -guint16 Image::get_bpp() const + + guint16 Image::get_bpp() const { return gobj()->bpp; } - -guint16 Image::get_bpl() const + + guint16 Image::get_bpl() const { return gobj()->bpl; } - -guint16 Image::get_bits_per_pixel() const + + guint16 Image::get_bits_per_pixel() const { return gobj()->bits_per_pixel; } - -void* Image::get_mem() + + void* Image::get_mem() { return gobj()->mem; } @@ -238,11 +245,18 @@ const void* Image::get_mem() const { return (const void*)(gobj()->mem); } - -void* Image::get_windowing_data() const + + void* Image::get_windowing_data() const { return gobj()->windowing_data; } + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/image.h b/libs/gtkmm2/gdk/gdkmm/image.h index 7d5f8f6078..5b9fa7f33b 100644 --- a/libs/gtkmm2/gdk/gdkmm/image.h +++ b/libs/gtkmm2/gdk/gdkmm/image.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_IMAGE_H #define _GDKMM_IMAGE_H + #include /* $Id$ */ @@ -150,12 +151,12 @@ public: static Glib::RefPtr create(ImageType type, const Glib::RefPtr& visual, int width, int height); - //We ignore gdk_image_new_bitmap() because the documentation says that it is incredibly broken. + //We ignore gdk_image_new_bitmap() because the documentation says that it is deprecated. void put_pixel(int x, int y, guint32 pixel); - guint32 get_pixel(int x, int y) const; + 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 @@ -182,33 +183,39 @@ public: */ Glib::RefPtr get_colormap() const; - ImageType get_image_type() const; - Glib::RefPtr get_visual(); + ImageType get_image_type() const; + Glib::RefPtr get_visual(); Glib::RefPtr 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; - + 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(); + void* get_mem(); const void* get_mem() const; - + //TODO: This should be const really. - void* get_windowing_data() const; - + void* get_windowing_data() const; + public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/pixbuf.cc b/libs/gtkmm2/gdk/gdkmm/pixbuf.cc index 8a486d3cc9..4a97b5dac9 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbuf.cc +++ b/libs/gtkmm2/gdk/gdkmm/pixbuf.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -32,19 +33,23 @@ namespace { -void pixbuf_destroy_data_callback(guint8* pixels, void* user_data) +static void pixbuf_destroy_data_callback(guint8* pixels, void* user_data) { Gdk::Pixbuf::SlotDestroyData *const slot = static_cast(user_data); g_return_if_fail(slot != 0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED (*slot)(pixels); // invoke callback + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED delete slot; } @@ -75,28 +80,6 @@ Pixbuf::Pixbuf(const Glib::RefPtr& src, 0, src->gobj(), cmap->gobj(), src_x, src_y, dest_x, dest_y, width, height)) {} -Glib::RefPtr 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::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::create_from_data(const guint8* data, Colorspace colorspace, bool has_alpha, int bits_per_sample, @@ -121,17 +104,6 @@ Glib::RefPtr Pixbuf::create_from_data(const guint8* data, Colorspace col return Glib::wrap(pixbuf); } -Glib::RefPtr 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, Glib::RefPtr& pixmap_return, Glib::RefPtr& mask_return, @@ -160,45 +132,104 @@ void Pixbuf::render_pixmap_and_mask(Glib::RefPtr& pixmap_return, mask_return = Glib::RefPtr::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); +#ifdef GLIBMM_EXCEPTIONS_ENABLED +void Pixbuf::save(const std::string& filename, const Glib::ustring& type) +#else +void Pixbuf::save(const std::string& filename, const Glib::ustring& type, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + gdk_pixbuf_savev(gobj(), filename.c_str(), type.c_str(), 0, 0, &gerror); + +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED } + +#ifdef GLIBMM_EXCEPTIONS_ENABLED void Pixbuf::save(const std::string& filename, const Glib::ustring& type, const Glib::StringArrayHandle& option_keys, const Glib::StringArrayHandle& option_values) +#else +void Pixbuf::save(const std::string& filename, const Glib::ustring& type, + const Glib::StringArrayHandle& option_keys, + const Glib::StringArrayHandle& option_values, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError* error = 0; + GError* gerror = 0; gdk_pixbuf_savev( gobj(), filename.c_str(), type.c_str(), const_cast(option_keys.data()), const_cast(option_values.data()), - &error); + &gerror); - if(error) - Glib::Error::throw_exception(error); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED } + +#ifdef GLIBMM_EXCEPTIONS_ENABLED +void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size, + const Glib::ustring& type) +#else +void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size, + const Glib::ustring& type, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + + gdk_pixbuf_save_to_buffer( + gobj(), &buffer, &buffer_size, + type.c_str(), + &gerror, NULL); + +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED +} + +#ifdef GLIBMM_EXCEPTIONS_ENABLED void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size, const Glib::ustring& type, const Glib::StringArrayHandle& option_keys, const Glib::StringArrayHandle& option_values) +#else +void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size, + const Glib::ustring& type, + const Glib::StringArrayHandle& option_keys, + const Glib::StringArrayHandle& option_values, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError* error = 0; + GError* gerror = 0; gdk_pixbuf_save_to_bufferv( gobj(), &buffer, &buffer_size, type.c_str(), const_cast(option_keys.data()), const_cast(option_values.data()), - &error); + &gerror); - if(error) - Glib::Error::throw_exception(error); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED } Pixbuf::SListHandle_PixbufFormat Pixbuf::get_formats() @@ -255,10 +286,18 @@ Gdk::PixbufError::Code Gdk::PixbufError::code() const return static_cast(Glib::Error::code()); } +#ifdef GLIBMM_EXCEPTIONS_ENABLED void Gdk::PixbufError::throw_func(GError* gobject) { throw Gdk::PixbufError(gobject); } +#else +//When not using exceptions, we just pass the Exception object around without throwing it: +std::auto_ptr Gdk::PixbufError::throw_func(GError* gobject) +{ + return std::auto_ptr(new Gdk::PixbufError(gobject)); +} +#endif //GLIBMM_EXCEPTIONS_ENABLED // static GType Glib::Value::value_type() @@ -310,8 +349,19 @@ void Pixbuf_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Pixbuf_Class::wrap_new(GObject* object) { @@ -372,16 +422,82 @@ Glib::RefPtr Pixbuf::create(Colorspace colorspace, bool has_alpha, int b return Glib::wrap(gdk_pixbuf_new(((GdkColorspace)(colorspace)), static_cast(has_alpha), bits_per_sample, width, height)); } + Glib::RefPtr Pixbuf::create_subpixbuf(const Glib::RefPtr& 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)); } + +#ifdef GLIBMM_EXCEPTIONS_ENABLED +Glib::RefPtr Pixbuf::create_from_file(const std::string& filename) +#else +Glib::RefPtr Pixbuf::create_from_file(const std::string& filename, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + Glib::RefPtr retvalue = Glib::wrap(gdk_pixbuf_new_from_file(filename.c_str(), &(gerror))); + +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + + return retvalue; +} + + +#ifdef GLIBMM_EXCEPTIONS_ENABLED +Glib::RefPtr Pixbuf::create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio) +#else +Glib::RefPtr Pixbuf::create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + Glib::RefPtr retvalue = Glib::wrap(gdk_pixbuf_new_from_file_at_scale(filename.c_str(), width, height, static_cast(preserve_aspect_ratio), &(gerror))); + +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + + return retvalue; +} + + Glib::RefPtr Pixbuf::create_from_xpm_data(const char *const * data) { return Glib::wrap(gdk_pixbuf_new_from_xpm_data(const_cast(data))); } + +#ifdef GLIBMM_EXCEPTIONS_ENABLED +Glib::RefPtr Pixbuf::create_from_inline(int data_length, const guint8* data, bool copy_pixels) +#else +Glib::RefPtr Pixbuf::create_from_inline(int data_length, const guint8* data, bool copy_pixels, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + Glib::RefPtr retvalue = Glib::wrap(gdk_pixbuf_new_from_inline(data_length, data, static_cast(copy_pixels), &(gerror))); + +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + + return retvalue; +} + + Colorspace Pixbuf::get_colorspace() const { return ((Colorspace)(gdk_pixbuf_get_colorspace(const_cast(gobj())))); @@ -424,7 +540,7 @@ int Pixbuf::get_rowstride() const void Pixbuf::fill(guint32 pixel) { - gdk_pixbuf_fill(gobj(), pixel); +gdk_pixbuf_fill(gobj(), pixel); } Glib::RefPtr Pixbuf::add_alpha(bool substitute_color, guint8 r, guint8 g, guint8 b) const @@ -434,27 +550,27 @@ Glib::RefPtr Pixbuf::add_alpha(bool substitute_color, guint8 r, gui void Pixbuf::copy_area(int src_x, int src_y, int width, int height, const Glib::RefPtr& dest_pixbuf, int dest_x, int dest_y) const { - gdk_pixbuf_copy_area(const_cast(gobj()), src_x, src_y, width, height, Glib::unwrap(dest_pixbuf), dest_x, dest_y); +gdk_pixbuf_copy_area(const_cast(gobj()), src_x, src_y, width, height, Glib::unwrap(dest_pixbuf), dest_x, dest_y); } void Pixbuf::saturate_and_pixelate(const Glib::RefPtr& dest, float saturation, bool pixelate) const { - gdk_pixbuf_saturate_and_pixelate(const_cast(gobj()), Glib::unwrap(dest), saturation, static_cast(pixelate)); +gdk_pixbuf_saturate_and_pixelate(const_cast(gobj()), Glib::unwrap(dest), saturation, static_cast(pixelate)); } void Pixbuf::scale(const Glib::RefPtr& 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(gobj()), Glib::unwrap(dest), dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, ((GdkInterpType)(interp_type))); +gdk_pixbuf_scale(const_cast(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& 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(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); +gdk_pixbuf_composite(const_cast(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& 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(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); +gdk_pixbuf_composite_color(const_cast(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 Pixbuf::scale_simple(int dest_width, int dest_height, InterpType interp_type) const @@ -479,17 +595,17 @@ Glib::RefPtr Pixbuf::flip(bool horizontal) const void Pixbuf::render_threshold_alpha(const Glib::RefPtr& 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); +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, const Glib::RefPtr& 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); +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, 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); +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 @@ -498,6 +614,13 @@ Glib::ustring Pixbuf::get_option(const Glib::ustring& key) const } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/pixbuf.h b/libs/gtkmm2/gdk/gdkmm/pixbuf.h index 712020a8b1..fb4a066ef6 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbuf.h +++ b/libs/gtkmm2/gdk/gdkmm/pixbuf.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_PIXBUF_H #define _GDKMM_PIXBUF_H + #include /* $Id$ */ @@ -191,7 +192,14 @@ public: #ifndef DOXYGEN_SHOULD_SKIP_THIS private: + +#ifdef GLIBMM_EXCEPTIONS_ENABLED static void throw_func(GError* gobject); +#else + //When not using exceptions, we just pass the Exception object around without throwing it: + static std::auto_ptr throw_func(GError* gobject); +#endif //GLIBMM_EXCEPTIONS_ENABLED + friend void wrap_init(); // uses throw_func() #endif }; @@ -279,7 +287,7 @@ private: protected: - //TODO: Documente these, based on the docs for the C functions. + //TODO: Document these, based on the docs for the C functions. Pixbuf(const Glib::RefPtr& src, const Glib::RefPtr& cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height); Pixbuf(const Glib::RefPtr& src, const Glib::RefPtr& cmap, @@ -342,7 +350,23 @@ public: * @throw Glib::FileError * @throw Gdk::PixbufError */ + + /** Creates a new pixbuf by loading an image from a file. The file format is + * detected automatically. If 0 is returned, then @a error will be set. + * Possible errors are in the Gdk::PIXBUF_ERROR and G::FILE_ERROR domains. + * @param filename Name of file to load, in the GLib file name encoding. + * @param error Return location for an error. + * @return A newly-created pixbuf with a reference count of 1, or 0 if + * any of several error conditions occurred: the file could not be opened, + * there was no loader for the file's format, there was not enough memory to + * allocate the image buffer, or the image file contained invalid data. + */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED static Glib::RefPtr create_from_file(const std::string& filename); +#else + static Glib::RefPtr create_from_file(const std::string& filename, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** 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. @@ -354,8 +378,38 @@ public: * @throw Glib::FileError * @throw Gdk::PixbufError */ - static Glib::RefPtr create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio = true); + /** Creates a new pixbuf by loading an image from a file. The file format is + * detected automatically. If 0 is returned, then @a error will be set. + * Possible errors are in the Gdk::PIXBUF_ERROR and G::FILE_ERROR domains. + * The image will be scaled to fit in the requested size, optionally preserving + * the image's aspect ratio. + * + * When preserving the aspect ratio, a @a width of -1 will cause the image + * to be scaled to the exact given height, and a @a height of -1 will cause + * the image to be scaled to the exact given width. When not preserving + * aspect ratio, a @a width or @a height of -1 means to not scale the image + * at all in that dimension. Negative values for @a width and @a height are + * allowed since 2.8. + * @param filename Name of file to load, in the GLib file name encoding. + * @param width The width the image should have or -1 to not constrain the width. + * @param height The height the image should have or -1 to not constrain the height. + * @param preserve_aspect_ratio true to preserve the image's aspect ratio. + * @param error Return location for an error. + * @return A newly-created pixbuf with a reference count of 1, or 0 + * if any of several error conditions occurred: the file could not be opened, + * there was no loader for the file's format, there was not enough memory to + * allocate the image buffer, or the image file contained invalid data. + * + * @newin2p6. + */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED + static Glib::RefPtr create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio = true); +#else + static Glib::RefPtr create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + + //gdk_pixbuf_new_from_file_at_size() just calls gdk_pixbuf_new_from_file_at_scale(). /** Creates a new Gdk::Pixbuf out of in-memory image data. * Currently only RGB images with 8 bits per sample are supported. @@ -428,10 +482,55 @@ public: * to @a data for the resulting pixbuf. * @throw Gdk::PixbufError */ + + /** 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 <command>gdk-pixbuf-csource</command> + * which allows for conversion of Gdk::Pixbufs into such a inline representation. + * In almost all cases, you should pass the <option>--raw</option> flag to + * <command>gdk-pixbuf-csource</command>. A sample invocation would be: + * + * @code + * gdk-pixbuf-csource --raw --name=myimage_inline myimage.png + * @endcode + * + * 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 false for @a copy_pixels . (If you pass + * <option>--rle</option> to <command>gdk-pixbuf-csource</command>, a copy + * will be made even if @a copy_pixels is false, 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 and disable length checks, + * since things will always succeed: + * @code + * pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, false, 0); + * @endcode + * + * 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 or -1 to + * disable length checks. + * @param data Byte data containing a serialized Gdk::Pixdata structure. + * @param copy_pixels Whether to copy the pixel data, or use direct pointers + * @a data for the resulting pixbuf. + * @param error G::Error return location, may be 0 to ignore errors. + * @return A newly-created Gdk::Pixbuf structure with a reference, + * count of 1, or 0 if an error occurred. + */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED static Glib::RefPtr create_from_inline(int data_length, const guint8* data, bool copy_pixels = false); +#else + static Glib::RefPtr create_from_inline(int data_length, const guint8* data, bool copy_pixels, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + - /** Queries the color space of a pixbuf. * @return Color space. */ @@ -485,21 +584,56 @@ public: */ void fill(guint32 pixel); - /** Save an image file. + /** Saves pixbuf to a file in format @a type. + * By default, "jpeg", "png", "ico" and "bmp" are possible file formats to save in, but more formats may be installed. + * TThe list of all writable formats can be determined by using Gdk::Pixbuf::get_formats() with + * Gdk::PixbufFormat::is_writable(). + * + * @param filename The path of the file to be created. + * @param type The file type. + * * @throw Glib::FileError * @throw Gdk::PixbufError */ + #ifdef GLIBMM_EXCEPTIONS_ENABLED void save(const std::string& filename, const Glib::ustring& type); + #else + void save(const std::string& filename, const Glib::ustring& type, std::auto_ptr& error); + #endif //GLIBMM_EXCEPTIONS_ENABLED - /** Save an image file. + /** Saves pixbuf to a file in format @a type. + * By default, "jpeg", "png", "ico" and "bmp" are possible file formats to save in, but more formats may be installed. + * TThe list of all writable formats can be determined by using Gdk::Pixbuf::get_formats() with + * Gdk::PixbufFormat::is_writable(). + * + * The @a option_keys and @option_values, if not empty, should contain pairs of strings that modify the save parameters. + * For example, "quality", "100". + * + * Currently only a few parameters exist. JPEG images can be saved with a "quality" parameter; + * its value should be in the range [0,100]. Text chunks can be attached to PNG images by specifying parameters of the + * form "tEXt::key", where key is an ASCII string of length 1-79. The values are UTF-8 encoded strings. ICO images can be + * saved in depth 16, 24, or 32, by using the "depth" parameter. When the ICO saver is given "x_hot" and "y_hot" + * parameters, it produces a CUR instead of an ICO. + * + * @param filename The path of the file to be created. + * @param type The file type. + * @param option_keys + * @param option_values + * * @throw Glib::FileError * @throw Gdk::PixbufError */ + #ifdef GLIBMM_EXCEPTIONS_ENABLED void save(const std::string& filename, const Glib::ustring& type, const Glib::StringArrayHandle& option_keys, const Glib::StringArrayHandle& option_values); - + #else + void save(const std::string& filename, const Glib::ustring& type, + const Glib::StringArrayHandle& option_keys, + const Glib::StringArrayHandle& option_values, std::auto_ptr& error); + #endif //GLIBMM_EXCEPTIONS_ENABLED + /* TODO: typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf, @@ -524,10 +658,47 @@ gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf, */ + /* Saves the pixbuf to a new buffer in format @a type. + * Note that the buffer is not nul-terminated and may contain embedded nulls. + * @see save(). + * + * @param buffer This will be set to the address of a new buffer. + * @param size This will be set to the size of the @a buffer. + * @param type Currently "jpeg", "png", "ico" or "bmp". + * + * @throw Glib::FileError + * @throw Gdk::PixbufError + */ + #ifdef GLIBMM_EXCEPTIONS_ENABLED + void save_to_buffer(gchar*& buffer, gsize& buffer_size, + const Glib::ustring& type = "png"); + #else + void save_to_buffer(gchar*& buffer, gsize& buffer_size, + const Glib::ustring& type, std::auto_ptr& error); + #endif //GLIBMM_EXCEPTIONS_ENABLED + + /* Saves the pixbuf to a new buffer in format @a type. + * Note that the buffer is not nul-terminated and may contain embedded nulls. + * @see save(). + * + * @param buffer This will be set to the address of a new buffer. + * @param size This will be set to the size of the @a buffer. + * @param type Currently "jpeg", "png", "ico" or "bmp". + * + * @throw Glib::FileError + * @throw Gdk::PixbufError + */ + #ifdef GLIBMM_EXCEPTIONS_ENABLED void save_to_buffer(gchar*& buffer, gsize& buffer_size, const Glib::ustring& type, const Glib::StringArrayHandle& option_keys, const Glib::StringArrayHandle& option_values); + #else + void save_to_buffer(gchar*& buffer, gsize& buffer_size, + const Glib::ustring& type, + const Glib::StringArrayHandle& option_keys, + const Glib::StringArrayHandle& option_values, std::auto_ptr& error); + #endif //GLIBMM_EXCEPTIONS_ENABLED /** Takes an existing pixbuf and adds an alpha channel to it. @@ -732,7 +903,7 @@ gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf, * @param angle The angle to rotate by. * @return A new pixbuf * - * Since: 2.6. + * @newin2p6. */ Glib::RefPtr rotate_simple(PixbufRotation angle) const; @@ -741,7 +912,7 @@ gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf, * @param horizontal true to flip horizontally, false to flip vertically. * @return A new pixbuf. * - * Since: 2.6. + * @newin2p6. */ Glib::RefPtr flip(bool horizontal = true) const; @@ -857,11 +1028,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc index a558a55044..4f9421f301 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc +++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -87,8 +88,19 @@ void PixbufAnimation_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* PixbufAnimation_Class::wrap_new(GObject* object) { @@ -150,23 +162,30 @@ Glib::RefPtr PixbufAnimation::get_static_image() { Glib::RefPtr 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 PixbufAnimation::get_iter(const GTimeVal* start_time) { Glib::RefPtr 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; + } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h index dd5afec672..c30d72eae0 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h +++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_PIXBUFANIMATION_H #define _GDKMM_PIXBUFANIMATION_H + #include /* $Id$ */ @@ -167,11 +168,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc index 60046e4eff..404a0317b9 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc +++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -74,8 +75,19 @@ void PixbufAnimationIter_Class::class_init_function(void* g_class, void* class_d BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* PixbufAnimationIter_Class::wrap_new(GObject* object) { @@ -118,6 +130,13 @@ GType PixbufAnimationIter::get_base_type() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h index ceba0da1e9..7223a4baec 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h +++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_PIXBUFANIMATIONITER_H #define _GDKMM_PIXBUFANIMATIONITER_H + #include /* $Id$ */ @@ -93,11 +94,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc b/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc index 63dc4c43a4..da97fac330 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc +++ b/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -104,7 +105,7 @@ bool PixbufFormat::is_disabled() const void PixbufFormat::set_disabled(bool disabled) { - gdk_pixbuf_format_set_disabled(gobj(), static_cast(disabled)); +gdk_pixbuf_format_set_disabled(gobj(), static_cast(disabled)); } Glib::ustring PixbufFormat::get_license() const diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufformat.h b/libs/gtkmm2/gdk/gdkmm/pixbufformat.h index b9adddf08d..bff60da222 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufformat.h +++ b/libs/gtkmm2/gdk/gdkmm/pixbufformat.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_PIXBUFFORMAT_H #define _GDKMM_PIXBUFFORMAT_H + #include /* $Id$ */ @@ -58,14 +59,14 @@ public: /** Returns the name of the format. * @return The name of the format. * - * Since: 2.2. + * @newin2p2. */ Glib::ustring get_name() const; /** Returns a description of the format. * @return A description of the format. * - * Since: 2.2. + * @newin2p2. */ Glib::ustring get_description() const; @@ -73,7 +74,7 @@ public: * @return A 0-terminated array of mime types which must be freed with * Glib::strfreev() when it is no longer needed. * - * Since: 2.2. + * @newin2p2. */ Glib::StringArrayHandle get_mime_types() const; @@ -82,14 +83,14 @@ public: * @return A 0-terminated array of filename extensions which must be * freed with Glib::strfreev() when it is no longer needed. * - * Since: 2.2. + * @newin2p2. */ 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. + * @newin2p2. */ bool is_writable() const; @@ -100,7 +101,7 @@ public: * resulting pixbuf to the desired size. * @return Whether this image format is scalable. * - * Since: 2.6. + * @newin2p6. */ bool is_scalable() const; @@ -108,7 +109,7 @@ public: * gdk_pixbuf_format_set_disabled(). * @return Whether this image format is disabled. * - * Since: 2.6. + * @newin2p6. */ bool is_disabled() const; @@ -117,7 +118,7 @@ public: * images. Applications can use this to avoid using image loaders * with an inappropriate license, see gdk_pixbuf_format_get_license(). * - * Since: 2.6 + * @newin2p6 * @param disabled true to disable the format @a format . */ void set_disabled(bool disabled = true); @@ -128,7 +129,7 @@ public: * or "other" to indicate some other license. * @return A string describing the license of @a format . * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_license() const; diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc b/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc index 41af07e520..cd0022326b 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc +++ b/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -33,15 +34,15 @@ 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) +static GdkPixbufLoader* pixbuf_loader_create_with_type(const Glib::ustring& image_type, bool mime_type) { GError* error = 0; - GdkPixbufLoader *const loader = 0; - + GdkPixbufLoader* loader = 0; + if(mime_type) - gdk_pixbuf_loader_new_with_mime_type(image_type.c_str(), &error); + loader = gdk_pixbuf_loader_new_with_mime_type(image_type.c_str(), &error); else - gdk_pixbuf_loader_new_with_type(image_type.c_str(), &error); + loader = gdk_pixbuf_loader_new_with_type(image_type.c_str(), &error); if(error) Glib::Error::throw_exception(error); @@ -61,31 +62,14 @@ PixbufLoader::PixbufLoader(const Glib::ustring& image_type, bool mime_type) 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 = + +static const Glib::SignalProxyInfo PixbufLoader_signal_area_prepared_info = { "area_prepared", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -93,7 +77,7 @@ const Glib::SignalProxyInfo PixbufLoader_signal_area_prepared_info = }; -void PixbufLoader_signal_area_updated_callback(GdkPixbufLoader* self, gint p0,gint p1,gint p2,gint p3,void* data) +static 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; @@ -101,23 +85,27 @@ void PixbufLoader_signal_area_updated_callback(GdkPixbufLoader* self, gint p0,gi // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 , p2 , p3 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo PixbufLoader_signal_area_updated_info = +static const Glib::SignalProxyInfo PixbufLoader_signal_area_updated_info = { "area_updated", (GCallback) &PixbufLoader_signal_area_updated_callback, @@ -125,7 +113,7 @@ const Glib::SignalProxyInfo PixbufLoader_signal_area_updated_info = }; -const Glib::SignalProxyInfo PixbufLoader_signal_closed_info = +static const Glib::SignalProxyInfo PixbufLoader_signal_closed_info = { "closed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -133,7 +121,7 @@ const Glib::SignalProxyInfo PixbufLoader_signal_closed_info = }; -void PixbufLoader_signal_size_prepared_callback(GdkPixbufLoader* self, gint p0,gint p1,void* data) +static void PixbufLoader_signal_size_prepared_callback(GdkPixbufLoader* self, gint p0,gint p1,void* data) { using namespace Gdk; typedef sigc::slot< void,int,int > SlotType; @@ -141,27 +129,32 @@ void PixbufLoader_signal_size_prepared_callback(GdkPixbufLoader* self, gint p0,g // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo PixbufLoader_signal_size_prepared_info = +static const Glib::SignalProxyInfo PixbufLoader_signal_size_prepared_info = { "size_prepared", (GCallback) &PixbufLoader_signal_size_prepared_callback, (GCallback) &PixbufLoader_signal_size_prepared_callback }; + } // anonymous namespace @@ -208,12 +201,20 @@ void PixbufLoader_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->area_prepared = &area_prepared_callback; klass->area_updated = &area_updated_callback; klass->closed = &closed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void PixbufLoader_Class::area_prepared_callback(GdkPixbufLoader* self) { CppObjectType *const obj = dynamic_cast( @@ -226,15 +227,19 @@ void PixbufLoader_Class::area_prepared_callback(GdkPixbufLoader* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_area_prepared(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -247,7 +252,6 @@ void PixbufLoader_Class::area_prepared_callback(GdkPixbufLoader* self) (*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( @@ -260,19 +264,23 @@ void PixbufLoader_Class::area_updated_callback(GdkPixbufLoader* self, gint p0, g // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_area_updated(p0 , p1 , p2 , p3 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -285,7 +293,6 @@ void PixbufLoader_Class::area_updated_callback(GdkPixbufLoader* self, gint p0, g (*base->area_updated)(self, p0, p1, p2, p3); } } - void PixbufLoader_Class::closed_callback(GdkPixbufLoader* self) { CppObjectType *const obj = dynamic_cast( @@ -298,15 +305,19 @@ void PixbufLoader_Class::closed_callback(GdkPixbufLoader* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_closed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -319,6 +330,7 @@ void PixbufLoader_Class::closed_callback(GdkPixbufLoader* self) (*base->closed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* PixbufLoader_Class::wrap_new(GObject* object) @@ -379,27 +391,65 @@ Glib::RefPtr PixbufLoader::create(const Glib::ustring& image_type, } void PixbufLoader::set_size(int width, int height) { - gdk_pixbuf_loader_set_size(gobj(), width, height); +gdk_pixbuf_loader_set_size(gobj(), width, height); +} + +#ifdef GLIBMM_EXCEPTIONS_ENABLED +void PixbufLoader::write(const guint8* buf, gsize count) +#else +void PixbufLoader::write(const guint8* buf, gsize count, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + gdk_pixbuf_loader_write(gobj(), (buf), count, &(gerror)); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + + +} + +#ifdef GLIBMM_EXCEPTIONS_ENABLED +void PixbufLoader::close() +#else +void PixbufLoader::close(std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED +{ + GError* gerror = 0; + gdk_pixbuf_loader_close(gobj(), &(gerror)); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + + } Glib::RefPtr PixbufLoader::get_pixbuf() { Glib::RefPtr 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 PixbufLoader::get_animation() { Glib::RefPtr 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 @@ -413,22 +463,26 @@ 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gdk::PixbufLoader::on_area_prepared() { BaseClassType *const base = static_cast( @@ -438,7 +492,6 @@ void Gdk::PixbufLoader::on_area_prepared() 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( @@ -448,7 +501,6 @@ void Gdk::PixbufLoader::on_area_updated(int x, int y, int width, int height) if(base && base->area_updated) (*base->area_updated)(gobj(),x,y,width,height); } - void Gdk::PixbufLoader::on_closed() { BaseClassType *const base = static_cast( @@ -458,6 +510,10 @@ void Gdk::PixbufLoader::on_closed() if(base && base->closed) (*base->closed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufloader.h b/libs/gtkmm2/gdk/gdkmm/pixbufloader.h index c89288740f..1df9791c95 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixbufloader.h +++ b/libs/gtkmm2/gdk/gdkmm/pixbufloader.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_PIXBUFLOADER_H #define _GDKMM_PIXBUFLOADER_H + #include /* $Id$ */ @@ -106,12 +107,17 @@ protected: * and here: * http://www.freedesktop.org/Software/shared-mime-info * + * The list of non-mime-type image formats depends on what image loaders + * are installed, but typically "png", "jpeg", "gif", "tiff" and + * "xpm" are among the supported formats. To obtain the full list of + * supported image formats, call PixbufFormat::get_name() on each + * of the PixbufFormats returned by Gdk::Pixbuf::get_formats(). + * * @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: @@ -136,6 +142,12 @@ public: * and here: * http://www.freedesktop.org/Software/shared-mime-info * + * The list of non-mime-type image formats depends on what image loaders + * are installed, but typically "png", "jpeg", "gif", "tiff" and + * "xpm" are among the supported formats. To obtain the full list of + * supported image formats, call PixbufFormat::get_name() on each + * of the PixbufFormats returned by Gdk::Pixbuf::get_formats(). + * * @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 @@ -152,12 +164,13 @@ public: * Attempts to set the desired image size are ignored after the * emission of the ::size_prepared signal. * - * Since: 2.2 + * @newin2p2 * @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 @@ -167,8 +180,25 @@ public: * @throw Gdk::PixbufError * @throw Glib::FileError */ - void write(const guint8* buf, gsize count); + /** This will cause a pixbuf loader to parse the next @a count bytes of + * an image. It will return true if the data was loaded successfully, + * and false if an error occurred. In the latter case, the loader + * will be closed, and will not accept further writes. If false is + * returned, @a error will be set to an error from the Gdk::PIXBUF_ERROR + * or G::FILE_ERROR domains. + * @param buf Pointer to image data. + * @param count Length of the @a buf buffer in bytes. + * @param error Return location for errors. + * @return true if the write was successful, or false if the loader + * cannot parse the buffer. + */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED + void write(const guint8* buf, gsize count); +#else + void write(const guint8* buf, gsize count, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Informs a pixbuf loader that no further writes with PixbufLoader::write() * will occur, so that it can free its internal loading structures. Also, @@ -179,8 +209,26 @@ public: * @throw Gdk::PixbufError * @throw Glib::FileError */ - void close(); + /** Informs a pixbuf loader that no further writes with + * 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 error will be returned. If false is returned, @a error + * will be set to an error from the Gdk::PIXBUF_ERROR or G::FILE_ERROR + * domains. If you're just cancelling a load rather than expecting it + * to be finished, passing 0 for @a error to ignore it is + * reasonable. + * @param error Return location for a G::Error, or 0 to ignore errors. + * @return true if all image data written so far was successfully + * passed out via the update_area signal. + */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED + void close(); +#else + void close(std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Queries the Gdk::Pixbuf that a pixbuf loader is currently creating. * In general it only makes sense to call this function after the @@ -214,23 +262,74 @@ public: * @return A Gdk::PixbufFormat or 0. The return value is owned * by GdkPixbuf and should not be freed. * - * Since: 2.2. + * @newin2p2. */ PixbufFormat get_format() const; + /** This signal is emitted when the pixbuf loader has allocated the + * pixbuf in the desired size. After this signal is emitted, + * applications can call get_pixbuf() to fetch + * the partially-loaded pixbuf. + */ +/** + * @par Prototype: + * void %area_prepared() + */ + Glib::SignalProxy0< void > signal_area_prepared(); + + /** This signal is emitted when a significant area of the image being + * loaded has been updated. Normally it means that a complete + * scanline has been read in, but it could be a different area as + * well. Applications can use this signal to know when to repaint + * areas of an image that is being loaded. + * + * @param X offset of upper-left corner of the updated area. + * @param y Y offset of upper-left corner of the updated area. + * @param width Width of updated area. + * @param height Height of updated area. + */ +/** + * @par Prototype: + * void %area_updated(int x, int y, int width, int height) + */ + Glib::SignalProxy4< void,int,int,int,int > signal_area_updated(); + + /** This signal is emitted when close() is called. + * It can be used by different parts of an application to receive + * notification when an image loader is closed by the code that + * drives it. + */ +/** + * @par Prototype: + * void %closed() + */ + 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. + /** This signal is emitted when the pixbuf loader has been fed the + * initial amount of data that is required to figure out the size + * of the image that it will create. Applications can call + * set_size() in response to this signal to set + * the desired size to which the image should be scaled. + * + * @param width The original width of the image. + * @param height The original height of the image + */ +/** + * @par Prototype: + * void %size_prepared(int width, int height) + */ Glib::SignalProxy2< void,int,int > signal_size_prepared(); @@ -239,14 +338,20 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_area_prepared(); virtual void on_area_updated(int x, int y, int width, int height); virtual void on_closed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/pixmap.cc b/libs/gtkmm2/gdk/gdkmm/pixmap.cc index a64cfb6aed..6dd0a8be83 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixmap.cc +++ b/libs/gtkmm2/gdk/gdkmm/pixmap.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -256,8 +257,19 @@ void Pixmap_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + /* The implementation: */ @@ -315,6 +327,13 @@ Glib::RefPtr Pixmap::create(const Glib::RefPtr& display, Native } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/pixmap.h b/libs/gtkmm2/gdk/gdkmm/pixmap.h index 6a7a1d978d..b544b063ee 100644 --- a/libs/gtkmm2/gdk/gdkmm/pixmap.h +++ b/libs/gtkmm2/gdk/gdkmm/pixmap.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_PIXMAP_H #define _GDKMM_PIXMAP_H + #include /* $Id$ */ @@ -175,11 +176,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h b/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h index 13a2e31932..fc789f605c 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h @@ -2,6 +2,10 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_BITMAP_P_H #define _GDKMM_BITMAP_P_H + + #include + + #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 index 10e8370c05..1ba0df5e77 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/color_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/color_p.h @@ -2,5 +2,7 @@ // 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 index 3ceb776d16..ffdbf36a1f 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/colormap_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/colormap_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_COLORMAP_P_H #define _GDKMM_COLORMAP_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 5400e45e0a..75fab182b0 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/cursor_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/cursor_p.h @@ -2,6 +2,10 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_CURSOR_P_H #define _GDKMM_CURSOR_P_H + + #include + + #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 index f19b9c8ccd..45f285566b 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/device_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/device_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_DEVICE_P_H #define _GDKMM_DEVICE_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 0b5ba089e0..14c310c782 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/display_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/display_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_DISPLAY_P_H #define _GDKMM_DISPLAY_P_H + + #include #include @@ -30,16 +32,21 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 25ff018c44..547ad83a47 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_DISPLAYMANAGER_P_H #define _GDKMM_DISPLAYMANAGER_P_H + + #include #include @@ -30,16 +32,21 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 13dfd57ccc..6c851e81f6 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_DRAGCONTEXT_P_H #define _GDKMM_DRAGCONTEXT_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 59e22d083e..30d3187935 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/drawable_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/drawable_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_DRAWABLE_P_H #define _GDKMM_DRAWABLE_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 999db9b7fc..df8fe3d0a3 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/event_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/event_p.h @@ -2,5 +2,7 @@ // 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 index 82725a3a1a..1631fc501d 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/gc_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/gc_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_GC_P_H #define _GDKMM_GC_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 2b6fe88d3d..4ebe7a763f 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/image_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/image_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_IMAGE_P_H #define _GDKMM_IMAGE_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 659bd0d8d7..1d6de418bd 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_PIXBUF_P_H #define _GDKMM_PIXBUF_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index ca03e440c2..a70ee93465 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_PIXBUFANIMATION_P_H #define _GDKMM_PIXBUFANIMATION_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index f7de22ffd8..259d5e222e 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_PIXBUFANIMATIONITER_P_H #define _GDKMM_PIXBUFANIMATIONITER_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 6a0b196620..4d104b942d 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h @@ -2,5 +2,7 @@ // 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 index 7bceceef72..7dfc5ac4eb 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_PIXBUFLOADER_P_H #define _GDKMM_PIXBUFLOADER_P_H + + #include #include @@ -30,18 +32,23 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 149ed76a07..048297f37c 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_PIXMAP_P_H #define _GDKMM_PIXMAP_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 51088336bb..9b3f64ee94 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h @@ -2,5 +2,7 @@ // 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 index b0a7f8cdf2..4623ed285d 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/region_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/region_p.h @@ -2,5 +2,7 @@ // 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 index d5845141c4..d290d5c492 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h @@ -2,5 +2,7 @@ // 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 index 9888f6c9db..320b05df0b 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/screen_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/screen_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_SCREEN_P_H #define _GDKMM_SCREEN_P_H + + #include #include @@ -30,16 +32,21 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index 474d473ad8..701f260a38 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/types_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/types_p.h @@ -2,5 +2,7 @@ // 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 index b11005c9db..362fb1a62b 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/visual_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/visual_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_VISUAL_P_H #define _GDKMM_VISUAL_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // 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 index c9fc8a9e85..803c224d65 100644 --- a/libs/gtkmm2/gdk/gdkmm/private/window_p.h +++ b/libs/gtkmm2/gdk/gdkmm/private/window_p.h @@ -2,6 +2,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! #ifndef _GDKMM_WINDOW_P_H #define _GDKMM_WINDOW_P_H + + #include #include @@ -30,15 +32,20 @@ public: protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //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. +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Callbacks (virtual functions): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED }; } // namespace Gdk + #endif /* _GDKMM_WINDOW_P_H */ diff --git a/libs/gtkmm2/gdk/gdkmm/rectangle.cc b/libs/gtkmm2/gdk/gdkmm/rectangle.cc index a59a22bd75..89646a4e7c 100644 --- a/libs/gtkmm2/gdk/gdkmm/rectangle.cc +++ b/libs/gtkmm2/gdk/gdkmm/rectangle.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -114,46 +115,46 @@ Rectangle::Rectangle(const GdkRectangle* gobject) } -int Rectangle::get_x() const + int Rectangle::get_x() const { return gobj()->x; } - -void Rectangle::set_x(const int& value) + + void Rectangle::set_x(const int& value) { gobj()->x = value; } - -int Rectangle::get_y() const + + int Rectangle::get_y() const { return gobj()->y; } - -void Rectangle::set_y(const int& value) + + void Rectangle::set_y(const int& value) { gobj()->y = value; } - -int Rectangle::get_width() const + + int Rectangle::get_width() const { return gobj()->width; } - -void Rectangle::set_width(const int& value) + + void Rectangle::set_width(const int& value) { gobj()->width = value; } - -int Rectangle::get_height() const + + int Rectangle::get_height() const { return gobj()->height; } - -void Rectangle::set_height(const int& value) + + 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 index 5a92e1b22d..4444645657 100644 --- a/libs/gtkmm2/gdk/gdkmm/rectangle.h +++ b/libs/gtkmm2/gdk/gdkmm/rectangle.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_RECTANGLE_H #define _GDKMM_RECTANGLE_H + #include /* $Id$ */ @@ -71,15 +72,15 @@ public: 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); - + 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); + }; @@ -109,5 +110,6 @@ class Value : public Glib::Value_Boxed } // namespace Glib + #endif /* _GDKMM_RECTANGLE_H */ diff --git a/libs/gtkmm2/gdk/gdkmm/region.cc b/libs/gtkmm2/gdk/gdkmm/region.cc index 7206c1e239..b83c9beea7 100644 --- a/libs/gtkmm2/gdk/gdkmm/region.cc +++ b/libs/gtkmm2/gdk/gdkmm/region.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -151,7 +152,7 @@ GdkRegion* Region::gobj_copy() const void Region::get_clipbox(const Rectangle& rectangle) { - gdk_region_get_clipbox(gobj(), const_cast(rectangle.gobj())); +gdk_region_get_clipbox(gobj(), const_cast(rectangle.gobj())); } bool Region::empty() @@ -171,42 +172,42 @@ OverlapType Region::rect_in(const Rectangle& rect) void Region::offset(int dx, int dy) { - gdk_region_offset(gobj(), dx, dy); +gdk_region_offset(gobj(), dx, dy); } void Region::shrink(int dx, int dy) { - gdk_region_shrink(gobj(), dx, dy); +gdk_region_shrink(gobj(), dx, dy); } void Region::union_with_rect(const Rectangle& rect) { - gdk_region_union_with_rect(gobj(), const_cast(rect.gobj())); +gdk_region_union_with_rect(gobj(), const_cast(rect.gobj())); } void Region::intersect(const Region& source2) { - gdk_region_intersect(gobj(), const_cast((source2).gobj())); +gdk_region_intersect(gobj(), const_cast((source2).gobj())); } void Region::union_(const Region& source2) { - gdk_region_union(gobj(), const_cast((source2).gobj())); +gdk_region_union(gobj(), const_cast((source2).gobj())); } void Region::subtract(const Region& source2) { - gdk_region_subtract(gobj(), const_cast((source2).gobj())); +gdk_region_subtract(gobj(), const_cast((source2).gobj())); } void Region::xor_(const Region& source2) { - gdk_region_xor(gobj(), const_cast((source2).gobj())); +gdk_region_xor(gobj(), const_cast((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(sorted), function, data); +gdk_region_spans_intersect_foreach(gobj(), spans, n_spans, static_cast(sorted), function, data); } diff --git a/libs/gtkmm2/gdk/gdkmm/region.h b/libs/gtkmm2/gdk/gdkmm/region.h index bcea009aa7..af0d2647f9 100644 --- a/libs/gtkmm2/gdk/gdkmm/region.h +++ b/libs/gtkmm2/gdk/gdkmm/region.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_REGION_H #define _GDKMM_REGION_H + #include /* $Id$ */ @@ -230,5 +231,6 @@ Gdk::Region wrap(GdkRegion* object, bool take_copy = false); } // namespace Glib + #endif /* _GDKMM_REGION_H */ diff --git a/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc b/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc index 84a87d5439..a3ef2a99d8 100644 --- a/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc +++ b/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include diff --git a/libs/gtkmm2/gdk/gdkmm/rgbcmap.h b/libs/gtkmm2/gdk/gdkmm/rgbcmap.h index 0f01f1e619..a9a72a1366 100644 --- a/libs/gtkmm2/gdk/gdkmm/rgbcmap.h +++ b/libs/gtkmm2/gdk/gdkmm/rgbcmap.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_RGBCMAP_H #define _GDKMM_RGBCMAP_H + #include /* $Id$ */ diff --git a/libs/gtkmm2/gdk/gdkmm/screen.cc b/libs/gtkmm2/gdk/gdkmm/screen.cc index 0b64a27a59..b41daef539 100644 --- a/libs/gtkmm2/gdk/gdkmm/screen.cc +++ b/libs/gtkmm2/gdk/gdkmm/screen.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -40,13 +41,15 @@ namespace Gdk namespace { -const Glib::SignalProxyInfo Screen_signal_size_changed_info = + +static const Glib::SignalProxyInfo Screen_signal_size_changed_info = { "size-changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -93,10 +96,18 @@ void Screen_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->size_changed = &size_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Screen_Class::size_changed_callback(GdkScreen* self) { CppObjectType *const obj = dynamic_cast( @@ -109,15 +120,19 @@ void Screen_Class::size_changed_callback(GdkScreen* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_size_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -130,6 +145,7 @@ void Screen_Class::size_changed_callback(GdkScreen* self) (*base->size_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Screen_Class::wrap_new(GObject* object) @@ -177,145 +193,140 @@ Glib::RefPtr Screen::get_default_colormap() { Glib::RefPtr 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 Screen::get_default_colormap() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_default_colormap(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_default_colormap(); } void Screen::set_default_colormap(const Glib::RefPtr& colormap) { - gdk_screen_set_default_colormap(gobj(), const_cast(Glib::unwrap(colormap))); +gdk_screen_set_default_colormap(gobj(), const_cast(Glib::unwrap(colormap))); } Glib::RefPtr Screen::get_system_colormap() { Glib::RefPtr 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 Screen::get_system_colormap() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_system_colormap(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_system_colormap(); } Glib::RefPtr Screen::get_system_visual() { Glib::RefPtr 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 Screen::get_system_visual() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_system_visual(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_system_visual(); } Glib::RefPtr Screen::get_rgb_colormap() { Glib::RefPtr 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 Screen::get_rgb_colormap() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_rgb_colormap(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_rgb_colormap(); } Glib::RefPtr Screen::get_rgb_visual() { Glib::RefPtr 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 Screen::get_rgb_visual() const { + return const_cast(this)->get_rgb_visual(); +} - Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_rgb_visual(const_cast(gobj()))); +Glib::RefPtr Screen::get_rgba_colormap() +{ + Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_rgba_colormap(gobj())); if(retvalue) retvalue->reference(); //The function does not do a ref for us. return retvalue; + +} + +Glib::RefPtr Screen::get_rgba_colormap() const +{ + return const_cast(this)->get_rgba_colormap(); +} + +Glib::RefPtr Screen::get_rgba_visual() +{ + + Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_rgba_visual(gobj())); + if(retvalue) + retvalue->reference(); //The function does not do a ref for us. + return retvalue; + +} + +Glib::RefPtr Screen::get_rgba_visual() const +{ + return const_cast(this)->get_rgba_visual(); } Glib::RefPtr Screen::get_root_window() { Glib::RefPtr 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 Screen::get_root_window() const { - - Glib::RefPtr retvalue = Glib::wrap((GdkWindowObject*)(gdk_screen_get_root_window(const_cast(gobj())))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_root_window(); } Glib::RefPtr Screen::get_display() { Glib::RefPtr 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 Screen::get_display() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_screen_get_display(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_display(); } int Screen::get_number() const @@ -365,7 +376,7 @@ int Screen::get_n_monitors() const void Screen::get_monitor_geometry(int monitor_num, Rectangle& dest) const { - gdk_screen_get_monitor_geometry(const_cast(gobj()), monitor_num, (dest).gobj()); +gdk_screen_get_monitor_geometry(const_cast(gobj()), monitor_num, (dest).gobj()); } int Screen::get_monitor_at_point(int x, int y) const @@ -380,7 +391,7 @@ int Screen::get_monitor_at_window(const Glib::RefPtr& window) const void Screen::broadcast_client_message(GdkEvent* event) { - gdk_screen_broadcast_client_message(gobj(), event); +gdk_screen_broadcast_client_message(gobj(), event); } Glib::RefPtr Screen::get_default() @@ -400,6 +411,7 @@ Glib::SignalProxy0< void > Screen::signal_size_changed() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gdk::Screen::on_size_changed() { BaseClassType *const base = static_cast( @@ -409,6 +421,10 @@ void Gdk::Screen::on_size_changed() if(base && base->size_changed) (*base->size_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/screen.h b/libs/gtkmm2/gdk/gdkmm/screen.h index 29ae15d54f..5cdb4e744a 100644 --- a/libs/gtkmm2/gdk/gdkmm/screen.h +++ b/libs/gtkmm2/gdk/gdkmm/screen.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_SCREEN_H #define _GDKMM_SCREEN_H + #include /* $Id$ */ @@ -106,21 +107,21 @@ public: /** Gets the default colormap for @a screen . * @return The default Gdk::Colormap. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_default_colormap(); /** Gets the default colormap for @a screen . * @return The default Gdk::Colormap. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_default_colormap() const; /** Sets the default @a colormap for @a screen . * - * Since: 2.2 + * @newin2p2 * @param colormap A Gdk::Colormap. */ void set_default_colormap(const Glib::RefPtr& colormap); @@ -128,14 +129,14 @@ public: /** Gets the system's default colormap for @a screen * @return The default colormap for @a screen . * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_system_colormap(); /** Gets the system's default colormap for @a screen * @return The default colormap for @a screen . * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_system_colormap() const; @@ -145,7 +146,7 @@ public: * The return value should not be freed. * @return The system visual * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_system_visual(); @@ -154,7 +155,7 @@ public: * The return value should not be freed. * @return The system visual * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_system_visual() const; @@ -166,7 +167,7 @@ public: * call this function. * @return The preferred colormap * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_rgb_colormap(); @@ -177,7 +178,7 @@ public: * call this function. * @return The preferred colormap * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_rgb_colormap() const; @@ -190,7 +191,7 @@ public: * drawables with any visual. * @return The Gdk::Visual chosen by GdkRGB. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_rgb_visual(); @@ -202,22 +203,74 @@ public: * drawables with any visual. * @return The Gdk::Visual chosen by GdkRGB. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_rgb_visual() const; + /** Gets a colormap to use for creating windows or pixmaps with an + * alpha channel. The windowing system on which GTK+ is running + * may not support this capability, in which case 0 will + * be returned. Even if a non-0 value is returned, its + * possible that the window's alpha channel won't be honored + * when displaying the window on the screen: in particular, for + * X an appropriate windowing manager and compositing manager + * must be running to provide appropriate display. + * @return A colormap to use for windows with an alpha channel + * or 0 if the capability is not available. + * + * @newin2p8. + */ + Glib::RefPtr get_rgba_colormap(); + + /** Gets a colormap to use for creating windows or pixmaps with an + * alpha channel. The windowing system on which GTK+ is running + * may not support this capability, in which case 0 will + * be returned. Even if a non-0 value is returned, its + * possible that the window's alpha channel won't be honored + * when displaying the window on the screen: in particular, for + * X an appropriate windowing manager and compositing manager + * must be running to provide appropriate display. + * @return A colormap to use for windows with an alpha channel + * or 0 if the capability is not available. + * + * @newin2p8. + */ + Glib::RefPtr get_rgba_colormap() const; + + + /** Gets a visual to use for creating windows or pixmaps with an + * alpha channel. See the docs for get_rgba_colormap() + * for caveats. + * @return A visual to use for windows with an alpha channel + * or 0 if the capability is not available. + * + * @newin2p8. + */ + Glib::RefPtr get_rgba_visual(); + + /** Gets a visual to use for creating windows or pixmaps with an + * alpha channel. See the docs for get_rgba_colormap() + * for caveats. + * @return A visual to use for windows with an alpha channel + * or 0 if the capability is not available. + * + * @newin2p8. + */ + Glib::RefPtr get_rgba_visual() const; + + /** Gets the root window of @a screen . * @return The root window * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_root_window(); /** Gets the root window of @a screen . * @return The root window * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_root_window() const; @@ -225,14 +278,14 @@ public: /** Gets the display to which the @a screen belongs. * @return The display to which @a screen belongs * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display(); /** Gets the display to which the @a screen belongs. * @return The display to which @a screen belongs * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display() const; @@ -241,37 +294,37 @@ public: * to which it belongs. (See get_display()) * @return The index * - * Since: 2.2. + * @newin2p2. */ int get_number() const; /** Gets the width of @a screen in pixels * @return The width of @a screen in pixels. * - * Since: 2.2. + * @newin2p2. */ int get_width() const; /** Gets the height of @a screen in pixels * @return The height of @a screen in pixels. * - * Since: 2.2. + * @newin2p2. */ 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. + * @return The width of @a screen in millimeters. * - * Since: 2.2. + * @newin2p2. */ 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. + * @return The heigth of @a screen in millimeters. * - * Since: 2.2. + * @newin2p2. */ int get_height_mm() const; @@ -280,26 +333,24 @@ public: * 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. + * @a newin2p2 * @return A list of visuals. - * - * Since: 2.2. */ Glib::ListHandle< Glib::RefPtr > 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()). + * @a newin2p2 * @return List of toplevel windows. - * - * Since: 2.2. */ Glib::ListHandle< Glib::RefPtr > 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. + * @a newin2p2 + * @return The name. */ Glib::ustring make_display_name(); @@ -307,17 +358,17 @@ public: /** Returns the number of monitors which @a screen consists of. * @return Number of monitors which @a screen consists of. * - * Since: 2.2. + * @newin2p2. */ int get_n_monitors() const; /** Retrieves the Gdk::Rectangle representing the size and position of - * the individual monitor within the the entire screen area. + * the individual monitor within 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 + * @newin2p2 * @param monitor_num The monitor number. * @param dest A Gdk::Rectangle to be filled with the monitor geometry. */ @@ -329,7 +380,7 @@ public: * @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. + * @newin2p2. */ int get_monitor_at_point(int x, int y) const; @@ -341,7 +392,7 @@ public: * the number of the monitor in which the largest area of the * bounding rectangle of @a window resides. * - * Since: 2.2. + * @newin2p2. */ int get_monitor_at_window(const Glib::RefPtr& window) const; @@ -358,7 +409,7 @@ public: * 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 + * @newin2p2 * @param event The Gdk::Event. */ void broadcast_client_message(GdkEvent* event); @@ -368,7 +419,7 @@ public: * Gdk::Display::get_default()). * @return A Gdk::Screen, or 0 if there is no default display. * - * Since: 2.2. + * @newin2p2. */ static Glib::RefPtr get_default(); @@ -376,6 +427,15 @@ public: bool get_setting(const Glib::ustring& name, ValueType& value) const; + /** The size_changed signal is emitted when the pixel width or + * height of a screen changes. + */ + +/** + * @par Prototype: + * void %size_changed() + */ + Glib::SignalProxy0< void > signal_size_changed(); @@ -383,12 +443,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_size_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/types.cc b/libs/gtkmm2/gdk/gdkmm/types.cc index e15170aadb..df14515999 100644 --- a/libs/gtkmm2/gdk/gdkmm/types.cc +++ b/libs/gtkmm2/gdk/gdkmm/types.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include diff --git a/libs/gtkmm2/gdk/gdkmm/types.h b/libs/gtkmm2/gdk/gdkmm/types.h index 1f0c0fafd4..60dd486794 100644 --- a/libs/gtkmm2/gdk/gdkmm/types.h +++ b/libs/gtkmm2/gdk/gdkmm/types.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_TYPES_H #define _GDKMM_TYPES_H + #include /* $Id$ */ @@ -328,7 +329,7 @@ inline bool operator==(const Point& lhs, const Point& rhs) inline bool operator!=(const Point& lhs, const Point& rhs) { return !lhs.equal(rhs); } - +#ifndef DOXYGEN_SHOULD_SKIP_THIS struct AtomStringTraits { typedef std::string CppType; @@ -348,6 +349,7 @@ struct AtomStringTraits // we don't want it to look like we're calling a template trait, but // a utility function. -Bryan typedef AtomStringTraits AtomString; +#endif //DOXYGEN_SHOULD_SKIP_THIS typedef Glib::ArrayHandle ArrayHandle_AtomString; diff --git a/libs/gtkmm2/gdk/gdkmm/visual.cc b/libs/gtkmm2/gdk/gdkmm/visual.cc index 4d4e84774c..4f77645a88 100644 --- a/libs/gtkmm2/gdk/gdkmm/visual.cc +++ b/libs/gtkmm2/gdk/gdkmm/visual.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -89,8 +90,19 @@ void Visual_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Visual_Class::wrap_new(GObject* object) { @@ -150,6 +162,7 @@ Glib::RefPtr Visual::get_system() return retvalue; } + Glib::RefPtr Visual::get_best() { @@ -160,6 +173,7 @@ Glib::RefPtr Visual::get_best() return retvalue; } + Glib::RefPtr Visual::get_best(int depth) { @@ -170,6 +184,7 @@ Glib::RefPtr Visual::get_best(int depth) return retvalue; } + Glib::RefPtr Visual::get_best(VisualType visual_type) { @@ -180,6 +195,7 @@ Glib::RefPtr Visual::get_best(VisualType visual_type) return retvalue; } + Glib::RefPtr Visual::get_best(int depth, VisualType visual_type) { @@ -190,37 +206,42 @@ Glib::RefPtr Visual::get_best(int depth, VisualType visual_type) 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 Visual::get_screen() { Glib::RefPtr 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 Visual::get_screen() const { - - Glib::RefPtr retvalue = Glib::wrap(gdk_visual_get_screen(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_screen(); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/visual.h b/libs/gtkmm2/gdk/gdkmm/visual.h index 66f3cd5807..b170b4ce15 100644 --- a/libs/gtkmm2/gdk/gdkmm/visual.h +++ b/libs/gtkmm2/gdk/gdkmm/visual.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_VISUAL_H #define _GDKMM_VISUAL_H + #include /* $Id$ */ @@ -210,14 +211,14 @@ public: /** Gets the screen to which this visual belongs * @return The screen to which this visual belongs. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen(); /** Gets the screen to which this visual belongs * @return The screen to which this visual belongs. * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_screen() const; @@ -226,11 +227,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmm/window.cc b/libs/gtkmm2/gdk/gdkmm/window.cc index 9419c5b01b..90c72d1dc7 100644 --- a/libs/gtkmm2/gdk/gdkmm/window.cc +++ b/libs/gtkmm2/gdk/gdkmm/window.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -200,8 +201,19 @@ void Window_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Window_Class::wrap_new(GObject* object) { @@ -255,117 +267,122 @@ WindowType Window::get_window_type() const void Window::show() { - gdk_window_show(gobj()); +gdk_window_show(gobj()); } void Window::hide() { - gdk_window_hide(gobj()); +gdk_window_hide(gobj()); } void Window::withdraw() { - gdk_window_withdraw(gobj()); +gdk_window_withdraw(gobj()); } void Window::show_unraised() { - gdk_window_show_unraised(gobj()); +gdk_window_show_unraised(gobj()); } void Window::move(int x, int y) { - gdk_window_move(gobj(), x, y); +gdk_window_move(gobj(), x, y); } void Window::resize(int width, int height) { - gdk_window_resize(gobj(), width, 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); +gdk_window_move_resize(gobj(), x, y, width, height); } void Window::reparent(const Glib::RefPtr& new_parent, int x, int y) { - gdk_window_reparent(gobj(), Glib::unwrap(new_parent), x, y); +gdk_window_reparent(gobj(), Glib::unwrap(new_parent), x, y); } void Window::clear() { - gdk_window_clear(gobj()); +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); +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); +gdk_window_clear_area_e(gobj(), x, y, width, height); } void Window::raise() { - gdk_window_raise(gobj()); +gdk_window_raise(gobj()); } void Window::lower() { - gdk_window_lower(gobj()); +gdk_window_lower(gobj()); } void Window::focus(guint32 timestamp) { - gdk_window_focus(gobj(), timestamp); +gdk_window_focus(gobj(), timestamp); } void Window::set_user_data(gpointer user_data) { - gdk_window_set_user_data(gobj(), 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(override_redirect)); +gdk_window_set_override_redirect(gobj(), static_cast(override_redirect)); } void Window::add_filter(GdkFilterFunc function, gpointer data) { - gdk_window_add_filter(gobj(), function, data); +gdk_window_add_filter(gobj(), function, data); } void Window::remove_filter(GdkFilterFunc function, gpointer data) { - gdk_window_remove_filter(gobj(), function, data); +gdk_window_remove_filter(gobj(), function, data); } void Window::scroll(int dx, int dy) { - gdk_window_scroll(gobj(), dx, dy); +gdk_window_scroll(gobj(), dx, dy); +} + +void Window::move_region(const Region& region, int dx, int dy) +{ +gdk_window_move_region(gobj(), const_cast((region).gobj()), dx, dy); } void Window::shape_combine_mask(const Glib::RefPtr& mask, int x, int y) { - gdk_window_shape_combine_mask(gobj(), Glib::unwrap(mask), x, 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((shape_region).gobj()), offset_x, offset_y); +gdk_window_shape_combine_region(gobj(), const_cast((shape_region).gobj()), offset_x, offset_y); } void Window::set_child_shapes() { - gdk_window_set_child_shapes(gobj()); +gdk_window_set_child_shapes(gobj()); } void Window::merge_child_shapes() { - gdk_window_merge_child_shapes(gobj()); +gdk_window_merge_child_shapes(gobj()); } bool Window::is_visible() const @@ -390,82 +407,83 @@ bool Window::set_static_gravities(bool use_static) void Window::set_type_hint(WindowTypeHint hint) { - gdk_window_set_type_hint(gobj(), ((GdkWindowTypeHint)(hint))); +gdk_window_set_type_hint(gobj(), ((GdkWindowTypeHint)(hint))); } void Window::set_modal_hint(bool modal) { - gdk_window_set_modal_hint(gobj(), static_cast(modal)); +gdk_window_set_modal_hint(gobj(), static_cast(modal)); } void Window::set_geometry_hints(const Geometry& geometry, WindowHints geom_mask) { - gdk_window_set_geometry_hints(gobj(), const_cast(&(geometry)), ((GdkWindowHints)(geom_mask))); +gdk_window_set_geometry_hints(gobj(), const_cast(&(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()); +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()); +gdk_window_begin_paint_rect(gobj(), (rectangle).gobj()); } void Window::begin_paint_region(const Region& region) { - gdk_window_begin_paint_region(gobj(), const_cast((region).gobj())); +gdk_window_begin_paint_region(gobj(), const_cast((region).gobj())); } void Window::end_paint() { - gdk_window_end_paint(gobj()); +gdk_window_end_paint(gobj()); } void Window::set_title(const Glib::ustring& title) { - gdk_window_set_title(gobj(), title.c_str()); +gdk_window_set_title(gobj(), title.c_str()); } void Window::set_role(const Glib::ustring& role) { - gdk_window_set_role(gobj(), role.c_str()); +gdk_window_set_role(gobj(), role.c_str()); } void Window::set_transient_for(const Glib::RefPtr& parent) { - gdk_window_set_transient_for(gobj(), Glib::unwrap(parent)); +gdk_window_set_transient_for(gobj(), Glib::unwrap(parent)); } void Window::set_background(const Color& color) { - gdk_window_set_background(gobj(), (color).gobj()); +gdk_window_set_background(gobj(), (color).gobj()); } void Window::set_back_pixmap(const Glib::RefPtr& pixmap, bool parent_relative) { - gdk_window_set_back_pixmap(gobj(), Glib::unwrap(pixmap), static_cast(parent_relative)); +gdk_window_set_back_pixmap(gobj(), Glib::unwrap(pixmap), static_cast(parent_relative)); } void Window::set_cursor(const Cursor& cursor) { - gdk_window_set_cursor(gobj(), (cursor).gobj_copy()); +gdk_window_set_cursor(gobj(), const_cast((cursor).gobj())); } void Window::get_user_data(gpointer* data) { - gdk_window_get_user_data(gobj(), 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(gobj()), &x, &y, &width, &height, &depth); +gdk_window_get_geometry(const_cast(gobj()), &x, &y, &width, &height, &depth); } void Window::get_position(int& x, int& y) const { - gdk_window_get_position(const_cast(gobj()), &x, &y); +gdk_window_get_position(const_cast(gobj()), &x, &y); } int Window::get_origin(int& x, int& y) const @@ -475,62 +493,52 @@ int Window::get_origin(int& x, int& y) const void Window::get_root_origin(int& x, int& y) const { - gdk_window_get_root_origin(const_cast(gobj()), &x, &y); +gdk_window_get_root_origin(const_cast(gobj()), &x, &y); } void Window::get_frame_extents(Rectangle& rect) { - gdk_window_get_frame_extents(gobj(), (rect).gobj()); +gdk_window_get_frame_extents(gobj(), (rect).gobj()); } Glib::RefPtr Window::get_pointer(int& x, int& y, ModifierType& mask) { Glib::RefPtr 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::get_parent() { Glib::RefPtr 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 Window::get_parent() const { - - Glib::RefPtr retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_parent(const_cast(gobj())))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_parent(); } Glib::RefPtr Window::get_toplevel() { Glib::RefPtr 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 Window::get_toplevel() const { - - Glib::RefPtr retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_toplevel(const_cast(gobj())))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_toplevel(); } Glib::ListHandle< Glib::RefPtr > Window::get_children() @@ -550,27 +558,27 @@ EventMask Window::get_events() const void Window::set_events(EventMask event_mask) { - gdk_window_set_events(gobj(), ((GdkEventMask)(event_mask))); +gdk_window_set_events(gobj(), ((GdkEventMask)(event_mask))); } void Window::set_icon_list(const Glib::ListHandle< Glib::RefPtr >& pixbufs) { - gdk_window_set_icon_list(gobj(), pixbufs.data()); +gdk_window_set_icon_list(gobj(), pixbufs.data()); } void Window::set_icon(const Glib::RefPtr& icon_window, const Glib::RefPtr& pixmap, const Glib::RefPtr& mask) { - gdk_window_set_icon(gobj(), Glib::unwrap(icon_window), Glib::unwrap(pixmap), Glib::unwrap(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()); +gdk_window_set_icon_name(gobj(), name.c_str()); } void Window::set_group(const Glib::RefPtr& leader) { - gdk_window_set_group(gobj(), Glib::unwrap(leader)); +gdk_window_set_group(gobj(), Glib::unwrap(leader)); } Glib::RefPtr Window::get_group() @@ -580,12 +588,12 @@ Glib::RefPtr Window::get_group() Glib::RefPtr Window::get_group() const { - return Glib::wrap((GdkWindowObject*)(gdk_window_get_group(const_cast(gobj())))); + return const_cast(this)->get_group(); } void Window::set_decorations(WMDecoration decorations) { - gdk_window_set_decorations(gobj(), ((GdkWMDecoration)(decorations))); +gdk_window_set_decorations(gobj(), ((GdkWMDecoration)(decorations))); } bool Window::get_decorations(WMDecoration& decorations) const @@ -595,7 +603,7 @@ bool Window::get_decorations(WMDecoration& decorations) const void Window::set_functions(WMFunction functions) { - gdk_window_set_functions(gobj(), ((GdkWMFunction)(functions))); +gdk_window_set_functions(gobj(), ((GdkWMFunction)(functions))); } Glib::ListHandle< Glib::RefPtr > Window::get_toplevels() @@ -603,59 +611,60 @@ Glib::ListHandle< Glib::RefPtr > Window::get_toplevels() return Glib::ListHandle< Glib::RefPtr >(gdk_window_get_toplevels(), Glib::OWNERSHIP_SHALLOW); } + void Window::iconify() { - gdk_window_iconify(gobj()); +gdk_window_iconify(gobj()); } void Window::deiconify() { - gdk_window_deiconify(gobj()); +gdk_window_deiconify(gobj()); } void Window::stick() { - gdk_window_stick(gobj()); +gdk_window_stick(gobj()); } void Window::unstick() { - gdk_window_unstick(gobj()); +gdk_window_unstick(gobj()); } void Window::maximize() { - gdk_window_maximize(gobj()); +gdk_window_maximize(gobj()); } void Window::unmaximize() { - gdk_window_unmaximize(gobj()); +gdk_window_unmaximize(gobj()); } void Window::register_dnd() { - gdk_window_register_dnd(gobj()); +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); +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); +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(rect.gobj()), static_cast(invalidate_children)); +gdk_window_invalidate_rect(gobj(), const_cast(rect.gobj()), static_cast(invalidate_children)); } void Window::invalidate_region(const Region& region, bool invalidate_children) { - gdk_window_invalidate_region(gobj(), const_cast((region).gobj()), static_cast(invalidate_children)); +gdk_window_invalidate_region(gobj(), const_cast((region).gobj()), static_cast(invalidate_children)); } Region Window::get_update_area() @@ -665,74 +674,83 @@ Region Window::get_update_area() void Window::freeze_updates() { - gdk_window_freeze_updates(gobj()); +gdk_window_freeze_updates(gobj()); } void Window::thaw_updates() { - gdk_window_thaw_updates(gobj()); +gdk_window_thaw_updates(gobj()); } void Window::process_all_updates() { - gdk_window_process_all_updates(); +gdk_window_process_all_updates(); } + void Window::process_updates(bool update_children) { - gdk_window_process_updates(gobj(), static_cast(update_children)); +gdk_window_process_updates(gobj(), static_cast(update_children)); } void Window::set_debug_updates(bool setting) { - gdk_window_set_debug_updates(static_cast(setting)); +gdk_window_set_debug_updates(static_cast(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(&(geometry)), flags, width, height, &new_width, &new_height); +gdk_window_constrain_size(const_cast(&(geometry)), flags, width, height, &new_width, &new_height); } + void Window::enable_synchronized_configure() { - gdk_window_enable_synchronized_configure(gobj()); +gdk_window_enable_synchronized_configure(gobj()); } void Window::configure_finished() { - gdk_window_configure_finished(gobj()); +gdk_window_configure_finished(gobj()); } void Window::set_skip_taskbar_hint(bool skips_taskbar) { - gdk_window_set_skip_taskbar_hint(gobj(), static_cast(skips_taskbar)); +gdk_window_set_skip_taskbar_hint(gobj(), static_cast(skips_taskbar)); } void Window::set_skip_pager_hint(bool skips_pager) { - gdk_window_set_skip_pager_hint(gobj(), static_cast(skips_pager)); +gdk_window_set_skip_pager_hint(gobj(), static_cast(skips_pager)); +} + +void Window::set_urgency_hint(bool urgent) +{ +gdk_window_set_urgency_hint(gobj(), static_cast(urgent)); } void Window::fullscreen() { - gdk_window_fullscreen(gobj()); +gdk_window_fullscreen(gobj()); } void Window::unfullscreen() { - gdk_window_unfullscreen(gobj()); +gdk_window_unfullscreen(gobj()); } GrabStatus Window::pointer_grab(bool owner_events, EventMask event_mask, const Glib::RefPtr& confine_to, const Cursor& cursor, guint32 time_) { - return ((GrabStatus)(gdk_pointer_grab(gobj(), static_cast(owner_events), ((GdkEventMask)(event_mask)), const_cast(Glib::unwrap(confine_to)), (cursor).gobj_copy(), time_))); + return ((GrabStatus)(gdk_pointer_grab(gobj(), static_cast(owner_events), ((GdkEventMask)(event_mask)), const_cast(Glib::unwrap(confine_to)), const_cast((cursor).gobj()), time_))); } void Window::pointer_ungrab(guint32 timestamp) { - gdk_pointer_ungrab(timestamp); +gdk_pointer_ungrab(timestamp); } + GrabStatus Window::keyboard_grab(bool owner_events, guint32 timestamp) { return ((GrabStatus)(gdk_keyboard_grab(gobj(), static_cast(owner_events), timestamp))); @@ -740,30 +758,38 @@ GrabStatus Window::keyboard_grab(bool owner_events, guint32 timestamp) void Window::keyboard_ungrab(guint32 timestamp) { - gdk_keyboard_ungrab(timestamp); +gdk_keyboard_ungrab(timestamp); } + void Window::set_keep_above(bool setting) { - gdk_window_set_keep_above(gobj(), static_cast(setting)); +gdk_window_set_keep_above(gobj(), static_cast(setting)); } void Window::set_keep_below(bool setting) { - gdk_window_set_keep_below(gobj(), static_cast(setting)); +gdk_window_set_keep_below(gobj(), static_cast(setting)); } void Window::set_accept_focus(bool accept_focus) { - gdk_window_set_accept_focus(gobj(), static_cast(accept_focus)); +gdk_window_set_accept_focus(gobj(), static_cast(accept_focus)); } void Window::set_focus_on_map(bool focus_on_map) { - gdk_window_set_focus_on_map(gobj(), static_cast(focus_on_map)); +gdk_window_set_focus_on_map(gobj(), static_cast(focus_on_map)); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gdk diff --git a/libs/gtkmm2/gdk/gdkmm/window.h b/libs/gtkmm2/gdk/gdkmm/window.h index 7b8d9c614d..40acfafa32 100644 --- a/libs/gtkmm2/gdk/gdkmm/window.h +++ b/libs/gtkmm2/gdk/gdkmm/window.h @@ -3,6 +3,7 @@ #ifndef _GDKMM_WINDOW_H #define _GDKMM_WINDOW_H + #include /* $Id$ */ @@ -867,9 +868,8 @@ public: */ 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. + /** Sets keyboard focus to @a window . 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); @@ -929,6 +929,20 @@ public: */ void scroll(int dx, int dy); + /** Move the part of @a window indicated by @a region by @a dy pixels in the Y + * direction and @a dx pixels in the X direction. The portions of @a region + * that not covered by the new position of @a region are invalidated. + * + * Child windows are not moved. + * + * @newin2p8 + * @param region The Gdk::Region to move. + * @param dx Amount to move in the X direction. + * @param dy Amount to move in the Y direction. + */ + void move_region(const Region& region, 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 @@ -1036,7 +1050,7 @@ public: * way. * * You should only use this on windows for which you have - * previously called #gdk_window_set_transient_for() + * previously called gdk_window_set_transient_for() * @param modal true if the window is modal, false otherwise. */ void set_modal_hint(bool modal = true); @@ -1054,7 +1068,7 @@ public: * 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 + * 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. * @@ -1210,7 +1224,8 @@ public: * @param parent_relative Whether the tiling origin is at the origin of @a window 's parent. */ void set_back_pixmap(const Glib::RefPtr&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. @@ -1281,7 +1296,7 @@ public: * @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. @@ -1428,14 +1443,14 @@ public: /** Returns the group leader window for @a window . See gdk_window_set_group(). * @return The group leader window for @a window * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr 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. + * @newin2p4. */ Glib::RefPtr get_group() const; @@ -1555,9 +1570,8 @@ public: /** 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. + * with window managers that support the Extended Window Manager Hints, 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. @@ -1569,8 +1583,8 @@ public: /** 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 + * the Extended + * Window Manager Hints, 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. @@ -1700,7 +1714,7 @@ public: * On X, calling this function makes @a window participate in the * _NET_WM_SYNC_REQUEST window manager protocol. * - * Since: 2.6 + * @newin2p6 */ void enable_synchronized_configure(); @@ -1710,10 +1724,10 @@ public: * application. GTK+ applications will automatically call this * function when appropriate. * - * This function can only be called if gdk_window_use_configure() + * This function can only be called if gdk_window_enable_synchronized_configure() * was called previously. * - * Since: 2.6 + * @newin2p6 */ void configure_finished(); @@ -1721,11 +1735,11 @@ public: /** 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. + * 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 + * @newin2p2 * @param skips_taskbar true to skip the taskbar. */ void set_skip_taskbar_hint(bool skips_taskbar = true); @@ -1734,16 +1748,26 @@ public: * 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. + * 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 + * @newin2p2 * @param skips_pager true to skip the pager. */ void set_skip_pager_hint(bool skips_pager = true); + /** Toggles whether a window needs the user's + * urgent attention. + * + * @newin2p8 + * @param urgent true if the window is urgent. + */ + void set_urgency_hint(bool urgent = true); + + /** Moves the window into fullscreen mode. This means the * window covers the entire screen and is above any panels * or task bars. @@ -1758,7 +1782,7 @@ public: * most standard window managers, and GDK makes a best effort to get * it to happen. * - * Since: 2.2 + * @newin2p2 */ void fullscreen(); @@ -1773,7 +1797,7 @@ public: * most standard window managers, and GDK makes a best effort to get * it to happen. * - * Since: 2.2 + * @newin2p2 */ void unfullscreen(); @@ -1827,7 +1851,7 @@ public: * But it will happen with most standard window managers, * and GDK makes a best effort to get it to happen. * - * Since: 2.4 + * @newin2p4 * @param setting Whether to keep @a window above other windows. */ void set_keep_above(bool setting = true); @@ -1842,7 +1866,7 @@ public: * But it will happen with most standard window managers, * and GDK makes a best effort to get it to happen. * - * Since: 2.4 + * @newin2p4 * @param setting Whether to keep @a window below other windows. */ void set_keep_below(bool setting = true); @@ -1854,7 +1878,7 @@ public: * On X, it is the responsibility of the window manager to interpret this * hint. ICCCM-compliant window manager usually respect it. * - * Since: 2.4 + * @newin2p4 * @param accept_focus true if the window should receive input focus. */ void set_accept_focus(bool accept_focus = true); @@ -1869,7 +1893,7 @@ public: * this hint. %Window managers following the freedesktop.org window * manager extension specification should respect it. * - * Since: 2.6 + * @newin2p6 * @param focus_on_map true if the window should receive input focus when mapped. */ void set_focus_on_map(bool focus_on_map); @@ -1879,11 +1903,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gdk/gdkmmconfig.h b/libs/gtkmm2/gdk/gdkmmconfig.h index cbfb1a34da..26f39b4b3d 100644 --- a/libs/gtkmm2/gdk/gdkmmconfig.h +++ b/libs/gtkmm2/gdk/gdkmmconfig.h @@ -1,4 +1,4 @@ -/* gdk/gdkmmconfig.h. Generated by configure. */ +/* gdk/gdkmmconfig.h. Generated from gdkmmconfig.h.in by configure. */ #ifndef _GDKMM_CONFIG_H #define _GDKMM_CONFIG_H 1 diff --git a/libs/gtkmm2/gtk/SConscript b/libs/gtkmm2/gtk/SConscript index b4cd99f023..fe0fc610cf 100644 --- a/libs/gtkmm2/gtk/SConscript +++ b/libs/gtkmm2/gtk/SConscript @@ -8,7 +8,8 @@ gtkmm2_files = glob.glob('gtkmm/*.cc') Import('env libraries install_prefix') gtkmm2 = env.Copy() -gtkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'] ]) +gtkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'], libraries['cairomm'], libraries['gtk2-unix-print'] ]) +gtkmm2.Append(CXXFLAGS = ['-DGLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED', '-DGLIBMM_PROPERTIES_ENABLED', '-DGLIBMM_EXCEPTIONS_ENABLED']) libgtkmm2 = gtkmm2.SharedLibrary('gtkmm2', gtkmm2_files) Default(libgtkmm2) diff --git a/libs/gtkmm2/gtk/gtkmm.h b/libs/gtkmm2/gtk/gtkmm.h index cb8411a3e3..91dc01ab0e 100644 --- a/libs/gtkmm2/gtk/gtkmm.h +++ b/libs/gtkmm2/gtk/gtkmm.h @@ -37,17 +37,21 @@ extern const int gtkmm_micro_version; #include #include #include +#include #include #include #include #include #include +#include #include #include #include +#include #include #include #include +#include #include #include #include @@ -81,6 +85,7 @@ extern const int gtkmm_micro_version; #include #include #include +#include #include #include #include @@ -89,7 +94,10 @@ extern const int gtkmm_micro_version; #include #include #include +#include #include +#include +#include #include #include #include @@ -102,12 +110,29 @@ extern const int gtkmm_micro_version; #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -119,11 +144,13 @@ extern const int gtkmm_micro_version; #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -137,6 +164,7 @@ extern const int gtkmm_micro_version; #include #include #include +#include #include #include #include diff --git a/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc b/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc index 24b97e3b39..2ef8776d88 100644 --- a/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc +++ b/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -29,54 +30,32 @@ #include -namespace //anonymous +//We use a function instead of a static method, so we can make it static, so it is not exported. +static void SignalProxy_ActivateLink_gtk_callback(GtkAboutDialog* about, const gchar* link, gpointer data) { + Gtk::AboutDialog::SlotActivateLink* the_slot = static_cast(data); -// 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(data); - + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Gtk::AboutDialog* pCppAbout = Glib::wrap(about); - (self->slot_)( *pCppAbout, Glib::convert_const_gchar_ptr_to_ustring(link) ); + (*the_slot)( *pCppAbout, Glib::convert_const_gchar_ptr_to_ustring(link) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } - + #endif //GLIBMM_EXCEPTIONS_ENABLED } -void SignalProxy_ActivateLink::gtk_callback_destroy(void* data) +static void SignalProxy_ActivateLink_gtk_callback_destroy(void* data) { - delete static_cast(data); + Gtk::AboutDialog::SlotActivateLink* the_slot = static_cast(data); + delete the_slot; } -} // anonymous namespace - namespace Gtk { @@ -84,27 +63,27 @@ namespace Gtk //static: void AboutDialog::set_email_hook(const SlotActivateLink& slot) { - // Create a signal proxy. A pointer to this will be passed + // Create a copy of the slot object. 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); + // when SignalProxy_SlotForwardPage_gtk_callback_destroy() is called. + SlotActivateLink* slot_copy = new SlotActivateLink(slot); gtk_about_dialog_set_email_hook( - &SignalProxy_ActivateLink::gtk_callback, pSignalProxy, - &SignalProxy_ActivateLink::gtk_callback_destroy); + &SignalProxy_ActivateLink_gtk_callback, slot_copy, + &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 + // Create a copy of the slot object. 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); + // when SignalProxy_SlotForwardPage_gtk_callback_destroy() is called. + SlotActivateLink* slot_copy = new SlotActivateLink(slot); gtk_about_dialog_set_url_hook( - &SignalProxy_ActivateLink::gtk_callback, pSignalProxy, - &SignalProxy_ActivateLink::gtk_callback_destroy); + &SignalProxy_ActivateLink_gtk_callback, slot_copy, + &SignalProxy_ActivateLink_gtk_callback_destroy); } } // namespace Gtk @@ -156,8 +135,19 @@ void AboutDialog_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* AboutDialog_Class::wrap_new(GObject* o) { @@ -212,7 +202,7 @@ Glib::ustring AboutDialog::get_name() const void AboutDialog::set_name(const Glib::ustring& name) { - gtk_about_dialog_set_name(gobj(), name.c_str()); +gtk_about_dialog_set_name(gobj(), name.c_str()); } Glib::ustring AboutDialog::get_version() const @@ -222,7 +212,7 @@ Glib::ustring AboutDialog::get_version() const void AboutDialog::set_version(const Glib::ustring& version) { - gtk_about_dialog_set_version(gobj(), version.c_str()); +gtk_about_dialog_set_version(gobj(), version.c_str()); } Glib::ustring AboutDialog::get_copyright() const @@ -232,7 +222,7 @@ Glib::ustring AboutDialog::get_copyright() const void AboutDialog::set_copyright(const Glib::ustring& copyright) { - gtk_about_dialog_set_copyright(gobj(), copyright.c_str()); +gtk_about_dialog_set_copyright(gobj(), copyright.c_str()); } Glib::ustring AboutDialog::get_comments() const @@ -242,7 +232,7 @@ Glib::ustring AboutDialog::get_comments() const void AboutDialog::set_comments(const Glib::ustring& comments) { - gtk_about_dialog_set_comments(gobj(), comments.c_str()); +gtk_about_dialog_set_comments(gobj(), comments.c_str()); } Glib::ustring AboutDialog::get_license() const @@ -252,7 +242,7 @@ Glib::ustring AboutDialog::get_license() const void AboutDialog::set_license(const Glib::ustring& license) { - gtk_about_dialog_set_license(gobj(), license.c_str()); +gtk_about_dialog_set_license(gobj(), license.c_str()); } Glib::ustring AboutDialog::get_website() const @@ -262,7 +252,7 @@ Glib::ustring AboutDialog::get_website() const void AboutDialog::set_website(const Glib::ustring& website) { - gtk_about_dialog_set_website(gobj(), website.c_str()); +gtk_about_dialog_set_website(gobj(), website.c_str()); } Glib::ustring AboutDialog::get_website_label() const @@ -272,7 +262,7 @@ Glib::ustring AboutDialog::get_website_label() const void AboutDialog::set_website_label(const Glib::ustring& website_label) { - gtk_about_dialog_set_website_label(gobj(), website_label.c_str()); +gtk_about_dialog_set_website_label(gobj(), website_label.c_str()); } Glib::StringArrayHandle AboutDialog::get_authors() const @@ -282,7 +272,7 @@ Glib::StringArrayHandle AboutDialog::get_authors() const void AboutDialog::set_authors(const Glib::StringArrayHandle& authors) const { - gtk_about_dialog_set_authors(const_cast(gobj()), const_cast((authors).data())); +gtk_about_dialog_set_authors(const_cast(gobj()), const_cast((authors).data())); } Glib::StringArrayHandle AboutDialog::get_documenters() const @@ -292,7 +282,7 @@ Glib::StringArrayHandle AboutDialog::get_documenters() const void AboutDialog::set_documenters(const Glib::StringArrayHandle& documenters) { - gtk_about_dialog_set_documenters(gobj(), const_cast((documenters).data())); +gtk_about_dialog_set_documenters(gobj(), const_cast((documenters).data())); } Glib::StringArrayHandle AboutDialog::get_artists() const @@ -302,7 +292,7 @@ Glib::StringArrayHandle AboutDialog::get_artists() const void AboutDialog::set_artists(const Glib::StringArrayHandle& artists) { - gtk_about_dialog_set_artists(gobj(), const_cast((artists).data())); +gtk_about_dialog_set_artists(gobj(), const_cast((artists).data())); } Glib::ustring AboutDialog::get_translator_credits() const @@ -312,7 +302,7 @@ Glib::ustring AboutDialog::get_translator_credits() const void AboutDialog::set_translator_credits(const Glib::ustring& translator_credits) { - gtk_about_dialog_set_translator_credits(gobj(), translator_credits.c_str()); +gtk_about_dialog_set_translator_credits(gobj(), translator_credits.c_str()); } Glib::RefPtr AboutDialog::get_logo() @@ -322,12 +312,12 @@ Glib::RefPtr AboutDialog::get_logo() Glib::RefPtr AboutDialog::get_logo() const { - return Glib::wrap(gtk_about_dialog_get_logo(const_cast(gobj()))); + return const_cast(this)->get_logo(); } void AboutDialog::set_logo(const Glib::RefPtr& logo) { - gtk_about_dialog_set_logo(gobj(), Glib::unwrap(logo)); +gtk_about_dialog_set_logo(gobj(), Glib::unwrap(logo)); } Glib::ustring AboutDialog::get_logo_icon_name() const @@ -337,139 +327,222 @@ Glib::ustring AboutDialog::get_logo_icon_name() const void AboutDialog::set_logo_icon_name(const Glib::ustring& icon_name) { - gtk_about_dialog_set_logo_icon_name(gobj(), icon_name.c_str()); +gtk_about_dialog_set_logo_icon_name(gobj(), icon_name.c_str()); +} + +bool AboutDialog::get_wrap_license() const +{ + return gtk_about_dialog_get_wrap_license(const_cast(gobj())); +} + +void AboutDialog::set_wrap_license(bool wrap_license) +{ +gtk_about_dialog_set_wrap_license(gobj(), static_cast(wrap_license)); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_name() { return Glib::PropertyProxy(this, "name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_name() const { return Glib::PropertyProxy_ReadOnly(this, "name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_version() { return Glib::PropertyProxy(this, "version"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_version() const { return Glib::PropertyProxy_ReadOnly(this, "version"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_copyright() { return Glib::PropertyProxy(this, "copyright"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_copyright() const { return Glib::PropertyProxy_ReadOnly(this, "copyright"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_comments() { return Glib::PropertyProxy(this, "comments"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_comments() const { return Glib::PropertyProxy_ReadOnly(this, "comments"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_website() { return Glib::PropertyProxy(this, "website"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_website() const { return Glib::PropertyProxy_ReadOnly(this, "website"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_website_label() { return Glib::PropertyProxy(this, "website-label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_website_label() const { return Glib::PropertyProxy_ReadOnly(this, "website-label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_license() { return Glib::PropertyProxy(this, "license"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_license() const { return Glib::PropertyProxy_ReadOnly(this, "license"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_authors() { return Glib::PropertyProxy(this, "authors"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_authors() const { return Glib::PropertyProxy_ReadOnly(this, "authors"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_documenters() { return Glib::PropertyProxy(this, "documenters"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_documenters() const { return Glib::PropertyProxy_ReadOnly(this, "documenters"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_translator_credits() { return Glib::PropertyProxy(this, "translator-credits"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_translator_credits() const { return Glib::PropertyProxy_ReadOnly(this, "translator-credits"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_artists() { return Glib::PropertyProxy(this, "artists"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_artists() const { return Glib::PropertyProxy_ReadOnly(this, "artists"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > AboutDialog::property_logo() { return Glib::PropertyProxy< Glib::RefPtr >(this, "logo"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > AboutDialog::property_logo() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "logo"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AboutDialog::property_logo_icon_name() { return Glib::PropertyProxy(this, "logo-icon-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AboutDialog::property_logo_icon_name() const { return Glib::PropertyProxy_ReadOnly(this, "logo-icon-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy AboutDialog::property_wrap_license() +{ + return Glib::PropertyProxy(this, "wrap-license"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly AboutDialog::property_wrap_license() const +{ + return Glib::PropertyProxy_ReadOnly(this, "wrap-license"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/aboutdialog.h b/libs/gtkmm2/gtk/gtkmm/aboutdialog.h index d36c8b2326..7e7a22b2af 100644 --- a/libs/gtkmm2/gtk/gtkmm/aboutdialog.h +++ b/libs/gtkmm2/gtk/gtkmm/aboutdialog.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ABOUTDIALOG_H #define _GTKMM_ABOUTDIALOG_H + #include /* $Id$ */ @@ -41,7 +42,16 @@ namespace Gtk namespace Gtk { -/** TODO +/** The AboutDialog offers a simple way to display information about a program like its logo, name, copyright, + * website and license. It is also possible to give credits to the authors, documenters, translators and artists + * who have worked on the program. An about dialog is typically opened when the user selects the About option + * from the Help menu. All parts of the dialog are optional. + * + * About dialogs often contain links and email addresses. Gtk::AboutDialog supports this by offering global + * hooks, which are called when the user clicks on a link or email address, see set_email_hook() and + * set_url_hook(). Email addresses in the authors, documenters and artists properties are recognized by looking + * for , URLs are recognized by looking for http://url, with the URL extending to the next space, + * tab or line break. * * @ingroup Dialogs */ @@ -89,11 +99,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -107,14 +123,14 @@ public: * @return The program name. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ 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 + * @newin2p6 * @param name The program name. */ void set_name(const Glib::ustring& name); @@ -123,13 +139,13 @@ public: * @return The version string. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_version() const; /** Sets the version string to display in the about dialog. * - * Since: 2.6 + * @newin2p6 * @param version The version string. */ void set_version(const Glib::ustring& version); @@ -138,14 +154,14 @@ public: * @return The copyright string. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ 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 + * @newin2p6 * @param copyright The copyright string. */ void set_copyright(const Glib::ustring& copyright); @@ -154,7 +170,7 @@ public: * @return The comments. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_comments() const; @@ -162,7 +178,7 @@ public: * dialog. This should be a short string of one or * two lines. * - * Since: 2.6 + * @newin2p6 * @param comments A comments string. */ void set_comments(const Glib::ustring& comments); @@ -171,7 +187,7 @@ public: * @return The license information. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_license() const; @@ -179,7 +195,7 @@ public: * license dialog. If @a license is 0, the license button is * hidden. * - * Since: 2.6 + * @newin2p6 * @param license The license information or 0. */ void set_license(const Glib::ustring& license); @@ -188,13 +204,13 @@ public: * @return The website URL. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_website() const; /** Sets the URL to use for the website link. * - * Since: 2.6 + * @newin2p6 * @param website A URL string starting with "http://". */ void set_website(const Glib::ustring& website); @@ -203,18 +219,18 @@ public: * @return The label used for the website link. The string is owned by the about * dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ 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 + * @newin2p6 * @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. @@ -222,19 +238,19 @@ public: * the authors. The array is owned by the about dialog * and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::StringArrayHandle get_authors() const; - + /** Sets the strings which are displayed in the authors tab * of the secondary credits dialog. * - * Since: 2.6 + * @newin2p6 * @param authors A 0-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. @@ -242,15 +258,15 @@ public: * the documenters. The array is owned by the about dialog * and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::StringArrayHandle get_documenters() const; - + /** Sets the strings which are displayed in the documenters tab * of the secondary credits dialog. * - * Since: 2.6 + * @newin2p6 * @param documenters A 0-terminated array of strings. */ void set_documenters(const Glib::StringArrayHandle& documenters); @@ -261,14 +277,14 @@ public: * the artists. The array is owned by the about dialog * and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::StringArrayHandle get_artists() const; /** Sets the strings which are displayed in the artists tab * of the secondary credits dialog. * - * Since: 2.6 + * @newin2p6 * @param artists A 0-terminated array of strings. */ void set_artists(const Glib::StringArrayHandle& artists); @@ -278,7 +294,7 @@ public: * @return The translator credits string. The string is * owned by the about dialog and must not be modified. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_translator_credits() const; @@ -297,18 +313,18 @@ public: * since Gtk::AboutDialog will detect if "translator-credits" is untranslated * and hide the tab. * - * Since: 2.6 + * @newin2p6 * @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. + * @newin2p6. */ Glib::RefPtr get_logo(); @@ -317,7 +333,7 @@ public: * 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. + * @newin2p6. */ Glib::RefPtr get_logo() const; @@ -327,18 +343,18 @@ public: * window icon set with Gtk::Window::set_default_icon() * will be used. * - * Since: 2.6 + * @newin2p6 * @param logo A Gdk::Pixbuf, or 0. */ void set_logo(const Glib::RefPtr& 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 + * owned by the dialog. If you want to keep a reference * to it, you have to call Glib::strdup() on it. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_logo_icon_name() const; @@ -347,31 +363,57 @@ public: * window icon set with Gtk::Window::set_default_icon() * will be used. * - * Since: 2.6 + * @newin2p6 * @param icon_name An icon name, or 0. */ void set_logo_icon_name(const Glib::ustring& icon_name); + + /** Returns whether the license text in @a about is + * automatically wrapped. + * @return true if the license text is wrapped + * + * @newin2p8. + */ + bool get_wrap_license() const; + + /** Sets whether the license text in @a about is + * automatically wrapped. + * + * @newin2p8 + * @param wrap_license Whether to wrap the license. + */ + void set_wrap_license(bool wrap_license); + /** For instance, * void on_activate_link_url(AboutDialog& about_dialog, const Glib::ustring& link); */ typedef sigc::slot SlotActivateLink; - - //TODO: Document these methods. + + /** Installs a global callback to be called whenever the user activates an email link in an about dialog. + * @param slot A function or method to call when an email link is activated. + */ static void set_email_hook(const SlotActivateLink& slot); - + + /** Installs a global callback to be called whenever the user activates a URL link in an about dialog. + * @param slot A function or method to call when a URL link is activated. + */ static void set_url_hook(const SlotActivateLink& slot); - - /** The name of the program. If this is not set + +//TODO: Deprecate this, because it conflicts with the property in GtkWidget, which will be deprecated in GTK+ 2.12. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_name() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -379,15 +421,20 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_name() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The version of the program. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_version() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The version of the program. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -395,15 +442,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_version() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Copyright information for the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_copyright() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Copyright information for the program. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -411,15 +462,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_copyright() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Comments about the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_comments() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Comments about the program. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -427,15 +482,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_comments() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The URL for the link to the website of the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_website() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -443,15 +502,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_website() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The label for the link to the website of the program. If this is not set + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_website_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -459,15 +522,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_website_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The license of the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_license() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The license of the program. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -475,15 +542,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_license() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** List of authors of the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_authors() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** List of authors of the program. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -491,15 +562,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_authors() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** List of people documenting the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_documenters() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** List of people documenting the program. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -507,15 +582,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_documenters() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Credits to the translators. This string should be marked as translatable. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_translator_credits() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -523,15 +602,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_translator_credits() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** List of people who have contributed artwork to the program. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_artists() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -539,15 +622,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_artists() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A logo for the about box. If this is not set + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_logo() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -555,15 +642,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_logo() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A named icon to use as the logo for the about box. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_logo_icon_name() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -571,6 +662,27 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_logo_icon_name() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether to wrap the license 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 property_wrap_license() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether to wrap the license 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 property_wrap_license() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -586,6 +698,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::AboutDialog* wrap(GtkAboutDialog* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ABOUTDIALOG_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/accelgroup.cc b/libs/gtkmm2/gtk/gtkmm/accelgroup.cc index edb7170bf4..fcc972de58 100644 --- a/libs/gtkmm2/gtk/gtkmm/accelgroup.cc +++ b/libs/gtkmm2/gtk/gtkmm/accelgroup.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -65,7 +66,8 @@ Gdk::ModifierType AccelGroup::get_default_mod_mask() namespace { -gboolean AccelGroup_signal_accel_activate_callback(GtkAccelGroup* self, GObject* p0,guint p1,GdkModifierType p2,void* data) + +static 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&,guint,Gdk::ModifierType > SlotType; @@ -73,24 +75,28 @@ gboolean AccelGroup_signal_accel_activate_callback(GtkAccelGroup* self, GObject* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) return static_cast((*static_cast(slot))(Glib::wrap(p0, true) , p1, ((Gdk::ModifierType)(p2)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } typedef gboolean RType; return RType(); } -gboolean AccelGroup_signal_accel_activate_notify_callback(GtkAccelGroup* self, GObject* p0,guint p1,GdkModifierType p2, void* data) +static 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&,guint,Gdk::ModifierType > SlotType; @@ -98,24 +104,28 @@ gboolean AccelGroup_signal_accel_activate_notify_callback(GtkAccelGroup* self, G // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0, true) , p1, ((Gdk::ModifierType)(p2)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } typedef gboolean RType; return RType(); } -const Glib::SignalProxyInfo AccelGroup_signal_accel_activate_info = +static const Glib::SignalProxyInfo AccelGroup_signal_accel_activate_info = { "accel_activate", (GCallback) &AccelGroup_signal_accel_activate_callback, @@ -123,7 +133,7 @@ const Glib::SignalProxyInfo AccelGroup_signal_accel_activate_info = }; -void AccelGroup_signal_accel_changed_callback(GtkAccelGroup* self, guint p0,GdkModifierType p1,GClosure* p2,void* data) +static 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; @@ -131,26 +141,31 @@ void AccelGroup_signal_accel_changed_callback(GtkAccelGroup* self, guint p0,GdkM // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0, ((Gdk::ModifierType)(p1)) , p2); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo AccelGroup_signal_accel_changed_info = +static const Glib::SignalProxyInfo AccelGroup_signal_accel_changed_info = { "accel_changed", (GCallback) &AccelGroup_signal_accel_changed_callback, (GCallback) &AccelGroup_signal_accel_changed_callback }; + } // anonymous namespace @@ -197,10 +212,18 @@ void AccelGroup_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->accel_changed = &accel_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void AccelGroup_Class::accel_changed_callback(GtkAccelGroup* self, guint p0, GdkModifierType p1, GClosure* p2) { CppObjectType *const obj = dynamic_cast( @@ -213,16 +236,20 @@ void AccelGroup_Class::accel_changed_callback(GtkAccelGroup* self, guint p0, Gdk // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_accel_changed(p0, ((Gdk::ModifierType)(p1)) , p2); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -235,6 +262,7 @@ void AccelGroup_Class::accel_changed_callback(GtkAccelGroup* self, guint p0, Gdk (*base->accel_changed)(self, p0, p1, p2); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* AccelGroup_Class::wrap_new(GObject* object) @@ -291,12 +319,12 @@ Glib::RefPtr AccelGroup::create() } void AccelGroup::lock() { - gtk_accel_group_lock(gobj()); +gtk_accel_group_lock(gobj()); } void AccelGroup::unlock() { - gtk_accel_group_unlock(gobj()); +gtk_accel_group_unlock(gobj()); } bool AccelGroup::disconnect_key(guint accel_key, Gdk::ModifierType accel_mods) @@ -309,6 +337,7 @@ Glib::ustring AccelGroup::get_label(guint accelerator_key, Gdk::ModifierType acc 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& acceleratable, guint accel_key, Gdk::ModifierType accel_mods) { return gtk_accel_group_activate(gobj(), accel_quark, Glib::unwrap(acceleratable), accel_key, ((GdkModifierType)(accel_mods))); @@ -325,12 +354,14 @@ Glib::SignalProxy3< bool,const Glib::RefPtr&,guint,Gdk::ModifierTy return Glib::SignalProxy3< bool,const Glib::RefPtr&,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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::AccelGroup::on_accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure) { BaseClassType *const base = static_cast( @@ -340,6 +371,10 @@ void Gtk::AccelGroup::on_accel_changed(guint keyval, Gdk::ModifierType modifier, if(base && base->accel_changed) (*base->accel_changed)(gobj(),keyval,((GdkModifierType)(modifier)),accel_closure); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/accelgroup.h b/libs/gtkmm2/gtk/gtkmm/accelgroup.h index 1a6a8adc4d..62190dae65 100644 --- a/libs/gtkmm2/gtk/gtkmm/accelgroup.h +++ b/libs/gtkmm2/gtk/gtkmm/accelgroup.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ACCELGROUP_H #define _GTKMM_ACCELGROUP_H + #include /* $Id$ */ @@ -164,7 +165,7 @@ public: * @param accelerator_mods Accelerator modifier mask. * @return A newly-allocated string representing the accelerator. * - * Since: 2.6. + * @newin2p6. */ static Glib::ustring get_label(guint accelerator_key, Gdk::ModifierType accelerator_mods); @@ -208,11 +209,20 @@ public: //TODO: Discover real parameter names: +/** + * @par Prototype: + * bool %accel_activate(const Glib::RefPtr& object, guint param2, Gdk::ModifierType param3) + */ Glib::SignalProxy3< bool,const Glib::RefPtr&,guint,Gdk::ModifierType > signal_accel_activate(); //TODO: The C type is unpleasant: + //This has C docs, but it isn't worth mentioning them for such a useless signal. murrayc. +/** + * @par Prototype: + * void %accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure) + */ Glib::SignalProxy3< void,guint,Gdk::ModifierType,GClosure* > signal_accel_changed(); @@ -221,12 +231,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gtk/gtkmm/accellabel.cc b/libs/gtkmm2/gtk/gtkmm/accellabel.cc index d62bc75418..f884b7d606 100644 --- a/libs/gtkmm2/gtk/gtkmm/accellabel.cc +++ b/libs/gtkmm2/gtk/gtkmm/accellabel.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -97,8 +98,19 @@ void AccelLabel_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* AccelLabel_Class::wrap_new(GObject* o) { @@ -148,7 +160,7 @@ AccelLabel::AccelLabel() void AccelLabel::set_accel_widget(const Widget& accel_widget) { - gtk_accel_label_set_accel_widget(gobj(), const_cast((accel_widget).gobj())); +gtk_accel_label_set_accel_widget(gobj(), const_cast((accel_widget).gobj())); } Widget* AccelLabel::get_accel_widget() @@ -158,7 +170,7 @@ Widget* AccelLabel::get_accel_widget() const Widget* AccelLabel::get_accel_widget() const { - return Glib::wrap(gtk_accel_label_get_accel_widget(const_cast(gobj()))); + return const_cast(this)->get_accel_widget(); } guint AccelLabel::get_accel_width() const @@ -172,15 +184,26 @@ bool AccelLabel::refetch() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AccelLabel::property_accel_widget() { return Glib::PropertyProxy(this, "accel-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AccelLabel::property_accel_widget() const { return Glib::PropertyProxy_ReadOnly(this, "accel-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/accellabel.h b/libs/gtkmm2/gtk/gtkmm/accellabel.h index a4d6a32645..2c057671fa 100644 --- a/libs/gtkmm2/gtk/gtkmm/accellabel.h +++ b/libs/gtkmm2/gtk/gtkmm/accellabel.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ACCELLABEL_H #define _GTKMM_ACCELLABEL_H + #include /* $Id$ */ @@ -89,11 +90,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -147,14 +154,17 @@ public: bool refetch(); //_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure - /** The widget to be monitored for accelerator changes. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_accel_widget() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -162,6 +172,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_accel_widget() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -177,6 +188,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::AccelLabel* wrap(GtkAccelLabel* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ACCELLABEL_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/accelmap.cc b/libs/gtkmm2/gtk/gtkmm/accelmap.cc index 1d87a7cd64..6b9c31c7fe 100644 --- a/libs/gtkmm2/gtk/gtkmm/accelmap.cc +++ b/libs/gtkmm2/gtk/gtkmm/accelmap.cc @@ -64,6 +64,24 @@ void unlock_path(const std::string& accel_path) gtk_accel_map_unlock_path(accel_path.c_str()); } +bool lookup_entry(const Glib::ustring& accel_path, Gtk::AccelKey& key) +{ + GtkAccelKey gkey = {GDK_VoidSymbol, GdkModifierType (0), 0}; + const bool known = gtk_accel_map_lookup_entry(accel_path.c_str(), &gkey); + + if(known) + key = AccelKey(gkey.accel_key, Gdk::ModifierType (gkey.accel_mods)); + else + key = AccelKey(GDK_VoidSymbol, Gdk::ModifierType (0)); + + return known; +} + +bool lookup_entry(const Glib::ustring& accel_path) +{ + return gtk_accel_map_lookup_entry(accel_path.c_str(), 0 /* "optional", according to the C docs. */); +} + } // namespace AccelMap } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/accelmap.h b/libs/gtkmm2/gtk/gtkmm/accelmap.h index 00dd8b9a1f..03440b359d 100644 --- a/libs/gtkmm2/gtk/gtkmm/accelmap.h +++ b/libs/gtkmm2/gtk/gtkmm/accelmap.h @@ -26,6 +26,7 @@ #include #include +#include namespace Gtk { @@ -107,8 +108,8 @@ void save(const std::string& filename); * * @param accel_path a valid accelerator path * - * Since: 2.4 - **/ + * @newin2p4 + */ void lock_path(const std::string& accel_path); /** Unlocks the given accelerator path. Refer to gtk_accel_map_lock_path() @@ -116,10 +117,27 @@ void lock_path(const std::string& accel_path); * * @param accel_path a valid accelerator path * - * Since: 2.4 - **/ + * @newin2p4 + */ void unlock_path(const std::string& accel_path); +/** Looks up the accelerator entry for accel_path. + * @param accel_path A valid accelerator path. + * @result true if accel_path is known, false otherwise + * + * @newin2p10 + */ +bool lookup_entry (const Glib::ustring& accel_path); + +/** Looks up the accelerator entry for accel_path and fills in key. + * @param accel_path A valid accelerator path. + * @param key The accelerator key to be filled in. + * @result true if accel_path is known, false otherwise + * + * @newin2p10 + */ +bool lookup_entry (const Glib::ustring& accel_path, Gtk::AccelKey& key); + } // namespace AccelMap } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/action.cc b/libs/gtkmm2/gtk/gtkmm/action.cc index 1504ee29c2..9ddf165d8e 100644 --- a/libs/gtkmm2/gtk/gtkmm/action.cc +++ b/libs/gtkmm2/gtk/gtkmm/action.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -28,6 +29,9 @@ #include #include #include +#include + +typedef Gtk::Action Action; namespace Gtk { @@ -51,9 +55,13 @@ Glib::RefPtr Action::create(const Glib::ustring& name, const Gtk::StockI void Action::set_tooltip(const Glib::ustring& tooltip) { +#ifdef GLIBMM_PROPERTIES_ENABLED property_tooltip() = tooltip; +#else + set_property("tooltip", tooltip); +#endif } - + } // namespace Gtk @@ -61,13 +69,15 @@ void Action::set_tooltip(const Glib::ustring& tooltip) namespace { -const Glib::SignalProxyInfo Action_signal_activate_info = + +static const Glib::SignalProxyInfo Action_signal_activate_info = { "activate", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -114,13 +124,19 @@ void Action_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->activate = &activate_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED GtkWidget* Action_Class::create_menu_item_vfunc_callback(GtkAction* self) { CppObjectType *const obj = dynamic_cast( @@ -133,15 +149,19 @@ GtkWidget* Action_Class::create_menu_item_vfunc_callback(GtkAction* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return (GtkWidget*)Glib::unwrap(obj->create_menu_item_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -157,7 +177,6 @@ GtkWidget* Action_Class::create_menu_item_vfunc_callback(GtkAction* self) typedef GtkWidget* RType; return RType(); } - GtkWidget* Action_Class::create_tool_item_vfunc_callback(GtkAction* self) { CppObjectType *const obj = dynamic_cast( @@ -170,15 +189,19 @@ GtkWidget* Action_Class::create_tool_item_vfunc_callback(GtkAction* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return (GtkWidget*)Glib::unwrap(obj->create_tool_item_vfunc()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -194,7 +217,6 @@ GtkWidget* Action_Class::create_tool_item_vfunc_callback(GtkAction* self) typedef GtkWidget* RType; return RType(); } - void Action_Class::connect_proxy_vfunc_callback(GtkAction* self, GtkWidget* proxy) { CppObjectType *const obj = dynamic_cast( @@ -207,16 +229,20 @@ void Action_Class::connect_proxy_vfunc_callback(GtkAction* self, GtkWidget* prox // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->connect_proxy_vfunc(Glib::wrap(proxy) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -229,7 +255,6 @@ void Action_Class::connect_proxy_vfunc_callback(GtkAction* self, GtkWidget* prox (*base->connect_proxy)(self, proxy); } } - void Action_Class::disconnect_proxy_vfunc_callback(GtkAction* self, GtkWidget* proxy) { CppObjectType *const obj = dynamic_cast( @@ -242,16 +267,20 @@ void Action_Class::disconnect_proxy_vfunc_callback(GtkAction* self, GtkWidget* p // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->disconnect_proxy_vfunc(Glib::wrap(proxy) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -264,8 +293,9 @@ void Action_Class::disconnect_proxy_vfunc_callback(GtkAction* self, GtkWidget* p (*base->disconnect_proxy)(self, proxy); } } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Action_Class::activate_callback(GtkAction* self) { CppObjectType *const obj = dynamic_cast( @@ -278,15 +308,19 @@ void Action_Class::activate_callback(GtkAction* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_activate(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -299,6 +333,7 @@ void Action_Class::activate_callback(GtkAction* self) (*base->activate)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Action_Class::wrap_new(GObject* object) @@ -370,7 +405,7 @@ bool Action::get_sensitive() const void Action::set_sensitive(bool sensitive) { - gtk_action_set_sensitive(gobj(), static_cast(sensitive)); +gtk_action_set_sensitive(gobj(), static_cast(sensitive)); } bool Action::is_visible() const @@ -385,12 +420,12 @@ bool Action::get_visible() const void Action::set_visible(bool visible) { - gtk_action_set_visible(gobj(), static_cast(visible)); +gtk_action_set_visible(gobj(), static_cast(visible)); } void Action::activate() { - gtk_action_activate(gobj()); +gtk_action_activate(gobj()); } Image* Action::create_icon(IconSize icon_size) @@ -410,32 +445,32 @@ ToolItem* Action::create_tool_item() void Action::connect_proxy(Widget& proxy) { - gtk_action_connect_proxy(gobj(), (proxy).gobj()); +gtk_action_connect_proxy(gobj(), (proxy).gobj()); } void Action::disconnect_proxy(Widget& proxy) { - gtk_action_disconnect_proxy(gobj(), (proxy).gobj()); +gtk_action_disconnect_proxy(gobj(), (proxy).gobj()); } Glib::SListHandle Action::get_proxies() { - return Glib::SListHandle(gtk_action_get_proxies(gobj()), Glib::OWNERSHIP_SHALLOW); + return Glib::SListHandle(gtk_action_get_proxies(gobj()), Glib::OWNERSHIP_NONE); } Glib::SListHandle Action::get_proxies() const { - return Glib::SListHandle(gtk_action_get_proxies(const_cast(gobj())), Glib::OWNERSHIP_SHALLOW); + return Glib::SListHandle(gtk_action_get_proxies(const_cast(gobj())), Glib::OWNERSHIP_NONE); } void Action::connect_accelerator() { - gtk_action_connect_accelerator(gobj()); +gtk_action_connect_accelerator(gobj()); } void Action::disconnect_accelerator() { - gtk_action_disconnect_accelerator(gobj()); +gtk_action_disconnect_accelerator(gobj()); } Glib::ustring Action::get_accel_path() const @@ -445,22 +480,22 @@ Glib::ustring Action::get_accel_path() const void Action::set_accel_path(const Glib::ustring& accel_path) { - gtk_action_set_accel_path(gobj(), accel_path.c_str()); +gtk_action_set_accel_path(gobj(), accel_path.c_str()); } void Action::set_accel_group(const Glib::RefPtr& accel_group) { - gtk_action_set_accel_group(gobj(), Glib::unwrap(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()); +gtk_action_block_activate_from(gobj(), (proxy).gobj()); } void Action::unblock_activate_from(Widget& proxy) { - gtk_action_unblock_activate_from(gobj(), (proxy).gobj()); +gtk_action_unblock_activate_from(gobj(), (proxy).gobj()); } @@ -470,112 +505,155 @@ Glib::SignalProxy0< void > Action::signal_activate() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_name() const { return Glib::PropertyProxy_ReadOnly(this, "name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_label() { return Glib::PropertyProxy(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_label() const { return Glib::PropertyProxy_ReadOnly(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_short_label() { return Glib::PropertyProxy(this, "short-label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_short_label() const { return Glib::PropertyProxy_ReadOnly(this, "short-label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_tooltip() { return Glib::PropertyProxy(this, "tooltip"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_tooltip() const { return Glib::PropertyProxy_ReadOnly(this, "tooltip"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_stock_id() { return Glib::PropertyProxy(this, "stock-id"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_stock_id() const { return Glib::PropertyProxy_ReadOnly(this, "stock-id"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_visible_horizontal() { return Glib::PropertyProxy(this, "visible-horizontal"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_visible_horizontal() const { return Glib::PropertyProxy_ReadOnly(this, "visible-horizontal"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_visible_vertical() { return Glib::PropertyProxy(this, "visible-vertical"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_visible_vertical() const { return Glib::PropertyProxy_ReadOnly(this, "visible-vertical"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_is_important() { return Glib::PropertyProxy(this, "is-important"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_is_important() const { return Glib::PropertyProxy_ReadOnly(this, "is-important"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_hide_if_empty() { return Glib::PropertyProxy(this, "hide-if-empty"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_hide_if_empty() const { return Glib::PropertyProxy_ReadOnly(this, "hide-if-empty"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_sensitive() { return Glib::PropertyProxy(this, "sensitive"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_sensitive() const { return Glib::PropertyProxy_ReadOnly(this, "sensitive"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Action::property_visible() { return Glib::PropertyProxy(this, "visible"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Action::property_visible() const { return Glib::PropertyProxy_ReadOnly(this, "visible"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Action::on_activate() { BaseClassType *const base = static_cast( @@ -585,8 +663,9 @@ void Gtk::Action::on_activate() if(base && base->activate) (*base->activate)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED Widget* Gtk::Action::create_menu_item_vfunc() { BaseClassType *const base = static_cast( @@ -599,7 +678,6 @@ Widget* Gtk::Action::create_menu_item_vfunc() typedef Widget* RType; return RType(); } - Widget* Gtk::Action::create_tool_item_vfunc() { BaseClassType *const base = static_cast( @@ -612,7 +690,6 @@ Widget* Gtk::Action::create_tool_item_vfunc() typedef Widget* RType; return RType(); } - void Gtk::Action::connect_proxy_vfunc(Widget* proxy) { BaseClassType *const base = static_cast( @@ -622,7 +699,6 @@ void Gtk::Action::connect_proxy_vfunc(Widget* proxy) 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( @@ -632,6 +708,7 @@ void Gtk::Action::disconnect_proxy_vfunc(Widget* proxy) if(base && base->disconnect_proxy) (*base->disconnect_proxy)(gobj(),(GtkWidget*)Glib::unwrap(proxy)); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/action.h b/libs/gtkmm2/gtk/gtkmm/action.h index 6c319c769a..f1ba555efa 100644 --- a/libs/gtkmm2/gtk/gtkmm/action.h +++ b/libs/gtkmm2/gtk/gtkmm/action.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ACTION_H #define _GTKMM_ACTION_H + #include /* $Id$ */ @@ -27,7 +28,7 @@ #include #include #include - + #ifndef DOXYGEN_SHOULD_SKIP_THIS typedef struct _GtkAction GtkAction; @@ -106,7 +107,7 @@ public: * @return The name of the action. The string belongs to GTK+ and should not * be freed. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_name() const; @@ -115,7 +116,7 @@ public: * @return true if the action and its associated action group * are both sensitive. * - * Since: 2.4. + * @newin2p4. */ bool is_sensitive() const; @@ -124,11 +125,10 @@ public: * for that. * @return true if the action itself is sensitive. * - * Since: 2.4. + * @newin2p4. */ bool get_sensitive() const; - //TODO: Just wrap gtk_action_set_sensitive() when they put it in GTK+. void set_tooltip(const Glib::ustring& tooltip); @@ -137,17 +137,17 @@ public: * is_sensitive() * for that. * - * Since: 2.6 + * @newin2p6 * @param sensitive true to make the action sensitive. */ void set_sensitive(bool sensitive = true); - + /** Returns whether the action is effectively visible. * @return true if the action and its associated action group * are both visible. * - * Since: 2.4. + * @newin2p4. */ bool is_visible() const; @@ -156,7 +156,7 @@ public: * for that. * @return true if the action itself is visible. * - * Since: 2.4. + * @newin2p4. */ bool get_visible() const; @@ -165,7 +165,7 @@ public: * is_visible() * for that. * - * Since: 2.6 + * @newin2p6 * @param visible true to make the action visible. */ void set_visible(bool visible = true); @@ -177,7 +177,7 @@ public: * * It can also be used to manually activate an action. * - * Since: 2.4 + * @newin2p4 */ void activate(); @@ -186,21 +186,21 @@ public: * @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. + * @newin2p4. */ 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. + * @newin2p4. */ 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. + * @newin2p4. */ ToolItem* create_tool_item(); @@ -212,7 +212,7 @@ public: * If the widget is already connected to an action, it is disconnected * first. * - * Since: 2.4 + * @newin2p4 * @param proxy The proxy widget. */ void connect_proxy(Widget& proxy); @@ -220,16 +220,17 @@ public: /** Disconnects a proxy widget from an action. * Does not destroy the widget, however. * - * Since: 2.4 + * @newin2p4 * @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. + * @newin2p4. */ Glib::SListHandle get_proxies(); @@ -237,9 +238,10 @@ public: * @return A G::SList of proxy widgets. The list is owned by the action and * must not be modified. * - * Since: 2.4. + * @newin2p4. */ Glib::SListHandle get_proxies() const; + /** Installs the accelerator for @a action if @a action has an * accel path and group. See set_accel_path() and @@ -250,20 +252,20 @@ public: * function has been called and doesn't remove the accelerator until * disconnect_accelerator() has been called as many times. * - * Since: 2.4 + * @newin2p4 */ void connect_accelerator(); /** Undoes the effect of one call to connect_accelerator(). * - * Since: 2.4 + * @newin2p4 */ void disconnect_accelerator(); /** Returns the accel path for this action. * - * Since: 2.6 + * @newin2p6 * @return The accel path for this action, or 0 * if none is set. The returned string is owned by GTK+ * and must not be freed or modified. @@ -273,6 +275,13 @@ public: /// For instance, void on_activate(); typedef sigc::slot SlotActivate; + /** The "activate" signal is emitted when the action is activated. + */ + +/** + * @par Prototype: + * void %activate() + */ Glib::SignalProxy0< void > signal_activate(); @@ -283,7 +292,7 @@ public: * with the action will have this accel path, so that their * accelerators are consistent. * - * Since: 2.4 + * @newin2p4 * @param accel_path The accelerator path. */ void set_accel_path(const Glib::ustring& accel_path); @@ -291,28 +300,33 @@ public: /** Sets the Gtk::AccelGroup in which the accelerator for this action * will be installed. * - * Since: 2.4 + * @newin2p4 * @param accel_group A Gtk::AccelGroup or 0. */ void set_accel_group(const Glib::RefPtr& accel_group); - /** A unique name for the action. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_name() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The label used for menu items and buttons that activate this action. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -320,15 +334,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A shorter label that may be used on toolbar buttons. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_short_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -336,15 +354,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_short_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A tooltip for this action. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_tooltip() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** A tooltip for this action. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -352,15 +374,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_tooltip() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The stock icon displayed in widgets representing this action. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_stock_id() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -368,15 +394,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_stock_id() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the toolbar item is visible when the toolbar is in a horizontal orientation. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_visible_horizontal() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -384,15 +414,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_visible_horizontal() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the toolbar item is visible when the toolbar is in a vertical orientation. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_visible_vertical() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -400,15 +434,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_visible_vertical() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the action is considered important. When TRUE + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_is_important() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -416,15 +454,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_is_important() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** When TRUE + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_hide_if_empty() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** When TRUE * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -432,15 +474,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_hide_if_empty() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the action is enabled. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_sensitive() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether the action is enabled. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -448,15 +494,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_sensitive() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the action is visible. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_visible() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether the action is visible. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -464,6 +514,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_visible() const; +#endif //#GLIBMM_PROPERTIES_ENABLED protected: @@ -475,7 +526,7 @@ protected: * * This function is intended for use by action implementations. * - * Since: 2.4 + * @newin2p4 * @param proxy A proxy widget. */ void block_activate_from(Widget& proxy); @@ -486,7 +537,7 @@ protected: * * This function is intended for use by action implementations. * - * Since: 2.4 + * @newin2p4 * @param proxy A proxy widget. */ void unblock_activate_from(Widget& proxy); @@ -494,22 +545,39 @@ protected: 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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Widget* create_menu_item_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Widget* create_tool_item_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void connect_proxy_vfunc(Widget* proxy); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void disconnect_proxy_vfunc(Widget* proxy); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_activate(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gtk/gtkmm/actiongroup.cc b/libs/gtkmm2/gtk/gtkmm/actiongroup.cc index d539b9ab5e..9512eecac1 100644 --- a/libs/gtkmm2/gtk/gtkmm/actiongroup.cc +++ b/libs/gtkmm2/gtk/gtkmm/actiongroup.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -53,9 +54,16 @@ void ActionGroup::add(const Glib::RefPtr& action, const AccelKey& accel_ if(accel_path.empty()) { //Copied from the gtk_action_group_add_action_with_accel() implementation: - accel_path = "/" + get_name() + "/" + action->property_name(); + + gchar* action_name = 0; + g_object_get(G_OBJECT(action->gobj()), "name", &action_name, static_cast(0)); + if(action_name) + { + accel_path = "/" + get_name() + '/' + action_name; + g_free(action_name); + } } - + AccelMap::add_entry(accel_path, key, mod); action->set_accel_path(accel_path); @@ -109,7 +117,8 @@ void ActionGroup::add(const Glib::RefPtr& action, const AccelKey& accel_ namespace { -void ActionGroup_signal_connect_proxy_callback(GtkActionGroup* self, GtkAction* p0,GtkWidget* p1,void* data) + +static void ActionGroup_signal_connect_proxy_callback(GtkActionGroup* self, GtkAction* p0,GtkWidget* p1,void* data) { using namespace Gtk; typedef sigc::slot< void,const Glib::RefPtr&,Widget* > SlotType; @@ -117,21 +126,25 @@ void ActionGroup_signal_connect_proxy_callback(GtkActionGroup* self, GtkAction* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0, true) , Glib::wrap(p1) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ActionGroup_signal_connect_proxy_info = +static const Glib::SignalProxyInfo ActionGroup_signal_connect_proxy_info = { "connect_proxy", (GCallback) &ActionGroup_signal_connect_proxy_callback, @@ -139,7 +152,7 @@ const Glib::SignalProxyInfo ActionGroup_signal_connect_proxy_info = }; -void ActionGroup_signal_disconnect_proxy_callback(GtkActionGroup* self, GtkAction* p0,GtkWidget* p1,void* data) +static void ActionGroup_signal_disconnect_proxy_callback(GtkActionGroup* self, GtkAction* p0,GtkWidget* p1,void* data) { using namespace Gtk; typedef sigc::slot< void,const Glib::RefPtr&,Widget* > SlotType; @@ -147,21 +160,25 @@ void ActionGroup_signal_disconnect_proxy_callback(GtkActionGroup* self, GtkActio // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0, true) , Glib::wrap(p1) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ActionGroup_signal_disconnect_proxy_info = +static const Glib::SignalProxyInfo ActionGroup_signal_disconnect_proxy_info = { "disconnect_proxy", (GCallback) &ActionGroup_signal_disconnect_proxy_callback, @@ -169,7 +186,7 @@ const Glib::SignalProxyInfo ActionGroup_signal_disconnect_proxy_info = }; -void ActionGroup_signal_pre_activate_callback(GtkActionGroup* self, GtkAction* p0,void* data) +static void ActionGroup_signal_pre_activate_callback(GtkActionGroup* self, GtkAction* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,const Glib::RefPtr& > SlotType; @@ -177,20 +194,24 @@ void ActionGroup_signal_pre_activate_callback(GtkActionGroup* self, GtkAction* p // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ActionGroup_signal_pre_activate_info = +static const Glib::SignalProxyInfo ActionGroup_signal_pre_activate_info = { "pre_activate", (GCallback) &ActionGroup_signal_pre_activate_callback, @@ -198,7 +219,7 @@ const Glib::SignalProxyInfo ActionGroup_signal_pre_activate_info = }; -void ActionGroup_signal_post_activate_callback(GtkActionGroup* self, GtkAction* p0,void* data) +static void ActionGroup_signal_post_activate_callback(GtkActionGroup* self, GtkAction* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,const Glib::RefPtr& > SlotType; @@ -206,26 +227,31 @@ void ActionGroup_signal_post_activate_callback(GtkActionGroup* self, GtkAction* // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0, true) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ActionGroup_signal_post_activate_info = +static const Glib::SignalProxyInfo ActionGroup_signal_post_activate_info = { "post_activate", (GCallback) &ActionGroup_signal_post_activate_callback, (GCallback) &ActionGroup_signal_post_activate_callback }; + } // anonymous namespace @@ -272,8 +298,19 @@ void ActionGroup_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* ActionGroup_Class::wrap_new(GObject* object) { @@ -339,7 +376,7 @@ bool ActionGroup::get_sensitive() const void ActionGroup::set_sensitive(bool sensitive) { - gtk_action_group_set_sensitive(gobj(), static_cast(sensitive)); +gtk_action_group_set_sensitive(gobj(), static_cast(sensitive)); } bool ActionGroup::get_visible() const @@ -349,27 +386,22 @@ bool ActionGroup::get_visible() const void ActionGroup::set_visible(bool visible) { - gtk_action_group_set_visible(gobj(), static_cast(visible)); +gtk_action_group_set_visible(gobj(), static_cast(visible)); } Glib::RefPtr ActionGroup::get_action(const Glib::ustring& action_name) { Glib::RefPtr 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 ActionGroup::get_action(const Glib::ustring& action_name) const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_action_group_get_action(const_cast(gobj()), action_name.c_str())); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_action(action_name); } Glib::ListHandle< Glib::RefPtr > ActionGroup::get_actions() @@ -384,7 +416,7 @@ Glib::ListHandle< Glib::RefPtr > ActionGroup::get_actions() const void ActionGroup::remove(const Glib::RefPtr& action) { - gtk_action_group_remove_action(gobj(), Glib::unwrap(action)); +gtk_action_group_remove_action(gobj(), Glib::unwrap(action)); } Glib::ustring ActionGroup::translate_string(const Glib::ustring& str) const @@ -398,22 +430,32 @@ Glib::SignalProxy2< void,const Glib::RefPtr&,Widget* > ActionGroup::sign return Glib::SignalProxy2< void,const Glib::RefPtr&,Widget* >(this, &ActionGroup_signal_connect_proxy_info); } + Glib::SignalProxy2< void,const Glib::RefPtr&,Widget* > ActionGroup::signal_disconnect_proxy() { return Glib::SignalProxy2< void,const Glib::RefPtr&,Widget* >(this, &ActionGroup_signal_disconnect_proxy_info); } + Glib::SignalProxy1< void,const Glib::RefPtr& > ActionGroup::signal_pre_activate() { return Glib::SignalProxy1< void,const Glib::RefPtr& >(this, &ActionGroup_signal_pre_activate_info); } + Glib::SignalProxy1< void,const Glib::RefPtr& > ActionGroup::signal_post_activate() { return Glib::SignalProxy1< void,const Glib::RefPtr& >(this, &ActionGroup_signal_post_activate_info); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/actiongroup.h b/libs/gtkmm2/gtk/gtkmm/actiongroup.h index 8db2b42e80..4416d6102e 100644 --- a/libs/gtkmm2/gtk/gtkmm/actiongroup.h +++ b/libs/gtkmm2/gtk/gtkmm/actiongroup.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ACTIONGROUP_H #define _GTKMM_ACTIONGROUP_H + #include /* $Id$ */ @@ -97,7 +98,7 @@ public: /** Gets the name of the action group. * @return The name of the action group. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_name() const; @@ -108,13 +109,13 @@ public: * is sensitive. * @return true if the group is sensitive. * - * Since: 2.4. + * @newin2p4. */ bool get_sensitive() const; /** Changes the sensitivity of @a action_group * - * Since: 2.4 + * @newin2p4 * @param sensitive New sensitivity. */ void set_sensitive(bool sensitive = true); @@ -125,13 +126,13 @@ public: * is visible. * @return true if the group is visible. * - * Since: 2.4. + * @newin2p4. */ bool get_visible() const; /** Changes the visible of @a action_group . * - * Since: 2.4 + * @newin2p4 * @param visible New visiblity. */ void set_visible(bool visible = true); @@ -141,7 +142,7 @@ public: * @param action_name The name of the action. * @return The action, or 0 if no action by that name exists * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr get_action(const Glib::ustring& action_name); @@ -149,7 +150,7 @@ public: * @param action_name The name of the action. * @return The action, or 0 if no action by that name exists * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr get_action(const Glib::ustring& action_name) const; @@ -157,14 +158,14 @@ public: /** Lists the actions in the action group. * @return An allocated list of the action objects in the action group * - * Since: 2.4. + * @newin2p4. */ Glib::ListHandle< Glib::RefPtr > get_actions(); /** Lists the actions in the action group. * @return An allocated list of the action objects in the action group * - * Since: 2.4. + * @newin2p4. */ Glib::ListHandle< Glib::RefPtr > get_actions() const; @@ -185,7 +186,7 @@ public: /** Removes an action object from the action group. * - * Since: 2.4 + * @newin2p4 * @param action An action. */ void remove(const Glib::RefPtr& action); @@ -197,7 +198,7 @@ public: * @param string A string. * @return The translation of @a string * - * Since: 2.6. + * @newin2p6. */ Glib::ustring translate_string(const Glib::ustring& str) const; @@ -207,15 +208,80 @@ public: //These are also just C convenience methods that are useless unless you are using the other convenience methods: + /** The connect_proxy signal is emitted after connecting a proxy to + * an action in the group. Note that the proxy may have been connected + * to a different action before. + * + * This is intended for simple customizations for which a custom action + * class would be too clumsy, e.g. showing tooltips for menuitems in the + * statusbar. + * + * UIManager proxies the signal and provides global notification + * just before any action is connected to a proxy, which is probably more + * convenient to use. + * + * @param action the action + * @param proxy the proxy + */ + +/** + * @par Prototype: + * void %connect_proxy(const Glib::RefPtr& action, Widget* proxy) + */ + Glib::SignalProxy2< void,const Glib::RefPtr&,Widget* > signal_connect_proxy(); + /** The disconnect_proxy signal is emitted after disconnecting a proxy + * from an action in the group. + * + * UIManager proxies the signal and provides global notification + * just before any action is connected to a proxy, which is probably more + * convenient to use. + * + * @param action the action + * @param proxy the proxy + */ + +/** + * @par Prototype: + * void %disconnect_proxy(const Glib::RefPtr& action, Widget* proxy) + */ + Glib::SignalProxy2< void,const Glib::RefPtr&,Widget* > signal_disconnect_proxy(); - + + /** The pre_activate signal is emitted just before the @action in the + * action_group is activated + * + * This is intended for UIManager to proxy the signal and provide global + * notification just before any action is activated. + * + * @action the action + */ + +/** + * @par Prototype: + * void %pre_activate(const Glib::RefPtr& action) + */ + Glib::SignalProxy1< void,const Glib::RefPtr& > signal_pre_activate(); - + + /** The post_activate signal is emitted just after the @action in the + * @action_group is activated + * + * This is intended for UIManager to proxy the signal and provide global + * notification just after any action is activated. + * + * @param action the action + */ + +/** + * @par Prototype: + * void %post_activate(const Glib::RefPtr& action) + */ + Glib::SignalProxy1< void,const Glib::RefPtr& > signal_post_activate(); @@ -223,11 +289,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gtk/gtkmm/adjustment.cc b/libs/gtkmm2/gtk/gtkmm/adjustment.cc index 10b2e8815f..8be2188291 100644 --- a/libs/gtkmm2/gtk/gtkmm/adjustment.cc +++ b/libs/gtkmm2/gtk/gtkmm/adjustment.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -29,22 +30,13 @@ namespace Gtk { -Adjustment::Adjustment(double value, - double lower, double upper, - double step_increment, double page_increment, - double page_size) +//This is hand-coded so we can change the sequence of properties. +//If we don't do this then the value is restricted to the initial values, ignoring the specified boundaries: +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)) + Gtk::Object(Glib::ConstructParams(adjustment_class_.init(), "lower",lower,"upper",upper,"step_increment",step_increment,"page_increment",page_increment,"page_size",page_size,"value",value, (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) @@ -83,7 +75,8 @@ void Adjustment::set_page_size(double size) namespace { -const Glib::SignalProxyInfo Adjustment_signal_changed_info = + +static const Glib::SignalProxyInfo Adjustment_signal_changed_info = { "changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -91,13 +84,14 @@ const Glib::SignalProxyInfo Adjustment_signal_changed_info = }; -const Glib::SignalProxyInfo Adjustment_signal_value_changed_info = +static const Glib::SignalProxyInfo Adjustment_signal_value_changed_info = { "value_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -142,11 +136,19 @@ void Adjustment_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->changed = &changed_callback; klass->value_changed = &value_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Adjustment_Class::changed_callback(GtkAdjustment* self) { CppObjectType *const obj = dynamic_cast( @@ -159,15 +161,19 @@ void Adjustment_Class::changed_callback(GtkAdjustment* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -180,7 +186,6 @@ void Adjustment_Class::changed_callback(GtkAdjustment* self) (*base->changed)(self); } } - void Adjustment_Class::value_changed_callback(GtkAdjustment* self) { CppObjectType *const obj = dynamic_cast( @@ -193,15 +198,19 @@ void Adjustment_Class::value_changed_callback(GtkAdjustment* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_value_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -214,6 +223,7 @@ void Adjustment_Class::value_changed_callback(GtkAdjustment* self) (*base->value_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Adjustment_Class::wrap_new(GObject* o) @@ -257,22 +267,22 @@ GType Adjustment::get_base_type() void Adjustment::changed() { - gtk_adjustment_changed(gobj()); +gtk_adjustment_changed(gobj()); } void Adjustment::value_changed() { - gtk_adjustment_value_changed(gobj()); +gtk_adjustment_value_changed(gobj()); } void Adjustment::clamp_page(double lower, double upper) { - gtk_adjustment_clamp_page(gobj(), lower, upper); +gtk_adjustment_clamp_page(gobj(), lower, upper); } void Adjustment::set_value(double value) { - gtk_adjustment_set_value(gobj(), value); +gtk_adjustment_set_value(gobj(), value); } double Adjustment::get_value() const @@ -280,43 +290,45 @@ double Adjustment::get_value() const return gtk_adjustment_get_value(const_cast(gobj())); } -double Adjustment::get_lower() const + double Adjustment::get_lower() const { return gobj()->lower; } - -double Adjustment::get_upper() const + + double Adjustment::get_upper() const { return gobj()->upper; } - -double Adjustment::get_step_increment() const + + double Adjustment::get_step_increment() const { return gobj()->step_increment; } - -double Adjustment::get_page_increment() const + + double Adjustment::get_page_increment() const { return gobj()->page_increment; } - -double Adjustment::get_page_size() const + + 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Adjustment::on_changed() { BaseClassType *const base = static_cast( @@ -326,7 +338,6 @@ void Gtk::Adjustment::on_changed() if(base && base->changed) (*base->changed)(gobj()); } - void Gtk::Adjustment::on_value_changed() { BaseClassType *const base = static_cast( @@ -336,6 +347,10 @@ void Gtk::Adjustment::on_value_changed() if(base && base->value_changed) (*base->value_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/adjustment.h b/libs/gtkmm2/gtk/gtkmm/adjustment.h index 2c45297cb4..6a5a347552 100644 --- a/libs/gtkmm2/gtk/gtkmm/adjustment.h +++ b/libs/gtkmm2/gtk/gtkmm/adjustment.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ADJUSTMENT_H #define _GTKMM_ADJUSTMENT_H + #include /* $Id$ */ @@ -100,13 +101,19 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_changed(); virtual void on_value_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -125,12 +132,9 @@ public: * @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); + 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(); @@ -162,28 +166,28 @@ public: /** Retrieve the @a lower member variable. * @return The current value of @a lower. */ - double get_lower() const; - + double get_lower() const; + /** Retrieve the @a upper member variable. * @return The current value of @a upper. */ - double get_upper() const; - + double get_upper() const; + /** Retrieve the @a step_increment variable. * @return The current value of @a step_increment. */ - double get_step_increment() const; - + double get_step_increment() const; + /** Retrieve the @a page_increment variable. * @return The current value of @a page_increment. */ - double get_page_increment() const; - + double get_page_increment() const; + /** Retrieve the @a page_size variable. * @return The current value of @a page_size. */ - double get_page_size() const; - + 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 @@ -212,9 +216,19 @@ public: void set_page_size(double size); +/** + * @par Prototype: + * void %changed() + */ + Glib::SignalProxy0< void > signal_changed(); +/** + * @par Prototype: + * void %value_changed() + */ + Glib::SignalProxy0< void > signal_value_changed(); @@ -231,6 +245,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Adjustment* wrap(GtkAdjustment* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ADJUSTMENT_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/alignment.cc b/libs/gtkmm2/gtk/gtkmm/alignment.cc index 56f5c58726..59555cc32a 100644 --- a/libs/gtkmm2/gtk/gtkmm/alignment.cc +++ b/libs/gtkmm2/gtk/gtkmm/alignment.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -80,8 +81,19 @@ void Alignment_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Alignment_Class::wrap_new(GObject* o) { @@ -138,104 +150,143 @@ Alignment::Alignment(AlignmentEnum xalign, AlignmentEnum yalign, float xscale, f void Alignment::set(float xalign, float yalign, float xscale, float yscale) { - gtk_alignment_set(gobj(), xalign, yalign, xscale, 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); +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); +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)); +gtk_alignment_get_padding(gobj(), &(padding_top), &(padding_bottom), &(padding_left), &(padding_right)); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_xalign() { return Glib::PropertyProxy(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_xalign() const { return Glib::PropertyProxy_ReadOnly(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_yalign() { return Glib::PropertyProxy(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_yalign() const { return Glib::PropertyProxy_ReadOnly(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_xscale() { return Glib::PropertyProxy(this, "xscale"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_xscale() const { return Glib::PropertyProxy_ReadOnly(this, "xscale"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_yscale() { return Glib::PropertyProxy(this, "yscale"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_yscale() const { return Glib::PropertyProxy_ReadOnly(this, "yscale"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_top_padding() { return Glib::PropertyProxy(this, "top-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_top_padding() const { return Glib::PropertyProxy_ReadOnly(this, "top-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_bottom_padding() { return Glib::PropertyProxy(this, "bottom-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_bottom_padding() const { return Glib::PropertyProxy_ReadOnly(this, "bottom-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_left_padding() { return Glib::PropertyProxy(this, "left-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_left_padding() const { return Glib::PropertyProxy_ReadOnly(this, "left-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Alignment::property_right_padding() { return Glib::PropertyProxy(this, "right-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Alignment::property_right_padding() const { return Glib::PropertyProxy_ReadOnly(this, "right-padding"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/alignment.h b/libs/gtkmm2/gtk/gtkmm/alignment.h index 98130b9e2d..265d34709f 100644 --- a/libs/gtkmm2/gtk/gtkmm/alignment.h +++ b/libs/gtkmm2/gtk/gtkmm/alignment.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ALIGNMENT_H #define _GTKMM_ALIGNMENT_H + #include /* $Id$ */ @@ -99,11 +100,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -150,7 +157,7 @@ public: * this can be used to indent the child widget towards the right by adding * padding on the left. * - * Since: 2.4 + * @newin2p4 * @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. @@ -161,7 +168,7 @@ public: /** Gets the padding on the different sides of the widget. * See set_padding(). * - * Since: 2.4 + * @newin2p4 * @param padding_top Location to store the padding for the top of the widget, or 0. * @param padding_bottom Location to store the padding for the bottom of the widget, or 0. * @param padding_left Location to store the padding for the left of the widget, or 0. @@ -169,14 +176,17 @@ public: */ 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 + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -184,15 +194,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_xalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Vertical position of child in available space. 0.0 is top aligned + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_yalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -200,15 +214,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_yalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** If available horizontal space is bigger than needed for the child + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xscale() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -216,15 +234,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_xscale() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** If available vertical space is bigger than needed for the child + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_yscale() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -232,17 +254,21 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_yscale() const; +#endif //#GLIBMM_PROPERTIES_ENABLED //New in GTK+ 2.4 - /** The padding to insert at the top of the widget. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_top_padding() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -250,15 +276,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_top_padding() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The padding to insert at the bottom of the widget. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_bottom_padding() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -266,15 +296,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_bottom_padding() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The padding to insert at the left of the widget. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_left_padding() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -282,15 +316,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_left_padding() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The padding to insert at the right of the widget. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_right_padding() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -298,6 +336,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_right_padding() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -313,6 +352,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Alignment* wrap(GtkAlignment* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ALIGNMENT_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/arrow.cc b/libs/gtkmm2/gtk/gtkmm/arrow.cc index 681847cc02..a4a4f5b24f 100644 --- a/libs/gtkmm2/gtk/gtkmm/arrow.cc +++ b/libs/gtkmm2/gtk/gtkmm/arrow.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -96,8 +97,19 @@ void Arrow_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Arrow_Class::wrap_new(GObject* o) { @@ -147,29 +159,44 @@ Arrow::Arrow(ArrowType arrow_type, ShadowType shadow_type) void Arrow::set(ArrowType arrow_type, ShadowType shadow_type) { - gtk_arrow_set(gobj(), ((GtkArrowType)(arrow_type)), ((GtkShadowType)(shadow_type))); +gtk_arrow_set(gobj(), ((GtkArrowType)(arrow_type)), ((GtkShadowType)(shadow_type))); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Arrow::property_arrow_type() { return Glib::PropertyProxy(this, "arrow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Arrow::property_arrow_type() const { return Glib::PropertyProxy_ReadOnly(this, "arrow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Arrow::property_shadow_type() { return Glib::PropertyProxy(this, "shadow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Arrow::property_shadow_type() const { return Glib::PropertyProxy_ReadOnly(this, "shadow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/arrow.h b/libs/gtkmm2/gtk/gtkmm/arrow.h index f34a744d3e..8a6e3e15c1 100644 --- a/libs/gtkmm2/gtk/gtkmm/arrow.h +++ b/libs/gtkmm2/gtk/gtkmm/arrow.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ARROW_H #define _GTKMM_ARROW_H + #include /* $Id$ */ @@ -96,11 +97,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -125,14 +132,17 @@ public: */ void set(ArrowType arrow_type, ShadowType shadow_type); - /** The direction the arrow should point. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_arrow_type() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The direction the arrow should point. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -140,15 +150,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_arrow_type() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Appearance of the shadow surrounding the arrow. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_shadow_type() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -156,6 +170,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_shadow_type() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -172,6 +187,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Arrow* wrap(GtkArrow* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ARROW_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/aspectframe.cc b/libs/gtkmm2/gtk/gtkmm/aspectframe.cc index faf6a94286..84d97d7df3 100644 --- a/libs/gtkmm2/gtk/gtkmm/aspectframe.cc +++ b/libs/gtkmm2/gtk/gtkmm/aspectframe.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -27,7 +28,6 @@ #include - namespace { } // anonymous namespace @@ -74,8 +74,19 @@ void AspectFrame_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* AspectFrame_Class::wrap_new(GObject* o) { @@ -132,54 +143,77 @@ AspectFrame::AspectFrame(const Glib::ustring& label, float xalign, float yalign, void AspectFrame::set(float xalign, float yalign, float ratio, bool obey_child) { - gtk_aspect_frame_set(gobj(), xalign, yalign, ratio, static_cast(obey_child)); +gtk_aspect_frame_set(gobj(), xalign, yalign, ratio, static_cast(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(obey_child)); +gtk_aspect_frame_set(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign), ratio, static_cast(obey_child)); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AspectFrame::property_xalign() { return Glib::PropertyProxy(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AspectFrame::property_xalign() const { return Glib::PropertyProxy_ReadOnly(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AspectFrame::property_yalign() { return Glib::PropertyProxy(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AspectFrame::property_yalign() const { return Glib::PropertyProxy_ReadOnly(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AspectFrame::property_ratio() { return Glib::PropertyProxy(this, "ratio"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AspectFrame::property_ratio() const { return Glib::PropertyProxy_ReadOnly(this, "ratio"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy AspectFrame::property_obey_child() { return Glib::PropertyProxy(this, "obey-child"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly AspectFrame::property_obey_child() const { return Glib::PropertyProxy_ReadOnly(this, "obey-child"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/aspectframe.h b/libs/gtkmm2/gtk/gtkmm/aspectframe.h index 4687417211..3ec9dffed9 100644 --- a/libs/gtkmm2/gtk/gtkmm/aspectframe.h +++ b/libs/gtkmm2/gtk/gtkmm/aspectframe.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ASPECTFRAME_H #define _GTKMM_ASPECTFRAME_H + #include /* $Id$ */ @@ -95,11 +96,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -159,14 +166,17 @@ public: void set(AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child = true); - /** X alignment of the child. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** X alignment of the child. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -174,15 +184,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_xalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Y alignment of the child. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_yalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Y alignment of the child. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -190,15 +204,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_yalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Aspect ratio if obey_child is FALSE. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_ratio() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -206,15 +224,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_ratio() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Force aspect ratio to match that of the frame's child. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_obey_child() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -222,6 +244,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_obey_child() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -237,6 +260,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::AspectFrame* wrap(GtkAspectFrame* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ASPECTFRAME_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/bin.cc b/libs/gtkmm2/gtk/gtkmm/bin.cc index 2b58d2954c..e25a25c7fe 100644 --- a/libs/gtkmm2/gtk/gtkmm/bin.cc +++ b/libs/gtkmm2/gtk/gtkmm/bin.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -177,8 +178,19 @@ void Bin_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Bin_Class::wrap_new(GObject* o) { @@ -226,7 +238,7 @@ Bin::Bin() { } -Widget* Bin::get_child() + Widget* Bin::get_child() { return Glib::wrap(gobj()->child); } @@ -235,6 +247,13 @@ const Widget* Bin::get_child() const { return Glib::wrap(gobj()->child); } + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/bin.h b/libs/gtkmm2/gtk/gtkmm/bin.h index 2100110f69..abeab46269 100644 --- a/libs/gtkmm2/gtk/gtkmm/bin.h +++ b/libs/gtkmm2/gtk/gtkmm/bin.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_BIN_H #define _GTKMM_BIN_H + #include /* $Id$ */ @@ -92,11 +93,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -109,9 +116,9 @@ 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(); + 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. @@ -206,6 +213,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Bin* wrap(GtkBin* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_BIN_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/box.cc b/libs/gtkmm2/gtk/gtkmm/box.cc index a67411b47b..2f6a0ba157 100644 --- a/libs/gtkmm2/gtk/gtkmm/box.cc +++ b/libs/gtkmm2/gtk/gtkmm/box.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -175,8 +176,19 @@ void Box_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Box_Class::wrap_new(GObject* o) { @@ -326,17 +338,17 @@ Box::Box() void Box::pack_start(Widget& child, bool expand, bool fill, guint padding) { - gtk_box_pack_start(gobj(), (child).gobj(), static_cast(expand), static_cast(fill), padding); +gtk_box_pack_start(gobj(), (child).gobj(), static_cast(expand), static_cast(fill), padding); } void Box::pack_end(Widget& child, bool expand, bool fill, guint padding) { - gtk_box_pack_end(gobj(), (child).gobj(), static_cast(expand), static_cast(fill), padding); +gtk_box_pack_end(gobj(), (child).gobj(), static_cast(expand), static_cast(fill), padding); } void Box::set_homogeneous(bool homogeneous) { - gtk_box_set_homogeneous(gobj(), static_cast(homogeneous)); +gtk_box_set_homogeneous(gobj(), static_cast(homogeneous)); } bool Box::get_homogeneous() const @@ -346,7 +358,7 @@ bool Box::get_homogeneous() const void Box::set_spacing(int spacing) { - gtk_box_set_spacing(gobj(), spacing); +gtk_box_set_spacing(gobj(), spacing); } int Box::get_spacing() const @@ -356,29 +368,44 @@ int Box::get_spacing() const void Box::reorder_child(Widget& child, int pos) { - gtk_box_reorder_child(gobj(), (child).gobj(), pos); +gtk_box_reorder_child(gobj(), (child).gobj(), pos); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Box::property_spacing() { return Glib::PropertyProxy(this, "spacing"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Box::property_spacing() const { return Glib::PropertyProxy_ReadOnly(this, "spacing"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Box::property_homogeneous() { return Glib::PropertyProxy(this, "homogeneous"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Box::property_homogeneous() const { return Glib::PropertyProxy_ReadOnly(this, "homogeneous"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -425,8 +452,19 @@ void VBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* VBox_Class::wrap_new(GObject* o) { @@ -474,6 +512,13 @@ VBox::VBox(bool homogeneous, int spacing) } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk @@ -518,8 +563,19 @@ void HBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* HBox_Class::wrap_new(GObject* o) { @@ -567,6 +623,13 @@ HBox::HBox(bool homogeneous, int spacing) } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/box.h b/libs/gtkmm2/gtk/gtkmm/box.h index 3955273760..a3a0e69cdd 100644 --- a/libs/gtkmm2/gtk/gtkmm/box.h +++ b/libs/gtkmm2/gtk/gtkmm/box.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_BOX_H #define _GTKMM_BOX_H + #include /* $Id$ */ @@ -211,7 +212,8 @@ virtual void remove(Widget& w); //Implented as custom or by LIST_CONTAINER_REMOV * 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. + * Gtk::Box. The last widget added with pack_start() will be placed just before + * the last widget added with pack_end() * * 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 @@ -268,11 +270,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -354,14 +362,17 @@ public: */ const BoxList& children() const; - /** The amount of space between children. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_spacing() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The amount of space between children. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -369,15 +380,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_spacing() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the children should all be the same size. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_homogeneous() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -385,6 +400,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_homogeneous() const; +#endif //#GLIBMM_PROPERTIES_ENABLED protected: @@ -450,11 +466,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -531,11 +553,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -564,7 +592,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Box* wrap(GtkBox* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::VBox @@ -573,7 +603,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::VBox* wrap(GtkVBox* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::HBox @@ -582,6 +614,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::HBox* wrap(GtkHBox* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_BOX_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/button.cc b/libs/gtkmm2/gtk/gtkmm/button.cc index 01a3265d8c..4c4bbd8230 100644 --- a/libs/gtkmm2/gtk/gtkmm/button.cc +++ b/libs/gtkmm2/gtk/gtkmm/button.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -52,7 +53,8 @@ Button::Button(const StockID& stock_id) namespace { -const Glib::SignalProxyInfo Button_signal_pressed_info = + +static const Glib::SignalProxyInfo Button_signal_pressed_info = { "pressed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -60,7 +62,7 @@ const Glib::SignalProxyInfo Button_signal_pressed_info = }; -const Glib::SignalProxyInfo Button_signal_released_info = +static const Glib::SignalProxyInfo Button_signal_released_info = { "released", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -68,7 +70,7 @@ const Glib::SignalProxyInfo Button_signal_released_info = }; -const Glib::SignalProxyInfo Button_signal_clicked_info = +static const Glib::SignalProxyInfo Button_signal_clicked_info = { "clicked", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -76,7 +78,7 @@ const Glib::SignalProxyInfo Button_signal_clicked_info = }; -const Glib::SignalProxyInfo Button_signal_enter_info = +static const Glib::SignalProxyInfo Button_signal_enter_info = { "enter", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -84,7 +86,7 @@ const Glib::SignalProxyInfo Button_signal_enter_info = }; -const Glib::SignalProxyInfo Button_signal_leave_info = +static const Glib::SignalProxyInfo Button_signal_leave_info = { "leave", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -92,13 +94,14 @@ const Glib::SignalProxyInfo Button_signal_leave_info = }; -const Glib::SignalProxyInfo Button_signal_activate_info = +static const Glib::SignalProxyInfo Button_signal_activate_info = { "activate", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -143,15 +146,23 @@ void Button_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->pressed = &pressed_callback; klass->released = &released_callback; klass->clicked = &clicked_callback; klass->enter = &enter_callback; klass->leave = &leave_callback; klass->activate = &activate_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Button_Class::pressed_callback(GtkButton* self) { CppObjectType *const obj = dynamic_cast( @@ -164,15 +175,19 @@ void Button_Class::pressed_callback(GtkButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_pressed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -185,7 +200,6 @@ void Button_Class::pressed_callback(GtkButton* self) (*base->pressed)(self); } } - void Button_Class::released_callback(GtkButton* self) { CppObjectType *const obj = dynamic_cast( @@ -198,15 +212,19 @@ void Button_Class::released_callback(GtkButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_released(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -219,7 +237,6 @@ void Button_Class::released_callback(GtkButton* self) (*base->released)(self); } } - void Button_Class::clicked_callback(GtkButton* self) { CppObjectType *const obj = dynamic_cast( @@ -232,15 +249,19 @@ void Button_Class::clicked_callback(GtkButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_clicked(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -253,7 +274,6 @@ void Button_Class::clicked_callback(GtkButton* self) (*base->clicked)(self); } } - void Button_Class::enter_callback(GtkButton* self) { CppObjectType *const obj = dynamic_cast( @@ -266,15 +286,19 @@ void Button_Class::enter_callback(GtkButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_enter(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -287,7 +311,6 @@ void Button_Class::enter_callback(GtkButton* self) (*base->enter)(self); } } - void Button_Class::leave_callback(GtkButton* self) { CppObjectType *const obj = dynamic_cast( @@ -300,15 +323,19 @@ void Button_Class::leave_callback(GtkButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_leave(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -321,7 +348,6 @@ void Button_Class::leave_callback(GtkButton* self) (*base->leave)(self); } } - void Button_Class::activate_callback(GtkButton* self) { CppObjectType *const obj = dynamic_cast( @@ -334,15 +360,19 @@ void Button_Class::activate_callback(GtkButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_activate(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -355,6 +385,7 @@ void Button_Class::activate_callback(GtkButton* self) (*base->activate)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Button_Class::wrap_new(GObject* o) @@ -405,32 +436,32 @@ Button::Button() void Button::pressed() { - gtk_button_pressed(gobj()); +gtk_button_pressed(gobj()); } void Button::released() { - gtk_button_released(gobj()); +gtk_button_released(gobj()); } void Button::clicked() { - gtk_button_clicked(gobj()); +gtk_button_clicked(gobj()); } void Button::enter() { - gtk_button_enter(gobj()); +gtk_button_enter(gobj()); } void Button::leave() { - gtk_button_leave(gobj()); +gtk_button_leave(gobj()); } void Button::set_relief(ReliefStyle newstyle) { - gtk_button_set_relief(gobj(), ((GtkReliefStyle)(newstyle))); +gtk_button_set_relief(gobj(), ((GtkReliefStyle)(newstyle))); } ReliefStyle Button::get_relief() const @@ -440,7 +471,7 @@ ReliefStyle Button::get_relief() const void Button::set_label(const Glib::ustring& label) { - gtk_button_set_label(gobj(), label.c_str()); +gtk_button_set_label(gobj(), label.c_str()); } Glib::ustring Button::get_label() const @@ -450,7 +481,7 @@ Glib::ustring Button::get_label() const void Button::set_use_underline(bool use_underline) { - gtk_button_set_use_underline(gobj(), static_cast(use_underline)); +gtk_button_set_use_underline(gobj(), static_cast(use_underline)); } bool Button::get_use_underline() const @@ -460,7 +491,7 @@ bool Button::get_use_underline() const void Button::set_use_stock(bool use_stock) { - gtk_button_set_use_stock(gobj(), static_cast(use_stock)); +gtk_button_set_use_stock(gobj(), static_cast(use_stock)); } bool Button::get_use_stock() const @@ -470,7 +501,7 @@ bool Button::get_use_stock() const void Button::set_focus_on_click(bool focus_on_click) { - gtk_button_set_focus_on_click(gobj(), static_cast(focus_on_click)); +gtk_button_set_focus_on_click(gobj(), static_cast(focus_on_click)); } bool Button::get_focus_on_click() const @@ -480,17 +511,17 @@ bool Button::get_focus_on_click() const void Button::set_alignment(float xalign, float yalign) { - gtk_button_set_alignment(gobj(), xalign, yalign); +gtk_button_set_alignment(gobj(), xalign, yalign); } void Button::get_alignment(float& xalign, float& yalign) { - gtk_button_get_alignment(gobj(), &(xalign), &(yalign)); +gtk_button_get_alignment(gobj(), &(xalign), &(yalign)); } void Button::set_image(Widget& image) { - gtk_button_set_image(gobj(), (image).gobj()); +gtk_button_set_image(gobj(), (image).gobj()); } Widget* Button::get_image() @@ -500,7 +531,17 @@ Widget* Button::get_image() const Widget* Button::get_image() const { - return Glib::wrap(gtk_button_get_image(const_cast(gobj()))); + return const_cast(this)->get_image(); +} + +void Button::set_image_position(PositionType position) +{ +gtk_button_set_image_position(gobj(), ((GtkPositionType)(position))); +} + +PositionType Button::get_image_position() const +{ + return ((PositionType)(gtk_button_get_image_position(const_cast(gobj())))); } @@ -509,113 +550,165 @@ 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_label() { return Glib::PropertyProxy(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_label() const { return Glib::PropertyProxy_ReadOnly(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_relief() { return Glib::PropertyProxy(this, "relief"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_relief() const { return Glib::PropertyProxy_ReadOnly(this, "relief"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_use_underline() { return Glib::PropertyProxy(this, "use-underline"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_use_underline() const { return Glib::PropertyProxy_ReadOnly(this, "use-underline"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_use_stock() { return Glib::PropertyProxy(this, "use-stock"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_use_stock() const { return Glib::PropertyProxy_ReadOnly(this, "use-stock"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_focus_on_click() { return Glib::PropertyProxy(this, "focus-on-click"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_focus_on_click() const { return Glib::PropertyProxy_ReadOnly(this, "focus-on-click"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_xalign() { return Glib::PropertyProxy(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_xalign() const { return Glib::PropertyProxy_ReadOnly(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_yalign() { return Glib::PropertyProxy(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_yalign() const { return Glib::PropertyProxy_ReadOnly(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Button::property_image() { return Glib::PropertyProxy(this, "image"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Button::property_image() const { return Glib::PropertyProxy_ReadOnly(this, "image"); } +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy Button::property_image_position() +{ + return Glib::PropertyProxy(this, "image-position"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly Button::property_image_position() const +{ + return Glib::PropertyProxy_ReadOnly(this, "image-position"); +} +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Button::on_pressed() { BaseClassType *const base = static_cast( @@ -625,7 +718,6 @@ void Gtk::Button::on_pressed() if(base && base->pressed) (*base->pressed)(gobj()); } - void Gtk::Button::on_released() { BaseClassType *const base = static_cast( @@ -635,7 +727,6 @@ void Gtk::Button::on_released() if(base && base->released) (*base->released)(gobj()); } - void Gtk::Button::on_clicked() { BaseClassType *const base = static_cast( @@ -645,7 +736,6 @@ void Gtk::Button::on_clicked() if(base && base->clicked) (*base->clicked)(gobj()); } - void Gtk::Button::on_enter() { BaseClassType *const base = static_cast( @@ -655,7 +745,6 @@ void Gtk::Button::on_enter() if(base && base->enter) (*base->enter)(gobj()); } - void Gtk::Button::on_leave() { BaseClassType *const base = static_cast( @@ -665,7 +754,6 @@ void Gtk::Button::on_leave() if(base && base->leave) (*base->leave)(gobj()); } - void Gtk::Button::on_activate() { BaseClassType *const base = static_cast( @@ -675,6 +763,10 @@ void Gtk::Button::on_activate() if(base && base->activate) (*base->activate)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/button.h b/libs/gtkmm2/gtk/gtkmm/button.h index 1ba9920a0f..990ede4163 100644 --- a/libs/gtkmm2/gtk/gtkmm/button.h +++ b/libs/gtkmm2/gtk/gtkmm/button.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_BUTTON_H #define _GTKMM_BUTTON_H + #include /* $Id$ */ @@ -95,17 +96,23 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_pressed(); virtual void on_released(); virtual void on_clicked(); virtual void on_enter(); virtual void on_leave(); virtual void on_activate(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -122,7 +129,7 @@ public: * directly instead. */ Button(); - + /** Simple Push Button with label. * Create a button with the given label inside. You won't be able @@ -130,6 +137,11 @@ public: * in it */ explicit Button(const Glib::ustring& label, bool mnemonic = false); + + /** Creates a new Button containing the image and text from a stock item. + * Stock ids have identifiers like Gtk::Stock::OK and Gtk::Stock::APPLY. + * @param stock_id The stock item. + */ explicit Button(const StockID& stock_id); @@ -200,7 +212,7 @@ public: * you don't want the keyboard focus removed from the main area of the * application. * - * Since: 2.4 + * @newin2p4 * @param focus_on_click Whether the button grabs focus when clicked with the mouse. */ void set_focus_on_click(bool focus_on_click = true); @@ -210,7 +222,7 @@ public: * @return true if the button grabs focus when it is clicked with * the mouse. * - * Since: 2.4. + * @newin2p4. */ bool get_focus_on_click() const; @@ -218,7 +230,7 @@ public: /** 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 + * @newin2p4 * @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, @@ -228,7 +240,7 @@ public: /** Gets the alignment of the child in the button. * - * Since: 2.4 + * @newin2p4 * @param xalign Return location for horizontal alignment. * @param yalign Return location for vertical alignment. */ @@ -236,57 +248,96 @@ public: /** 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. + * it depends on the gtk-button-images setting whether the + * image will be displayed or not, you don't have to call + * Gtk::Widget::show() on @a image yourself. * - * Since: 2.6 + * @newin2p6 * @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(). + * This may have been explicitly set by set_image() + * or specified as a stock item to the constructor. * - * Since: 2.6 + * @a newin2p6 */ 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(). + * This may have been explicitly set by set_image() + * or specified as a stock item to the constructor. * - * Since: 2.6 + * @a newin2p6 */ const Widget* get_image() const; - + + void set_image_position(PositionType position); + + PositionType get_image_position() const; + + +/** + * @par Prototype: + * void %pressed() + */ + Glib::SignalProxy0< void > signal_pressed(); +/** + * @par Prototype: + * void %released() + */ + Glib::SignalProxy0< void > signal_released(); +/** + * @par Prototype: + * void %clicked() + */ + Glib::SignalProxy0< void > signal_clicked(); +/** + * @par Prototype: + * void %enter() + */ + Glib::SignalProxy0< void > signal_enter(); +/** + * @par Prototype: + * void %leave() + */ + Glib::SignalProxy0< void > signal_leave(); +/** + * @par Prototype: + * void %activate() + */ + Glib::SignalProxy0< void > signal_activate(); - /** Text of the label widget inside the button + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -294,15 +345,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The border relief style. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_relief() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The border relief style. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -310,15 +365,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_relief() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** If set + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_underline() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** If set * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -326,15 +385,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_underline() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** If set + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_stock() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** If set * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -342,15 +405,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_stock() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the button grabs focus when it is clicked with the mouse. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_focus_on_click() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -358,15 +425,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_focus_on_click() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Horizontal position of child in available space. 0.0 is left aligned + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -374,15 +445,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_xalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Vertical position of child in available space. 0.0 is top aligned + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_yalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -390,15 +465,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_yalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Child widget to appear next to the button text. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_image() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -406,6 +485,27 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_image() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** The position of the image relative to 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 property_image_position() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** The position of the image relative to 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 property_image_position() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -427,6 +527,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Button* wrap(GtkButton* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_BUTTON_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/buttonbox.cc b/libs/gtkmm2/gtk/gtkmm/buttonbox.cc index 7fe9bd53f6..72f0ad3f73 100644 --- a/libs/gtkmm2/gtk/gtkmm/buttonbox.cc +++ b/libs/gtkmm2/gtk/gtkmm/buttonbox.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -98,8 +99,19 @@ void ButtonBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* ButtonBox_Class::wrap_new(GObject* o) { @@ -147,12 +159,12 @@ ButtonBoxStyle ButtonBox::get_layout() const void ButtonBox::set_layout(ButtonBoxStyle layout_style) { - gtk_button_box_set_layout(gobj(), ((GtkButtonBoxStyle)(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(is_secondary)); +gtk_button_box_set_child_secondary(gobj(), (child).gobj(), static_cast(is_secondary)); } bool ButtonBox::get_child_secondary(const Gtk::Widget& child) const @@ -160,56 +172,67 @@ bool ButtonBox::get_child_secondary(const Gtk::Widget& child) const return gtk_button_box_get_child_secondary(const_cast(gobj()), const_cast(child.gobj())); } -int ButtonBox::get_child_min_width() const + int ButtonBox::get_child_min_width() const { return gobj()->child_min_width; } - -void ButtonBox::set_child_min_width(const int& value) + + void ButtonBox::set_child_min_width(const int& value) { gobj()->child_min_width = value; } - -int ButtonBox::get_child_min_height() const + + int ButtonBox::get_child_min_height() const { return gobj()->child_min_height; } - -void ButtonBox::set_child_min_height(const int& value) + + void ButtonBox::set_child_min_height(const int& value) { gobj()->child_min_height = value; } - -int ButtonBox::get_child_ipadding_x() const + + int ButtonBox::get_child_ipadding_x() const { return gobj()->child_ipad_x; } - -void ButtonBox::set_child_ipadding_x(const int& value) + + void ButtonBox::set_child_ipadding_x(const int& value) { gobj()->child_ipad_x = value; } - -int ButtonBox::get_child_ipadding_y() const + + int ButtonBox::get_child_ipadding_y() const { return gobj()->child_ipad_y; } - -void ButtonBox::set_child_ipadding_y(const int& value) + + void ButtonBox::set_child_ipadding_y(const int& value) { gobj()->child_ipad_y = value; } + - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ButtonBox::property_layout_style() { return Glib::PropertyProxy(this, "layout-style"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ButtonBox::property_layout_style() const { return Glib::PropertyProxy_ReadOnly(this, "layout-style"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -256,8 +279,19 @@ void VButtonBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* VButtonBox_Class::wrap_new(GObject* o) { @@ -298,6 +332,13 @@ GType VButtonBox::get_base_type() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk @@ -342,8 +383,19 @@ void HButtonBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* HButtonBox_Class::wrap_new(GObject* o) { @@ -384,6 +436,13 @@ GType HButtonBox::get_base_type() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/buttonbox.h b/libs/gtkmm2/gtk/gtkmm/buttonbox.h index 6f39c6aed9..7d0665f92b 100644 --- a/libs/gtkmm2/gtk/gtkmm/buttonbox.h +++ b/libs/gtkmm2/gtk/gtkmm/buttonbox.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_BUTTONBOX_H #define _GTKMM_BUTTONBOX_H + #include /* $Id$ */ @@ -111,11 +112,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -133,7 +140,7 @@ public: * * 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 + * Gtk::BUTTONBOX_EDGE, and before 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 @@ -150,30 +157,33 @@ public: * @param child A child of @a widget . * @return Whether @a child should appear in a secondary group of children. * - * Since: 2.4. + * @newin2p4. */ 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 + 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); + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_layout_style() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -181,6 +191,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_layout_style() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -241,11 +252,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -312,11 +329,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -338,7 +361,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ButtonBox* wrap(GtkButtonBox* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::VButtonBox @@ -347,7 +372,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::VButtonBox* wrap(GtkVButtonBox* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::HButtonBox @@ -356,6 +383,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::HButtonBox* wrap(GtkHButtonBox* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_BUTTONBOX_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/calendar.cc b/libs/gtkmm2/gtk/gtkmm/calendar.cc index 66add813c7..819d4229b9 100644 --- a/libs/gtkmm2/gtk/gtkmm/calendar.cc +++ b/libs/gtkmm2/gtk/gtkmm/calendar.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -37,7 +38,8 @@ namespace Gtk namespace { -const Glib::SignalProxyInfo Calendar_signal_month_changed_info = + +static const Glib::SignalProxyInfo Calendar_signal_month_changed_info = { "month_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -45,7 +47,7 @@ const Glib::SignalProxyInfo Calendar_signal_month_changed_info = }; -const Glib::SignalProxyInfo Calendar_signal_day_selected_info = +static const Glib::SignalProxyInfo Calendar_signal_day_selected_info = { "day_selected", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -53,7 +55,7 @@ const Glib::SignalProxyInfo Calendar_signal_day_selected_info = }; -const Glib::SignalProxyInfo Calendar_signal_day_selected_double_click_info = +static const Glib::SignalProxyInfo Calendar_signal_day_selected_double_click_info = { "day_selected_double_click", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -61,7 +63,7 @@ const Glib::SignalProxyInfo Calendar_signal_day_selected_double_click_info = }; -const Glib::SignalProxyInfo Calendar_signal_prev_month_info = +static const Glib::SignalProxyInfo Calendar_signal_prev_month_info = { "prev_month", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -69,7 +71,7 @@ const Glib::SignalProxyInfo Calendar_signal_prev_month_info = }; -const Glib::SignalProxyInfo Calendar_signal_next_month_info = +static const Glib::SignalProxyInfo Calendar_signal_next_month_info = { "next_month", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -77,7 +79,7 @@ const Glib::SignalProxyInfo Calendar_signal_next_month_info = }; -const Glib::SignalProxyInfo Calendar_signal_prev_year_info = +static const Glib::SignalProxyInfo Calendar_signal_prev_year_info = { "prev_year", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -85,13 +87,14 @@ const Glib::SignalProxyInfo Calendar_signal_prev_year_info = }; -const Glib::SignalProxyInfo Calendar_signal_next_year_info = +static 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 @@ -142,6 +145,10 @@ void Calendar_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->month_changed = &month_changed_callback; klass->day_selected = &day_selected_callback; klass->day_selected_double_click = &day_selected_double_click_callback; @@ -149,9 +156,13 @@ void Calendar_Class::class_init_function(void* g_class, void* class_data) klass->next_month = &next_month_callback; klass->prev_year = &prev_year_callback; klass->next_year = &next_year_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Calendar_Class::month_changed_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -164,15 +175,19 @@ void Calendar_Class::month_changed_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_month_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -185,7 +200,6 @@ void Calendar_Class::month_changed_callback(GtkCalendar* self) (*base->month_changed)(self); } } - void Calendar_Class::day_selected_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -198,15 +212,19 @@ void Calendar_Class::day_selected_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_day_selected(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -219,7 +237,6 @@ void Calendar_Class::day_selected_callback(GtkCalendar* self) (*base->day_selected)(self); } } - void Calendar_Class::day_selected_double_click_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -232,15 +249,19 @@ void Calendar_Class::day_selected_double_click_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_day_selected_double_click(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -253,7 +274,6 @@ void Calendar_Class::day_selected_double_click_callback(GtkCalendar* self) (*base->day_selected_double_click)(self); } } - void Calendar_Class::prev_month_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -266,15 +286,19 @@ void Calendar_Class::prev_month_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_prev_month(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -287,7 +311,6 @@ void Calendar_Class::prev_month_callback(GtkCalendar* self) (*base->prev_month)(self); } } - void Calendar_Class::next_month_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -300,15 +323,19 @@ void Calendar_Class::next_month_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_next_month(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -321,7 +348,6 @@ void Calendar_Class::next_month_callback(GtkCalendar* self) (*base->next_month)(self); } } - void Calendar_Class::prev_year_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -334,15 +360,19 @@ void Calendar_Class::prev_year_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_prev_year(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -355,7 +385,6 @@ void Calendar_Class::prev_year_callback(GtkCalendar* self) (*base->prev_year)(self); } } - void Calendar_Class::next_year_callback(GtkCalendar* self) { CppObjectType *const obj = dynamic_cast( @@ -368,15 +397,19 @@ void Calendar_Class::next_year_callback(GtkCalendar* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_next_year(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -389,6 +422,7 @@ void Calendar_Class::next_year_callback(GtkCalendar* self) (*base->next_year)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Calendar_Class::wrap_new(GObject* o) @@ -444,7 +478,7 @@ int Calendar::select_month(guint month, guint year) void Calendar::select_day(guint day) { - gtk_calendar_select_day(gobj(), day); +gtk_calendar_select_day(gobj(), day); } int Calendar::mark_day(guint day) @@ -459,17 +493,21 @@ int Calendar::unmark_day(guint day) void Calendar::clear_marks() { - gtk_calendar_clear_marks(gobj()); +gtk_calendar_clear_marks(gobj()); } +#ifndef GTKMM_DISABLE_DEPRECATED + void Calendar::display_options(CalendarDisplayOptions flags) { - gtk_calendar_display_options(gobj(), ((GtkCalendarDisplayOptions)(flags))); +gtk_calendar_display_options(gobj(), ((GtkCalendarDisplayOptions)(flags))); } +#endif // GTKMM_DISABLE_DEPRECATED + void Calendar::set_display_options(CalendarDisplayOptions flags) { - gtk_calendar_set_display_options(gobj(), ((GtkCalendarDisplayOptions)(flags))); +gtk_calendar_set_display_options(gobj(), ((GtkCalendarDisplayOptions)(flags))); } CalendarDisplayOptions Calendar::get_display_options() const @@ -479,17 +517,17 @@ CalendarDisplayOptions Calendar::get_display_options() const void Calendar::get_date(guint& year, guint& month, guint& day) const { - gtk_calendar_get_date(const_cast(gobj()), &(year), &(month), &(day)); +gtk_calendar_get_date(const_cast(gobj()), &(year), &(month), &(day)); } void Calendar::freeze() { - gtk_calendar_freeze(gobj()); +gtk_calendar_freeze(gobj()); } void Calendar::thaw() { - gtk_calendar_thaw(gobj()); +gtk_calendar_thaw(gobj()); } @@ -498,37 +536,44 @@ 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Calendar::on_month_changed() { BaseClassType *const base = static_cast( @@ -538,7 +583,6 @@ void Gtk::Calendar::on_month_changed() if(base && base->month_changed) (*base->month_changed)(gobj()); } - void Gtk::Calendar::on_day_selected() { BaseClassType *const base = static_cast( @@ -548,7 +592,6 @@ void Gtk::Calendar::on_day_selected() if(base && base->day_selected) (*base->day_selected)(gobj()); } - void Gtk::Calendar::on_day_selected_double_click() { BaseClassType *const base = static_cast( @@ -558,7 +601,6 @@ void Gtk::Calendar::on_day_selected_double_click() if(base && base->day_selected_double_click) (*base->day_selected_double_click)(gobj()); } - void Gtk::Calendar::on_prev_month() { BaseClassType *const base = static_cast( @@ -568,7 +610,6 @@ void Gtk::Calendar::on_prev_month() if(base && base->prev_month) (*base->prev_month)(gobj()); } - void Gtk::Calendar::on_next_month() { BaseClassType *const base = static_cast( @@ -578,7 +619,6 @@ void Gtk::Calendar::on_next_month() if(base && base->next_month) (*base->next_month)(gobj()); } - void Gtk::Calendar::on_prev_year() { BaseClassType *const base = static_cast( @@ -588,7 +628,6 @@ void Gtk::Calendar::on_prev_year() if(base && base->prev_year) (*base->prev_year)(gobj()); } - void Gtk::Calendar::on_next_year() { BaseClassType *const base = static_cast( @@ -598,6 +637,10 @@ void Gtk::Calendar::on_next_year() if(base && base->next_year) (*base->next_year)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/calendar.h b/libs/gtkmm2/gtk/gtkmm/calendar.h index a026c941e6..915ba1af21 100644 --- a/libs/gtkmm2/gtk/gtkmm/calendar.h +++ b/libs/gtkmm2/gtk/gtkmm/calendar.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CALENDAR_H #define _GTKMM_CALENDAR_H + #include /* $Id$ */ @@ -175,11 +176,16 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_month_changed(); virtual void on_day_selected(); virtual void on_day_selected_double_click(); @@ -187,6 +193,7 @@ protected: virtual void on_next_month(); virtual void on_prev_year(); virtual void on_next_year(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -195,26 +202,51 @@ public: Calendar(); + /** Shifts the calendar to a different month. + * @param month A month number between 0 and 11. + * @param year The year the month is in. + * @return true, always. + */ int select_month(guint month, guint year); + /** Selects a day from the current month. + * @param day The day number between 1 and 31, or 0 to unselect + * the currently selected day. + */ void select_day(guint day); + /** Places a visual marker on a particular day. + * @param day The day number to mark between 1 and 31. + * @return true, always. + */ int mark_day(guint day); + /** Removes the visual marker from a particular day. + * @param day The day number to unmark between 1 and 31. + * @return true, always. + */ int unmark_day(guint day); + /** Remove all visual markers. + */ void clear_marks(); - #ifndef GTKMM_DISABLE_DEPRECATED +#ifndef GTKMM_DISABLE_DEPRECATED + + /** Sets display options (whether to display the heading and the month headings). + * + * Deprecated: Use set_display_options() instead + * @param flags The display options to set. + */ void display_options(CalendarDisplayOptions flags); - #endif //GTKMM_DISABLE_DEPRECATED - - +#endif // GTKMM_DISABLE_DEPRECATED + + /** Sets display options (whether to display the heading and the month * headings). * - * Since: 2.4 + * @newin2p4 * @param flags The display options to set. */ void set_display_options(CalendarDisplayOptions flags); @@ -222,36 +254,82 @@ public: /** Returns the current display options of @a calendar . * @return The display options. * - * Since: 2.4. + * @newin2p4. */ CalendarDisplayOptions get_display_options() const; + /** Obtains the selected date from a Gtk::Calendar. + * @param year Location to store the year number, or 0. + * @param month Location to store the month number (between 0 and 11), or 0. + * @param day Location to store the day number (between 1 and 31), or 0. + */ void get_date(guint& year, guint& month, guint& day) const; + /** Does nothing. Previously locked the display of the calendar until + * it was thawed with thaw(). + */ void freeze(); + /** Does nothing. Previously defrosted a calendar; all the changes made + * since the last freeze() were displayed. + */ void thaw(); +/** + * @par Prototype: + * void %month_changed() + */ + Glib::SignalProxy0< void > signal_month_changed(); +/** + * @par Prototype: + * void %day_selected() + */ + Glib::SignalProxy0< void > signal_day_selected(); +/** + * @par Prototype: + * void %day_selected_double_click() + */ + Glib::SignalProxy0< void > signal_day_selected_double_click(); +/** + * @par Prototype: + * void %prev_month() + */ + Glib::SignalProxy0< void > signal_prev_month(); +/** + * @par Prototype: + * void %next_month() + */ + Glib::SignalProxy0< void > signal_next_month(); +/** + * @par Prototype: + * void %prev_year() + */ + Glib::SignalProxy0< void > signal_prev_year(); +/** + * @par Prototype: + * void %next_year() + */ + Glib::SignalProxy0< void > signal_next_year(); @@ -268,6 +346,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Calendar* wrap(GtkCalendar* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CALENDAR_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/celleditable.cc b/libs/gtkmm2/gtk/gtkmm/celleditable.cc index 2f0d2a5b1b..a2013f9d5e 100644 --- a/libs/gtkmm2/gtk/gtkmm/celleditable.cc +++ b/libs/gtkmm2/gtk/gtkmm/celleditable.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -29,7 +30,8 @@ namespace { -const Glib::SignalProxyInfo CellEditable_signal_editing_done_info = + +static const Glib::SignalProxyInfo CellEditable_signal_editing_done_info = { "editing_done", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -37,13 +39,14 @@ const Glib::SignalProxyInfo CellEditable_signal_editing_done_info = }; -const Glib::SignalProxyInfo CellEditable_signal_remove_widget_info = +static const Glib::SignalProxyInfo CellEditable_signal_remove_widget_info = { "remove_widget", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -88,11 +91,17 @@ void CellEditable_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED klass->start_editing = &start_editing_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->editing_done = &editing_done_callback; klass->remove_widget = &remove_widget_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void CellEditable_Class::start_editing_vfunc_callback(GtkCellEditable* self, GdkEvent* event) { CppObjectType *const obj = dynamic_cast( @@ -105,15 +114,19 @@ void CellEditable_Class::start_editing_vfunc_callback(GtkCellEditable* self, Gdk // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->start_editing_vfunc(event); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -127,8 +140,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->start_editing)(self, event); } } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void CellEditable_Class::editing_done_callback(GtkCellEditable* self) { CppObjectType *const obj = dynamic_cast( @@ -141,15 +155,19 @@ void CellEditable_Class::editing_done_callback(GtkCellEditable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_editing_done(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -163,7 +181,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->editing_done)(self); } } - void CellEditable_Class::remove_widget_callback(GtkCellEditable* self) { CppObjectType *const obj = dynamic_cast( @@ -176,15 +193,19 @@ void CellEditable_Class::remove_widget_callback(GtkCellEditable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_remove_widget(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -198,6 +219,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->remove_widget)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CellEditable_Class::wrap_new(GObject* object) @@ -242,17 +264,17 @@ GType CellEditable::get_base_type() void CellEditable::start_editing(GdkEvent* event) { - gtk_cell_editable_start_editing(gobj(), event); +gtk_cell_editable_start_editing(gobj(), event); } void CellEditable::editing_done() { - gtk_cell_editable_editing_done(gobj()); +gtk_cell_editable_editing_done(gobj()); } void CellEditable::remove_widget() { - gtk_cell_editable_remove_widget(gobj()); +gtk_cell_editable_remove_widget(gobj()); } @@ -261,12 +283,14 @@ 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::CellEditable::on_editing_done() { BaseClassType *const base = static_cast( @@ -277,7 +301,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->editing_done) (*base->editing_done)(gobj()); } - void Gtk::CellEditable::on_remove_widget() { BaseClassType *const base = static_cast( @@ -288,8 +311,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->remove_widget) (*base->remove_widget)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED void Gtk::CellEditable::start_editing_vfunc(GdkEvent* event) { BaseClassType *const base = static_cast( @@ -300,6 +324,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->start_editing) (*base->start_editing)(gobj(),event); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/celleditable.h b/libs/gtkmm2/gtk/gtkmm/celleditable.h index 8d2bfdd6c5..065f9101da 100644 --- a/libs/gtkmm2/gtk/gtkmm/celleditable.h +++ b/libs/gtkmm2/gtk/gtkmm/celleditable.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLEDITABLE_H #define _GTKMM_CELLEDITABLE_H + #include /* $Id$ */ @@ -115,27 +116,45 @@ public: void remove_widget(); +/** + * @par Prototype: + * void %editing_done() + */ + Glib::SignalProxy0< void > signal_editing_done(); +/** + * @par Prototype: + * void %remove_widget() + */ + Glib::SignalProxy0< void > signal_remove_widget(); protected: - virtual void start_editing_vfunc(GdkEvent* event); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void start_editing_vfunc(GdkEvent* event); +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_editing_done(); virtual void on_remove_widget(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -154,5 +173,6 @@ namespace Glib } // namespace Glib + #endif /* _GTKMM_CELLEDITABLE_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/celllayout.cc b/libs/gtkmm2/gtk/gtkmm/celllayout.cc index 474dea3e5b..15f10eb85a 100644 --- a/libs/gtkmm2/gtk/gtkmm/celllayout.cc +++ b/libs/gtkmm2/gtk/gtkmm/celllayout.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -26,75 +27,58 @@ #include -namespace //anonymous +static void SignalProxy_CellData_gtk_callback(GtkCellLayout* /* cell_layout */, GtkCellRenderer* /* cell */, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer data) { + Gtk::CellLayout::SlotCellData* the_slot = static_cast(data); -// 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(data); - + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED //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)); + (*the_slot)(Gtk::TreeModel::const_iterator(tree_model, iter)); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } - + #endif //GLIBMM_EXCEPTIONS_ENABLED } -void SignalProxy_CellData::gtk_callback_destroy(void* data) +static void SignalProxy_CellData_gtk_callback_destroy(void* data) { - delete static_cast(data); + delete static_cast(data); } -} // anonymous namespace - - namespace Gtk { +#ifdef GLIBMM_PROPERTIES_ENABLED 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()); } +#endif //GLIBMM_PROPERTIES_ENABLED + +void CellLayout::add_attribute(CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column) +{ + gtk_cell_layout_add_attribute(gobj(), + (GtkCellRenderer*) cell.gobj(), attribute.c_str(), column.index()); +} void CellLayout::set_cell_data_func(CellRenderer& cell, const SlotCellData& slot) { - // Create a signal proxy. A pointer to this will be passed + // Create a copy of the slot object. 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); + // when SignalProxy_CellData_gtk_callback_destroy() is called. + SlotCellData* slot_copy = new SlotCellData(slot); gtk_cell_layout_set_cell_data_func(gobj(), cell.gobj(), - &SignalProxy_CellData::gtk_callback, pSignalProxy, - &SignalProxy_CellData::gtk_callback_destroy); + &SignalProxy_CellData_gtk_callback, slot_copy, + &SignalProxy_CellData_gtk_callback_destroy); } @@ -147,14 +131,20 @@ void CellLayout_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void CellLayout_Class::pack_start_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand) { CppObjectType *const obj = dynamic_cast( @@ -167,17 +157,21 @@ void CellLayout_Class::pack_start_vfunc_callback(GtkCellLayout* self, GtkCellRen // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->pack_start_vfunc(Glib::wrap(cell) , expand ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -191,7 +185,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->pack_start)(self, cell, expand); } } - void CellLayout_Class::pack_end_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand) { CppObjectType *const obj = dynamic_cast( @@ -204,17 +197,21 @@ void CellLayout_Class::pack_end_vfunc_callback(GtkCellLayout* self, GtkCellRende // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->pack_end_vfunc(Glib::wrap(cell) , expand ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -228,7 +225,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->pack_end)(self, cell, expand); } } - void CellLayout_Class::clear_vfunc_callback(GtkCellLayout* self) { CppObjectType *const obj = dynamic_cast( @@ -241,15 +237,19 @@ void CellLayout_Class::clear_vfunc_callback(GtkCellLayout* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->clear_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -263,7 +263,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->clear)(self); } } - void CellLayout_Class::add_attribute_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, const gchar* attribute, gint column) { CppObjectType *const obj = dynamic_cast( @@ -276,18 +275,22 @@ void CellLayout_Class::add_attribute_vfunc_callback(GtkCellLayout* self, GtkCell // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -301,7 +304,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->add_attribute)(self, cell, attribute, column); } } - void CellLayout_Class::clear_attributes_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell) { CppObjectType *const obj = dynamic_cast( @@ -314,16 +316,20 @@ void CellLayout_Class::clear_attributes_vfunc_callback(GtkCellLayout* self, GtkC // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->clear_attributes_vfunc(Glib::wrap(cell) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -337,7 +343,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->clear_attributes)(self, cell); } } - void CellLayout_Class::reorder_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gint position) { CppObjectType *const obj = dynamic_cast( @@ -350,17 +355,21 @@ void CellLayout_Class::reorder_vfunc_callback(GtkCellLayout* self, GtkCellRender // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->reorder_vfunc(Glib::wrap(cell) , position ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -374,6 +383,10 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->reorder)(self, cell, position); } } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CellLayout_Class::wrap_new(GObject* object) @@ -418,35 +431,39 @@ GType CellLayout::get_base_type() void CellLayout::pack_start(CellRenderer& cell, bool expand) { - gtk_cell_layout_pack_start(gobj(), (cell).gobj(), static_cast(expand)); +gtk_cell_layout_pack_start(gobj(), (cell).gobj(), static_cast(expand)); } void CellLayout::pack_end(CellRenderer& cell, bool expand) { - gtk_cell_layout_pack_end(gobj(), (cell).gobj(), static_cast(expand)); +gtk_cell_layout_pack_end(gobj(), (cell).gobj(), static_cast(expand)); } void CellLayout::clear() { - gtk_cell_layout_clear(gobj()); +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); +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()); +gtk_cell_layout_clear_attributes(gobj(), (cell).gobj()); } void CellLayout::reorder(CellRenderer& cell, int position) { - gtk_cell_layout_reorder(gobj(), (cell).gobj(), position); +gtk_cell_layout_reorder(gobj(), (cell).gobj(), position); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED void Gtk::CellLayout::pack_start_vfunc(CellRenderer* cell, bool expand) { BaseClassType *const base = static_cast( @@ -457,7 +474,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->pack_start) (*base->pack_start)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),static_cast(expand)); } - void Gtk::CellLayout::pack_end_vfunc(CellRenderer* cell, bool expand) { BaseClassType *const base = static_cast( @@ -468,7 +484,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->pack_end) (*base->pack_end)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),static_cast(expand)); } - void Gtk::CellLayout::clear_vfunc() { BaseClassType *const base = static_cast( @@ -479,7 +494,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -490,7 +504,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -501,7 +514,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -512,6 +524,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->reorder) (*base->reorder)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),position); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/celllayout.h b/libs/gtkmm2/gtk/gtkmm/celllayout.h index 1fc7c8f6eb..7a2484621f 100644 --- a/libs/gtkmm2/gtk/gtkmm/celllayout.h +++ b/libs/gtkmm2/gtk/gtkmm/celllayout.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLLAYOUT_H #define _GTKMM_CELLLAYOUT_H + #include /* $Id$ */ @@ -108,7 +109,9 @@ public: * 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 true. * - * Since: 2.4 + * Note that reusing the same cell renderer is not supported. + * + * @newin2p4 * @param cell A Gtk::CellRenderer. * @param expand true if @a cell is to be given extra space allocated to @a cell_layout . */ @@ -118,7 +121,9 @@ public: * @a cell is allocated no more space than it needs. Any unused space is * divided evenly between cells for which @a expand is true. * - * Since: 2.4 + * Note that reusing the same cell renderer is not supported. + * + * @newin2p4 * @param cell A Gtk::CellRenderer. * @param expand true if @a cell is to be given extra space allocated to @a cell_layout . */ @@ -127,10 +132,10 @@ public: /** Unsets all the mappings on all renderers on @a cell_layout and * removes all renderers from @a cell_layout . * - * Since: 2.4 + * @newin2p4 */ void clear(); - + //I think this is just a convenience method, equivalent to clear() and multiple add_attribute()s. murrayc. @@ -140,24 +145,29 @@ public: * of the model contains strings, you could have the "text" attribute of a * Gtk::CellRendererText get its values from column 2. * - * Since: 2.4 + * @newin2p4 * @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) +#ifdef GLIBMM_PROPERTIES_ENABLED + void add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column); +#endif + + void add_attribute(CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column); + + //For instance, void on_cell_data(const TreeModel::const_iterator& iter) typedef sigc::slot SlotCellData; void set_cell_data_func(CellRenderer& cell, const SlotCellData& slot); - + /** Clears all existing attributes previously set with * set_attributes(). * - * Since: 2.4 + * @newin2p4 * @param cell A Gtk::CellRenderer to clear the attribute mapping on. */ void clear_attributes(CellRenderer& cell); @@ -166,31 +176,54 @@ public: /** 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 + * @newin2p4 * @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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void pack_start_vfunc(CellRenderer* cell, bool expand); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void pack_end_vfunc(CellRenderer* cell, bool expand); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void clear_vfunc(); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void add_attribute_vfunc(CellRenderer* cell, const Glib::ustring& attribute, int column); +#endif //GLIBMM_VFUNCS_ENABLED + //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); - + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void clear_attributes_vfunc(CellRenderer* cell); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void reorder_vfunc(CellRenderer* cell, int position); +#endif //GLIBMM_VFUNCS_ENABLED + public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -205,7 +238,11 @@ void CellLayout::pack_start(const TreeModelColumn& column, bo pack_start(*pCellRenderer, expand); //Make the renderer render the column: +#ifdef GLIBMM_PROPERTIES_ENABLED add_attribute(pCellRenderer->_property_renderable(), column); +#else + add_attribute(*pCellRenderer, pCellRenderer->_property_renderable(), column); +#endif } } // namespace Gtk @@ -222,5 +259,6 @@ namespace Glib } // namespace Glib + #endif /* _GTKMM_CELLLAYOUT_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc index 8cec8dc46f..8ce803d02e 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -34,11 +35,19 @@ void CellRenderer::get_size(Widget& widget, int& x_offset, int& y_offset, int& w gtk_cell_renderer_get_size(const_cast(gobj()), widget.gobj(), 0, &x_offset, &y_offset, &width, &height); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_Base CellRenderer::_property_renderable() { g_assert_not_reached(); return Glib::PropertyProxy(0, 0); // shut up warnings } +#else +Glib::ustring CellRenderer::_property_renderable() +{ + g_assert_not_reached(); + return Glib::ustring(); +} +#endif //GLIBMM_PROPERTIES_ENABLED } // namespace Gtk @@ -46,7 +55,8 @@ Glib::PropertyProxy_Base CellRenderer::_property_renderable() namespace { -const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info = + +static const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info = { "editing_canceled", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -54,7 +64,7 @@ const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info = }; -void CellRenderer_signal_editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0,const gchar* p1,void* data) +static 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; @@ -62,27 +72,32 @@ void CellRenderer_signal_editing_started_callback(GtkCellRenderer* self, GtkCell // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(dynamic_cast(Glib::wrap_auto((GObject*)(p0), false)) , Glib::convert_const_gchar_ptr_to_ustring(p1) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo CellRenderer_signal_editing_started_info = +static 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 @@ -139,13 +154,19 @@ void CellRenderer_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED klass->get_size = &get_size_vfunc_callback; klass->render = &render_vfunc_callback; klass->activate = &activate_vfunc_callback; klass->start_editing = &start_editing_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->editing_canceled = &editing_canceled_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED 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( @@ -158,8 +179,10 @@ void CellRenderer_Class::get_size_vfunc_callback(GtkCellRenderer* self, GtkWidge // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_size_vfunc(*Glib::wrap(widget) , &Glib::wrap(cell_area) @@ -168,11 +191,13 @@ void CellRenderer_Class::get_size_vfunc_callback(GtkCellRenderer* self, GtkWidge , width , height ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -185,7 +210,6 @@ void CellRenderer_Class::get_size_vfunc_callback(GtkCellRenderer* self, GtkWidge (*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( @@ -198,8 +222,10 @@ void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, GdkDrawabl // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->render_vfunc(Glib::wrap(window, true) , *Glib::wrap(widget) @@ -208,11 +234,13 @@ void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, GdkDrawabl , Glib::wrap(expose_area) , ((CellRendererState)(flags)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -225,7 +253,6 @@ void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, GdkDrawabl (*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( @@ -238,8 +265,10 @@ gboolean CellRenderer_Class::activate_vfunc_callback(GtkCellRenderer* self, GdkE // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->activate_vfunc(event, *Glib::wrap(widget) , Glib::convert_const_gchar_ptr_to_ustring(path) @@ -247,11 +276,13 @@ gboolean CellRenderer_Class::activate_vfunc_callback(GtkCellRenderer* self, GdkE , Glib::wrap(cell_area) , ((CellRendererState)(flags)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -267,7 +298,6 @@ gboolean CellRenderer_Class::activate_vfunc_callback(GtkCellRenderer* self, GdkE 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( @@ -278,10 +308,12 @@ GtkCellEditable* CellRenderer_Class::start_editing_vfunc_callback(GtkCellRendere // 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_()) + if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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) @@ -289,11 +321,13 @@ GtkCellEditable* CellRenderer_Class::start_editing_vfunc_callback(GtkCellRendere , Glib::wrap(cell_area) , ((CellRendererState)(flags)) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -309,8 +343,9 @@ GtkCellEditable* CellRenderer_Class::start_editing_vfunc_callback(GtkCellRendere typedef GtkCellEditable* RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self) { CppObjectType *const obj = dynamic_cast( @@ -323,15 +358,19 @@ void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_editing_canceled(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -344,6 +383,7 @@ void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self) (*base->editing_canceled)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CellRenderer_Class::wrap_new(GObject* o) @@ -387,12 +427,12 @@ GType CellRenderer::get_base_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(gobj()), (widget).gobj(), const_cast(cell_area.gobj()), &x_offset, &y_offset, &width, &height); +gtk_cell_renderer_get_size(const_cast(gobj()), (widget).gobj(), const_cast(cell_area.gobj()), &x_offset, &y_offset, &width, &height); } void CellRenderer::render(const Glib::RefPtr& 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(background_area.gobj()), const_cast(cell_area.gobj()), const_cast(expose_area.gobj()), ((GtkCellRendererState)(flags))); +gtk_cell_renderer_render(gobj(), Glib::unwrap(window), (widget).gobj(), const_cast(background_area.gobj()), const_cast(cell_area.gobj()), const_cast(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) @@ -407,22 +447,26 @@ CellEditable* CellRenderer::start_editing(GdkEvent* event, Widget& widget, const void CellRenderer::set_fixed_size(int width, int height) { - gtk_cell_renderer_set_fixed_size(gobj(), width, 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(gobj()), &width, &height); +gtk_cell_renderer_get_fixed_size(const_cast(gobj()), &width, &height); } +#ifndef GTKMM_DISABLE_DEPRECATED + void CellRenderer::editing_canceled() { - gtk_cell_renderer_editing_canceled(gobj()); +gtk_cell_renderer_editing_canceled(gobj()); } +#endif // GTKMM_DISABLE_DEPRECATED + void CellRenderer::stop_editing(bool canceled) { - gtk_cell_renderer_stop_editing(gobj(), static_cast(canceled)); +gtk_cell_renderer_stop_editing(gobj(), static_cast(canceled)); } CellRenderer::CellRenderer() @@ -438,143 +482,204 @@ 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_mode() { return Glib::PropertyProxy(this, "mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_mode() const { return Glib::PropertyProxy_ReadOnly(this, "mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_visible() { return Glib::PropertyProxy(this, "visible"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_visible() const { return Glib::PropertyProxy_ReadOnly(this, "visible"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRenderer::property_sensitive() +{ + return Glib::PropertyProxy(this, "sensitive"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRenderer::property_sensitive() const +{ + return Glib::PropertyProxy_ReadOnly(this, "sensitive"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_xalign() { return Glib::PropertyProxy(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_xalign() const { return Glib::PropertyProxy_ReadOnly(this, "xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_yalign() { return Glib::PropertyProxy(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_yalign() const { return Glib::PropertyProxy_ReadOnly(this, "yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_xpad() { return Glib::PropertyProxy(this, "xpad"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_xpad() const { return Glib::PropertyProxy_ReadOnly(this, "xpad"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_ypad() { return Glib::PropertyProxy(this, "ypad"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_ypad() const { return Glib::PropertyProxy_ReadOnly(this, "ypad"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_width() { return Glib::PropertyProxy(this, "width"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_width() const { return Glib::PropertyProxy_ReadOnly(this, "width"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_height() { return Glib::PropertyProxy(this, "height"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_height() const { return Glib::PropertyProxy_ReadOnly(this, "height"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_is_expander() { return Glib::PropertyProxy(this, "is-expander"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_is_expander() const { return Glib::PropertyProxy_ReadOnly(this, "is-expander"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_is_expanded() { return Glib::PropertyProxy(this, "is-expanded"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_is_expanded() const { return Glib::PropertyProxy_ReadOnly(this, "is-expanded"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_WriteOnly CellRenderer::property_cell_background() { return Glib::PropertyProxy_WriteOnly(this, "cell-background"); } +#endif //GLIBMM_PROPERTIES_ENABLED -Glib::PropertyProxy_ReadOnly CellRenderer::property_cell_background() const -{ - return Glib::PropertyProxy_ReadOnly(this, "cell-background"); -} - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_cell_background_gdk() { return Glib::PropertyProxy(this, "cell-background-gdk"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_cell_background_gdk() const { return Glib::PropertyProxy_ReadOnly(this, "cell-background-gdk"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRenderer::property_cell_background_set() { return Glib::PropertyProxy(this, "cell-background-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRenderer::property_cell_background_set() const { return Glib::PropertyProxy_ReadOnly(this, "cell-background-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::CellRenderer::on_editing_canceled() { BaseClassType *const base = static_cast( @@ -584,8 +689,9 @@ void Gtk::CellRenderer::on_editing_canceled() if(base && base->editing_canceled) (*base->editing_canceled)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED 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( @@ -595,7 +701,6 @@ void Gtk::CellRenderer::get_size_vfunc(Widget& widget, const Gdk::Rectangle* cel if(base && base->get_size) (*base->get_size)(const_cast(gobj()),(widget).gobj(),Glib::unwrap(const_cast(cell_area)),x_offset,y_offset,width,height); } - void Gtk::CellRenderer::render_vfunc(const Glib::RefPtr& 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( @@ -605,7 +710,6 @@ void Gtk::CellRenderer::render_vfunc(const Glib::RefPtr& window, if(base && base->render) (*base->render)(gobj(),Glib::unwrap(window),(widget).gobj(),const_cast(background_area.gobj()),const_cast(cell_area.gobj()),const_cast(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( @@ -618,7 +722,6 @@ bool Gtk::CellRenderer::activate_vfunc(GdkEvent* event, Widget& widget, const Gl 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( @@ -631,6 +734,7 @@ CellEditable* Gtk::CellRenderer::start_editing_vfunc(GdkEvent* event, Widget& wi typedef CellEditable* RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer.h b/libs/gtkmm2/gtk/gtkmm/cellrenderer.h index 7c382c44c5..95a2d4e616 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderer.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLRENDERER_H #define _GTKMM_CELLRENDERER_H + #include /* $Id$ */ @@ -195,12 +196,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_editing_canceled(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -314,25 +321,28 @@ public: */ void get_fixed_size(int& width, int& height) const; - //TODO: Mark as @deprecated: See stop_editing(). +#ifndef GTKMM_DISABLE_DEPRECATED + /** 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 + * @newin2p4 * Deprecated: Use stop_editing() instead + * @deprecated Use stop_editing(). */ void editing_canceled(); +#endif // GTKMM_DISABLE_DEPRECATED + - /** Informs the cell renderer that the editing is stopped. * If @a canceled is true, 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 + * @newin2p6 * @param canceled true if the editing has been canceled. */ void stop_editing(bool canceled = false); @@ -341,27 +351,68 @@ public: * For instance, property_text for CellRendererText, and property_active for CellRendererToggle * Needs to be overridden in derived classes. */ +#ifdef GLIBMM_PROPERTIES_ENABLED virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif + /** This signal is emitted when the user cancels the process of editing a + * cell. For example, an editable cell renderer could be written to cancel + * editing when the user presses Escape. + * + * @see editing_canceled() + */ +/** + * @par Prototype: + * void %editing_canceled() + */ + 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. + //TODO: Remove the warning in the documentation when we have fixed the inheritance of CellRendererCombo. + /** This signal gets emitted when a cell starts to be edited. + * The indended use of this signal is to do special setup + * on @a editable, e.g. adding an EntryCompletion or setting + * up additional columns in a ComboBox. + * + * Note that GTK+ doesn't guarantee that cell renderers will + * continue to use the same kind of widget for editing in future + * releases, therefore you should check the type of @a editable + * before doing any specific setup. + * + * Note that this signal does not work yet in gtkmm. + * See http://bugzilla.gnome.org/show_bug.cgi?id=301597 + * + * @newin2p6 + * + * @param editable the CellEditable. + * @param path the path identifying the edited cell. + */ +/** + * @par Prototype: + * void %editing_started(CellEditable* editable, const Glib::ustring& path) + */ Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > signal_editing_started(); - /** Editable mode of the CellRenderer. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_mode() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Editable mode of the CellRenderer. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -369,15 +420,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_mode() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Display the cell. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_visible() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Display the cell. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -385,15 +440,39 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_visible() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The x-align. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Display the cell 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 property_sensitive() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Display the cell 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 property_sensitive() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The x-align. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -401,15 +480,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_xalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The y-align. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_yalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The y-align. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -417,15 +500,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_yalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The xpad. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xpad() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The xpad. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -433,15 +520,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_xpad() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The ypad. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_ypad() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The ypad. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -449,15 +540,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_ypad() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The fixed width. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_width() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The fixed width. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -465,15 +560,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_width() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The fixed height. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_height() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The fixed height. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -481,15 +580,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_height() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Row has children. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_is_expander() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Row has children. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -497,15 +600,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_is_expander() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Row is an expander row + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_is_expanded() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Row is an expander row * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -513,31 +620,30 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_is_expanded() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** 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 property_cell_background() ; - + #ifdef GLIBMM_PROPERTIES_ENABLED /** 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 property_cell_background() const; + Glib::PropertyProxy_WriteOnly property_cell_background() ; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Cell background color as a GdkColor. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_cell_background_gdk() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Cell background color as a GdkColor. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -545,15 +651,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_cell_background_gdk() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the cell background color. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_cell_background_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -561,6 +671,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_cell_background_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED protected: @@ -582,14 +693,24 @@ protected: * @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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_size_vfunc(Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void render_vfunc(const Glib::RefPtr& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags); +#endif //GLIBMM_VFUNCS_ENABLED - virtual void render_vfunc(const Glib::RefPtr& 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); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool activate_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags); +#endif //GLIBMM_VFUNCS_ENABLED - 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); + + #ifdef GLIBMM_VFUNCS_ENABLED + 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); +#endif //GLIBMM_VFUNCS_ENABLED }; @@ -605,6 +726,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLRENDERER_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc index fc5a69c6bd..c100037431 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc @@ -41,7 +41,26 @@ CellRenderer* generate_cellrenderer(bool editable) CellRendererToggle* pCellRenderer = new CellRendererToggle(); //GTK+'s "activatable" really means "editable": +#ifdef GLIBMM_PROPERTIES_ENABLED pCellRenderer->property_activatable() = editable; +#else + pCellRenderer->set_property("activatable", editable); +#endif //GLIBMM_PROPERTIES_ENABLED + + return pCellRenderer; +} + +template<> +CellRenderer* generate_cellrenderer(bool editable) +{ + CellRendererAccel* pCellRenderer = new CellRendererAccel(); + + //GTK+'s "editable" really means "editable": +#ifdef GLIBMM_PROPERTIES_ENABLED + pCellRenderer->property_editable() = editable; +#else + pCellRenderer->set_property("editable", editable); +#endif //GLIBMM_PROPERTIES_ENABLED return pCellRenderer; } diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h index 309fba4b07..8c8cc2924a 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h @@ -24,6 +24,7 @@ #include #include #include +#include namespace Gtk { @@ -38,7 +39,12 @@ 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. +#ifdef GLIBMM_PROPERTIES_ENABLED pCellRenderer->property_editable() = editable; +#else + pCellRenderer->set_property("editable", editable); +#endif + return pCellRenderer; } @@ -51,6 +57,9 @@ CellRenderer* generate_cellrenderer(bool editable); template<> CellRenderer* generate_cellrenderer< Glib::RefPtr >(bool editable); +template<> +CellRenderer* generate_cellrenderer(bool editable); + #endif } //CellRenderer_Generation diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc index 7570da7fa1..aa4771f28b 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,14 +31,20 @@ namespace Gtk { +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_Base CellRendererCombo::_property_renderable() { return CellRendererText::_property_renderable(); } +#else +Glib::ustring CellRendererCombo::_property_renderable() +{ + return CellRendererText::_property_renderable(); +} +#endif //#ifdef GLIBMM_PROPERTIES_ENABLED } //namespace Gtk - namespace { } // anonymous namespace @@ -84,8 +91,19 @@ void CellRendererCombo_Class::class_init_function(void* g_class, void* class_dat BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* CellRendererCombo_Class::wrap_new(GObject* o) { @@ -134,35 +152,54 @@ CellRendererCombo::CellRendererCombo() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > CellRendererCombo::property_model() { return Glib::PropertyProxy< Glib::RefPtr >(this, "model"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > CellRendererCombo::property_model() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "model"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererCombo::property_text_column() { return Glib::PropertyProxy(this, "text-column"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererCombo::property_text_column() const { return Glib::PropertyProxy_ReadOnly(this, "text-column"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererCombo::property_has_entry() { return Glib::PropertyProxy(this, "has-entry"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererCombo::property_has_entry() const { return Glib::PropertyProxy_ReadOnly(this, "has-entry"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h index 7e158bd106..8dc0250e66 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLRENDERERCOMBO_H #define _GTKMM_CELLRENDERERCOMBO_H + #include /* $Id$ */ @@ -97,11 +98,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -110,14 +117,17 @@ public: CellRendererCombo(); - /** The model containing the possible values for the combo box. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_model() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -125,15 +135,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_model() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A column in the data source model to get the strings from. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_text_column() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -141,15 +155,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_text_column() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** If FALSE + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_has_entry() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** If FALSE * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -157,9 +175,14 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_has_entry() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - virtual Glib::PropertyProxy_Base _property_renderable(); //override +#ifdef GLIBMM_PROPERTIES_ENABLED + virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif }; @@ -175,6 +198,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellRendererCombo* wrap(GtkCellRendererCombo* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLRENDERERCOMBO_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc index bbf363d011..82ab381c6c 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -29,14 +30,20 @@ namespace Gtk { +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_Base CellRendererPixbuf::_property_renderable() { return property_pixbuf(); } +#else +Glib::ustring CellRendererPixbuf::_property_renderable() +{ + return "pixbuf"; +} +#endif //GLIBMM_PROPERTIES_ENABLED } //namespace Gtk - namespace { } // anonymous namespace @@ -83,8 +90,19 @@ void CellRendererPixbuf_Class::class_init_function(void* g_class, void* class_da BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* CellRendererPixbuf_Class::wrap_new(GObject* o) { @@ -133,65 +151,96 @@ CellRendererPixbuf::CellRendererPixbuf() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > CellRendererPixbuf::property_pixbuf() { return Glib::PropertyProxy< Glib::RefPtr >(this, "pixbuf"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > CellRendererPixbuf::property_pixbuf() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "pixbuf"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > CellRendererPixbuf::property_pixbuf_expander_open() { return Glib::PropertyProxy< Glib::RefPtr >(this, "pixbuf-expander-open"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > CellRendererPixbuf::property_pixbuf_expander_open() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "pixbuf-expander-open"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > CellRendererPixbuf::property_pixbuf_expander_closed() { return Glib::PropertyProxy< Glib::RefPtr >(this, "pixbuf-expander-closed"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > CellRendererPixbuf::property_pixbuf_expander_closed() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "pixbuf-expander-closed"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererPixbuf::property_stock_id() { return Glib::PropertyProxy(this, "stock-id"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererPixbuf::property_stock_id() const { return Glib::PropertyProxy_ReadOnly(this, "stock-id"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererPixbuf::property_stock_size() { return Glib::PropertyProxy(this, "stock-size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererPixbuf::property_stock_size() const { return Glib::PropertyProxy_ReadOnly(this, "stock-size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererPixbuf::property_stock_detail() { return Glib::PropertyProxy(this, "stock-detail"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererPixbuf::property_stock_detail() const { return Glib::PropertyProxy_ReadOnly(this, "stock-detail"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h index 8380c76492..b9cb844d7d 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLRENDERERPIXBUF_H #define _GTKMM_CELLRENDERERPIXBUF_H + #include /* $Id$ */ @@ -95,11 +96,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -107,15 +114,18 @@ private: public: CellRendererPixbuf(); - - /** The pixbuf to render. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_pixbuf() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The pixbuf to render. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -123,15 +133,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_pixbuf() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Pixbuf for open expander. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_pixbuf_expander_open() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Pixbuf for open expander. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -139,15 +153,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_pixbuf_expander_open() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Pixbuf for closed expander. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_pixbuf_expander_closed() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Pixbuf for closed expander. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -155,15 +173,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_pixbuf_expander_closed() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The stock ID of the stock icon to render. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_stock_id() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -171,15 +193,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_stock_id() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The GtkIconSize value that specifies the size of the rendered icon. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_stock_size() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -187,15 +213,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_stock_size() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Render detail to pass to the theme engine. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_stock_detail() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -203,9 +233,14 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_stock_detail() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - virtual Glib::PropertyProxy_Base _property_renderable(); //override +#ifdef GLIBMM_PROPERTIES_ENABLED + virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif }; @@ -221,6 +256,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellRendererPixbuf* wrap(GtkCellRendererPixbuf* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLRENDERERPIXBUF_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc index e3f3b0ed4f..87795f7db1 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,10 +31,17 @@ namespace Gtk { +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_Base CellRendererProgress::_property_renderable() { return _property_renderable(); } +#else +Glib::ustring CellRendererProgress::_property_renderable() +{ + return _property_renderable(); +} +#endif //#ifdef GLIBMM_PROPERTIES_ENABLED } // namespace Gtk @@ -85,8 +93,19 @@ void CellRendererProgress_Class::class_init_function(void* g_class, void* class_ BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* CellRendererProgress_Class::wrap_new(GObject* o) { @@ -135,25 +154,40 @@ CellRendererProgress::CellRendererProgress() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererProgress::property_value() { return Glib::PropertyProxy(this, "value"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererProgress::property_value() const { return Glib::PropertyProxy_ReadOnly(this, "value"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererProgress::property_text() { return Glib::PropertyProxy(this, "text"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererProgress::property_text() const { return Glib::PropertyProxy_ReadOnly(this, "text"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h index 7ad6132715..1316e177d5 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLRENDERERPROGRESS_H #define _GTKMM_CELLRENDERERPROGRESS_H + #include /* $Id$ */ @@ -86,11 +87,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -98,14 +105,17 @@ private: public: CellRendererProgress(); - /** Value of the progress bar. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_value() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Value of the progress bar. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -113,15 +123,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_value() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Text on the progress bar. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_text() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Text on the progress bar. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -129,9 +143,14 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_text() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - - virtual Glib::PropertyProxy_Base _property_renderable(); //override + +#ifdef GLIBMM_PROPERTIES_ENABLED + virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif }; @@ -147,6 +166,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellRendererProgress* wrap(GtkCellRendererProgress* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLRENDERERPROGRESS_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc index 3ffd88a287..26cc8533f9 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -29,10 +30,17 @@ namespace Gtk { +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_Base CellRendererText::_property_renderable() { return property_text(); } +#else +Glib::ustring CellRendererText::_property_renderable() +{ + return "text"; +} +#endif //#GLIBMM_PROPERTIES_ENABLED void CellRendererText::edited(const Glib::ustring& path, const Glib::ustring& new_text) { @@ -45,7 +53,8 @@ void CellRendererText::edited(const Glib::ustring& path, const Glib::ustring& ne namespace { -void CellRendererText_signal_edited_callback(GtkCellRendererText* self, const gchar* p0,const gchar* p1,void* data) + +static 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; @@ -53,27 +62,32 @@ void CellRendererText_signal_edited_callback(GtkCellRendererText* self, const gc // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0) , Glib::convert_const_gchar_ptr_to_ustring(p1) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo CellRendererText_signal_edited_info = +static const Glib::SignalProxyInfo CellRendererText_signal_edited_info = { "edited", (GCallback) &CellRendererText_signal_edited_callback, (GCallback) &CellRendererText_signal_edited_callback }; + } // anonymous namespace @@ -118,10 +132,18 @@ void CellRendererText_Class::class_init_function(void* g_class, void* class_data BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->edited = &edited_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void CellRendererText_Class::edited_callback(GtkCellRendererText* self, const gchar* p0, const gchar* p1) { CppObjectType *const obj = dynamic_cast( @@ -134,17 +156,21 @@ void CellRendererText_Class::edited_callback(GtkCellRendererText* self, const gc // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -157,6 +183,7 @@ void CellRendererText_Class::edited_callback(GtkCellRendererText* self, const gc (*base->edited)(self, p0, p1); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CellRendererText_Class::wrap_new(GObject* o) @@ -207,7 +234,7 @@ CellRendererText::CellRendererText() void CellRendererText::set_fixed_height_from_font(int number_of_rows) { - gtk_cell_renderer_text_set_fixed_height_from_font(gobj(), number_of_rows); +gtk_cell_renderer_text_set_fixed_height_from_font(gobj(), number_of_rows); } @@ -217,397 +244,589 @@ Glib::SignalProxy2< void,const Glib::ustring&,const Glib::ustring& > CellRendere } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_text() { return Glib::PropertyProxy(this, "text"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_text() const { return Glib::PropertyProxy_ReadOnly(this, "text"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_WriteOnly CellRendererText::property_markup() { return Glib::PropertyProxy_WriteOnly(this, "markup"); } +#endif //GLIBMM_PROPERTIES_ENABLED -Glib::PropertyProxy_ReadOnly CellRendererText::property_markup() const -{ - return Glib::PropertyProxy_ReadOnly(this, "markup"); -} - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_attributes() { return Glib::PropertyProxy(this, "attributes"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_attributes() const { return Glib::PropertyProxy_ReadOnly(this, "attributes"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_WriteOnly CellRendererText::property_background() { return Glib::PropertyProxy_WriteOnly(this, "background"); } +#endif //GLIBMM_PROPERTIES_ENABLED -Glib::PropertyProxy_ReadOnly CellRendererText::property_background() const -{ - return Glib::PropertyProxy_ReadOnly(this, "background"); -} - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_WriteOnly CellRendererText::property_foreground() { return Glib::PropertyProxy_WriteOnly(this, "foreground"); } +#endif //GLIBMM_PROPERTIES_ENABLED -Glib::PropertyProxy_ReadOnly CellRendererText::property_foreground() const -{ - return Glib::PropertyProxy_ReadOnly(this, "foreground"); -} - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_background_gdk() { return Glib::PropertyProxy(this, "background-gdk"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_background_gdk() const { return Glib::PropertyProxy_ReadOnly(this, "background-gdk"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_foreground_gdk() { return Glib::PropertyProxy(this, "foreground-gdk"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_foreground_gdk() const { return Glib::PropertyProxy_ReadOnly(this, "foreground-gdk"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_font() { return Glib::PropertyProxy(this, "font"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_font() const { return Glib::PropertyProxy_ReadOnly(this, "font"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_font_desc() { return Glib::PropertyProxy(this, "font-desc"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_font_desc() const { return Glib::PropertyProxy_ReadOnly(this, "font-desc"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_family() { return Glib::PropertyProxy(this, "family"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_family() const { return Glib::PropertyProxy_ReadOnly(this, "family"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_style() { return Glib::PropertyProxy(this, "style"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_style() const { return Glib::PropertyProxy_ReadOnly(this, "style"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_variant() { return Glib::PropertyProxy(this, "variant"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_variant() const { return Glib::PropertyProxy_ReadOnly(this, "variant"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_weight() { return Glib::PropertyProxy(this, "weight"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_weight() const { return Glib::PropertyProxy_ReadOnly(this, "weight"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_stretch() { return Glib::PropertyProxy(this, "stretch"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_stretch() const { return Glib::PropertyProxy_ReadOnly(this, "stretch"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_size() { return Glib::PropertyProxy(this, "size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_size() const { return Glib::PropertyProxy_ReadOnly(this, "size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_size_points() { return Glib::PropertyProxy(this, "size-points"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_size_points() const { return Glib::PropertyProxy_ReadOnly(this, "size-points"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_scale() { return Glib::PropertyProxy(this, "scale"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_scale() const { return Glib::PropertyProxy_ReadOnly(this, "scale"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_editable() { return Glib::PropertyProxy(this, "editable"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_editable() const { return Glib::PropertyProxy_ReadOnly(this, "editable"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_strikethrough() { return Glib::PropertyProxy(this, "strikethrough"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_strikethrough() const { return Glib::PropertyProxy_ReadOnly(this, "strikethrough"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_underline() { return Glib::PropertyProxy(this, "underline"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_underline() const { return Glib::PropertyProxy_ReadOnly(this, "underline"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_rise() { return Glib::PropertyProxy(this, "rise"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_rise() const { return Glib::PropertyProxy_ReadOnly(this, "rise"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_language() { return Glib::PropertyProxy(this, "language"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_language() const { return Glib::PropertyProxy_ReadOnly(this, "language"); } +#endif //GLIBMM_PROPERTIES_ENABLED -Glib::PropertyProxy CellRendererText::property_ellipsize() +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRendererText::property_ellipsize() { - return Glib::PropertyProxy(this, "ellipsize"); + return Glib::PropertyProxy(this, "ellipsize"); } +#endif //GLIBMM_PROPERTIES_ENABLED -Glib::PropertyProxy_ReadOnly CellRendererText::property_ellipsize() const +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRendererText::property_ellipsize() const { - return Glib::PropertyProxy_ReadOnly(this, "ellipsize"); + return Glib::PropertyProxy_ReadOnly(this, "ellipsize"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRendererText::property_width_chars() +{ + return Glib::PropertyProxy(this, "width-chars"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRendererText::property_width_chars() const +{ + return Glib::PropertyProxy_ReadOnly(this, "width-chars"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRendererText::property_wrap_mode() +{ + return Glib::PropertyProxy(this, "wrap-mode"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRendererText::property_wrap_mode() const +{ + return Glib::PropertyProxy_ReadOnly(this, "wrap-mode"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRendererText::property_wrap_width() +{ + return Glib::PropertyProxy(this, "wrap-width"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRendererText::property_wrap_width() const +{ + return Glib::PropertyProxy_ReadOnly(this, "wrap-width"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRendererText::property_alignment() +{ + return Glib::PropertyProxy(this, "alignment"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRendererText::property_alignment() const +{ + return Glib::PropertyProxy_ReadOnly(this, "alignment"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_background_set() { return Glib::PropertyProxy(this, "background-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_background_set() const { return Glib::PropertyProxy_ReadOnly(this, "background-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_foreground_set() { return Glib::PropertyProxy(this, "foreground-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_foreground_set() const { return Glib::PropertyProxy_ReadOnly(this, "foreground-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_family_set() { return Glib::PropertyProxy(this, "family-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_family_set() const { return Glib::PropertyProxy_ReadOnly(this, "family-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_style_set() { return Glib::PropertyProxy(this, "style-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_style_set() const { return Glib::PropertyProxy_ReadOnly(this, "style-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_variant_set() { return Glib::PropertyProxy(this, "variant-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_variant_set() const { return Glib::PropertyProxy_ReadOnly(this, "variant-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_weight_set() { return Glib::PropertyProxy(this, "weight-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_weight_set() const { return Glib::PropertyProxy_ReadOnly(this, "weight-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_stretch_set() { return Glib::PropertyProxy(this, "stretch-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_stretch_set() const { return Glib::PropertyProxy_ReadOnly(this, "stretch-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_size_set() { return Glib::PropertyProxy(this, "size-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_size_set() const { return Glib::PropertyProxy_ReadOnly(this, "size-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_scale_set() { return Glib::PropertyProxy(this, "scale-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_scale_set() const { return Glib::PropertyProxy_ReadOnly(this, "scale-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_editable_set() { return Glib::PropertyProxy(this, "editable-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_editable_set() const { return Glib::PropertyProxy_ReadOnly(this, "editable-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_strikethrough_set() { return Glib::PropertyProxy(this, "strikethrough-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_strikethrough_set() const { return Glib::PropertyProxy_ReadOnly(this, "strikethrough-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_underline_set() { return Glib::PropertyProxy(this, "underline-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_underline_set() const { return Glib::PropertyProxy_ReadOnly(this, "underline-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_rise_set() { return Glib::PropertyProxy(this, "rise-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_rise_set() const { return Glib::PropertyProxy_ReadOnly(this, "rise-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_language_set() { return Glib::PropertyProxy(this, "language-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_language_set() const { return Glib::PropertyProxy_ReadOnly(this, "language-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_ellipsize_set() { return Glib::PropertyProxy(this, "ellipsize-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_ellipsize_set() const { return Glib::PropertyProxy_ReadOnly(this, "ellipsize-set"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererText::property_single_paragraph_mode() { return Glib::PropertyProxy(this, "single-paragraph-mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererText::property_single_paragraph_mode() const { return Glib::PropertyProxy_ReadOnly(this, "single-paragraph-mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::CellRendererText::on_edited(const Glib::ustring& path, const Glib::ustring& new_text) { BaseClassType *const base = static_cast( @@ -617,6 +836,10 @@ void Gtk::CellRendererText::on_edited(const Glib::ustring& path, const Glib::ust if(base && base->edited) (*base->edited)(gobj(),path.c_str(),new_text.c_str()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h index 9135cdf83a..408a9e4774 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLRENDERERTEXT_H #define _GTKMM_CELLRENDERERTEXT_H + #include /* $Id$ */ @@ -88,12 +89,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_edited(const Glib::ustring& path, const Glib::ustring& new_text); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -114,17 +121,25 @@ public: void set_fixed_height_from_font(int number_of_rows); +/** + * @par Prototype: + * void %edited(const Glib::ustring& path, const Glib::ustring& new_text) + */ + Glib::SignalProxy2< void,const Glib::ustring&,const Glib::ustring& > signal_edited(); - /** Text to render. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_text() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Text to render. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -132,31 +147,30 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_text() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** 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 property_markup() ; - + #ifdef GLIBMM_PROPERTIES_ENABLED /** 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 property_markup() const; + Glib::PropertyProxy_WriteOnly property_markup() ; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A list of style attributes to apply to the text of the renderer. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_attributes() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -164,47 +178,41 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_attributes() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** 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 property_background() ; - + #ifdef GLIBMM_PROPERTIES_ENABLED /** 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 property_background() const; + Glib::PropertyProxy_WriteOnly property_background() ; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** 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 property_foreground() ; + #ifdef GLIBMM_PROPERTIES_ENABLED /** 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 property_foreground() const; + Glib::PropertyProxy_WriteOnly property_foreground() ; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Background color as a GdkColor. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_background_gdk() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Background color as a GdkColor. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -212,15 +220,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_background_gdk() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Foreground color as a GdkColor. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_foreground_gdk() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Foreground color as a GdkColor. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -228,15 +240,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_foreground_gdk() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font description as a string. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_font() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font description as a string. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -244,15 +260,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_font() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font description as a PangoFontDescription struct. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_font_desc() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font description as a PangoFontDescription struct. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -260,15 +280,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_font_desc() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Name of the font family + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_family() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Name of the font family * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -276,15 +300,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_family() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font style. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_style() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font style. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -292,15 +320,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_style() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font variant. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_variant() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font variant. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -308,15 +340,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_variant() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font weight. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_weight() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font weight. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -324,15 +360,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_weight() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font stretch. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_stretch() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font stretch. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -340,15 +380,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_stretch() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font size. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_size() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font size. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -356,15 +400,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_size() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font size in points. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_size_points() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font size in points. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -372,15 +420,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_size_points() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Font scaling factor. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_scale() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Font scaling factor. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -388,15 +440,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_scale() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the text can be modified by the user. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_editable() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -404,15 +460,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_editable() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether to strike through the text. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_strikethrough() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether to strike through the text. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -420,15 +480,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_strikethrough() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Style of underline for this text. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_underline() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Style of underline for this text. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -436,15 +500,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_underline() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Offset of text above the baseline (below the baseline if rise is negative). + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_rise() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -452,15 +520,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_rise() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The language this text is in + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_language() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The language this text is in * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -468,31 +540,119 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_language() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** 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 property_ellipsize() ; - + #ifdef GLIBMM_PROPERTIES_ENABLED /** 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 property_ellipsize() const; + Glib::PropertyProxy property_ellipsize() ; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the background color. +#ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_ellipsize() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_width_chars() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_width_chars() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** How to break the string into multiple 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 property_wrap_mode() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** How to break the string into multiple 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 property_wrap_mode() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** The width at which the text is wrapped. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy property_wrap_width() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** The width at which the text is wrapped. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy_ReadOnly property_wrap_width() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** How to align the 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 property_alignment() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** How to align the 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 property_alignment() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_background_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -500,15 +660,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_background_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the foreground color. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_foreground_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -516,15 +680,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_foreground_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the font family. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_family_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -532,15 +700,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_family_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the font style. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_style_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -548,15 +720,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_style_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the font variant. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_variant_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -564,15 +740,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_variant_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the font weight. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_weight_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -580,15 +760,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_weight_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the font stretch. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_stretch_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -596,15 +780,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_stretch_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the font size. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_size_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -612,15 +800,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_size_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag scales the font size by a factor. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_scale_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -628,15 +820,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_scale_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects text editability. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_editable_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether this tag affects text editability. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -644,15 +840,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_editable_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects strikethrough. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_strikethrough_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether this tag affects strikethrough. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -660,15 +860,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_strikethrough_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects underlining. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_underline_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether this tag affects underlining. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -676,15 +880,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_underline_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the rise. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_rise_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether this tag affects the rise. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -692,15 +900,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_rise_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the language the text is rendered as. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_language_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -708,15 +920,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_language_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether this tag affects the ellipsize mode. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_ellipsize_set() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -724,15 +940,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_ellipsize_set() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether or not to keep all text in a single paragraph. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_single_paragraph_mode() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -740,9 +960,14 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_single_paragraph_mode() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - - virtual Glib::PropertyProxy_Base _property_renderable(); //override + +#ifdef GLIBMM_PROPERTIES_ENABLED + virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif protected: /** Emits the "edited" signal. @@ -764,6 +989,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellRendererText* wrap(GtkCellRendererText* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLRENDERERTEXT_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc index 023c5382dd..55742abf81 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,18 +31,25 @@ namespace Gtk { +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_Base CellRendererToggle::_property_renderable() { return property_active(); } +#else +Glib::ustring CellRendererToggle::_property_renderable() +{ + return "active"; +} +#endif //#GLIBMM_PROPERTIES_ENABLED } //namespace Gtk - namespace { -void CellRendererToggle_signal_toggled_callback(GtkCellRendererToggle* self, const gchar* p0,void* data) + +static void CellRendererToggle_signal_toggled_callback(GtkCellRendererToggle* self, const gchar* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,const Glib::ustring& > SlotType; @@ -49,26 +57,31 @@ void CellRendererToggle_signal_toggled_callback(GtkCellRendererToggle* self, con // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo CellRendererToggle_signal_toggled_info = +static const Glib::SignalProxyInfo CellRendererToggle_signal_toggled_info = { "toggled", (GCallback) &CellRendererToggle_signal_toggled_callback, (GCallback) &CellRendererToggle_signal_toggled_callback }; + } // anonymous namespace @@ -113,10 +126,18 @@ void CellRendererToggle_Class::class_init_function(void* g_class, void* class_da BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->toggled = &toggled_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void CellRendererToggle_Class::toggled_callback(GtkCellRendererToggle* self, const gchar* p0) { CppObjectType *const obj = dynamic_cast( @@ -129,16 +150,20 @@ void CellRendererToggle_Class::toggled_callback(GtkCellRendererToggle* self, con // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_toggled(Glib::convert_const_gchar_ptr_to_ustring(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -151,6 +176,7 @@ void CellRendererToggle_Class::toggled_callback(GtkCellRendererToggle* self, con (*base->toggled)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CellRendererToggle_Class::wrap_new(GObject* o) @@ -206,7 +232,7 @@ bool CellRendererToggle::get_radio() const void CellRendererToggle::set_radio(bool radio) { - gtk_cell_renderer_toggle_set_radio(gobj(), static_cast(radio)); +gtk_cell_renderer_toggle_set_radio(gobj(), static_cast(radio)); } bool CellRendererToggle::get_active() const @@ -216,7 +242,7 @@ bool CellRendererToggle::get_active() const void CellRendererToggle::set_active(bool setting) { - gtk_cell_renderer_toggle_set_active(gobj(), static_cast(setting)); +gtk_cell_renderer_toggle_set_active(gobj(), static_cast(setting)); } @@ -226,37 +252,64 @@ Glib::SignalProxy1< void,const Glib::ustring& > CellRendererToggle::signal_toggl } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererToggle::property_activatable() { return Glib::PropertyProxy(this, "activatable"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererToggle::property_activatable() const { return Glib::PropertyProxy_ReadOnly(this, "activatable"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererToggle::property_active() { return Glib::PropertyProxy(this, "active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererToggle::property_active() const { return Glib::PropertyProxy_ReadOnly(this, "active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CellRendererToggle::property_radio() { return Glib::PropertyProxy(this, "radio"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CellRendererToggle::property_radio() const { return Glib::PropertyProxy_ReadOnly(this, "radio"); } +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy CellRendererToggle::property_indicator_size() +{ + return Glib::PropertyProxy(this, "indicator-size"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly CellRendererToggle::property_indicator_size() const +{ + return Glib::PropertyProxy_ReadOnly(this, "indicator-size"); +} +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::CellRendererToggle::on_toggled(const Glib::ustring& path) { BaseClassType *const base = static_cast( @@ -266,6 +319,10 @@ void Gtk::CellRendererToggle::on_toggled(const Glib::ustring& path) if(base && base->toggled) (*base->toggled)(gobj(),path.c_str()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h index 293f4e7750..56f0d9df4f 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h +++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLRENDERERTOGGLE_H #define _GTKMM_CELLRENDERERTOGGLE_H + #include /* $Id$ */ @@ -90,12 +91,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_toggled(const Glib::ustring& path); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -105,7 +112,7 @@ public: CellRendererToggle(); - /** Returns wether we're rendering radio toggles rather than checkboxes. + /** Returns whether we're rendering radio toggles rather than checkboxes. * @return true if we're rendering radio toggles rather than checkboxes. */ bool get_radio() const; @@ -132,18 +139,31 @@ public: */ void set_active(bool setting = true); + //TODO: Maybe the parameter should be a TreePath. + /** The toggled signal is emitted when the cell is toggled. + * + * @param path string representation of TreePath describing the event location + */ + +/** + * @par Prototype: + * void %toggled(const Glib::ustring& path) + */ Glib::SignalProxy1< void,const Glib::ustring& > signal_toggled(); - /** The toggle button can be activated. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_activatable() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The toggle button can be activated. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -151,15 +171,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_activatable() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The toggle state of the button. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_active() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The toggle state of the button. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -167,15 +191,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_active() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Draw the toggle button as a radio button. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_radio() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -183,9 +211,34 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_radio() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Size of check or radio 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 property_indicator_size() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Size of check or radio 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 property_indicator_size() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - virtual Glib::PropertyProxy_Base _property_renderable(); //override +#ifdef GLIBMM_PROPERTIES_ENABLED + virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif }; @@ -201,6 +254,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellRendererToggle* wrap(GtkCellRendererToggle* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLRENDERERTOGGLE_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/cellview.cc b/libs/gtkmm2/gtk/gtkmm/cellview.cc index 5b57ccf3a0..3691fbaa6b 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellview.cc +++ b/libs/gtkmm2/gtk/gtkmm/cellview.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -38,12 +39,24 @@ CellView::CellView(const Glib::ustring& text, bool use_markup) Gtk::Widget(Glib::ConstructParams(cellview_class_.init(), (char*) 0)) { Gtk::CellRendererText* cell = Gtk::manage(new Gtk::CellRendererText()); - + if(use_markup) + { + #ifdef GLIBMM_PROPERTIES_ENABLED cell->property_markup() = text; + #else + cell->set_property("markup", text); + #endif + } else + { + #ifdef GLIBMM_PROPERTIES_ENABLED cell->property_text() = text; - + #else + cell->set_property("text", text); + #endif + } + pack_start(*cell); } @@ -53,15 +66,19 @@ CellView::CellView(const Glib::RefPtr& pixbuf) Gtk::Widget(Glib::ConstructParams(cellview_class_.init(), (char*) 0)) { Gtk::CellRendererPixbuf* cell = Gtk::manage(new Gtk::CellRendererPixbuf()); + + #ifdef GLIBMM_PROPERTIES_ENABLED cell->property_pixbuf() = pixbuf; - + #else + cell->set_property("pixbuf", (void*)(pixbuf->gobj())); + #endif + pack_start(*cell); } } //namespace Gtk - namespace { } // anonymous namespace @@ -109,8 +126,19 @@ void CellView_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* CellView_Class::wrap_new(GObject* o) { @@ -160,12 +188,12 @@ CellView::CellView() void CellView::set_model(const Glib::RefPtr& model) { - gtk_cell_view_set_model(gobj(), Glib::unwrap(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((path).gobj())); +gtk_cell_view_set_displayed_row(gobj(), const_cast((path).gobj())); } TreeModel::Path CellView::get_displayed_row() const @@ -180,7 +208,7 @@ bool CellView::get_size_of_row(const TreeModel::Path& path, Requisition& requisi void CellView::set_background_color(const Gdk::Color& color) { - gtk_cell_view_set_background_color(gobj(), (color).gobj()); +gtk_cell_view_set_background_color(gobj(), (color).gobj()); } Glib::ListHandle CellView::get_cell_renderers() @@ -194,6 +222,13 @@ Glib::ListHandle CellView::get_cell_renderers() const } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/cellview.h b/libs/gtkmm2/gtk/gtkmm/cellview.h index 6e798c5f56..a804824739 100644 --- a/libs/gtkmm2/gtk/gtkmm/cellview.h +++ b/libs/gtkmm2/gtk/gtkmm/cellview.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CELLVIEW_H #define _GTKMM_CELLVIEW_H + #include /* $Id$ */ @@ -98,11 +99,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -135,7 +142,7 @@ public: * set, it will remove it before setting the new model. If @a model is * 0, then it will unset the old model. * - * Since: 2.6 + * @newin2p6 * @param model A Gtk::TreeModel. */ void set_model(const Glib::RefPtr& model); @@ -147,11 +154,18 @@ public: * a needed intermediate state if say, the model for * the Gtk::CellView becomes temporarily empty. * - * Since: 2.6 + * @newin2p6 * @param path A Gtk::TreePath or 0 to unset. */ void set_displayed_row(const TreeModel::Path& path); + /** Returns a Gtk::TreePath referring to the currently + * displayed row. If no row is currently displayed, + * 0 is returned. + * @return The currently displayed row or 0 + * + * @newin2p6. + */ TreeModel::Path get_displayed_row() const; /** Sets @a requisition to the size needed by @a cell_view to display @@ -160,14 +174,14 @@ public: * @param requisition Return location for the size. * @return true * - * Since: 2.6. + * @newin2p6. */ bool get_size_of_row(const TreeModel::Path& path, Requisition& requisition) const; /** Sets the background color of @a view . * - * Since: 2.6 + * @newin2p6 * @param color The new background color. */ void set_background_color(const Gdk::Color& color); @@ -178,7 +192,7 @@ public: * renderers has been newly allocated and should be freed with * Glib::list_free() when no longer needed. * - * Since: 2.6. + * @newin2p6. */ Glib::ListHandle get_cell_renderers(); @@ -187,7 +201,7 @@ public: * renderers has been newly allocated and should be freed with * Glib::list_free() when no longer needed. * - * Since: 2.6. + * @newin2p6. */ Glib::ListHandle get_cell_renderers() const; @@ -205,6 +219,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CellView* wrap(GtkCellView* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CELLVIEW_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/checkbutton.cc b/libs/gtkmm2/gtk/gtkmm/checkbutton.cc index 110d0c5edc..61fec35704 100644 --- a/libs/gtkmm2/gtk/gtkmm/checkbutton.cc +++ b/libs/gtkmm2/gtk/gtkmm/checkbutton.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -85,9 +86,15 @@ void CheckButton_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED klass->draw_indicator = &draw_indicator_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void CheckButton_Class::draw_indicator_vfunc_callback(GtkCheckButton* self, GdkRectangle* area) { CppObjectType *const obj = dynamic_cast( @@ -100,15 +107,19 @@ void CheckButton_Class::draw_indicator_vfunc_callback(GtkCheckButton* self, GdkR // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->draw_indicator_vfunc(area); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -121,6 +132,10 @@ void CheckButton_Class::draw_indicator_vfunc_callback(GtkCheckButton* self, GdkR (*base->draw_indicator)(self, area); } } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CheckButton_Class::wrap_new(GObject* o) @@ -170,6 +185,10 @@ CheckButton::CheckButton() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED void Gtk::CheckButton::draw_indicator_vfunc(GdkRectangle* area) { BaseClassType *const base = static_cast( @@ -179,6 +198,7 @@ void Gtk::CheckButton::draw_indicator_vfunc(GdkRectangle* area) if(base && base->draw_indicator) (*base->draw_indicator)(gobj(),area); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/checkbutton.h b/libs/gtkmm2/gtk/gtkmm/checkbutton.h index bff262d400..2e33cf9f6d 100644 --- a/libs/gtkmm2/gtk/gtkmm/checkbutton.h +++ b/libs/gtkmm2/gtk/gtkmm/checkbutton.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CHECKBUTTON_H #define _GTKMM_CHECKBUTTON_H + #include /* $Id$ */ @@ -93,11 +94,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -129,9 +136,11 @@ protected: * The GdkRectangle specifies the area of the widget which will get * redrawn. */ - virtual void draw_indicator_vfunc(GdkRectangle* area); - + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void draw_indicator_vfunc(GdkRectangle* area); +#endif //GLIBMM_VFUNCS_ENABLED + }; @@ -146,6 +155,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CheckButton* wrap(GtkCheckButton* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CHECKBUTTON_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc index 2a1a6b4ac2..f66910811f 100644 --- a/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc +++ b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -46,13 +47,15 @@ CheckMenuItem::CheckMenuItem(const Glib::ustring& label, bool mnemonic) namespace { -const Glib::SignalProxyInfo CheckMenuItem_signal_toggled_info = + +static const Glib::SignalProxyInfo CheckMenuItem_signal_toggled_info = { "toggled", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -97,10 +100,16 @@ void CheckMenuItem_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED klass->draw_indicator = &draw_indicator_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->toggled = &toggled_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void CheckMenuItem_Class::draw_indicator_vfunc_callback(GtkCheckMenuItem* self, GdkRectangle* area) { CppObjectType *const obj = dynamic_cast( @@ -113,15 +122,19 @@ void CheckMenuItem_Class::draw_indicator_vfunc_callback(GtkCheckMenuItem* self, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->draw_indicator_vfunc(area); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -134,8 +147,9 @@ void CheckMenuItem_Class::draw_indicator_vfunc_callback(GtkCheckMenuItem* self, (*base->draw_indicator)(self, area); } } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void CheckMenuItem_Class::toggled_callback(GtkCheckMenuItem* self) { CppObjectType *const obj = dynamic_cast( @@ -148,15 +162,19 @@ void CheckMenuItem_Class::toggled_callback(GtkCheckMenuItem* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_toggled(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -169,6 +187,7 @@ void CheckMenuItem_Class::toggled_callback(GtkCheckMenuItem* self) (*base->toggled)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* CheckMenuItem_Class::wrap_new(GObject* o) @@ -219,7 +238,7 @@ CheckMenuItem::CheckMenuItem() void CheckMenuItem::set_active(bool state) { - gtk_check_menu_item_set_active(gobj(), static_cast(state)); +gtk_check_menu_item_set_active(gobj(), static_cast(state)); } bool CheckMenuItem::get_active() const @@ -229,12 +248,12 @@ bool CheckMenuItem::get_active() const void CheckMenuItem::toggled() { - gtk_check_menu_item_toggled(gobj()); +gtk_check_menu_item_toggled(gobj()); } void CheckMenuItem::set_inconsistent(bool setting) { - gtk_check_menu_item_set_inconsistent(gobj(), static_cast(setting)); +gtk_check_menu_item_set_inconsistent(gobj(), static_cast(setting)); } bool CheckMenuItem::get_inconsistent() const @@ -244,7 +263,7 @@ bool CheckMenuItem::get_inconsistent() const void CheckMenuItem::set_draw_as_radio(bool draw_as_radio) { - gtk_check_menu_item_set_draw_as_radio(gobj(), static_cast(draw_as_radio)); +gtk_check_menu_item_set_draw_as_radio(gobj(), static_cast(draw_as_radio)); } bool CheckMenuItem::get_draw_as_radio() const @@ -259,37 +278,50 @@ Glib::SignalProxy0< void > CheckMenuItem::signal_toggled() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CheckMenuItem::property_active() { return Glib::PropertyProxy(this, "active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CheckMenuItem::property_active() const { return Glib::PropertyProxy_ReadOnly(this, "active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CheckMenuItem::property_inconsistent() { return Glib::PropertyProxy(this, "inconsistent"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CheckMenuItem::property_inconsistent() const { return Glib::PropertyProxy_ReadOnly(this, "inconsistent"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy CheckMenuItem::property_draw_as_radio() { return Glib::PropertyProxy(this, "draw-as-radio"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly CheckMenuItem::property_draw_as_radio() const { return Glib::PropertyProxy_ReadOnly(this, "draw-as-radio"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::CheckMenuItem::on_toggled() { BaseClassType *const base = static_cast( @@ -299,8 +331,9 @@ void Gtk::CheckMenuItem::on_toggled() if(base && base->toggled) (*base->toggled)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED void Gtk::CheckMenuItem::draw_indicator_vfunc(GdkRectangle* area) { BaseClassType *const base = static_cast( @@ -310,6 +343,7 @@ void Gtk::CheckMenuItem::draw_indicator_vfunc(GdkRectangle* area) if(base && base->draw_indicator) (*base->draw_indicator)(gobj(),area); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h index faa95d431f..0aa9405b5b 100644 --- a/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h +++ b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CHECKMENUITEM_H #define _GTKMM_CHECKMENUITEM_H + #include /* $Id$ */ @@ -90,12 +91,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_toggled(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -139,7 +146,7 @@ public: /** Sets whether @a check_menu_item is drawn like a Gtk::RadioMenuItem * - * Since: 2.4 + * @newin2p4 * @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); @@ -147,7 +154,7 @@ public: /** 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. + * @newin2p4. */ bool get_draw_as_radio() const; @@ -156,18 +163,25 @@ public: * this signal) */ +/** + * @par Prototype: + * void %toggled() + */ Glib::SignalProxy0< void > signal_toggled(); - /** Whether the menu item is checked. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_active() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether the menu item is checked. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -175,15 +189,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_active() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether to display an inconsistent state. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_inconsistent() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether to display an inconsistent state. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -191,15 +209,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_inconsistent() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the menu item looks like a radio menu item. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_draw_as_radio() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -207,6 +229,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_draw_as_radio() const; +#endif //#GLIBMM_PROPERTIES_ENABLED protected: @@ -216,7 +239,9 @@ protected: * The GdkRectangle specifies the area of the widget which will get * redrawn. */ - virtual void draw_indicator_vfunc(GdkRectangle* area); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void draw_indicator_vfunc(GdkRectangle* area); +#endif //GLIBMM_VFUNCS_ENABLED }; @@ -232,6 +257,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::CheckMenuItem* wrap(GtkCheckMenuItem* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CHECKMENUITEM_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/clipboard.cc b/libs/gtkmm2/gtk/gtkmm/clipboard.cc index e543bb8eee..341e015130 100644 --- a/libs/gtkmm2/gtk/gtkmm/clipboard.cc +++ b/libs/gtkmm2/gtk/gtkmm/clipboard.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -25,6 +26,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include //For ScopedPtr<>. #include @@ -39,13 +41,11 @@ 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_; }; @@ -57,37 +57,42 @@ SignalProxy_GetClear::SignalProxy_GetClear(const Gtk::Clipboard::SlotGet& slot_g slot_clear_ (slot_clear) {} -SignalProxy_GetClear::~SignalProxy_GetClear() -{} - -void SignalProxy_GetClear::gtk_callback_get(GtkClipboard*, GtkSelectionData* selection_data, +static void SignalProxy_GetClear_gtk_callback_get(GtkClipboard*, GtkSelectionData* selection_data, unsigned int info, void* data) { SignalProxy_GetClear *const self = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Gtk::SelectionData_WithoutOwnership cppSelectionData(selection_data); (self->slot_get_)(cppSelectionData, info); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } -void SignalProxy_GetClear::gtk_callback_clear(GtkClipboard*, void* data) +static void SignalProxy_GetClear_gtk_callback_clear(GtkClipboard*, void* data) { SignalProxy_GetClear *const self = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED (self->slot_clear_)(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED delete self; // After this callback has been called, none of the 2 callbacks will be called again. @@ -95,73 +100,30 @@ void SignalProxy_GetClear::gtk_callback_clear(GtkClipboard*, void* data) //because clear() is called when set() is called again. } +} //anonymous namespace -// SignalProxy_Received: -// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function. -class SignalProxy_Received + +static void SignalProxy_Received_gtk_callback(GtkClipboard*, GtkSelectionData* selection_data, void* data) { -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(data); + Gtk::Clipboard::SlotReceived* the_slot = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Gtk::SelectionData cppSelectionData(selection_data, true /*take_copy=true*/); - (self->slot_)(cppSelectionData); + (*the_slot)(cppSelectionData); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED - delete self; + delete the_slot; } - -// 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 listStrings; static listStrings util_convert_atoms_to_strings(GdkAtom* targets, int n_targets) @@ -172,114 +134,101 @@ static listStrings util_convert_atoms_to_strings(GdkAtom* targets, int n_targets 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); + char* atom_name = gdk_atom_name(targets[i]); + if(atom_name) + { + listTargets.push_back( Glib::ustring(atom_name) ); + g_free(atom_name); + } } return listTargets; } -void SignalProxy_TargetsReceived::gtk_callback(GtkClipboard*, GdkAtom* atoms, gint n_atoms, gpointer data) +static void SignalProxy_TargetsReceived_gtk_callback(GtkClipboard*, GdkAtom* atoms, gint n_atoms, gpointer data) { - SignalProxy_TargetsReceived *const self = static_cast(data); + Gtk::Clipboard::SlotTargetsReceived* the_slot = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED listStrings listTargets = util_convert_atoms_to_strings(atoms, n_atoms); - (self->slot_)(listTargets); + (*the_slot)(listTargets); //I guess that GTK+ does a g_free of the GdkAtoms* array itself, so we do not need to. murrayc. + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED - delete self; // the callback is only used once + delete the_slot; // 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 +static void SignalProxy_TextReceived_gtk_callback(GtkClipboard*, const char* text, void* data) { -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(data); + Gtk::Clipboard::SlotTextReceived* the_slot = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { - (self->slot_)((text) ? Glib::ustring(text) : Glib::ustring()); + #endif //GLIBMM_EXCEPTIONS_ENABLED + (*the_slot)((text) ? Glib::ustring(text) : Glib::ustring()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED - delete self; // the callback is only used once + delete the_slot; // 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 +static void SignalProxy_RichTextReceived_gtk_callback(GtkClipboard*, GdkAtom format, const guint8* text, gsize length, void* data) { -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(data); + Gtk::Clipboard::SlotRichTextReceived* the_slot = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { - (self->slot_)(Glib::wrap(image, true /* take_ref */)); + #endif //GLIBMM_EXCEPTIONS_ENABLED + gchar* format_atom_name = gdk_atom_name(format); + (*the_slot)( (format_atom_name ? Glib::ustring(format_atom_name) : Glib::ustring()), (text ? std::string((char*)text, length) : std::string()) ); + g_free(format_atom_name); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED - delete self; // the callback is only used once + delete the_slot; // the callback is only used once } -} // anonymous namespace +static void SignalProxy_ImageReceived_gtk_callback(GtkClipboard*, GdkPixbuf* image, void* data) +{ + Gtk::Clipboard::SlotImageReceived* the_slot = static_cast(data); + + #ifdef GLIBMM_EXCEPTIONS_ENABLED + try + { + #endif //GLIBMM_EXCEPTIONS_ENABLED + (*the_slot)(Glib::wrap(image, true /* take_ref */)); + #ifdef GLIBMM_EXCEPTIONS_ENABLED + } + catch(...) + { + Glib::exception_handlers_invoke(); + } + #endif //GLIBMM_EXCEPTIONS_ENABLED + + delete the_slot; // the callback is only used once +} namespace Gtk @@ -293,8 +242,8 @@ bool Clipboard::set(const ArrayHandle_TargetEntry& targets, return gtk_clipboard_set_with_data( gobj(), targets.data(), targets.size(), - &SignalProxy_GetClear::gtk_callback_get, - &SignalProxy_GetClear::gtk_callback_clear, + &SignalProxy_GetClear_gtk_callback_get, + &SignalProxy_GetClear_gtk_callback_clear, pSignalProxy); } @@ -306,37 +255,46 @@ void Clipboard::set_text(const Glib::ustring& text) 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); + // Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. + SlotReceived* slot_copy = new SlotReceived(slot); gtk_clipboard_request_contents(gobj(), gdk_atom_intern(target.c_str(), FALSE), - &SignalProxy_Received::gtk_callback, pSignalProxy); + &SignalProxy_Received_gtk_callback, slot_copy); } 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); + // Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. + SlotTextReceived* slot_copy = new SlotTextReceived(slot); gtk_clipboard_request_text(gobj(), - &SignalProxy_TextReceived::gtk_callback, pSignalProxy); + &SignalProxy_TextReceived_gtk_callback, slot_copy); +} + +void Clipboard::request_rich_text(const Glib::RefPtr& buffer, const SlotRichTextReceived& slot) +{ + // Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. + SlotRichTextReceived* slot_copy = new SlotRichTextReceived(slot); + + gtk_clipboard_request_rich_text(gobj(), buffer->gobj(), + &SignalProxy_RichTextReceived_gtk_callback, slot_copy); } 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); + // Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. + SlotImageReceived* slot_copy = new SlotImageReceived(slot); gtk_clipboard_request_image(gobj(), - &SignalProxy_ImageReceived::gtk_callback, pSignalProxy); + &SignalProxy_ImageReceived_gtk_callback, slot_copy); } 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); + // Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. + SlotTargetsReceived* slot_copy = new SlotTargetsReceived(slot); - gtk_clipboard_request_targets(gobj(), &SignalProxy_TargetsReceived::gtk_callback, pSignalProxy); + gtk_clipboard_request_targets(gobj(), &SignalProxy_TargetsReceived_gtk_callback, slot_copy); } SelectionData Clipboard::wait_for_contents(const Glib::ustring& target) const @@ -382,12 +340,67 @@ void Clipboard::set_can_store() { gtk_clipboard_set_can_store( gobj(), 0, 0 /* See C docs */ ); } + +std::string Clipboard::wait_for_rich_text(const Glib::RefPtr& buffer, std::string& format) +{ + std::string result; + + GdkAtom format_atom = 0; + gsize length = 0; + guint8* text = gtk_clipboard_wait_for_rich_text(const_cast(gobj()), buffer->gobj(), &format_atom, &length); + if(text && length) + { + gchar* format_atom_name = gdk_atom_name(format_atom); + if(format_atom_name) + format = Glib::ScopedPtr(format_atom_name).get(); //This frees the buffer. + + result = std::string((char*)text, length); + g_free(text); + } + + return result; +} + } //namespace Gtk namespace { + + +static void Clipboard_signal_owner_change_callback(GtkClipboard* self, GdkEventOwnerChange* p0,void* data) +{ + using namespace Gtk; + typedef sigc::slot< void,GdkEventOwnerChange* > SlotType; + + // Do not try to call a signal on a disassociated wrapper. + if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) + { + #ifdef GLIBMM_EXCEPTIONS_ENABLED + try + { + #endif //GLIBMM_EXCEPTIONS_ENABLED + if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) + (*static_cast(slot))(p0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED + } + catch(...) + { + Glib::exception_handlers_invoke(); + } + #endif //GLIBMM_EXCEPTIONS_ENABLED + } +} + +static const Glib::SignalProxyInfo Clipboard_signal_owner_change_info = +{ + "owner_change", + (GCallback) &Clipboard_signal_owner_change_callback, + (GCallback) &Clipboard_signal_owner_change_callback +}; + + } // anonymous namespace @@ -434,8 +447,19 @@ void Clipboard_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Clipboard_Class::wrap_new(GObject* object) { @@ -488,6 +512,7 @@ Glib::RefPtr Clipboard::get(GdkAtom selection) return retvalue; } + Glib::RefPtr Clipboard::get_for_display(const Glib::RefPtr& display, GdkAtom selection) { @@ -498,54 +523,45 @@ Glib::RefPtr Clipboard::get_for_display(const Glib::RefPtr Clipboard::get_display() { Glib::RefPtr 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 Clipboard::get_display() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_clipboard_get_display(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_display(); } Glib::RefPtr Clipboard::get_owner() { Glib::RefPtr 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 Clipboard::get_owner() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_clipboard_get_owner(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_owner(); } void Clipboard::clear() { - gtk_clipboard_clear(gobj()); +gtk_clipboard_clear(gobj()); } void Clipboard::set_image(const Glib::RefPtr& pixbuf) { - gtk_clipboard_set_image(gobj(), Glib::unwrap(pixbuf)); +gtk_clipboard_set_image(gobj(), Glib::unwrap(pixbuf)); } Glib::ustring Clipboard::wait_for_text() const @@ -563,6 +579,11 @@ bool Clipboard::wait_is_text_available() const return gtk_clipboard_wait_is_text_available(const_cast(gobj())); } +bool Clipboard::wait_is_rich_text_available(const Glib::RefPtr& buffer) const +{ + return gtk_clipboard_wait_is_rich_text_available(const_cast(gobj()), Glib::unwrap(buffer)); +} + bool Clipboard::wait_is_image_available() const { return gtk_clipboard_wait_is_image_available(const_cast(gobj())); @@ -575,10 +596,23 @@ bool Clipboard::wait_is_target_available(const Glib::ustring& target) void Clipboard::store() { - gtk_clipboard_store(gobj()); +gtk_clipboard_store(gobj()); } +Glib::SignalProxy1< void,GdkEventOwnerChange* > Clipboard::signal_owner_change() +{ + return Glib::SignalProxy1< void,GdkEventOwnerChange* >(this, &Clipboard_signal_owner_change_info); +} + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/clipboard.h b/libs/gtkmm2/gtk/gtkmm/clipboard.h index 193eae10cc..401a1738b9 100644 --- a/libs/gtkmm2/gtk/gtkmm/clipboard.h +++ b/libs/gtkmm2/gtk/gtkmm/clipboard.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CLIPBOARD_H #define _GTKMM_CLIPBOARD_H + #include /* $Id$ */ @@ -45,6 +46,10 @@ namespace Gtk namespace Gtk { +#ifndef DOXYGEN_SHOULD_SKIP_THIS +class TextBuffer; +#endif //DOXYGEN_SHOULD_SKIP_THIS + /** 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 @@ -145,7 +150,7 @@ public: * * (Passing Gdk::NONE is the same as using gdk_atom_intern * ("CLIPBOARD", false). See - * http://www.freedesktop.org/standards/clipboards-spec/clipboards.txt + * http://www.freedesktop.org/Standards/clipboards-spec * 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.) @@ -166,7 +171,7 @@ public: * it is owned by GTK+, must not be freed or * unrefd. * - * Since: 2.2. + * @newin2p2. */ static Glib::RefPtr get_for_display(const Glib::RefPtr& display, GdkAtom selection = GDK_SELECTION_CLIPBOARD); @@ -174,14 +179,14 @@ public: /** Gets the Gdk::Display associated with @a clipboard * @return The Gdk::Display associated with @a clipboard * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display(); /** Gets the Gdk::Display associated with @a clipboard * @return The Gdk::Display associated with @a clipboard * - * Since: 2.2. + * @newin2p2. */ Glib::RefPtr get_display() const; @@ -255,7 +260,7 @@ public: * for the image, and for converting the image into the * requested format. * - * Since: 2.6 + * @newin2p6 * @param pixbuf A Gdk::Pixbuf. */ void set_image(const Glib::RefPtr& pixbuf); @@ -295,6 +300,24 @@ public: */ void request_text(const SlotTextReceived& slot); + + /// For instance: void on_rich_text_received(const Glib::ustring& format, const std::string& text); + typedef sigc::slot SlotRichTextReceived; + + /** Requests the contents of the clipboard as rich text. When the rich text is later received, + * callback will be called. + * + * The text parameter to the callback will contain the resulting rich text if the request succeeded, or + * an empty string if it failed. This function can fail for various reasons, in particular if the + * clipboard was empty or if the contents of the clipboard could not be converted into rich 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_rich_text(const Glib::RefPtr& buffer, const SlotRichTextReceived& slot); + /// For instance: void on_image_received(const Glib::RefPtr& text); typedef sigc::slot&> SlotImageReceived; @@ -332,7 +355,7 @@ public: * is an intermediate type, so you should convert it to a * standard C++ container. * - * Since: 2.4 + * @newin2p4 */ void request_targets(const SlotTargetsReceived& slot); @@ -360,6 +383,9 @@ public: * clipboard could not be converted into text form.). */ Glib::ustring wait_for_text() const; + + std::string wait_for_rich_text(const Glib::RefPtr& buffer, std::string& format); + //Maybe the result should be const, but constness is not so clear-cut here. murrayc @@ -374,7 +400,7 @@ public: * if the clipboard was empty or if the contents of * the clipboard could not be converted into an image.) * - * Since: 2.6. + * @newin2p6. */ Glib::RefPtr wait_for_image() const; @@ -392,6 +418,8 @@ public: */ bool wait_is_text_available() const; + bool wait_is_rich_text_available(const Glib::RefPtr& buffer) 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 @@ -403,7 +431,7 @@ public: * the actual image data. * @return true is there is an image available, false otherwise. * - * Since: 2.6. + * @newin2p6. */ bool wait_is_image_available() const; @@ -416,7 +444,7 @@ public: * @param target A Gdk::Atom indicating which target to look for. * @return true if the target is available, false otherwise. * - * Since: 2.6. + * @newin2p6. */ bool wait_is_target_available(const Glib::ustring& target); @@ -426,7 +454,7 @@ public: * * @result targets: The targets. * - * Since: 2.4 + * @newin2p4 */ Glib::StringArrayHandle wait_for_targets() const; @@ -453,20 +481,35 @@ public: /** Stores the current clipboard data somewhere so that it will stay * around after the application has quit. * - * Since: 2.6 + * @newin2p6 */ void store(); - + //We use no_default_handler because this signal was added and we don't want to break the ABI by adding a virtual function. + +/** + * @par Prototype: + * void %owner_change(GdkEventOwnerChange* event) + */ + + Glib::SignalProxy1< void,GdkEventOwnerChange* > signal_owner_change(); + + public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gtk/gtkmm/colorbutton.cc b/libs/gtkmm2/gtk/gtkmm/colorbutton.cc index 15b2f5ddd1..6696319b15 100644 --- a/libs/gtkmm2/gtk/gtkmm/colorbutton.cc +++ b/libs/gtkmm2/gtk/gtkmm/colorbutton.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -45,13 +46,15 @@ Gdk::Color ColorButton::get_color() const namespace { -const Glib::SignalProxyInfo ColorButton_signal_color_set_info = + +static const Glib::SignalProxyInfo ColorButton_signal_color_set_info = { "color-set", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -96,10 +99,18 @@ void ColorButton_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->color_set = &color_set_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ColorButton_Class::color_set_callback(GtkColorButton* self) { CppObjectType *const obj = dynamic_cast( @@ -112,15 +123,19 @@ void ColorButton_Class::color_set_callback(GtkColorButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_color_set(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -133,6 +148,7 @@ void ColorButton_Class::color_set_callback(GtkColorButton* self) (*base->color_set)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ColorButton_Class::wrap_new(GObject* o) @@ -190,12 +206,12 @@ ColorButton::ColorButton(const Gdk::Color& color) void ColorButton::set_color(const Gdk::Color& color) { - gtk_color_button_set_color(gobj(), (color).gobj()); +gtk_color_button_set_color(gobj(), (color).gobj()); } void ColorButton::set_alpha(guint16 alpha) { - gtk_color_button_set_alpha(gobj(), alpha); +gtk_color_button_set_alpha(gobj(), alpha); } guint16 ColorButton::get_alpha() const @@ -205,7 +221,7 @@ guint16 ColorButton::get_alpha() const void ColorButton::set_use_alpha(bool use_alpha) { - gtk_color_button_set_use_alpha(gobj(), static_cast(use_alpha)); +gtk_color_button_set_use_alpha(gobj(), static_cast(use_alpha)); } bool ColorButton::get_use_alpha() const @@ -215,7 +231,7 @@ bool ColorButton::get_use_alpha() const void ColorButton::set_title(const Glib::ustring& title) { - gtk_color_button_set_title(gobj(), title.c_str()); +gtk_color_button_set_title(gobj(), title.c_str()); } Glib::ustring ColorButton::get_title() const @@ -230,47 +246,64 @@ Glib::SignalProxy0< void > ColorButton::signal_color_set() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorButton::property_use_alpha() { return Glib::PropertyProxy(this, "use-alpha"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorButton::property_use_alpha() const { return Glib::PropertyProxy_ReadOnly(this, "use-alpha"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorButton::property_title() { return Glib::PropertyProxy(this, "title"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorButton::property_title() const { return Glib::PropertyProxy_ReadOnly(this, "title"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorButton::property_color() { return Glib::PropertyProxy(this, "color"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorButton::property_color() const { return Glib::PropertyProxy_ReadOnly(this, "color"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorButton::property_alpha() { return Glib::PropertyProxy(this, "alpha"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorButton::property_alpha() const { return Glib::PropertyProxy_ReadOnly(this, "alpha"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ColorButton::on_color_set() { BaseClassType *const base = static_cast( @@ -280,6 +313,10 @@ void Gtk::ColorButton::on_color_set() if(base && base->color_set) (*base->color_set)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/colorbutton.h b/libs/gtkmm2/gtk/gtkmm/colorbutton.h index aea0bc1d16..214bad401a 100644 --- a/libs/gtkmm2/gtk/gtkmm/colorbutton.h +++ b/libs/gtkmm2/gtk/gtkmm/colorbutton.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_COLORBUTTON_H #define _GTKMM_COLORBUTTON_H + #include /* $Id$ */ @@ -93,12 +94,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_color_set(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -112,7 +119,7 @@ public: * 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 + * @newin2p4 */ ColorButton(); @@ -125,21 +132,21 @@ public: * * @param color A Gdk::Color to set the current color with. * - * Since: 2.4 + * @newin2p4 */ explicit ColorButton(const Gdk::Color& color); /** Sets the current color to be @a color . * - * Since: 2.4 + * @newin2p4 * @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 + * @newin2p4 * @param alpha An integer between 0 and 65535. */ void set_alpha(guint16 alpha); @@ -150,7 +157,7 @@ public: * * @return A Gdk::Color representing the current internal color of the Gtk::ColorButton. * - * Since: 2.4 + * @newin2p4 */ Gdk::Color get_color() const; @@ -158,13 +165,13 @@ public: /** Returns the current alpha value. * @return An integer between 0 and 65535. * - * Since: 2.4. + * @newin2p4. */ guint16 get_alpha() const; /** Sets whether or not the color button should use the alpha channel. * - * Since: 2.4 + * @newin2p4 * @param use_alpha true if color button should use alpha channel, false if not. */ void set_use_alpha(bool use_alpha = true); @@ -172,32 +179,35 @@ public: /** Does the color selection dialog use the alpha channel? * @return true if the color sample uses alpha channel, false if not. * - * Since: 2.4. + * @newin2p4. */ bool get_use_alpha() const; /** Sets the title for the color selection dialog. * - * Since: 2.4 + * @newin2p4 * @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. + * @newin2p4 + * @return The title. */ Glib::ustring get_title() const; - /** Whether or not to give the color an alpha value. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_alpha() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -205,15 +215,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_alpha() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The title of the color selection dialog. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_title() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -221,15 +235,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_title() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The selected color. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_color() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The selected color. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -237,15 +255,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_color() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The selected opacity value (0 fully transparent, 65535 fully opaque). + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_alpha() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -253,8 +275,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_alpha() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + /** The color_set signal is emitted when the user selects a color. When handling this signal, + * use get_color() and get_alpha() to find out which color + * was just selected. + */ + +/** + * @par Prototype: + * void %color_set() + */ + Glib::SignalProxy0< void > signal_color_set(); @@ -272,6 +305,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ColorButton* wrap(GtkColorButton* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_COLORBUTTON_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/colorselection.cc b/libs/gtkmm2/gtk/gtkmm/colorselection.cc index 54525905bf..489b929c18 100644 --- a/libs/gtkmm2/gtk/gtkmm/colorselection.cc +++ b/libs/gtkmm2/gtk/gtkmm/colorselection.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,25 +31,29 @@ namespace { -Gtk::ColorSelection::SlotChangePaletteHook* global_change_palette_hook = 0; +static Gtk::ColorSelection::SlotChangePaletteHook* global_change_palette_hook = 0; -void global_change_palette_hook_callback(GdkScreen* screen, const GdkColor* colors, int n_colors) +static void global_change_palette_hook_callback(GdkScreen* screen, const GdkColor* colors, int n_colors) { g_return_if_fail(global_change_palette_hook != 0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED (*global_change_palette_hook)( Glib::wrap(screen, true), Gdk::ArrayHandle_Color(colors, n_colors, Glib::OWNERSHIP_NONE)); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } -void old_change_palette_hook_callback(const Glib::RefPtr& screen, +static void old_change_palette_hook_callback(const Glib::RefPtr& screen, const Gdk::ArrayHandle_Color& colors, GtkColorSelectionChangePaletteWithScreenFunc func) { @@ -116,12 +121,15 @@ ColorSelection::set_change_palette_hook(const ColorSelection::SlotChangePaletteH if(old_func) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED 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; + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { @@ -129,6 +137,7 @@ ColorSelection::set_change_palette_hook(const ColorSelection::SlotChangePaletteH delete new_slot; throw; } + #endif //GLIBMM_EXCEPTIONS_ENABLED } delete global_change_palette_hook; @@ -143,13 +152,15 @@ ColorSelection::set_change_palette_hook(const ColorSelection::SlotChangePaletteH namespace { -const Glib::SignalProxyInfo ColorSelection_signal_color_changed_info = + +static const Glib::SignalProxyInfo ColorSelection_signal_color_changed_info = { "color_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -194,10 +205,18 @@ void ColorSelection_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->color_changed = &color_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ColorSelection_Class::color_changed_callback(GtkColorSelection* self) { CppObjectType *const obj = dynamic_cast( @@ -210,15 +229,19 @@ void ColorSelection_Class::color_changed_callback(GtkColorSelection* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_color_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -231,6 +254,7 @@ void ColorSelection_Class::color_changed_callback(GtkColorSelection* self) (*base->color_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ColorSelection_Class::wrap_new(GObject* o) @@ -286,7 +310,7 @@ bool ColorSelection::get_has_opacity_control() const void ColorSelection::set_has_opacity_control(bool has_opacity) { - gtk_color_selection_set_has_opacity_control(gobj(), static_cast(has_opacity)); +gtk_color_selection_set_has_opacity_control(gobj(), static_cast(has_opacity)); } bool ColorSelection::get_has_palette() const @@ -296,17 +320,17 @@ bool ColorSelection::get_has_palette() const void ColorSelection::set_has_palette(bool has_palette) { - gtk_color_selection_set_has_palette(gobj(), static_cast(has_palette)); +gtk_color_selection_set_has_palette(gobj(), static_cast(has_palette)); } void ColorSelection::set_current_color(const Gdk::Color& color) { - gtk_color_selection_set_current_color(gobj(), (color).gobj()); +gtk_color_selection_set_current_color(gobj(), (color).gobj()); } void ColorSelection::set_current_alpha(guint16 alpha) { - gtk_color_selection_set_current_alpha(gobj(), alpha); +gtk_color_selection_set_current_alpha(gobj(), alpha); } guint16 ColorSelection::get_current_alpha() const @@ -316,12 +340,12 @@ guint16 ColorSelection::get_current_alpha() const void ColorSelection::set_previous_color(const Gdk::Color& color) { - gtk_color_selection_set_previous_color(gobj(), (color).gobj()); +gtk_color_selection_set_previous_color(gobj(), (color).gobj()); } void ColorSelection::set_previous_alpha(guint16 alpha) { - gtk_color_selection_set_previous_alpha(gobj(), alpha); +gtk_color_selection_set_previous_alpha(gobj(), alpha); } guint16 ColorSelection::get_previous_alpha() const @@ -341,47 +365,64 @@ Glib::SignalProxy0< void > ColorSelection::signal_color_changed() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorSelection::property_has_palette() { return Glib::PropertyProxy(this, "has-palette"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorSelection::property_has_palette() const { return Glib::PropertyProxy_ReadOnly(this, "has-palette"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorSelection::property_has_opacity_control() { return Glib::PropertyProxy(this, "has-opacity-control"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorSelection::property_has_opacity_control() const { return Glib::PropertyProxy_ReadOnly(this, "has-opacity-control"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorSelection::property_current_color() { return Glib::PropertyProxy(this, "current-color"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorSelection::property_current_color() const { return Glib::PropertyProxy_ReadOnly(this, "current-color"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ColorSelection::property_current_alpha() { return Glib::PropertyProxy(this, "current-alpha"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ColorSelection::property_current_alpha() const { return Glib::PropertyProxy_ReadOnly(this, "current-alpha"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ColorSelection::on_color_changed() { BaseClassType *const base = static_cast( @@ -391,6 +432,10 @@ void Gtk::ColorSelection::on_color_changed() if(base && base->color_changed) (*base->color_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -437,8 +482,19 @@ void ColorSelectionDialog_Class::class_init_function(void* g_class, void* class_ BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* ColorSelectionDialog_Class::wrap_new(GObject* o) { @@ -492,7 +548,7 @@ ColorSelectionDialog::ColorSelectionDialog(const Glib::ustring& title) { } -ColorSelection* ColorSelectionDialog::get_colorsel() + ColorSelection* ColorSelectionDialog::get_colorsel() { return Glib::wrap((GtkColorSelection*)(gobj()->colorsel)); } @@ -501,8 +557,8 @@ const ColorSelection* ColorSelectionDialog::get_colorsel() const { return Glib::wrap((GtkColorSelection*)(gobj()->colorsel)); } - -Button* ColorSelectionDialog::get_ok_button() + + Button* ColorSelectionDialog::get_ok_button() { return Glib::wrap((GtkButton*)(gobj()->ok_button)); } @@ -511,8 +567,8 @@ const Button* ColorSelectionDialog::get_ok_button() const { return Glib::wrap((GtkButton*)(gobj()->ok_button)); } - -Button* ColorSelectionDialog::get_cancel_button() + + Button* ColorSelectionDialog::get_cancel_button() { return Glib::wrap((GtkButton*)(gobj()->cancel_button)); } @@ -521,8 +577,8 @@ const Button* ColorSelectionDialog::get_cancel_button() const { return Glib::wrap((GtkButton*)(gobj()->cancel_button)); } - -Button* ColorSelectionDialog::get_help_button() + + Button* ColorSelectionDialog::get_help_button() { return Glib::wrap((GtkButton*)(gobj()->help_button)); } @@ -531,6 +587,13 @@ const Button* ColorSelectionDialog::get_help_button() const { return Glib::wrap((GtkButton*)(gobj()->help_button)); } + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/colorselection.h b/libs/gtkmm2/gtk/gtkmm/colorselection.h index 0d77feb43e..718565383c 100644 --- a/libs/gtkmm2/gtk/gtkmm/colorselection.h +++ b/libs/gtkmm2/gtk/gtkmm/colorselection.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_COLORSELECTION_H #define _GTKMM_COLORSELECTION_H + #include /* $Id$ */ @@ -104,12 +105,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_color_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -193,17 +200,25 @@ public: static SlotChangePaletteHook set_change_palette_hook(const SlotChangePaletteHook& slot); +/** + * @par Prototype: + * void %color_changed() + */ + Glib::SignalProxy0< void > signal_color_changed(); - /** Whether a palette should be used. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_has_palette() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether a palette should be used. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -211,15 +226,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_has_palette() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the color selector should allow setting opacity. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_has_opacity_control() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -227,15 +246,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_has_opacity_control() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The current color. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_current_color() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The current color. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -243,15 +266,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_current_color() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The current opacity value (0 fully transparent, 65535 fully opaque). + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_current_alpha() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -259,6 +286,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_current_alpha() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -310,11 +338,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -325,15 +359,15 @@ public: ColorSelectionDialog(); explicit ColorSelectionDialog(const Glib::ustring& title); - ColorSelection* get_colorsel(); + ColorSelection* get_colorsel(); const ColorSelection* get_colorsel() const; - Button* get_ok_button(); + Button* get_ok_button(); const Button* get_ok_button() const; - Button* get_cancel_button(); + Button* get_cancel_button(); const Button* get_cancel_button() const; - Button* get_help_button(); + Button* get_help_button(); const Button* get_help_button() const; - + }; @@ -348,7 +382,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ColorSelection* wrap(GtkColorSelection* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::ColorSelectionDialog @@ -357,6 +393,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ColorSelectionDialog* wrap(GtkColorSelectionDialog* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_COLORSELECTION_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/combo.cc b/libs/gtkmm2/gtk/gtkmm/combo.cc index 453c7ec39e..c36c030ace 100644 --- a/libs/gtkmm2/gtk/gtkmm/combo.cc +++ b/libs/gtkmm2/gtk/gtkmm/combo.cc @@ -1,5 +1,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! +#ifndef GTKMM_DISABLE_DEPRECATED + + #include #include @@ -136,7 +139,8 @@ Glib::ListHandle Combo::get_popdown_strings() const namespace { -void ComboDropDownItem_signal_scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data) + +static void ComboDropDownItem_signal_scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data) { using namespace Gtk; typedef sigc::slot< void,ScrollType,float > SlotType; @@ -144,21 +148,25 @@ void ComboDropDownItem_signal_scroll_horizontal_callback(GtkListItem* self, GtkS // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(((ScrollType)(p0)) , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_horizontal_info = +static const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_horizontal_info = { "scroll-horizontal", (GCallback) &ComboDropDownItem_signal_scroll_horizontal_callback, @@ -166,7 +174,7 @@ const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_horizontal_info = }; -void ComboDropDownItem_signal_scroll_vertical_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data) +static void ComboDropDownItem_signal_scroll_vertical_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data) { using namespace Gtk; typedef sigc::slot< void,ScrollType,float > SlotType; @@ -174,21 +182,25 @@ void ComboDropDownItem_signal_scroll_vertical_callback(GtkListItem* self, GtkScr // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(((ScrollType)(p0)) , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_vertical_info = +static const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_vertical_info = { "scroll-vertical", (GCallback) &ComboDropDownItem_signal_scroll_vertical_callback, @@ -196,7 +208,7 @@ const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_vertical_info = }; -void ComboDropDown_signal_select_child_callback(GtkList* self, GtkWidget* p0,void* data) +static void ComboDropDown_signal_select_child_callback(GtkList* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget& > SlotType; @@ -204,20 +216,24 @@ void ComboDropDown_signal_select_child_callback(GtkList* self, GtkWidget* p0,voi // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(*Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ComboDropDown_signal_select_child_info = +static const Glib::SignalProxyInfo ComboDropDown_signal_select_child_info = { "select_child", (GCallback) &ComboDropDown_signal_select_child_callback, @@ -225,7 +241,7 @@ const Glib::SignalProxyInfo ComboDropDown_signal_select_child_info = }; -const Glib::SignalProxyInfo ComboDropDown_signal_selection_changed_info = +static const Glib::SignalProxyInfo ComboDropDown_signal_selection_changed_info = { "selection_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -233,7 +249,7 @@ const Glib::SignalProxyInfo ComboDropDown_signal_selection_changed_info = }; -void ComboDropDown_signal_unselect_child_callback(GtkList* self, GtkWidget* p0,void* data) +static void ComboDropDown_signal_unselect_child_callback(GtkList* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget& > SlotType; @@ -241,26 +257,31 @@ void ComboDropDown_signal_unselect_child_callback(GtkList* self, GtkWidget* p0,v // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(*Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo ComboDropDown_signal_unselect_child_info = +static const Glib::SignalProxyInfo ComboDropDown_signal_unselect_child_info = { "unselect_child", (GCallback) &ComboDropDown_signal_unselect_child_callback, (GCallback) &ComboDropDown_signal_unselect_child_callback }; + } // anonymous namespace @@ -305,11 +326,19 @@ void ComboDropDownItem_Class::class_init_function(void* g_class, void* class_dat BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->scroll_horizontal = &scroll_horizontal_callback; klass->scroll_vertical = &scroll_vertical_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ComboDropDownItem_Class::scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0, gfloat p1) { CppObjectType *const obj = dynamic_cast( @@ -322,17 +351,21 @@ void ComboDropDownItem_Class::scroll_horizontal_callback(GtkListItem* self, GtkS // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_scroll_horizontal(((ScrollType)(p0)) , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -345,7 +378,6 @@ void ComboDropDownItem_Class::scroll_horizontal_callback(GtkListItem* self, GtkS (*base->scroll_horizontal)(self, p0, p1); } } - void ComboDropDownItem_Class::scroll_vertical_callback(GtkListItem* self, GtkScrollType p0, gfloat p1) { CppObjectType *const obj = dynamic_cast( @@ -358,17 +390,21 @@ void ComboDropDownItem_Class::scroll_vertical_callback(GtkListItem* self, GtkScr // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_scroll_vertical(((ScrollType)(p0)) , p1 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -381,6 +417,7 @@ void ComboDropDownItem_Class::scroll_vertical_callback(GtkListItem* self, GtkScr (*base->scroll_vertical)(self, p0, p1); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ComboDropDownItem_Class::wrap_new(GObject* o) @@ -435,12 +472,14 @@ Glib::SignalProxy2< void,ScrollType,float > ComboDropDownItem::signal_scroll_hor 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ComboDropDownItem::on_scroll_horizontal(ScrollType scroll_type, float position) { BaseClassType *const base = static_cast( @@ -450,7 +489,6 @@ void Gtk::ComboDropDownItem::on_scroll_horizontal(ScrollType scroll_type, float 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( @@ -460,6 +498,10 @@ void Gtk::ComboDropDownItem::on_scroll_vertical(ScrollType scroll_type, float po if(base && base->scroll_vertical) (*base->scroll_vertical)(gobj(),((GtkScrollType)(scroll_type)),position); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -506,12 +548,20 @@ void ComboDropDown_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->select_child = &select_child_callback; klass->selection_changed = &selection_changed_callback; klass->unselect_child = &unselect_child_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ComboDropDown_Class::select_child_callback(GtkList* self, GtkWidget* p0) { CppObjectType *const obj = dynamic_cast( @@ -524,16 +574,20 @@ void ComboDropDown_Class::select_child_callback(GtkList* self, GtkWidget* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_select_child(*Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -546,7 +600,6 @@ void ComboDropDown_Class::select_child_callback(GtkList* self, GtkWidget* p0) (*base->select_child)(self, p0); } } - void ComboDropDown_Class::selection_changed_callback(GtkList* self) { CppObjectType *const obj = dynamic_cast( @@ -559,15 +612,19 @@ void ComboDropDown_Class::selection_changed_callback(GtkList* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_selection_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -580,7 +637,6 @@ void ComboDropDown_Class::selection_changed_callback(GtkList* self) (*base->selection_changed)(self); } } - void ComboDropDown_Class::unselect_child_callback(GtkList* self, GtkWidget* p0) { CppObjectType *const obj = dynamic_cast( @@ -593,16 +649,20 @@ void ComboDropDown_Class::unselect_child_callback(GtkList* self, GtkWidget* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_unselect_child(*Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -615,6 +675,7 @@ void ComboDropDown_Class::unselect_child_callback(GtkList* self, GtkWidget* p0) (*base->unselect_child)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ComboDropDown_Class::wrap_new(GObject* o) @@ -733,12 +794,12 @@ ComboDropDown::ComboDropDown() void ComboDropDown::scroll_horizontal(ScrollType scroll_type, float position) { - gtk_list_scroll_horizontal(gobj(), ((GtkScrollType)(scroll_type)), 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); +gtk_list_scroll_vertical(gobj(), ((GtkScrollType)(scroll_type)), position); } @@ -747,17 +808,20 @@ 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ComboDropDown::on_select_child(Widget& item) { BaseClassType *const base = static_cast( @@ -767,7 +831,6 @@ void Gtk::ComboDropDown::on_select_child(Widget& item) if(base && base->select_child) (*base->select_child)(gobj(),(item).gobj()); } - void Gtk::ComboDropDown::on_selection_changed() { BaseClassType *const base = static_cast( @@ -777,7 +840,6 @@ void Gtk::ComboDropDown::on_selection_changed() if(base && base->selection_changed) (*base->selection_changed)(gobj()); } - void Gtk::ComboDropDown::on_unselect_child(Widget& item) { BaseClassType *const base = static_cast( @@ -787,6 +849,10 @@ void Gtk::ComboDropDown::on_unselect_child(Widget& item) if(base && base->unselect_child) (*base->unselect_child)(gobj(),(item).gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -833,8 +899,19 @@ void Combo_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Combo_Class::wrap_new(GObject* o) { @@ -883,40 +960,40 @@ Combo::Combo() void Combo::set_value_in_list(bool value, bool empty) { - gtk_combo_set_value_in_list(gobj(), static_cast(value), static_cast(empty)); +gtk_combo_set_value_in_list(gobj(), static_cast(value), static_cast(empty)); } void Combo::set_use_arrows(bool arrows_on) { - gtk_combo_set_use_arrows(gobj(), static_cast(arrows_on)); +gtk_combo_set_use_arrows(gobj(), static_cast(arrows_on)); } void Combo::set_use_arrows_always(bool arrows_always) { - gtk_combo_set_use_arrows_always(gobj(), static_cast(arrows_always)); +gtk_combo_set_use_arrows_always(gobj(), static_cast(arrows_always)); } void Combo::set_case_sensitive(bool val) { - gtk_combo_set_case_sensitive(gobj(), static_cast(val)); +gtk_combo_set_case_sensitive(gobj(), static_cast(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()); +gtk_combo_set_item_string(gobj(), (item).gobj(), item_value.c_str()); } void Combo::set_popdown_strings(const Glib::ListHandle& strings) { - gtk_combo_set_popdown_strings(gobj(), strings.data()); +gtk_combo_set_popdown_strings(gobj(), strings.data()); } void Combo::disable_activate() { - gtk_combo_disable_activate(gobj()); +gtk_combo_disable_activate(gobj()); } -Entry* Combo::get_entry() + Entry* Combo::get_entry() { return Glib::wrap((GtkEntry*)(gobj()->entry)); } @@ -925,8 +1002,8 @@ const Entry* Combo::get_entry() const { return Glib::wrap((GtkEntry*)(gobj()->entry)); } - -ComboDropDown* Combo::get_list() + + ComboDropDown* Combo::get_list() { return Glib::wrap((GtkList*)(gobj()->list)); } @@ -935,59 +1012,88 @@ const ComboDropDown* Combo::get_list() const { return Glib::wrap((GtkList*)(gobj()->list)); } + - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_enable_arrow_keys() { return Glib::PropertyProxy(this, "enable-arrow-keys"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_enable_arrow_keys() const { return Glib::PropertyProxy_ReadOnly(this, "enable-arrow-keys"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_enable_arrows_always() { return Glib::PropertyProxy(this, "enable-arrows-always"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_enable_arrows_always() const { return Glib::PropertyProxy_ReadOnly(this, "enable-arrows-always"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_case_sensitive() { return Glib::PropertyProxy(this, "case-sensitive"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_case_sensitive() const { return Glib::PropertyProxy_ReadOnly(this, "case-sensitive"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_allow_empty() { return Glib::PropertyProxy(this, "allow-empty"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_allow_empty() const { return Glib::PropertyProxy_ReadOnly(this, "allow-empty"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_value_in_list() { return Glib::PropertyProxy(this, "value-in-list"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_value_in_list() const { return Glib::PropertyProxy_ReadOnly(this, "value-in-list"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk +#endif // GTKMM_DISABLE_DEPRECATED + diff --git a/libs/gtkmm2/gtk/gtkmm/combo.h b/libs/gtkmm2/gtk/gtkmm/combo.h index d0c973204d..efbb772495 100644 --- a/libs/gtkmm2/gtk/gtkmm/combo.h +++ b/libs/gtkmm2/gtk/gtkmm/combo.h @@ -3,6 +3,9 @@ #ifndef _GTKMM_COMBO_H #define _GTKMM_COMBO_H +#ifndef GTKMM_DISABLE_DEPRECATED + + #include /* $Id$ */ @@ -112,13 +115,19 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_scroll_horizontal(ScrollType scroll_type, float position); virtual void on_scroll_vertical(ScrollType scroll_type, float position); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -128,9 +137,19 @@ public: ComboDropDownItem(); +/** + * @par Prototype: + * void %scroll_horizontal(ScrollType scroll_type, float position) + */ + Glib::SignalProxy2< void,ScrollType,float > signal_scroll_horizontal(); +/** + * @par Prototype: + * void %scroll_vertical(ScrollType scroll_type, float position) + */ + Glib::SignalProxy2< void,ScrollType,float > signal_scroll_vertical(); @@ -249,14 +268,20 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_select_child(Widget& item); virtual void on_selection_changed(); virtual void on_unselect_child(Widget& item); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -279,12 +304,27 @@ public: const ComboDropDownList& children() const; +/** + * @par Prototype: + * void %select_child(Widget& item) + */ + Glib::SignalProxy1< void,Widget& > signal_select_child(); +/** + * @par Prototype: + * void %selection_changed() + */ + Glib::SignalProxy0< void > signal_selection_changed(); +/** + * @par Prototype: + * void %unselect_child(Widget& item) + */ + Glib::SignalProxy1< void,Widget& > signal_unselect_child(); @@ -354,20 +394,26 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: + public: Combo(); - /** Allow direct text entry * Whether the text in the entry must be or not be in the list. * @@ -422,19 +468,22 @@ public: void disable_activate(); - Entry* get_entry(); + Entry* get_entry(); const Entry* get_entry() const; - ComboDropDown* get_list(); + ComboDropDown* get_list(); const ComboDropDown* get_list() const; - - /** Whether the arrow keys move through the list of items. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_enable_arrow_keys() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -442,15 +491,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_enable_arrow_keys() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Obsolete property + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_enable_arrows_always() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Obsolete property * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -458,15 +511,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_enable_arrows_always() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether list item matching is case sensitive. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_case_sensitive() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -474,15 +531,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_case_sensitive() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether an empty value may be entered in this field. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_allow_empty() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -490,15 +551,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_allow_empty() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether entered values must already be present in the list. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_value_in_list() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -506,6 +571,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_value_in_list() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -522,7 +588,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ComboDropDownItem* wrap(GtkListItem* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::ComboDropDown @@ -531,7 +599,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ComboDropDown* wrap(GtkList* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::Combo @@ -540,6 +610,11 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Combo* wrap(GtkCombo* object, bool take_copy = false); -} +} //namespace Glib + + +#endif // GTKMM_DISABLE_DEPRECATED + + #endif /* _GTKMM_COMBO_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/combobox.cc b/libs/gtkmm2/gtk/gtkmm/combobox.cc index d16c27d274..b56d24e2ba 100644 --- a/libs/gtkmm2/gtk/gtkmm/combobox.cc +++ b/libs/gtkmm2/gtk/gtkmm/combobox.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -24,7 +25,7 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - + #include #include #include //For SignalProxy_RowSeparator. @@ -74,13 +75,13 @@ TreeModel::const_iterator ComboBox::get_active() const 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); + //Create a copy of the slot. 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. + SlotRowSeparator* slot_copy = new SlotRowSeparator(slot); gtk_combo_box_set_row_separator_func(gobj(), - &TreeView_Private::SignalProxy_RowSeparator::gtk_callback, pSignalProxy, - &TreeView_Private::SignalProxy_RowSeparator::gtk_callback_destroy); + &TreeView_Private::SignalProxy_RowSeparator_gtk_callback, slot_copy, + &TreeView_Private::SignalProxy_RowSeparator_gtk_callback_destroy); } void ComboBox::unset_row_separator_func() @@ -94,13 +95,15 @@ void ComboBox::unset_row_separator_func() namespace { -const Glib::SignalProxyInfo ComboBox_signal_changed_info = + +static const Glib::SignalProxyInfo ComboBox_signal_changed_info = { "changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -146,10 +149,18 @@ void ComboBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->changed = &changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ComboBox_Class::changed_callback(GtkComboBox* self) { CppObjectType *const obj = dynamic_cast( @@ -162,15 +173,19 @@ void ComboBox_Class::changed_callback(GtkComboBox* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -183,6 +198,7 @@ void ComboBox_Class::changed_callback(GtkComboBox* self) (*base->changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ComboBox_Class::wrap_new(GObject* o) @@ -240,7 +256,7 @@ ComboBox::ComboBox(const Glib::RefPtr& model) void ComboBox::set_wrap_width(int width) { - gtk_combo_box_set_wrap_width(gobj(), width); +gtk_combo_box_set_wrap_width(gobj(), width); } int ComboBox::get_wrap_width() const @@ -250,7 +266,7 @@ int ComboBox::get_wrap_width() const void ComboBox::set_row_span_column(int row_span) { - gtk_combo_box_set_row_span_column(gobj(), row_span); +gtk_combo_box_set_row_span_column(gobj(), row_span); } int ComboBox::get_row_span_column() const @@ -260,7 +276,7 @@ int ComboBox::get_row_span_column() const void ComboBox::set_column_span_column(int column_span) { - gtk_combo_box_set_column_span_column(gobj(), column_span); +gtk_combo_box_set_column_span_column(gobj(), column_span); } int ComboBox::get_column_span_column() const @@ -275,7 +291,17 @@ bool ComboBox::get_add_tearoffs() const void ComboBox::set_add_tearoffs(bool add_tearoffs) { - gtk_combo_box_set_add_tearoffs(gobj(), static_cast(add_tearoffs)); +gtk_combo_box_set_add_tearoffs(gobj(), static_cast(add_tearoffs)); +} + +Glib::ustring ComboBox::get_title() const +{ + return Glib::convert_const_gchar_ptr_to_ustring(gtk_combo_box_get_title(const_cast(gobj()))); +} + +void ComboBox::set_title(const Glib::ustring& title) +{ +gtk_combo_box_set_title(gobj(), title.c_str()); } bool ComboBox::get_focus_on_click() const @@ -285,7 +311,7 @@ bool ComboBox::get_focus_on_click() const void ComboBox::set_focus_on_click(bool focus_on_click) { - gtk_combo_box_set_focus_on_click(gobj(), static_cast(focus_on_click)); +gtk_combo_box_set_focus_on_click(gobj(), static_cast(focus_on_click)); } int ComboBox::get_active_row_number() const @@ -295,147 +321,196 @@ int ComboBox::get_active_row_number() const void ComboBox::set_active(int index) { - gtk_combo_box_set_active(gobj(), 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((iter).gobj())); +gtk_combo_box_set_active_iter(gobj(), const_cast((iter).gobj())); } Glib::RefPtr ComboBox::get_model() { Glib::RefPtr 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 ComboBox::get_model() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_combo_box_get_model(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_model(); } void ComboBox::set_model(const Glib::RefPtr& model) { - gtk_combo_box_set_model(gobj(), Glib::unwrap(model)); +gtk_combo_box_set_model(gobj(), Glib::unwrap(model)); } void ComboBox::popup() { - gtk_combo_box_popup(gobj()); +gtk_combo_box_popup(gobj()); } void ComboBox::popdown() { - gtk_combo_box_popdown(gobj()); +gtk_combo_box_popdown(gobj()); } +#ifdef GTKMM_ATKMM_ENABLED Glib::RefPtr ComboBox::get_popup_accessible() { return Glib::wrap(gtk_combo_box_get_popup_accessible(gobj())); } + +#endif // GTKMM_ATKMM_ENABLED +#ifdef GTKMM_ATKMM_ENABLED Glib::RefPtr ComboBox::get_popup_accessible() const { - return Glib::wrap(gtk_combo_box_get_popup_accessible(const_cast(gobj()))); + return const_cast(this)->get_popup_accessible(); } +#endif // GTKMM_ATKMM_ENABLED + + Glib::SignalProxy0< void > ComboBox::signal_changed() { return Glib::SignalProxy0< void >(this, &ComboBox_signal_changed_info); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy< Glib::RefPtr > ComboBox::property_model() { return Glib::PropertyProxy< Glib::RefPtr >(this, "model"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly< Glib::RefPtr > ComboBox::property_model() const { return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "model"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_wrap_width() { return Glib::PropertyProxy(this, "wrap-width"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_wrap_width() const { return Glib::PropertyProxy_ReadOnly(this, "wrap-width"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_row_span_column() { return Glib::PropertyProxy(this, "row-span-column"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_row_span_column() const { return Glib::PropertyProxy_ReadOnly(this, "row-span-column"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_column_span_column() { return Glib::PropertyProxy(this, "column-span-column"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_column_span_column() const { return Glib::PropertyProxy_ReadOnly(this, "column-span-column"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_active() { return Glib::PropertyProxy(this, "active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_active() const { return Glib::PropertyProxy_ReadOnly(this, "active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_add_tearoffs() { return Glib::PropertyProxy(this, "add-tearoffs"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_add_tearoffs() const { return Glib::PropertyProxy_ReadOnly(this, "add-tearoffs"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_has_frame() { return Glib::PropertyProxy(this, "has-frame"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_has_frame() const { return Glib::PropertyProxy_ReadOnly(this, "has-frame"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy ComboBox::property_focus_on_click() { return Glib::PropertyProxy(this, "focus-on-click"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly ComboBox::property_focus_on_click() const { return Glib::PropertyProxy_ReadOnly(this, "focus-on-click"); } +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy ComboBox::property_tearoff_title() +{ + return Glib::PropertyProxy(this, "tearoff-title"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly ComboBox::property_tearoff_title() const +{ + return Glib::PropertyProxy_ReadOnly(this, "tearoff-title"); +} +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ComboBox::on_changed() { BaseClassType *const base = static_cast( @@ -445,6 +520,10 @@ void Gtk::ComboBox::on_changed() if(base && base->changed) (*base->changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/combobox.h b/libs/gtkmm2/gtk/gtkmm/combobox.h index c143e59bc2..2201940cec 100644 --- a/libs/gtkmm2/gtk/gtkmm/combobox.h +++ b/libs/gtkmm2/gtk/gtkmm/combobox.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_COMBOBOX_H #define _GTKMM_COMBOBOX_H + #include /* $Id$ */ @@ -65,6 +66,7 @@ namespace Gtk class ComboBox : public Bin, public CellLayout +//TODO: Since GTK+ 2.6, this should now inherit also from CellEditable, but we can't add this base without breaking ABI. { public: #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -107,12 +109,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -131,7 +139,7 @@ public: * the preferred number of columns when you want the popup to be layed out * in a table. * - * Since: 2.4 + * @newin2p4 * @param width Preferred number of columns. */ void set_wrap_width(int width); @@ -141,7 +149,7 @@ public: * 1, the combo box is in table mode. * @return The wrap width. * - * Since: 2.6. + * @newin2p6. */ int get_wrap_width() const; @@ -150,7 +158,7 @@ public: * The row span column contains integers which indicate how many rows * an item should span. * - * Since: 2.4 + * @newin2p4 * @param row_span A column in the model passed during construction. */ void set_row_span_column(int row_span); @@ -158,7 +166,7 @@ public: /** Returns the column with row span information for @a combo_box . * @return The row span column. * - * Since: 2.6. + * @newin2p6. */ int get_row_span_column() const; @@ -167,7 +175,7 @@ public: * @a column_span . The column span column contains integers which indicate * how many columns an item should span. * - * Since: 2.4 + * @newin2p4 * @param column_span A column in the model passed during construction. */ void set_column_span_column(int column_span); @@ -175,7 +183,7 @@ public: /** Returns the column with column span information for @a combo_box . * @return The column span column. * - * Since: 2.6. + * @newin2p6. */ int get_column_span_column() const; @@ -188,18 +196,23 @@ public: /** Sets whether the popup menu should have a tearoff * menu item. * - * Since: 2.6 + * @newin2p6 * @param add_tearoffs true to add tearoff menu items. */ void set_add_tearoffs(bool add_tearoffs = true); + Glib::ustring get_title() const; + + void set_title(const Glib::ustring& title); + + /** Returns whether the combo box grabs focus when it is clicked * with the mouse. See set_focus_on_click(). * @return true if the combo box grabs focus when it is * clicked with the mouse. * - * Since: 2.6. + * @newin2p6. */ bool get_focus_on_click() const; @@ -208,7 +221,7 @@ public: * like toolbars where you don't want the keyboard focus removed from * the main area of the application. * - * Since: 2.6 + * @newin2p6 * @param focus_on_click Whether the combo box grabs focus when clicked * with the mouse. */ @@ -224,7 +237,7 @@ public: * @return An integer which is the index of the currently active item, or * -1 if there's no active item. * - * Since: 2.4. + * @newin2p4. */ int get_active_row_number() const; @@ -241,7 +254,7 @@ public: /** Sets the active item of @a combo_box to be the item at @a index . * - * Since: 2.4 + * @newin2p4 * @param index An index in the model passed during construction, or -1 to have * no active item. */ @@ -250,7 +263,7 @@ public: /** 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 + * @newin2p4 * @param iter The Gtk::TreeIter. */ void set_active(const TreeModel::iterator& iter); @@ -263,14 +276,14 @@ public: /** 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. + * @newin2p4. */ Glib::RefPtr 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. + * @newin2p4. */ Glib::RefPtr get_model() const; @@ -281,7 +294,7 @@ public: * call gtk_combo_box_cell_layout_clear() yourself if you need to set up * different cell renderers for the new model. * - * Since: 2.4 + * @newin2p4 * @param model A Gtk::TreeModel. */ void set_model(const Glib::RefPtr& model); @@ -305,7 +318,7 @@ public: * This function is mostly intended for use by accessibility technologies; * applications should have little use for it. * - * Since: 2.4 + * @newin2p4 */ void popup(); @@ -314,10 +327,10 @@ public: * This function is mostly intended for use by accessibility technologies; * applications should have little use for it. * - * Since: 2.4 + * @newin2p4 */ void popdown(); - + /** Gets the accessible object corresponding to the combo box's popup. * @@ -325,9 +338,13 @@ public: * applications should have little use for it. * @return The accessible object corresponding to the combo box's popup. * - * Since: 2.6. + * @newin2p6. */ + +#ifdef GTKMM_ATKMM_ENABLED Glib::RefPtr get_popup_accessible(); +#endif // GTKMM_ATKMM_ENABLED + /** Gets the accessible object corresponding to the combo box's popup. * @@ -335,20 +352,27 @@ public: * applications should have little use for it. * @return The accessible object corresponding to the combo box's popup. * - * Since: 2.6. + * @newin2p6. */ + +#ifdef GTKMM_ATKMM_ENABLED Glib::RefPtr get_popup_accessible() const; +#endif // GTKMM_ATKMM_ENABLED + //These are in ComboBoxText. - /** The model for the combo box. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 > property_model() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The model for the combo box. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -356,31 +380,39 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly< Glib::RefPtr > property_model() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Wrap width for layouting the items in a grid. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Wrap width for laying out 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 property_wrap_width() ; +#endif //#GLIBMM_PROPERTIES_ENABLED -/** Wrap width for layouting the items in a grid. +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Wrap width for laying out 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 property_wrap_width() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** TreeModel column containing the row span values. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_row_span_column() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -388,15 +420,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_row_span_column() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** TreeModel column containing the column span values. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_column_span_column() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -404,15 +440,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_column_span_column() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The item which is currently active. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_active() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The item which is currently active. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -420,15 +460,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_active() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether dropdowns should have a tearoff menu item. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_add_tearoffs() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -436,15 +480,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_add_tearoffs() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the combo box draws a frame around the child. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_has_frame() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -452,15 +500,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_has_frame() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the combo box grabs focus when it is clicked with the mouse. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_focus_on_click() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -468,7 +520,39 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_focus_on_click() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + #ifdef GLIBMM_PROPERTIES_ENABLED +/** A title that may be displayed by the window manager when the popup 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 property_tearoff_title() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** A title that may be displayed by the window manager when the popup 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 property_tearoff_title() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + + /** The changed signal gets emitted when the active + * item is changed. This can be due to the user selecting + * a different item from the list, or due to a + * call to set_active_iter(). + */ + +/** + * @par Prototype: + * void %changed() + */ Glib::SignalProxy0< void > signal_changed(); @@ -487,6 +571,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ComboBox* wrap(GtkComboBox* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_COMBOBOX_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc b/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc index 90a0bf6b39..0b850de778 100644 --- a/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc +++ b/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -92,8 +93,19 @@ void ComboBoxEntry_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* ComboBoxEntry_Class::wrap_new(GObject* o) { @@ -157,12 +169,12 @@ ComboBoxEntry::ComboBoxEntry(const Glib::RefPtr& model, int text_colu void ComboBoxEntry::set_text_column(const TreeModelColumnBase& text_column) const { - gtk_combo_box_entry_set_text_column(const_cast(gobj()), (text_column).index()); +gtk_combo_box_entry_set_text_column(const_cast(gobj()), (text_column).index()); } void ComboBoxEntry::set_text_column(int text_column) const { - gtk_combo_box_entry_set_text_column(const_cast(gobj()), text_column); +gtk_combo_box_entry_set_text_column(const_cast(gobj()), text_column); } int ComboBoxEntry::get_text_column() const @@ -171,6 +183,13 @@ int ComboBoxEntry::get_text_column() const } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentry.h b/libs/gtkmm2/gtk/gtkmm/comboboxentry.h index dce4c67019..72d8d8ec73 100644 --- a/libs/gtkmm2/gtk/gtkmm/comboboxentry.h +++ b/libs/gtkmm2/gtk/gtkmm/comboboxentry.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_COMBOBOXENTRY_H #define _GTKMM_COMBOBOXENTRY_H + #include /* $Id$ */ @@ -98,11 +99,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -133,7 +140,7 @@ public: /** Sets the model column which @a entry_box should use to get strings from * to be @a text_column . * - * Since: 2.4. + * @newin2p4. * @param text_column A column in @a model to get the strings from. */ void set_text_column(const TreeModelColumnBase& text_column) const; @@ -141,7 +148,7 @@ public: /** Sets the model column which @a entry_box should use to get strings from * to be @a text_column . * - * Since: 2.4. + * @newin2p4. * @param text_column A column in @a model to get the strings from. */ void set_text_column(int text_column) const; @@ -149,17 +156,17 @@ public: /** 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. + * @newin2p4. */ int get_text_column() const; //The child is always an entry: - /** See Bin::get_entry(). + /** @see Bin::get_child(). */ Entry* get_entry(); - /** See Bin::get_entry(). + /** @see Bin::get_child(). */ const Entry* get_entry() const; @@ -178,6 +185,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::ComboBoxEntry* wrap(GtkComboBoxEntry* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_COMBOBOXENTRY_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc index d74c01ae72..b4eda9cb3c 100644 --- a/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc +++ b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc @@ -81,16 +81,44 @@ void ComboBoxEntryText::prepend_text(const Glib::ustring& text) } } +//deprecated. void ComboBoxEntryText::clear() +{ + clear_items(); +} + +void ComboBoxEntryText::clear_items() { //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 model = get_model(); Glib::RefPtr list_model = Glib::RefPtr::cast_dynamic(model); - + if(list_model) list_model->clear(); } +void ComboBoxEntryText::remove_text(const Glib::ustring& text) +{ + //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 model = get_model(); + Glib::RefPtr list_model = Glib::RefPtr::cast_dynamic(model); + + //Look for the row with this text, and remove it: + if(list_model) + { + for(Gtk::TreeModel::iterator iter = list_model->children().begin(); iter != list_model->children().end(); ++iter) + { + const Glib::ustring& this_text = (*iter)[m_text_columns.m_column]; + + if(this_text == text) + { + list_model->erase(iter); + return; //success + } + } + } +} + Glib::ustring ComboBoxEntryText::get_active_text() const { Glib::ustring result; diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h index fe9e6bbdf8..2ca020a3c6 100644 --- a/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h +++ b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h @@ -53,18 +53,39 @@ protected: public: ComboBoxEntryText(); - + + /** Add an item to the end of the drop-down list. + * @param text The text for the item. + */ void append_text(const Glib::ustring& text); - + void insert_text(int position, const Glib::ustring& text); - + + /** Add an item to the beginning of the drop-down list. + * @param text The text for the item. + */ void prepend_text(const Glib::ustring& text); + //@deprecated Use get_entry()->get_text() to get the actual entered text. Glib::ustring get_active_text() const; + + //@deprecated Use get_entry()->set_text() to set the actual entered text. void set_active_text(const Glib::ustring& text); + //There is a clear() method in the CellLayout base class, so this would cause confusion. + //TODO: Remove this when we can break API. + /// @deprecated See clear_items(). Since 2.8. void clear(); + /** Remove all items from the drop-down menu. + */ + void clear_items(); + + /** Remove the specified item if it is in the drop-down menu. + * @text The text of the item that should be removed. + */ + void remove_text(const Glib::ustring& text); + protected: //Tree model columns: diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc b/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc index a9c8d20d5f..b5f1f73f7e 100644 --- a/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc +++ b/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc @@ -99,7 +99,13 @@ Glib::ustring ComboBoxText::get_active_text() const return result; } +//deprecated. void ComboBoxText::clear() +{ + clear_items(); +} + +void ComboBoxText::clear_items() { //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 model = get_model(); @@ -109,6 +115,28 @@ void ComboBoxText::clear() list_model->clear(); } +void ComboBoxText::remove_text(const Glib::ustring& text) +{ + //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 model = get_model(); + Glib::RefPtr list_model = Glib::RefPtr::cast_dynamic(model); + + //Look for the row with this text, and remove it: + if(list_model) + { + for(Gtk::TreeModel::iterator iter = list_model->children().begin(); iter != list_model->children().end(); ++iter) + { + const Glib::ustring& this_text = (*iter)[m_text_columns.m_column]; + + if(this_text == text) + { + list_model->erase(iter); + return; //success + } + } + } +} + void ComboBoxText::set_active_text(const Glib::ustring& text) { //Look for the row with this text, and activate it: diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxtext.h b/libs/gtkmm2/gtk/gtkmm/comboboxtext.h index 22b87f5f00..cff1bc8bf4 100644 --- a/libs/gtkmm2/gtk/gtkmm/comboboxtext.h +++ b/libs/gtkmm2/gtk/gtkmm/comboboxtext.h @@ -56,18 +56,43 @@ protected: public: ComboBoxText(); - + + /** Add an item to the end of the drop-down list. + * @param text The text for the item. + */ void append_text(const Glib::ustring& text); - + void insert_text(int position, const Glib::ustring& text); - + + /** Add an item to the beginning of the drop-down list. + * @param text The text for the item. + */ void prepend_text(const Glib::ustring& text); + /** Get the currently-chosen item. + * @result The text of the active item. + */ Glib::ustring get_active_text() const; + + /** Set the currently-chosen item if it matches the specified text. + * @text The text of the item that should be selected. + */ void set_active_text(const Glib::ustring& text); + //There is a clear() method in the CellLayout base class, so this would cause confusion. + //TODO: Remove this when we can break API. + /// @deprecated See clear_items(). Since 2.8. void clear(); + /** Remove all items from the drop-down menu. + */ + void clear_items(); + + /** Remove the specified item if it is in the drop-down menu. + * @text The text of the item that should be removed. + */ + void remove_text(const Glib::ustring& text); + protected: //Tree model columns: diff --git a/libs/gtkmm2/gtk/gtkmm/container.cc b/libs/gtkmm2/gtk/gtkmm/container.cc index c3db4bd7ef..6c6d70caec 100644 --- a/libs/gtkmm2/gtk/gtkmm/container.cc +++ b/libs/gtkmm2/gtk/gtkmm/container.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,22 +31,74 @@ namespace { - -void container_foreach_callback(GtkWidget* widget_gobj, void* data) +static void container_foreach_callback(GtkWidget* widget_gobj, void* data) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Gtk::Container::ForeachSlot& slot = *static_cast(data); Gtk::Widget *const widget = Glib::wrap(widget_gobj); g_return_if_fail(widget != 0); slot(*widget); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED +} + + +//Copy of generated callback: +static void Container_signal_remove_callback_normal(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)) + { + #ifdef GLIBMM_EXCEPTIONS_ENABLED + try + { + #endif //GLIBMM_EXCEPTIONS_ENABLED + if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) + (*static_cast(slot))(Glib::wrap(p0) +); + #ifdef GLIBMM_EXCEPTIONS_ENABLED + } + catch(...) + { + Glib::exception_handlers_invoke(); + } + #endif //GLIBMM_EXCEPTIONS_ENABLED + } +} + +static void Container_signal_remove_callback(GtkContainer* self, GtkWidget* p0, void* data) +{ + //GTKMM_LIFECYCLE + +#ifdef GLIBMM_DEBUG_REFCOUNTING + g_warning("Container_signal_remove_callback()"); +#endif + + //Don't call wrap() on a GTK+ instance whose gtkmm instance has been deleted - just call the original C callback. + const bool gtkmm_child_already_deleted = Glib::_gobject_cppinstance_already_deleted((GObject*)p0); + + if(!gtkmm_child_already_deleted) + { + //Call the regular, generated callback: + Container_signal_remove_callback_normal(self, p0, data); + } + else + { + //Do nothing. + } } } // anonymous namespace @@ -54,7 +107,49 @@ void container_foreach_callback(GtkWidget* widget_gobj, void* data) namespace Gtk { -void Container_Class::remove_callback_custom(GtkContainer* self, GtkWidget* p0) +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +//Copy of generated callback: +void Container_Class::remove_callback_normal(GtkContainer* self, GtkWidget* p0) +{ + CppObjectType *const obj = dynamic_cast( + Glib::ObjectBase::_get_current_wrapper((GObject*)self)); + + // Non-gtkmmproc-generated custom classes implicitly call the default + // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- + // generated classes can use this optimisation, which avoids the unnecessary + // parameter conversions if there is no possibility of the virtual function + // being overridden: + if(obj && obj->is_derived_()) + { + #ifdef GLIBMM_EXCEPTIONS_ENABLED + try // Trap C++ exceptions which would normally be lost because this is a C callback. + { + #endif //GLIBMM_EXCEPTIONS_ENABLED + // Call the virtual member method, which derived classes might override. + obj->on_remove(Glib::wrap(p0) +); + #ifdef GLIBMM_EXCEPTIONS_ENABLED + } + catch(...) + { + Glib::exception_handlers_invoke(); + } + #endif //GLIBMM_EXCEPTIONS_ENABLED + } + else + { + BaseClassType *const base = static_cast( + g_type_class_peek_parent(G_OBJECT_GET_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); + } +} + +//Custom hand-coded callback: +void Container_Class::remove_callback(GtkContainer* self, GtkWidget* p0) { //GTKMM_LIFECYCLE @@ -64,12 +159,12 @@ void Container_Class::remove_callback_custom(GtkContainer* self, GtkWidget* 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); + const 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); + Container_Class::remove_callback_normal(self, p0); } else { @@ -82,6 +177,7 @@ void Container_Class::remove_callback_custom(GtkContainer* self, GtkWidget* p0) (*base->remove)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Container::foreach(const Container::ForeachSlot& slot) { @@ -142,6 +238,7 @@ void Container::remove(Widget& widget) gtk_container_remove(gobj(), widget.gobj()); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED // static void Container_Class::destroy_callback(GtkObject* self) { @@ -159,6 +256,7 @@ void Container_Class::destroy_callback(GtkObject* self) if(base->destroy) (*base->destroy)(self); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } // namespace Gtk @@ -166,7 +264,8 @@ void Container_Class::destroy_callback(GtkObject* self) namespace { -void Container_signal_add_callback(GtkContainer* self, GtkWidget* p0,void* data) + +static void Container_signal_add_callback(GtkContainer* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget* > SlotType; @@ -174,20 +273,24 @@ void Container_signal_add_callback(GtkContainer* self, GtkWidget* p0,void* data) // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Container_signal_add_info = +static const Glib::SignalProxyInfo Container_signal_add_info = { "add", (GCallback) &Container_signal_add_callback, @@ -195,28 +298,7 @@ const Glib::SignalProxyInfo Container_signal_add_info = }; -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(slot))(Glib::wrap(p0) -); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - } -} - -const Glib::SignalProxyInfo Container_signal_remove_info = +static const Glib::SignalProxyInfo Container_signal_remove_info = { "remove", (GCallback) &Container_signal_remove_callback, @@ -224,7 +306,7 @@ const Glib::SignalProxyInfo Container_signal_remove_info = }; -const Glib::SignalProxyInfo Container_signal_check_resize_info = +static const Glib::SignalProxyInfo Container_signal_check_resize_info = { "check_resize", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -232,7 +314,7 @@ const Glib::SignalProxyInfo Container_signal_check_resize_info = }; -void Container_signal_set_focus_child_callback(GtkContainer* self, GtkWidget* p0,void* data) +static void Container_signal_set_focus_child_callback(GtkContainer* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget* > SlotType; @@ -240,26 +322,31 @@ void Container_signal_set_focus_child_callback(GtkContainer* self, GtkWidget* p0 // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Container_signal_set_focus_child_info = +static 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 @@ -304,28 +391,24 @@ void Container_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED 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; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->add = &add_callback; klass->remove = &remove_callback; klass->check_resize = &check_resize_callback; klass->set_focus_child = &set_focus_child_callback; reinterpret_cast(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( g_type_class_peek_parent(klass) ); - base->remove = 0; - } - - } + #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +} +#ifdef GLIBMM_VFUNCS_ENABLED GtkType Container_Class::child_type_vfunc_callback(GtkContainer* self) { CppObjectType *const obj = dynamic_cast( @@ -338,15 +421,19 @@ GtkType Container_Class::child_type_vfunc_callback(GtkContainer* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->child_type_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -362,7 +449,6 @@ GtkType Container_Class::child_type_vfunc_callback(GtkContainer* 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( @@ -375,15 +461,19 @@ void Container_Class::forall_vfunc_callback(GtkContainer* self, gboolean include // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->forall_vfunc(include_internals, callback, callback_data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -396,7 +486,6 @@ void Container_Class::forall_vfunc_callback(GtkContainer* self, gboolean include (*base->forall)(self, include_internals, callback, callback_data); } } - gchar* Container_Class::composite_name_vfunc_callback(GtkContainer* self, GtkWidget* child) { CppObjectType *const obj = dynamic_cast( @@ -409,15 +498,19 @@ gchar* Container_Class::composite_name_vfunc_callback(GtkContainer* self, GtkWid // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->composite_name_vfunc(child); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -433,7 +526,6 @@ gchar* Container_Class::composite_name_vfunc_callback(GtkContainer* self, GtkWid 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( @@ -446,15 +538,19 @@ void Container_Class::set_child_property_vfunc_callback(GtkContainer* self, GtkW // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_child_property_vfunc(child, property_id, value, pspec); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -467,7 +563,6 @@ void Container_Class::set_child_property_vfunc_callback(GtkContainer* self, GtkW (*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( @@ -480,15 +575,19 @@ void Container_Class::get_child_property_vfunc_callback(GtkContainer* self, GtkW // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->get_child_property_vfunc(child, property_id, value, pspec); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -501,8 +600,9 @@ void Container_Class::get_child_property_vfunc_callback(GtkContainer* self, GtkW (*base->get_child_property)(self, child, property_id, value, pspec); } } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Container_Class::add_callback(GtkContainer* self, GtkWidget* p0) { CppObjectType *const obj = dynamic_cast( @@ -515,16 +615,20 @@ void Container_Class::add_callback(GtkContainer* self, GtkWidget* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_add(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -537,42 +641,6 @@ void Container_Class::add_callback(GtkContainer* self, GtkWidget* p0) (*base->add)(self, p0); } } - -void Container_Class::remove_callback(GtkContainer* self, GtkWidget* p0) -{ - CppObjectType *const obj = dynamic_cast( - Glib::ObjectBase::_get_current_wrapper((GObject*)self)); - - // Non-gtkmmproc-generated custom classes implicitly call the default - // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- - // generated classes can use this optimisation, which avoids the unnecessary - // parameter conversions if there is no possibility of the virtual function - // being overridden: - if(obj && obj->is_derived_()) - { - try // Trap 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( - g_type_class_peek_parent(G_OBJECT_GET_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( @@ -585,15 +653,19 @@ void Container_Class::check_resize_callback(GtkContainer* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_check_resize(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -606,7 +678,6 @@ void Container_Class::check_resize_callback(GtkContainer* self) (*base->check_resize)(self); } } - void Container_Class::set_focus_child_callback(GtkContainer* self, GtkWidget* p0) { CppObjectType *const obj = dynamic_cast( @@ -619,16 +690,20 @@ void Container_Class::set_focus_child_callback(GtkContainer* self, GtkWidget* p0 // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_set_focus_child(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -641,6 +716,7 @@ void Container_Class::set_focus_child_callback(GtkContainer* self, GtkWidget* p0 (*base->set_focus_child)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Container_Class::wrap_new(GObject* o) @@ -684,7 +760,7 @@ GType Container::get_base_type() void Container::set_border_width(guint border_width) { - gtk_container_set_border_width(gobj(), border_width); +gtk_container_set_border_width(gobj(), border_width); } guint Container::get_border_width() const @@ -694,7 +770,7 @@ guint Container::get_border_width() const void Container::set_resize_mode(ResizeMode resize_mode) { - gtk_container_set_resize_mode(gobj(), ((GtkResizeMode)(resize_mode))); +gtk_container_set_resize_mode(gobj(), ((GtkResizeMode)(resize_mode))); } ResizeMode Container::get_resize_mode() const @@ -704,7 +780,7 @@ ResizeMode Container::get_resize_mode() const void Container::check_resize() { - gtk_container_check_resize(gobj()); +gtk_container_check_resize(gobj()); } Glib::ListHandle Container::get_children() @@ -719,32 +795,32 @@ Glib::ListHandle Container::get_children() const void Container::propagate_expose(Widget& child, GdkEventExpose* event) { - gtk_container_propagate_expose(gobj(), (child).gobj(), event); +gtk_container_propagate_expose(gobj(), (child).gobj(), event); } void Container::set_focus_chain(const Glib::ListHandle& focusable_widgets) { - gtk_container_set_focus_chain(gobj(), focusable_widgets.data()); +gtk_container_set_focus_chain(gobj(), focusable_widgets.data()); } void Container::unset_focus_chain() { - gtk_container_unset_focus_chain(gobj()); +gtk_container_unset_focus_chain(gobj()); } void Container::set_reallocate_redraws(bool needs_redraws) { - gtk_container_set_reallocate_redraws(gobj(), static_cast(needs_redraws)); +gtk_container_set_reallocate_redraws(gobj(), static_cast(needs_redraws)); } void Container::set_focus_child(Widget& widget) { - gtk_container_set_focus_child(gobj(), (widget).gobj()); +gtk_container_set_focus_child(gobj(), (widget).gobj()); } void Container::set_focus_vadjustment(Adjustment& adjustment) { - gtk_container_set_focus_vadjustment(gobj(), (adjustment).gobj()); +gtk_container_set_focus_vadjustment(gobj(), (adjustment).gobj()); } Adjustment* Container::get_focus_vadjustment() @@ -754,12 +830,12 @@ Adjustment* Container::get_focus_vadjustment() const Adjustment* Container::get_focus_vadjustment() const { - return Glib::wrap(gtk_container_get_focus_vadjustment(const_cast(gobj()))); + return const_cast(this)->get_focus_vadjustment(); } void Container::set_focus_hadjustment(Adjustment& adjustment) { - gtk_container_set_focus_hadjustment(gobj(), (adjustment).gobj()); +gtk_container_set_focus_hadjustment(gobj(), (adjustment).gobj()); } Adjustment* Container::get_focus_hadjustment() @@ -769,12 +845,12 @@ Adjustment* Container::get_focus_hadjustment() const Adjustment* Container::get_focus_hadjustment() const { - return Glib::wrap(gtk_container_get_focus_hadjustment(const_cast(gobj()))); + return const_cast(this)->get_focus_hadjustment(); } void Container::resize_children() { - gtk_container_resize_children(gobj()); +gtk_container_resize_children(gobj()); } GType Container::child_type() const @@ -795,53 +871,62 @@ 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Container::property_border_width() { return Glib::PropertyProxy(this, "border-width"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Container::property_border_width() const { return Glib::PropertyProxy_ReadOnly(this, "border-width"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Container::property_resize_mode() { return Glib::PropertyProxy(this, "resize-mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Container::property_resize_mode() const { return Glib::PropertyProxy_ReadOnly(this, "resize-mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_WriteOnly Container::property_child() { return Glib::PropertyProxy_WriteOnly(this, "child"); } - -Glib::PropertyProxy_ReadOnly Container::property_child() const -{ - return Glib::PropertyProxy_ReadOnly(this, "child"); -} +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Container::on_add(Widget* widget) { BaseClassType *const base = static_cast( @@ -851,7 +936,6 @@ void Gtk::Container::on_add(Widget* widget) if(base && base->add) (*base->add)(gobj(),(GtkWidget*)Glib::unwrap(widget)); } - void Gtk::Container::on_remove(Widget* widget) { BaseClassType *const base = static_cast( @@ -861,7 +945,6 @@ void Gtk::Container::on_remove(Widget* widget) if(base && base->remove) (*base->remove)(gobj(),(GtkWidget*)Glib::unwrap(widget)); } - void Gtk::Container::on_check_resize() { BaseClassType *const base = static_cast( @@ -871,7 +954,6 @@ void Gtk::Container::on_check_resize() if(base && base->check_resize) (*base->check_resize)(gobj()); } - void Gtk::Container::on_set_focus_child(Widget* widget) { BaseClassType *const base = static_cast( @@ -881,8 +963,9 @@ void Gtk::Container::on_set_focus_child(Widget* widget) if(base && base->set_focus_child) (*base->set_focus_child)(gobj(),(GtkWidget*)Glib::unwrap(widget)); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED GtkType Gtk::Container::child_type_vfunc() const { BaseClassType *const base = static_cast( @@ -895,7 +978,6 @@ GtkType Gtk::Container::child_type_vfunc() const typedef GtkType RType; return RType(); } - void Gtk::Container::forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data) { BaseClassType *const base = static_cast( @@ -905,7 +987,6 @@ void Gtk::Container::forall_vfunc(gboolean include_internals, GtkCallback callba 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( @@ -918,7 +999,6 @@ char* Gtk::Container::composite_name_vfunc(GtkWidget* 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( @@ -928,7 +1008,6 @@ void Gtk::Container::set_child_property_vfunc(GtkWidget* child, guint property_i 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( @@ -938,6 +1017,7 @@ void Gtk::Container::get_child_property_vfunc(GtkWidget* child, guint property_i if(base && base->get_child_property) (*base->get_child_property)(const_cast(gobj()),child,property_id,value,pspec); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/container.h b/libs/gtkmm2/gtk/gtkmm/container.h index a555229bbf..a3b04aaa08 100644 --- a/libs/gtkmm2/gtk/gtkmm/container.h +++ b/libs/gtkmm2/gtk/gtkmm/container.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CONTAINER_H #define _GTKMM_CONTAINER_H + #include /* $Id$ */ @@ -109,15 +110,21 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -154,14 +161,9 @@ public: /** 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. + * If @a widget is managed with Gtk::manage(), and you don't want to use @a widget + * again then you should delete @a widget , because there will no longer be any parent + * container to delete it automatically. * @param widget A current child of @a container . */ @@ -211,13 +213,13 @@ public: //_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 + /** Returns 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 get_children(); - /** Returns the the container's non-internal children. See + /** Returns 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. */ @@ -355,15 +357,38 @@ public: // Ignore functions such as gtk_container_class_install_child_property(), which I think are for themes, like the GtkWidget style properties. +/** + * @par Prototype: + * void %add(Widget* widget) + */ + Glib::SignalProxy1< void,Widget* > signal_add(); + + //We use the optional custom_c_callback parameter with _WRAP_SIGNAL() here, + //so that we can write special code to check for deleted child widget parameters: +/** + * @par Prototype: + * void %remove(Widget* widget) + */ + Glib::SignalProxy1< void,Widget* > signal_remove(); - + +/** + * @par Prototype: + * void %check_resize() + */ + Glib::SignalProxy0< void > signal_check_resize(); +/** + * @par Prototype: + * void %set_focus_child(Widget* widget) + */ + Glib::SignalProxy1< void,Widget* > signal_set_focus_child(); @@ -372,21 +397,39 @@ public: 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; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual GtkType child_type_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED - /** The width of the empty border outside the containers children. + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data); +#endif //GLIBMM_VFUNCS_ENABLED + + //TODO: What is this? + #ifdef GLIBMM_VFUNCS_ENABLED + virtual char* composite_name_vfunc(GtkWidget* child); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_child_property_vfunc(GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void get_child_property_vfunc(GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec) const; +#endif //GLIBMM_VFUNCS_ENABLED + + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_border_width() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -394,15 +437,19 @@ protected: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_border_width() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Specify how resize events are handled. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_resize_mode() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Specify how resize events are handled. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -410,22 +457,17 @@ protected: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_resize_mode() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** 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 property_child() ; - + #ifdef GLIBMM_PROPERTIES_ENABLED /** 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 property_child() const; + Glib::PropertyProxy_WriteOnly property_child() ; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -441,6 +483,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Container* wrap(GtkContainer* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CONTAINER_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/curve.cc b/libs/gtkmm2/gtk/gtkmm/curve.cc index ed6b949ea3..9cd9cc345e 100644 --- a/libs/gtkmm2/gtk/gtkmm/curve.cc +++ b/libs/gtkmm2/gtk/gtkmm/curve.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -50,13 +51,15 @@ void Curve::set_vector(const Glib::ArrayHandle& array) namespace { -const Glib::SignalProxyInfo Curve_signal_curve_type_changed_info = + +static 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 @@ -101,10 +104,18 @@ void Curve_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->curve_type_changed = &curve_type_changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Curve_Class::curve_type_changed_callback(GtkCurve* self) { CppObjectType *const obj = dynamic_cast( @@ -117,15 +128,19 @@ void Curve_Class::curve_type_changed_callback(GtkCurve* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_curve_type_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -138,6 +153,7 @@ void Curve_Class::curve_type_changed_callback(GtkCurve* self) (*base->curve_type_changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Curve_Class::wrap_new(GObject* o) @@ -188,27 +204,27 @@ Curve::Curve() void Curve::reset() { - gtk_curve_reset(gobj()); +gtk_curve_reset(gobj()); } void Curve::set_gamma(float gamma) { - gtk_curve_set_gamma(gobj(), 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); +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(gobj()), veclen, data); +gtk_curve_get_vector(const_cast(gobj()), veclen, data); } void Curve::set_curve_type(CurveType type) { - gtk_curve_set_curve_type(gobj(), ((GtkCurveType)(type))); +gtk_curve_set_curve_type(gobj(), ((GtkCurveType)(type))); } @@ -218,57 +234,78 @@ Glib::SignalProxy0< void > Curve::signal_curve_type_changed() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Curve::property_curve_type() { return Glib::PropertyProxy(this, "curve-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Curve::property_curve_type() const { return Glib::PropertyProxy_ReadOnly(this, "curve-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Curve::property_min_x() { return Glib::PropertyProxy(this, "min-x"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Curve::property_min_x() const { return Glib::PropertyProxy_ReadOnly(this, "min-x"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Curve::property_max_x() { return Glib::PropertyProxy(this, "max-x"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Curve::property_max_x() const { return Glib::PropertyProxy_ReadOnly(this, "max-x"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Curve::property_min_y() { return Glib::PropertyProxy(this, "min-y"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Curve::property_min_y() const { return Glib::PropertyProxy_ReadOnly(this, "min-y"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Curve::property_max_y() { return Glib::PropertyProxy(this, "max-y"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Curve::property_max_y() const { return Glib::PropertyProxy_ReadOnly(this, "max-y"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Curve::on_curve_type_changed() { BaseClassType *const base = static_cast( @@ -278,6 +315,10 @@ void Gtk::Curve::on_curve_type_changed() if(base && base->curve_type_changed) (*base->curve_type_changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -324,8 +365,19 @@ void GammaCurve_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* GammaCurve_Class::wrap_new(GObject* o) { @@ -373,6 +425,13 @@ GammaCurve::GammaCurve() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/curve.h b/libs/gtkmm2/gtk/gtkmm/curve.h index eaddc1116b..9ccfcc7e90 100644 --- a/libs/gtkmm2/gtk/gtkmm/curve.h +++ b/libs/gtkmm2/gtk/gtkmm/curve.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_CURVE_H #define _GTKMM_CURVE_H + #include /* $Id$ */ @@ -98,12 +99,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_curve_type_changed(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -129,17 +136,25 @@ public: void set_curve_type(CurveType type); +/** + * @par Prototype: + * void %curve_type_changed() + */ + Glib::SignalProxy0< void > signal_curve_type_changed(); - /** Is this curve linear + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_curve_type() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Is this curve linear * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -147,15 +162,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_curve_type() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Minimum possible value for X. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_min_x() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Minimum possible value for X. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -163,15 +182,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_min_x() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Maximum possible X value. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_max_x() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Maximum possible X value. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -179,15 +202,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_max_x() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Minimum possible value for Y. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_min_y() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Minimum possible value for Y. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -195,15 +222,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_min_y() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Maximum possible value for Y. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_max_y() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Maximum possible value for Y. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -211,6 +242,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_max_y() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -263,11 +295,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -289,7 +327,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Curve* wrap(GtkCurve* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::GammaCurve @@ -298,6 +338,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::GammaCurve* wrap(GtkGammaCurve* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_CURVE_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/dialog.cc b/libs/gtkmm2/gtk/gtkmm/dialog.cc index b55b84f645..803a6b149d 100644 --- a/libs/gtkmm2/gtk/gtkmm/dialog.cc +++ b/libs/gtkmm2/gtk/gtkmm/dialog.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -63,7 +64,8 @@ void Dialog::set_alternative_button_order_from_array(const Glib::ArrayHandle SlotType; @@ -71,26 +73,31 @@ void Dialog_signal_response_callback(GtkDialog* self, gint p0,void* data) // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Dialog_signal_response_info = +static const Glib::SignalProxyInfo Dialog_signal_response_info = { "response", (GCallback) &Dialog_signal_response_callback, (GCallback) &Dialog_signal_response_callback }; + } // anonymous namespace // static @@ -141,10 +148,18 @@ void Dialog_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->response = &response_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Dialog_Class::response_callback(GtkDialog* self, gint p0) { CppObjectType *const obj = dynamic_cast( @@ -157,16 +172,20 @@ void Dialog_Class::response_callback(GtkDialog* self, gint p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_response(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -179,6 +198,7 @@ void Dialog_Class::response_callback(GtkDialog* self, gint p0) (*base->response)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Dialog_Class::wrap_new(GObject* o) @@ -229,7 +249,7 @@ Dialog::Dialog() void Dialog::add_action_widget(Widget& child, int response_id) { - gtk_dialog_add_action_widget(gobj(), (child).gobj(), response_id); +gtk_dialog_add_action_widget(gobj(), (child).gobj(), response_id); } Button* Dialog::add_button(const Glib::ustring& button_text, int response_id) @@ -244,17 +264,22 @@ Button* Dialog::add_button(const Gtk::StockID& stock_id, int response_id) void Dialog::set_response_sensitive(int response_id, bool setting) { - gtk_dialog_set_response_sensitive(gobj(), response_id, static_cast(setting)); +gtk_dialog_set_response_sensitive(gobj(), response_id, static_cast(setting)); } void Dialog::set_default_response(int response_id) { - gtk_dialog_set_default_response(gobj(), response_id); +gtk_dialog_set_default_response(gobj(), response_id); +} + +int Dialog::get_response_for_widget(const Gtk::Widget& widget) const +{ + return gtk_dialog_get_response_for_widget(const_cast(gobj()), const_cast(widget.gobj())); } void Dialog::set_has_separator(bool setting) { - gtk_dialog_set_has_separator(gobj(), static_cast(setting)); +gtk_dialog_set_has_separator(gobj(), static_cast(setting)); } bool Dialog::get_has_separator() const @@ -267,9 +292,10 @@ bool Dialog::alternative_button_order(const Glib::RefPtr& scr return gtk_alternative_dialog_button_order(const_cast(Glib::unwrap(screen))); } + void Dialog::response(int response_id) { - gtk_dialog_response(gobj(), response_id); +gtk_dialog_response(gobj(), response_id); } int Dialog::run() @@ -277,7 +303,7 @@ int Dialog::run() return gtk_dialog_run(gobj()); } -VBox* Dialog::get_vbox() + VBox* Dialog::get_vbox() { return Glib::wrap((GtkVBox*)(gobj()->vbox)); } @@ -286,8 +312,8 @@ const VBox* Dialog::get_vbox() const { return Glib::wrap((GtkVBox*)(gobj()->vbox)); } - -HButtonBox* Dialog::get_action_area() + + HButtonBox* Dialog::get_action_area() { return Glib::wrap((GtkHButtonBox*)(gobj()->action_area)); } @@ -296,7 +322,7 @@ const HButtonBox* Dialog::get_action_area() const { return Glib::wrap((GtkHButtonBox*)(gobj()->action_area)); } - + Glib::SignalProxy1< void,int > Dialog::signal_response() { @@ -304,17 +330,22 @@ Glib::SignalProxy1< void,int > Dialog::signal_response() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Dialog::property_has_separator() { return Glib::PropertyProxy(this, "has-separator"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Dialog::property_has_separator() const { return Glib::PropertyProxy_ReadOnly(this, "has-separator"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Dialog::on_response(int response_id) { BaseClassType *const base = static_cast( @@ -324,6 +355,10 @@ void Gtk::Dialog::on_response(int response_id) if(base && base->response) (*base->response)(gobj(),response_id); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/dialog.h b/libs/gtkmm2/gtk/gtkmm/dialog.h index 2b4ae3f461..d019795eb6 100644 --- a/libs/gtkmm2/gtk/gtkmm/dialog.h +++ b/libs/gtkmm2/gtk/gtkmm/dialog.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_DIALOG_H #define _GTKMM_DIALOG_H + #include /* $Id$ */ @@ -162,12 +163,18 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_response(int response_id); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -227,6 +234,16 @@ public: */ void set_default_response(int response_id); + /** Gets the response id of a widget in the action area + * of a dialog. + * @param widget A widget in the action area of @a dialog . + * @return The response id of @a widget , or Gtk::RESPONSE_NONE + * if @a widget doesn't have a response id set. + * + * @newin2p8. + */ + int get_response_for_widget(const Gtk::Widget& widget) const; + /** Sets whether the dialog has a separator above the buttons. * true by default. * @param setting true to have a separator. @@ -237,7 +254,7 @@ public: * @return true if the dialog has a separator. */ bool get_has_separator() const; - + /** Returns true if dialogs are expected to use an alternative * button order on the screen @a screen . See @@ -251,11 +268,27 @@ public: * @param screen A Gdk::Screen, or 0 to use the default screen. * @return Whether the alternative button order should be used * - * Since: 2.6. + * @newin2p6. */ static bool alternative_button_order(const Glib::RefPtr& screen); - - //TODO: Document this: + + /** Sets an alternative button order. If the gtk-alternative-button-order + * setting is set to true, the dialog buttons are reordered according to + * the order of the response ids in @a new_order. + * + * By default, GTK+ dialogs use the button order advocated by the Gnome + * Human + * Interface Guidelines with the affirmative button at the far + * right, and the cancel button left of it. But the builtin GTK+ dialogs + * and #GtkMessageDialogs do provide an alternative button order, + * which is more suitable on some platforms, e.g. Windows. + * + * Use this function after adding all the buttons to your dialog + * + * @param new_order an array of response ids of the dialog's buttons. + * + * @newinp26 + */ void set_alternative_button_order_from_array(const Glib::ArrayHandle& new_order); @@ -299,19 +332,22 @@ public: */ int run(); - VBox* get_vbox(); + VBox* get_vbox(); const VBox* get_vbox() const; - HButtonBox* get_action_area(); + HButtonBox* get_action_area(); const HButtonBox* get_action_area() const; - - /** The dialog has a separator bar above its buttons. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_has_separator() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -319,8 +355,14 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_has_separator() const; +#endif //#GLIBMM_PROPERTIES_ENABLED +/** + * @par Prototype: + * void %response(int response_id) + */ + Glib::SignalProxy1< void,int > signal_response(); @@ -341,6 +383,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Dialog* wrap(GtkDialog* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_DIALOG_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/drawingarea.cc b/libs/gtkmm2/gtk/gtkmm/drawingarea.cc index 53c90ec888..20796b368c 100644 --- a/libs/gtkmm2/gtk/gtkmm/drawingarea.cc +++ b/libs/gtkmm2/gtk/gtkmm/drawingarea.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -74,8 +75,19 @@ void DrawingArea_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* DrawingArea_Class::wrap_new(GObject* o) { @@ -124,6 +136,13 @@ DrawingArea::DrawingArea() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/drawingarea.h b/libs/gtkmm2/gtk/gtkmm/drawingarea.h index 3d3774deb6..0d0529c3a3 100644 --- a/libs/gtkmm2/gtk/gtkmm/drawingarea.h +++ b/libs/gtkmm2/gtk/gtkmm/drawingarea.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_DRAWINGAREA_H #define _GTKMM_DRAWINGAREA_H + #include /* $Id$ */ @@ -88,11 +89,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -115,6 +122,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::DrawingArea* wrap(GtkDrawingArea* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_DRAWINGAREA_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/editable.cc b/libs/gtkmm2/gtk/gtkmm/editable.cc index 9109009a2f..4f02024475 100644 --- a/libs/gtkmm2/gtk/gtkmm/editable.cc +++ b/libs/gtkmm2/gtk/gtkmm/editable.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -29,7 +30,8 @@ namespace { -void Editable_signal_insert_text_callback(GtkEditable* self, const gchar* text,gint length,gint* position,void* data) + +static 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; @@ -37,19 +39,23 @@ void Editable_signal_insert_text_callback(GtkEditable* self, const gchar* text,g // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))( Glib::ustring(text, text + length), position); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Editable_signal_insert_text_info = +static const Glib::SignalProxyInfo Editable_signal_insert_text_info = { "insert_text", (GCallback) &Editable_signal_insert_text_callback, @@ -57,7 +63,7 @@ const Glib::SignalProxyInfo Editable_signal_insert_text_info = }; -void Editable_signal_delete_text_callback(GtkEditable* self, gint start_pos,gint end_pos,void* data) +static 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; @@ -65,21 +71,25 @@ void Editable_signal_delete_text_callback(GtkEditable* self, gint start_pos,gint // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Editable_signal_delete_text_info = +static const Glib::SignalProxyInfo Editable_signal_delete_text_info = { "delete_text", (GCallback) &Editable_signal_delete_text_callback, @@ -87,13 +97,14 @@ const Glib::SignalProxyInfo Editable_signal_delete_text_info = }; -const Glib::SignalProxyInfo Editable_signal_changed_info = +static const Glib::SignalProxyInfo Editable_signal_changed_info = { "changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -138,6 +149,7 @@ void Editable_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED 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; @@ -145,11 +157,16 @@ void Editable_Class::iface_init_function(void* g_iface, void*) klass->get_selection_bounds = &get_selection_bounds_vfunc_callback; klass->set_position = &set_position_vfunc_callback; klass->get_position = &get_position_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->insert_text = &insert_text_callback; klass->delete_text = &delete_text_callback; klass->changed = &changed_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void Editable_Class::do_insert_text_vfunc_callback(GtkEditable* self, const gchar* text, gint length, gint* position) { CppObjectType *const obj = dynamic_cast( @@ -162,15 +179,19 @@ void Editable_Class::do_insert_text_vfunc_callback(GtkEditable* self, const gcha // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->insert_text_vfunc( Glib::ustring(text, text + length), *position); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -184,7 +205,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -197,17 +217,21 @@ void Editable_Class::do_delete_text_vfunc_callback(GtkEditable* self, gint start // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->delete_text_vfunc(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -221,7 +245,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -234,17 +257,21 @@ gchar* Editable_Class::get_chars_vfunc_callback(GtkEditable* self, gint start_po // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return g_strdup((obj->get_chars_vfunc(start_pos , end_pos )).c_str()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -261,7 +288,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge 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( @@ -274,17 +300,21 @@ void Editable_Class::set_selection_bounds_vfunc_callback(GtkEditable* self, gint // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->select_region_vfunc(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -298,7 +328,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -311,17 +340,21 @@ gboolean Editable_Class::get_selection_bounds_vfunc_callback(GtkEditable* self, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return static_cast(obj->get_selection_bounds_vfunc(*(start_pos) , *(end_pos) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -338,7 +371,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gboolean RType; return RType(); } - void Editable_Class::set_position_vfunc_callback(GtkEditable* self, gint position) { CppObjectType *const obj = dynamic_cast( @@ -351,16 +383,20 @@ void Editable_Class::set_position_vfunc_callback(GtkEditable* self, gint positio // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->set_position_vfunc(position ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -374,7 +410,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->set_position)(self, position); } } - gint Editable_Class::get_position_vfunc_callback(GtkEditable* self) { CppObjectType *const obj = dynamic_cast( @@ -387,15 +422,19 @@ gint Editable_Class::get_position_vfunc_callback(GtkEditable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. return obj->get_position_vfunc(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -412,8 +451,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge typedef gint RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Editable_Class::insert_text_callback(GtkEditable* self, const gchar* text, gint length, gint* position) { CppObjectType *const obj = dynamic_cast( @@ -426,15 +466,19 @@ void Editable_Class::insert_text_callback(GtkEditable* self, const gchar* text, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_insert_text( Glib::ustring(text, text + length), position); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -448,7 +492,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*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( @@ -461,17 +504,21 @@ void Editable_Class::delete_text_callback(GtkEditable* self, gint start_pos, gin // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_delete_text(start_pos , end_pos ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -485,7 +532,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->delete_text)(self, start_pos, end_pos); } } - void Editable_Class::changed_callback(GtkEditable* self) { CppObjectType *const obj = dynamic_cast( @@ -498,15 +544,19 @@ void Editable_Class::changed_callback(GtkEditable* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_changed(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -520,6 +570,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge (*base->changed)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Editable_Class::wrap_new(GObject* object) @@ -564,27 +615,27 @@ GType Editable::get_base_type() void Editable::cut_clipboard() { - gtk_editable_cut_clipboard(gobj()); +gtk_editable_cut_clipboard(gobj()); } void Editable::copy_clipboard() { - gtk_editable_copy_clipboard(gobj()); +gtk_editable_copy_clipboard(gobj()); } void Editable::paste_clipboard() { - gtk_editable_paste_clipboard(gobj()); +gtk_editable_paste_clipboard(gobj()); } void Editable::delete_selection() { - gtk_editable_delete_selection(gobj()); +gtk_editable_delete_selection(gobj()); } void Editable::set_editable(bool is_editable) { - gtk_editable_set_editable(gobj(), static_cast(is_editable)); +gtk_editable_set_editable(gobj(), static_cast(is_editable)); } bool Editable::get_editable() const @@ -594,12 +645,12 @@ bool Editable::get_editable() const void Editable::insert_text(const Glib::ustring& text, int length, int& position) { - gtk_editable_insert_text(gobj(), text.c_str(), length, &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); +gtk_editable_delete_text(gobj(), start_pos, end_pos); } Glib::ustring Editable::get_chars(int start_pos, int end_pos) const @@ -609,7 +660,7 @@ Glib::ustring Editable::get_chars(int start_pos, int end_pos) const void Editable::select_region(int start_pos, int end_pos) { - gtk_editable_select_region(gobj(), start_pos, end_pos); +gtk_editable_select_region(gobj(), start_pos, end_pos); } bool Editable::get_selection_bounds(int& start_pos, int& end_pos) const @@ -619,7 +670,7 @@ bool Editable::get_selection_bounds(int& start_pos, int& end_pos) const void Editable::set_position(int position) { - gtk_editable_set_position(gobj(), position); +gtk_editable_set_position(gobj(), position); } int Editable::get_position() const @@ -633,17 +684,20 @@ Glib::SignalProxy2< void,const Glib::ustring&,int* > Editable::signal_insert_tex 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); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Editable::on_insert_text(const Glib::ustring& text, int* position) { BaseClassType *const base = static_cast( @@ -654,7 +708,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -665,7 +718,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->delete_text) (*base->delete_text)(gobj(),start_pos,end_pos); } - void Gtk::Editable::on_changed() { BaseClassType *const base = static_cast( @@ -676,8 +728,9 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->changed) (*base->changed)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - +#ifdef GLIBMM_VFUNCS_ENABLED void Gtk::Editable::insert_text_vfunc(const Glib::ustring& text, int& position) { BaseClassType *const base = static_cast( @@ -688,7 +741,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -699,7 +751,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -713,7 +764,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef Glib::ustring RType; return RType(); } - void Gtk::Editable::select_region_vfunc(int start_pos, int end_pos) { BaseClassType *const base = static_cast( @@ -724,7 +774,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / 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( @@ -738,7 +787,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef bool RType; return RType(); } - void Gtk::Editable::set_position_vfunc(int position) { BaseClassType *const base = static_cast( @@ -749,7 +797,6 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / if(base && base->set_position) (*base->set_position)(gobj(),position); } - int Gtk::Editable::get_position_vfunc() const { BaseClassType *const base = static_cast( @@ -763,6 +810,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / typedef int RType; return RType(); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/editable.h b/libs/gtkmm2/gtk/gtkmm/editable.h index 89832dcba7..edc79ed88b 100644 --- a/libs/gtkmm2/gtk/gtkmm/editable.h +++ b/libs/gtkmm2/gtk/gtkmm/editable.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_EDITABLE_H #define _GTKMM_EDITABLE_H + #include /* $Id$ */ @@ -134,40 +135,72 @@ public: Glib::SignalProxy2< void,const Glib::ustring&,int* > signal_insert_text(); +/** + * @par Prototype: + * void %delete_text(int start_pos, int end_pos) + */ + Glib::SignalProxy2< void,int,int > signal_delete_text(); +/** + * @par Prototype: + * void %changed() + */ + Glib::SignalProxy0< void > signal_changed(); protected: - virtual void delete_text_vfunc(int start_pos, int end_pos); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void delete_text_vfunc(int start_pos, int end_pos); +#endif //GLIBMM_VFUNCS_ENABLED - virtual Glib::ustring get_chars_vfunc(int start_pos, int end_pos) const; + #ifdef GLIBMM_VFUNCS_ENABLED + virtual Glib::ustring get_chars_vfunc(int start_pos, int end_pos) const; +#endif //GLIBMM_VFUNCS_ENABLED - 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; + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void select_region_vfunc(int start_pos, int end_pos); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual bool get_selection_bounds_vfunc(int& start_pos, int& end_pos) const; +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void set_position_vfunc(int position); +#endif //GLIBMM_VFUNCS_ENABLED + + #ifdef GLIBMM_VFUNCS_ENABLED + virtual int get_position_vfunc() const; +#endif //GLIBMM_VFUNCS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED virtual void insert_text_vfunc(const Glib::ustring& text, int& position); - +#endif //GLIBMM_VFUNCS_ENABLED + //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 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(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -186,5 +219,6 @@ namespace Glib } // namespace Glib + #endif /* _GTKMM_EDITABLE_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/entry.cc b/libs/gtkmm2/gtk/gtkmm/entry.cc index 6b08e95c3b..9c10aecef8 100644 --- a/libs/gtkmm2/gtk/gtkmm/entry.cc +++ b/libs/gtkmm2/gtk/gtkmm/entry.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -31,7 +32,8 @@ namespace { -void Entry_signal_populate_popup_callback(GtkEntry* self, GtkMenu* p0,void* data) + +static void Entry_signal_populate_popup_callback(GtkEntry* self, GtkMenu* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Menu* > SlotType; @@ -39,20 +41,24 @@ void Entry_signal_populate_popup_callback(GtkEntry* self, GtkMenu* p0,void* data // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Entry_signal_populate_popup_info = +static const Glib::SignalProxyInfo Entry_signal_populate_popup_info = { "populate_popup", (GCallback) &Entry_signal_populate_popup_callback, @@ -60,7 +66,7 @@ const Glib::SignalProxyInfo Entry_signal_populate_popup_info = }; -void Entry_signal_insert_at_cursor_callback(GtkEntry* self, const gchar* p0,void* data) +static 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; @@ -68,20 +74,24 @@ void Entry_signal_insert_at_cursor_callback(GtkEntry* self, const gchar* p0,void // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo Entry_signal_insert_at_cursor_info = +static const Glib::SignalProxyInfo Entry_signal_insert_at_cursor_info = { "insert_at_cursor", (GCallback) &Entry_signal_insert_at_cursor_callback, @@ -89,13 +99,14 @@ const Glib::SignalProxyInfo Entry_signal_insert_at_cursor_info = }; -const Glib::SignalProxyInfo Entry_signal_activate_info = +static const Glib::SignalProxyInfo Entry_signal_activate_info = { "activate", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -142,12 +153,20 @@ void Entry_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->populate_popup = &populate_popup_callback; klass->insert_at_cursor = &insert_at_cursor_callback; klass->activate = &activate_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Entry_Class::populate_popup_callback(GtkEntry* self, GtkMenu* p0) { CppObjectType *const obj = dynamic_cast( @@ -160,16 +179,20 @@ void Entry_Class::populate_popup_callback(GtkEntry* self, GtkMenu* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_populate_popup(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -182,7 +205,6 @@ void Entry_Class::populate_popup_callback(GtkEntry* self, GtkMenu* p0) (*base->populate_popup)(self, p0); } } - void Entry_Class::insert_at_cursor_callback(GtkEntry* self, const gchar* p0) { CppObjectType *const obj = dynamic_cast( @@ -195,16 +217,20 @@ void Entry_Class::insert_at_cursor_callback(GtkEntry* self, const gchar* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_insert_at_cursor(Glib::convert_const_gchar_ptr_to_ustring(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -217,7 +243,6 @@ void Entry_Class::insert_at_cursor_callback(GtkEntry* self, const gchar* p0) (*base->insert_at_cursor)(self, p0); } } - void Entry_Class::activate_callback(GtkEntry* self) { CppObjectType *const obj = dynamic_cast( @@ -230,15 +255,19 @@ void Entry_Class::activate_callback(GtkEntry* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_activate(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -251,6 +280,7 @@ void Entry_Class::activate_callback(GtkEntry* self) (*base->activate)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Entry_Class::wrap_new(GObject* o) @@ -301,7 +331,7 @@ Entry::Entry() void Entry::set_visibility(bool visible) { - gtk_entry_set_visibility(gobj(), static_cast(visible)); +gtk_entry_set_visibility(gobj(), static_cast(visible)); } bool Entry::get_visibility() const @@ -311,7 +341,7 @@ bool Entry::get_visibility() const void Entry::set_invisible_char(gunichar ch) { - gtk_entry_set_invisible_char(gobj(), ch); +gtk_entry_set_invisible_char(gobj(), ch); } gunichar Entry::get_invisible_char() const @@ -321,7 +351,7 @@ gunichar Entry::get_invisible_char() const void Entry::set_has_frame(bool setting) { - gtk_entry_set_has_frame(gobj(), static_cast(setting)); +gtk_entry_set_has_frame(gobj(), static_cast(setting)); } bool Entry::get_has_frame() const @@ -329,9 +359,19 @@ bool Entry::get_has_frame() const return gtk_entry_get_has_frame(const_cast(gobj())); } +void Entry::set_inner_border(const Border& border) +{ +gtk_entry_set_inner_border(gobj(), &(border)); +} + +Border Entry::get_inner_border() const +{ + return *(gtk_entry_get_inner_border(const_cast(gobj()))); +} + void Entry::set_max_length(int max) { - gtk_entry_set_max_length(gobj(), max); +gtk_entry_set_max_length(gobj(), max); } int Entry::get_max_length() const @@ -341,7 +381,7 @@ int Entry::get_max_length() const void Entry::set_activates_default(bool setting) { - gtk_entry_set_activates_default(gobj(), static_cast(setting)); +gtk_entry_set_activates_default(gobj(), static_cast(setting)); } gboolean Entry::get_activates_default() const @@ -351,7 +391,7 @@ gboolean Entry::get_activates_default() const void Entry::set_width_chars(int n_chars) { - gtk_entry_set_width_chars(gobj(), n_chars); +gtk_entry_set_width_chars(gobj(), n_chars); } int Entry::get_width_chars() const @@ -361,7 +401,7 @@ int Entry::get_width_chars() const void Entry::set_text(const Glib::ustring & text) { - gtk_entry_set_text(gobj(), text.c_str()); +gtk_entry_set_text(gobj(), text.c_str()); } Glib::ustring Entry::get_text() const @@ -373,25 +413,20 @@ Glib::RefPtr Entry::get_layout() { Glib::RefPtr 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 Entry::get_layout() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_entry_get_layout(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_layout(); } void Entry::get_layout_offsets(int& x, int& y) { - gtk_entry_get_layout_offsets(gobj(), &x, &y); +gtk_entry_get_layout_offsets(gobj(), &x, &y); } int Entry::layout_index_to_text_index(int layout_index) const @@ -406,12 +441,12 @@ int Entry::text_index_to_layout_index(int text_index) const void Entry::set_alignment(float xalign) { - gtk_entry_set_alignment(gobj(), xalign); +gtk_entry_set_alignment(gobj(), xalign); } void Entry::set_alignment(AlignmentEnum xalign) { - gtk_entry_set_alignment(gobj(), _gtkmm_align_float_from_enum(xalign)); +gtk_entry_set_alignment(gobj(), _gtkmm_align_float_from_enum(xalign)); } float Entry::get_alignment() const @@ -421,147 +456,211 @@ float Entry::get_alignment() const void Entry::set_completion(const Glib::RefPtr& completion) { - gtk_entry_set_completion(gobj(), Glib::unwrap(completion)); +gtk_entry_set_completion(gobj(), Glib::unwrap(completion)); } Glib::RefPtr Entry::get_completion() { Glib::RefPtr 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 Entry::get_completion() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_entry_get_completion(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_completion(); } -guint16 Entry::get_text_length() const + 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_cursor_position() const { return Glib::PropertyProxy_ReadOnly(this, "cursor-position"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_selection_bound() const { return Glib::PropertyProxy_ReadOnly(this, "selection-bound"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_editable() { return Glib::PropertyProxy(this, "editable"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_editable() const { return Glib::PropertyProxy_ReadOnly(this, "editable"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_max_length() { return Glib::PropertyProxy(this, "max-length"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_max_length() const { return Glib::PropertyProxy_ReadOnly(this, "max-length"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_visibility() { return Glib::PropertyProxy(this, "visibility"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_visibility() const { return Glib::PropertyProxy_ReadOnly(this, "visibility"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_has_frame() { return Glib::PropertyProxy(this, "has-frame"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_has_frame() const { return Glib::PropertyProxy_ReadOnly(this, "has-frame"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_invisible_char() { return Glib::PropertyProxy(this, "invisible-char"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_invisible_char() const { return Glib::PropertyProxy_ReadOnly(this, "invisible-char"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_activates_default() { return Glib::PropertyProxy(this, "activates-default"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_activates_default() const { return Glib::PropertyProxy_ReadOnly(this, "activates-default"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_width_chars() { return Glib::PropertyProxy(this, "width-chars"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_width_chars() const { return Glib::PropertyProxy_ReadOnly(this, "width-chars"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_scroll_offset() const { return Glib::PropertyProxy_ReadOnly(this, "scroll-offset"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Entry::property_text() { return Glib::PropertyProxy(this, "text"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Entry::property_text() const { return Glib::PropertyProxy_ReadOnly(this, "text"); } +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy Entry::property_xalign() +{ + return Glib::PropertyProxy(this, "xalign"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly Entry::property_xalign() const +{ + return Glib::PropertyProxy_ReadOnly(this, "xalign"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy Entry::property_truncate_multiline() +{ + return Glib::PropertyProxy(this, "truncate-multiline"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly Entry::property_truncate_multiline() const +{ + return Glib::PropertyProxy_ReadOnly(this, "truncate-multiline"); +} +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::Entry::on_populate_popup(Menu* menu) { BaseClassType *const base = static_cast( @@ -571,7 +670,6 @@ void Gtk::Entry::on_populate_popup(Menu* menu) 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( @@ -581,7 +679,6 @@ void Gtk::Entry::on_insert_at_cursor(const Glib::ustring& str) if(base && base->insert_at_cursor) (*base->insert_at_cursor)(gobj(),str.c_str()); } - void Gtk::Entry::on_activate() { BaseClassType *const base = static_cast( @@ -591,6 +688,10 @@ void Gtk::Entry::on_activate() if(base && base->activate) (*base->activate)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/entry.h b/libs/gtkmm2/gtk/gtkmm/entry.h index d7b9a3fb3c..4b2eb14177 100644 --- a/libs/gtkmm2/gtk/gtkmm/entry.h +++ b/libs/gtkmm2/gtk/gtkmm/entry.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ENTRY_H #define _GTKMM_ENTRY_H + #include /* $Id$ */ @@ -44,6 +45,9 @@ namespace Gtk namespace Gtk { +//TODO: This is used in Range too, so put it somewhere more appropriate: +typedef GtkBorder Border; + /** A single line text entry field. * * The Gtk::Entry widget is a single line text entry widget. A fairly large @@ -100,14 +104,20 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_populate_popup(Menu* menu); virtual void on_insert_at_cursor(const Glib::ustring& str); virtual void on_activate(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -153,6 +163,12 @@ public: * @return Whether the entry has a beveled frame. */ bool get_has_frame() const; + + + void set_inner_border(const Border& border); + + Border get_inner_border() const; + /** Sets the maximum allowed length of the contents of the widget. If * the current contents are longer than the given length, then they @@ -215,8 +231,8 @@ public: /** 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. + * The returned layout is owned by the entry and must not be + * modified or freed by the caller. * * Keep in mind that the layout text may contain a preedit string, so * layout_index_to_text_index() and @@ -229,8 +245,8 @@ public: /** 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. + * The returned layout is owned by the entry and must not be + * modified or freed by the caller. * * Keep in mind that the layout text may contain a preedit string, so * layout_index_to_text_index() and @@ -287,7 +303,7 @@ public: * the horizontal positioning of the contents when the displayed * text is shorter than the width of the entry. * - * Since: 2.4 + * @newin2p4 * @param xalign The horizontal alignment, from 0 (left) to 1 (right). * Reversed for RTL layouts. */ @@ -297,7 +313,7 @@ public: * the horizontal positioning of the contents when the displayed * text is shorter than the width of the entry. * - * Since: 2.4 + * @newin2p4 * @param xalign The horizontal alignment, from 0 (left) to 1 (right). * Reversed for RTL layouts. */ @@ -306,7 +322,7 @@ public: /** Gets the value set by set_alignment(). * @return The alignment * - * Since: 2.4. + * @newin2p4. */ float get_alignment() const; @@ -315,7 +331,7 @@ public: * All further configuration of the completion mechanism is done on * @a completion using the Gtk::EntryCompletion API. * - * Since: 2.4 + * @newin2p4 * @param completion The Gtk::EntryCompletion. */ void set_completion(const Glib::RefPtr& completion); @@ -323,59 +339,83 @@ public: /** 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. + * @newin2p4. */ Glib::RefPtr 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. + * @newin2p4. */ Glib::RefPtr get_completion() const; - guint16 get_text_length() const; - + guint16 get_text_length() const; + +/** + * @par Prototype: + * void %populate_popup(Menu* menu) + */ + Glib::SignalProxy1< void,Menu* > signal_populate_popup(); +/** + * @par Prototype: + * void %insert_at_cursor(const Glib::ustring& str) + */ + Glib::SignalProxy1< void,const Glib::ustring& > signal_insert_at_cursor(); //Key-binding signals: + + //This is a keybinding signal, but it is allowed: + // http://mail.gnome.org/archives/gtk-devel-list/2003-January/msg00108.html + // "activate is probably about the only exception" +/** + * @par Prototype: + * void %activate() + */ Glib::SignalProxy0< void > signal_activate(); - //TODO: ignore this too? It's used in an example. - - - /** The current position of the insertion cursor in chars. + + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_cursor_position() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The position of the opposite end of the selection from the cursor in chars. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_selection_bound() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the entry contents can be edited. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_editable() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -383,15 +423,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_editable() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Maximum number of characters for this entry. Zero if no maximum. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_max_length() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -399,15 +443,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_max_length() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** FALSE displays the invisible char instead of the actual text (password mode). + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_visibility() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -415,15 +463,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_visibility() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** FALSE removes outside bevel from entry. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_has_frame() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** FALSE removes outside bevel from entry. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -431,15 +483,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_has_frame() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The character to use when masking entry contents (in password mode). + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_invisible_char() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -447,15 +503,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_invisible_char() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_activates_default() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -463,15 +523,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_activates_default() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Number of characters to leave space for in the entry. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_width_chars() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -479,24 +543,30 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_width_chars() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Number of pixels of the entry scrolled off the screen to the left. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_scroll_offset() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The contents of the entry. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_text() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The contents of the entry. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -504,6 +574,47 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_text() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_xalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether to truncate multiline pastes to one line. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy property_truncate_multiline() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether to truncate multiline pastes to one line. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy_ReadOnly property_truncate_multiline() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -519,6 +630,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Entry* wrap(GtkEntry* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_ENTRY_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc b/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc index 4b7d15975d..83c619c9a8 100644 --- a/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc +++ b/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -27,71 +28,49 @@ #include #include -namespace //anonymous + +static gboolean SignalProxy_Match_gtk_callback(GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter, gpointer user_data) { + Gtk::EntryCompletion::SlotMatch* the_slot = static_cast(user_data); -// 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(user_data); - + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED GtkTreeModel* tree_model = gtk_entry_completion_get_model(completion); - return (self->slot_)(Glib::convert_const_gchar_ptr_to_ustring(key), + return (*the_slot)(Glib::convert_const_gchar_ptr_to_ustring(key), Gtk::TreeModel::const_iterator(tree_model, iter) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } - return FALSE; //An arbitary default, just to avoid the compiler warning. + return false; //An arbitary default, just to avoid the compiler warning. + #endif //GLIBMM_EXCEPTIONS_ENABLED } -void SignalProxy_Match::gtk_callback_destroy(void* data) +static void SignalProxy_Match_gtk_callback_destroy(void* data) { - delete static_cast(data); + delete static_cast(data); } -} // anonymous namespace - namespace Gtk { void EntryCompletion::set_match_func(const SlotMatch& slot) { - // Create a signal proxy. A pointer to this will be passed + // Create a copy of the slot. 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); + // when SignalProxy_Match_gtk_callback_destroy() is called. + SlotMatch* slot_copy = new SlotMatch(slot); gtk_entry_completion_set_match_func(gobj(), - &SignalProxy_Match::gtk_callback, pSignalProxy, - &SignalProxy_Match::gtk_callback_destroy); + &SignalProxy_Match_gtk_callback, slot_copy, + &SignalProxy_Match_gtk_callback_destroy); } void EntryCompletion::insert_action_text(const Glib::ustring& text, int index) @@ -126,7 +105,7 @@ void EntryCompletion::prepend_action_markup(const Glib::ustring& markup) namespace //anonymous { -gboolean Widget_signal_match_selected_callback(GtkEntryCompletion* self, GtkTreeModel* c_model, GtkTreeIter* c_iter, void* data) +static 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; @@ -134,27 +113,31 @@ gboolean Widget_signal_match_selected_callback(GtkEntryCompletion* self, GtkTree // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED 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( (*static_cast(slot))(cppIter) ); } + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } typedef gboolean RType; return RType(); } -gboolean Widget_signal_match_selected_notify_callback(GtkEntryCompletion* self, GtkTreeModel* c_model, GtkTreeIter* c_iter, void* data) +static 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; @@ -162,8 +145,10 @@ gboolean Widget_signal_match_selected_notify_callback(GtkEntryCompletion* self, // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) { //This conversion is the custom-written part: @@ -171,11 +156,13 @@ gboolean Widget_signal_match_selected_notify_callback(GtkEntryCompletion* self, (*static_cast(slot))(cppIter); } + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } typedef gboolean RType; @@ -195,7 +182,7 @@ const Glib::SignalProxyInfo EntryCompletion_signal_match_selected_info = namespace Gtk { - +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Hand-coded signal wrapping: bool Gtk::EntryCompletion::on_match_selected(const TreeModel::iterator& iter) @@ -225,18 +212,22 @@ gboolean EntryCompletion_Class::match_selected_callback_custom(GtkEntryCompletio // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // 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); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -252,6 +243,7 @@ gboolean EntryCompletion_Class::match_selected_callback_custom(GtkEntryCompletio typedef gboolean RType; return RType(); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::SignalProxy1< bool, const TreeModel::iterator& > EntryCompletion::signal_match_selected() { @@ -265,7 +257,8 @@ Glib::SignalProxy1< bool, const TreeModel::iterator& > EntryCompletion::signal_m namespace { -void EntryCompletion_signal_action_activated_callback(GtkEntryCompletion* self, gint p0,void* data) + +static void EntryCompletion_signal_action_activated_callback(GtkEntryCompletion* self, gint p0,void* data) { using namespace Gtk; typedef sigc::slot< void,int > SlotType; @@ -273,20 +266,24 @@ void EntryCompletion_signal_action_activated_callback(GtkEntryCompletion* self, // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo EntryCompletion_signal_action_activated_info = +static const Glib::SignalProxyInfo EntryCompletion_signal_action_activated_info = { "action_activated", (GCallback) &EntryCompletion_signal_action_activated_callback, @@ -294,7 +291,7 @@ const Glib::SignalProxyInfo EntryCompletion_signal_action_activated_info = }; -gboolean EntryCompletion_signal_insert_prefix_callback(GtkEntryCompletion* self, const gchar* p0,void* data) +static gboolean EntryCompletion_signal_insert_prefix_callback(GtkEntryCompletion* self, const gchar* p0,void* data) { using namespace Gtk; typedef sigc::slot< bool,const Glib::ustring& > SlotType; @@ -302,23 +299,27 @@ gboolean EntryCompletion_signal_insert_prefix_callback(GtkEntryCompletion* self, // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) return static_cast((*static_cast(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0) )); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } typedef gboolean RType; return RType(); } -gboolean EntryCompletion_signal_insert_prefix_notify_callback(GtkEntryCompletion* self, const gchar* p0, void* data) +static 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; @@ -326,29 +327,34 @@ gboolean EntryCompletion_signal_insert_prefix_notify_callback(GtkEntryCompletion // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } typedef gboolean RType; return RType(); } -const Glib::SignalProxyInfo EntryCompletion_signal_insert_prefix_info = +static 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 @@ -395,11 +401,19 @@ void EntryCompletion_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->action_activated = &action_activated_callback; klass->match_selected = &match_selected_callback_custom; - } + #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +} +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void EntryCompletion_Class::action_activated_callback(GtkEntryCompletion* self, gint p0) { CppObjectType *const obj = dynamic_cast( @@ -412,16 +426,20 @@ void EntryCompletion_Class::action_activated_callback(GtkEntryCompletion* self, // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_action_activated(p0 ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -434,6 +452,7 @@ void EntryCompletion_Class::action_activated_callback(GtkEntryCompletion* self, (*base->action_activated)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* EntryCompletion_Class::wrap_new(GObject* object) @@ -500,32 +519,27 @@ const Entry* EntryCompletion::get_entry() const void EntryCompletion::set_model(const Glib::RefPtr& model) { - gtk_entry_completion_set_model(gobj(), Glib::unwrap(model)); +gtk_entry_completion_set_model(gobj(), Glib::unwrap(model)); } Glib::RefPtr EntryCompletion::get_model() { Glib::RefPtr 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 EntryCompletion::get_model() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_entry_completion_get_model(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_model(); } void EntryCompletion::set_minimum_key_length(int length) { - gtk_entry_completion_set_minimum_key_length(gobj(), length); +gtk_entry_completion_set_minimum_key_length(gobj(), length); } int EntryCompletion::get_minimum_key_length() const @@ -535,22 +549,22 @@ int EntryCompletion::get_minimum_key_length() const void EntryCompletion::complete() { - gtk_entry_completion_complete(gobj()); +gtk_entry_completion_complete(gobj()); } void EntryCompletion::insert_prefix() { - gtk_entry_completion_insert_prefix(gobj()); +gtk_entry_completion_insert_prefix(gobj()); } void EntryCompletion::delete_action(int index) { - gtk_entry_completion_delete_action(gobj(), 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(inline_completion)); +gtk_entry_completion_set_inline_completion(gobj(), static_cast(inline_completion)); } bool EntryCompletion::get_inline_completion() const @@ -560,7 +574,7 @@ bool EntryCompletion::get_inline_completion() const void EntryCompletion::set_popup_completion(bool popup_completion) { - gtk_entry_completion_set_popup_completion(gobj(), static_cast(popup_completion)); +gtk_entry_completion_set_popup_completion(gobj(), static_cast(popup_completion)); } bool EntryCompletion::get_popup_completion() const @@ -568,14 +582,34 @@ bool EntryCompletion::get_popup_completion() const return gtk_entry_completion_get_popup_completion(const_cast(gobj())); } +void EntryCompletion::set_popup_set_width(bool popup_set_width) +{ +gtk_entry_completion_set_popup_set_width(gobj(), static_cast(popup_set_width)); +} + +bool EntryCompletion::get_popup_set_width() const +{ + return gtk_entry_completion_get_popup_set_width(const_cast(gobj())); +} + +void EntryCompletion::set_popup_single_width(bool popup_single_match) +{ +gtk_entry_completion_set_popup_single_match(gobj(), static_cast(popup_single_match)); +} + +bool EntryCompletion::get_popup_single_match() const +{ + return gtk_entry_completion_get_popup_single_match(const_cast(gobj())); +} + void EntryCompletion::set_text_column(const TreeModelColumnBase& column) { - gtk_entry_completion_set_text_column(gobj(), (column).index()); +gtk_entry_completion_set_text_column(gobj(), (column).index()); } void EntryCompletion::set_text_column(int column) { - gtk_entry_completion_set_text_column(gobj(), column); +gtk_entry_completion_set_text_column(gobj(), column); } int EntryCompletion::get_text_column() @@ -589,12 +623,113 @@ 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy< Glib::RefPtr > EntryCompletion::property_model() +{ + return Glib::PropertyProxy< Glib::RefPtr >(this, "model"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly< Glib::RefPtr > EntryCompletion::property_model() const +{ + return Glib::PropertyProxy_ReadOnly< Glib::RefPtr >(this, "model"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy EntryCompletion::property_minimum_key_length() +{ + return Glib::PropertyProxy(this, "minimum-key-length"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly EntryCompletion::property_minimum_key_length() const +{ + return Glib::PropertyProxy_ReadOnly(this, "minimum-key-length"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy EntryCompletion::property_text_column() +{ + return Glib::PropertyProxy(this, "text-column"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly EntryCompletion::property_text_column() const +{ + return Glib::PropertyProxy_ReadOnly(this, "text-column"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy EntryCompletion::property_inline_completion() +{ + return Glib::PropertyProxy(this, "inline-completion"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly EntryCompletion::property_inline_completion() const +{ + return Glib::PropertyProxy_ReadOnly(this, "inline-completion"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy EntryCompletion::property_popup_completion() +{ + return Glib::PropertyProxy(this, "popup-completion"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly EntryCompletion::property_popup_completion() const +{ + return Glib::PropertyProxy_ReadOnly(this, "popup-completion"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy EntryCompletion::property_popup_set_width() +{ + return Glib::PropertyProxy(this, "popup-set-width"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly EntryCompletion::property_popup_set_width() const +{ + return Glib::PropertyProxy_ReadOnly(this, "popup-set-width"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy EntryCompletion::property_popup_single_match() +{ + return Glib::PropertyProxy(this, "popup-single-match"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly EntryCompletion::property_popup_single_match() const +{ + return Glib::PropertyProxy_ReadOnly(this, "popup-single-match"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::EntryCompletion::on_action_activated(int index) { BaseClassType *const base = static_cast( @@ -604,6 +739,10 @@ void Gtk::EntryCompletion::on_action_activated(int index) if(base && base->action_activated) (*base->action_activated)(gobj(),index); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/entrycompletion.h b/libs/gtkmm2/gtk/gtkmm/entrycompletion.h index 2d8e0c5bd0..d4086b2bfb 100644 --- a/libs/gtkmm2/gtk/gtkmm/entrycompletion.h +++ b/libs/gtkmm2/gtk/gtkmm/entrycompletion.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ENTRYCOMPLETION_H #define _GTKMM_ENTRYCOMPLETION_H + #include /* $Id$ */ @@ -41,6 +42,7 @@ namespace Gtk class Entry; +//TODO: This should derive+implement from CellLayout, when we can break ABI. class EntryCompletion : public Glib::Object { @@ -100,14 +102,14 @@ public: /** Gets the entry @a completion has been attached to. * @return The entry @a completion has been attached to. * - * Since: 2.4. + * @newin2p4. */ Entry* get_entry(); /** Gets the entry @a completion has been attached to. * @return The entry @a completion has been attached to. * - * Since: 2.4. + * @newin2p4. */ const Entry* get_entry() const; @@ -116,7 +118,7 @@ public: * a model set, it will remove it before setting the new model. * If model is 0, then it will unset the model. * - * Since: 2.4 + * @newin2p4 * @param model The Gtk::TreeModel. */ void set_model(const Glib::RefPtr& model); @@ -125,7 +127,7 @@ public: * Returns 0 if the model is unset. * @return A Gtk::TreeModel, or 0 if none is currently being used. * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr get_model(); @@ -133,7 +135,7 @@ public: * Returns 0 if the model is unset. * @return A Gtk::TreeModel, or 0 if none is currently being used. * - * Since: 2.4. + * @newin2p4. */ Glib::RefPtr get_model() const; @@ -148,7 +150,7 @@ public: * key takes a lot of time and will come up with meaningless results anyway * (ie, a too large dataset). * - * Since: 2.4 + * @newin2p4 * @param length The minimum length of the key in order to start completing. */ void set_minimum_key_length(int length); @@ -156,7 +158,7 @@ public: /** Returns the minimum key length as set for @a completion . * @return The currently used minimum key length. * - * Since: 2.4. + * @newin2p4. */ int get_minimum_key_length() const; @@ -164,14 +166,14 @@ public: * current list with completions, using the current key. The completion list * view will be updated accordingly. * - * Since: 2.4 + * @newin2p4 */ void complete(); /** Requests a prefix insertion. * - * Since: 2.6 + * @newin2p6 */ void insert_prefix(); @@ -191,7 +193,7 @@ public: /** Deletes the action at @a index from @a completion 's action list. * - * Since: 2.4 + * @newin2p4 * @param index The index of the item to Delete. */ void delete_action(int index = 0); @@ -200,7 +202,7 @@ public: /** Sets whether the common prefix of the possible completions should * be automatically inserted in the entry. * - * Since: 2.6 + * @newin2p6 * @param inline_completion true to do inline completion. */ void set_inline_completion(bool inline_completion = true); @@ -209,13 +211,13 @@ public: * be automatically inserted in the entry. * @return true if inline completion is turned on * - * Since: 2.6. + * @newin2p6. */ bool get_inline_completion() const; /** Sets whether the completions should be presented in a popup window. * - * Since: 2.6 + * @newin2p6 * @param popup_completion true to do popup completion. */ void set_popup_completion(bool popup_completion = true); @@ -223,11 +225,49 @@ public: /** Returns whether the completions should be presented in a popup window. * @return true if popup completion is turned on * - * Since: 2.6. + * @newin2p6. */ bool get_popup_completion() const; + /** Sets whether the completion popup window will be resized to be the same + * width as the entry. + * + * @newin2p8 + * @param popup_set_width true to make the width of the popup the same as the entry. + */ + void set_popup_set_width(bool popup_set_width = true); + + /** Returns whether the completion popup window will be resized to the + * width of the entry. + * @return true if the popup window will be resized to the width of + * the entry + * + * @newin2p8. + */ + bool get_popup_set_width() const; + + /** Sets whether the completion popup window will appear even if there is + * only a single match. You may want to set this to false if you + * are using inline + * completion. + * + * @newin2p8 + * @param popup_single_match true if the popup should appear even for a single + * match. + */ + void set_popup_single_width(bool popup_single_match = true); + + /** Returns whether the completion popup window will appear even if there is + * only a single match. + * @return true if the popup window will appear regardless of the + * number of matches. + * + * @newin2p8. + */ + bool get_popup_single_match() 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, @@ -237,7 +277,7 @@ public: * 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 + * @newin2p4 * @param column The column in the model of @a completion to get strings from. */ void set_text_column(const TreeModelColumnBase& column); @@ -251,7 +291,7 @@ public: * 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 + * @newin2p4 * @param column The column in the model of @a completion to get strings from. */ void set_text_column(int column); @@ -259,11 +299,20 @@ public: /** Returns the column in the model of @a completion to get strings from. * @return The column containing the strings * - * Since: 2.6. + * @newin2p6. */ int get_text_column(); + /** Emitted when an action is activated. + * + * @param index The index of the activated action. + */ +/** + * @par Prototype: + * void %action_activated(int index) + */ + Glib::SignalProxy1< void,int > signal_action_activated(); @@ -271,7 +320,15 @@ public: //because we need both the iter and the model to make the C++ iter. - /** + /** Emitted when a match from the list is selected. + * The default behaviour is to replace the contents of the + * entry with the contents of the text column in the row + * pointed to by @a iter. + * + * @param model The TreeModel containing the matches + * @param iter A TreeModel::iterator positioned at the selected match + * @result true if the signal has been handled + * * @par Prototype: * bool %match_selected(const TreeModel::iterator& iter) */ @@ -280,27 +337,194 @@ public: //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. + /** Emitted when the inline autocompletion is triggered. + * The default behaviour is to make the entry display the + * whole prefix and select the newly inserted part. + * + * Applications may connect to this signal in order to insert only a + * smaller part of the @a prefix into the entry - e.g. the entry used in + * the FileChooser inserts only the part of the prefix up to the + * next '/'. + * + * @newin2p6 + * + * @param prefix The common prefix of all possible completions. + * @result true if the signal has been handled + */ +/** + * @par Prototype: + * bool %insert_prefix(const Glib::ustring& prefix) + */ Glib::SignalProxy1< bool,const Glib::ustring& > signal_insert_prefix(); + #ifdef GLIBMM_PROPERTIES_ENABLED +/** The model to find matches 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::RefPtr > property_model() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** The model to find matches 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::RefPtr > property_model() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Minimum length of the search key in order to look up matches. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy property_minimum_key_length() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Minimum length of the search key in order to look up matches. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy_ReadOnly property_minimum_key_length() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** The column of the model containing the strings. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy property_text_column() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** The column of the model containing the strings. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy_ReadOnly property_text_column() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether the common prefix should be inserted automatically. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy property_inline_completion() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether the common prefix should be inserted automatically. + * + * You rarely need to use properties because there are get_ and set_ methods for almost all of them. + * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when + * the value of the property changes. + */ + Glib::PropertyProxy_ReadOnly property_inline_completion() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether the completions should be shown in a popup 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 property_popup_completion() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** Whether the completions should be shown in a popup 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 property_popup_completion() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_popup_set_width() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_popup_set_width() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_popup_single_match() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_popup_single_match() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + protected: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED //Default Signal Handler: virtual bool on_match_selected(const TreeModel::iterator& iter); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_action_activated(int index); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gtk/gtkmm/enums.cc b/libs/gtkmm2/gtk/gtkmm/enums.cc index a20f39360f..2833f83ff7 100644 --- a/libs/gtkmm2/gtk/gtkmm/enums.cc +++ b/libs/gtkmm2/gtk/gtkmm/enums.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -280,4 +281,10 @@ GType Glib::Value::value_type() return gtk_sort_type_get_type(); } +// static +GType Glib::Value::value_type() +{ + return gtk_page_orientation_get_type(); +} + diff --git a/libs/gtkmm2/gtk/gtkmm/enums.h b/libs/gtkmm2/gtk/gtkmm/enums.h index 07d0830d40..052f7ecf40 100644 --- a/libs/gtkmm2/gtk/gtkmm/enums.h +++ b/libs/gtkmm2/gtk/gtkmm/enums.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ENUMS_H #define _GTKMM_ENUMS_H + #include /* $Id$ */ @@ -154,7 +155,8 @@ enum ArrowType ARROW_UP, ARROW_DOWN, ARROW_LEFT, - ARROW_RIGHT + ARROW_RIGHT, + ARROW_NONE }; } // namespace Gtk @@ -1344,6 +1346,38 @@ public: #endif /* DOXYGEN_SHOULD_SKIP_THIS */ +namespace Gtk +{ + +/** + * @ingroup gtkmmEnums + */ +enum PageOrientation +{ + PAGE_ORIENTATION_PORTRAIT, + PAGE_ORIENTATION_LANDSCAPE, + PAGE_ORIENTATION_REVERSE_PORTRAIT, + PAGE_ORIENTATION_REVERSE_LANDSCAPE +}; + +} // namespace Gtk + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +namespace Glib +{ + +template <> +class Value : public Glib::Value_Enum +{ +public: + static GType value_type() G_GNUC_CONST; +}; + +} // namespace Glib +#endif /* DOXYGEN_SHOULD_SKIP_THIS */ + + namespace Gtk { diff --git a/libs/gtkmm2/gtk/gtkmm/eventbox.cc b/libs/gtkmm2/gtk/gtkmm/eventbox.cc index 9b15790c9d..25dc971d05 100644 --- a/libs/gtkmm2/gtk/gtkmm/eventbox.cc +++ b/libs/gtkmm2/gtk/gtkmm/eventbox.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -27,7 +28,6 @@ #include - namespace { } // anonymous namespace @@ -74,8 +74,19 @@ void EventBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* EventBox_Class::wrap_new(GObject* o) { @@ -130,7 +141,7 @@ bool EventBox::get_visible_window() const void EventBox::set_visible_window(bool visible_window) { - gtk_event_box_set_visible_window(gobj(), static_cast(visible_window)); +gtk_event_box_set_visible_window(gobj(), static_cast(visible_window)); } bool EventBox::get_above_child() const @@ -140,29 +151,44 @@ bool EventBox::get_above_child() const void EventBox::set_above_child(bool above_child) { - gtk_event_box_set_above_child(gobj(), static_cast(above_child)); +gtk_event_box_set_above_child(gobj(), static_cast(above_child)); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy EventBox::property_visible_window() { return Glib::PropertyProxy(this, "visible-window"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly EventBox::property_visible_window() const { return Glib::PropertyProxy_ReadOnly(this, "visible-window"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy EventBox::property_above_child() { return Glib::PropertyProxy(this, "above-child"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly EventBox::property_above_child() const { return Glib::PropertyProxy_ReadOnly(this, "above-child"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/eventbox.h b/libs/gtkmm2/gtk/gtkmm/eventbox.h index 927f196888..74854dd095 100644 --- a/libs/gtkmm2/gtk/gtkmm/eventbox.h +++ b/libs/gtkmm2/gtk/gtkmm/eventbox.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_EVENTBOX_H #define _GTKMM_EVENTBOX_H + #include /* $Id$ */ @@ -96,11 +97,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -113,7 +120,7 @@ public: * See set_visible_window() for details. * @return true if the event box window is visible * - * Since: 2.4. + * @newin2p4. */ bool get_visible_window() const; @@ -153,7 +160,7 @@ public: * descendant windows, not just at the same place on the screen. * </note> * - * Since: 2.4 + * @newin2p4 * @param visible_window Boolean value. */ void set_visible_window(bool visible_window = true); @@ -164,7 +171,7 @@ public: * @return true if the event box window is above the window * of its child. * - * Since: 2.4. + * @newin2p4. */ bool get_above_child() const; @@ -176,19 +183,22 @@ public: * * The default is to keep the window below the child. * - * Since: 2.4 + * @newin2p4 * @param above_child true 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 + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_visible_window() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Whether the event box is visible * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -196,15 +206,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_visible_window() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_above_child() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -212,6 +226,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_above_child() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -227,6 +242,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::EventBox* wrap(GtkEventBox* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_EVENTBOX_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/expander.cc b/libs/gtkmm2/gtk/gtkmm/expander.cc index e2c7f83908..7a14dda085 100644 --- a/libs/gtkmm2/gtk/gtkmm/expander.cc +++ b/libs/gtkmm2/gtk/gtkmm/expander.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -85,8 +86,19 @@ void Expander_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Expander_Class::wrap_new(GObject* o) { @@ -136,7 +148,7 @@ Expander::Expander() void Expander::set_expanded(bool expanded) { - gtk_expander_set_expanded(gobj(), static_cast(expanded)); +gtk_expander_set_expanded(gobj(), static_cast(expanded)); } bool Expander::get_expanded() const @@ -146,7 +158,7 @@ bool Expander::get_expanded() const void Expander::set_spacing(int spacing) { - gtk_expander_set_spacing(gobj(), spacing); +gtk_expander_set_spacing(gobj(), spacing); } int Expander::get_spacing() const @@ -156,7 +168,7 @@ int Expander::get_spacing() const void Expander::set_label(const Glib::ustring& label) { - gtk_expander_set_label(gobj(), label.c_str()); +gtk_expander_set_label(gobj(), label.c_str()); } Glib::ustring Expander::get_label() const @@ -166,7 +178,7 @@ Glib::ustring Expander::get_label() const void Expander::set_use_underline(bool use_underline) { - gtk_expander_set_use_underline(gobj(), static_cast(use_underline)); +gtk_expander_set_use_underline(gobj(), static_cast(use_underline)); } bool Expander::get_use_underline() const @@ -176,7 +188,7 @@ bool Expander::get_use_underline() const void Expander::set_use_markup(bool use_markup) { - gtk_expander_set_use_markup(gobj(), static_cast(use_markup)); +gtk_expander_set_use_markup(gobj(), static_cast(use_markup)); } bool Expander::get_use_markup() const @@ -186,7 +198,7 @@ bool Expander::get_use_markup() const void Expander::set_label_widget(Widget& label_widget) { - gtk_expander_set_label_widget(gobj(), (label_widget).gobj()); +gtk_expander_set_label_widget(gobj(), (label_widget).gobj()); } Widget* Expander::get_label_widget() @@ -196,69 +208,100 @@ Widget* Expander::get_label_widget() const Widget* Expander::get_label_widget() const { - return Glib::wrap(gtk_expander_get_label_widget(const_cast(gobj()))); + return const_cast(this)->get_label_widget(); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Expander::property_expanded() { return Glib::PropertyProxy(this, "expanded"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Expander::property_expanded() const { return Glib::PropertyProxy_ReadOnly(this, "expanded"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Expander::property_label() { return Glib::PropertyProxy(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Expander::property_label() const { return Glib::PropertyProxy_ReadOnly(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Expander::property_use_underline() { return Glib::PropertyProxy(this, "use-underline"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Expander::property_use_underline() const { return Glib::PropertyProxy_ReadOnly(this, "use-underline"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Expander::property_use_markup() { return Glib::PropertyProxy(this, "use-markup"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Expander::property_use_markup() const { return Glib::PropertyProxy_ReadOnly(this, "use-markup"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Expander::property_spacing() { return Glib::PropertyProxy(this, "spacing"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Expander::property_spacing() const { return Glib::PropertyProxy_ReadOnly(this, "spacing"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Expander::property_label_widget() { return Glib::PropertyProxy(this, "label-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Expander::property_label_widget() const { return Glib::PropertyProxy_ReadOnly(this, "label-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/expander.h b/libs/gtkmm2/gtk/gtkmm/expander.h index 8f4d52b425..cb9e89894c 100644 --- a/libs/gtkmm2/gtk/gtkmm/expander.h +++ b/libs/gtkmm2/gtk/gtkmm/expander.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_EXPANDER_H #define _GTKMM_EXPANDER_H + #include /* $Id$ */ @@ -42,10 +43,29 @@ namespace Gtk /** A container which can hide its child. * - * A Expander allows the user to hide or show its child by clicking on an + * An 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. * + * Normally you use an expander as you would use any other descendant + * of Gtk::Bin; you create the child widget and use add() to add it to + * the expander. When the expander is toggled, it will take care of + * showing and hiding the child automatically. + * + * Special Usage: There are situations in which you may prefer to show and + * hide the expanded widget yourself, such as when you want to + * actually create the widget at expansion time. In this case, + * create an Expander but do not add a child to it. The + * expander widget has an expanded property + * which can be used to monitor its expansion state. You should + * watch this property with a signal connection as follows: + * @code + * expander.property_expanded().signal_changed().connect( + * sigc::mem_fun(*this, &SomeClass::on_expander_changed) + * ); + * @endcode + * * @ingroup Widgets + * @ingroup Containers */ class Expander : public Bin @@ -91,11 +111,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -106,7 +132,7 @@ public: * * The Expander has an empty label. * - * Since: 2.4 + * @newin2p4 */ Expander(); @@ -121,7 +147,7 @@ public: * @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 + * @newin2p4 */ explicit Expander(const Glib::ustring& label, bool mnemonic = false); @@ -130,7 +156,7 @@ public: * the child widget to be revealed, and false if you want the * child widget to be hidden. * - * Since: 2.4 + * @newin2p4 * @param expanded Whether the child widget is revealed. */ void set_expanded(bool expanded = true); @@ -141,7 +167,7 @@ public: * See set_expanded(). * @return The current state of the expander. * - * Since: 2.4. + * @newin2p4. */ bool get_expanded() const; @@ -149,7 +175,7 @@ public: /** Sets the spacing field of @a expander , which is the number of pixels to * place between expander and the child. * - * Since: 2.4 + * @newin2p4 * @param spacing Distance between the expander and child in pixels. */ void set_spacing(int spacing); @@ -157,7 +183,7 @@ public: /** Gets the value set by set_spacing(). * @return Spacing between the expander and child. * - * Since: 2.4. + * @newin2p4. */ int get_spacing() const; @@ -166,7 +192,7 @@ public: * * This will also clear any previously set labels. * - * Since: 2.4 + * @newin2p4 * @param label A string. */ void set_label(const Glib::ustring& label); @@ -179,7 +205,7 @@ public: * @return The text of the label widget. This string is owned * by the widget and must not be modified or freed. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_label() const; @@ -187,7 +213,7 @@ public: /** 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 + * @newin2p4 * @param use_underline true if underlines in the text indicate mnemonics. */ void set_use_underline(bool use_underline = true); @@ -197,7 +223,7 @@ public: * @return true if an embedded underline in the expander label * indicates the mnemonic accelerator keys. * - * Since: 2.4. + * @newin2p4. */ bool get_use_underline() const; @@ -205,7 +231,7 @@ public: /** Sets whether the text of the label contains markup in Pango's text markup * language. See Gtk::Label::set_markup(). * - * Since: 2.4 + * @newin2p4 * @param use_markup true if the label's text should be parsed for markup. */ void set_use_markup(bool use_markup = true); @@ -215,7 +241,7 @@ public: * language. See set_use_markup(). * @return true if the label's text will be parsed for markup * - * Since: 2.4. + * @newin2p4. */ bool get_use_markup() const; @@ -223,7 +249,7 @@ public: /** Set the label widget for the expander. This is the widget * that will appear embedded alongside the expander arrow. * - * Since: 2.4 + * @newin2p4 * @param label_widget The new label widget. */ void set_label_widget(Widget& label_widget); @@ -232,7 +258,7 @@ public: * set_label_widget(). * @return The label widget, or 0 if there is none. * - * Since: 2.4. + * @newin2p4. */ Widget* get_label_widget(); @@ -240,20 +266,23 @@ public: * set_label_widget(). * @return The label widget, or 0 if there is none. * - * Since: 2.4. + * @newin2p4. */ const Widget* get_label_widget() const; //keybinding - /** Whether the expander has been opened to reveal the child widget. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_expanded() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -261,15 +290,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_expanded() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Text of the expander's label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Text of the expander's label. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -277,15 +310,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** If set + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_underline() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** If set * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -293,15 +330,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_underline() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The text of the label includes XML markup. See pango_parse_markup. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_markup() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -309,15 +350,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_markup() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Space to put between the label and the child. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_spacing() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -325,15 +370,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_spacing() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A widget to display in place of the usual expander label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label_widget() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -341,6 +390,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label_widget() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -357,6 +407,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Expander* wrap(GtkExpander* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_EXPANDER_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/filechooser.cc b/libs/gtkmm2/gtk/gtkmm/filechooser.cc index 708a94365c..ae4be56d65 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooser.cc +++ b/libs/gtkmm2/gtk/gtkmm/filechooser.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -30,7 +31,8 @@ namespace { -const Glib::SignalProxyInfo FileChooser_signal_current_folder_changed_info = + +static const Glib::SignalProxyInfo FileChooser_signal_current_folder_changed_info = { "current_folder_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -38,7 +40,7 @@ const Glib::SignalProxyInfo FileChooser_signal_current_folder_changed_info = }; -const Glib::SignalProxyInfo FileChooser_signal_selection_changed_info = +static const Glib::SignalProxyInfo FileChooser_signal_selection_changed_info = { "selection_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -46,7 +48,7 @@ const Glib::SignalProxyInfo FileChooser_signal_selection_changed_info = }; -const Glib::SignalProxyInfo FileChooser_signal_update_preview_info = +static const Glib::SignalProxyInfo FileChooser_signal_update_preview_info = { "update_preview", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, @@ -54,13 +56,76 @@ const Glib::SignalProxyInfo FileChooser_signal_update_preview_info = }; -const Glib::SignalProxyInfo FileChooser_signal_file_activated_info = +static const Glib::SignalProxyInfo FileChooser_signal_file_activated_info = { "file_activated", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + +static GtkFileChooserConfirmation FileChooser_signal_confirm_overwrite_callback(GtkFileChooser* self, void* data) +{ + using namespace Gtk; + typedef sigc::slot< FileChooserConfirmation > SlotType; + + // Do not try to call a signal on a disassociated wrapper. + if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) + { + #ifdef GLIBMM_EXCEPTIONS_ENABLED + try + { + #endif //GLIBMM_EXCEPTIONS_ENABLED + if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) + return ((GtkFileChooserConfirmation)((*static_cast(slot))())); + #ifdef GLIBMM_EXCEPTIONS_ENABLED + } + catch(...) + { + Glib::exception_handlers_invoke(); + } + #endif //GLIBMM_EXCEPTIONS_ENABLED + } + + typedef GtkFileChooserConfirmation RType; + return RType(); +} + +static GtkFileChooserConfirmation FileChooser_signal_confirm_overwrite_notify_callback(GtkFileChooser* 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)) + { + #ifdef GLIBMM_EXCEPTIONS_ENABLED + try + { + #endif //GLIBMM_EXCEPTIONS_ENABLED + if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) + (*static_cast(slot))(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED + } + catch(...) + { + Glib::exception_handlers_invoke(); + } + #endif //GLIBMM_EXCEPTIONS_ENABLED + } + + typedef GtkFileChooserConfirmation RType; + return RType(); +} + +static const Glib::SignalProxyInfo FileChooser_signal_confirm_overwrite_info = +{ + "confirm-overwrite", + (GCallback) &FileChooser_signal_confirm_overwrite_callback, + (GCallback) &FileChooser_signal_confirm_overwrite_notify_callback +}; + + } // anonymous namespace // static @@ -69,6 +134,12 @@ GType Glib::Value::value_type() return gtk_file_chooser_action_get_type(); } +// static +GType Glib::Value::value_type() +{ + return gtk_file_chooser_confirmation_get_type(); +} + Gtk::FileChooserError::FileChooserError(Gtk::FileChooserError::Code error_code, const Glib::ustring& error_message) : @@ -85,10 +156,18 @@ Gtk::FileChooserError::Code Gtk::FileChooserError::code() const return static_cast(Glib::Error::code()); } +#ifdef GLIBMM_EXCEPTIONS_ENABLED void Gtk::FileChooserError::throw_func(GError* gobject) { throw Gtk::FileChooserError(gobject); } +#else +//When not using exceptions, we just pass the Exception object around without throwing it: +std::auto_ptr Gtk::FileChooserError::throw_func(GError* gobject) +{ + return std::auto_ptr(new Gtk::FileChooserError(gobject)); +} +#endif //GLIBMM_EXCEPTIONS_ENABLED // static GType Glib::Value::value_type() @@ -138,8 +217,19 @@ void FileChooser_Class::iface_init_function(void* g_iface, void*) //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc g_assert(klass != 0); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FileChooser_Class::wrap_new(GObject* object) { @@ -183,7 +273,7 @@ GType FileChooser::get_base_type() void FileChooser::set_action(FileChooserAction action) { - gtk_file_chooser_set_action(gobj(), ((GtkFileChooserAction)(action))); +gtk_file_chooser_set_action(gobj(), ((GtkFileChooserAction)(action))); } FileChooserAction FileChooser::get_action() const @@ -193,7 +283,7 @@ FileChooserAction FileChooser::get_action() const void FileChooser::set_local_only(bool local_only) { - gtk_file_chooser_set_local_only(gobj(), static_cast(local_only)); +gtk_file_chooser_set_local_only(gobj(), static_cast(local_only)); } bool FileChooser::get_local_only() const @@ -203,7 +293,7 @@ bool FileChooser::get_local_only() const void FileChooser::set_select_multiple(bool select_multiple) { - gtk_file_chooser_set_select_multiple(gobj(), static_cast(select_multiple)); +gtk_file_chooser_set_select_multiple(gobj(), static_cast(select_multiple)); } bool FileChooser::get_select_multiple() const @@ -213,7 +303,7 @@ bool FileChooser::get_select_multiple() const void FileChooser::set_show_hidden(bool show_hidden) { - gtk_file_chooser_set_show_hidden(gobj(), static_cast(show_hidden)); +gtk_file_chooser_set_show_hidden(gobj(), static_cast(show_hidden)); } bool FileChooser::get_show_hidden() const @@ -221,9 +311,19 @@ bool FileChooser::get_show_hidden() const return gtk_file_chooser_get_show_hidden(const_cast(gobj())); } +void FileChooser::set_do_overwrite_confirmation(bool do_overwrite_confirmation) +{ +gtk_file_chooser_set_do_overwrite_confirmation(gobj(), static_cast(do_overwrite_confirmation)); +} + +bool FileChooser::get_do_overwrite_confirmation() const +{ + return gtk_file_chooser_get_do_overwrite_confirmation(const_cast(gobj())); +} + void FileChooser::set_current_name(const Glib::ustring& name) { - gtk_file_chooser_set_current_name(gobj(), name.c_str()); +gtk_file_chooser_set_current_name(gobj(), name.c_str()); } Glib::ustring FileChooser::get_filename() const @@ -243,17 +343,17 @@ bool FileChooser::select_filename(const Glib::ustring& filename) void FileChooser::unselect_filename(const Glib::ustring& filename) { - gtk_file_chooser_unselect_filename(gobj(), filename.c_str()); +gtk_file_chooser_unselect_filename(gobj(), filename.c_str()); } void FileChooser::select_all() { - gtk_file_chooser_select_all(gobj()); +gtk_file_chooser_select_all(gobj()); } void FileChooser::unselect_all() { - gtk_file_chooser_unselect_all(gobj()); +gtk_file_chooser_unselect_all(gobj()); } Glib::SListHandle FileChooser::get_filenames() const @@ -288,7 +388,7 @@ bool FileChooser::select_uri(const Glib::ustring& uri) void FileChooser::unselect_uri(const Glib::ustring& uri) { - gtk_file_chooser_unselect_uri(gobj(), uri.c_str()); +gtk_file_chooser_unselect_uri(gobj(), uri.c_str()); } Glib::SListHandle FileChooser::get_uris() const @@ -308,22 +408,22 @@ Glib::ustring FileChooser::get_current_folder_uri() const void FileChooser::set_preview_widget(Gtk::Widget& preview_widget) { - gtk_file_chooser_set_preview_widget(gobj(), (preview_widget).gobj()); +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(gobj()))); + return const_cast(this)->get_preview_widget(); } Gtk::Widget* FileChooser::get_preview_widget() { - return Glib::wrap(gtk_file_chooser_get_preview_widget(gobj())); + return const_cast(this)->get_preview_widget(); } void FileChooser::set_preview_widget_active(bool active) { - gtk_file_chooser_set_preview_widget_active(gobj(), static_cast(active)); +gtk_file_chooser_set_preview_widget_active(gobj(), static_cast(active)); } bool FileChooser::get_preview_widget_active() const @@ -333,7 +433,7 @@ bool FileChooser::get_preview_widget_active() const void FileChooser::set_use_preview_label(bool use_label) { - gtk_file_chooser_set_use_preview_label(gobj(), static_cast(use_label)); +gtk_file_chooser_set_use_preview_label(gobj(), static_cast(use_label)); } bool FileChooser::get_use_preview_label() const @@ -353,7 +453,7 @@ Glib::ustring FileChooser::get_preview_uri() const void FileChooser::set_extra_widget(Gtk::Widget& extra_widget) { - gtk_file_chooser_set_extra_widget(gobj(), (extra_widget).gobj()); +gtk_file_chooser_set_extra_widget(gobj(), (extra_widget).gobj()); } Gtk::Widget* FileChooser::get_extra_widget() @@ -363,17 +463,17 @@ Gtk::Widget* FileChooser::get_extra_widget() const Gtk::Widget* FileChooser::get_extra_widget() const { - return Glib::wrap(gtk_file_chooser_get_extra_widget(const_cast(gobj()))); + return const_cast(this)->get_extra_widget(); } void FileChooser::add_filter(const FileFilter& filter) { - gtk_file_chooser_add_filter(gobj(), const_cast((filter).gobj())); +gtk_file_chooser_add_filter(gobj(), const_cast((filter).gobj())); } void FileChooser::remove_filter(const FileFilter& filter) { - gtk_file_chooser_remove_filter(gobj(), const_cast((filter).gobj())); +gtk_file_chooser_remove_filter(gobj(), const_cast((filter).gobj())); } Glib::SListHandle< FileFilter* > FileChooser::list_filters() @@ -388,43 +488,62 @@ Glib::SListHandle< const FileFilter* > FileChooser::list_filters() const void FileChooser::set_filter(const FileFilter& filter) { - gtk_file_chooser_set_filter(gobj(), const_cast((filter).gobj())); +gtk_file_chooser_set_filter(gobj(), const_cast((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(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_filter(); } +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool FileChooser::add_shortcut_folder(const Glib::ustring& folder) +#else +bool FileChooser::add_shortcut_folder(const Glib::ustring& folder, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError *error = 0; - bool retvalue = gtk_file_chooser_add_shortcut_folder(gobj(), folder.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); + GError* gerror = 0; + bool retvalue = gtk_file_chooser_add_shortcut_folder(gobj(), folder.c_str(), &(gerror)); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + return retvalue; + } +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool FileChooser::remove_shortcut_folder(const Glib::ustring& folder) +#else +bool FileChooser::remove_shortcut_folder(const Glib::ustring& folder, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError *error = 0; - bool retvalue = gtk_file_chooser_remove_shortcut_folder(gobj(), folder.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); + GError* gerror = 0; + bool retvalue = gtk_file_chooser_remove_shortcut_folder(gobj(), folder.c_str(), &(gerror)); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + return retvalue; + } Glib::SListHandle FileChooser::list_shortcut_folders() const @@ -432,20 +551,44 @@ Glib::SListHandle FileChooser::list_shortcut_folders() const return Glib::SListHandle(gtk_file_chooser_list_shortcut_folders(const_cast(gobj())), Glib::OWNERSHIP_DEEP); } +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool FileChooser::add_shortcut_folder_uri(const Glib::ustring& uri) +#else +bool FileChooser::add_shortcut_folder_uri(const Glib::ustring& uri, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError *error = 0; - bool retvalue = gtk_file_chooser_add_shortcut_folder_uri(gobj(), uri.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); + GError* gerror = 0; + bool retvalue = gtk_file_chooser_add_shortcut_folder_uri(gobj(), uri.c_str(), &(gerror)); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + return retvalue; + } +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool FileChooser::remove_shortcut_folder_uri(const Glib::ustring& uri) +#else +bool FileChooser::remove_shortcut_folder_uri(const Glib::ustring& uri, std::auto_ptr& error) +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError *error = 0; - bool retvalue = gtk_file_chooser_remove_shortcut_folder_uri(gobj(), uri.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); + GError* gerror = 0; + bool retvalue = gtk_file_chooser_remove_shortcut_folder_uri(gobj(), uri.c_str(), &(gerror)); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + return retvalue; + } Glib::SListHandle FileChooser::list_shortcut_folder_uris() const @@ -459,121 +602,191 @@ 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::SignalProxy0< FileChooserConfirmation > FileChooser::signal_confirm_overwrite() +{ + return Glib::SignalProxy0< FileChooserConfirmation >(this, &FileChooser_signal_confirm_overwrite_info); +} + + +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_action() { return Glib::PropertyProxy(this, "action"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_action() const { return Glib::PropertyProxy_ReadOnly(this, "action"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_filter() { return Glib::PropertyProxy(this, "filter"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_filter() const { return Glib::PropertyProxy_ReadOnly(this, "filter"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_folder_mode() { return Glib::PropertyProxy(this, "folder-mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_folder_mode() const { return Glib::PropertyProxy_ReadOnly(this, "folder-mode"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_local_only() { return Glib::PropertyProxy(this, "local-only"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_local_only() const { return Glib::PropertyProxy_ReadOnly(this, "local-only"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_preview_widget() { return Glib::PropertyProxy(this, "preview-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_preview_widget() const { return Glib::PropertyProxy_ReadOnly(this, "preview-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_preview_widget_active() { return Glib::PropertyProxy(this, "preview-widget-active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_preview_widget_active() const { return Glib::PropertyProxy_ReadOnly(this, "preview-widget-active"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_use_preview_label() { return Glib::PropertyProxy(this, "use-preview-label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_use_preview_label() const { return Glib::PropertyProxy_ReadOnly(this, "use-preview-label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_extra_widget() { return Glib::PropertyProxy(this, "extra-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_extra_widget() const { return Glib::PropertyProxy_ReadOnly(this, "extra-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_select_multiple() { return Glib::PropertyProxy(this, "select-multiple"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_select_multiple() const { return Glib::PropertyProxy_ReadOnly(this, "select-multiple"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooser::property_show_hidden() { return Glib::PropertyProxy(this, "show-hidden"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooser::property_show_hidden() const { return Glib::PropertyProxy_ReadOnly(this, "show-hidden"); } +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy FileChooser::property_do_overwrite_confirmation() +{ + return Glib::PropertyProxy(this, "do-overwrite-confirmation"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly FileChooser::property_do_overwrite_confirmation() const +{ + return Glib::PropertyProxy_ReadOnly(this, "do-overwrite-confirmation"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/filechooser.h b/libs/gtkmm2/gtk/gtkmm/filechooser.h index 2bbc5954ab..24a51c0a6f 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooser.h +++ b/libs/gtkmm2/gtk/gtkmm/filechooser.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FILECHOOSER_H #define _GTKMM_FILECHOOSER_H + #include /* $Id$ */ @@ -71,6 +72,37 @@ public: #endif /* DOXYGEN_SHOULD_SKIP_THIS */ +namespace Gtk +{ + +/** + * @ingroup gtkmmEnums + */ +enum FileChooserConfirmation +{ + FILE_CHOOSER_CONFIRMATION_CONFIRM, + FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME, + FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN +}; + +} // namespace Gtk + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +namespace Glib +{ + +template <> +class Value : public Glib::Value_Enum +{ +public: + static GType value_type() G_GNUC_CONST; +}; + +} // namespace Glib +#endif /* DOXYGEN_SHOULD_SKIP_THIS */ + + namespace Gtk { @@ -87,7 +119,8 @@ public: enum Code { NONEXISTENT, - BAD_FILENAME + BAD_FILENAME, + ALREADY_EXISTS }; FileChooserError(Code error_code, const Glib::ustring& error_message); @@ -96,7 +129,14 @@ public: #ifndef DOXYGEN_SHOULD_SKIP_THIS private: + +#ifdef GLIBMM_EXCEPTIONS_ENABLED static void throw_func(GError* gobject); +#else + //When not using exceptions, we just pass the Exception object around without throwing it: + static std::auto_ptr throw_func(GError* gobject); +#endif //GLIBMM_EXCEPTIONS_ENABLED + friend void wrap_init(); // uses throw_func() #endif }; @@ -203,13 +243,13 @@ private: public: - /** Sets the type of operation that that the chooser is performing; the + /** Sets the type of operation 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 + * @newin2p4 * @param action The action that the file selector is performing. */ void set_action(FileChooserAction action); @@ -218,7 +258,7 @@ public: * set_action(). * @return The action that the file selector is performing * - * Since: 2.4. + * @newin2p4. */ FileChooserAction get_action() const; @@ -232,7 +272,7 @@ public: * rather than the URI functions like * get_uri(), * - * Since: 2.4 + * @newin2p4 * @param local_only true if only local files can be selected. */ void set_local_only(bool local_only = true); @@ -241,7 +281,7 @@ public: * file selector. See set_local_only() * @return true if only local files can be selected. * - * Since: 2.4. + * @newin2p4. */ bool get_local_only() const; @@ -250,7 +290,7 @@ public: * GTK_FILE_CHOOSER_ACTION_SAVE. It cannot be set with either of the folder * actions. * - * Since: 2.4 + * @newin2p4 * @param select_multiple true if multiple files can be selected. */ void set_select_multiple(bool select_multiple = true); @@ -259,14 +299,14 @@ public: * selector. See set_select_multiple(). * @return true if multiple files can be selected. * - * Since: 2.4. + * @newin2p4. */ bool get_select_multiple() const; /** Sets whether hidden files and folders are displayed in the file selector. * - * Since: 2.6 + * @newin2p6 * @param show_hidden true if hidden files and folders should be displayed. */ void set_show_hidden(bool show_hidden = true); @@ -275,20 +315,49 @@ public: * See set_show_hidden(). * @return true if hidden files and folders are displayed. * - * Since: 2.6. + * @newin2p6. */ bool get_show_hidden() const; + /** Sets whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE mode will present + * a confirmation dialog if the user types a file name that already exists. This + * is false by default. + * + * Regardless of this setting, the @a chooser will emit the "confirm-overwrite" + * signal when appropriate. + * + * If all you need is the stock confirmation dialog, set this property to true. + * You can override the way confirmation is done by actually handling the + * "confirm-overwrite" signal; please refer to its documentation for the + * details. + * + * @newin2p8 + * @param do_overwrite_confirmation Whether to confirm overwriting in save mode. + */ + void set_do_overwrite_confirmation(bool do_overwrite_confirmation = true); + + /** Queries whether a file chooser is set to confirm for overwriting when the user + * types a file name that already exists. + * @return true if the file chooser will present a confirmation dialog; + * false otherwise. + * + * @newin2p8. + */ + bool get_do_overwrite_confirmation() 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. + * If you want to preselect a particular existing file, you should use + * set_filename() or set_uri() instead. + * Please see the documentation for those functions for an example of using + * set_current_name() as well. * - * Since: 2.4 + * @newin2p4 * @param name The filename to use, as a UTF-8 string. */ void set_current_name(const Glib::ustring& name); @@ -305,20 +374,44 @@ public: */ 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(). + /** Sets @a filename as the current filename for the file chooser, by changing + * to the file's parent folder and actually selecting the file in list. If + * the @a chooser is in Gtk::FILE_CHOOSER_ACTION_SAVE mode, the file's base name + * will also appear in the dialog's file name entry. + * + * 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() + * for the directory change. + * + * If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog, you + * should use this function if you already have a file name to which the user may save; for example, + * when the user opens an existing file and then does <guimenuitem>File/Save As...</guimenuitem> + * on it. If you don't have a file name already @htmlonly—@endhtmlonly for example, if the user just created + * a new file and is saving it for the first time, do not call this function. Instead, use + * something similar to this: + * + * + * if (document_is_new) + * { + * /<!-- -->* the user just created a new document *<!-- -->/ + * gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving); + * gtk_file_chooser_set_current_name (chooser, "Untitled document"); + * } + * else + * { + * /<!-- -->* the user edited an existing document *<!-- -->/ + * gtk_file_chooser_set_filename (chooser, existing_filename); + * } + * * @param filename The filename to set as current. * @return true if both the folder could be changed and the file was * selected successfully, false otherwise. * - * Since: 2.4. + * @newin2p4. */ bool set_filename(const Glib::ustring& filename); @@ -329,7 +422,7 @@ public: * @return true if both the folder could be changed and the file was * selected successfully, false otherwise. * - * Since: 2.4. + * @newin2p4. */ bool select_filename(const Glib::ustring& filename); @@ -337,20 +430,20 @@ public: * is not in the current directory, does not exist, or * is otherwise not currently selected, does nothing. * - * Since: 2.4 + * @newin2p4 * @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 + * @newin2p4 */ void select_all(); /** Unselects all the files in the current folder of a file chooser. * - * Since: 2.4 + * @newin2p4 */ void unselect_all(); @@ -362,7 +455,7 @@ public: * files and subfolders in the current folder. Free the returned list * with Glib::slist_free(), and the filenames with Glib::free(). * - * Since: 2.4. + * @newin2p4. */ Glib::SListHandle get_filenames() const; @@ -373,17 +466,19 @@ public: * @return true if the folder could be changed successfully, false * otherwise. * - * Since: 2.4. + * @newin2p4. */ 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 0 - * if the current path cannot be represented as a local filename. - * Free with Glib::free(). + * @return The full path of the current folder, or 0 if the current + * path cannot be represented as a local filename. Free with Glib::free(). This + * function will also return 0 if the file chooser was unable to load the + * last folder that was requested from it; for example, as would be for calling + * set_current_folder() on a nonexistent folder. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_current_folder() const; @@ -402,20 +497,43 @@ public: */ 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(). + /** Sets the file referred to by @a uri as the current file for the file chooser, + * by changing to the URI's parent folder and actually selecting the URI in the + * list. If the @a chooser is Gtk::FILE_CHOOSER_ACTION_SAVE mode, the URI's base + * name will also appear in the dialog's file name entry. + * + * If the URI 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 URI must exist, or nothing will be done except + * for the directory change. + * If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog, you + * should use this function if you already have a file name to which the user may save; for example, + * when the user opens an existing file and then does <guimenuitem>File/Save As...</guimenuitem> + * on it. If you don't have a file name already @htmlonly—@endhtmlonly for example, if the user just created + * a new file and is saving it for the first time, do not call this function. Instead, use + * something similar to this: + * + * + * if (document_is_new) + * { + * /<!-- -->* the user just created a new document *<!-- -->/ + * gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving); + * gtk_file_chooser_set_current_name (chooser, "Untitled document"); + * } + * else + * { + * /<!-- -->* the user edited an existing document *<!-- -->/ + * gtk_file_chooser_set_uri (chooser, existing_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 true if both the folder could be changed and the URI was * selected successfully, false otherwise. * - * Since: 2.4. + * @newin2p4. */ bool set_uri(const Glib::ustring& uri); @@ -426,7 +544,7 @@ public: * @return true if both the folder could be changed and the URI was * selected successfully, false otherwise. * - * Since: 2.4. + * @newin2p4. */ bool select_uri(const Glib::ustring& uri); @@ -434,7 +552,7 @@ public: * is not in the current directory, does not exist, or * is otherwise not currently selected, does nothing. * - * Since: 2.4 + * @newin2p4 * @param uri The URI to unselect. */ void unselect_uri(const Glib::ustring& uri); @@ -445,7 +563,7 @@ public: * files and subfolders in the current folder. Free the returned list * with Glib::slist_free(), and the filenames with Glib::free(). * - * Since: 2.4. + * @newin2p4. */ Glib::SListHandle get_uris() const; @@ -457,7 +575,7 @@ public: * @return true if the folder could be changed successfully, false * otherwise. * - * Since: 2.4. + * @newin2p4. */ bool set_current_folder_uri(const Glib::ustring& uri); @@ -484,7 +602,7 @@ public: * may display an internally generated preview of the current file or * it may display no preview at all. * - * Since: 2.4 + * @newin2p4 * @param preview_widget Widget for displaying preview. */ void set_preview_widget(Gtk::Widget& preview_widget); @@ -493,7 +611,7 @@ public: * set_preview_widget(). * @return The current preview widget, or 0 * - * Since: 2.4. + * @newin2p4. */ const Gtk::Widget* get_preview_widget() const; @@ -501,18 +619,18 @@ public: * set_preview_widget(). * @return The current preview widget, or 0 * - * Since: 2.4. + * @newin2p4. */ Gtk::Widget* get_preview_widget(); /** Sets whether the preview widget set by - * set_preview_widget_active() should be shown for the + * set_preview_widget() 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 + * @newin2p4 * @param active Whether to display the user-specified preview widget. */ void set_preview_widget_active(bool active = true); @@ -522,7 +640,7 @@ public: * set_preview_widget_active(). * @return true if the preview widget is active for the current filename. * - * Since: 2.4. + * @newin2p4. */ bool get_preview_widget_active() const; @@ -534,7 +652,7 @@ public: * * See also: set_preview_widget() * - * Since: 2.4 + * @newin2p4 * @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); @@ -567,7 +685,7 @@ public: /** Sets an application-supplied widget to provide extra options to the user. * - * Since: 2.4 + * @newin2p4 * @param extra_widget Widget for extra options. */ void set_extra_widget(Gtk::Widget& extra_widget); @@ -576,7 +694,7 @@ public: * set_extra_widget(). * @return The current extra widget, or 0 * - * Since: 2.4. + * @newin2p4. */ Gtk::Widget* get_extra_widget(); @@ -584,7 +702,7 @@ public: * set_extra_widget(). * @return The current extra widget, or 0 * - * Since: 2.4. + * @newin2p4. */ const Gtk::Widget* get_extra_widget() const; @@ -593,16 +711,19 @@ public: /** 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. + * filter are displayed. * - * Since: 2.4 + * Note that the @a chooser takes ownership of the filter, so you have to + * ref and sink it if you want to keep a reference. + * + * @newin2p4 * @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 + * @newin2p4 * @param filter A Gtk::FileFilter. */ void remove_filter (const FileFilter& filter); @@ -615,7 +736,7 @@ public: * owned by GTK+, but you must free the list itself with * Glib::slist_free() when you are done with it. * - * Since: 2.4. + * @newin2p4. */ Glib::SListHandle< FileFilter* > list_filters(); @@ -626,7 +747,7 @@ public: * owned by GTK+, but you must free the list itself with * Glib::slist_free() when you are done with it. * - * Since: 2.4. + * @newin2p4. */ Glib::SListHandle< const FileFilter* > list_filters() const; @@ -640,7 +761,7 @@ public: * filters is empty is useful if you want to restrict the displayed * set of files without letting the user change it. * - * Since: 2.4 + * @newin2p4 * @param filter A Gtk::FileFilter. */ void set_filter(const FileFilter& filter); @@ -648,14 +769,14 @@ public: /** Gets the current filter; see set_filter(). * @return The current filter, or 0 * - * Since: 2.4. + * @newin2p4. */ FileFilter* get_filter(); /** Gets the current filter; see set_filter(). * @return The current filter, or 0 * - * Since: 2.4. + * @newin2p4. */ const FileFilter* get_filter() const; @@ -670,9 +791,14 @@ public: * @return true if the folder could be added successfully, false * otherwise. In the latter case, the @a error will be set as appropriate. * - * Since: 2.4. + * @newin2p4. */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool add_shortcut_folder(const Glib::ustring& folder); +#else + bool add_shortcut_folder(const Glib::ustring& folder, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Removes a folder from a file chooser's list of shortcut folders. * @param folder Filename of the folder to remove. @@ -681,17 +807,21 @@ public: * * See also: add_shortcut_folder() * - * Since: 2.4. + * @newin2p4. */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool remove_shortcut_folder(const Glib::ustring& folder); +#else + bool remove_shortcut_folder(const Glib::ustring& folder, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Queries the list of shortcut folders in the file chooser, as set by * add_shortcut_folder(). - * @return A list of folder filenames, or 0 if there are no shortcut - * folders. Free the returned list with Glib::slist_free(), and the filenames with - * Glib::free(). * - * Since: 2.4. + * @newin2p4 + * @return A list of folder filenames, if there are any shortcut + * folders.. */ Glib::SListHandle list_shortcut_folders() const; @@ -704,9 +834,14 @@ public: * @return true if the folder could be added successfully, false * otherwise. In the latter case, the @a error will be set as appropriate. * - * Since: 2.4. + * @newin2p4. */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool add_shortcut_folder_uri(const Glib::ustring& uri); +#else + bool add_shortcut_folder_uri(const Glib::ustring& uri, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Removes a folder URI from a file chooser's list of shortcut folders. * @param uri URI of the folder to remove. @@ -715,9 +850,14 @@ public: * * See also: add_shortcut_folder_uri() * - * Since: 2.4. + * @newin2p4. */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED bool remove_shortcut_folder_uri(const Glib::ustring& uri); +#else + bool remove_shortcut_folder_uri(const Glib::ustring& uri, std::auto_ptr& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Queries the list of shortcut folders in the file chooser, as set by * add_shortcut_folder_uri(). @@ -725,31 +865,121 @@ public: * folders. Free the returned list with Glib::slist_free(), and the URIs with * Glib::free(). * - * Since: 2.4. + * @newin2p4. */ Glib::SListHandle list_shortcut_folder_uris() const; + + /** This signal is emitted when the current folder in a FileChooser + * changes. This can happen due to the user performing some action that + * changes folders, such as selecting a bookmark or visiting a folder on the + * file list. It can also happen as a result of calling a function to + * explicitly change the current folder in a file chooser. + * + * Normally you do not need to connect to this signal, unless you need to keep + * track of which folder a file chooser is showing. + * + * @see set_current_folder(), get_current_folder(), + * set_current_folder_uri(), get_current_folder_uri(). + */ + +/** + * @par Prototype: + * void %current_folder_changed() + */ Glib::SignalProxy0< void > signal_current_folder_changed(); + /** This signal is emitted when there is a change in the set of selected files + * in a #GtkFileChooser. This can happen when the user modifies the selection + * with the mouse or the keyboard, or when explicitly calling functions to + * change the selection. + * + * Normally you do not need to connect to this signal, as it is easier to wait + * for the file chooser to finish running, and then to get the list of + * selected files using the functions mentioned below. + * + * @see select_filename(), unselect_filename(), get_filename(), + * get_filenames(), select_uri(), + * unselect_uri(), get_uri(), + * get_uris(). + */ + +/** + * @par Prototype: + * void %selection_changed() + */ + Glib::SignalProxy0< void > signal_selection_changed(); + /** This signal is emitted when the preview in a file chooser should be + * regenerated. For example, this can happen when the currently selected file + * changes. You should use this signal if you want your file chooser to have + * a preview widget. + * + * Once you have installed a preview widget with + * set_preview_widget(), you should update it when this + * signal is emitted. You can use the functions + * get_preview_filename() or get_preview_uri() to get the name of the file to preview. + * Your widget may not be able to preview all kinds of files; your signal handler + * must call set_preview_wiget_active() to inform the file + * chooser about whether the preview was generated successfully or not. + * + * @see set_preview_widget(), set_preview_widget_active(), + * set_use_preview_label(), get_preview_filename(), get_preview_uri(). + */ + +/** + * @par Prototype: + * void %update_preview() + */ + Glib::SignalProxy0< void > signal_update_preview(); + /** This signal is emitted when the user "activates" a file in the file + * chooser. This can happen by double-clicking on a file in the file list, or + * by pressing Enter. + * + * Normally you do not need to connect to this signal. It is used internally + * by FileChooserDialog to know when to activate the default button in the + * dialog. + * + * @see get_filename(), get_filenames(), get_uri(), get_uris(). + */ + +/** + * @par Prototype: + * void %file_activated() + */ + Glib::SignalProxy0< void > signal_file_activated(); - /** + /** TODO + */ + +/** + * @par Prototype: + * FileChooserConfirmation %confirm_overwrite() + */ + + Glib::SignalProxy0< FileChooserConfirmation > signal_confirm_overwrite(); + + + #ifdef GLIBMM_PROPERTIES_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 property_action() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -757,16 +987,20 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_action() const; +#endif //#GLIBMM_PROPERTIES_ENABLED //TODO: _WRAP_PROPERTY("file-system", FileSystem) //FileSystem is not really public API. - /** + #ifdef GLIBMM_PROPERTIES_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 property_filter() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -774,15 +1008,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_filter() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_folder_mode() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -790,15 +1028,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_folder_mode() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_local_only() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -806,15 +1048,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_local_only() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_preview_widget() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -822,15 +1068,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_preview_widget() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_preview_widget_active() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -838,15 +1088,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_preview_widget_active() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_use_preview_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -854,15 +1108,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_preview_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_extra_widget() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -870,15 +1128,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_extra_widget() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_select_multiple() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -886,15 +1148,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_select_multiple() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** + #ifdef GLIBMM_PROPERTIES_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 property_show_hidden() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -902,17 +1168,44 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_show_hidden() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_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 property_do_overwrite_confirmation() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_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 property_do_overwrite_confirmation() const; +#endif //#GLIBMM_PROPERTIES_ENABLED public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; @@ -931,5 +1224,6 @@ namespace Glib } // namespace Glib + #endif /* _GTKMM_FILECHOOSER_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc index ebdc540ddd..730a0f70c4 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc +++ b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -88,8 +89,19 @@ void FileChooserButton_Class::class_init_function(void* g_class, void* class_dat BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FileChooserButton_Class::wrap_new(GObject* o) { @@ -158,7 +170,7 @@ Glib::ustring FileChooserButton::get_title() const void FileChooserButton::set_title(const Glib::ustring& title) { - gtk_file_chooser_button_set_title(gobj(), title.c_str()); +gtk_file_chooser_button_set_title(gobj(), title.c_str()); } int FileChooserButton::get_width_chars() const @@ -168,34 +180,75 @@ int FileChooserButton::get_width_chars() const void FileChooserButton::set_width_chars(int n_chars) { - gtk_file_chooser_button_set_width_chars(gobj(), n_chars); +gtk_file_chooser_button_set_width_chars(gobj(), n_chars); +} + +bool FileChooserButton::get_focus_on_click() const +{ + return gtk_file_chooser_button_get_focus_on_click(const_cast(gobj())); +} + +void FileChooserButton::set_focus_on_click(gboolean focus_on_click) +{ +gtk_file_chooser_button_set_focus_on_click(gobj(), focus_on_click); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooserButton::property_dialog() const { return Glib::PropertyProxy_ReadOnly(this, "dialog"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy FileChooserButton::property_focus_on_click() +{ + return Glib::PropertyProxy(this, "focus-on-click"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +Glib::PropertyProxy_ReadOnly FileChooserButton::property_focus_on_click() const +{ + return Glib::PropertyProxy_ReadOnly(this, "focus-on-click"); +} +#endif //GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooserButton::property_title() { return Glib::PropertyProxy(this, "title"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooserButton::property_title() const { return Glib::PropertyProxy_ReadOnly(this, "title"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileChooserButton::property_width_chars() { return Glib::PropertyProxy(this, "width-chars"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileChooserButton::property_width_chars() const { return Glib::PropertyProxy_ReadOnly(this, "width-chars"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h index 0865ac58e6..a6de8ea035 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h +++ b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FILECHOOSERBUTTON_H #define _GTKMM_FILECHOOSERBUTTON_H + #include /* $Id$ */ @@ -101,11 +102,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -146,13 +153,13 @@ public: * should not be modified or freed. * @return A pointer to the browse dialog's title. * - * Since: 2.6. + * @newin2p6. */ Glib::ustring get_title() const; /** Modifies the @a title of the browse dialog used by @a button . * - * Since: 2.6 + * @newin2p6 * @param title The new browse dialog title. */ void set_title(const Glib::ustring& title); @@ -161,35 +168,64 @@ public: /** 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. + * @newin2p6. */ 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. + * @newin2p6 + * @param n_chars The new width, in characters. */ void set_width_chars(int n_chars); + + bool get_focus_on_click() const; + + void set_focus_on_click(gboolean focus_on_click = true); - /** The file chooser dialog to use. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_dialog() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The title of the file chooser dialog. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_focus_on_click() ; +#endif //#GLIBMM_PROPERTIES_ENABLED + +#ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_focus_on_click() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_title() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -197,15 +233,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_title() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The desired width of the button widget + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_width_chars() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -213,6 +253,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_width_chars() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -229,6 +270,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FileChooserButton* wrap(GtkFileChooserButton* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FILECHOOSERBUTTON_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc index 88dc4078e5..dc48e4337c 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc +++ b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -111,8 +112,19 @@ void FileChooserDialog_Class::class_init_function(void* g_class, void* class_dat BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FileChooserDialog_Class::wrap_new(GObject* o) { @@ -153,6 +165,13 @@ GType FileChooserDialog::get_base_type() } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h index 08ba746815..e6c818c1dc 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h +++ b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FILECHOOSERDIALOG_H #define _GTKMM_FILECHOOSERDIALOG_H + #include /* $Id$ */ @@ -91,11 +92,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -124,6 +131,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FileChooserDialog* wrap(GtkFileChooserDialog* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FILECHOOSERDIALOG_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc index db14e802eb..59d9fece59 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc +++ b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -81,8 +82,19 @@ void FileChooserWidget_Class::class_init_function(void* g_class, void* class_dat BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FileChooserWidget_Class::wrap_new(GObject* o) { @@ -145,6 +157,13 @@ FileChooserWidget::FileChooserWidget(FileChooserAction action, const Glib::ustri } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h index fa8afffd6c..2a40a95b94 100644 --- a/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h +++ b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FILECHOOSERWIDGET_H #define _GTKMM_FILECHOOSERWIDGET_H + #include /* $Id$ */ @@ -96,11 +97,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -116,7 +123,7 @@ public: * * @param action Open or save mode for the widget * - * Since: 2.4 + * @newin2p4 */ explicit FileChooserWidget(FileChooserAction action); explicit FileChooserWidget(FileChooserAction action, const Glib::ustring& backend); @@ -135,6 +142,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FileChooserWidget* wrap(GtkFileChooserWidget* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FILECHOOSERWIDGET_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/filefilter.cc b/libs/gtkmm2/gtk/gtkmm/filefilter.cc index 72c921934d..4c6bc09958 100644 --- a/libs/gtkmm2/gtk/gtkmm/filefilter.cc +++ b/libs/gtkmm2/gtk/gtkmm/filefilter.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -26,41 +27,14 @@ #include #include //For gtk_file_filter_flags_get_type(). -namespace +static gboolean SignalProxy_Custom_gtk_callback(const GtkFileFilterInfo* filter_info, gpointer data) { + Gtk::FileFilter::SlotCustom* the_slot = static_cast(data); -//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(data); - + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED //Create a suitable C++ instance to pass to the C++ method: Gtk::FileFilter::Info cppInfo; cppInfo.contains = (Gtk::FileFilterFlags)filter_info->contains; @@ -69,35 +43,36 @@ gboolean SignalProxy_Custom::gtk_callback(const GtkFileFilterInfo* filter_info, 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); + return (*the_slot)(cppInfo); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); return false; //arbitrary default; } + #endif //GLIBMM_EXCEPTIONS_ENABLED } -void SignalProxy_Custom::gtk_callback_destroy(void* data) +static void SignalProxy_Custom_gtk_callback_destroy(void* data) { - delete static_cast(data); + delete static_cast(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. + //Create a copy of the slot. 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); + SlotCustom* slot_copy = new SlotCustom(slot); gtk_file_filter_add_custom(gobj(), (GtkFileFilterFlags)needed, - &SignalProxy_Custom::gtk_callback, - pSignalProxy, - &SignalProxy_Custom::gtk_callback_destroy); + &SignalProxy_Custom_gtk_callback, + slot_copy, + &SignalProxy_Custom_gtk_callback_destroy); } } // namespace Gtk @@ -155,8 +130,19 @@ void FileFilter_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FileFilter_Class::wrap_new(GObject* o) { @@ -206,7 +192,7 @@ FileFilter::FileFilter() void FileFilter::set_name(const Glib::ustring& name) { - gtk_file_filter_set_name(gobj(), name.c_str()); +gtk_file_filter_set_name(gobj(), name.c_str()); } Glib::ustring FileFilter::get_name() const @@ -216,17 +202,17 @@ Glib::ustring FileFilter::get_name() const void FileFilter::add_mime_type(const Glib::ustring& mime_type) { - gtk_file_filter_add_mime_type(gobj(), mime_type.c_str()); +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()); +gtk_file_filter_add_pattern(gobj(), pattern.c_str()); } void FileFilter::add_pixbuf_formats() { - gtk_file_filter_add_pixbuf_formats(gobj()); +gtk_file_filter_add_pixbuf_formats(gobj()); } FileFilterFlags FileFilter::get_needed() const @@ -235,6 +221,13 @@ FileFilterFlags FileFilter::get_needed() const } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/filefilter.h b/libs/gtkmm2/gtk/gtkmm/filefilter.h index 1800856266..fd5aadf8c4 100644 --- a/libs/gtkmm2/gtk/gtkmm/filefilter.h +++ b/libs/gtkmm2/gtk/gtkmm/filefilter.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FILEFILTER_H #define _GTKMM_FILEFILTER_H + #include /* $Id$ */ @@ -158,11 +159,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -175,7 +182,7 @@ public: * that will be displayed in the file selector user interface if * there is a selectable list of filters. * - * Since: 2.4 + * @newin2p4 * @param name The human-readable-name for the filter, or 0 * to remove any existing name. */ @@ -186,21 +193,21 @@ public: * or 0. This value is owned by GTK+ and must not * be modified or freed. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_name() const; /** Adds a rule allowing a given mime type to @a filter . * - * Since: 2.4 + * @newin2p4 * @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 + * @newin2p4 * @param pattern A shell style glob. */ void add_pattern(const Glib::ustring& pattern); @@ -208,7 +215,7 @@ public: /** Adds a rule allowing image files in the formats supported * by GdkPixbuf. * - * Since: 2.6 + * @newin2p6 */ void add_pixbuf_formats(); @@ -237,7 +244,7 @@ public: * @return Bitfield of flags indicating needed fields when * calling gtk_file_filter_filter() * - * Since: 2.4. + * @newin2p4. */ FileFilterFlags get_needed() const; @@ -259,6 +266,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FileFilter* wrap(GtkFileFilter* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FILEFILTER_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/fileselection.cc b/libs/gtkmm2/gtk/gtkmm/fileselection.cc index 9379da1c9f..4a5f387047 100644 --- a/libs/gtkmm2/gtk/gtkmm/fileselection.cc +++ b/libs/gtkmm2/gtk/gtkmm/fileselection.cc @@ -1,5 +1,8 @@ // Generated by gtkmmproc -- DO NOT MODIFY! +#ifndef GTKMM_DISABLE_DEPRECATED + + #include #include @@ -88,8 +91,19 @@ void FileSelection_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FileSelection_Class::wrap_new(GObject* o) { @@ -139,7 +153,7 @@ FileSelection::FileSelection(const Glib::ustring& title) void FileSelection::set_filename(const std::string& filename) { - gtk_file_selection_set_filename(gobj(), (filename).c_str()); +gtk_file_selection_set_filename(gobj(), (filename).c_str()); } std::string FileSelection::get_filename() const @@ -149,17 +163,17 @@ std::string FileSelection::get_filename() const void FileSelection::complete(const Glib::ustring& pattern) { - gtk_file_selection_complete(gobj(), pattern.c_str()); +gtk_file_selection_complete(gobj(), pattern.c_str()); } void FileSelection::show_fileop_buttons() { - gtk_file_selection_show_fileop_buttons(gobj()); +gtk_file_selection_show_fileop_buttons(gobj()); } void FileSelection::hide_fileop_buttons() { - gtk_file_selection_hide_fileop_buttons(gobj()); +gtk_file_selection_hide_fileop_buttons(gobj()); } Glib::ArrayHandle FileSelection::get_selections() const @@ -169,7 +183,7 @@ Glib::ArrayHandle FileSelection::get_selections() const void FileSelection::set_select_multiple(bool select_multiple) { - gtk_file_selection_set_select_multiple(gobj(), static_cast(select_multiple)); +gtk_file_selection_set_select_multiple(gobj(), static_cast(select_multiple)); } bool FileSelection::get_select_multiple() const @@ -177,7 +191,7 @@ bool FileSelection::get_select_multiple() const return gtk_file_selection_get_select_multiple(const_cast(gobj())); } -TreeView* FileSelection::get_dir_list() + TreeView* FileSelection::get_dir_list() { return Glib::wrap((GtkTreeView*)(gobj()->dir_list)); } @@ -186,8 +200,8 @@ const TreeView* FileSelection::get_dir_list() const { return Glib::wrap((GtkTreeView*)(gobj()->dir_list)); } - -TreeView* FileSelection::get_file_list() + + TreeView* FileSelection::get_file_list() { return Glib::wrap((GtkTreeView*)(gobj()->file_list)); } @@ -196,8 +210,8 @@ const TreeView* FileSelection::get_file_list() const { return Glib::wrap((GtkTreeView*)(gobj()->file_list)); } - -OptionMenu* FileSelection::get_history_pulldown() + + OptionMenu* FileSelection::get_history_pulldown() { return Glib::wrap((GtkOptionMenu*)(gobj()->history_pulldown)); } @@ -206,8 +220,8 @@ const OptionMenu* FileSelection::get_history_pulldown() const { return Glib::wrap((GtkOptionMenu*)(gobj()->history_pulldown)); } - -Entry* FileSelection::get_selection_entry() + + Entry* FileSelection::get_selection_entry() { return Glib::wrap((GtkEntry*)(gobj()->selection_entry)); } @@ -216,8 +230,8 @@ const Entry* FileSelection::get_selection_entry() const { return Glib::wrap((GtkEntry*)(gobj()->selection_entry)); } - -Label* FileSelection::get_selection_text() + + Label* FileSelection::get_selection_text() { return Glib::wrap((GtkLabel*)(gobj()->selection_text)); } @@ -226,8 +240,8 @@ const Label* FileSelection::get_selection_text() const { return Glib::wrap((GtkLabel*)(gobj()->selection_text)); } - -VBox* FileSelection::get_main_vbox() + + VBox* FileSelection::get_main_vbox() { return Glib::wrap((GtkVBox*)(gobj()->main_vbox)); } @@ -236,8 +250,8 @@ const VBox* FileSelection::get_main_vbox() const { return Glib::wrap((GtkVBox*)(gobj()->main_vbox)); } - -Button* FileSelection::get_ok_button() + + Button* FileSelection::get_ok_button() { return Glib::wrap((GtkButton*)(gobj()->ok_button)); } @@ -246,8 +260,8 @@ const Button* FileSelection::get_ok_button() const { return Glib::wrap((GtkButton*)(gobj()->ok_button)); } - -Button* FileSelection::get_cancel_button() + + Button* FileSelection::get_cancel_button() { return Glib::wrap((GtkButton*)(gobj()->cancel_button)); } @@ -256,8 +270,8 @@ const Button* FileSelection::get_cancel_button() const { return Glib::wrap((GtkButton*)(gobj()->cancel_button)); } - -Button* FileSelection::get_help_button() + + Button* FileSelection::get_help_button() { return Glib::wrap((GtkButton*)(gobj()->help_button)); } @@ -266,8 +280,8 @@ const Button* FileSelection::get_help_button() const { return Glib::wrap((GtkButton*)(gobj()->help_button)); } - -HButtonBox* FileSelection::get_button_area() + + HButtonBox* FileSelection::get_button_area() { return Glib::wrap((GtkHButtonBox*)(gobj()->button_area)); } @@ -276,8 +290,8 @@ const HButtonBox* FileSelection::get_button_area() const { return Glib::wrap((GtkHButtonBox*)(gobj()->button_area)); } - -HBox* FileSelection::get_action_area() + + HBox* FileSelection::get_action_area() { return Glib::wrap((GtkHBox*)(gobj()->action_area)); } @@ -286,39 +300,60 @@ const HBox* FileSelection::get_action_area() const { return Glib::wrap((GtkHBox*)(gobj()->action_area)); } + - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileSelection::property_show_fileops() { return Glib::PropertyProxy(this, "show-fileops"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileSelection::property_show_fileops() const { return Glib::PropertyProxy_ReadOnly(this, "show-fileops"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileSelection::property_filename() { return Glib::PropertyProxy(this, "filename"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileSelection::property_filename() const { return Glib::PropertyProxy_ReadOnly(this, "filename"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FileSelection::property_select_multiple() { return Glib::PropertyProxy(this, "select-multiple"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FileSelection::property_select_multiple() const { return Glib::PropertyProxy_ReadOnly(this, "select-multiple"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk +#endif // GTKMM_DISABLE_DEPRECATED + diff --git a/libs/gtkmm2/gtk/gtkmm/fileselection.h b/libs/gtkmm2/gtk/gtkmm/fileselection.h index 6a5e734362..5923b16da0 100644 --- a/libs/gtkmm2/gtk/gtkmm/fileselection.h +++ b/libs/gtkmm2/gtk/gtkmm/fileselection.h @@ -3,6 +3,9 @@ #ifndef _GTKMM_FILESELECTION_H #define _GTKMM_FILESELECTION_H +#ifndef GTKMM_DISABLE_DEPRECATED + + #include /* $Id$ */ @@ -103,11 +106,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -179,37 +188,40 @@ public: bool get_select_multiple() const; //: Accessors - TreeView* get_dir_list(); + TreeView* get_dir_list(); const TreeView* get_dir_list() const; - TreeView* get_file_list(); + TreeView* get_file_list(); const TreeView* get_file_list() const; - OptionMenu* get_history_pulldown(); + OptionMenu* get_history_pulldown(); const OptionMenu* get_history_pulldown() const; - Entry* get_selection_entry(); + Entry* get_selection_entry(); const Entry* get_selection_entry() const; - Label* get_selection_text(); + Label* get_selection_text(); const Label* get_selection_text() const; - VBox* get_main_vbox(); + VBox* get_main_vbox(); const VBox* get_main_vbox() const; - Button* get_ok_button(); + Button* get_ok_button(); const Button* get_ok_button() const; - Button* get_cancel_button(); + Button* get_cancel_button(); const Button* get_cancel_button() const; - Button* get_help_button(); + Button* get_help_button(); const Button* get_help_button() const; - HButtonBox* get_button_area(); + HButtonBox* get_button_area(); const HButtonBox* get_button_area() const; - HBox* get_action_area(); + HBox* get_action_area(); const HBox* get_action_area() const; - - /** Whether buttons for creating/manipulating files should be displayed. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_show_fileops() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -217,15 +229,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_show_fileops() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The currently selected filename. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_filename() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The currently selected filename. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -233,15 +249,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_filename() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether to allow multiple files to be selected. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_select_multiple() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -249,11 +269,11 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_select_multiple() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; - } // namespace Gtk @@ -265,6 +285,11 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FileSelection* wrap(GtkFileSelection* object, bool take_copy = false); -} +} //namespace Glib + + +#endif // GTKMM_DISABLE_DEPRECATED + + #endif /* _GTKMM_FILESELECTION_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/fixed.cc b/libs/gtkmm2/gtk/gtkmm/fixed.cc index 9edbae969a..9b522f3579 100644 --- a/libs/gtkmm2/gtk/gtkmm/fixed.cc +++ b/libs/gtkmm2/gtk/gtkmm/fixed.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -78,8 +79,19 @@ void Fixed_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* Fixed_Class::wrap_new(GObject* o) { @@ -129,17 +141,17 @@ Fixed::Fixed() void Fixed::put(Widget& widget, int x, int y) { - gtk_fixed_put(gobj(), (widget).gobj(), x, 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); +gtk_fixed_move(gobj(), (widget).gobj(), x, y); } void Fixed::set_has_window(bool has_window) { - gtk_fixed_set_has_window(gobj(), static_cast(has_window)); +gtk_fixed_set_has_window(gobj(), static_cast(has_window)); } bool Fixed::get_has_window() const @@ -148,6 +160,13 @@ bool Fixed::get_has_window() const } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/fixed.h b/libs/gtkmm2/gtk/gtkmm/fixed.h index c7b334a238..d0f8eeeb98 100644 --- a/libs/gtkmm2/gtk/gtkmm/fixed.h +++ b/libs/gtkmm2/gtk/gtkmm/fixed.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FIXED_H #define _GTKMM_FIXED_H + #include /* $Id$ */ @@ -98,11 +99,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -116,10 +123,13 @@ public: 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 + * Gdk::Window for @a 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. + * + * This function was added to provide an easy migration path for + * older applications which may expect Gtk::Fixed to have a separate window. * @param has_window true if a separate window should be created. */ void set_has_window(bool has_window = true); @@ -144,6 +154,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Fixed* wrap(GtkFixed* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FIXED_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/fontbutton.cc b/libs/gtkmm2/gtk/gtkmm/fontbutton.cc index 4644534f21..731ad35b1d 100644 --- a/libs/gtkmm2/gtk/gtkmm/fontbutton.cc +++ b/libs/gtkmm2/gtk/gtkmm/fontbutton.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -37,13 +38,15 @@ namespace Gtk namespace { -const Glib::SignalProxyInfo FontButton_signal_font_set_info = + +static const Glib::SignalProxyInfo FontButton_signal_font_set_info = { "font-set", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; + } // anonymous namespace @@ -88,10 +91,18 @@ void FontButton_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->font_set = &font_set_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void FontButton_Class::font_set_callback(GtkFontButton* self) { CppObjectType *const obj = dynamic_cast( @@ -104,15 +115,19 @@ void FontButton_Class::font_set_callback(GtkFontButton* self) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_font_set(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -125,6 +140,7 @@ void FontButton_Class::font_set_callback(GtkFontButton* self) (*base->font_set)(self); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* FontButton_Class::wrap_new(GObject* o) @@ -173,10 +189,10 @@ FontButton::FontButton() { } -FontButton::FontButton(const Glib::ustring& fontname) +FontButton::FontButton(const Glib::ustring& font_name) : 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)) + Gtk::Button(Glib::ConstructParams(fontbutton_class_.init(), "font_name", font_name.c_str(), (char*) 0)) { } @@ -187,7 +203,7 @@ Glib::ustring FontButton::get_title() const void FontButton::set_title(const Glib::ustring& title) { - gtk_font_button_set_title(gobj(), title.c_str()); +gtk_font_button_set_title(gobj(), title.c_str()); } bool FontButton::get_use_font() const @@ -197,7 +213,7 @@ bool FontButton::get_use_font() const void FontButton::set_use_font(bool use_font) { - gtk_font_button_set_use_font(gobj(), static_cast(use_font)); +gtk_font_button_set_use_font(gobj(), static_cast(use_font)); } bool FontButton::get_use_size() const @@ -207,7 +223,7 @@ bool FontButton::get_use_size() const void FontButton::set_use_size(bool use_size) { - gtk_font_button_set_use_size(gobj(), static_cast(use_size)); +gtk_font_button_set_use_size(gobj(), static_cast(use_size)); } Glib::ustring FontButton::get_font_name() const @@ -227,7 +243,7 @@ bool FontButton::get_show_style() const void FontButton::set_show_style(bool show_style) { - gtk_font_button_set_show_style(gobj(), static_cast(show_style)); +gtk_font_button_set_show_style(gobj(), static_cast(show_style)); } bool FontButton::get_show_size() const @@ -237,7 +253,7 @@ bool FontButton::get_show_size() const void FontButton::set_show_size(bool show_size) { - gtk_font_button_set_show_size(gobj(), static_cast(show_size)); +gtk_font_button_set_show_size(gobj(), static_cast(show_size)); } @@ -247,67 +263,92 @@ Glib::SignalProxy0< void > FontButton::signal_font_set() } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontButton::property_title() { return Glib::PropertyProxy(this, "title"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontButton::property_title() const { return Glib::PropertyProxy_ReadOnly(this, "title"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontButton::property_font_name() { return Glib::PropertyProxy(this, "font-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontButton::property_font_name() const { return Glib::PropertyProxy_ReadOnly(this, "font-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontButton::property_use_font() { return Glib::PropertyProxy(this, "use-font"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontButton::property_use_font() const { return Glib::PropertyProxy_ReadOnly(this, "use-font"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontButton::property_use_size() { return Glib::PropertyProxy(this, "use-size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontButton::property_use_size() const { return Glib::PropertyProxy_ReadOnly(this, "use-size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontButton::property_show_style() { return Glib::PropertyProxy(this, "show-style"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontButton::property_show_style() const { return Glib::PropertyProxy_ReadOnly(this, "show-style"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontButton::property_show_size() { return Glib::PropertyProxy(this, "show-size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontButton::property_show_size() const { return Glib::PropertyProxy_ReadOnly(this, "show-size"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::FontButton::on_font_set() { BaseClassType *const base = static_cast( @@ -317,6 +358,10 @@ void Gtk::FontButton::on_font_set() if(base && base->font_set) (*base->font_set)(gobj()); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/fontbutton.h b/libs/gtkmm2/gtk/gtkmm/fontbutton.h index 79edaa1d02..5ac3bbd8a1 100644 --- a/libs/gtkmm2/gtk/gtkmm/fontbutton.h +++ b/libs/gtkmm2/gtk/gtkmm/fontbutton.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FONTBUTTON_H #define _GTKMM_FONTBUTTON_H + #include /* $Id$ */ @@ -91,31 +92,37 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_font_set(); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: public: FontButton(); - explicit FontButton(const Glib::ustring& fontname); + explicit FontButton(const Glib::ustring& font_name); /** Retrieves the title of the font selection dialog. * @return An internal copy of the title string which must not be freed. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_title() const; /** Sets the title for the font selection dialog. * - * Since: 2.4 + * @newin2p4 * @param title A string containing the font selection dialog title. */ void set_title(const Glib::ustring& title); @@ -123,13 +130,13 @@ public: /** Returns whether the selected font is used in the label. * @return Whether the selected font is used in the label. * - * Since: 2.4. + * @newin2p4. */ bool get_use_font() const; /** If @a use_font is true, the font name will be written using the selected font. * - * Since: 2.4 + * @newin2p4 * @param use_font If true, font name will be written using font chosen. */ void set_use_font(bool use_font = true); @@ -137,13 +144,13 @@ public: /** Returns whether the selected size is used in the label. * @return Whether the selected size is used in the label. * - * Since: 2.4. + * @newin2p4. */ bool get_use_size() const; /** If @a use_size is true, the font name will be written using the selected size. * - * Since: 2.4 + * @newin2p4 * @param use_size If true, font name will be written using the selected size. */ void set_use_size(bool use_size = true); @@ -151,7 +158,7 @@ public: /** Retrieves the name of the currently selected font. * @return An internal copy of the font name which must not be freed. * - * Since: 2.4. + * @newin2p4. */ Glib::ustring get_font_name() const; @@ -160,20 +167,20 @@ public: * @return Return value of Gtk::FontSelectionDialog::set_font_name() if the * font selection dialog exists, otherwise false. * - * Since: 2.4. + * @newin2p4. */ 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. + * @newin2p4. */ bool get_show_style() const; /** If @a show_style is true, the font style will be displayed along with name of the selected font. * - * Since: 2.4 + * @newin2p4 * @param show_style true if font style should be displayed in label. */ void set_show_style(bool show_style = true); @@ -181,25 +188,28 @@ public: /** 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. + * @newin2p4. */ bool get_show_size() const; /** If @a show_size is true, the font size will be displayed along with the name of the selected font. * - * Since: 2.4 + * @newin2p4 * @param show_size true if font size should be displayed in dialog. */ void set_show_size(bool show_size = true); - /** The title of the font selection dialog. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_title() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -207,15 +217,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_title() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The name of the selected font. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_font_name() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The name of the selected font. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -223,15 +237,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_font_name() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the label is drawn in the selected font. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_font() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -239,15 +257,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_font() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the label is drawn with the selected font size. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_use_size() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -255,15 +277,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_use_size() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether the selected font style is shown in the label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_show_style() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -271,15 +297,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_show_style() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Whether selected font size is shown in the label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_show_size() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -287,8 +317,18 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_show_size() const; +#endif //#GLIBMM_PROPERTIES_ENABLED + /** The font_set signal is emitted when the user selects a font. When handling this signal, + * use get_font_name() to find out which font was just selected. + */ + +/** + * @par Prototype: + * void %font_set() + */ + Glib::SignalProxy0< void > signal_font_set(); @@ -306,6 +346,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FontButton* wrap(GtkFontButton* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FONTBUTTON_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/fontselection.cc b/libs/gtkmm2/gtk/gtkmm/fontselection.cc index 45ccfcee76..cf9e9799d4 100644 --- a/libs/gtkmm2/gtk/gtkmm/fontselection.cc +++ b/libs/gtkmm2/gtk/gtkmm/fontselection.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -75,8 +76,19 @@ void FontSelection_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FontSelection_Class::wrap_new(GObject* o) { @@ -141,10 +153,10 @@ Glib::ustring FontSelection::get_preview_text() const void FontSelection::set_preview_text(const Glib::ustring& fontname) { - gtk_font_selection_set_preview_text(gobj(), fontname.c_str()); +gtk_font_selection_set_preview_text(gobj(), fontname.c_str()); } -Entry* FontSelection::get_font_entry() + Entry* FontSelection::get_font_entry() { return Glib::wrap((GtkEntry*)(gobj()->font_entry)); } @@ -153,8 +165,8 @@ const Entry* FontSelection::get_font_entry() const { return Glib::wrap((GtkEntry*)(gobj()->font_entry)); } - -Entry* FontSelection::get_font_style_entry() + + Entry* FontSelection::get_font_style_entry() { return Glib::wrap((GtkEntry*)(gobj()->font_style_entry)); } @@ -163,8 +175,8 @@ const Entry* FontSelection::get_font_style_entry() const { return Glib::wrap((GtkEntry*)(gobj()->font_style_entry)); } - -Entry* FontSelection::get_size_entry() + + Entry* FontSelection::get_size_entry() { return Glib::wrap((GtkEntry*)(gobj()->size_entry)); } @@ -173,8 +185,8 @@ const Entry* FontSelection::get_size_entry() const { return Glib::wrap((GtkEntry*)(gobj()->size_entry)); } - -RadioButton* FontSelection::get_pixels_button() + + RadioButton* FontSelection::get_pixels_button() { return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button)); } @@ -183,8 +195,8 @@ const RadioButton* FontSelection::get_pixels_button() const { return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button)); } - -RadioButton* FontSelection::get_points_button() + + RadioButton* FontSelection::get_points_button() { return Glib::wrap((GtkRadioButton*)(gobj()->points_button)); } @@ -193,8 +205,8 @@ const RadioButton* FontSelection::get_points_button() const { return Glib::wrap((GtkRadioButton*)(gobj()->points_button)); } - -Button* FontSelection::get_filter_button() + + Button* FontSelection::get_filter_button() { return Glib::wrap((GtkButton*)(gobj()->filter_button)); } @@ -203,8 +215,8 @@ const Button* FontSelection::get_filter_button() const { return Glib::wrap((GtkButton*)(gobj()->filter_button)); } - -Entry* FontSelection::get_preview_entry() + + Entry* FontSelection::get_preview_entry() { return Glib::wrap((GtkEntry*)(gobj()->preview_entry)); } @@ -213,27 +225,42 @@ const Entry* FontSelection::get_preview_entry() const { return Glib::wrap((GtkEntry*)(gobj()->preview_entry)); } + - +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontSelection::property_font_name() { return Glib::PropertyProxy(this, "font-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontSelection::property_font_name() const { return Glib::PropertyProxy_ReadOnly(this, "font-name"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy FontSelection::property_preview_text() { return Glib::PropertyProxy(this, "preview-text"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly FontSelection::property_preview_text() const { return Glib::PropertyProxy_ReadOnly(this, "preview-text"); } +#endif //GLIBMM_PROPERTIES_ENABLED + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk @@ -280,8 +307,19 @@ void FontSelectionDialog_Class::class_init_function(void* g_class, void* class_d BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* FontSelectionDialog_Class::wrap_new(GObject* o) { @@ -352,10 +390,10 @@ Glib::ustring FontSelectionDialog::get_preview_text() const void FontSelectionDialog::set_preview_text(const Glib::ustring& fontname) { - gtk_font_selection_dialog_set_preview_text(gobj(), fontname.c_str()); +gtk_font_selection_dialog_set_preview_text(gobj(), fontname.c_str()); } -FontSelection* FontSelectionDialog::get_font_selection() + FontSelection* FontSelectionDialog::get_font_selection() { return Glib::wrap((GtkFontSelection*)(gobj()->fontsel)); } @@ -364,8 +402,8 @@ const FontSelection* FontSelectionDialog::get_font_selection() const { return Glib::wrap((GtkFontSelection*)(gobj()->fontsel)); } - -Button* FontSelectionDialog::get_ok_button() + + Button* FontSelectionDialog::get_ok_button() { return Glib::wrap((GtkButton*)(gobj()->ok_button)); } @@ -374,8 +412,8 @@ const Button* FontSelectionDialog::get_ok_button() const { return Glib::wrap((GtkButton*)(gobj()->ok_button)); } - -Button* FontSelectionDialog::get_apply_button() + + Button* FontSelectionDialog::get_apply_button() { return Glib::wrap((GtkButton*)(gobj()->apply_button)); } @@ -384,8 +422,8 @@ const Button* FontSelectionDialog::get_apply_button() const { return Glib::wrap((GtkButton*)(gobj()->apply_button)); } - -Button* FontSelectionDialog::get_cancel_button() + + Button* FontSelectionDialog::get_cancel_button() { return Glib::wrap((GtkButton*)(gobj()->cancel_button)); } @@ -394,6 +432,13 @@ const Button* FontSelectionDialog::get_cancel_button() const { return Glib::wrap((GtkButton*)(gobj()->cancel_button)); } + + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/fontselection.h b/libs/gtkmm2/gtk/gtkmm/fontselection.h index ae0b9045d6..f1afc19017 100644 --- a/libs/gtkmm2/gtk/gtkmm/fontselection.h +++ b/libs/gtkmm2/gtk/gtkmm/fontselection.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FONTSELECTION_H #define _GTKMM_FONTSELECTION_H + #include /* $Id$ */ @@ -106,11 +107,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -129,31 +136,34 @@ public: void set_preview_text(const Glib::ustring& fontname); // Font page - Entry* get_font_entry(); + Entry* get_font_entry(); const Entry* get_font_entry() const; - Entry* get_font_style_entry(); + Entry* get_font_style_entry(); const Entry* get_font_style_entry() const; - Entry* get_size_entry(); + Entry* get_size_entry(); const Entry* get_size_entry() const; - - RadioButton* get_pixels_button(); + + RadioButton* get_pixels_button(); const RadioButton* get_pixels_button() const; - RadioButton* get_points_button(); + RadioButton* get_points_button(); const RadioButton* get_points_button() const; - Button* get_filter_button(); + Button* get_filter_button(); const Button* get_filter_button() const; - - Entry* get_preview_entry(); + + Entry* get_preview_entry(); const Entry* get_preview_entry() const; - - /** The X string that represents this font. + + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_font_name() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -161,15 +171,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_font_name() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The text to display in order to demonstrate the selected font. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_preview_text() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -177,6 +191,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_preview_text() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -231,11 +246,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -255,15 +276,15 @@ public: void set_preview_text(const Glib::ustring& fontname); - FontSelection* get_font_selection(); + FontSelection* get_font_selection(); const FontSelection* get_font_selection() const; - Button* get_ok_button(); + Button* get_ok_button(); const Button* get_ok_button() const; - Button* get_apply_button(); + Button* get_apply_button(); const Button* get_apply_button() const; - Button* get_cancel_button(); + Button* get_cancel_button(); const Button* get_cancel_button() const; - + }; @@ -278,7 +299,9 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FontSelection* wrap(GtkFontSelection* object, bool take_copy = false); -} +} //namespace Glib + + namespace Glib { /** @relates Gtk::FontSelectionDialog @@ -287,6 +310,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::FontSelectionDialog* wrap(GtkFontSelectionDialog* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FONTSELECTION_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/frame.cc b/libs/gtkmm2/gtk/gtkmm/frame.cc index d24fa422c7..03df181272 100644 --- a/libs/gtkmm2/gtk/gtkmm/frame.cc +++ b/libs/gtkmm2/gtk/gtkmm/frame.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -82,9 +83,15 @@ void Frame_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED klass->compute_child_allocation = &compute_child_allocation_vfunc_callback; +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED void Frame_Class::compute_child_allocation_vfunc_callback(GtkFrame* self, GtkAllocation* allocation) { CppObjectType *const obj = dynamic_cast( @@ -97,16 +104,20 @@ void Frame_Class::compute_child_allocation_vfunc_callback(GtkFrame* self, GtkAll // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->compute_child_allocation_vfunc((Allocation&)(Glib::wrap(allocation)) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -119,6 +130,10 @@ void Frame_Class::compute_child_allocation_vfunc_callback(GtkFrame* self, GtkAll (*base->compute_child_allocation)(self, allocation); } } +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Frame_Class::wrap_new(GObject* o) @@ -176,7 +191,7 @@ Frame::Frame(const Glib::ustring& label) void Frame::set_label(const Glib::ustring& label) { - gtk_frame_set_label(gobj(), label.c_str()); +gtk_frame_set_label(gobj(), label.c_str()); } Glib::ustring Frame::get_label() const @@ -186,7 +201,7 @@ Glib::ustring Frame::get_label() const void Frame::set_label_widget(Widget& label_widget) { - gtk_frame_set_label_widget(gobj(), (label_widget).gobj()); +gtk_frame_set_label_widget(gobj(), (label_widget).gobj()); } Widget* Frame::get_label_widget() @@ -196,27 +211,27 @@ Widget* Frame::get_label_widget() const Widget* Frame::get_label_widget() const { - return Glib::wrap(gtk_frame_get_label_widget(const_cast(gobj()))); + return const_cast(this)->get_label_widget(); } void Frame::set_label_align(float xalign, float yalign) { - gtk_frame_set_label_align(gobj(), xalign, 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)); +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(gobj()), &(xalign), &(yalign)); +gtk_frame_get_label_align(const_cast(gobj()), &(xalign), &(yalign)); } void Frame::set_shadow_type(ShadowType type) { - gtk_frame_set_shadow_type(gobj(), ((GtkShadowType)(type))); +gtk_frame_set_shadow_type(gobj(), ((GtkShadowType)(type))); } ShadowType Frame::get_shadow_type() const @@ -225,57 +240,81 @@ ShadowType Frame::get_shadow_type() const } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Frame::property_label() { return Glib::PropertyProxy(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Frame::property_label() const { return Glib::PropertyProxy_ReadOnly(this, "label"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Frame::property_label_xalign() { return Glib::PropertyProxy(this, "label-xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Frame::property_label_xalign() const { return Glib::PropertyProxy_ReadOnly(this, "label-xalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Frame::property_label_yalign() { return Glib::PropertyProxy(this, "label-yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Frame::property_label_yalign() const { return Glib::PropertyProxy_ReadOnly(this, "label-yalign"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Frame::property_shadow_type() { return Glib::PropertyProxy(this, "shadow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Frame::property_shadow_type() const { return Glib::PropertyProxy_ReadOnly(this, "shadow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Frame::property_label_widget() { return Glib::PropertyProxy(this, "label-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Frame::property_label_widget() const { return Glib::PropertyProxy_ReadOnly(this, "label-widget"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED void Gtk::Frame::compute_child_allocation_vfunc(Allocation& allocation) { BaseClassType *const base = static_cast( @@ -285,6 +324,7 @@ void Gtk::Frame::compute_child_allocation_vfunc(Allocation& allocation) if(base && base->compute_child_allocation) (*base->compute_child_allocation)(gobj(),(GtkAllocation*)(allocation.gobj())); } +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/frame.h b/libs/gtkmm2/gtk/gtkmm/frame.h index aaac3dd63c..d67fab075c 100644 --- a/libs/gtkmm2/gtk/gtkmm/frame.h +++ b/libs/gtkmm2/gtk/gtkmm/frame.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_FRAME_H #define _GTKMM_FRAME_H + #include /* $Id$ */ @@ -95,11 +96,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -202,14 +209,17 @@ public: */ ShadowType get_shadow_type() const; - /** Text of the frame's label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Text of the frame's label. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -217,15 +227,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The horizontal alignment of the label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label_xalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The horizontal alignment of the label. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -233,15 +247,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label_xalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** The vertical alignment of the label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label_yalign() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** The vertical alignment of the label. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -249,15 +267,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label_yalign() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Appearance of the frame border. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_shadow_type() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** Appearance of the frame border. * * You rarely need to use properties because there are get_ and set_ methods for almost all of them. @@ -265,15 +287,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_shadow_type() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** A widget to display in place of the usual frame label. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_label_widget() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -281,10 +307,13 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_label_widget() const; +#endif //#GLIBMM_PROPERTIES_ENABLED protected: - virtual void compute_child_allocation_vfunc(Allocation& allocation); + #ifdef GLIBMM_VFUNCS_ENABLED + virtual void compute_child_allocation_vfunc(Allocation& allocation); +#endif //GLIBMM_VFUNCS_ENABLED }; @@ -300,6 +329,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::Frame* wrap(GtkFrame* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_FRAME_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/handlebox.cc b/libs/gtkmm2/gtk/gtkmm/handlebox.cc index 86c2a0fe9c..2e4000b1f7 100644 --- a/libs/gtkmm2/gtk/gtkmm/handlebox.cc +++ b/libs/gtkmm2/gtk/gtkmm/handlebox.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -57,7 +58,8 @@ bool HandleBox::shrinks_on_detach() const namespace { -void HandleBox_signal_child_attached_callback(GtkHandleBox* self, GtkWidget* p0,void* data) + +static void HandleBox_signal_child_attached_callback(GtkHandleBox* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget* > SlotType; @@ -65,20 +67,24 @@ void HandleBox_signal_child_attached_callback(GtkHandleBox* self, GtkWidget* p0, // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo HandleBox_signal_child_attached_info = +static const Glib::SignalProxyInfo HandleBox_signal_child_attached_info = { "child_attached", (GCallback) &HandleBox_signal_child_attached_callback, @@ -86,7 +92,7 @@ const Glib::SignalProxyInfo HandleBox_signal_child_attached_info = }; -void HandleBox_signal_child_detached_callback(GtkHandleBox* self, GtkWidget* p0,void* data) +static void HandleBox_signal_child_detached_callback(GtkHandleBox* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget* > SlotType; @@ -94,26 +100,31 @@ void HandleBox_signal_child_detached_callback(GtkHandleBox* self, GtkWidget* p0, // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } } -const Glib::SignalProxyInfo HandleBox_signal_child_detached_info = +static const Glib::SignalProxyInfo HandleBox_signal_child_detached_info = { "child_detached", (GCallback) &HandleBox_signal_child_detached_callback, (GCallback) &HandleBox_signal_child_detached_callback }; + } // anonymous namespace @@ -158,11 +169,19 @@ void HandleBox_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->child_attached = &child_attached_callback; klass->child_detached = &child_detached_callback; +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void HandleBox_Class::child_attached_callback(GtkHandleBox* self, GtkWidget* p0) { CppObjectType *const obj = dynamic_cast( @@ -175,16 +194,20 @@ void HandleBox_Class::child_attached_callback(GtkHandleBox* self, GtkWidget* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_child_attached(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -197,7 +220,6 @@ void HandleBox_Class::child_attached_callback(GtkHandleBox* self, GtkWidget* p0) (*base->child_attached)(self, p0); } } - void HandleBox_Class::child_detached_callback(GtkHandleBox* self, GtkWidget* p0) { CppObjectType *const obj = dynamic_cast( @@ -210,16 +232,20 @@ void HandleBox_Class::child_detached_callback(GtkHandleBox* self, GtkWidget* p0) // being overridden: if(obj && obj->is_derived_()) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_child_detached(Glib::wrap(p0) ); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED } else { @@ -232,6 +258,7 @@ void HandleBox_Class::child_detached_callback(GtkHandleBox* self, GtkWidget* p0) (*base->child_detached)(self, p0); } } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* HandleBox_Class::wrap_new(GObject* o) @@ -282,7 +309,7 @@ HandleBox::HandleBox() void HandleBox::set_shadow_type(ShadowType type) { - gtk_handle_box_set_shadow_type(gobj(), ((GtkShadowType)(type))); +gtk_handle_box_set_shadow_type(gobj(), ((GtkShadowType)(type))); } ShadowType HandleBox::get_shadow_type() const @@ -292,7 +319,7 @@ ShadowType HandleBox::get_shadow_type() const void HandleBox::set_handle_position(PositionType position) { - gtk_handle_box_set_handle_position(gobj(), ((GtkPositionType)(position))); +gtk_handle_box_set_handle_position(gobj(), ((GtkPositionType)(position))); } PositionType HandleBox::get_handle_position() const @@ -302,7 +329,7 @@ PositionType HandleBox::get_handle_position() const void HandleBox::set_snap_edge(PositionType edge) { - gtk_handle_box_set_snap_edge(gobj(), ((GtkPositionType)(edge))); +gtk_handle_box_set_snap_edge(gobj(), ((GtkPositionType)(edge))); } PositionType HandleBox::get_snap_edge() const @@ -310,7 +337,7 @@ PositionType HandleBox::get_snap_edge() const return ((PositionType)(gtk_handle_box_get_snap_edge(const_cast(gobj())))); } -Glib::RefPtr HandleBox::get_bin_window() + Glib::RefPtr HandleBox::get_bin_window() { Glib::RefPtr ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window))); @@ -329,8 +356,8 @@ Glib::RefPtr HandleBox::get_bin_window() const return ref_ptr; } - -Glib::RefPtr HandleBox::get_float_window() + + Glib::RefPtr HandleBox::get_float_window() { Glib::RefPtr ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->float_window))); @@ -349,50 +376,64 @@ Glib::RefPtr HandleBox::get_float_window() const 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); } +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy HandleBox::property_shadow_type() { return Glib::PropertyProxy(this, "shadow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly HandleBox::property_shadow_type() const { return Glib::PropertyProxy_ReadOnly(this, "shadow-type"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy HandleBox::property_handle_position() { return Glib::PropertyProxy(this, "handle-position"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly HandleBox::property_handle_position() const { return Glib::PropertyProxy_ReadOnly(this, "handle-position"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy HandleBox::property_snap_edge() { return Glib::PropertyProxy(this, "snap-edge"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly HandleBox::property_snap_edge() const { return Glib::PropertyProxy_ReadOnly(this, "snap-edge"); } +#endif //GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::HandleBox::on_child_attached(Widget* child) { BaseClassType *const base = static_cast( @@ -402,7 +443,6 @@ void Gtk::HandleBox::on_child_attached(Widget* child) 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( @@ -412,6 +452,10 @@ void Gtk::HandleBox::on_child_detached(Widget* child) if(base && base->child_detached) (*base->child_detached)(gobj(),(GtkWidget*)Glib::unwrap(child)); } +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/handlebox.h b/libs/gtkmm2/gtk/gtkmm/handlebox.h index 89d4614bfc..fe211425e2 100644 --- a/libs/gtkmm2/gtk/gtkmm/handlebox.h +++ b/libs/gtkmm2/gtk/gtkmm/handlebox.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_HANDLEBOX_H #define _GTKMM_HANDLEBOX_H + #include /* $Id$ */ @@ -95,13 +96,19 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED virtual void on_child_attached(Widget* child); virtual void on_child_detached(Widget* child); +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED private: @@ -136,31 +143,44 @@ public: PositionType get_snap_edge() const; +/** + * @par Prototype: + * void %child_attached(Widget* child) + */ + Glib::SignalProxy1< void,Widget* > signal_child_attached(); +/** + * @par Prototype: + * void %child_detached(Widget* child) + */ + Glib::SignalProxy1< void,Widget* > signal_child_detached(); - Glib::RefPtr get_bin_window(); + Glib::RefPtr get_bin_window(); Glib::RefPtr get_bin_window() const; - Glib::RefPtr get_float_window(); + Glib::RefPtr get_float_window(); Glib::RefPtr 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. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_shadow_type() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -168,15 +188,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_shadow_type() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Position of the handle relative to the child widget. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_handle_position() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -184,15 +208,19 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_handle_position() const; +#endif //#GLIBMM_PROPERTIES_ENABLED - /** Side of the handlebox that's lined up with the docking point to dock the handlebox. + #ifdef GLIBMM_PROPERTIES_ENABLED +/** 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 property_snap_edge() ; +#endif //#GLIBMM_PROPERTIES_ENABLED +#ifdef GLIBMM_PROPERTIES_ENABLED /** 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. @@ -200,6 +228,7 @@ public: * the value of the property changes. */ Glib::PropertyProxy_ReadOnly property_snap_edge() const; +#endif //#GLIBMM_PROPERTIES_ENABLED }; @@ -215,6 +244,8 @@ namespace Glib * @result A C++ instance that wraps this C instance. */ Gtk::HandleBox* wrap(GtkHandleBox* object, bool take_copy = false); -} +} //namespace Glib + + #endif /* _GTKMM_HANDLEBOX_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/iconfactory.cc b/libs/gtkmm2/gtk/gtkmm/iconfactory.cc index 4a305d1291..d068b95433 100644 --- a/libs/gtkmm2/gtk/gtkmm/iconfactory.cc +++ b/libs/gtkmm2/gtk/gtkmm/iconfactory.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -113,8 +114,19 @@ void IconFactory_Class::class_init_function(void* g_class, void* class_data) BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + Glib::ObjectBase* IconFactory_Class::wrap_new(GObject* object) { @@ -170,20 +182,27 @@ Glib::RefPtr IconFactory::create() } void IconFactory::add(const Gtk::StockID& stock_id, const IconSet& icon_set) { - gtk_icon_factory_add(gobj(), (stock_id).get_c_str(), const_cast((icon_set).gobj())); +gtk_icon_factory_add(gobj(), (stock_id).get_c_str(), const_cast((icon_set).gobj())); } void IconFactory::add_default() { - gtk_icon_factory_add_default(gobj()); +gtk_icon_factory_add_default(gobj()); } void IconFactory::remove_default() { - gtk_icon_factory_remove_default(gobj()); +gtk_icon_factory_remove_default(gobj()); } +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED + +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED + + } // namespace Gtk diff --git a/libs/gtkmm2/gtk/gtkmm/iconfactory.h b/libs/gtkmm2/gtk/gtkmm/iconfactory.h index 39b98e792f..5b323f1976 100644 --- a/libs/gtkmm2/gtk/gtkmm/iconfactory.h +++ b/libs/gtkmm2/gtk/gtkmm/iconfactory.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ICONFACTORY_H #define _GTKMM_ICONFACTORY_H + #include /* $Id$ */ @@ -114,11 +115,11 @@ public: 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. + * Gtk::Style::lookup_icon_set(). This means that, for example, + * the Image::Image(const Gtk::StockID& stock_id, IconSize size) constructor 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(); @@ -133,11 +134,17 @@ public: public: //C++ methods used to invoke GTK+ virtual functions: +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED protected: //GTK+ Virtual Functions (override these to change behaviour): +#ifdef GLIBMM_VFUNCS_ENABLED +#endif //GLIBMM_VFUNCS_ENABLED //Default Signal Handlers:: +#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED +#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED }; diff --git a/libs/gtkmm2/gtk/gtkmm/iconinfo.cc b/libs/gtkmm2/gtk/gtkmm/iconinfo.cc index 7dfaa15c79..a5655cd711 100644 --- a/libs/gtkmm2/gtk/gtkmm/iconinfo.cc +++ b/libs/gtkmm2/gtk/gtkmm/iconinfo.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -132,33 +133,40 @@ Glib::RefPtr IconInfo::get_builtin_pixbuf() { Glib::RefPtr 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 IconInfo::get_builtin_pixbuf() const { - - Glib::RefPtr retvalue = Glib::wrap(gtk_icon_info_get_builtin_pixbuf(const_cast(gobj()))); - - if(retvalue) - retvalue->reference(); //The function does not do a ref for us. - return retvalue; + return const_cast(this)->get_builtin_pixbuf(); } +#ifdef GLIBMM_EXCEPTIONS_ENABLED Glib::RefPtr IconInfo::load_icon() const +#else +Glib::RefPtr IconInfo::load_icon(std::auto_ptr& error) const +#endif //GLIBMM_EXCEPTIONS_ENABLED { - GError *error = 0; - Glib::RefPtr retvalue = Glib::wrap(gtk_icon_info_load_icon(const_cast(gobj()), &(error))); - if(error) ::Glib::Error::throw_exception(error); + GError* gerror = 0; + Glib::RefPtr retvalue = Glib::wrap(gtk_icon_info_load_icon(const_cast(gobj()), &(gerror))); +#ifdef GLIBMM_EXCEPTIONS_ENABLED + if(gerror) + ::Glib::Error::throw_exception(gerror); +#else + if(gerror) + error = ::Glib::Error::throw_exception(gerror); +#endif //GLIBMM_EXCEPTIONS_ENABLED + return retvalue; + } void IconInfo::set_raw_coordinates(bool raw_coordinates) { - gtk_icon_info_set_raw_coordinates(gobj(), static_cast(raw_coordinates)); +gtk_icon_info_set_raw_coordinates(gobj(), static_cast(raw_coordinates)); } bool IconInfo::get_embedded_rect(Gdk::Rectangle& rectangle) const diff --git a/libs/gtkmm2/gtk/gtkmm/iconinfo.h b/libs/gtkmm2/gtk/gtkmm/iconinfo.h index 73f36a2f6f..5eadf4f2e8 100644 --- a/libs/gtkmm2/gtk/gtkmm/iconinfo.h +++ b/libs/gtkmm2/gtk/gtkmm/iconinfo.h @@ -3,6 +3,7 @@ #ifndef _GTKMM_ICONINFO_H #define _GTKMM_ICONINFO_H + #include /* Copyright (C) 2003 The gtkmm Development Team @@ -89,7 +90,7 @@ public: * @return The base size, or 0, if no base * size is known for the icon. * - * Since: 2.4. + * @newin2p4. */ int get_base_size() const; @@ -130,14 +131,20 @@ public: * 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.) + * @param error Location to store error information on failure, or 0. * @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. + * @newin2p4. */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED Glib::RefPtr load_icon() const; +#else + Glib::RefPtr load_icon(std::auto_ptr& error) const; +#endif //GLIBMM_EXCEPTIONS_ENABLED + /** Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect() * and gtk_icon_info_get_attach_points() should be returned in their @@ -154,7 +161,7 @@ public: * 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 + * @newin2p4 * @param raw_coordinates Whether the coordinates of embedded rectangles * and attached points should be returned in their original * (unscaled) form. @@ -171,7 +178,7 @@ public: * when this function returns true. * @return true if the icon has an embedded rectangle * - * Since: 2.4. + * @newin2p4. */ bool get_embedded_rect(Gdk::Rectangle& rectangle) const; bool get_attach_points(Glib::ArrayHandle& points) const; @@ -183,7 +190,7 @@ public: * 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. + * @newin2p4. */ Glib::ustring get_display_name() const; @@ -223,5 +230,6 @@ class Value : public Glib::Value_Boxed } // namespace Glib + #endif /* _GTKMM_ICONINFO_H */ diff --git a/libs/gtkmm2/gtk/gtkmm/iconset.cc b/libs/gtkmm2/gtk/gtkmm/iconset.cc index 7546b7d7d2..8610da7c4c 100644 --- a/libs/gtkmm2/gtk/gtkmm/iconset.cc +++ b/libs/gtkmm2/gtk/gtkmm/iconset.cc @@ -1,5 +1,6 @@ // Generated by gtkmmproc -- DO NOT MODIFY! + #include #include @@ -137,7 +138,7 @@ Glib::RefPtr IconSet::render_icon(const Glib::RefPtr