[e-lang] Why are swt.Display map() functions suppressed?

marcs at skyhunter.com marcs at skyhunter.com
Wed Mar 7 13:22:14 CST 2007


My reading of elang has been interrupted by a spam problem, sorry for the late reply.

I need to think about the correct answer to this taming problem before making a
commitment, but I am sure that we will support your need straightforwardly one
way or the other (2 candidates, unsuppress the map functions, or replace the
current drag/drop mouse position getters with getters that return results in
window-relative coordinates). However we do it, I think you can make your system
so that you can easily upgrade to the final solution by creating an intermediary
on the drag/drop object that does the transform, use that ubiquitously, and for
the moment turn on the map functions in your own safej files.


> From: Martin Scheffler <martinscheffler at googlemail.com>
> Date: Mar 2, 2007 6:58 AM
> Subject: [e-lang] Why are swt.Display map() functions suppressed?
> To: Discussion of E and other capability languages
> <e-lang at mail.eros-os.org>
> In src/safej/org/eclipse/swt/widgets/Display.safej:
> The map functions are suppressed. They can be used to
> transform mouse positions between local coordinate systems of
> composites.
> See
> http://help.eclipse.org/help31/nftopic/org.eclipse.platform.do
> c.isv/reference/api/index.html
> I need this for drag and drop:
> I need the exact position at that a draggable item was
> dropped on a target. I tried adding a MouseEvent listener to
> the target, but unfortunately the mouse events arrive later
> than the drop event.
> The drop event contains mouse positions, but they are in
> absolute screen space.
> To transform these positions to be relative to the drop
> target, I need the map functions.
> Could you enable them? I don't think they leak any authority.
> Thanks,
> Martin
> _______________________________________________
> e-lang mailing list
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang


More information about the e-lang mailing list