X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92bbd64f7fc6d489fa7af1193feef7f3308da549..3f2b72b2403dd29aa93167ce0ce7d20e1d20f1bd:/src/stc/stc.cpp?ds=sidebyside diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 6e22325317..39cbba6900 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -107,7 +107,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus) EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged) EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground) - EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu) + EVT_MENU_RANGE (10, 16, wxStyledTextCtrl::OnMenu) EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox) END_EVENT_TABLE() @@ -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. @@ -1877,10 +1874,10 @@ void wxStyledTextCtrl::OnScroll(wxScrollEvent& evt) { void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { wxSize sz = GetClientSize(); m_swx->DoSize(sz.x, sz.y); - Refresh(FALSE); } 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()); @@ -1915,7 +1912,8 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { m_swx->DoMouseWheel(evt.GetWheelRotation(), evt.GetWheelDelta(), evt.GetLinesPerAction(), - evt.ControlDown()); + evt.ControlDown(), + evt.IsPageScroll()); }