diff options
| author | nyamatongwe <devnull@localhost> | 2006-02-04 00:02:08 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2006-02-04 00:02:08 +0000 |
| commit | bf7c1067974668610114f7da9be6ac16763137fd (patch) | |
| tree | a48035ed8a6c043c890d5bfee7d2718f3aa10976 /src/ScintillaBase.cxx | |
| parent | 7e37844ea349b580b3c5557d7244cb43f15326d2 (diff) | |
| download | scintilla-mirror-bf7c1067974668610114f7da9be6ac16763137fd.tar.gz | |
Modification from Greg Smith to allow setting text style attributes for
calltips as STYLE_CALLTIP and display calltips with tabs to align text.
Diffstat (limited to 'src/ScintillaBase.cxx')
| -rw-r--r-- | src/ScintillaBase.cxx | 20 |
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; |
