automatic scrolling and resizing
I have a pinboard pane with a horizontal scroll bar. When the slug is
as far right as it can go and the user widens the window, CAPI moves
the slug position back. What I would like to do instead is leave the
slug position unchanged and increase the scroll range, but I can't
find a place I can get at to do that early enough. As far as I can
tell, by the time any of my callbacks are called, the slug position
has already been moved back. Is there some place I can hook into
before that happens?
(capi:contain
(make-instance 'capi:pinboard-layout
:pane-can-scroll nil
:scroll-start-x 0
:scroll-width 250
:scroll-initial-x 50
:horizontal-scroll t
:scroll-callback
(lambda (pane &rest args)
(format t "~&scroll callback: slug ~s args ~s"
(capi:get-horizontal-scroll-parameters
pane :slug-position)
args))
:resize-callback
(lambda (pane &rest args)
(format t "~&resize callback: slug ~s args ~s"
(capi:get-horizontal-scroll-parameters
pane :slug-position)
args)))
:best-width 215)