func (p *Part) DepthMatchAll(matcher PartMatcher) []*Part {
	root := p
	matches := make([]*Part, 0, 10)
	for {
		if matcher(p) {
			matches = append(matches, p)
		}
		c := p.FirstChild
		if c != nil {
			p = c
		} else {
			for p.NextSibling == nil {
				if p == root {
					return matches
				}
				p = p.Parent
			}
			p = p.NextSibling
		}
	}
}
func (p *Part) DepthMatchAll(matcher PartMatcher) []*Part {
	root := p
	matches := make([]*Part, 0, 10)
	for {
		if matcher(p) {
			matches = append(matches, p)
		}
		c := p.FirstChild
		if c != nil {
			p = c
		} else {
			for p.NextSibling == nil {
				if p == root {
					return matches
				}
				p = p.Parent
			}
			p = p.NextSibling
		}
	}
}
func ( p * Part ) DepthMatchAll ( matcher PartMatcher ) [ ] * Part { root := p matches := make ( [ ] * Part , 0 , 10 ) for { if matcher ( p ) { matches = append ( matches , p ) } c := p . FirstChild if c != nil { p = c } else { for p . NextSibling == nil { if p == root { return matches } p = p . Parent } p = p . NextSibling } } }
// DepthMatchAll performs a depth first search of the Part tree and returns all parts that causes
// the given matcher to return true
DepthMatchAll performs a depth first search of the Part tree and returns all parts that causes the given matcher to return true