self = [super initWithIdentifier: identifier];
emacsView = view;
- [self setDisplayMode: NSTabbarDisplayModeIconOnly];
- [self setSizeMode: NSTabbarSizeModeSmall];
+ [self setDisplayMode: NSToolbarDisplayModeIconOnly];
+ [self setSizeMode: NSToolbarSizeModeSmall];
[self setDelegate: self];
identifierToItem = [[NSMutableDictionary alloc] initWithCapacity: 10];
activeIdentifiers = [[NSMutableArray alloc] initWithCapacity: 8];
[activeIdentifiers addObject: identifier];
/* 2) create / reuse item */
- NSTabbarItem *item = [identifierToItem objectForKey: identifier];
+ NSToolbarItem *item = [identifierToItem objectForKey: identifier];
if (item == nil)
{
- item = [[[NSTabbarItem alloc] initWithItemIdentifier: identifier]
+ item = [[[NSToolbarItem alloc] initWithItemIdentifier: identifier]
autorelease];
[item setImage: img];
[item setTabTip: [NSString stringWithUTF8String: help]];
/* delegate methods */
-- (NSTabbarItem *)tabbar: (NSTabbar *)tabbar
+- (NSToolbarItem *)tabbar: (NSToolbar *)tabbar
itemForItemIdentifier: (NSString *)itemIdentifier
willBeInsertedIntoTabbar: (BOOL)flag
{
NSTRACE ("[EmacsTabbar tabbar: ...]");
- /* Look up NSTabbarItem by identifier and return... */
+ /* Look up NSToolbarItem by identifier and return... */
return [identifierToItem objectForKey: itemIdentifier];
}
-- (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar
+- (NSArray *)tabbarDefaultItemIdentifiers: (NSToolbar *)tabbar
{
NSTRACE ("[EmacsTabbar tabbarDefaultItemIdentifiers:]");
}
/* for configuration palette (not yet supported) */
-- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar
+- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar
{
NSTRACE ("[EmacsTabbar tabbarAllowedItemIdentifiers:]");
/* optional and unneeded */
/* - tabbarWillAddItem: (NSNotification *)notification { } */
/* - tabbarDidRemoveItem: (NSNotification *)notification { } */
-/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSTabbar *)tabbar */
+/* - (NSArray *)tabbarSelectableItemIdentifiers: (NSToolbar *)tabbar */
@end /* EmacsTabbar */
@class EmacsImage;
#ifdef NS_IMPL_COCOA
-@interface EmacsTabbar : NSTabbar <NSTabbarDelegate>
+@interface EmacsTabbar : NSToolbar <NSToolbarDelegate>
#else
-@interface EmacsTabbar : NSTabbar
+@interface EmacsTabbar : NSToolbar
#endif
{
EmacsView *emacsView;
enabled: (BOOL)enabled;
/* delegate methods */
-- (NSTabbarItem *)tabbar: (NSTabbar *)tabbar
+- (NSToolbarItem *)tabbar: (NSToolbar *)tabbar
itemForItemIdentifier: (NSString *)itemIdentifier
willBeInsertedIntoTabbar: (BOOL)flag;
-- (NSArray *)tabbarDefaultItemIdentifiers: (NSTabbar *)tabbar;
-- (NSArray *)tabbarAllowedItemIdentifiers: (NSTabbar *)tabbar;
+- (NSArray *)tabbarDefaultItemIdentifiers: (NSToolbar *)tabbar;
+- (NSArray *)tabbarAllowedItemIdentifiers: (NSToolbar *)tabbar;
@end
{
// Fix reappearing tool bar or tab bar in fullscreen for Mac OS X 10.7
BOOL tarbar_visible = FRAME_EXTERNAL_TAB_BAR (f) ? YES : NO;
- NSTabbar *tabbar = [FRAME_NS_VIEW (f) tabbar];
+ NSToolbar *tabbar = [FRAME_NS_VIEW (f) tabbar];
if (! tarbar_visible != ! [tabbar isVisible])
[tabbar setVisible: tarbar_visible];
BOOL toolbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO;
#ifdef NS_IMPL_COCOA
{
NSButton *toggleButton;
- toggleButton = [window standardWindowButton: NSWindowTabbarButton];
+ toggleButton = [window standardWindowButton: NSWindowToolbarButton];
[toggleButton setTarget: self];
[toggleButton setAction: @selector (toggleTabbar: )];
}