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

Of triple-clicks



At  7:11 PM 2/14/94 +0000, Chris Crone wrote:
>[...]
>2) Is there a triple-click-p?  Many Macintosh applications do something
>special in this case, like select a whole line...  I would like to emulate
>this
>behavior.  Does such a function exist, or could I build one?  How does
>double-click-p work?

MCL's *multi-click-count* variable contains, at view-click-event-handler
time, the number of clicks in a row that were close enough together
in time (set by the "Mouse" control panel) and space (within 4 pixels
in x & y hard-wired into MCL). double-click-p uses this as follows:

(defun double-click-p ()
  (and (boundp '*current-event*)
       (eq #$mouseDown (rref *current-event* eventrecord.what))
       (> *multi-click-count* 1)))

The checking for a mouseDown event in *current-event* is only
necessary because double-click-p will work outside of
view-click-event-handler. From inside a view-click-event-handler method,
*multi-click-count* will always be valid.