NSDrawer

NSDrawer Mac OS X 10.0

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.

figs/cocn_1528.gif

@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;
   - (void)drawerDidOpen:(NSNotification *)notification;
   - (BOOL)drawerShouldClose:(NSDrawer *)sender;
   - (BOOL)drawerShouldOpen:(NSDrawer *)sender;
   - (void)drawerWillClose:(NSNotification *)notification;
   - (void)drawerWillOpen:(NSNotification *)notification;
   - (NSSize)drawerWillResizeContents:(NSDrawer *)sender toSize:(NSSize)contentSize;
// Notifications
   NSDrawerDidCloseNotification;
   NSDrawerDidOpenNotification;
   NSDrawerWillCloseNotification;
   NSDrawerWillOpenNotification;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes