aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorscaraveo <unknown>2007-06-01 00:57:26 +0000
committerscaraveo <unknown>2007-06-01 00:57:26 +0000
commit710f716e96f6e9ee9eb410b343b78b3c4d95bc46 (patch)
tree55e5547869daa67b6a639c89825058baf75545c7 /src/Editor.cxx
parentcac98b923422b91839f7c285a9b78ea282cd6f0a (diff)
downloadscintilla-mirror-710f716e96f6e9ee9eb410b343b78b3c4d95bc46.tar.gz
integrate OS X support for scintilla. a big patch with a little commit message :)
- now uses namespaces (optionally for non-os x) to avoid conflicts with OS X libraries - several fixes in the OS X layer since the branch was commited in 2005 - used in Komodo since 2005, so pretty stable
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 0147308ad..46684a7fc 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -34,6 +34,10 @@
#include "Document.h"
#include "Editor.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
return whether this modification represents an operation that
may reasonably be deferred (not done now OR [possibly] at all)
@@ -594,6 +598,10 @@ public:
}
};
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
* Allows to iterate through the lines of a selection.
* Althought it can be called for a stream selection, in most cases
@@ -672,6 +680,10 @@ public:
}
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
Point Editor::LocationFromPosition(int pos) {
Point pt;
RefreshStyleData();
@@ -5343,6 +5355,14 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b
else
inDragDrop = ddNone;
}
+#ifdef __APPLE__
+ // we need to additionaly check if the mouse moved before we
+ // decide that we can in fact start a drag session. Currently
+ // only OSX will return anything but true.
+ if (inDragDrop == ddInitial && !Platform::WaitMouseMoved(pt)) {
+ inDragDrop = ddNone;
+ }
+#endif
SetMouseCapture(true);
if (inDragDrop != ddInitial) {
SetDragPosition(invalidPosition);