]> gitweb.factorcode.org Git - factor.git/blob - extra/models/history/history-docs.factor
factor: trim more using lists.
[factor.git] / extra / models / history / history-docs.factor
1 USING: help.markup help.syntax kernel models ;
2 IN: models.history
3
4 HELP: history
5 { $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> } "." } ;
6
7 HELP: <history>
8 { $values { "value" object } { "history" "a new " { $link history } } }
9 { $description "Creates a new history model with an initial value." } ;
10
11 { <history> add-history go-back go-forward } related-words
12
13 HELP: go-back
14 { $values { "history" history } }
15 { $description "Restores the previous value and calls " { $link model-changed } " on all observers registered with " { $link add-connection } "." } ;
16
17 HELP: go-forward
18 { $values { "history" history } }
19 { $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 } "." } ;
20
21 HELP: add-history
22 { $values { "history" history } }
23 { $description "Adds the current value to the history." } ;
24
25 ARTICLE: "models.history" "History models"
26 "History models record previous values."
27 { $subsections
28     history
29     <history>
30 }
31 "Recording history:"
32 { $subsections add-history }
33 "Navigating the history:"
34 { $subsections
35     go-back
36     go-forward
37 } ;
38
39 ABOUT: "models.history"