public void MouseHover(TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
        {
            if (this.LineSegment == null)
            {
                return;
            }
            bool isOver = MouseIsOverMarker(editor, args);

            if (isOver != oldIsOver)
            {
                editor.Document.CommitLineUpdate(this.LineSegment);
            }
            oldIsOver = isOver;

            int errorNumber = MouseIsOverError(editor, args);

            if (errorNumber >= 0)
            {
                if (!isOver)
                {
                    // don't show tooltip when hovering over error counter layout.
                    result.TooltipMarkup = GLib.Markup.EscapeText(errors[errorNumber].ErrorMessage);
                }
            }
        }
Ejemplo n.º 2
0
 public void MouseHover(TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
 {
     if (LineSegment == null)
     {
         return;
     }
     if (bubbleDrawX < args.X && args.X < bubbleDrawX + bubbleWidth)
     {
         editor.HideTooltip();
         result.Cursor = null;
         cache.StartHover(this, bubbleDrawX, bubbleDrawY, bubbleWidth, bubbleIsReduced);
     }
 }
Ejemplo n.º 3
0
        void IActionTextLineMarker.MouseHover(Mono.TextEditor.MonoTextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
        {
            if (args.Button != 0)
            {
                return;
            }
            var line = editor.GetLine(loc.Line);

            if (line == null)
            {
                return;
            }
            var          x = editor.ColumnToX(line, loc.Column) - editor.HAdjustment.Value + editor.TextViewMargin.TextStartPosition;
            var          y = editor.LineToY(line.LineNumber + 1) - editor.VAdjustment.Value;
            const double xAdditionalSpace = tagMarkerWidth;

            if (args.X - x >= -xAdditionalSpace * editor.Options.Zoom &&
                args.X - x < (tagMarkerWidth + xAdditionalSpace) * editor.Options.Zoom /*&&
                                                                                        * args.Y - y < (editor.LineHeight / 2) * editor.Options.Zoom*/)
            {
                result.Cursor = null;
                ShowPopup?.Invoke(null, null);
            }
            else
            {
                CancelPopup?.Invoke(null, null);
            }
        }
            void IActionTextLineMarker.MouseHover(TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
            {
                if (args.Button != 0)
                {
                    return;
                }
                var line = editor.GetLine(loc.Line);

                if (line == null)
                {
                    return;
                }
                var x = editor.ColumnToX(line, loc.Column) - editor.HAdjustment.Value + editor.TextViewMargin.TextStartPosition;
                var y = editor.LineToY(line.LineNumber + 1) - editor.VAdjustment.Value;

                if (args.X - x >= 0 * editor.Options.Zoom &&
                    args.X - x < tagMarkerWidth * editor.Options.Zoom &&
                    args.Y - y < (editor.LineHeight / 2) * editor.Options.Zoom)
                {
                    result.Cursor = null;
                    Popup();
                }
                else
                {
                    codeActionEditorExtension.CancelSmartTagPopupTimeout();
                }
            }
Ejemplo n.º 5
0
 void IActionTextLineMarker.MouseHover(MonoTextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
 {
     MouseHover?.Invoke(this, new TextEventArgsWrapper(args));
     result.Cursor = textLinkCursor;
     if (OnlyShowLinkOnHover && args.LineSegment != null)
     {
         editor.GetTextEditorData().Document.CommitLineUpdate(args.LineSegment);
         editor.TextViewMargin.HoveredLineChanged += new UpdateOldLine(editor, args.LineSegment).TextViewMargin_HoveredLineChanged;
     }
 }
 void IActionTextLineMarker.MouseHover(MonoTextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
 {
     MouseHover?.Invoke(this, new TextEventArgsWrapper(args));
     result.Cursor = textLinkCursor;
 }
            void IActionTextLineMarker.MouseHover(TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
            {
                if (args.Button != 0)
                {
                    return;
                }
                var line = editor.GetLine(loc.Line);
                var x    = editor.ColumnToX(line, loc.Column) - editor.HAdjustment.Value;
                var y    = editor.LineToY(line.LineNumber) - editor.VAdjustment.Value;

                if (args.X - x >= 0 * editor.Options.Zoom &&
                    args.X - x < tagMarkerWidth * editor.Options.Zoom &&
                    y - args.Y < (tagMarkerHeight) * editor.Options.Zoom)
                {
                    result.Cursor = arrowCursor;
                    Popup();
                }
                else
                {
                    codeActionEditorExtension.CancelSmartTagPopupTimeout();
                }
            }