]> gitweb.factorcode.org Git - factor.git/blob - extra/ui/gadgets/lists/lists-docs.factor
Initial import
[factor.git] / extra / ui / gadgets / lists / lists-docs.factor
1 USING: ui.commands help.markup help.syntax
2 ui.gadgets ui.gadgets.presentations ui.gadgets.controls
3 ui.operations kernel models classes ;
4 IN: ui.gadgets.lists
5
6 HELP: +secondary+
7 { $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." } ;
8
9 HELP: list
10 { $class-description
11     "A list " { $link control } " is backed by a " { $link model } " holding a sequence of objects, and displays as a list of " { $link presentation } " instances of these objects."
12     $nl
13     "Lists are created by calling " { $link <list> } "."
14     { $command-map list "keyboard-navigation" }
15 } ;
16
17 HELP: <list>
18 { $values { "hook" "a quotation with stack effect " { $snippet "( list -- )" } } { "presenter" "a quotation with stack effect " { $snippet "( object -- label )" } } { "model" model } { "gadget" list } }
19 { $description "Creates a new " { $link list } "."
20 $nl
21 "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." } ;
22
23 HELP: list-value
24 { $values { "list" list } { "object" object } }
25 { $description "Outputs the currently selected list value." } ;
26
27 ARTICLE: "ui.gadgets.lists" "List gadgets"
28 "A list displays a list of presentations."
29 { $subsection list }
30 { $subsection <list> }
31 { $subsection list-value } ;
32
33 ABOUT: "ui.gadgets.lists"