Generalized click-forwarding-editor to work on text%s as well as pasteboards%

svn: r10427
This commit is contained in:
Danny Yoo 2008-06-23 18:22:03 +00:00
parent 3fdde8a603
commit 9431017d18

View File

@ -45,7 +45,12 @@
(let ([new-x (box x)]
[new-y (box y)])
(global-to-local new-x new-y)
(find-snip (unbox new-x) (unbox new-y))))
(cond
[(is-a? this text%)
(let ([pos (send this find-position (unbox new-x) (unbox new-y))])
(find-snip pos 'after-or-none))]
[(is-a? this pasteboard%)
(find-snip (unbox new-x) (unbox new-y))])))
(super-instantiate ())
))