|Jan 16, 2012, 06:04 PM||#6|
|Apr 16, 2012, 09:14 PM||#9|
Share secondary menu bar source code?
Any chance you could share your solution? I am rather new at cocoa development, so I could really use a comprehensive description on how you accomplished your secondary menu bar.
Possibly a code example and nib?
Thanks in advance!
|Apr 16, 2012, 10:55 PM||#10|
Well, actually, I did that using C++/Objective-C++ without any nib, for the CPPAppKit project I've been doing as an experiment. It is really quite complicated, as I created my own c++ menu classes. Initially I tried using the NSMenuItem and NSMenu classes for the drop down menus, which did work, but I didn't like the results. I wanted them to have squared corners, and also wanted the possibility of adding background color.
But basically, the menu bar and menu item are wrapped to an NSView and the drop down menu is wrapped to an NSPanel. The menu item has subviews of NSTextView. If its a menu bar item then it only has one text subview for its title, and if its a sub menu item then it has 3 text subviews, one for the check mark, one for the title and one for the hot key list. The classes do their own event handling.
The whole project is mostly C++, with minimal Objective-C++ wrappers to communicate with the AppKit framework. I don't know if the code would be of much help if you're strictly working in Cocoa Objective-C but you're certainly welcome to it.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Aperture 3.2.1 menu bar appear on fullscreen mode||vlady||Mac Applications and Mac App Store||0||Nov 24, 2011 08:57 PM|
|Account name in the menu bar||danakm||Mac OS X 10.7 Lion||9||Jul 21, 2011 07:39 AM|
|Apple Menu Bar: Mouse-over auto hide and show||zdlyons||OS X||8||Feb 27, 2011 01:51 PM|
|How can I stop mac menu bar appearing in games||polo3400||Mac and PC Games||4||Feb 17, 2011 04:31 PM|
|Screen resolution problems results in double menu bar||frannyy||MacBook||0||Nov 6, 2010 09:03 AM|
All times are GMT -5. The time now is 07:07 PM.