State- The state represents the data collected by the visitor for a layout pass.
public interface LayoutResultVisitor<State>
LayoutResultVisitorAPI is used by RenderCore to allow a
RenderCoreExtensionto visit every
LayoutResultduring every layout pass. The visitor can collect any data that it is interested in from every
LayoutResultVisitormust not mutate its
RenderCoreExtension; it should be functional. Consequently, a
LayoutResultVisitorshould only be used for one layout pass.
|Modifier and Type||Method and Description|
This API is called for every LayoutResult during a layout pass.
void visit(RenderTreeNode parent, LayoutResult result, Rect bounds, int x, int y, int position, State state)
parent- The parent
bounds- The bounds of this
LayoutResultrelative to its parent.
x- The absolute x position.
y- The absolute y position.
position- The position of the layout result.
state- The state the visitor can write to.