Implement a simple dragging operation, which means the pane scrolls as much as the user drags.
start-pane-drag-operation pane x y &key override-cursor
The functions start-pane-drag-operation
, pane-drag-operation-update
and end-pane-drag-operation
together implement a simple dragging operation, which means that
pane
scrolls as much as the user move the cursor. The scrolling happens by a call to scroll with the appropriate parameters, in the dimension(s) for which
pane
has scrollbar(s).
start-pane-drag-operation
initializes the dragging operation on
pane
. If
override-cursor
cursor is non-nil, the overriding cursor is set internally (not affecting the value that interface-override-cursor
accesses).
override-cursor
defaults to :move
.
pane-drag-operation-update
performs the dragging operation and calls scroll with the appropriate arguments to scroll
pane
(in the direction(s) that the pane has scrollbar(s)).
pane
is scrolled based on the difference between
x,y
in the calls to pane-drag-operation-update
and start-pane-drag-operation
.
end-pane-drag-operation
stops the dragging operation, and resets the override cursor to the value of that interface-override-cursor
accesses. It ignores
x
and
y
.
If pane-drag-operation-update
or end-pane-drag-operation
are called without a preceding call to start-pane-drag-operation
or after a call to end-pane-drag-operation
without following call to start-pane-drag-operation
they do nothing.
These functions are intended to be used as callbacks in input model of output-pane and its subclasses.
CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017