Collects panel leaves in tree order.
Root node to traverse.
Optional accumulator to append to.
The accumulator containing every panel.
Collects panel leaves in tree order.