Esempio n. 1
0
        //--------------------------------------------------------------
        #region Layout operations
        //--------------------------------------------------------------

        /// <overloads>
        /// <summary>
        /// Determines whether the docking layout contains the specified element.
        /// </summary>
        /// </overloads>
        ///
        /// <summary>
        /// Determines whether an <see cref="IDockContainer"/> contains the specified
        /// <see cref="IDockElement"/>.
        /// </summary>
        /// <param name="dockContainer">The dock container.</param>
        /// <param name="dockElement">The dock element.</param>
        /// <returns>
        /// <see langword="true"/> if <paramref name="dockContainer"/> contains
        /// <paramref name="dockElement"/>; otherwise, <see langword="false"/>.
        /// </returns>
        internal static bool Contains(this IDockContainer dockContainer, IDockElement dockElement)
        {
            Debug.Assert(dockContainer != null);
            Debug.Assert(dockElement != null);

            if (dockContainer.RootPane == null)
            {
                return(false);
            }

            return(Contains(dockContainer.RootPane, dockElement));
        }
    private void OnIsFreeChanged(bool isFree)
    {
        if (!isFree)
        {
            return;
        }
        IDockContainer oContainer = ((IChildViewModel)((IChildViewModel)this.Parent).Parent).Parent as IDockContainer;

        if (oContainer != null)
        {
            this.SetParent(oContainer, () => oContainer.FreeItems);
        }
    }
Esempio n. 3
0
        /// <overloads>
        /// <summary>
        /// Removes the specified element from the docking layout.
        /// </summary>
        /// </overloads>
        ///
        /// <summary>
        /// Removes the specified element from the <see cref="IDockContainer"/>.
        /// </summary>
        /// <param name="rootContainer">The <see cref="IDockContainer"/>.</param>
        /// <param name="dockElement">The element to remove.</param>
        internal static void Remove(IDockContainer rootContainer, IDockElement dockElement)
        {
            Debug.Assert(rootContainer != null);
            Debug.Assert(rootContainer.RootPane != null);
            Debug.Assert(dockElement != null);

            if (rootContainer.RootPane == dockElement)
            {
                rootContainer.RootPane = null;
            }
            else
            {
                Remove(rootContainer.RootPane, dockElement);
            }
        }
Esempio n. 4
0
        public static IDockContainer GetDockParent(Widget control, string name)
        {
            IDockContainer c = GetDockParent(control);

            while (c != null)
            {
                if (((Widget)c).Name == name)
                {
                    return(c);
                }
                else
                {
                    c = GetDockParent((Widget)c);
                }
            }
            return(null);
        }
Esempio n. 5
0
 public DockPage PickPage(IDockContainer cont, Widget control)
 {
     foreach (IDockContainer idc in cont.GetDocks())
     {
         if (idc.Contains(control))
         {
             if (idc is DockPanel)
             {
                 return(((DockPanel)idc).GetPage(control));
             }
             else
             {
                 return(PickPage(idc, control));
             }
         }
     }
     return(null);
 }
Esempio n. 6
0
		/// <summary>
		/// Initializes a new instance of the Container with the specified handler
		/// </summary>
		/// <param name="generator">Generator for the widget</param>
		/// <param name="handler">Pre-created handler to attach to this instance</param>
		/// <param name="initialize">True to call handler's Initialze method, false otherwise</param>
		protected DockContainer(Generator generator, IDockContainer handler, bool initialize = true)
			: base(generator, handler, initialize)
		{
		}
Esempio n. 7
0
 public extern DockNode(IDockContainer container);
Esempio n. 8
0
 public extern DockNode FindNodeFromContainer(IDockContainer container);
Esempio n. 9
0
 public extern DockNode DockFill(DockNode reference, IDockContainer panel);
Esempio n. 10
0
 public extern DockNode DockDown(DockNode reference, IDockContainer panel, double ratio);
Esempio n. 11
0
 /// <summary>
 /// Initializes a new instance of the Container with the specified handler
 /// </summary>
 /// <param name="generator">Generator for the widget</param>
 /// <param name="handler">Pre-created handler to attach to this instance</param>
 /// <param name="initialize">True to call handler's Initialze method, false otherwise</param>
 protected DockContainer(Generator generator, IDockContainer handler, bool initialize = true)
     : base(generator, handler, initialize)
 {
 }