Replace IsProofCheckEnabled() with GetProofCheckOptions()

This is more consistent with EnableProofCheck() and allows to retrieve
the current state of grammar checking under macOS, which can be checked
by user and so can be useful to know.
This commit is contained in:
Vadim Zeitlin
2021-08-23 01:37:48 +02:00
parent 94173e3fae
commit 45dcb1a8a5
11 changed files with 69 additions and 33 deletions

View File

@@ -171,10 +171,15 @@ public:
}
// And the corresponding accessors.
bool IsSpellCheckingEnabled() const { return m_EnableSpellCheck; }
bool IsGrammarCheckingEnabled() const { return m_EnableGrammarCheck; }
bool IsSpellCheckEnabled() const { return m_EnableSpellCheck; }
bool IsGrammarCheckEnabled() const { return m_EnableGrammarCheck; }
const wxString& GetLang() const { return m_lang; }
bool AnyChecksEnabled() const
{
return IsSpellCheckEnabled() || IsGrammarCheckEnabled();
}
private:
// Ctor is private, use static factory methods to create objects of this
// class.
@@ -830,7 +835,10 @@ public:
{
return false;
}
virtual bool IsProofCheckEnabled() const { return false; }
virtual wxTextProofOptions GetProofCheckOptions() const
{
return wxTextProofOptions::Disable();
}
#endif // wxUSE_SPELLCHECK
protected: