]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/sliders/sliders-docs.factor
b455beae13ef276ac4514591bf05c0693c3b87ab
[factor.git] / basis / ui / gadgets / sliders / sliders-docs.factor
1 USING: help.markup help.syntax math math.ranges ui.gadgets
2 ui.gadgets.sliders.private ;
3 IN: ui.gadgets.sliders
4
5 HELP: elevator
6 { $class-description "An elevator is the part of a " { $link slider } " between the up/down arrow buttons, where a " { $link thumb } " may be moved up and down." } ;
7
8 HELP: slider
9 { $class-description "A slider is a control for graphically manipulating a " { $link "models.range" } "."
10 $nl
11 "Sliders are created by calling " { $link <slider> } "." } ;
12
13 HELP: find-slider
14 { $values { "gadget" gadget } { "slider/f" { $maybe slider } } }
15 { $description "Finds the first parent of " { $snippet "gadget" } " which is a " { $link slider } ". Outputs " { $link f } " if the gadget is not contained in a " { $link slider } "." } ;
16
17 HELP: thumb
18 { $class-description "A thumb is the gadget contained in a " { $link slider } "'s " { $link elevator } " which indicates the current scroll position and can be dragged up and down with the mouse." } ;
19
20 HELP: slide-by
21 { $values { "amount" integer } { "slider" slider } }
22 { $description "Adds the amount (which may be positive or negative) to the slider's current position." } ;
23
24 HELP: slide-by-page
25 { $values { "amount" integer } { "slider" slider } }
26 { $description "Adds the amount multiplied by " { $link slider-page } " to the slider's current position." } ;
27
28 HELP: slide-by-line
29 { $values { "amount" integer } { "slider" slider } }
30 { $description "Adds the amount multiplied by the " { $snippet "line" } " slot to the slider's current position." } ;
31
32 HELP: <slider>
33 { $values { "range" range } { "orientation" "an orientation specifier" } { "slider" "a new " { $link slider } } }
34 { $description "Creates a new slider." } ;
35
36 ARTICLE: "ui.gadgets.sliders" "Slider gadgets"
37 "The " { $vocab-link "ui.gadgets.sliders" } " vocabulary implements slider gadgets. A slider allows the user to graphically manipulate a value by moving a thumb back and forth."
38 { $subsections
39     slider
40     <slider>
41 }
42 "Changing slider values:"
43 { $subsections
44     slide-by
45     slide-by-line
46     slide-by-page
47 }
48 "Since sliders are controls the value can be get and set by via the " { $snippet "model" } " slot." ;
49
50 ABOUT: "ui.gadgets.sliders"