aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CallTip.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/CallTip.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/CallTip.cxx')
-rw-r--r--src/CallTip.cxx15
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) {