5 // Created by Joseph Spiros on Sat Sep 27 2003.
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
9 #import "ITCategory-NSMenu.h"
11 @interface NSMenu (HACKHACKHACKHACK)
15 extern MenuRef _NSGetCarbonMenu( NSMenu *menu);
17 @implementation NSMenu (ITCategory)
19 - (void)indentItem:(NSMenuItem *)item {
20 [self indentItem:item toLevel:2];
23 - (void)indentItemAtIndex:(int)index {
24 [self indentItemAtIndex:index toLevel:2];
27 - (void)indentItem:(NSMenuItem *)item toLevel:(int)indentLevel {
28 [self indentItemAtIndex:[self indexOfItem:item] toLevel:indentLevel];
31 - (void)indentItemAtIndex:(int)index toLevel:(int)indentLevel {
32 MenuRef carbonMenu = [self menuRef];
35 SetMenuItemIndent(carbonMenu, index, indentLevel);
42 if( [self respondsToSelector:@selector(_menuImpl)] ) {
48 carbonMenu = _NSGetCarbonMenu(self);