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) {
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) {
// 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
//----------------------------------------------------------------------
+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
+
+
+