aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-06-24 08:18:49 -0500
committerColin Okay <colin@cicadas.surf>2022-06-24 08:18:49 -0500
commit1737ca0627d5fb75a4e74c8ee0562f734ce34ebf (patch)
tree1f424ee9d696710e66b6ab4e8c34ff1c35ecc3e7 /examples
parent2f0602913a02823092393b29a26992f61fafbdb4 (diff)
[add] handling of mousewheel events
Diffstat (limited to 'examples')
-rw-r--r--examples/02-moving-bitmp.lisp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp
index a132e9f..153ca1d 100644
--- a/examples/02-moving-bitmp.lisp
+++ b/examples/02-moving-bitmp.lisp
@@ -75,6 +75,10 @@
(ww::on-blur ()
(format t "~a lost focus~%" target)))
+(ww::defhandler wheelie
+ (ww::on-mousewheel ()
+ (print (list :mousewheel horiz vert dir))))
+
(defmethod ww::boot ((app bitmap-display))
(let ((bm
(make-instance 'ww::bitmap
@@ -95,6 +99,7 @@
(ww::set-handler bm2 #'thing-clicked)
(ww::set-handler bm2 #'look-at-me )
(ww::set-handler bm2 #'look-away)
+ (ww::set-handler bm2 #'wheelie)
(ww::add-unit app bm2)))