[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: icon-dialog-item bug??
- To: email@example.com
- Subject: Re: icon-dialog-item bug??
- From: firstname.lastname@example.org (Karsten Poeck)
- Date: 19 Jun 1994 12:29:29 GMT
- Followup-to: comp.lang.lisp.mcl
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Wuerzburg
- References: <CrLzyD.I77@dcs.gla.ac.uk>
In article <CrLzyD.I77@dcs.gla.ac.uk>, email@example.com (Kim Binsted)
> Hi. I want to put up a dialog, put a view inside it, and put a
> clickable icon inside the view. This works - but only as long as the
> view is the top part of the dialog!
There seems to be a bug in the following method
(defmethod view-click-event-handler ((item icon-dialog-item) where)
(declare (ignore where))
(let* ((pos (view-position item))
(inverted-p nil)) ;true when the mouse is over the
(with-focused-view (view-container item) ;Draw in the container's
(rlet ((temp-rect :rect ;temporarily allocate a rectangle
:botRight (add-points pos (view-size item))))
(#_invertrect temp-rect) ;initially invert the icon.
(setq inverted-p t)
(loop ;loop until the button is released
(when inverted-p ;if button released with mouse
; over the icon, run the action
(setq inverted-p nil))
(view-mouse-position (view-container item))
;;;;; Bug, was view-window, does not work if view-window and
;;;;; view-container don't have the same coordinate system
temp-rect) ;is mouse over the icon's rect?
(unless inverted-p ;yes, make sure it's inverted.
(setq inverted-p t))
(when inverted-p ;no, make sure it's not
(setq inverted-p nil)))))))))