Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        private bool ShouldPanelIndicatorVisible(DockState dockState)
        {
            if (!Visible)
            {
                return(false);
            }

            if (DockPanel.DockWindows[dockState].Visible)
            {
                return(false);
            }

            return(DragHandler.IsDockStateValid(dockState));
        }
Esempio n. 3
0
 public DockIndicator(DragHandler dragHandler)
 {
     m_dragHandler = dragHandler;
     Controls.AddRange(new Control[]
     {
         PaneDiamond,
         PanelLeft,
         PanelRight,
         PanelTop,
         PanelBottom,
         PanelFill
     });
     Bounds = GetAllScreenBounds();
     Region = new Region(Rectangle.Empty);
 }
Esempio n. 4
0
        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);
            }
        }
Esempio n. 5
0
        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);
            }
        }
Esempio n. 6
0
		/// <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();
        }
Esempio n. 7
0
		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);
		}
Esempio n. 8
0
		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);
		}
Esempio n. 9
0
		public DockIndicator(DragHandler dragHandler)
		{
			m_dragHandler = dragHandler;
			Controls.AddRange(new Control[]
				{
					PaneDiamond,
					PanelLeft,
					PanelRight,
					PanelTop,
					PanelBottom,
					PanelFill
				});
			Bounds = GetAllScreenBounds();
			Region = new Region(Rectangle.Empty);
		}