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

start-pane-drag-operation

pane-drag-operation-update

end-pane-drag-operation Functions

Summary

Implement a simple dragging operation, which means the pane scrolls as much as the user drags.

Package

capi

Signatures

start-pane-drag-operation pane x y &key override-cursor

pane-drag-operation-update pane x y

end-pane-drag-operation pane x y

Arguments
pane
A simple-pane with scrollbar(s).
x, y
Integers.
override-cursor
A cursor specification or nil.
Description

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 the values of x and 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.

Notes

These functions are intended to be used as callbacks in input model of output-pane and its subclasses.

Examples
(example-edit-file
   "capi/graphics/tracking-pinboard-layout.lisp")
See also

scroll
output-pane
simple-pane


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27