]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/tracks/tracks-docs.factor
fix some typos in docs.
[factor.git] / basis / ui / gadgets / tracks / tracks-docs.factor
1 USING: ui.gadgets.packs help.markup help.syntax ui.gadgets
2 arrays kernel quotations classes.tuple ;
3 IN: ui.gadgets.tracks
4
5 ARTICLE: "ui-track-layout" "Track layouts"
6 "Track gadgets are like " { $link "ui-pack-layout" } " except each child is resized to a fixed multiple of the track's dimension."
7 { $subsections track }
8 "Creating empty tracks:"
9 { $subsections <track> }
10 "Adding children:"
11 { $subsections track-add } ;
12
13 HELP: <track>
14 { $values { "orientation" "an orientation specifier" } { "track" "a new " { $link track } } }
15 { $description "Creates a new track which lays out children along the given orientation, either " { $link horizontal } " or " { $link vertical } "." } ;
16
17 HELP: new-track
18 { $values
19   { "orientation" "an orientation specifier" }
20   { "class" "a gadget class" }
21   { "track" gadget }
22 }
23 { $description "Creates a new container gadget of the specified class and sets its children layout to either " { $link horizontal } " or " { $link vertical } "." } ;
24
25 HELP: track
26 { $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> } " or " { $link new-track } "." } ;
27
28 HELP: track-add
29 { $values { "track" track } { "gadget" gadget } { "constraint" "a number between 0 and 1, or " { $link f } } }
30 { $description "Adds a new child to a track. If the constraint is " { $link f } ", the child always occupies its preferred size. Otherwise, the constraint is a fraction of the total size which is allocated for the child." } ;
31
32 ABOUT: "ui-track-layout"