Allow using multiple lines in single line wxTextCtrl under Mac

Add new OSX specific OSXEnableNewLineReplacement(bool enable) function
to control if new lines should be replaced with spaces (which is still
done by default) in a single-line wxTextCtrl.

Closes #22245.
This commit is contained in:
Tobias Fleischer
2022-03-26 13:56:31 +01:00
committed by Vadim Zeitlin
parent c63de862c4
commit e8872b335c
6 changed files with 74 additions and 2 deletions

View File

@@ -81,6 +81,8 @@ public :
virtual bool becomeFirstResponder(WXWidget slf, void *_cmd) wxOVERRIDE;
virtual bool resignFirstResponder(WXWidget slf, void *_cmd) wxOVERRIDE;
virtual void EnableNewLineReplacement(bool enable) wxOVERRIDE;
virtual bool GetNewLineReplacement() wxOVERRIDE;
virtual void SetInternalSelection( long from , long to );
virtual void UpdateInternalSelectionFromEditor( wxNSTextFieldEditor* editor);
protected :
@@ -133,6 +135,8 @@ public:
#endif // wxUSE_SPELLCHECK
virtual void EnableAutomaticQuoteSubstitution(bool enable) wxOVERRIDE;
virtual void EnableAutomaticDashSubstitution(bool enable) wxOVERRIDE;
virtual void EnableNewLineReplacement(bool enable) wxOVERRIDE;
virtual bool GetNewLineReplacement() wxOVERRIDE;
virtual wxSize GetBestSize() const wxOVERRIDE;
virtual void SetJustification() wxOVERRIDE;