]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/labelled/labelled-docs.factor
f09bcaa8259cc84d0c90a6b580f99fe8f1f79b47
[factor.git] / basis / ui / gadgets / labelled / labelled-docs.factor
1 USING: ui.gadgets help.markup help.syntax strings models
2 ui.gadgets.panes ;
3 IN: ui.gadgets.labelled
4
5 HELP: labelled-gadget
6 { $class-description "A labelled gadget can be created by calling " { $link <labelled-gadget> } "." } ;
7
8 HELP: <labelled-gadget>
9 { $values { "gadget" gadget } { "title" string } { "newgadget" "a new " { $link <labelled-gadget> } } }
10 { $description "Creates a new " { $link labelled-gadget } " display " { $snippet "gadget" } " with " { $snippet "title" } " on top." } ;
11
12 HELP: closable-gadget
13 { $class-description "A closable gadget displays a title bar with a close box on top of another gadget. Clicking the close box invokes a quotation. Closable gadgets are created by calling " { $link <closable-gadget> } "." } ;
14
15 HELP: <closable-gadget>
16 { $values { "gadget" gadget } { "title" string } { "quot" "a quotation with stack effect " { $snippet "( button -- )" } } }
17 { $description "Creates a new " { $link closable-gadget } ". Clicking the close box calls " { $snippet "quot" } "." }
18 { $notes "The quotation can find the " { $link closable-gadget } " instance, or any other parent gadget by calling " { $link find-parent } " with the gadget it receives on the stack." } ;
19
20 HELP: <labelled-pane>
21 { $values { "model" model } { "quot" "a quotation with stack effect " { $snippet "( value -- )" } } { "scrolls?" "a boolean" } { "title" string } { "gadget" "a new " { $link gadget } } }
22 { $description "Creates a new control delegating to a " { $link pane } ", and wraps it in a " { $link labelled-gadget } ". When the value of the model changes, the value is pushed on the stack and the quotation is called using " { $link with-pane } "." } ;
23
24 { <labelled-pane> <pane-control> } related-words
25
26 ARTICLE: "ui.gadgets.labelled" "Labelled gadgets"
27 "It is possible to create a labelled border around a child gadget:"
28 { $subsection labelled-gadget }
29 { $subsection <labelled-gadget> }
30 "Or a labelled border with a close box:"
31 { $subsection closable-gadget }
32 { $subsection <closable-gadget> } ;
33
34 ABOUT: "ui.gadgets.labelled"