private bool ShouldPaneDiamondVisible() { if (DockPane == null) { return(false); } if (DragHandler.DragControl == DockPane) { return(false); } if (DragHandler.DragControl == DockPane.DockListContainer) { return(false); } IDockContent content = DragHandler.DragControl as IDockContent; 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); } }
/// <include file='CodeDoc\DockPanel.xml' path='//CodeDoc/Class[@name="DockPanel"]/Constructor[@name="()"]/*'/> public DockPanel() { m_extender = new DockPanelExtender(this); m_dragHandler = new DragHandler(this); m_panes = new DockPaneCollection(); m_floatWindows = new FloatWindowCollection(); SetStyle(ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); SuspendLayout(); Font = SystemInformation.MenuFont; m_autoHideWindow = new AutoHideWindow(this); m_autoHideWindow.Visible = false; if (Environment.Version.Major == 1) { m_dummyControl = new DummyControl(); m_dummyControl.Bounds = Rectangle.Empty; Controls.Add(m_dummyControl); } m_dockWindows = new DockWindowCollection(this); Controls.AddRange(new Control[] { DockWindows[DockState.Document], DockWindows[DockState.DockLeft], DockWindows[DockState.DockRight], DockWindows[DockState.DockTop], DockWindows[DockState.DockBottom] }); m_localWindowsHook = new LocalWindowsHook(HookType.WH_CALLWNDPROCRET); m_localWindowsHook.HookInvoked += new LocalWindowsHook.HookEventHandler(this.HookEventHandler); m_localWindowsHook.Install(); m_dummyContent = new DockContent(); ResumeLayout(); }
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); }