Handbook
Glossary
(scroll>rect) ( rect scroller -- )
Vocabulary
ui
.
gadgets
.
scrollers
.
private
Inputs
rect
an
object
scroller
an
object
Outputs
None
Definition
USING:
accessors
combinators
math.rectangles
math.vectors
ui.gadgets.scrollers
ui.gadgets.viewports
;
IN:
ui.gadgets.scrollers.private
:
(scroll>rect)
( rect scroller -- )
{
[
scroll-position
vneg
offset-rect
]
[
viewport>>
dim>>
rect-min
]
[
viewport>>
loc>>
offset-rect
]
[
viewport>>
[
v-
{
0 0
}
vmin
]
[
v-
{
0 0
}
vmax
]
with-rect-extents
v+
]
[
scroll-position
v+
]
[
set-scroll-position
]
}
cleave
;