Handbook
Glossary
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
gadget
a
gadget
quot
a
quotation
with stack effect
( ... gadget -- ... ? )
Outputs
parent
a
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
USING:
kernel
sequences
;
IN:
ui.gadgets
:
find-parent
( ... gadget quot: ( ... gadget -- ... ? ) -- ... parent )
[
parents
]
dip
find
nip
;
inline