| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
Arguments: window scroll-type new-position
This function is called by the system whenever the user makes a scrolling gesture. It should not be called directly by the program, but may be modified to customize scrolling behavior on the program's own window classes.
Platform note: This function is called on Windows, but will not be called on GTK where it was not feasible to implement. The newer generic function scroll-increment has been added to provide the principal functionality of user-scroll on both platforms.
scroll-type is one of :left, :right, :up, :down, :thumb-continuous, :thumb-finished. The thumb values indicate a dragged scroll-box (also known as "the thumb" or "slider"), while the other values indicate single-click page or line scrolling.
new-position is either :character or :page. :character indicates that a small (line or character) scroll was requested, typically by mousing one of the arrows at the end of the scroll bar or by pressing the arrow keys on the keyboard. :page indicates that a large (page) scroll was requested, typically by mousing the body of the scroll bar or pressing the page-up or page-down keys.
An application may override the default method of this and several
other generic functions in order to implement a custom scrolling
scheme that scrolls by logical picture objects rather than by
pixels. See the source code of the example entitled
'Scrolling by arbitrary objects rather than pixels'
on the Examples tab of the
Navigator
dialog
for a complete
example. More on this point and a list of the relevant generic
functions can be found on the horizontal-scroll-bar
and vertical-scroll-bar
pages.
See cg-events.htm for information about event handling in Common Graphics.
Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |