[Openmcl-cvs-notifications] r12720 - /trunk/source/examples/cocoa/easygui/events.lisp

cater at clozure.com cater at clozure.com
Mon Aug 31 08:16:51 EDT 2009


Author: cater
Date: Mon Aug 31 08:16:51 2009
New Revision: 12720

Log:
Towards unified handling of control &c modifiers with keys and with mouse

Modified:
    trunk/source/examples/cocoa/easygui/events.lisp

Modified: trunk/source/examples/cocoa/easygui/events.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/examples/cocoa/easygui/events.lisp (original)
+++ trunk/source/examples/cocoa/easygui/events.lisp Mon Aug 31 08:16:51 2009
@@ -1,10 +1,13 @@
 (in-package :easygui)
 =

-;;; Changed by AWSC Feb 2009:
+;;; Changed by AWSC (arthur.cater at ucd.ie) Feb 2009:
 ;;; Modified define-chaining-responder-method to allow subclasses of easyg=
ui
 ;;; views to inherit mouse handling behaviour.
-;;; Original work by an unknown author.
-;;; Permission to use the change is granted.
+;;; Changed by AWSC Apr 2009:
+;;; Modified define-chaining-responder-method to bind *modifier-key-patter=
n*
+;;; when Lisp mouse handlers are being called.
+;;; The original work I changed is by an unknown author.
+;;; Permission to use disseminate and further modify these changes is gran=
ted.
 =

 ;;; Event handling basics
 =

@@ -18,8 +21,9 @@
        (if (some #'(lambda (super)
                      (find-method #',lisp-name nil (list (class-name super=
)) nil))
                  superclasses)
-           (,lisp-name (easygui-view-of ,self-arg)
-                     , at arg-compute-forms)
+           (let ((*modifier-key-pattern* (#/modifierFlags ,event-arg)))
+             (,lisp-name (easygui-view-of ,self-arg)
+                         , at arg-compute-forms))
            (,objc-name (#/nextResponder ,self-arg) ,event-arg)))))
 =

 (defmacro define-useful-mouse-event-handling-routines (class-name)



More information about the Openmcl-cvs-notifications mailing list