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...
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();
}
#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<str.Length(); i++) {
// on OS X widths can be fractions of pixels wide when more than one
// are drawn together, so the sum of all character widths is not necessarily
// (and probably not) the same as the whole string width.
- int* tpos = new int[len];
+ int* tpos = new int[len+1];
size_t i;
for (i=0; i<str.Length(); i++) {
int w, h;
// 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) {
//----------------------------------------------------------------------
+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);
}
int Platform::DBCSCharLength(int codePage, const char *s) {
- return 0;
+ return 1;
}
int Platform::DBCSCharMaxLength() {
- return 0;
+ return 1;
}
//----------------------------------------------------------------------
+#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
+
+
+