]> gitweb.factorcode.org Git - factor.git/blob - extra/models/history/history-docs.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / extra / models / history / history-docs.factor
1 USING: help.syntax help.markup kernel math classes classes.tuple
2 calendar models ;
3 IN: models.history
4
5 HELP: history
6 { $class-description "History models record a timeline of previous values on calls to " { $link add-history } ", and can travel back and forth on the timeline with " { $link go-back } " and " { $link go-forward } ". History models are constructed by " { $link <history> } "." } ;
7
8 HELP: <history>
9 { $values { "value" object } { "history" "a new " { $link history } } }
10 { $description "Creates a new history model with an initial value." } ;
11
12 { <history> add-history go-back go-forward } related-words
13
14 HELP: go-back
15 { $values { "history" history } }
16 { $description "Restores the previous value and calls " { $link model-changed } " on all observers registered with " { $link add-connection } "." } ;
17
18 HELP: go-forward
19 { $values { "history" history } }
20 { $description "Restores the value set prior to the last call to " { $link go-back } " and calls " { $link model-changed } " on all observers registered with " { $link add-connection } "." } ;
21
22 HELP: add-history
23 { $values { "history" history } }
24 { $description "Adds the current value to the history." } ;
25
26 ARTICLE: "models-history" "History models"
27 "History models record previous values."
28 { $subsections
29     history
30     <history>
31 }
32 "Recording history:"
33 { $subsections add-history }
34 "Navigating the history:"
35 { $subsections
36     go-back
37     go-forward
38 } ;
39
40 ABOUT: "models-history"