Handbook
Glossary
max-dims ( seq -- dim )
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget hierarchy and layouts
»
Implementing layout gadgets
Prev:
prefer ( gadget -- )
Next:
sum-dims ( seq -- dim )
Vocabulary
ui
.
gadgets
Inputs
seq
a sequence of pairs of integers
Outputs
dim
a pair of integers
Word description
Outputs the smallest dimensions of a rectangle which can fit all the dimensions in the sequence.
See also
pref-dims
,
sum-dims
Definition
USING:
arrays
kernel
math.order
sequences
;
IN:
ui.gadgets
:
max-dims
( seq -- dim )
[
0 0
]
dip
[
first2
swapd
[
max
]
2bi@
]
each
2array
;