All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

scroll

Generic Function
Summary

Moves the scrollbar and calls the scroll-callback .

Package

capi

Signature

scroll self scroll-dimension scroll-operation scroll-value &rest options

Arguments

self

A pane that supports scrolling.

scroll-dimension

:vertical, :horizontal or :pan.

scroll-operation

:move, :step or :page.

scroll-value

An integer, or a list of two integers, or a keyword, or a list of two keywords.

options

A list.

Description

The generic function scroll works for panes that support scrolling - these are subclasses of output-pane and layout.

scroll moves the scrollbar of a scrollable pane according to scroll-dimension , scroll-operation and scroll-value . It then calls the scroll-callback (see output-pane) with these arguments and options .

scroll-dimension determines whether the scrolling is vertical, horizontal or, if the value is :pan, in both dimensions.

scroll-operation determines the extent of the scroll. The value :move means that the pane scrolls to the position on the scroll range given by scroll-value , regardless of the current scroll position. The value :step means scroll from the current scroll position by scroll-value times the scroll step size. In the case of panes which do their own scrolling the scroll step size is determined by the operating system (OS). In the case of panes for which the CAPI computes the scroll, the scroll step size is as described in with-geometry. The value :page means scroll from the current scroll position by scroll-value times the scroll page size (which is also determined by the OS or the pane's geometry).

scroll-value should be an integer or keyword if scroll-dimension is :horizontal or :vertical. Allowed keyword values are :start and :end. scroll-value should be a list of two integers or keywords representing the horizontal and vertical scroll values if scroll-dimension is :pan.

options is a list containing arbitrary user data.

Compatibility note

scroll supersedes set-scroll-position, which is deprecated and no longer exported. The call

(capi:scroll pane :pan :move (list x y))

is equivalent to

(capi:set-scroll-position pane x y)
See also

ensure-area-visible
get-scroll-position
output-pane
set-horizontal-scroll-parameters
set-vertical-scroll-parameters
with-geometry
Programming with CAPI Windows


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex