[PD] Fwd: Re: drag and drop

Jean-Yves Gratius jyg at gumo.fr
Tue Oct 30 17:57:52 CET 2018

see attached example, mix of 1) and 2)    :-)

-------- Forwarded Message --------
Subject: 	Re: drag and drop
Date: 	Tue, 30 Oct 2018 16:06:57 +0100
From: 	Jean-Yves Gratius <jyg at gumo.fr>
To: 	pd-list at lists.iem.at

In response to your problem about scrolled window :

1) you should put an iemguts/canvasreceive object in your main patch
and  wait for the first motion event it delivers after you received a
dnd-dropped message (assuming you will move a bit the mouse after
dropping down). This way, you get the correct coordinates in the patch,
may the window be scrolled or not.
2) you should put a bang gui-object in your gop abstraction. Then,
receiving global dnd-dropped msg will "arm" it, and you'll have to click
to the gui-bang to confirm the operation. It's not pure "drag and drop"
but it is a vanilia approach, and you don't have to calculate about gop
coords and margins. Just wait for a click on a bang button.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20181030/83196ea5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EtudeDnd.pd
Type: application/x-wine-extension-pd
Size: 5462 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20181030/83196ea5/attachment.bin>

More information about the Pd-list mailing list