From: Stefan Csomor Date: Sun, 15 Jan 2012 15:53:56 +0000 (+0000) Subject: allow native max length support, see #10269 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4386db06ba73b60258279e1e1875b31f3cfb0d33 allow native max length support, see #10269 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/cocoa/private/textimpl.h b/include/wx/osx/cocoa/private/textimpl.h index 9eb2c7328e..0cd220b0ea 100644 --- a/include/wx/osx/cocoa/private/textimpl.h +++ b/include/wx/osx/cocoa/private/textimpl.h @@ -28,6 +28,9 @@ public : wxNSTextFieldControl( wxWindow *wxPeer, wxTextEntry *entry, WXWidget w ); virtual ~wxNSTextFieldControl(); + virtual bool CanClipMaxLength() const { return true; } + virtual void SetMaxLength(unsigned long len); + virtual wxString GetStringValue() const ; virtual void SetStringValue( const wxString &str) ; virtual void Copy() ; diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index 7ccc7990b6..e1b64182ed 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -631,6 +631,9 @@ public : virtual void GetSelection( long* from, long* to ) const = 0 ; virtual void WriteText( const wxString& str ) = 0 ; + virtual bool CanClipMaxLength() const { return false; } + virtual void SetMaxLength(unsigned long WXUNUSED(len)) {} + virtual bool GetStyle( long position, wxTextAttr& style); virtual void SetStyle( long start, long end, const wxTextAttr& style ) ; virtual void Copy() ;