Handbook
Glossary
<slider> ( range orientation -- slider )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Slider gadgets
Prev:
slider
Next:
slide-by ( amount slider -- )
Vocabulary
ui
.
gadgets
.
sliders
Inputs
range
a
range
orientation
an orientation specifier
Outputs
slider
a new
slider
Word description
Creates a new slider.
Definition
USING:
accessors
combinators
kernel
ui.gadgets
ui.gadgets.sliders.private
ui.gadgets.tracks
;
IN:
ui.gadgets.sliders
:
<slider>
( range orientation -- slider )
slider
new-track
swap
>>model
16
>>line
<slider-pen>
>>interior
dup
orientation>>
{
[
<thumb>
>>thumb
]
[
<elevator>
>>elevator
]
[
drop
dup
add-thumb-to-elevator
1
track-add
]
[
<up-button>
f
track-add
]
[
drop
<gadget>
{
1 1
}
>>dim
f
track-add
]
[
<down-button>
f
track-add
]
}
cleave
;