Checked in the Kit tester last night, but not this. Now with proper sizing. Still...
[ITKit.git] / ITStatusItem.h
1 /*
2  *      ITKit
3  *  ITStatusItem
4  *    NSStatusItem subclass which reduces suckage
5  *
6  *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
7  *   Responsibility : Matt Judy <mjudy@ithinksw.com>
8  *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
9  *
10  *  Copyright (c) 2002 iThink Software.
11  *  All Rights Reserved
12  *
13  */
14
15 /*
16  *      This subclass does 4 things to approximate NSMenuExtra's functionality:
17  *
18  *  1. Makes the status item smarter about highlighting.
19  *  2. Allows you to set an alternate (inverted) image.
20  *  3. Eliminates the pre-Jaguar shadow behind a normal status item.
21  *  4. If you use an image AND title, the text will be made slightly smaller
22  *     to resemble the visual interface of an NSMenuExtra.
23  *
24  *  Note:  In order to have the shadow not overlap the bottom of the
25  *  menubar, Apple moves the image up one pixel.  Since that shadow is
26  *  no longer drawn, please adjust your images DOWN one pixel to compensate.
27  *
28  */
29
30 #import <Cocoa/Cocoa.h>
31
32
33 @interface ITStatusItem : NSStatusItem
34 {
35 }
36
37 // Use this to create a new retained status item.
38 // It will appear in the system status bar, and
39 // default to YES for its highlightMode.
40 - (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length;
41
42 // These allow you to use an alternate (selected) image for your status item.
43 - (NSImage*) alternateImage;
44 - (void) setAlternateImage:(NSImage*)image;
45
46 @end