<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Greetings Orm,</p>
<p>CLIM is a layered toolkit, the implementation in
"text-selection.lisp" is using the lower level where you handle
events yourself. For example `dispatch-event`, `handle-repaint`,
`handle-event` are all part of CLIM. <br>
</p>
<p>I am attaching an example program which shows an integer value
which can be increased or decreased with mouse wheel. Just put the
following in a file and load it:<br>
</p>
<hr size="2" width="100%"><tt>(eval-when (:compile-toplevel
:load-toplevel :execute)</tt><tt><br>
</tt><tt> (unless (find-package "CLIM")</tt><tt><br>
</tt><tt> (ql:quickload "mcclim")))</tt><tt><br>
</tt><tt><br>
</tt><tt>(in-package :clim-user)</tt><tt><br>
</tt><tt><br>
</tt><tt>(defclass counter-pane (basic-pane)</tt><tt><br>
</tt><tt> ((counter :initform 0)))</tt><tt><br>
</tt><tt><br>
</tt><tt>(defmethod handle-event ((pane counter-pane)</tt><tt><br>
</tt><tt> (event
climi::pointer-scroll-event))</tt><tt><br>
</tt><tt> (with-slots ((counter counter)) pane</tt><tt><br>
</tt><tt> (setf counter (+ counter (climi::pointer-event-delta-y
event))))</tt><tt><br>
</tt><tt> (repaint-sheet pane +everywhere+))</tt><tt><br>
</tt><tt><br>
</tt><tt>(defmethod handle-repaint ((pane counter-pane)</tt><tt><br>
</tt><tt> region)</tt><tt><br>
</tt><tt> (with-bounding-rectangle* (min-x min-y max-x max-y)
region</tt><tt><br>
</tt><tt> (draw-rectangle* pane min-x min-y max-x max-y :ink
+sky-blue+)</tt><tt><br>
</tt><tt> (draw-text* pane "Use Mouse Wheel to increase/decrease
counter." 20 20)</tt><tt><br>
</tt><tt> (with-slots ((counter counter)) pane</tt><tt><br>
</tt><tt> (with-text-size (pane 48)</tt><tt><br>
</tt><tt> (draw-text* pane (format nil "~A" counter) 170 180)))))</tt><tt><br>
</tt><tt><br>
</tt><tt>(define-application-frame counter-frame ()</tt><tt><br>
</tt><tt> ()</tt><tt><br>
</tt><tt> (:pane</tt><tt><br>
</tt><tt> (clim:make-pane 'counter-pane))</tt><tt><br>
</tt><tt> (:geometry :width 400 :height 400))</tt><tt><br>
</tt><tt><br>
</tt><tt>(defun show-counter ()</tt><tt><br>
</tt><tt> (let ((frame (make-application-frame 'counter-frame)))</tt><tt><br>
</tt><tt> (run-frame-top-level frame)))</tt><tt><br>
</tt><tt><br>
</tt><tt>(show-counter)</tt><br>
<hr size="2" width="100%">Since gestures on McCLIM are currently
broken, You can implement multiple-select (mentioned in your parent
mail) as text-selection is implemented/<br>
<br>
Good luck,<br>
<br>
Nisar Ahmad<br>
<br>
<div class="moz-cite-prefix">On 08/05/2018 10:30 PM, Orm Finnendahl
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20180805170003.GB6823@T460s-orm">
<pre wrap="">Hi,
just FYI (if someone googles this question...):
After some code inspection I found out that the "cut-and-paste-mixin"
sends pointer-events in its dispatch-event :around method to
eos/shift-click if the shift key is pressed. This seems related to
some historic semantics of shift-click behaviour for setting and
dragging points as explained in the "text-selection.lisp" file.
I couldn't find anything in the clim specific docs. May it'd be
sensible to add this information (maybe at bauhh.dyndns.org?).
--
Orm
</pre>
</blockquote>
<br>
</body>
</html>