ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
- capturedMouse = false;
wMain = win;
stc = win;
wheelRotation = 0;
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();
}
// 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) {
}
}
#endif
+#endif
}
}
}
else { // otherwise just scroll the window
+ if ( !delta )
+ delta = 120;
wheelRotation += rotation;
lines = wheelRotation / delta;
wheelRotation -= lines * delta;
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;