protected override bool OnRightMouseUp(Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot) { IVwSelection sel = RootBox.MakeSelAt(pt.X, pt.Y, rcSrcRoot, rcDstRoot, false); TextSelInfo tsi = new TextSelInfo(sel); return(HandleRightClickOnObject(tsi.Hvo(false))); }
protected override bool OnRightMouseUp(Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot) { // if we don't install the selection here, a previous selection may give us // spurious results later on when handling the UI this right click brings up; // see LT-12154. IVwSelection sel = RootBox.MakeSelAt(pt.X, pt.Y, rcSrcRoot, rcDstRoot, true); TextSelInfo tsi = new TextSelInfo(sel); return(HandleRightClickOnObject(tsi.Hvo(false))); }
protected override bool OnRightMouseUp(Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot) { IVwSelection sel = RootBox.MakeSelAt(pt.X, pt.Y, new SIL.FieldWorks.Common.Utils.Rect(rcSrcRoot.Left, rcSrcRoot.Top, rcSrcRoot.Right, rcSrcRoot.Bottom), new SIL.FieldWorks.Common.Utils.Rect(rcDstRoot.Left, rcDstRoot.Top, rcDstRoot.Right, rcDstRoot.Bottom), true); if (sel == null) { return(base.OnRightMouseUp(pt, rcSrcRoot, rcDstRoot)); // no object, so quit and let base handle it } if (m_formulaControl.DisplayContextMenu(sel)) { return(true); } else { return(base.OnRightMouseUp(pt, rcSrcRoot, rcDstRoot)); } }
protected override bool OnRightMouseUp(Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot) { IVwSelection sel = RootBox.MakeSelAt(pt.X, pt.Y, new Rect(rcSrcRoot.Left, rcSrcRoot.Top, rcSrcRoot.Right, rcSrcRoot.Bottom), new Rect(rcDstRoot.Left, rcDstRoot.Top, rcDstRoot.Right, rcDstRoot.Bottom), false); if (sel == null) { return(base.OnRightMouseUp(pt, rcSrcRoot, rcDstRoot)); // no object, so quit and let base handle it } var e = new ContextMenuRequestedEventArgs(sel); if (ContextMenuRequested != null) { ContextMenuRequested(this, e); } if (e.Handled) { return(true); } return(base.OnRightMouseUp(pt, rcSrcRoot, rcDstRoot)); }