• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting a resize window event?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Detecting a resize window event? (From: Graham Reitz <email@hidden>)
 >Re: Detecting a resize window event? (From: Scott Andrew <email@hidden>)
 >Re: Detecting a resize window event? (From: Graham Reitz <email@hidden>)
 >Re: Detecting a resize window event? (From: Greg Titus <email@hidden>)

  • Prev by Date: Re: Detecting a resize window event?
  • Next by Date: CoreData
  • Previous by thread: Re: Detecting a resize window event?
  • Next by thread: Re: Detecting a resize window event?
  • Index(es):
    • Date
    • Thread