1 USING: help.markup help.syntax strings ui.gadgets models ;
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> } "." } ;
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." } ;
12 { $values { "label" label } { "string" string } }
13 { $description "Outputs the string currently displayed by the label." } ;
15 HELP: set-label-string
16 { $values { "label" label } { "string" string } }
17 { $description "Sets the string currently displayed by the label. The string is permitted to contain line breaks. After calling this word, you must also call " { $link relayout } " on the label." } ;
20 { $values { "model" model } { "gadget" "a new " { $link gadget } } }
21 { $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." } ;
23 { label-string set-label-string } related-words
24 { <label> <label-control> } related-words
26 ARTICLE: "ui.gadgets.labels" "Label gadgets"
27 "A label displays a piece of text, either a single line string or an array of line strings."
29 { $subsection <label> }
30 { $subsection <label-control> }
31 { $subsection label-string }
32 { $subsection set-label-string }
33 "Label specifiers are used by buttons, checkboxes and radio buttons:"
34 { $subsection >label } ;
36 ABOUT: "ui.gadgets.labels"
39 { $values { "obj" "a label specifier" } { "gadget" "a new " { $link gadget } } }
40 { $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 } "." } ;