public void BeginDrag(IDockDragSource dragSource) { DragSource = dragSource; if (!BeginDrag()) { DragSource = null; return; } Outline = new DockOutline(); Indicator = new DockIndicator(this); Indicator.Show(false); FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition); }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (VisibleNestedPanes.Count == 1) { var pane = VisibleNestedPanes[0]; if (!dragSource.CanDockTo(pane)) return; var ptMouse = MousePosition; var lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y); if (NativeMethods.SendMessage(Handle, (int)Msgs.WM_NCHITTEST, 0, lParam) == (uint)HitTest.HTCAPTION) dockOutline.Show(VisibleNestedPanes[0], -1); } }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (!dragSource.CanDockTo(this)) return; var ptMouse = MousePosition; var hitTestResult = GetHitTest(ptMouse); if (hitTestResult.HitArea == HitTestArea.Caption) dockOutline.Show(this, -1); else if (hitTestResult.HitArea == HitTestArea.TabStrip && hitTestResult.Index != -1) dockOutline.Show(this, hitTestResult.Index); }