private bool ShouldPaneDiamondVisible() { if (DockPane == null) { return(false); } if (DragHandler.DragControl == DockPane) { return(false); } if (DragHandler.DragControl == DockPane.DockListContainer) { return(false); } IDockableWindow content = DragHandler.DragControl as IDockableWindow; if (content != null && DockPane.Contents.Contains(content) && DockPane.DisplayingContents.Count == 1) { return(false); } return(DragHandler.IsDockStateValid(DockPane.DockState)); }
private bool ShouldPanelIndicatorVisible(DockState dockState) { if (!Visible) { return(false); } if (DockPanel.DockWindows[dockState].Visible) { return(false); } return(DragHandler.IsDockStateValid(dockState)); }
public DockIndicator(DragHandler dragHandler) { m_dragHandler = dragHandler; Controls.AddRange(new Control[] { PaneDiamond, PanelLeft, PanelRight, PanelTop, PanelBottom, PanelFill }); Bounds = GetAllScreenBounds(); Region = new Region(Rectangle.Empty); }
internal void TestDrop(DragHandler dragHandler) { if (!dragHandler.IsDockStateValid(DockState) || DisplayingList.Count != 1) { return; } Point ptMouse = Control.MousePosition; uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y); if (User32.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, lParam) == (uint)Win32.HitTest.HTCAPTION) { dragHandler.DockOutline.Show(DisplayingList[0], -1); } }
internal void TestDrop(DragHandler dragHandler) { if (!dragHandler.IsDockStateValid(DockState)) { return; } Point ptMouse = Control.MousePosition; HitTestResult hitTestResult = GetHitTest(ptMouse); if (hitTestResult.HitArea == HitTestArea.Caption) { dragHandler.DockOutline.Show(this, -1); } else if (hitTestResult.HitArea == HitTestArea.TabStrip && hitTestResult.Index != -1) { dragHandler.DockOutline.Show(this, hitTestResult.Index); } }