Class

NSDrawer

A user interface element that contains and displays text, scroll, and browser views, in addition to other view subclasses.

Declaration

@interface NSDrawer : NSResponder

Overview

A drawer is associated with a window, called its parent, and can appear only while its parent is visible onscreen. A drawer cannot be moved or ordered independently of a window, but is instead attached to one edge of its parent and moves along with it.

Topics

Creating Drawers

- initWithContentSize:preferredEdge:

Creates a new drawer with the given size on the specified edge of the parent window.

delegate

The receiver’s delegate.

Opening and Closing Drawers

- close

If the receiver is open, this method closes it.

- close:

An action method to close the receiver.

- open

If the receiver is closed, this method opens it.

- open:

An action method to open the drawer.

- openOnEdge:

Causes the receiver to open on the specified edge of the parent window.

- toggle:

Toggles the drawer open or closed.

state

The state of the receiver.

Managing Drawer Size

contentSize

The size of the receiver’s content area.

leadingOffset

The receiver’s leading offset.

maxContentSize

The maximum allowed size of the receiver’s content area.

minContentSize

The minimum allowed size of the receiver’s content area.

trailingOffset

The receiver’s trailing offset.

Managing Drawer Edges

edge

The edge of the window that the receiver is connected to.

preferredEdge

The receiver’s preferred, or default, edge.

Managing Drawer Views

contentView

The receiver’s content view.

parentWindow

The receiver’s parent window.

Constants

NSDrawerState

These constants specify the possible states of a drawer.

Notifications

NSDrawerDidCloseNotification

Posted whenever the drawer is closed.

NSDrawerDidOpenNotification

Posted whenever the drawer is opened.

NSDrawerWillCloseNotification

Posted whenever the drawer is about to close.

NSDrawerWillOpenNotification

Posted whenever the drawer is about to open.

Relationships

Inherits From

See Also

Drawers

NSDrawerDelegate

A set of methods that drawer delegates implement to open, close, and resize the drawer.