]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
supporting readonly and singleline attributes for non-mlte textrcontrol
[wxWidgets.git] / src / mac / carbon / window.cpp
index 78f8bc0f3236a6b1b363adf5e28579379079bd0e..7f8c55e784bd713f2738bbfb32581d65a196eaaf 100644 (file)
@@ -52,6 +52,8 @@
 #ifndef __DARWIN__
 #include <Windows.h>
 #include <ToolUtils.h>
+#include <Scrap.h>
+#include <MacTextEditor.h>
 #endif
 
 #if TARGET_API_MAC_OSX
@@ -310,7 +312,11 @@ static pascal OSStatus wxMacWindowServiceEventHandler( EventHandlerCallRef handl
                 char *content = new char[textSize] ;
                 GetScrapFlavorData (scrapRef, kTXNTextData, &pastedSize, content );  
                 content[textSize-1] = 0 ;
+#if wxUSE_UNICODE
+                textCtrl->WriteText( wxString( content , wxConvLocal )  );
+#else
                 textCtrl->WriteText( wxString( content ) ) ;
+#endif
                 delete[] content ;
                 result = noErr ;
             }