English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 August 2014, 16:11   #1
AGS
XoXo/Tasko Developer
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 45
Posts: 450
Question Drag & Drop Implementation howto

Hi,

I would like to implement drag & drop accross different windows into my filemanager(s) (each is a window) and am unsure how this might work.

The "drag" part however already works. Unsureness concerns the "drop" part. As the drag & drop is handled by the window class, which is responbsible for reading mouse pos and drawing the dragged item(s), the "drop" part would work basically like this:

- window class checks mousbutton release
- window class uses WhichLayer() and looks it up in the list of window instances to find the window of the filemanager over which the content is dropped
- window class gets the pointer to the window object from wd_Userdata and traverses the list of all other objects that are attached to that window to find out which object in detail is under the mouse. for this any object that is a valid dropzone has a special bit set, just for the case that two or more objects are nested (like a frame object and a button in it) so that we know which one of those is a valid receiver of the "drop"

Now the question is, what message should be sent to that object? Basically that object and its window may belong to any app that runs under this GUI engine. However the destination object must know that the drop comes from a filemanager object and its address.

Any ideas you wish to share?

A
AGS is offline  
Old 08 September 2014, 21:21   #2
mritter0
Registered User

 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 48
Posts: 204
Have you gotten this to work? I could use drag&drop in my project, too.
mritter0 is offline  
Old 09 September 2014, 09:19   #3
AGS
XoXo/Tasko Developer
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 45
Posts: 450
I did, however mine is based on my GUI-engine (custom non-OS gadgets etc). The part that you might find useful is the call to WhichLayer() to find the window that is currently under the mouse where you release the button (drop). And the part that saves a rectangle from the screen and draws the dragged object there.
AGS is offline  
Old 10 September 2014, 00:14   #4
mritter0
Registered User

 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 48
Posts: 204
Hmmm.....not ReAction compatible.....I would still like to see a demo of it, if you don't mind. PM me for email details.
mritter0 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adf Drag and Drop and association problem? kern support.WinUAE 5 17 September 2012 17:37
Drag and drop opening of adf files? zardoz support.OtherUAE 3 08 May 2012 23:19
Problems on an A3000 (Drag-and-Drop & palettes broken) BuddhaPhi project.ClassicWB 1 01 March 2012 00:46
Drag and Drop HDF mounting? killergorilla request.UAE Wishlist 5 02 July 2008 12:12
Odd request - ADFs drag and drop BippyM request.UAE Wishlist 9 23 April 2006 00:36

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.06969 seconds with 13 queries