Setting WA_Zoom

This forum is for general developer support questions.
Post Reply
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Setting WA_Zoom

Post by chris »

I notice that it is legal to set WA_Zoom on an open Intuition window, according to the AutoDocs.
However, it is not legal (and doesn't work; I tried it) to set WA_Zoom on an open window created using window.class.

a) Why?
b) Is there a way around this? I'd like to adjust the zoomed setting so it fits the window contents when the maximum size of said contents change.
User avatar
Rigo
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 363
Joined: Mon Jan 17, 2011 9:42 pm

Re: Setting WA_Zoom

Post by Rigo »

Well, there are no hints in the code why window.class cannot have WA_Zoom set after it is opened, but I did see that WA_WindowBox CAN be set, so that might be a suitable alternative.

Simon
User avatar
thomasrapp
Posts: 318
Joined: Sun Jun 19, 2011 12:22 am

Re: Setting WA_Zoom

Post by thomasrapp »

I'd guess this has historical reason: SetWindowAttrs didn't exist in OS 3.x and thus window.class was not able to change WA_Zoom after opening the Intuition window.

What happens if you call SetWindowAttrs(WA_Zoom) on the window pointer returned by WM_OPEN?
User avatar
Rigo
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 363
Joined: Mon Jan 17, 2011 9:42 pm

Re: Setting WA_Zoom

Post by Rigo »

The problem with that, is that you are bypassing the Object, so the Zoom dimensions will not be stored by the object. It may, or may not be a problem, not sure.

It would be easy enough to change window.class to accept WA_Zoom in OM_SET, but discovering the ramifications of that could be time consuming unless someone comes up with a good test case.

Simon
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Setting WA_Zoom

Post by chris »

Rigo wrote:The problem with that, is that you are bypassing the Object, so the Zoom dimensions will not be stored by the object. It may, or may not be a problem, not sure.
Since that's what I tried, and it didn't change anything, I'm guessing it does need to be stored in the object itself.

WA_WindowBox isn't an option, as that changes the current dimensions of the window, whereas I'm only interested in changing the dimensions for current/future "zooms".
Post Reply