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

NSPanel — Mac OS X 10.0

Synopsis

This subclass extends the functionality of NSWindow that is useful for auxiliary and utility windows. In particular, panels are different from windows in several key ways. First, NSPanels adopt the behavior that by default the panel will hide itself when its application becomes inactive. Second, NSPanels are capable of becoming key windows, but they may never have main window status. Additionally, NSPanel object can be made to float above all other windows, making their contents easily accessible when other windows are in front.

image with no caption

@interface NSPanel : NSWindow
                                  // Accessor Methods
   - (void)setFloatingPanel:(BOOL)flag;
   - (void)setBecomesKeyOnlyIfNeeded:(BOOL)flag;
   - (BOOL)becomesKeyOnlyIfNeeded;
   - (void)setWorksWhenModal:(BOOL)flag;
   - (BOOL)worksWhenModal;
                                  // Instance Methods
   - (BOOL)isFloatingPanel;

Subclasses

NSColorPanel, NSFontPanel, NSSavePanel

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