Re: Detecting a resize window event?
Re: Detecting a resize window event?
- Subject: Re: Detecting a resize window event?
- From: Graham Reitz <email@hidden>
- Date: Sun, 25 May 2008 20:13:31 -0500
Thanks Greg! Works great.
About the time I noticed your post I had ended up with this: (seems
to work)
- (void) drawRect: (NSRect) rect
{
NSWindow* main_window = [self window];
NSRect window_rect = [main_window frame];
NSLog(@"my_window_width=%f, my_window_height=%f",
window_rect.size.width, window_rect.size.height);
m_controller.render_scene((GLsizei)window_rect.size.width,
(GLsizei)window_rect.size.height);
[[self openGLContext] flushBuffer];
}
Is there a preferred method to do this?
-graham
On May 25, 2008, at 8:02 PM, Greg Titus wrote:
- (void)windowResized:(NSNotification *)notification;
{
NSSize size = [[self window] frame].size;
NSLog(@"window width = %f, window height = %f", size.width,
size.height);
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden