Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How the menubar works?

How the menubar works?
Thread Tools
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Mar 5, 2004, 03:04 PM
 
Alright my question is a high level one here... How does every window regardless of application type know where the menubar is... Basically how would the system broadcast that? Any takers? Any ideas?
     
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status: Offline
Reply With Quote
Mar 5, 2004, 04:49 PM
 
Isn't the menu bar always at the top of the screen?
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Mar 5, 2004, 05:42 PM
 
Originally posted by itai195:
Isn't the menu bar always at the top of the screen?
Yes, but programs generally don't have much of a conception of "top of the screen". There's something it does that makes it accessible to all programs (or else each has their own menubar, which I think is the case, based on watching what happens with themeing programs)
     
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status: Offline
Reply With Quote
Mar 5, 2004, 06:31 PM
 
Originally posted by Catfish_Man:
Yes, but programs generally don't have much of a conception of "top of the screen". There's something it does that makes it accessible to all programs (or else each has their own menubar, which I think is the case, based on watching what happens with themeing programs)
They have an instance of NSMenu attached to their NSApplication's mainMenu outlet, if that's what you're getting at. They don't know where the menu bar is, they just respond to menu events.
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Mar 5, 2004, 06:36 PM
 
basically I am wanting to know how the system handles the menubar because if you could reproduce it, you could write applications that all other windows are aware off, and will not zoom or be opened behind it, with out having to use the CGSSetDockRect..

So I am just trying to get an understanding how the system creates that space that apps and windows do go beyond
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Mar 5, 2004, 07:04 PM
 
It's an implementation detail you shouldn't concern yourself with. What you're trying to do is bad. Very, very bad.
     
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status: Offline
Reply With Quote
Mar 5, 2004, 08:19 PM
 
yea, but that never stopped me before "in any aspect of life"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2