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

View-mouse-position



Hi,

I am trying to move an object in a window from a position to another
using the press & hold down of mouse.  I design the following code:

(defclass my-window (window)())

(setq foo (make-instance 'my-window))

(defmethod view-click-event-handler
           ((window my-window) position)
           (call-next-method)(view-mouse-position (front-window))
           (setq cursor-h (point-h position))
           (setq cursor-v (point-v position))
           (if (and (>= cursor-h 10)(<= cursor-h 50)(>= cursor-v 10)(<=
             cursor-v 50))
           (if (and (#_stilldown)(<get mouse position using
            (view-mouse-position (front-window) or foo)>) (print "mouse-move"))))

After running the code, the return of (view-mouse-position foo) is nil).
Can anyone fix my problems?  Thanks.

jipan@gmuvax2.gmu.edu