// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
+#define Point macPoint // These names are also defined by some mac headers so
+#define Style macStyle // change their names, and then undef before we need them
+
+#include <wx/wx.h>
+#include <wx/textbuf.h>
+#include <wx/dataobj.h>
+#include <wx/clipbrd.h>
+#include <wx/dnd.h>
+
+#undef Point
+#undef Style
#include "ScintillaWX.h"
#include "ExternalLexer.h"
#include "wx/stc/stc.h"
#include "PlatWX.h"
-#include <wx/textbuf.h>
+
+#ifdef __WXMSW__
+ // GetHwndOf()
+ #include <wx/msw/private.h>
+#endif
//----------------------------------------------------------------------
// Helper classes
void ScintillaWX::CopyToClipboard(const SelectionText& st) {
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(false);
- wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
+ wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len-1));
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
}
bool shift = evt.ShiftDown(),
ctrl = evt.ControlDown(),
alt = evt.AltDown();
-
+
if (ctrl && key >= 1 && key <= 26)
key += 'A' - 1;