|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|
|Some icons missing on Desktop Menu Bar, Safari Menu Bar and Finder Menu Bar||chroniceater||MacBook Air||8||Dec 5, 2014 07:45 PM|
|Is is possible to disable/hide menu bar? (Finder Menu Bar)||zedchigo||MacBook Pro||3||Oct 7, 2014 04:33 PM|
|'Hue Menu' Controls Philips Hue Lights From the Mac Menu Bar||MacRumors||Mac Blog Discussion||23||May 29, 2014 08:15 PM|
|Secondary-click menu issues (10.9.2. bug)||Praetorian®||OS X Mavericks (10.9)||6||Feb 26, 2014 03:01 PM|
|Open Window in Secondary Monitor By Default||Blakeasd||OS X Mavericks (10.9)||3||Oct 23, 2013 11:21 PM|
All times are GMT -5. The time now is 04:56 AM.