]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/ui/gadgets/layout/layout-docs.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / ui / gadgets / layout / layout-docs.factor
1 USING: help.markup help.syntax models ui.gadgets.tracks ;
2 IN: ui.gadgets.layout
3
4 HELP: ,
5 { $values { "item" "a gadget or model" } }
6 { $description "Used in a series of gadgets created by a box, accumulating the gadget" } ;
7
8 HELP: ,%
9 { $syntax "gadget ,% width" }
10 { $description "Like ',' but stretches the gadget to always fill a percent of the parent" } ;
11
12 HELP: ->
13 { $values { "uiitem" "a gadget or model" } { "model" model } }
14 { $description "Like ',' but passes its model on for further use." } ;
15
16 HELP: ->%
17 { $syntax "gadget ,% width" }
18 { $description "Like '->' but stretches the gadget to always fill a percent of the parent" } ;
19
20 HELP: <spacer>
21 { $description "Grows to fill any empty space in a box" } ;
22
23 HELP: <hbox>
24 { $values { "gadgets" "a list of gadgets" } { "track" track } }
25 { $syntax "[ gadget , gadget , ... ] <hbox>" }
26 { $description "Creates an horizontal track containing the gadgets listed in the quotation" } ;
27
28 HELP: <vbox>
29 { $values { "gadgets" "a list of gadgets" } { "track" track } }
30 { $syntax "[ gadget , gadget , ... ] <hbox>" }
31 { $description "Creates an vertical track containing the gadgets listed in the quotation" } ;
32
33 HELP: $
34 { $syntax "$ PLACEHOLDER-NAME $" }
35 { $description "Defines an insertion point in a template named PLACEHOLDER-NAME which can be used by calling its name" } ;
36
37 HELP: with-interface
38 { $values { "quot" "quotation that builds a template and inserts into it" } }
39 { $description "Create templates, used with " { $link POSTPONE: $ } } ;
40
41 ARTICLE: "ui.gadgets.layout" "GUI Layout"
42 "Laying out GUIs works the same way as building lists with " { $vocab-link "make" }
43 ". Gadgets are layed out using " { $vocab-link "ui.gadgets.tracks" } " through " { $link <hbox> } " and " { $link <vbox> } ", which allow both fixed and percentage widths. "
44 { $link , } " and " { $link -> }  " add a model or gadget to the gadget you're building. "
45 "Also, books can be made with " { $link <book> } ". "
46 { $link <spacer> } "s add flexable space between items. " $nl
47 "Using " { $link with-interface } ", one can pre-build templates to add items to later: "
48 "Like in the StringTemplate framework for java, placeholders are defined using $ PLACERHOLDER-NAME $ "
49 "Using PLACEHOLDER-NAME again sets it as the current insertion point. "
50 "For examples using normal layout, see the " { $vocab-link "sudokus" } " demo. "
51 "For examples of templating, see the " { $vocab-link "recipes" } " demo." ;
52
53 ABOUT: "ui.gadgets.layout"