From c6fb1da330611ac22757547d6f4e70e00a88d10e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 24 Sep 2009 13:16:56 +0000 Subject: [PATCH] Applied #10799: using CallTipUseStyle() doesn't enable wxSTC_STYLE_CALLTIP git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/ScintillaWX.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index c91a8e9770..2a6f2936f8 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -104,9 +104,9 @@ public: | wxFRAME_FLOAT_ON_PARENT | wxBORDER_NONE #ifdef __WXMAC__ - | wxPOPUP_WINDOW + | wxPOPUP_WINDOW #endif - ), + ), #endif m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord) { @@ -180,7 +180,7 @@ public: return rv; } #endif - + wxPoint GetMyPosition() { return wxPoint(m_cx, m_cy); @@ -520,7 +520,7 @@ void ScintillaWX::Paste() { #if wxUSE_UNICODE // free up the old character buffer in case the text is real big - data.SetText(wxEmptyString); + data.SetText(wxEmptyString); text = wxEmptyString; #endif int len = strlen(buf); @@ -701,12 +701,18 @@ sptr_t ScintillaWX::WndProc(unsigned int iMessage, char* defn = reinterpret_cast(lParam); AutoCompleteCancel(); pt.y += vs.lineHeight; + 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.