X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88b1cfb65164534834840fd666fc90973bb3609c..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index bcb44e5bc3..7bda5100eb 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -405,7 +405,7 @@ void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font, int ybase, SetFont(font); hdc->SetTextForeground(wxColourFromCA(fore)); hdc->SetTextBackground(wxColourFromCA(back)); - //FillRectangle(rc, back); + FillRectangle(rc, back); // ybase is where the baseline should be, but wxWin uses the upper left // corner, so I need to calculate the real position for the text... @@ -418,11 +418,12 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font, int ybase, SetFont(font); hdc->SetTextForeground(wxColourFromCA(fore)); hdc->SetTextBackground(wxColourFromCA(back)); - //FillRectangle(rc, back); + FillRectangle(rc, back); hdc->SetClippingRegion(wxRectFromPRectangle(rc)); // see comments above hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent); + hdc->DestroyClippingRegion(); } @@ -450,7 +451,7 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio #ifndef __WXMAC__ // Calculate the position of each character based on the widths of // the previous characters - int* tpos = new int[len]; + int* tpos = new int[len+1]; int totalWidth = 0; size_t i; for (i=0; i= 0x80) { @@ -1062,6 +1063,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); @@ -1193,11 +1201,11 @@ bool Platform::IsDBCSLeadByte(int codePage, char ch) { } int Platform::DBCSCharLength(int codePage, const char *s) { - return 0; + return 1; } int Platform::DBCSCharMaxLength() { - return 0; + return 1; } @@ -1216,6 +1224,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 + + +