ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
capturedMouse = false;
+ focusEvent = false;
wMain = win;
stc = win;
wheelRotation = 0;
}
+// This method is overloaded from ScintillaBase in order to prevent the
+// AutoComplete window from being destroyed when it gets the focus. There is
+// a side effect that the AutoComp will also not be destroyed when switching
+// to another window, but I think that is okay.
+void ScintillaWX::CancelModes() {
+ if (! focusEvent)
+ AutoCompleteCancel();
+ ct.CallTipCancel();
+ Editor::CancelModes();
+}
+
+
void ScintillaWX::Copy() {
if (currentPos != anchor) {
if (!label[0])
((wxMenu*)popup.GetID())->AppendSeparator();
else
- ((wxMenu*)popup.GetID())->Append(cmd, stc2wx(label));
+ ((wxMenu*)popup.GetID())->Append(cmd, wxGetTranslation(stc2wx(label)));
if (!enabled)
((wxMenu*)popup.GetID())->Enable(cmd, enabled);
}
void ScintillaWX::DoLoseFocus(){
+ focusEvent = true;
SetFocusState(false);
+ focusEvent = false;
}
void ScintillaWX::DoGainFocus(){
+ focusEvent = true;
SetFocusState(true);
+ focusEvent = false;
}
void ScintillaWX::DoSysColourChange() {
case 'A': // Select All
ctrl = true;
break;
- }
+ }
+ }
#endif
int rv = KeyDown(key, shift, ctrl, alt, consumed);