183
|
1 ;; a simple test of the drag functions
|
|
2 ;;
|
|
3 ;; still to do: drag only after about 10 pix of movement
|
|
4
|
|
5 (defun text-drag (event)
|
|
6 (interactive "@e")
|
|
7 (offix-start-drag event "That's a test"))
|
|
8
|
|
9 (defun file-drag (event)
|
|
10 (interactive "@e")
|
|
11 (offix-start-drag event "/tmp/printcap" 2))
|
|
12
|
|
13 (defun url-drag (event)
|
|
14 (interactive "@e")
|
|
15 (offix-start-drag event "http://www.xemacs.org/" 8))
|
|
16
|
197
|
17 (defun files-drag (event)
|
|
18 (interactive "@e")
|
|
19 (offix-start-drag event '("/tmp/dragtest" "/tmp/droptest" "/tmp/printcap") 3))
|
|
20
|
183
|
21 (define-key global-map [button1] 'text-drag)
|
197
|
22 (define-key global-map [button2] 'files-drag)
|
183
|
23 (define-key global-map [button3] 'url-drag)
|