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

Prev:pack-pref-dim ( pack sizes -- dim )


Inputs and outputs
packa new pack
sizesa sequence of pairs of integers

Word description
Lays out the pack's children along the orientation of the 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.