Exemplo n.º 1
0
        public void RemoveFromParent(ParentAdapter parent, bool terminate)
        {
            NotifyStateChange(Atk.StateType.Showing, false);
            NotifyStateChange(Atk.StateType.Visible, false);

            //don't remove the parent if this was not the first parent
            if (parent == Parent)
            {
                Parent = null;
            }

            if (terminate && !defunct)
            {
                defunct = true;
                NotifyStateChange(Atk.StateType.Defunct, true);
            }
        }
Exemplo n.º 2
0
 internal override void PreRemoveChild(Atk.Object childToRemove)
 {
     if (splitter != null && childToRemove == splitter)
     {
         splitter = null;
         ParentAdapter parentAdapter = childToRemove as ParentAdapter;
         int           count         = parentAdapter.NAccessibleChildren;
         while (count > 0)
         {
             Atk.Object obj = parentAdapter.RefAccessibleChild(0);
             parentAdapter.RemoveChild(obj, false);
             SetParent(obj, this);
             AddOneChild(obj);
             count--;
         }
     }
     base.PreRemoveChild(childToRemove);
 }
Exemplo n.º 3
0
        protected override int OnGetIndexInParent()
        {
            if (Parent == null)
            {
                return(-1);
            }
            ParentAdapter parent = Parent as ParentAdapter;

            if (parent != null)
            {
                return(parent.GetIndexOfChild(this));
            }
            for (int i = Parent.NAccessibleChildren - 1; i >= 0; i--)
            {
                if (Parent.RefAccessibleChild(i) == this)
                {
                    return(i);
                }
            }
            return(-1);
        }
Exemplo n.º 4
0
 public void RemoveFromParent(ParentAdapter parent)
 {
     RemoveFromParent(parent, true);
 }
Exemplo n.º 5
0
		public void RemoveFromParent (ParentAdapter parent, bool terminate)
		{
			NotifyStateChange (Atk.StateType.Showing, false);
			NotifyStateChange (Atk.StateType.Visible, false);

			//don't remove the parent if this was not the first parent
			if (parent == Parent)
				Parent = null;

			if (terminate && !defunct) {
				defunct = true;
				NotifyStateChange (Atk.StateType.Defunct, true);
			}
		}
Exemplo n.º 6
0
		public void RemoveFromParent (ParentAdapter parent)
		{
			RemoveFromParent (parent, true);
		}