X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d66551669c4090dfee52fd104a1c2c1f5031c92d..93df3f5f7318c1aa3f930e9e4f631a2569948149:/contrib/src/stc/stc.cpp.in diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index b367071012..2a9806a68a 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -96,6 +96,7 @@ DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM ) DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_CLICK ) DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_DCLICK ) DEFINE_EVENT_TYPE( wxEVT_STC_CALLTIP_CLICK ) +DEFINE_EVENT_TYPE( wxEVT_STC_AUTOCOMP_SELECTION ) @@ -402,6 +403,14 @@ void wxStyledTextCtrl::StyleSetCharacterSet(int style, int characterSet) case wxSTC_CHARSET_THAI: encoding = wxFONTENCODING_ISO8859_11; break; + + case wxSTC_CHARSET_CYRILLIC: + encoding = wxFONTENCODING_ISO8859_5; + break; + + case wxSTC_CHARSET_8859_15: + encoding = wxFONTENCODING_ISO8859_15;; + break; } // We just have Scintilla track the wxFontEncoding for us. It gets used @@ -845,12 +854,7 @@ static void SetEventText(wxStyledTextEvent& evt, const char* text, size_t length) { if(!text) return; - // The unicode conversion MUST have a null byte to terminate the - // string so move it into a buffer first and give it one. - wxMemoryBuffer buf(length+1); - buf.AppendData((void*)text, length); - buf.AppendByte(0); - evt.SetText(stc2wx(buf)); + evt.SetText(stc2wx(text, length)); } @@ -967,6 +971,10 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { evt.SetEventType(wxEVT_STC_CALLTIP_CLICK); break; + case SCN_AUTOCSELECTION: + evt.SetEventType(wxEVT_STC_AUTOCOMP_SELECTION); + break; + default: return; }