Beispiel #1
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);
            }
        }
 public override void InformMousePress(MonoTextEditor editor, Margin margin, MarginMouseEventArgs args)
 {
     if (!(margin is QuickFixMargin))
     {
         return;
     }
     ShowPopup?.Invoke(this, EventArgs.Empty);
 }