]> gitweb.factorcode.org Git - factor.git/blob - basis/models/delay/delay-docs.factor
Fix permission bits
[factor.git] / basis / models / delay / delay-docs.factor
1 USING: help.syntax help.markup kernel math classes classes.tuple\r
2 calendar models ;\r
3 IN: models.delay\r
4 \r
5 HELP: delay\r
6 { $class-description "Delay models have the same value as their underlying model, however the value only changes after a timer expires. If the underlying model's value changes again before the timer expires, the timer restarts. Delay models are constructed by " { $link <delay> } "." }\r
7 { $examples\r
8     "The following code displays a sliders and a label which is updated half a second after the slider stops changing:"\r
9     { $code\r
10         "USING: models ui.gadgets.labels ui.gadgets.sliders ui.gadgets.panes calendar ;"\r
11         ": <funny-slider>"\r
12         "    0 0 0 100 <range> <x-slider> 500 over set-slider-max ;"\r
13         "<funny-slider> dup gadget."\r
14         "gadget-model 1/2 seconds <delay> [ number>string ] <filter>"\r
15         "<label-control> gadget."\r
16     }\r
17 } ;\r
18 \r
19 HELP: <delay>\r
20 { $values { "model" model } { "timeout" duration } { "delay" delay } }\r
21 { $description "Creates a new instance of " { $link delay } ". The timeout must elapse from the time the underlying model last changed to when the delay model value is changed and its connections are notified." }\r
22 { $examples "See the example in the documentation for " { $link delay } "." } ;\r
23 \r
24 ARTICLE: "models-delay" "Delay models"\r
25 "Delay models are used to implement delayed updating of gadgets in response to user input."\r
26 { $subsection delay }\r
27 { $subsection <delay> } ;\r
28 \r
29 ABOUT: "models-delay"\r