mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
This code was using (the no longer there in the 10.7 SDK) GetPortBounds() to be able to render into a CGContextRef. It was also using the private _NSGetCarbonMenu to be able to install the menu handler (that augmented the rendering).
18 lines
283 B
Plaintext
18 lines
283 B
Plaintext
#import "NSMenu Additions.h"
|
|
|
|
@implementation NSMenu (Additions)
|
|
- (NSMenuItem*)parentMenuItem;
|
|
{
|
|
NSMenuItem* superItem = nil;
|
|
for(NSMenuItem* item in [[self supermenu] itemArray])
|
|
{
|
|
if([item submenu] == self)
|
|
{
|
|
superItem = item;
|
|
break;
|
|
}
|
|
}
|
|
return superItem;
|
|
}
|
|
@end
|