find-parent ( ... gadget quot: ( ... gadget -- ... ? ) -- ... parent )
Factor handbook » UI framework » Building user interfaces » Gadget hierarchy and layouts » Layout basics

Prev:each-parent ( ... gadget quot: ( ... gadget -- ... ? ) -- ... ? )
Next:relayout ( gadget -- )


Vocabulary
ui.gadgets

Inputs
gadgeta gadget
quota quotation with stack effect ( ... gadget -- ... ? )


Outputs
parenta gadget


Word description
Outputs the first parent of the gadget, starting from the gadget itself, for which the quotation outputs a true value, or f if the quotation outputs f for every parent.

Definition


: find-parent
( ... gadget quot: ( ... gadget -- ... ? ) -- ... parent )
[ parents ] dip find nip ; inline