Controlling Zoom size
Controlling Zoom size
- Subject: Controlling Zoom size
- From: "Brant Sears" <email@hidden>
- Date: Wed, 25 Jan 2006 15:11:37 -0500
- Thread-topic: Controlling Zoom size
I have a Window that contains video content and I am currently using the delegate method - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize to control the resizing of the window so that the content is not shown at an incorrect aspect ratio. However, zooming the window causes the aspect ratio to become incorrect.
One person in the archives metioned using the delegate method - (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame to prevent the zoom in these cases and instead resize the window to be at a correctly aspected size for the content. However, this is not a good solution because the zoom function should toggle the window between a large size state and a pre-zoomed size state. Returning NO to cancel the zoom prevents the window from being in a zoom state and prevents a subsequent zoom from returning the window to the pre-zoom size.
Since Apple went through the thought process of adding a convienient method like windowWillResize:toSize: for situations like mine, did they not also consider what one should do in the case of Zoom?
Another alternative is to eliminate zoom entirely from my app. I hate to do that because its nice and its an expected part of the UI. On the other hand, I have to control the aspect ratio of my content and I would rather not have zoom available at all than not have it work correctly.
Is there a method or technique to address this?
Brant Sears
<<winmail.dat>>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden