English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 29 March 2020, 16:36   #1
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 119
Drop zones in AppWindow?

Hi,

I'm looking for an advice how to code drop areas in AppWindow, just like in IconEdit for example. Code must be OS2+ compatible.

Regards.
Ami is offline  
Old 29 March 2020, 17:06   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 410
Well, not really complicated. You first create an appWindow:
Code:
appWindow = AddAppWindow(APP_WINDOW_ID,NULL,window,appPort,TAG_DONE)
and within this appWindow, you create one or multiple appZones:
Code:
sourceZone       = AddAppWindowDropZone(appWindow,ZONE_SOURCE_ID,NULL,
					  WBDZA_Left  ,ng.ng_LeftEdge,
					  WBDZA_Top   ,ng.ng_TopEdge,
					  WBDZA_Width ,ng.ng_Width,
					  WBDZA_Height,ng.ng_Height,
					  TAG_DONE);
here it is taking coordinates from a newgadget structure, but this is just an implementation choice.

Warning, Dopus does not support appZones correctly.
Thomas Richter is offline  
Old 29 March 2020, 17:38   #3
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 119
AddAppWindowDropZone() need V44. I need OS2.0+ compatibility (V36).
Ami is offline  
Old 29 March 2020, 18:49   #4
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,002
Drop zones are only available in V44+.

You can make your window an AppWindow, then the user can drop icons anywhere in the window. You receive an AppMessage which contains the mouse coordinates. Compare them to the areas where you expect icons to be dropped.
thomas is offline  
Old 30 March 2020, 21:20   #5
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 119
Ah yes, got it working now. Thanks.
Ami 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
KS 3.1.4 missing in the drop-down list malko support.WinUAE 27 18 November 2019 01:37
Highlighting Zones ricky500 Coders. AMOS 2 02 January 2018 00:15
Polygon Zones, and why not? volvo_0ne Coders. AMOS 24 30 January 2016 21:20
HELP: can no longer drag and drop 8bitbob support.WinUAE 2 01 September 2015 12:24
[nitpick] Time zones problem Akira project.EAB 15 02 September 2002 05:24

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 00:36.


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