Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Question about Drag and Drop
Question about Drag and Drop [message #47003] Wed, 19 October 2016 10:41 Go to next message
frankdeprins is currently offline  frankdeprins
Messages: 99
Registered: September 2008
Location: Antwerp - Belgium
Member
Hello,

When I choose to use the DND_EXACTIMAGE flag in a call to DoDragAndDrop, how can I make a visual difference between a DND_COPY and a DND_MOVE operation?
Would it not be better to have an overloaded version of this function, accepting two images (or even three, one more for the 'no drop allowed')?
Or do I overlook something?

Regards

Frank De prins

[Updated on: Wed, 19 October 2016 13:00]

Report message to a moderator

Re: Question about Drag and Drop [message #47008 is a reply to message #47003] Fri, 28 October 2016 08:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13995
Registered: November 2005
Ultimate Member
Nope, it just looks like you are the first one using EXACTIMAGE Smile You are right, this needs fixing.

Which would be better? 3 images, or compositing drop flags over single one? Personally, I would prefer later...
Re: Question about Drag and Drop [message #47009 is a reply to message #47008] Fri, 28 October 2016 09:11 Go to previous messageGo to next message
frankdeprins is currently offline  frankdeprins
Messages: 99
Registered: September 2008
Location: Antwerp - Belgium
Member
Well, I must say I preferred the first one.
I already tried it out, locally (only for Windows, though) and what I did was:


    Change the current version with one image to 3 images and change the code to use the right image for each of the 3 actions.
    Add a new version with one Image (conform to the old, unmodified, one) that just calls the modified one with 3 times the same image. That way, old code is not broken.

I think having 3 images gives the most flexibility.
I attached a patch file to show my mods.
  • Attachment: d&d.diff
    (Size: 2.56KB, Downloaded 203 times)

[Updated on: Fri, 28 October 2016 09:25]

Report message to a moderator

Re: Question about Drag and Drop [message #47010 is a reply to message #47009] Fri, 28 October 2016 12:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13995
Registered: November 2005
Ultimate Member
Now thinking about it: best would be do both. Provide ability to provide 3 images, then create images if they are Null. Would be nice even for !EXACTIMAGE.

Re: Question about Drag and Drop [message #47011 is a reply to message #47010] Fri, 28 October 2016 12:58 Go to previous message
frankdeprins is currently offline  frankdeprins
Messages: 99
Registered: September 2008
Location: Antwerp - Belgium
Member
Great. But then the const Image& would become const Image*. Not so?

Ah no, you said Null, not NULL or nullptr.

[Updated on: Fri, 28 October 2016 12:59]

Report message to a moderator

Previous Topic: [Linux] Upp application can block all mouse events
Next Topic: How to block background redrawing in my own widget
Goto Forum:
  


Current Time: Sat Jul 20 20:02:58 CEST 2024

Total time taken to generate the page: 0.02286 seconds