Handbook
Glossary
scroll>rect ( rect gadget -- )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Scroller gadgets
Prev:
scroll>top ( gadget -- )
Next:
find-scroller ( gadget -- scroller/f )
Vocabulary
ui
.
gadgets
.
scrollers
Inputs
rect
a
rect
gadget
a
gadget
Outputs
None
Word description
Ensures that a rectangular region relative to the top-left corner of
gadget
becomes visible in a
scroller
containing
gadget
. Does nothing if no parent of
gadget
is a
scroller
.
See also
scroll-position
,
set-scroll-position
,
scroll>bottom
,
scroll>top
Definition
USING:
accessors
kernel
ui.gadgets
ui.gadgets.scrollers.private
;
IN:
ui.gadgets.scrollers
:
scroll>rect
( rect gadget -- )
dup
find-scroller*
[
[
relative-scroll-rect
]
keep
swap
>>follows
relayout-1
]
[
2drop
]
if*
;