]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/labels/labels-docs.factor
Fix conflict in images vocab
[factor.git] / basis / ui / gadgets / labels / labels-docs.factor
1 USING: help.markup help.syntax strings ui.gadgets models ;
2 IN: ui.gadgets.labels
3
4 HELP: label
5 { $class-description "A label displays a piece of text, either a single line string or an array of line strings. Labels are created by calling " { $link <label> } "." } ;
6
7 HELP: <label>
8 { $values { "string" string } { "label" "a new " { $link label } } }
9 { $description "Creates a new " { $link label } " gadget. The string is permitted to contain line breaks." } ;
10
11 HELP: <label-control>
12 { $values { "model" model } { "gadget" "a new " { $link gadget } } }
13 { $description "Creates a control which displays the value of " { $snippet "model" } ", which is required to be a string. The label control is automatically updated when the model value changes." } ;
14
15 { <label> <label-control> } related-words
16
17 ARTICLE: "ui.gadgets.labels" "Label gadgets"
18 "The " { $vocab-link "ui.gadgets.labels" } " vocabulary implements labels. A label displays a piece of text, which is either a single line string or an array of line strings."
19 { $subsection label }
20 { $subsection <label> }
21 { $subsection <label-control> }
22 "Labels have a virtual slot named " { $slot "string" } " which contains the displayed text. The " { $slot "text" } " slot should not be set directly."
23 $nl
24 "Label specifiers are used by buttons, checkboxes and radio buttons:"
25 { $subsection >label } ;
26
27 ABOUT: "ui.gadgets.labels"
28
29 HELP: >label
30 { $values { "obj" "a label specifier" } { "gadget" "a new " { $link gadget } } }
31 { $description "Convert the object into a gadget suitable for use as the label of a button. If " { $snippet "obj" } " is already a gadget, does nothing. Otherwise creates a " { $link label } " gadget if it is a string and an empty gadget if " { $snippet "obj" } " is " { $link f } "." } ;