Class CPPanel

CPObject
    extended byCPResponder
        extended byCPWindow
            extended byCPPanel
Direct Known Subclasses:
CPColorPanel, _CPMenuBarWindow

@implementation CPPanel : CPWindow

The CPPanel class defines objects that manage the panels of the Cappuccino 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:

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


Method Summary
-(BOOL)becomesKeyOnlyIfNeeded
          Returns YES if the window only becomes key if needed.
-(BOOL)canBecomeMainWindow
          Returns YES if the window can become the main window.
-(BOOL)isFloatingPanel
          Returns YES if the receiver is a floating panel (like a palette).
-(void)setBecomesKeyOnlyIfNeeded:(BOOL)shouldBecomeKeyOnlyIfNeeded
          Sets whether the the window becomes key only if needed.
-(void)setFloatingPanel:(BOOL)isFloatingPanel
          Sets the receiver to be a floating panel.
-(void)setWorksWhenModal:(BOOL)shouldWorkWhenModal
          Sets whether this window can receive input while another window is running modally.
-(BOOL)worksWhenModal
          Returns YES if the receiver is able to receive input events even when a modal session is active.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass

Methods inherited from class CPResponder
acceptsFirstResponder, becomeFirstResponder, deleteBackward, doCommandBySelector, insertLineBreak, insertText, interpretKeyEvents, keyDown, keyUp, menu, mouseDown, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseUp, nextResponder, noResponderFor, performKeyEquivalent, resignFirstResponder, scrollWheel, setMenu, setNextResponder, tryToPerform, undoManager

Methods inherited from class CPWindow
frameRectForContentRect, initWithContentRect, acceptsFirstResponder, acceptsMouseMovedEvents, attachedSheet, backgroundColor, becomeKeyWindow, becomeMainWindow, canBecomeKeyWindow, canBecomeMainWindow, center, close, contentRectForFrameRect, contentView, delegate, doCommandBySelector, dragImage, dragView, firstResponder, frame, frameRectForContentRect, hasShadow, isDocumentEdited, isDocumentSaving, isKeyWindow, isMainWindow, isMovableByWindowBackground, isSheet, isVisible, level, makeFirstResponder, makeKeyAndOrderFront, makeKeyWindow, makeMainWindow, maxSize, minSize, orderFront, orderOut, orderWindow, performClose, representedFilename, representedURL, resignKeyWindow, resignMainWindow, resizeIndicatorOffset, sendEvent, setAcceptsMouseMovedEvents, setBackgroundColor, setContentView, setDelegate, setDocumentEdited, setDocumentSaving, setFrame, setFrameOrigin, setFrameSize, setFrame, setHasShadow, setLevel, setMaxSize, setMinSize, setMovableByWindowBackground, setRepresentedFilename, setRepresentedURL, setResizeIndicatorOffset, setShowsResizeIndicator, setTitle, setTitleWithRepresentedFilename, setToolbar, setWindowController, showsResizeIndicator, styleMask, title, toolbar, windowController, windowNumber, worksWhenModal


Method Detail

becomesKeyOnlyIfNeeded

-(BOOL)becomesKeyOnlyIfNeeded
Returns YES if the window only becomes key if needed. NO means it behaves just like other windows.

canBecomeMainWindow

-(BOOL)canBecomeMainWindow
Returns YES if the window can become the main window.

isFloatingPanel

-(BOOL)isFloatingPanel
Returns YES if the receiver is a floating panel (like a palette).

setBecomesKeyOnlyIfNeeded

-(void)setBecomesKeyOnlyIfNeeded:(BOOL)shouldBecomeKeyOnlyIfNeeded
Sets whether the the window becomes key only if needed.
Parameters:
shouldBecomeKeyOnlyIfNeeded - YES makes the window become key only if needed

setFloatingPanel

-(void)setFloatingPanel:(BOOL)isFloatingPanel
Sets the receiver to be a floating panel. YES makes the window a floating panel. NO makes it a normal window.
Parameters:
isFloatingPanel - specifies whether to make it floating

setWorksWhenModal

-(void)setWorksWhenModal:(BOOL)shouldWorkWhenModal
Sets whether this window can receive input while another window is running modally.
Parameters:
shouldWorkWhenModal - whether to receive input while another window is modal

worksWhenModal

-(BOOL)worksWhenModal
Returns YES if the receiver is able to receive input events even when a modal session is active.

Created on Sat Sep 13 14:15:43 PDT 2008