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

NSDrawer — Mac OS X 10.0

Synopsis

This class implements the drawer interface component. Drawers are extensions to windows that contain a content view, and can be opened and closed along one edge of a window to show and hide the contents contained within. One example of an NSDrawer is the Mailboxes drawer in Mail.app.

image with no caption

@interface NSDrawer : NSResponder
                                  // Initializers
   - (id)initWithContentSize:(NSSize)contentSize 
                                 preferredEdge:(NSRectEdge)edge;
                                  // Accessor Methods
   - (void)setPreferredEdge:(NSRectEdge)edge;
   - (NSRectEdge)preferredEdge;
   - (void)setParentWindow:(NSWindow *)parent;
   - (NSWindow *)parentWindow;
   - (void)setTrailingOffset:(float)offset;
   - (float)trailingOffset;
   - (void)setMinContentSize:(NSSize)size;
   - (NSSize)minContentSize;
   - (void)setLeadingOffset:(float)offset;
   - (float)leadingOffset;
   - (void)setMaxContentSize:(NSSize)size;
   - (NSSize)maxContentSize;
   - (void)setDelegate:(id)anObject;
   - (id)delegate;
   - (void)setContentSize:(NSSize)size;
   - (NSSize)contentSize;
   - (void)setContentView:(NSView *)aView;
   - (NSView *)contentView;
                                  // Instance Methods
   - (void)close;
   - (void)close:(id)sender;
   - (NSRectEdge)edge;
   - (void)open;
   - (void)open:(id)sender;
   - (void)openOnEdge:(NSRectEdge)edge;
   - (int)state;
   - (void)toggle:(id)sender;
                                 // Methods Implemented by the Delegate
   - (void)drawerDidClose:(NSNotification *)notification ...

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