diff options
| author | scaraveo <devnull@localhost> | 2007-06-01 00:57:26 +0000 | 
|---|---|---|
| committer | scaraveo <devnull@localhost> | 2007-06-01 00:57:26 +0000 | 
| commit | bff5c376377f4c19a62e6a44eccda7dbe9deebaf (patch) | |
| tree | 55e5547869daa67b6a639c89825058baf75545c7 /src/Editor.cxx | |
| parent | 664fee964e1f91132ebf07a4b122e59c1e932ea6 (diff) | |
| download | scintilla-mirror-bff5c376377f4c19a62e6a44eccda7dbe9deebaf.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.cxx | 20 | 
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); | 
