Global Drag and Drop

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
User avatar
pongasoft
Posts: 77
Joined: Sun Mar 11, 2018 5:57 pm
Location: Las Vegas, USA
Contact:

Global Drag and Drop

Post by pongasoft » Sun May 12, 2019 6:59 pm

I would like to implement a global drag/drop feature so that if a user drags and drop a file ANYWHERE in the UI, then I get a callback. How would I go about implementing such a thing?

I tried to implement my own custom view which implement the onDrag/Drop functions and overlay it in the front, make it transparent, but then no mouse events go to any view below... If I put it below everything then mouse events go to each individual views, but drag/drop is blocked on those views...

Thanks
Yan

Arne Scheffler
Posts: 282
Joined: Mon Jun 20, 2016 7:53 am

Re: Global Drag and Drop

Post by Arne Scheffler » Mon May 13, 2019 8:03 am

Hi,
I've redesigned the drag and drop implementation in VSTGUI 4.7. If you use this or a newer version, you can simply set the drop target of your frame instance to a custom IDropTarget object. See lib/dragging.h for more information. For older versions this is not easy and may not be possible without altering the sources of the library.

Cheers,
Arne

User avatar
pongasoft
Posts: 77
Joined: Sun Mar 11, 2018 5:57 pm
Location: Las Vegas, USA
Contact:

Re: Global Drag and Drop

Post by pongasoft » Mon May 13, 2019 12:57 pm

I am using VST SDK 3.6.9 so I believe it comes with an earlier version of VSTGUI :(. I guess I won't be able to do it then

Thanks
Yan

Post Reply