X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdec65df6d570fb9390fbb9f9c1b04535ec72e83..d264d7091ccdc29eef962223d725742c9a8db726:/contrib/src/stc/ScintillaWX.cpp diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index dc8265dcd9..12ad21dafe 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -139,7 +139,6 @@ END_EVENT_TABLE() ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) { - capturedMouse = false; wMain = win; stc = win; wheelRotation = 0; @@ -221,16 +220,15 @@ void ScintillaWX::SetTicking(bool on) { void ScintillaWX::SetMouseCapture(bool on) { - if (on && !capturedMouse) + if (on && !stc->HasCapture()) stc->CaptureMouse(); - else if (!on && capturedMouse) + else if (!on && stc->HasCapture()) stc->ReleaseMouse(); - capturedMouse = on; } bool ScintillaWX::HaveMouseCapture() { - return capturedMouse; + return stc->HasCapture(); } @@ -407,6 +405,11 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { // This is called by the Editor base class whenever something is selected void ScintillaWX::ClaimSelection() { +#if 0 + // Until wxGTK is able to support using both the primary selection and the + // clipboard at the same time I think it causes more problems than it is + // worth to implement this method. Selecting text should not clear the + // clipboard. --Robin #ifdef __WXGTK__ // Put the selected text in the PRIMARY selection if (currentPos != anchor) { @@ -421,6 +424,7 @@ void ScintillaWX::ClaimSelection() { } } #endif +#endif } @@ -559,6 +563,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta, } } else { // otherwise just scroll the window + if ( !delta ) + delta = 120; wheelRotation += rotation; lines = wheelRotation / delta; wheelRotation -= lines * delta; @@ -664,7 +670,9 @@ int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* cons case WXK_RIGHT: key = SCK_RIGHT; break; case WXK_HOME: key = SCK_HOME; break; case WXK_END: key = SCK_END; break; + case WXK_PAGEUP: // fall through case WXK_PRIOR: key = SCK_PRIOR; break; + case WXK_PAGEDOWN: // fall through case WXK_NEXT: key = SCK_NEXT; break; case WXK_DELETE: key = SCK_DELETE; break; case WXK_INSERT: key = SCK_INSERT; break;