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/CallTip.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/CallTip.cxx')
| -rw-r--r-- | src/CallTip.cxx | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/src/CallTip.cxx b/src/CallTip.cxx index f4bc5f83c..9f5f88476 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -12,6 +12,11 @@  #include "Scintilla.h"  #include "CallTip.h" +#include <stdio.h> + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif  static const int insetX = 5;    // text inset in x from calltip border  static const int widthArrow = 14; @@ -29,8 +34,14 @@ CallTip::CallTip() {  	tabSize = 0;  	useStyleCallTip = false;    // for backwards compatibility +#ifdef __APPLE__ +	// proper apple colours for the default +	colourBG.desired = ColourDesired(0xff, 0xff, 0xc6); +	colourUnSel.desired = ColourDesired(0, 0, 0); +#else  	colourBG.desired = ColourDesired(0xff, 0xff, 0xff);  	colourUnSel.desired = ColourDesired(0x80, 0x80, 0x80); +#endif  	colourSel.desired = ColourDesired(0, 0, 0x80);  	colourShade.desired = ColourDesired(0, 0, 0);  	colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0); @@ -170,6 +181,7 @@ int CallTip::PaintContents(Surface *surfaceWindow, bool draw) {  	char *chunkVal = val;  	bool moreChunks = true;  	int maxWidth = 0; +  	while (moreChunks) {  		char *chunkEnd = strchr(chunkVal, '\n');  		if (chunkEnd == NULL) { @@ -217,6 +229,8 @@ void CallTip::PaintCT(Surface *surfaceWindow) {  	offsetMain = insetX;    // initial alignment assuming no arrows  	PaintContents(surfaceWindow, true); +#ifndef __APPLE__ +	// OSX doesn't put borders on "help tags"  	// Draw a raised border around the edges of the window  	surfaceWindow->MoveTo(0, rcClientSize.bottom - 1);  	surfaceWindow->PenColour(colourShade.allocated); @@ -225,6 +239,7 @@ void CallTip::PaintCT(Surface *surfaceWindow) {  	surfaceWindow->PenColour(colourLight.allocated);  	surfaceWindow->LineTo(0, 0);  	surfaceWindow->LineTo(0, rcClientSize.bottom - 1); +#endif  }  void CallTip::MouseClick(Point pt) { | 
