Page 1 of 1

Async drag drop

Posted: Mon Mar 11, 2019 10:26 am
by PeterO
Hello

Is it possible to do async drag drop? In our specific case, the processing of data on drop will be done on a worker thread to prevent blocking the UI thread. But afterwards we need to know if the process has succeeded to perform deleting the source. In MSW there's a IDataObjectAsyncCapability interface but I don't see it implemented in the wxWidgets source code. Am I right?

Regards,
Peter

Re: Async drag drop

Posted: Mon Mar 11, 2019 2:43 pm
by ONEEYEMAN
Hi,
Why do you need to perform DnD on the thread?
Don't you know it won't work?

And there is no blockage of the GUI thread - you won't be able to do anything anyway while you're doing DnD...

Thank you.

Re: Async drag drop

Posted: Mon Mar 11, 2019 2:52 pm
by PeterO
Because this might be a lengthy operation, or we might need user input, or whatever, reason doesn't matter. We don't want to block the UI and at the end of the operation I need a callback so the source will be removed (or another cleanup processing). MSW has an interface for it so this is a reasonable and valid scenario: https://docs.microsoft.com/nl-nl/window ... chronously

Re: Async drag drop

Posted: Mon Mar 11, 2019 3:25 pm
by ONEEYEMAN
Hi,
I don't think anything like this exist for other platforms. At least quick googling didn't yeild anything.
You can try the wx-users ML and maybe you get a reply from one of the core-devs.

Thank you.

Re: Async drag drop

Posted: Mon Mar 11, 2019 4:50 pm
by doublemax
If the DnD operation happens inside your application or between applications that are all under your control, you can probably mimic the behavior. Otherwise, you're out of luck.