X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f79d14b31cf3e85ef74fb51782c6f3bbd2eeb1f..fa275e864825d4fbd99d6a3ccb911998fce13a02:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 6cb4b7cefa..fbf1faf2a3 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -189,6 +189,9 @@ void Font::Create(const char *faceName, int characterSet, int size, bool bold, b false, stc2wx(faceName), encoding); +#ifdef __WXMAC__ + ((wxFont*)id)->SetNoAntiAliasing( true ) ; +#endif } @@ -637,7 +640,7 @@ void Window::SetCursor(Cursor curs) { #else wxCursor wc = wxCursor(cursorId) ; #endif - GETWIN(id)->SetCursor(wc); + GETWIN(id)->SetCursor(wc); } @@ -650,7 +653,7 @@ void Window::SetTitle(const char *s) { // Helper classes for ListBox -#if defined(__WXMAC__) +#if 1 // defined(__WXMAC__) class wxSTCListBoxWin : public wxListBox { public: wxSTCListBoxWin(wxWindow* parent, wxWindowID id) @@ -804,7 +807,7 @@ void ListBox::Clear() { } void ListBox::Append(char *s) { - GETLB(id)->Append(s); + GETLB(id)->Append(stc2wx(s)); } int ListBox::Length() { @@ -812,12 +815,17 @@ int ListBox::Length() { } void ListBox::Select(int n) { - GETLB(id)->SetSelection(n); + bool select = TRUE; + if (n == -1) { + n = 0; + select = FALSE; + } + GETLB(id)->SetSelection(n, select); #ifdef __WXGTK__ if (n > 4) n = n - 4; else - n = 1; + n = 0; GETLB(id)->SetFirstItem(n); #endif } @@ -906,6 +914,15 @@ long Platform::SendScintilla(WindowID w, return stc->SendMsg(msg, wParam, lParam); } +long Platform::SendScintillaPointer(WindowID w, + unsigned int msg, + unsigned long wParam, + void *lParam) { + + wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w; + return stc->SendMsg(msg, wParam, (long)lParam); +} + // These are utility functions not really tied to a platform