Lines Matching refs:child
23 View* child,
26 DCHECK_NE(child, other);
27 DCHECK(child);
29 DCHECK_EQ(parent, child->parent());
35 std::find(children->begin(), children->end(), child) - children->begin();
43 children->insert(children->begin() + destination_i, child);
109 void RemoveChildImpl(View* child, View::Children* children) {
111 std::find(children->begin(), children->end(), child);
114 ViewPrivate(child).ClearParent();
159 View* child = children_.front();
160 if (child->owned_by_parent_) {
161 delete child;
162 // Deleting the child also removes it from our child list.
163 DCHECK(std::find(children_.begin(), children_.end(), child) ==
166 RemoveChild(child);
228 void View::AddChild(View* child) {
229 ScopedTreeNotifier notifier(child, child->parent(), this);
230 if (child->parent())
231 RemoveChildImpl(child, &child->parent_->children_);
232 children_.push_back(child);
233 child->parent_ = this;
236 void View::RemoveChild(View* child) {
237 DCHECK_EQ(this, child->parent());
238 ScopedTreeNotifier(child, this, NULL);
239 RemoveChildImpl(child, &children_);
242 bool View::Contains(View* child) const {
243 for (View* p = child->parent(); p; p = p->parent()) {
250 void View::StackChildAtTop(View* child) {
251 if (children_.size() <= 1 || child == children_.back())
253 StackChildAbove(child, children_.back());
256 void View::StackChildAtBottom(View* child) {
257 if (children_.size() <= 1 || child == children_.front())
259 StackChildBelow(child, children_.front());
262 void View::StackChildAbove(View* child, View* other) {
263 StackChildRelativeTo(this, &children_, child, other, STACK_ABOVE);
266 void View::StackChildBelow(View* child, View* other) {
267 StackChildRelativeTo(this, &children_, child, other, STACK_BELOW);