Removing the use of private CoreGraphics APIs to draw shadows, and replacing with...
[ITKit.git] / ITStatusItem.h
old mode 100755 (executable)
new mode 100644 (file)
index d8dcf51..627a380
@@ -1,45 +1,33 @@
 /*
  *     ITKit
- *  ITStatusItem
- *    NSStatusItem subclass which reduces suckage
+ *     ITStatusItem.h
  *
- *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- *   Responsibility : Matt Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     NSStatusItem subclass which attempts to approximate NSMenuExtra's
+ *             appearance and functionality.
  *
- *  Copyright (c) 2002 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 suck, Apple moves the
- *         image up one pixel.  We have chosen not to address this
- *         here, so please adjust your images DOWN one pixel to
- *         compensate for this.
+ *     Copyright (c) 2005 iThink Software
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
+@class ITStatusItem;
+
+@protocol ITStatusItemMenuProvider
+- (NSMenu *)menuForStatusItem:(ITStatusItem *)statusItem;
+@end
 
-@interface ITStatusItem : NSStatusItem
-{
+@interface ITStatusItem : NSStatusItem {
+       id <ITStatusItemMenuProvider> _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 <ITStatusItemMenuProvider>)menuProvider;
+- (void)setMenuProvider:(id <ITStatusItemMenuProvider>)provider;
+
+@end
\ No newline at end of file