English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 14 January 2013, 12:58   #1
alphagemini
Registered User
 
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
Window shrinking

Is it possible to shrink an Amiga window and have the contents rescaled to fit the new window? It can be done on PC, on the Amiga?
alphagemini is offline  
Old 14 January 2013, 13:18   #2
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 41
Posts: 4,154
That would be up to the program you're running. Do you mean a folder window in Workbench?
demolition is offline  
Old 14 January 2013, 15:35   #3
mfilos
Paranoid Amigoid

mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 42
Posts: 1,577
I guess he means the feature "Auto Arrange Icons".

All you have to do is press Right-Amiga + full-stop (period). It will auto-arrange itself. Alternatively, select all of your icons in the window and Unsnapshot them. When you open the window next time, they will arrange nicely because none of them will have embedded position information.
mfilos is offline  
Old 14 January 2013, 20:31   #4
Ed Cruse
Registered User
 
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 68
Posts: 351
Quote:
Originally Posted by alphagemini View Post
Is it possible to shrink an Amiga window and have the contents rescaled to fit the new window? It can be done on PC, on the Amiga?
If you're talking about an application's program window then yes. The application has to do it though. Intuition will send you a message telling you that the window size has changed. You then get the new window dimensions, close everything in your window and then reopen them using the new window dimensions to determine the new sizes and positions for everything that goes in your window.
Ed Cruse is offline  
Old 17 January 2013, 12:49   #5
alphagemini
Registered User
 
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
Quote:
Originally Posted by Ed Cruse View Post
If you're talking about an application's program window then yes. The application has to do it though. Intuition will send you a message telling you that the window size has changed. You then get the new window dimensions, close everything in your window and then reopen them using the new window dimensions to determine the new sizes and positions for everything that goes in your window.
Thanks for the reply. Intuition is new to me. Is this something you incorporate into a program? ie a line of code requesting it?
alphagemini is offline  
Old 18 January 2013, 00:38   #6
Ed Cruse
Registered User
 
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 68
Posts: 351
Quote:
Originally Posted by alphagemini View Post
Thanks for the reply. Intuition is new to me. Is this something you incorporate into a program? ie a line of code requesting it?
Yes. When you open a window, one of things you set up is what messages you want to receive. One of them is when the window gets resized. There's 32 different message you can set using the IDCMP flags.

If you don't know about intuition then you need to get the book on the include files and auto docs, and the amiga library book. You also need to know how to deal with messages in general. I don't think the actual books are available anymore but I think the info is available electronically. Hopefully somebody can supply info on this.
Ed Cruse is offline  
Old 18 January 2013, 00:43   #7
TCD
Registered User

TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 43
Posts: 24,024
Guess this would be helpful then: http://amigadev.elowar.com/
TCD is offline  
Old 18 January 2013, 12:10   #8
alphagemini
Registered User
 
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
Thanks for the help, I obviously have homework to do!!
alphagemini is offline  
Old 18 January 2013, 12:36   #9
alphagemini
Registered User
 
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
I have the original HiSoft basic 2 user manual. In it it mentions IDCMP but does not show any examples of how this is expressed in code. It assumes a great deal of expertise on behalf of the reader, as usual, which is obscure to a bear of small brain. If anyone has the patience to explain I would be very grateful!
alphagemini is offline  
Old 19 January 2013, 19:42   #10
Ed Cruse
Registered User
 
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 68
Posts: 351
Quote:
Originally Posted by alphagemini View Post
I have the original HiSoft basic 2 user manual. In it it mentions IDCMP but does not show any examples of how this is expressed in code. It assumes a great deal of expertise on behalf of the reader, as usual, which is obscure to a bear of small brain. If anyone has the patience to explain I would be very grateful!
When you create window tell it what IDCMP events you want to here about. Intuition will open a message port for you and all intuition message will arrive at that port. Remove messages from port and one field in each message is what IDCMP event the message is about. The other fields in the message are other info depending on the event. Do what you need to do and then reply the message back to intuition.

When I have more time I'll try and work up some simple code. It will be in C.
Ed Cruse is offline  
Old 21 January 2013, 18:45   #11
Ed Cruse
Registered User
 
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 68
Posts: 351
I upload my template program. This program creates a window with a simple menu and also a secondary thread. The problem is I have written functions over the years to do all the hard work for me. This is probably not going to be very useful to you because you can't really see how I'm talking to the OS. I was going to do it the hard way so you can see but that's an awful lot of work on my part and I just don't have the time. I wrote the functions so I didn't have to keep remembering. There is a call in the program called mt_intuihandler() that does show how to handle intuition messages and the IDCMP, but again it's still fairly hidden in the functions.

Sorry, this is the best I can do. You need to get all documentation which includes the libraries book which explains how things work, and also the autodocs and includes files, and then read and read and experiment writing code.
Attached Files
File Type: c myprg.c (14.8 KB, 112 views)
File Type: c data.c (4.0 KB, 103 views)
Ed Cruse is offline  
Old 23 January 2013, 16:50   #12
alphagemini
Registered User
 
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
Thanks for your help, this is a bit too abstruse for me, I will have to wait until I know more
alphagemini 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
GIMMEZEROZERO window Gilloo Coders. System 1 31 October 2011 15:13
Shrinking my collection: Tons of stuff for sale... mr.niceguy MarketPlace 32 27 April 2010 19:18
shrinking files AliasXZ New to Emulation or Amiga scene 5 30 January 2008 11:02
Window Size? Retro1234 request.UAE Wishlist 21 25 January 2008 14:10
Operating in a window Peanutuk support.WinUAE 2 07 August 2005 13:47

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:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.08628 seconds with 14 queries