Ejemplo n.º 1
0
        public int MoveToPoint(Point point, Interop.COORD_SYSTEM eCoordSystem, Interop.IHTMLElement pElementContext, uint dwHitTestOptions)
        {
            uint pdwHitTestResults;

            Interop.POINT ptPoint = new Interop.POINT();
            ptPoint.x = point.X;
            ptPoint.y = point.Y;
            dp.MoveToPoint(ptPoint, eCoordSystem, pElementContext, dwHitTestOptions, out pdwHitTestResults);
            return((int)pdwHitTestResults);
        }
Ejemplo n.º 2
0
 protected override void OnDoubleClick(EventArgs e)
 {
     base.OnDoubleClick(e);
     Interop.POINT pt = new Interop.POINT(0, 0);
     Interop.GetCursorPos(ref pt);
     Point point2 = base.PointToClient(new Point(pt.x, pt.y));
     TreeNode nodeAt = base.GetNodeAt(point2);
     if (nodeAt == base.SelectedNode)
     {
         this.OnNodeDoubleClick(new TreeViewEventArgs(nodeAt, TreeViewAction.ByMouse));
     }
 }
Ejemplo n.º 3
0
        ///////////////////////////////////////////////////////////////////////////
        // IDocHostUIHandler Implementation

        public int ShowContextMenu(int dwID, Interop.POINT pt, object pcmdtReserved, object pdispReserved)
        {
            //            Point location = hostControl.PointToClient(new Point(pt.x, pt.y));
            //
            //            ShowContextMenuEventArgs e = new ShowContextMenuEventArgs(location, false);
            //
            //            try {
            //                hostControl.OnShowContextMenu(e);
            //            }
            //            catch {
            //                // Make sure we return Interop.S_OK
            //            }
            //
            return(Interop.S_OK);
        }
Ejemplo n.º 4
0
        public int ShowContextMenu(int dwID, ref Interop.POINT pt, object pcmdtReserved, object pdispReserved)
        {
            Point location = htmlEditor.PointToClient(new Point(pt.x, pt.y));

            Interop.IHTMLElement element = this.MSHTMLDocument.ElementFromPoint(location.X, location.Y);
            Control ielement             = this.htmlEditor.GenericElementFactory.CreateElement(element);
            ShowContextMenuEventArgs e   = new ShowContextMenuEventArgs(location, false, dwID, ielement);

            try {
                htmlEditor.OnShowContextMenu(e);
            }
            catch {
                // Make sure we return Interop.S_OK
            }
            return(Interop.S_OK);
        }
Ejemplo n.º 5
0
        public int ShowContextMenu(int dwID, Interop.POINT pt, object pcmdtReserved, object pdispReserved)
        {
            int   ret      = Interop.S_FALSE;
            Point location = hostControl.PointToClient(new Point(pt.x, pt.y));
            BrowserContextMenuCancelEventArgs e = new BrowserContextMenuCancelEventArgs(location, false);

            try {
                hostControl.RaiseOnShowContextMenu(e);
            }
            catch {}
            finally {
                if (e.Cancel)
                {
                    ret = Interop.S_OK;
                }
            }
            return(ret);
        }
Ejemplo n.º 6
0
 public static extern bool GetCaretPos([Out] out Interop.POINT pPoint);
Ejemplo n.º 7
0
 int Interop.IDocHostShowUI.ShowHelp(IntPtr hwnd, string lpHelpFile, uint uCommand, uint dwData,
                                     Interop.POINT ptMouse, object pDispatchObjectHit)
 {
     return(Interop.S_OK);
 }
Ejemplo n.º 8
0
 public Interop.POINT GetLocation(bool fTranslate)
 {
     Interop.POINT pPoint = new Interop.POINT();
     cr.GetLocation(ref pPoint, fTranslate);
     return(pPoint);
 }
Ejemplo n.º 9
0
 public Interop.POINT TransformPoint(Interop.POINT pPoint, Interop.COORD_SYSTEM eSource, Interop.COORD_SYSTEM eDestination, IElement element)
 {
     Interop.IHTMLElement pIElement = element.GetBaseElement();
     ds.TransformPoint(ref pPoint, eSource, eDestination, pIElement);
     return(pPoint);
 }
Ejemplo n.º 10
0
 private void OnShowContextMenu()
 {
     if ((this._owner != null) && this._owner.IsHandleCreated)
     {
         ShowContextMenuEventHandler handler = (ShowContextMenuEventHandler) base.Events[EventShowContextMenu];
         if (handler != null)
         {
             Interop.POINT pt = new Interop.POINT();
             Interop.GetCursorPos(ref pt);
             Point p = new Point(pt.x, pt.y);
             p = this._owner.PointToClient(p);
             Interop.SetForegroundWindow(this._owner.Handle);
             ShowContextMenuEventArgs e = new ShowContextMenuEventArgs(p, false);
             handler(this, e);
             Interop.PostMessage(this._owner.Handle, 0, IntPtr.Zero, IntPtr.Zero);
         }
     }
 }
Ejemplo n.º 11
0
 public void SetItemPosition(int t, Interop.POINT pt)
 {
     throw new NotImplementedException();
 }