// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#include <wx/wx.h>
-#include <wx/textbuf.h>
-#include <wx/dataobj.h>
-#include <wx/clipbrd.h>
-#include <wx/dnd.h>
+#include "wx/wx.h"
+#include "wx/textbuf.h"
+#include "wx/dataobj.h"
+#include "wx/clipbrd.h"
+#include "wx/dnd.h"
#include "ScintillaWX.h"
#include "ExternalLexer.h"
#ifdef __WXMSW__
// GetHwndOf()
- #include <wx/msw/private.h>
+ #include "wx/msw/private.h"
#endif
//----------------------------------------------------------------------
//----------------------------------------------------------------------
+#if wxUSE_DATAOBJ
static wxTextFileType wxConvertEOLMode(int scintillaMode)
{
wxTextFileType type;
}
return type;
}
+#endif // wxUSE_DATAOBJ
//----------------------------------------------------------------------
pdoc->BeginUndoAction();
ClearSelection();
+#if wxUSE_DATAOBJ
wxTextDataObject data;
bool gotData = false;
pdoc->InsertString(currentPos, buf, len);
SetEmptySelection(currentPos + len);
}
+#endif // wxUSE_DATAOBJ
pdoc->EndUndoAction();
NotifyChange();
void ScintillaWX::CopyToClipboard(const SelectionText& st) {
+#if wxUSE_CLIPBOARD
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(false);
wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len-1));
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
}
+#else
+ wxUnusedVar(st);
+#endif // wxUSE_CLIPBOARD
}
bool ScintillaWX::CanPaste() {
+#if wxUSE_CLIPBOARD
bool canPaste = false;
bool didOpen;
}
}
return canPaste;
+#else
+ return false;
+#endif // wxUSE_CLIPBOARD
}
void ScintillaWX::CreateCallTipWindow(PRectangle) {
PRectangle rcClient = GetClientRectangle();
paintingAllText = rcPaint.Contains(rcClient);
- dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
FullPaint();
}
paintState = notPainting;
- dc->EndDrawing();
}
ctrl = evt.ControlDown(),
alt = evt.AltDown();
- if (ctrl && key >= 1 && key <= 26)
+ if (ctrl && key >= 1 && key <= 26 && key != WXK_BACK)
key += 'A' - 1;
switch (key) {