[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-view-containing-point



   Date: Mon, 29 Jul 91 10:27:07 CDT
   From: lynch@aristotle.ils.nwu.edu (Richard Lynch)
   To: info-macl@cambridge.apple.com
   Subject: find-view-containing-point
   
   It would be real nice if find-view-containing-point would accept nil as the
   view argument to represent the window-manager.

It does in my Lisp and it will in the final release of MCL (on your
request, I believe).  To make it do so in 2.0b1:

(in-package :ccl)

(defmethod find-view-containing-point ((view null) h &optional v
                                       (direct-subviews-only nil))
  (let ((point (make-point h v)))
    (flet ((check-window (w)
             (when (view-contains-point-p w point)
               (return-from find-view-containing-point
                 (if direct-subviews-only
                   w
                   (find-view-containing-point 
                    w
                    (subtract-points point (view-position w))))))))
      (declare (dynamic-extent #'check-window))
      (map-windows #'check-window :include-windoids t)
      nil)))