SetWindowRecurse() приватный Метод

private SetWindowRecurse ( ContainerWindow win ) : void
win ContainerWindow
Результат void
Пример #1
0
 internal void ShowPopupWithMode(ShowMode mode)
 {
     m_ShowMode = (int)mode;
     Internal_Show(m_PixelRect, m_ShowMode, m_MinSize, m_MaxSize);
     if (m_RootView)
     {
         m_RootView.SetWindowRecurse(this);
     }
     Internal_SetTitle(m_Title);
     Save();
     Internal_BringLiveAfterCreation(false, false);
 }
 internal void ShowPopupWithMode(ShowMode mode)
 {
     m_ShowMode = (int)mode;
     Internal_Show(m_PixelRect, m_ShowMode, m_MinSize, m_MaxSize);
     if (m_RootView)
     {
         m_RootView.SetWindowRecurse(this);
     }
     Internal_SetTitle(m_Title);
     Save();
     //  only set focus iff mode is a popupMenu.
     Internal_BringLiveAfterCreation(false, mode == ShowMode.PopupMenu);
 }
        internal void ShowPopupWithMode(ShowMode mode, bool giveFocus)
        {
            m_ShowMode = (int)mode;
            Internal_Show(m_PixelRect, m_ShowMode, m_MinSize, m_MaxSize);
            if (m_RootView)
            {
                m_RootView.SetWindowRecurse(this);
            }
            Internal_SetTitle(m_Title);
            Save();
            //  only set focus if mode is a popupMenu.
            Internal_BringLiveAfterCreation(true, giveFocus, false);

            // Fit window to screen - needs to be done after bringing the window live
            position          = FitWindowRectToScreen(m_PixelRect, true, false);
            rootView.position = new Rect(0, 0, Mathf.Ceil(m_PixelRect.width), Mathf.Ceil(m_PixelRect.height));
            rootView.Reflow();
        }
Пример #4
0
        public virtual void RemoveChild(int idx)
        {
            View child = m_Children[idx];

            child.m_Parent = null;
            child.SetWindowRecurse(null);
            System.Array.Copy(m_Children, idx + 1, m_Children, idx, m_Children.Length - idx - 1);
            System.Array.Resize(ref m_Children, m_Children.Length - 1);
            ChildrenMinMaxChanged();
        }
Пример #5
0
 internal void SetWindowRecurse(ContainerWindow win)
 {
     this.SetWindow(win);
     View[] children = this.m_Children;
     for (int i = 0; i < children.Length; i++)
     {
         View view = children[i];
         view.SetWindowRecurse(win);
     }
 }
Пример #6
0
        public virtual void RemoveChild(int idx)
        {
            View view = this.m_Children[idx];

            view.m_Parent = null;
            view.SetWindowRecurse(null);
            Array.Copy(this.m_Children, idx + 1, this.m_Children, idx, this.m_Children.Length - idx - 1);
            Array.Resize <View>(ref this.m_Children, this.m_Children.Length - 1);
            this.ChildrenMinMaxChanged();
        }
Пример #7
0
        public virtual void RemoveChild(int idx)
        {
            View child = this.m_Children[idx];

            child.m_Parent = (View)null;
            child.SetWindowRecurse((ContainerWindow)null);
            Array.Copy((Array)this.m_Children, idx + 1, (Array)this.m_Children, idx, this.m_Children.Length - idx - 1);
            Array.Resize <View>(ref this.m_Children, this.m_Children.Length - 1);
            this.ChildrenMinMaxChanged();
        }
Пример #8
0
 public virtual void AddChild(View child, int idx)
 {
     Array.Resize <View>(ref this.m_Children, this.m_Children.Length + 1);
     if (idx != this.m_Children.Length - 1)
     {
         Array.Copy(this.m_Children, idx, this.m_Children, idx + 1, this.m_Children.Length - idx - 1);
     }
     this.m_Children[idx] = child;
     if (child.m_Parent)
     {
         child.m_Parent.RemoveChild(child);
     }
     child.m_Parent = this;
     child.SetWindowRecurse(this.window);
     this.ChildrenMinMaxChanged();
 }
Пример #9
0
        public virtual void AddChild(View child, int idx)
        {
            System.Array.Resize(ref m_Children, m_Children.Length + 1);
            if (idx != m_Children.Length - 1)
            {
                System.Array.Copy(m_Children, idx, m_Children, idx + 1, m_Children.Length - idx - 1);
            }

            m_Children[idx] = child;

            if (child.m_Parent)
            {
                child.m_Parent.RemoveChild(child);
            }
            child.m_Parent = this;
            child.SetWindowRecurse(window);
            ChildrenMinMaxChanged();
        }
Пример #10
0
 public virtual void AddChild(View child, int idx)
 {
     Array.Resize<View>(ref this.m_Children, this.m_Children.Length + 1);
     if (idx != (this.m_Children.Length - 1))
     {
         Array.Copy(this.m_Children, idx, this.m_Children, idx + 1, (this.m_Children.Length - idx) - 1);
     }
     this.m_Children[idx] = child;
     if (child.m_Parent != null)
     {
         child.m_Parent.RemoveChild(child);
     }
     child.m_Parent = this;
     child.SetWindowRecurse(this.window);
     this.ChildrenMinMaxChanged();
 }
Пример #11
0
 public virtual void AddChild(View child, int idx)
 {
   Array.Resize<View>(ref this.m_Children, this.m_Children.Length + 1);
   if (idx != this.m_Children.Length - 1)
     Array.Copy((Array) this.m_Children, idx, (Array) this.m_Children, idx + 1, this.m_Children.Length - idx - 1);
   this.m_Children[idx] = child;
   if ((bool) ((UnityEngine.Object) child.m_Parent))
     child.m_Parent.RemoveChild(child);
   child.m_Parent = this;
   child.SetWindowRecurse(this.window);
   this.ChildrenMinMaxChanged();
 }