factor/basis/ui/gadgets/tracks/tracks-docs.factor

33 lines
1.6 KiB
Factor
Raw Normal View History

2008-01-05 17:27:15 -05:00
USING: ui.gadgets.packs help.markup help.syntax ui.gadgets
arrays kernel quotations classes.tuple ;
2008-01-05 17:27:15 -05:00
IN: ui.gadgets.tracks
2007-09-20 18:09:08 -04:00
ARTICLE: "ui-track-layout" "Track layouts"
"Track gadgets are like " { $link "ui-pack-layout" } " except each child is resized to a fixed multiple of the track's dimension."
{ $subsections track }
"Creating empty tracks:"
{ $subsections <track> }
"Adding children:"
{ $subsections track-add } ;
2007-09-20 18:09:08 -04:00
HELP: <track>
{ $values { "orientation" "an orientation specifier" } { "track" "a new " { $link track } } }
{ $description "Creates a new track which lays out children along the given orientation, either " { $link horizontal } " or " { $link vertical } "." } ;
2007-09-20 18:09:08 -04:00
2015-10-15 08:44:18 -04:00
HELP: new-track
{ $values
{ "orientation" "an orientation specifier" }
{ "class" "a gadget class" }
{ "track" gadget }
}
{ $description "Creates a new container gadget of the specified class and sets its children lay out to either " { $link horizontal } " or " { $link vertical } "." } ;
HELP: track
{ $class-description "A track is like a " { $link pack } " except each child is resized to a fixed multiple of the track's dimension in the direction of " { $snippet "orientation" } ". Tracks are created by calling " { $link <track> } "." } ;
HELP: track-add
2009-10-21 18:40:43 -04:00
{ $values { "track" track } { "gadget" gadget } { "constraint" "a number between 0 and 1, or " { $link f } } }
2007-09-20 18:09:08 -04:00
{ $description "Adds a new child to a track. If the constraint is " { $link f } ", the child always occupies its preferred size. Otherwise, the constrant is a fraction of the total size which is allocated for the child." } ;
ABOUT: "ui-track-layout"