/// <summary>
 ///     Initializes a new instance of the CallTipClickEventArgs class.
 /// </summary>
 /// <param name="callTipArrow">CallTipArrow clicked</param>
 /// <param name="currentIndex">Current posision of the overload list</param>
 /// <param name="newIndex">New position of the overload list</param>
 /// <param name="overloadList">List of overloads to be cycled in the calltip</param>
 /// <param name="highlightStart">Start position of the highlighted text</param>
 /// <param name="highlightEnd">End position of the highlighted text</param>
 public CallTipClickEventArgs(CallTipArrow callTipArrow, int currentIndex, int newIndex, OverloadList overloadList, int highlightStart, int highlightEnd)
 {
     _callTipArrow   = callTipArrow;
     _currentIndex   = currentIndex;
     _newIndex       = newIndex;
     _overloadList   = overloadList;
     _highlightStart = highlightStart;
     _highlightEnd   = highlightEnd;
 }
Example #2
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></param>
 /// <param name="position">The document position where the calltip should be displayed</param>
 /// <param name="startIndex">The index of the initial overload to display</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>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 /// </remarks>
 public void ShowOverload(OverloadList overloadList, int position, uint startIndex, int highlightStart, int highlightEnd)
 {
     _lastPos      = position;
     _overloadList = overloadList;
     unchecked
     {
         _overloadList.CurrentIndex = (int)startIndex;
     }
     _highlightEnd   = highlightEnd;
     _highlightStart = highlightStart;
     ShowOverloadInternal();
 }
Example #3
0
        /// <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;
        }
Example #4
0
        private void DoAutoComplete(char c)
        {
            const int OFFSET = 0; //2 (old code)

            string fullCode = GetCode == null ? this.Text : GetCode();

            if (fullCode == string.Empty)
            {
                return;
            }

            int curpos = CodePositionMapper != null
                ? CodePositionMapper(this.Text, this.CurrentPos - OFFSET)
                : this.CurrentPos - OFFSET;

            if (curpos < 0)
            {
                return;
            }

            SymbolResult result         = new CodeAnalysisService().LookupSymbols(fullCode, curpos, c);
            var          completionList = result.GetAutoCompleteList();

            if (completionList.Any())
            {
                this.AutoComplete.Show(5, completionList);
            }
            var overloadList = result.GetOverLoadList();

            if (overloadList.Any())
            {
                this.CallTip.BackColor = Color.FromArgb(231, 232, 236);
                this.CallTip.ForeColor = Color.Black;
                this.Styles[ScintillaNET.StylesCommon.CallTip].Font = _callTipFont;

                var ol = new ScintillaNET.OverloadList(overloadList.ToArray());
                this.CallTip.ShowOverload(ol);
            }
        }
Example #5
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></param>
 /// <param name="startIndex">The index of the initial overload to display</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>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 ///     The current document position will be used
 /// </remarks>
 public void ShowOverload(OverloadList overloadList, uint startIndex, int highlightStart, int highlightEnd)
 {
     ShowOverload(overloadList, -1, startIndex, highlightStart, highlightEnd);
 }
Example #6
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></param>
 /// <param name="startIndex">The index of the initial overload to display</param>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 ///     The current document position will be used with no highlight
 /// </remarks>
 public void ShowOverload(OverloadList overloadList, uint startIndex)
 {
     ShowOverload(overloadList, -1, startIndex, -1, -1);
 }
Example #7
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></param>
 /// <param name="position">The document position where the calltip should be displayed</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>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 ///     The overload startIndex will be 0
 /// </remarks>
 public void ShowOverload(OverloadList overloadList, int position, int highlightStart, int highlightEnd)
 {
     ShowOverload(overloadList, position, 0, highlightStart, highlightEnd);
 }
Example #8
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></param>
 /// <param name="position">The document position where the calltip should be displayed</param>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 ///     The overload startIndex will be 0 with no Highlight
 /// </remarks>
 public void ShowOverload(OverloadList overloadList, int position)
 {
     ShowOverload(overloadList, position, 0, -1, -1);
 }
Example #9
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></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>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 ///     The current document position will be used starting at position 0
 /// </remarks>
 public void ShowOverload(OverloadList overloadList, int highlightStart, int highlightEnd)
 {
     ShowOverload(overloadList, -1, 0, highlightStart, highlightEnd);
 }
Example #10
0
 /// <summary>
 ///     Shows the calltip with overloads
 /// </summary>
 /// <param name="overloadList">List of overloads to be displayed see <see cref="OverLoadList"/></param>
 /// <remarks>
 ///     ShowOverload automatically handles displaying a calltip with a list of overloads. It automatically shows the
 ///     up and down arrows and cycles through the list of overloads in response to mouse clicks.
 ///     The current document position will be used starting at position 0 with no highlight
 /// </remarks>
 public void ShowOverload(OverloadList overloadList)
 {
     ShowOverload(overloadList, -1, 0, -1, -1);
 }