public override void OnMouseLeftButtonUp(IGlyphTextMarkerMouseProcessorContext context, MouseButtonEventArgs e) { bool sameLine = leftButtonDownLineIdentityTagWeakReference?.Target == context.Line.IdentityTag; leftButtonDownLineIdentityTagWeakReference = null; if (sameLine) { e.Handled = true; var documentViewer = wpfTextViewHost.TextView.TextBuffer.TryGetDocumentViewer(); if (documentViewer != null) breakpointService.Value.Toggle(documentViewer, context.Line.Start.Position); } }
public override void OnMouseLeftButtonUp(IGlyphTextMarkerMouseProcessorContext context, MouseButtonEventArgs e) { bool sameLine = leftButtonDownLineIdentityTagWeakReference?.Target == context.Line.IdentityTag; leftButtonDownLineIdentityTagWeakReference = null; if (sameLine) { e.Handled = true; textViewBreakpointService.Value.ToggleCreateBreakpoint(wpfTextViewHost.TextView, new VirtualSnapshotPoint(context.Line.Start)); } }
public override void OnMouseLeftButtonUp(IGlyphTextMarkerMouseProcessorContext context, MouseButtonEventArgs e) { bool sameLine = leftButtonDownLineIdentityTagWeakReference?.Target == context.Line.IdentityTag; leftButtonDownLineIdentityTagWeakReference = null; if (sameLine) { e.Handled = true; var documentViewer = wpfTextViewHost.TextView.TextBuffer.TryGetDocumentViewer(); if (documentViewer != null) { breakpointService.Value.Toggle(documentViewer, context.Line.Start.Position); } } }
/// <summary> /// Default mouse leave handler /// </summary> /// <param name="context">Context</param> /// <param name="e">Mouse event args</param> public virtual void OnMouseLeave(IGlyphTextMarkerMouseProcessorContext context, MouseEventArgs e) { }
/// <summary> /// Default mouse right button up handler /// </summary> /// <param name="context">Context</param> /// <param name="e">Mouse event args</param> public virtual void OnMouseRightButtonUp(IGlyphTextMarkerMouseProcessorContext context, MouseButtonEventArgs e) { }
/// <summary> /// Default mouse left button down handler /// </summary> /// <param name="context">Context</param> /// <param name="e">Mouse event args</param> public virtual void OnMouseLeftButtonDown(IGlyphTextMarkerMouseProcessorContext context, MouseButtonEventArgs e) { }
/// <summary> /// Creates context menu objects /// </summary> /// <param name="context">Context</param> /// <param name="marginRelativePoint">Position of the mouse pointer relative to the glyph margin</param> /// <returns></returns> public virtual IEnumerable <GuidObject> GetContextMenuObjects(IGlyphTextMarkerMouseProcessorContext context, Point marginRelativePoint) { yield break; }
/// <summary> /// Creates context menu objects /// </summary> /// <param name="context">Context</param> /// <param name="marginRelativePoint">Position of the mouse pointer relative to the glyph margin</param> /// <returns></returns> public virtual IEnumerable<GuidObject> GetContextMenuObjects(IGlyphTextMarkerMouseProcessorContext context, Point marginRelativePoint) { yield break; }
public override void OnMouseLeave(IGlyphTextMarkerMouseProcessorContext context, MouseEventArgs e) => ClearPressedLine();
public override void OnMouseLeftButtonDown(IGlyphTextMarkerMouseProcessorContext context, MouseButtonEventArgs e) => leftButtonDownLineIdentityTagWeakReference = new WeakReference(context.Line.IdentityTag);