X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/671a785b0d869478451bc428ac4e4bf3415253b4..51a18ac1bb037b0c32f5f30f5a0436ff61b64f21:/ITStatusItem.h?ds=inline diff --git a/ITStatusItem.h b/ITStatusItem.h index 904e962..4116107 100755 --- a/ITStatusItem.h +++ b/ITStatusItem.h @@ -1,18 +1,49 @@ -// -// ITStatusItem.h -// iThinkAppKit -// -// Created by Joseph Spiros on Fri Dec 06 2002. -// Copyright (c) 2002 iThink Software. All rights reserved. -// +/* + * ITKit + * ITStatusItem + * NSStatusItem subclass which reduces suckage + * + * Original Author : Joseph Spiros + * Original Author : Matt Judy + * Responsibility : Matt Judy + * Responsibility : Joseph Spiros + * + * Copyright (c) 2002 - 2003 iThink Software. + * All Rights Reserved + * + */ -#import +/* + * 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. + * + */ -@interface ITStatusItem : NSStatusItem { - NSStatusItem *statusItem; +#import + + +@interface ITStatusItem : NSStatusItem +{ } -- (NSStatusItem*) statusItem; + +// 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; + +// These allow you to use an alternate (selected) image for your status item. - (NSImage*) alternateImage; - (void) setAlternateImage:(NSImage*)image; + + @end