Handbook
Glossary
pref-dim ( gadget -- dim )
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget hierarchy and layouts
»
Implementing layout gadgets
Prev:
layout* ( gadget -- )
Next:
pref-dims ( gadgets -- seq )
Vocabulary
ui
.
gadgets
Inputs
gadget
a
gadget
Outputs
dim
a pair of integers
Word description
Outputs the preferred dimensions of the gadget. The value is cached between calls, and invalidated when the gadget needs to be relayout.
See also
pref-dim*
,
layout
,
layout*
Definition
USING:
accessors
kernel
;
IN:
ui.gadgets
:
pref-dim
( gadget -- dim )
[
pref-dim>>
]
[
[
pref-dim*
]
[
]
[
layout-state>>
]
tri
[
drop
]
[
dupd
pref-dim<<
]
if
]
?unless
;