]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/sliders/sliders-docs.factor
Fix permission bits
[factor.git] / basis / ui / gadgets / sliders / sliders-docs.factor
1 USING: help.markup help.syntax ui.gadgets models models.range ;
2 IN: ui.gadgets.sliders
3
4 HELP: elevator
5 { $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." } ;
6
7 HELP: find-elevator
8 { $values { "gadget" gadget } { "elevator/f" "an " { $link elevator } " or " { $link f } } }
9 { $description "Finds the first parent of " { $snippet "gadget" } " which is an " { $link elevator } ". Outputs " { $link f } " if the gadget is not contained in an " { $link elevator } "." } ;
10
11 HELP: slider
12 { $class-description "A slider is a control for graphically manipulating a " { $link "models-range" } "."
13 $nl
14 "Sliders are created by calling " { $link <x-slider> } " or " { $link <y-slider> } "." } ;
15
16 HELP: find-slider
17 { $values { "gadget" gadget } { "slider/f" "a " { $link slider } " or " { $link f } } }
18 { $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 } "." } ;
19
20 HELP: thumb
21 { $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." } ;
22
23 HELP: slide-by
24 { $values { "amount" "an integer" } { "slider" slider } }
25 { $description "Adds the amount (which may be positive or negative) to the slider's current position." } ;
26
27 HELP: slide-by-page
28 { $values { "amount" "an integer" } { "slider" slider } }
29 { $description "Adds the amount multiplied by " { $link slider-page } " to the slider's current position." } ;
30
31 HELP: slide-by-line
32 { $values { "amount" "an integer" } { "slider" slider } }
33 { $description "Adds the amount multiplied by the " { $snippet "line" } " slot to the slider's current position." } ;
34
35 HELP: <slider>
36 { $values { "range" range } { "orientation" "an orientation specifier" } { "slider" "a new " { $link slider } } }
37 { $description "Internal word for constructing sliders." }
38 { $notes "This does not build a complete slider, and user code should call " { $link <x-slider> } " or " { $link <y-slider> } " instead." } ;
39
40 HELP: <x-slider>
41 { $values { "range" range } { "slider" slider } }
42 { $description "Creates a new horizontal " { $link slider } "." } ;
43
44 HELP: <y-slider>
45 { $values { "range" range } { "slider" slider } }
46 { $description "Creates a new vertical " { $link slider } "." } ;
47
48 { <x-slider> <y-slider> } related-words
49
50 ARTICLE: "ui.gadgets.sliders" "Slider gadgets"
51 "A slider allows the user to graphically manipulate a value by moving a thumb back and forth."
52 { $subsection slider }
53 { $subsection <x-slider> }
54 { $subsection <y-slider> }
55 "Changing slider values:"
56 { $subsection slide-by }
57 { $subsection slide-by-line }
58 { $subsection slide-by-page }
59 "Since sliders are controls the value can be get and set by via the " { $snippet "model" } " slot. " ;
60
61 ABOUT: "ui.gadgets.sliders"