Use wxTextProofOptions itself to enable or disable the checks

Remove a separate "bool enable" argument of EnableProofCheck() and use
wxTextProofOptions::IsSpellCheckingEnabled() to decide whether the
checks should be enabled or disabled.

Also remove wxTextProofOptions ctor and provide named static factory
functions for creating the objects of this class with clearly defined
meaning.
This commit is contained in:
Vadim Zeitlin
2021-08-23 00:53:58 +02:00
parent 72ef834c70
commit 2bb3083a93
9 changed files with 91 additions and 66 deletions

View File

@@ -98,10 +98,8 @@ public:
#if wxUSE_SPELLCHECK && defined(__WXGTK3__)
// Use native spelling and grammar checking functions.
virtual bool EnableProofCheck(
bool enable = true,
const wxTextProofOptions& options = wxTextProofOptions()
) wxOVERRIDE;
virtual bool EnableProofCheck(const wxTextProofOptions& options
= wxTextProofOptions::Default()) wxOVERRIDE;
virtual bool IsProofCheckEnabled() const wxOVERRIDE;
#endif // wxUSE_SPELLCHECK && __WXGTK3__