X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/4f3da8543caacbaf1ce219e547e24a5490bee090..3263678eef57c78d7017185eaa2efb9e644c7f29:/ITStatusItem.h?ds=sidebyside diff --git a/ITStatusItem.h b/ITStatusItem.h old mode 100755 new mode 100644 index fb381e0..7085c78 --- a/ITStatusItem.h +++ b/ITStatusItem.h @@ -1,49 +1,35 @@ /* * ITKit - * ITStatusItem - * NSStatusItem subclass which reduces suckage + * ITStatusItem.h * - * Original Author : Joseph Spiros - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * NSStatusItem subclass which attempts to approximate NSMenuExtra's + * appearance and functionality. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - */ - -/* - * This subclass does 4 things to approximate NSMenuExtra's functionality: - * - * 1. Makes the status item smarter about highlighting. - * 2. Allows you to set an alternate (inverted) image. - * 3. Eliminates the pre-Jaguar shadow behind a normal status item. - * 4. If you use an image AND title, the text will be made slightly smaller - * to resemble the visual interface of an NSMenuExtra. - * - * Note: In order to have the shadow not overlap the bottom of the - * menubar, Apple moves the image up one pixel. Since that shadow is - * no longer drawn, please adjust your images DOWN one pixel to compensate. + * $Id$ * */ - #import +@class ITStatusItem; + +@protocol ITStatusItemMenuProvider +- (NSMenu *)menuForStatusItem:(ITStatusItem *)statusItem; +@end -@interface ITStatusItem : NSStatusItem -{ +@interface ITStatusItem : NSStatusItem { + id _menuProvider; } -// Use this to create a new retained status item. -// It will appear in the system status bar, and -// default to YES for its highlightMode. -- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length; +- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length; -// These allow you to use an alternate (selected) image for your status item. -- (NSImage*) alternateImage; -- (void) setAlternateImage:(NSImage*)image; +- (NSImage *)alternateImage; +- (void)setAlternateImage:(NSImage *)image; +- (id )menuProvider; +- (void)setMenuProvider:(id )provider; -@end +@end \ No newline at end of file