aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 6be8b74b5..0ca5002a7 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -368,12 +368,19 @@ int ScintillaBase::AutoCompleteGetCurrent() {
void ScintillaBase::CallTipShow(Point pt, const char *defn) {
AutoCompleteCancel();
pt.y += vs.lineHeight;
+ // If container knows about STYLE_CALLTIP then use it in place of the
+ // STYLE_DEFAULT for the face name, size and character set. Also use it
+ // for the foreground and background colour.
+ int ctStyle = ct.UseStyleCallTip() ? STYLE_CALLTIP : STYLE_DEFAULT;
+ if (ct.UseStyleCallTip()) {
+ ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back);
+ }
PRectangle rc = ct.CallTipStart(currentPos, pt,
defn,
- vs.styles[STYLE_DEFAULT].fontName,
- vs.styles[STYLE_DEFAULT].sizeZoomed,
+ vs.styles[ctStyle].fontName,
+ vs.styles[ctStyle].sizeZoomed,
CodePage(),
- vs.styles[STYLE_DEFAULT].characterSet,
+ vs.styles[ctStyle].characterSet,
wMain);
// If the call-tip window would be out of the client
// space, adjust so it displays above the text.
@@ -624,11 +631,13 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
case SCI_CALLTIPSETBACK:
ct.colourBG = ColourDesired(wParam);
+ vs.styles[STYLE_CALLTIP].fore = ct.colourBG;
InvalidateStyleRedraw();
break;
case SCI_CALLTIPSETFORE:
ct.colourUnSel = ColourDesired(wParam);
+ vs.styles[STYLE_CALLTIP].fore = ct.colourUnSel;
InvalidateStyleRedraw();
break;
@@ -637,6 +646,11 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
InvalidateStyleRedraw();
break;
+ case SCI_CALLTIPUSESTYLE:
+ ct.SetTabSize((int)wParam);
+ InvalidateStyleRedraw();
+ break;
+
case SCI_USEPOPUP:
displayPopupMenu = wParam != 0;
break;