English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 17 October 2020, 18:18   #1
Warty
Registered User
 
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
High-level steps for dragging an image between 2 windows?

Goal: drag a 32x32 graphic from Window 1 to Window 2, allowing for the fact that there could be either/both a screen (background) that has to be traversed, or additional windows from this app or other apps. Goal is to have this work on WB/public screens.

Current status: I am testing with my own screen. I have the graphics set up as interleaved bitmaps + masks, and I can blit them into a window's RastPort.

What would the high level steps look like for doing this?

My super high level is this:
1. user initiates drag in Window 1 by holding down mouse button over an icon
2. user moves mouse to the other window
3. user ends drag by letting up mouse button
Code:
+---------------------------------------------------------------+
| +--------------------+                                        |
| | Window 1           |                                        |
| |                    |                                        |
| |                    |                                        |
| |       ++           |                                        |
| |       ++Start Drag |                                        |
| |         X          |                                        |
| |         X          |    +----------------------------+      |
| +---------X----------+    | Window 2                   |      |
|           XX              |                            |      |
|            XXXX           |                            |      |
|               XXXX        |          ++                |      |
|                   XXXXXX  |          ++                |      |
|                        XXXXXXXXXXXXXX  End Drag        |      |
|                           |                            |      |
|                           |                            |      |
|                           |                            |      |
|                           |                            |      |
|                           |                            |      |
|                           |                            |      |
|                           +----------------------------+      |
|                                                               |
|Screen                                                         |
+---------------------------------------------------------------+
Tracking things that are unclear to me:
  • How do I get events once the user drags the mouse out into the space between windows? Do I need to have a borderless/titleless backdrop window to catch those events?
  • What if I want to do this on the WB screen?
  • What if there's another app's windows in between?

Blitter questions
My probably-wrong interpretation of the basic idea of blitter animation:
  1. prepare a temp copy of the background space the graphic is "floating on" (without the graphic);
  2. make a copy of the (new) space the graphic is going to be moved through
  3. restore the copy from #1 to "unstick" the graphic from the background
  4. blit the graphic into the new location
  5. replace the temp copy of background in #1 with the new copy from #2 so you are ready for the next move.
  • Is that approximately right?
  • I don't know where user will move mouse next, or how fast/far: does that mean I have to capture a pretty large area of the screen?
  • It seems clear from the auto docs that we aren't supposed to access the screen's bitmap directly or 'bad things' will happen. How can I blit across WB background, or across other app's windows?
Warty is offline  
Old 12 March 2021, 18:38   #2
nyteshade
Registered User
 
Join Date: Mar 2020
Location: Boulder Creek / USA
Posts: 43
Following this thread.


Sent from my iPhone using Tapatalk
nyteshade is offline  
Old 12 March 2021, 18:43   #3
nyteshade
Registered User
 
Join Date: Mar 2020
Location: Boulder Creek / USA
Posts: 43
[mention]thomas [/mention] do you know how to do this?


Sent from my iPhone using Tapatalk
nyteshade 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
Is there a high level copperlist decoder program? kamelito Coders. Asm / Hardware 10 02 January 2018 21:56
Winuae: Mount Image Floppy PC-Windows AMIGASYSTEM support.WinUAE 6 08 October 2016 18:51
Windows image viewer / converter... Echo request.Apps 10 10 January 2014 13:23
High-level Apps for SysSpeed tygre request.Apps 8 01 February 2013 05:11
WinFellow crashes on Windows 7 with high resolutions andreas support.WinFellow 7 25 July 2009 00:02

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 13:57.

Top

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