]> gitweb.factorcode.org Git - factor.git/blob - basis/models/range/range-docs.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / models / range / range-docs.factor
1 USING: help.syntax help.markup kernel math classes classes.tuple
2 calendar models ;
3 IN: models.range
4
5 HELP: range
6 { $class-description "Range models implement the " { $link "range-model-protocol" } " with real numbers as the minimum, current, maximum, and page size. Range models are created with " { $link <range> } "." }
7 { $notes { $link "ui.gadgets.sliders" } " use range models." } ;
8
9 HELP: <range>
10 { $values { "value" real } { "page" real } { "min" real } { "max" real } { "step" real } { "range" range } }
11 { $description "Creates a new " { $link range } " model." } ;
12
13 HELP: range-model
14 { $values { "range" range } { "model" model } }
15 { $description "Outputs a model holding a range model's current value." }
16 { $notes "This word is not part of the " { $link "range-model-protocol" } ", and can only be used on direct instances of " { $link range } "." } ;
17
18 HELP: range-min
19 { $values { "range" range } { "model" model } }
20 { $description "Outputs a model holding a range model's minimum value." }
21 { $notes "This word is not part of the " { $link "range-model-protocol" } ", and can only be used on direct instances of " { $link range } "." } ;
22
23 HELP: range-max
24 { $values { "range" range } { "model" model } }
25 { $description "Outputs a model holding a range model's maximum value." }
26 { $notes "This word is not part of the " { $link "range-model-protocol" } ", and can only be used on direct instances of " { $link range } "." } ;
27
28 HELP: range-page
29 { $values { "range" range } { "model" model } }
30 { $description "Outputs a model holding a range model's page size." }
31 { $notes "This word is not part of the " { $link "range-model-protocol" } ", and can only be used on direct instances of " { $link range } "." } ;
32
33 HELP: move-by
34 { $values { "amount" real } { "range" range } }
35 { $description "Adds a number to a range model's current value." }
36 { $side-effects "range" } ;
37
38 HELP: move-by-page
39 { $values { "amount" real } { "range" range } }
40 { $description "Adds a multiple of the page size to a range model's current value." }
41 { $side-effects "range" } ;
42
43 ARTICLE: "models-range" "Range models"
44 "Range models ensure their value is a real number within a fixed range."
45 { $subsections
46     range
47     <range>
48 }
49 "Range models conform to a protocol for getting and setting the current value, as well as the endpoints of the range."
50 { $subsections "range-model-protocol" } ;
51
52 ARTICLE: "range-model-protocol" "Range model protocol"
53 "The range model protocol is implemented by the " { $link range } " and " { $link compose } " classes. User-defined models may implement it too."
54 { $subsections
55     range-value
56     range-page-value
57     range-min-value
58     range-max-value
59     range-max-value*
60     set-range-value
61     set-range-page-value
62     set-range-min-value 
63     set-range-max-value 
64 } ;
65
66 ABOUT: "models-range"