};
-
+#if wxUSE_DRAG_AND_DROP
bool wxSTCDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data) {
return swx->DoDropText(x, y, data);
}
void wxSTCDropTarget::OnLeave() {
swx->DoDragLeave();
}
+#endif
class wxSTCCallTip : public wxWindow {
void ScintillaWX::Initialise() {
//ScintillaBase::Initialise();
+#if wxUSE_DRAG_AND_DROP
dropTarget = new wxSTCDropTarget;
dropTarget->SetScintilla(this);
stc->SetDropTarget(dropTarget);
+#endif
}
void ScintillaWX::StartDrag() {
+#if wxUSE_DRAG_AND_DROP
wxString dragText(drag.s, drag.len);
// Send an event to allow the drag text to be changed
inDragDrop = FALSE;
SetDragPosition(invalidPosition);
}
+#endif
}
ClearSelection();
wxTextDataObject data;
- bool canPaste;
+ bool gotData;
wxTheClipboard->Open();
- canPaste = wxTheClipboard->GetData(data);
+ gotData = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
- if (canPaste) {
+ if (gotData) {
wxString str = data.GetText();
int len = str.Length();
pdoc->InsertString(currentPos, str.c_str(), len);
bool ScintillaWX::CanPaste() {
- wxTextDataObject data;
bool canPaste;
wxTheClipboard->Open();
- canPaste = wxTheClipboard->GetData(data);
+ canPaste = wxTheClipboard->IsSupported( wxDF_TEXT );
wxTheClipboard->Close();
return canPaste;
//----------------------------------------------------------------------
+#if wxUSE_DRAG_AND_DROP
bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
SetDragPosition(invalidPosition);
void ScintillaWX::DoDragLeave() {
SetDragPosition(invalidPosition);
}
-
+#endif
//----------------------------------------------------------------------
// Redraw all of text area. This paint will not be abandoned.