[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find-view-containing-point
- To: lynch@aristotle.ils.nwu.edu (Richard Lynch)
- Subject: Re: find-view-containing-point
- From: Bill St. Clair <bill>
- Date: Mon, 29 Jul 91 16:36:54 -0400
- Cc: info-macl@cambridge.apple.com
- In-reply-to: Your message of Mon, 29 Jul 91 10:27:07 -0500. <9107291527.AA20813@aristotle.ils.nwu.edu>
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)))