foldRecursive

fun <T> foldRecursive(initial: T, @NotNull visitor: @NotNull BiFunction<@NotNull GuiComponent, T, T>): T(source)

Walk the scene tree of this gui element, including children of children. By default, the visitor is called with only this element.

Parameters

visitor

a consumer to be invoked for all gui elements in the scene tree. the returned value is then passed on to the next invocation.

initial

an initial value to be given to the function