A pane which displays a scroll bar.
The distance scrolled by the scroll-line gesture.
The distance scrolled by clicking inside the scroll bar.
A function called after a scroll gesture, or
scroll-bar implements panes which display a scroll bar and call a callback when the user scrolls. It is not however the most usual way to add scroll bars - see the note below about simple-pane.
is the logical size of a line, and is the distance moved when the user enters a scroll-line gesture, that is clicking on one of the arrow buttons at either end of the scroll bar or using a suitable arrow key. The default value of
is the logical size of a page, and is the distance moved when the user clicks inside the scroll bar. The default value of
nil, meaning there is no callback. This is the default value. Otherwise, is a function of four arguments, the interface containing the scroll-bar, the scroll-bar itself, the mode of scrolling and the amount of scrolling. It has this signature:
can be one of
is an integer indicating how many lines were scrolled.
is an integer indicating how many pages were scrolled.
is an integer giving the new location of the
The location of the slug can be found by the range-pane accessor
Rather than using
scroll-bar, it is more usual to add scroll bars to a pane by the simple-pane initargs
(defun sb-callback (interface sb how where)
(declare (ignorable interface))
(format t "Scrolled ~a where ~a : ~a~%"
how where (range-slug-start sb)))
CAPI User Guide and Reference Manual (Windows version) - 25 Feb 2015