Add API to control OS X wxTextCtrl’s smart behavior
Allow the user to customize smart quotes and dashes substutions on OS X and also provide the OSXDisableAllSmartSubstitutions() method for disabling them all at once.
This commit is contained in:
@@ -95,6 +95,9 @@ public:
|
||||
virtual bool HasOwnContextMenu() const { return true; }
|
||||
|
||||
virtual void CheckSpelling(bool check);
|
||||
virtual void EnableAutomaticQuoteSubstitution(bool enable);
|
||||
virtual void EnableAutomaticDashSubstitution(bool enable);
|
||||
|
||||
virtual wxSize GetBestSize() const;
|
||||
|
||||
protected:
|
||||
|
@@ -688,6 +688,8 @@ public :
|
||||
virtual int GetLineLength(long lineNo) const ;
|
||||
virtual wxString GetLineText(long lineNo) const ;
|
||||
virtual void CheckSpelling(bool WXUNUSED(check)) { }
|
||||
virtual void EnableAutomaticQuoteSubstitution(bool WXUNUSED(enable)) {}
|
||||
virtual void EnableAutomaticDashSubstitution(bool WXUNUSED(enable)) {}
|
||||
|
||||
virtual wxSize GetBestSize() const { return wxDefaultSize; }
|
||||
|
||||
|
@@ -130,6 +130,10 @@ public:
|
||||
virtual void MacSuperChangedPosition() wxOVERRIDE;
|
||||
virtual void MacCheckSpelling(bool check);
|
||||
|
||||
void OSXEnableAutomaticQuoteSubstitution(bool enable);
|
||||
void OSXEnableAutomaticDashSubstitution(bool enable);
|
||||
void OSXDisableAllSmartSubstitutions();
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
Reference in New Issue
Block a user