X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf8a60ae0ad390295135c852fba4e3332c32a458..ddfca47f05f821f034514bf5d5cf938d80fa2829:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 20d1fa34b6..1a8aca13cc 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -197,7 +197,7 @@ int wxStyledTextCtrl::GetLength() { // Returns the character byte at the position int wxStyledTextCtrl::GetCharAt(int pos) { - return SendMsg(2007, pos, 0); + return (unsigned char)SendMsg(2007, pos, 0); } // Returns the position of the caret @@ -212,7 +212,7 @@ int wxStyledTextCtrl::GetAnchor() { // Returns the style byte at the position int wxStyledTextCtrl::GetStyleAt(int pos) { - return SendMsg(2010, pos, 0); + return (unsigned char)SendMsg(2010, pos, 0); } // Redoes the next action on the undo history @@ -946,16 +946,13 @@ int wxStyledTextCtrl::GetPrintColourMode() { // Find some text in the document. int wxStyledTextCtrl::FindText(int minPos, int maxPos, - const wxString& text, - bool caseSensitive, bool wholeWord) { + const wxString& text, + int flags) { TextToFind ft; - int flags = 0; - - flags |= caseSensitive ? SCFIND_MATCHCASE : 0; - flags |= wholeWord ? SCFIND_WHOLEWORD : 0; ft.chrg.cpMin = minPos; ft.chrg.cpMax = maxPos; - ft.lpstrText = (char*)(const char*)wx2stc(text); + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + ft.lpstrText = (char*)(const char*)buf; return SendMsg(2150, flags, (long)&ft); } @@ -1568,12 +1565,12 @@ void* wxStyledTextCtrl::CreateDocument() { // Extend life of document. void wxStyledTextCtrl::AddRefDocument(void* docPointer) { - SendMsg(2376, (long)docPointer); + SendMsg(2376, 0, (long)docPointer); } // Release a reference to the document, deleting document if it fades to black. void wxStyledTextCtrl::ReleaseDocument(void* docPointer) { - SendMsg(2377, (long)docPointer); + SendMsg(2377, 0, (long)docPointer); } // Get which document modification events are sent to the container. @@ -1880,6 +1877,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { } void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + SetFocus(); wxPoint pt = evt.GetPosition(); m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); @@ -1914,7 +1912,8 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { m_swx->DoMouseWheel(evt.GetWheelRotation(), evt.GetWheelDelta(), evt.GetLinesPerAction(), - evt.ControlDown()); + evt.ControlDown(), + evt.IsPageScroll()); }