Implement support for grammar checking in wxOSX

Use native support for grammar checking in NSTextView.

As we're not passing wxTextProofOptions to the lower level function,
this functionality now depends on wxUSE_SPELLCHECK, meaning that even
the previously existing MacCheckSpelling() function is not defined any
more when wxUSE_SPELLCHECK is set to 0. This is not completely
backwards-compatible, but hopefully shouldn't be a problem in practice
and shouldn't break any existing applications which can't disable the
just added wxUSE_SPELLCHECK.
This commit is contained in:
Vadim Zeitlin
2021-08-23 01:11:29 +02:00
parent 79fe43c22d
commit db30397921
8 changed files with 34 additions and 14 deletions

View File

@@ -127,8 +127,10 @@ public:
virtual bool HasOwnContextMenu() const wxOVERRIDE { return true; }
virtual void CheckSpelling(bool check) wxOVERRIDE;
#if wxUSE_SPELLCHECK
virtual void CheckSpelling(const wxTextProofOptions& options) wxOVERRIDE;
virtual bool IsSpellingCheckEnabled() const wxOVERRIDE;
#endif // wxUSE_SPELLCHECK
virtual void EnableAutomaticQuoteSubstitution(bool enable) wxOVERRIDE;
virtual void EnableAutomaticDashSubstitution(bool enable) wxOVERRIDE;