Implement minimal support for spell checking in wxOSX too

Reuse the existing CheckSpelling() function.

Also deprecate wxTextCtrl::MacCheckSpelling() in favour of the new
portable EnableProofCheck().
This commit is contained in:
Vadim Zeitlin
2021-08-22 22:11:39 +02:00
parent af43b7c965
commit 90e79d8ed4
8 changed files with 54 additions and 7 deletions

View File

@@ -97,6 +97,15 @@ public:
virtual void Cut() wxOVERRIDE;
virtual void Paste() wxOVERRIDE;
#if wxUSE_SPELLCHECK
// Use native spelling and grammar checking functions (multiline only).
virtual bool EnableProofCheck(
bool enable = true,
const wxTextProofOptions& options = wxTextProofOptions()
) wxOVERRIDE;
virtual bool IsProofCheckEnabled() const wxOVERRIDE;
#endif // wxUSE_SPELLCHECK
// Implementation
// --------------
virtual void Command(wxCommandEvent& event) wxOVERRIDE;
@@ -130,7 +139,11 @@ public:
virtual void MacVisibilityChanged() wxOVERRIDE;
virtual void MacSuperChangedPosition() wxOVERRIDE;
virtual void MacCheckSpelling(bool check);
// Use portable EnableProofCheck() instead now.
#if WXWIN_COMPATIBILITY_3_0
wxDEPRECATED( virtual void MacCheckSpelling(bool check) );
#endif // WXWIN_COMPATIBILITY_3_0
void OSXEnableAutomaticQuoteSubstitution(bool enable);
void OSXEnableAutomaticDashSubstitution(bool enable);