public void BeginDrag(IDockDragSource dragSource) { this.DragSource = dragSource; if(!this.BeginDrag()){ this.DragSource = null; return; } this.Outline = new DockOutline(); this.Indicator = new DockIndicator(this); this.Indicator.Show(false); this.FloatOutlineBounds = this.DragSource.BeginDrag(this.StartMousePosition); }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (!dragSource.CanDockTo(this)) return; Point ptMouse = Control.MousePosition; HitTestResult 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); }
public void BeginDrag(IDockDragSource dragSource) { this.DragSource = dragSource; if (!this.BeginDrag()) { this.DragSource = null; return; } this.Outline = new DockOutline(); this.Indicator = new DockIndicator(this); this.Indicator.Show(false); this.FloatOutlineBounds = this.DragSource.BeginDrag(this.StartMousePosition); }
public void BeginDrag(IDockDragSource dragSource) { DragSource = dragSource; if (!BeginDrag()) { DragSource = null; return; } Outline = new DockOutline(); Indicator = new DockIndicator(this); Indicator.Show(false); //MessageBox.Show(DragSource.GetType().FullName); FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition); }
public void BeginDrag(IDockDragSource dragSource) { DragSource = dragSource; if (!BeginDrag()) { DragSource = null; return; } Outline = DockPanel.Extender.DockOutlineFactory.CreateDockOutline(); Indicator = new DockIndicator(this); FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition); }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (this.VisibleNestedPanes.Count == 1) { DockPane pane = this.VisibleNestedPanes[0]; if (dragSource.CanDockTo(pane)) { Point mousePosition = Control.MousePosition; uint lParam = Win32Helper.MakeLong(mousePosition.X, mousePosition.Y); if (NativeMethods.SendMessage(base.Handle, 132, 0, lParam) == 2) { dockOutline.Show(this.VisibleNestedPanes[0], -1); } } } }
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 (this.VisibleNestedPanes.Count == 1) { DockPane pane = this.VisibleNestedPanes[0]; if (!dragSource.CanDockTo(pane)) { return; } Point ptMouse = MousePosition; uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y); if (NativeMethods.SendMessage(this.Handle, (int)Msgs.WM_NCHITTEST, 0, lParam) == (uint)HitTest.HTCAPTION) { dockOutline.Show(this.VisibleNestedPanes[0], -1); } } }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (VisibleNestedPanes.Count == 1) { DockPane pane = VisibleNestedPanes[0]; if (!dragSource.CanDockTo(pane)) { return; } Point ptMouse = Control.MousePosition; uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y); if (NativeMethods.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, IntPtr.Zero, (IntPtr)lParam) == (IntPtr)Win32.HitTest.HTCAPTION) { dockOutline.Show(VisibleNestedPanes[0], -1); } } }
public void BeginDrag(IDockDragSource dragSource) { Console.WriteLine("DockDragHandler:BeginDrag"); DragSource = dragSource; if (!BeginDrag()) { DragSource = null; return; } Console.WriteLine("DockOutline:new"); Outline = new DockOutline(); Console.WriteLine("DockIndicator:new"); Indicator = new DockIndicator(this); Indicator.Show(false); FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition); }
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); } }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { Console.WriteLine("dockPane.TestDrop"); if (!dragSource.CanDockTo(this)) { return; } Point ptMouse = Control.MousePosition; HitTestResult 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); } }
public static CursorPoint CursorPointInformation(DockPanel dockPanel, IDockDragSource dragSource) { FloatWindow sourceFloatWindow = dragSource as FloatWindow; CursorPoint info = new CursorPoint(); info.DragSource = dragSource; info.Cursor = Control.MousePosition; // find the window beneath the cursor int currentProcessId = System.Diagnostics.Process.GetCurrentProcess().Id; NativeMethods.EnumWindows((hWnd, arg) => { uint processId; NativeMethods.GetWindowThreadProcessId(hWnd, out processId); if (processId == currentProcessId) { if (sourceFloatWindow != null && sourceFloatWindow.Handle == hWnd) { // ignore the source floating window return(true); } Control window = Control.FromHandle(hWnd); if (window != null && window.Visible && ControlContains(window, info.Cursor)) { // look into child controls if (SearchChilds(window, info, dockPanel)) { return(false); } } } return(true); }, IntPtr.Zero); return(info); }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (VisibleNestedPanes.Count == 1) { DockPane pane = VisibleNestedPanes[0]; if (!dragSource.CanDockTo(pane)) return; Point ptMouse = Control.MousePosition; uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y); if (!Win32Helper.IsRunningOnMono) if (NativeMethods.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, lParam) == (uint)Win32.HitTest.HTCAPTION) dockOutline.Show(VisibleNestedPanes[0], -1); } }
internal void BeginDrag(IDockDragSource dragSource) { GetDockDragHandler().BeginDrag(dragSource); }
internal void BeginDrag(IDockDragSource dragSource) { GetDockDragHandler().BeginDrag(dragSource); }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if (!dragSource.CanDockTo(this)) return; Point ptMouse = Control.MousePosition; HitTestResult 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); }
public void BeginDrag(IDockDragSource dragSource) { DragSource = dragSource; if (!BeginDrag()) { DragSource = null; return; } Outline = DockPanel.Theme.Extender.DockOutlineFactory.CreateDockOutline(); Indicator = DockPanel.Theme.Extender.DockIndicatorFactory.CreateDockIndicator(this); Indicator.Show(false); FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition); }
internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) { if(this.VisibleNestedPanes.Count == 1){ DockPane pane = this.VisibleNestedPanes[0]; if(!dragSource.CanDockTo(pane)){ return; } Point ptMouse = MousePosition; uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y); if(NativeMethods.SendMessage(this.Handle, (int)Msgs.WM_NCHITTEST, 0, lParam) == (uint)HitTest.HTCAPTION){ dockOutline.Show(this.VisibleNestedPanes[0], -1); } } }
internal void BeginDrag(IDockDragSource dragSource) { Console.WriteLine("DockPanel:BeginDrag"); GetDockDragHandler().BeginDrag(dragSource); }