X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e730a78765d0e70ca5b77512569c94585070fe2..6ee3c06421446908fabe9de45b8e0c7519c28c24:/contrib/src/stc/PlatWX.cpp diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 80f8f795ce..98eba98548 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -481,7 +481,7 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio // so figure it out and fix it! i = 0; size_t ui = 0; - while (i < len) { + while ((int)i < len) { unsigned char uch = (unsigned char)s[i]; positions[i++] = tpos[ui]; if (uch >= 0x80) { @@ -575,13 +575,6 @@ void SurfaceImpl::FlushCachedState() { void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { unicodeMode=unicodeMode_; -#if wxUSE_UNICODE - wxASSERT_MSG(unicodeMode == wxUSE_UNICODE, - wxT("Only unicode may be used when wxUSE_UNICODE is on.")); -#else - wxASSERT_MSG(unicodeMode == wxUSE_UNICODE, - wxT("Only non-unicode may be used when wxUSE_UNICODE is off.")); -#endif } void SurfaceImpl::SetDBCSMode(int codePage) { @@ -1009,7 +1002,7 @@ void ListBoxImpl::RegisterImage(int type, const char *xpm_data) { // do we need to extend the mapping array? wxArrayInt& itm = *imgTypeMap; - if ( itm.GetCount() < type+1) + if ( itm.GetCount() < (size_t)type+1) itm.Add(-1, type - itm.GetCount() + 1); // Add an item that maps type to the image index @@ -1069,6 +1062,13 @@ void Menu::Show(Point pt, Window &w) { //---------------------------------------------------------------------- +DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { + wxFAIL_MSG(wxT("Dynamic lexer loading not implemented yet")); + return NULL; +} + +//---------------------------------------------------------------------- + ColourDesired Platform::Chrome() { wxColour c; c = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); @@ -1223,6 +1223,22 @@ double ElapsedTime::Duration(bool reset) { //---------------------------------------------------------------------- +#if wxUSE_UNICODE +wxString stc2wx(const char* str, size_t len) +{ + char *buffer=new char[len+1]; + strncpy(buffer, str, len); + buffer[len]=0; + + wxString cstr(buffer, wxConvUTF8); + + delete[] buffer; + return cstr; +} +#endif + + +