]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/lists/lists-docs.factor
b698d558adc2472adde76e79b63d8b6ff053dd1b
[factor.git] / basis / ui / gadgets / lists / lists-docs.factor
1 USING: ui.commands help.markup help.syntax ui.gadgets
2 ui.gadgets.presentations ui.operations kernel models classes ;
3 IN: ui.gadgets.lists
4
5 HELP: +secondary+
6 { $description "A key which may be set in the hashtable passed to " { $link define-operation } ". If set to a true value, this operation becomes the default operation performed when " { $snippet "RET" } " is pressed in a " { $link list } " gadget where the current selection is a presentation matching the operation's predicate." } ;
7
8 HELP: list
9 { $class-description
10     "A list control is backed by a " { $link model } " holding a sequence of objects, and displays as a list of " { $link presentation } " instances of these objects."
11     $nl
12     "Lists are created by calling " { $link <list> } "."
13     { $command-map list "keyboard-navigation" }
14 } ;
15
16 HELP: <list>
17 { $values { "hook" "a quotation with stack effect " { $snippet "( list -- )" } } { "presenter" "a quotation with stack effect " { $snippet "( object -- label )" } } { "model" model } { "gadget" list } }
18 { $description "Creates a new " { $link list } "."
19 $nl
20 "The model value must be a sequence. The list displays presentations of elements with labels obtained by applying the " { $snippet "presenter" } " quotation to each object. The " { $snippet "hook" } " quotation is called when a presentation is selected." } ;
21
22 HELP: list-value
23 { $values { "list" list } { "object" object } }
24 { $description "Outputs the currently selected list value." } ;
25
26 ARTICLE: "ui.gadgets.lists" "List gadgets"
27 "A list displays a list of presentations."
28 { $subsection list }
29 { $subsection <list> }
30 { $subsection list-value } ;
31
32 ABOUT: "ui.gadgets.lists"