Skip to content

ui::ChildVisitor

Header: winui/ui/Element.hpp.

What Element::for_each_child() calls once per child: a non-owning reference to any callable taking an Element&, two pointers wide, so walking the tree allocates nothing. It refers to the callable it was made from and must not outlive it, which a lambda passed straight to for_each_child() never does.

ChildVisitor

template <typename F>
ChildVisitor(F&& visit) noexcept
    requires (!std::is_same_v<std::remove_cvref_t<F>, ChildVisitor> && std::is_invocable_v<F&, Element&>)

operator()

void operator()(Element& child) const