🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Anthony Rohde Mon, 11 Nov 1991 02:03
Mouse double and triple click actions for Epoch 4.0
#1685
Author: Anthony Rohde
Date: Mon, 11 Nov 1991 02:03
10 lines
966 bytes
We would like the following functionality from the Epoch mouse:

	double click	-	highlight current word
	triple click	-	highlight current line

Has anyone implemented this functionality for Epoch. If not, how could I
achieve it?

Thanks,
Anthony.
Re: Mouse double and triple click actions for Epoch 4.0
#1686
Author: Martin Boyer
Date: Mon, 11 Nov 1991 21:12
24 lines
1691 bytes
anthony@citr.uq.oz.au (Anthony Rohde) writes:

   We would like the following functionality from the Epoch mouse:

	   double click	-	highlight current word
	   triple click	-	highlight current line

I have it, but it's part of something else which is not clean enough
yet.  In particular, some bugs in alpha one stopped my development.  I
have alpha two now and I'll take a second shot at it.  It really is a
more flexible replacement for mouse.el and motion.el.

If there is nothing better, I'll post an alpha version.  Otherwise,
I'd rather wait a week or so.  In any case, let's not have multiple
versions of the same thing; if somebody else is working on this,
let's talk!

Please email if you're interested in having it or collaborating.

--
Martin Boyer                            mboyer@ireq-robot.hydro.qc.ca
Institut de recherche d'Hydro-Quebec    mboyer@ireq-robot.uucp
Varennes, QC, Canada   J3X 1S1
+1 514 652-8412
Re: Mouse double and triple click actions for Epoch 4.0
#1687
Author: Heinz Schmidt
Date: Wed, 13 Nov 1991 00:48
100 lines
5799 bytes
Hi.
     > We would like the following functionality from the Epoch mouse:
     > 
     >	double click	-	highlight current word
     > 	triple click	-	highlight current line

The sky-mouse package supports multi-clicks.  Among some other public
domain elisp files, you can retrieve the newest version from 
AUS:                    lynx.csis.dit.csiro.au  (world/elisp)
US:      		icsi-ftp.berkeley.edu (pub/elisp)
Sky-mouse works under various Emacsen and Epochs. The newest version
runs under Epoch 4 thanks to patches by Tom Emerson. CF. sky.README in
that directory for how to install it. I also recently changed some of
the other el files to use styles rather than the Epoch 3ish
attributes. For instance epoch-touchup.el is a rather small style
example that uses regular expression search to highlight things in a
different font.  

Sky-mouse supports multi-click hints. Changing this to true
multi-click maps is desirable but was not possible under Epoch 3.
Multi-click *hints* means, commands are mapped independently of the
number of clicks and optionally read click-state (sort of mouse prefix
args). 
The word, line, thing is supported this way.  Extensions exist for
language modes, that allow fast selection of syntactic constructs
(if...end, etc; user doc in online mouse tutorial; programming example
in language-tools.el and sather-mode.el).

Under Epoch4 true timing info (event departure) is provided which was
not possible under Epoch3 (event handling time).  There are a few of
other limitations, cf. the online documentation for more details.  If
timeouts (in microseconds) and event snooping were supported in
Epoch4, a minor change of sky-mouse would allow a clean implementation
of the original multi-click hint idea: accumulation of multi-click
event sequences into a single multi-click event mapped to one command.
I've not yet found time to loock deeper into the Epoch 4 sources. If
the basic support is there, the mouse-handler macro could simply wait
a little while snooping incoming events, and, if any arrives in time,
increment multi-click-hint and give up to be called again. Otherwise
and finally it would map to the right command.

-- Heinz
------------------------------------------------------------------------
Heinz W. Schmidt                           ,--_|\  hws@csis.dit.csiro.au   
CSIRO Division of Information Technology  /      \     tel (06) 275-0974
Australian National University, Canberra  \_,--_*/     fax (06) 257-1052
                                                v

PS: If you have sky-mouse installed, here is the patch to just
epoch-mouse-base.el that makes it work under Epoch4 (relative to the
May-91 version).

O\ /
O/ \  --------------------------------------------------------------------
pyxis 125> diff epoch-mouse-base.el epoch-mouse-base.el.~1~ 
17,20c17
< ;;;* Last edited: Nov 12 16:40 1991 (hws)
< ;;;*  Nov 12 16:40 1991 (hws): adapt multi clicks to use "real" event time(stamp)
< ;;;*                           under Epoch 4
< ;;;*  Nov 11 19:15 1991 (hws): integrated Tom Emerson's patch for Epoch4
---
> ;;;* Last edited: May 26 23:59 1991 (hws)
75,81d71
< ;;; Record the version of Epoch that we are running
< ;;; Make sure the code continues to run under Epoch version < 4 (hws)
< (defvar sky-epoch-3
<   (and (> (length epoch::version) 6) ;;#+Epoch-3
<           (string-equal (substring epoch::version 0 7) 
<                                           "Epoch 3")))
< 
228,238d217
< ;;; This was hacked by Tree, 21.10.91 to work with Epoch4.0a1.
< ;;; Evidently we need to explicitly set the style to be used for
< ;;; underlining in epoch::mark-region.  This seems to work.
< (defvar sky-region-style (epoch::make-style))
< (epoch::set-style-foreground sky-region-style (foreground))
< (epoch::set-style-background sky-region-style (background))
< (epoch::set-style-underline sky-region-style (foreground))
< 
< ;;; Make sure the code continues to run under Epoch version < 4 (hws)
< (if sky-epoch-3 (setq sky-region-style 1))
< 
247,250c226
<          (setq drag-button 
<                (epoch::add-button from to 
<                                   sky-region-style 
<                                   nil))))
---
>          (setq drag-button (epoch::add-button from to 1 nil))))
506,507c482
<          ;; make timestamps visible for multi-click hints (hws)
<          (let* (((, time) (if sky-epoch-3 (the-time) (aref epoch::event 3)))
---
>          (let* (((, time) (the-time))
--
------------------------------------------------------------------------
Heinz W. Schmidt                           ,--_|\  hws@csis.dit.csiro.au   
CSIRO Division of Information Technology  /      \     tel (06) 275-0974
Australian National University, Canberra  \_,--_*/     fax (06) 257-1052
                                                v
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads