annotate tests/Dnd/dragtest.el @ 197:acd284d43ca1 r20-3b25

Import from CVS: tag r20-3b25
author cvs
date Mon, 13 Aug 2007 10:00:02 +0200
parents e121b013d1f0
children c42ec1d1cded
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
183
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
1 ;; a simple test of the drag functions
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
2 ;;
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
3 ;; still to do: drag only after about 10 pix of movement
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
4
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
5 (defun text-drag (event)
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
6 (interactive "@e")
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
7 (offix-start-drag event "That's a test"))
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
8
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
9 (defun file-drag (event)
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
10 (interactive "@e")
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
11 (offix-start-drag event "/tmp/printcap" 2))
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
12
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
13 (defun url-drag (event)
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
14 (interactive "@e")
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
15 (offix-start-drag event "http://www.xemacs.org/" 8))
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
16
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 183
diff changeset
17 (defun files-drag (event)
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 183
diff changeset
18 (interactive "@e")
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 183
diff changeset
19 (offix-start-drag event '("/tmp/dragtest" "/tmp/droptest" "/tmp/printcap") 3))
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 183
diff changeset
20
183
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
21 (define-key global-map [button1] 'text-drag)
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 183
diff changeset
22 (define-key global-map [button2] 'files-drag)
183
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents:
diff changeset
23 (define-key global-map [button3] 'url-drag)