O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSStatusItem — Mac OS X 10.0

Synopsis

This class represents the objects that appear in the system status bar at the right end of the main menu bar in every application. This class provides methods to access and manage the characteristics of a status item, such as its title, icon, length, tool tip, target, action, and more. To prevent cluttering of the status bar, status items should be used sparingly and only when no better alternative exists.

image with no caption

@interface NSStatusItem : NSObject
                                  // Instance Methods
   - (SEL)action;
   - (NSAttributedString*)attributedTitle;
   - (BOOL)highlightMode;
   - (NSImage*)image;
   - (BOOL)isEnabled;
   - (float)length;
   - (NSMenu*)menu;
   - (void)sendActionOn:(int)mask;
   - (void)setAction:(SEL)action;
   - (void)setAttributedTitle:(NSAttributedString*)title;
   - (void)setEnabled:(BOOL)enabled;
   - (void)setHighlightMode:(BOOL)highlightMode;
   - (void)setImage:(NSImage*)image;
   - (void)setLength:(float)length;
   - (void)setMenu:(NSMenu*)menu;
   - (void)setTarget:(id)target;
   - (void)setTitle:(NSString*)title;
   - (void)setToolTip:(NSString*)toolTip;
   - (void)setView:(NSView*)view;
   - (NSStatusBar*)statusBar;
   - (id)target;
   - (NSString*)title;
   - (NSString*)toolTip;
   - (NSView*)view;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required