Async drag drop

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
PeterO
Earned a small fee
Earned a small fee
Posts: 14
Joined: Mon Jun 23, 2014 11:12 am

Async drag drop

Post 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
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Async drag drop

Post 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.
PeterO
Earned a small fee
Earned a small fee
Posts: 14
Joined: Mon Jun 23, 2014 11:12 am

Re: Async drag drop

Post 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
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Async drag drop

Post 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.
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Async drag drop

Post 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.
Use the source, Luke!
Post Reply