X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0122b7e3fcfd78f879470053c91a60e3c66537a3..8f17876f2b49e831d817e0ce683ae4f4d1ee9fb1:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index cfa59ede1e..d5f2648dd1 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -122,9 +122,10 @@ void ScintillaWX::Finalise() { void ScintillaWX::StartDrag() { wxDropSource source(wMain.GetID()); - wxTextDataObject data(dragChars); + wxTextDataObject data(wxString(drag.s, drag.len)); wxDragResult result; + dropWentOutside = true; source.SetData(data); result = source.DoDragDrop(TRUE); if (result == wxDragMove && dropWentOutside) @@ -217,9 +218,10 @@ void ScintillaWX::NotifyParent(SCNotification scn) { void ScintillaWX::Copy() { if (currentPos != anchor) { - char* text = CopySelectionRange(); + SelectionText st; + CopySelectionRange(&st); wxTheClipboard->Open(); - wxTheClipboard->SetData(new wxTextDataObject(text)); + wxTheClipboard->SetData(new wxTextDataObject(wxString(st.s, st.len))); wxTheClipboard->Close(); } } @@ -421,10 +423,7 @@ void ScintillaWX::DoButtonMove(Point pt) { void ScintillaWX::DoAddChar(char ch) { - //bool acActiveBeforeCharAdded = ac.Active(); AddChar(ch); - //if (acActiveBeforeCharAdded) - // AutoCompleteChanged(ch); } int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) { @@ -466,9 +465,6 @@ int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* cons int rv = KeyDown(key, shift, ctrl, alt, consumed); -// printf("key: %d shift: %d ctrl: %d alt: %d rv: %d consumed: %d\n", -// key, shift, ctrl, alt, rv, *consumed); - if (key) return rv; else @@ -500,14 +496,15 @@ bool ScintillaWX::DoDropText(long x, long y, const wxString& data) { wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) { - return def; + dragResult = def; + return dragResult; } wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { SetDragPosition(PositionFromLocation(Point(x, y))); dragResult = def; - return def; + return dragResult; }