simplify native textcontrol creations, adding search control for cocoa

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-09-05 14:41:11 +00:00
parent 23e00c551b
commit 1e181c7a2c
21 changed files with 734 additions and 972 deletions

View File

@@ -156,4 +156,24 @@ CGColorRef wxMacCreateCGColorFromHITheme( ThemeBrush brush )
return color;
}
//---------------------------------------------------------------------------
// Mac Specific string utility functions
//---------------------------------------------------------------------------
void wxMacStringToPascal( const wxString&from , unsigned char * to )
{
wxCharBuffer buf = from.mb_str( wxConvLocal );
int len = strlen(buf);
if ( len > 255 )
len = 255;
to[0] = len;
memcpy( (char*) &to[1] , buf , len );
}
wxString wxMacMakeStringFromPascal( const unsigned char * from )
{
return wxString( (char*) &from[1] , wxConvLocal , from[0] );
}
#endif // wxOSX_USE_COCOA_OR_CARBON