pack-pref-dim ( pack sizes -- dim )
Factor handbook > UI framework > Building user interfaces > Gadget hierarchy and layouts > Pack layouts

Prev:<shelf> ( -- pack )
Next:pack-layout ( pack sizes -- )


Inputs and outputs
packa pack
sizesa sequence of pairs of integers
dima pair of integers

Word description
Computes the preferred size of a pack, with each gadget receiving its size from the corresponding index of the sizes sequence.

This word is useful if you are writing your own layout gadget which inherits from pack. This allows you to reuse layout logic while computing gadget sizes using a custom procedure.