Prepare the action. To work, it needs to know the FocusIO it will search in. At this point it can be omitted, but it has to be set before the action launches.
Focus box reported by the node, if any. Use .then((Rectangle) { ... }) to get the focus box the moment it is found.
System holding the focused node in question.
A branch action can only hook to draw calls of specific nodes. It cannot bind into these hooks.
Branch action excludes the start node from results.
Branch action excludes the start node from results.
Using FindFocusBoxAction.
import fluid.node; import fluid.space; class MyNode : Space { FocusIO focusIO; FindFocusBoxAction findFocusBoxAction; this(Node[] nodes...) { super(nodes); this.findFocusBoxAction = new FindFocusBoxAction; } override void resizeImpl(Vector2 space) { require(focusIO); findFocusBoxAction.focusIO = focusIO; super.resizeImpl(space); } override void drawImpl(Rectangle outer, Rectangle inner) { // Start the action before drawing nodes auto frame = startBranchAction(findFocusBoxAction); super.drawImpl(outer, inner); // Inspect the result auto result = findFocusBoxAction.focusBox; } }
This branch action tracks and reports position of the current focus box.