X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/d0e66fbe1f06a4d9d5e59af2ae88df02287fa72f..490cbda59abb52af3c07957ebc50f337799d6bf3:/ITStatusItem.h?ds=sidebyside diff --git a/ITStatusItem.h b/ITStatusItem.h old mode 100755 new mode 100644 index 9e01155..4ed0643 --- a/ITStatusItem.h +++ b/ITStatusItem.h @@ -1,44 +1,36 @@ /* * ITKit - * ITStatusItem - * NSStatusItem subclass which reduces suckage + * ITStatusItem.h * - * Original Author : Joseph Spiros - * Responsibility : Matt Judy - * Responsibility : Joseph Spiros + * NSStatusItem subclass which attempts to approximate NSMenuExtra's + * appearance and functionality. * - * Copyright (c) 2002 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - */ - -/* - * This subclass does 3 things: - * - * 1. Makes the status item smarter about highlighting. - * 2. Allows you to set an inverted (alternate) image. - * 3. Eliminates the ugly shadow behind a normal status item. - * - * 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; -@interface ITStatusItem : NSStatusItem -{ +@protocol ITStatusItemMenuProvider +- (NSMenu *)menuForStatusItem:(ITStatusItem *)statusItem; +@end + +@interface ITStatusItem : NSStatusItem { + id _menuProvider; + NSMenu *_menuProxy; } -// 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; -@end +- (id )menuProvider; +- (void)setMenuProvider:(id )provider; + +@end \ No newline at end of file