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:
@@ -77,6 +77,8 @@ WXDLLIMPEXP_BASE CFURLRef wxOSXCreateURLFromFileSystemPath( const wxString& path
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
class wxTextProofOptions;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
|
||||
{
|
||||
wxDECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver);
|
||||
@@ -737,8 +739,10 @@ public :
|
||||
virtual void ShowPosition(long pos) ;
|
||||
virtual int GetLineLength(long lineNo) const ;
|
||||
virtual wxString GetLineText(long lineNo) const ;
|
||||
virtual void CheckSpelling(bool WXUNUSED(check)) { }
|
||||
#if wxUSE_SPELLCHECK
|
||||
virtual void CheckSpelling(const wxTextProofOptions& WXUNUSED(options)) { }
|
||||
virtual bool IsSpellingCheckEnabled() const { return false; }
|
||||
#endif // wxUSE_SPELLCHECK
|
||||
virtual void EnableAutomaticQuoteSubstitution(bool WXUNUSED(enable)) {}
|
||||
virtual void EnableAutomaticDashSubstitution(bool WXUNUSED(enable)) {}
|
||||
|
||||
|
Reference in New Issue
Block a user