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); } }
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); }
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); }
public void RemoveFromParent(ParentAdapter parent) { RemoveFromParent(parent, true); }
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); } }
public void RemoveFromParent (ParentAdapter parent) { RemoveFromParent (parent, true); }