Merge branch 'textctrl-spellcheck'

Add wxTextCtrl::EnableProofCheck() to use native spell checking support.

See https://github.com/wxWidgets/wxWidgets/pull/2473
This commit is contained in:
Vadim Zeitlin
2021-08-27 21:58:32 +02:00
27 changed files with 650 additions and 16 deletions

View File

@@ -766,6 +766,7 @@ WX_ARG_FEATURE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which
WX_ARG_FEATURE(secretstore, [ --enable-secretstore use wxSecretStore class], wxUSE_SECRETSTORE)
WX_ARG_FEATURE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER)
WX_ARG_FEATURE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND)
WX_ARG_FEATURE(spellcheck, [ --enable-spellcheck enable spellchecking in wxTextCtrl class (MSW and GTK3 only)], wxUSE_SPELLCHECK)
WX_ARG_FEATURE(stdpaths, [ --enable-stdpaths use wxStandardPaths class], wxUSE_STDPATHS)
WX_ARG_FEATURE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH)
WX_ARG_FEATURE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS)
@@ -5765,6 +5766,34 @@ if test "$wxUSE_SECRETSTORE" = "yes"; then
fi
fi
dnl ---------------------------------------------------------------------------
dnl Spellchecking for wxTextCtrl
dnl ---------------------------------------------------------------------------
if test "$wxUSE_SPELLCHECK" = "yes"; then
dnl The required APIs are always available under MSW and OS X and we don't
dnl implement support for spell checking in the other ports, but for GTK 3
dnl we need to check for gtkspell library.
if test "$WXGTK3" = 1; then
PKG_CHECK_MODULES(GTKSPELL, [gtkspell3-3.0],
[
CXXFLAGS="$GTKSPELL_CFLAGS $CXXFLAGS"
LIBS="$GTKSPELL_LIBS $LIBS"
],
[
AC_MSG_WARN([gtkspell3-3.0 not found, spell checking in wxTextCtrl won't be available])
wxUSE_SPELLCHECK=no
]
)
fi
if test "$wxUSE_SPELLCHECK" = "yes"; then
AC_DEFINE(wxUSE_SPELLCHECK)
fi
fi
dnl ---------------------------------------------------------------------------
dnl Register non-GUI class options for makefiles and setup.h
dnl ---------------------------------------------------------------------------