////////////////////////////////////////////////////////////////////////////
-// Name: ScintillaWX.cxx
+// Name: src/stc/ScintillaWX.cpp
// Purpose: A wxWidgets implementation of Scintilla. A class derived
// from ScintillaBase that uses the "wx platform" defined in
// PlatformWX.cxx This class is one end of a bridge between
#include "wx/clipbrd.h"
#include "wx/dnd.h"
+#if !wxUSE_STD_CONTAINERS && !wxUSE_STD_IOSTREAM && !wxUSE_STD_STRING
+ #include "wx/beforestd.h"
+ #include <string>
+ #include "wx/afterstd.h"
+#endif
+
#include "ScintillaWX.h"
#include "ExternalLexer.h"
#include "wx/stc/stc.h"
wxStyledTextEvent evt(wxEVT_STC_START_DRAG, stc->GetId());
evt.SetEventObject(stc);
evt.SetDragText(dragText);
- evt.SetDragAllowMove(true);
+ evt.SetDragFlags(wxDrag_DefaultMove);
evt.SetPosition(wxMin(stc->GetSelectionStart(),
stc->GetSelectionEnd()));
stc->GetEventHandler()->ProcessEvent(evt);
dragText = evt.GetDragText();
- if (dragText.length()) {
+ if ( !dragText.empty() ) {
wxDropSource source(stc);
wxTextDataObject data(dragText);
wxDragResult result;
source.SetData(data);
dropWentOutside = true;
inDragDrop = ddDragging;
- result = source.DoDragDrop(evt.GetDragAllowMove());
+ result = source.DoDragDrop(evt.GetDragFlags());
if (result == wxDragMove && dropWentOutside)
ClearSelection();
inDragDrop = ddNone;
int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed)
{
int key = evt.GetKeyCode();
+ if (key == WXK_NONE) {
+ // This is a Unicode character not representable in Latin-1 or some key
+ // without key code at all (e.g. dead key or VK_PROCESSKEY under MSW).
+ if ( consumed )
+ *consumed = false;
+ return 0;
+ }
+
bool shift = evt.ShiftDown(),
ctrl = evt.ControlDown(),
alt = evt.AltDown();
// Force the whole window to be repainted
void ScintillaWX::FullPaint() {
-#ifndef __WXMAC__
stc->Refresh(false);
-#endif
stc->Update();
}