define-presentation-to-command-translator
Paul Werkowski
pw at snoopy.qozzy.com
Fri Dec 25 19:33:12 UTC 2020
Trying to run McCLIM on windows-10/LispWorks 64-bit. This issue regards
define-presentation-to-command-translator. The marked lines below show
the problem. Apparently the McCLIM code resulted in replacing the DEV-X
argument I wanted with a DEVICE-EVENT object I did not want. I then had
to use a non exported function from clim-internals to retrieve the
missing value. The &rest arg I put in is NIL in both cases. I have not
figured out how that happened.
(defun %set-a-cursor
#+clim-2.0 (chart cursor dev-x dev-y pane &rest stuff) ;<<<<
#+mcclim (chart cursor event dev-y pane &rest stuff) ;<<<<
(let* (#+mcclim
(dev-x (climi::device-event-x event))
(x (untransform-position
(medium-transformation pane) dev-x dev-y)))
(with-slots (lcursor rcursor) chart
(let ((newx
(ecase cursor
(rcursor (max (x-cursor-position lcursor) (ceiling x)))
(lcursor (min (x-cursor-position rcursor) (floor x))))))
;; args to com-set-cursor
(list (slot-value chart cursor) newx pane)))))
(define-presentation-to-command-translator xlate-set-rcursor
(clim:blank-area com-set-cursor plotter
:documentation "Set Right Cursor"
:gesture :menu
:tester ((object window)
(declare (ignore object))
(typep window 'basic-chart-pane)))
(x y window)
(%set-a-cursor (chart-pane-chart window) 'rcursor x y window))
More information about the mcclim-devel
mailing list