Handbook
Glossary
track-add ( track gadget constraint -- track )
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget hierarchy and layouts
»
Track layouts
Prev:
<track> ( orientation -- track )
Vocabulary
ui
.
gadgets
.
tracks
Inputs
track
a
track
gadget
a
gadget
constraint
a number between 0 and 1, or
f
Outputs
track
a
track
Word description
Adds a new child to a track. If the constraint is
f
, the child always occupies its preferred size. Otherwise, the constraint is a fraction of the total size which is allocated for the child.
Definition
USING:
accessors
kernel
sequences
ui.gadgets
;
IN:
ui.gadgets.tracks
:
track-add
( track gadget constraint -- track )
pick
sizes>>
push
add-gadget
;