Re: What's the replacement for GetMBarHeight?
Re: What's the replacement for GetMBarHeight?
- Subject: Re: What's the replacement for GetMBarHeight?
- From: Steve Christensen <email@hidden>
- Date: Sat, 9 Feb 2008 07:38:53 -0800
On Feb 8, 2008, at 7:05 PM, Brian Arnold wrote:
The Xcode 3 OSX 10.5 documentation for GetMBarHeight fails to
explain what should be called in its place, or that it's not
available 64-bit. I need to avoid putting windows where they
shouldn't be, and my code is being called from code that isn't pure
Cocoa, but I can call Cocoa from where I can figure this out. What
do I call?
Please point me in the right direction, thanks,
How about something like [[NSScreen mainScreen] visibleFrame]?
To paraphrase the docs: -[visibleFrame] returns a rectangle
containing current location and dimensions of the visible screen.
This is the rectangle defining the portion of the screen in which it
is currently safe to draw your application content based on the
current user-interface settings and does not include the area
currently occupied by the dock and menu bar. Because it is based on
the current user -interface settings, the returned rectangle can
change between calls and should not be cached.
To be 100% correct, you could iterate over all the screens, for those
folks with more than one screen.
steve
_______________________________________________
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