/// <summary> /// Displays a calltip without overloads /// </summary> /// <param name="message">The calltip message to be displayed</param> /// <param name="position">The document position to show the calltip</param> /// <param name="highlightStart">Start posision of the part of the message that should be selected</param> /// <param name="highlightEnd">End posision of the part of the message that should be selected</param> public void Show(string message, int position, int highlightStart, int highlightEnd) { _lastPos = position; if (position < 0) { position = NativeScintilla.GetCurrentPos(); } _overloadList = null; _message = message; NativeScintilla.CallTipShow(position, message); HighlightStart = highlightStart; HighlightEnd = highlightEnd; }
internal void ShowOverloadInternal() { int pos = _lastPos; if (pos < 0) { pos = NativeScintilla.GetCurrentPos(); } string s = "\u0001 {1} of {2} \u0002 {0}"; s = string.Format(s, _overloadList.Current, _overloadList.CurrentIndex + 1, _overloadList.Count); NativeScintilla.CallTipCancel(); NativeScintilla.CallTipShow(pos, s); NativeScintilla.CallTipSetHlt(_highlightStart, _highlightEnd); }
internal void ShowOverloadInternal() { int pos = _lastPos; if (pos < 0) { pos = NativeScintilla.GetCurrentPos(); } // Scintilla's way of handling "1 of n" type calltips string prefix = string.Format(CultureInfo.CurrentUICulture, "\u0001 {0} of {1} \u0002 ", _overloadList.CurrentIndex + 1, _overloadList.Count); // Show me the money NativeScintilla.CallTipCancel(); NativeScintilla.CallTipShow(pos, prefix + _overloadList.Current); NativeScintilla.CallTipSetHlt(_highlightStart + prefix.Length, _highlightEnd + prefix.Length); // Adjust the highlight offsets }