Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSPanel 

Inherits From:	NSWindow : NSResponder : NSObject

Conforms To:	NSCoding (NSResponder)
NSObject (NSObject)

Declared In:	AppKit/NSPanel.h 

Class Description

The NSPanel class defines objects that manage the panels of the OpenStep user interface. A panel is a window that serves an auxiliary function within an application. It generally displays controls that the user can act on to give instructions to the application or to modify the contents of a standard window.

Panels behave differently from standard windows in only a small number of ways, but the ways are important to the user interface:

·	Panels can assume key windowÐbut not main windowÐstatus. (The key window receives keyboard events. The main window is the primary focus of user actions; it might contain the document the user is working on, for example.)

·	On-screen panels are normally removed from the screen list when the user begins to work in another application, and are restored to the screen when the user returns to the panel's application.

To aid in their auxiliary role, panels can be assigned special behaviors:

·	A panel can be precluded from becoming the key window until the user makes a selection (makes some view in the panel the first responder) indicating an intention to begin typing. This prevents key window status from shifting to the panel unnecessarily.

·	Palettes and similar panels can be made to float above standard windows and other panels. This prevents them from being covered and keeps them readily available to the user.

·	A panel can be made to workÐto receive mouse and keyboard eventsÐeven when there's an attention panel on-screen. This permits actions within the panel to affect the attention panel.

Determining the Panel Behavior 

- (BOOL)becomesKeyOnlyIfNeeded	Returns whether the receiver waits to become key window.

- (BOOL)isFloatingPanel	Returns whether the receiver floats above other windows.

- (void)setBecomesKeyOnlyIfNeeded:(BOOL)flag	Sets whether the receiver waits to become key window.

- (void)setFloatingPanel:(BOOL)flag	Sets whether the receiver floats above other windows.

- (void)setWorksWhenModal:(BOOL)flag	Sets whether the receiver can operate even when an attention panel is on-screen.

- (BOOL)worksWhenModal	Returns whether the receiver can operate even when an attention panel is on-screen. The default is NO.