Up
Authors
- Douglas Simons (
doug.simons@testplant.com)
-
- Gregory Casamento (
greg_casamento@yahoo.com)
-
- Fred Kiefer (
FredKiefer@gmx.de)
-
Date: Generated at 2025-12-03
The drawer class
Copyright: (C) 2001 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSDrawer.h
Availability: OpenStep
Description forthcoming.
NSDrawer declares 10 Instance Variables
- (void)
close;
Availability: OpenStep
Closes the drawer with default animation. If the
drawer is already closed or closing, this method has
no effect.
- (void)
close: (id)sender;
Availability: OpenStep
Closes the drawer in response to user action.
sender: The object that initiated the close action
(typically a control)
- (
NSSize)
contentSize;
Availability: OpenStep
Returns the current content size of the drawer.
Returns: NSSize representing the drawer's content
dimensions
- (
NSView*)
contentView;
Availability: OpenStep
Returns the drawer's content view. The content view
contains all the drawer's visible content and
controls. Returns: The NSView serving as the
drawer's content container
- (id)
delegate;
Availability: OpenStep
Returns the drawer's delegate object. Returns: The
object serving as the drawer's delegate, or
nil if none is set
- (
NSRectEdge)
edge;
Availability: OpenStep
Returns the window edge where the drawer is
currently attached. Returns: NSRectEdge
indicating the current attachment edge
- (id)
initWithContentSize: (
NSSize)contentSize
preferredEdge: (
NSRectEdge)edge;
Availability: OpenStep
Initializes a drawer with specified content
size and preferred edge. contentSize: The
initial size of the drawer's content area edge: The
preferred window edge for drawer
attachment (NSMinXEdge, NSMaxXEdge, NSMinYEdge,
NSMaxYEdge) Returns: An initialized NSDrawer
instance
- (CGFloat)
leadingOffset;
Availability: OpenStep
Returns the leading offset along the window edge.
The leading offset determines spacing from the edge
start to drawer start. Returns: The leading offset in
points
- (
NSSize)
maxContentSize;
Availability: OpenStep
Returns the maximum allowed content size for the
drawer. Returns: NSSize representing maximum width
and height constraints
- (
NSSize)
minContentSize;
Availability: OpenStep
Returns the minimum allowed content size for the
drawer. Returns: NSSize representing minimum width
and height constraints
- (void)
open;
Availability: OpenStep
Opens the drawer with default animation on the
preferred edge. If the drawer is already open or
opening, this method has no effect.
- (void)
open: (id)sender;
Availability: OpenStep
Opens the drawer in response to user action. sender:
The object that initiated the open action (typically a
control)
- (void)
openOnEdge: (
NSRectEdge)edge;
Availability: OpenStep
Opens the drawer on a specific edge of the
parent window. edge: The window edge on
which to open the drawer
- (
NSWindow*)
parentWindow;
Availability: OpenStep
Returns the parent window to which the drawer is
attached. Returns: The NSWindow that owns this
drawer, or nil if not attached
- (
NSRectEdge)
preferredEdge;
Availability: OpenStep
Returns the preferred edge for drawer attachment.
Returns: NSRectEdge indicating the preferred
attachment edge
- (void)
setContentSize: (
NSSize)size;
Availability: OpenStep
Sets the content size of the drawer. size:
The new content size (will be constrained by
min/max limits)
- (void)
setContentView: (
NSView*)aView;
Availability: OpenStep
Sets the drawer's content view. aView: The NSView to
use as the drawer's content container
- (void)
setDelegate: (id)anObject;
Availability: OpenStep
Sets the drawer's delegate object. anObject: The
object to serve as the drawer's delegate (should
implement NSDrawerDelegate methods)
- (void)
setLeadingOffset: (CGFloat)offset;
Availability: OpenStep
Sets the leading offset along the window
edge. offset: The leading offset in points
from the edge start
- (void)
setMaxContentSize: (
NSSize)size;
Availability: OpenStep
Sets the maximum allowed content size for
the drawer. size: The maximum size
constraints for width and height
- (void)
setMinContentSize: (
NSSize)size;
Availability: OpenStep
Sets the minimum allowed content size for
the drawer. size: The minimum size
constraints for width and height
- (void)
setParentWindow: (
NSWindow*)parent;
Availability: OpenStep
Sets the parent window for drawer
attachment. parent: The NSWindow to which this
drawer should be attached
- (void)
setPreferredEdge: (
NSRectEdge)preferredEdge;
Availability: OpenStep
Sets the preferred edge for drawer attachment.
preferredEdge: The window edge where the
drawer should preferentially attach
- (void)
setTrailingOffset: (CGFloat)offset;
Availability: OpenStep
Sets the trailing offset along the window
edge. offset: The trailing offset in
points from the edge end
- (
NSInteger)
state;
Availability: OpenStep
Returns the current state of the drawer. Returns:
NSInteger representing the drawer state (closed,
opening, open, closing)
- (void)
toggle: (id)sender;
Availability: OpenStep
Toggles the drawer state between open and closed.
sender: The object that initiated the toggle action
(typically a control)
- (CGFloat)
trailingOffset;
Availability: OpenStep
Returns the trailing offset along the window edge.
The trailing offset determines spacing from drawer end
to edge end. Returns: The trailing offset in points
Instance Variables for NSDrawer Class
@protected NSSize
_contentSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSRectEdge
_currentEdge;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id
_delegate;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id
_drawerWindow;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected CGFloat
_leadingOffset;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize
_maxContentSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize
_minContentSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSRectEdge
_preferredEdge;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSInteger
_state;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected CGFloat
_trailingOffset;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- AppKit/NSDrawer.h
Availability: OpenStep
The NSDrawerDelegate protocol defines methods that a
delegate object can implement to control drawer
behavior and respond to state changes. Delegate
methods provide fine-grained control over
opening/closing operations and content
resizing.
- (void)
drawerDidClose: (
NSNotification*)notification;
Availability: OpenStep
Notifies the delegate that the drawer has finished
closing. notification: NSNotification containing
drawer information
- (void)
drawerDidOpen: (
NSNotification*)notification;
Availability: OpenStep
Notifies the delegate that the drawer has finished
opening. notification: NSNotification containing
drawer information
- (BOOL)
drawerShouldClose: (
NSDrawer*)sender;
Availability: OpenStep
Asks the delegate whether the drawer should close.
sender: The drawer requesting to close Returns:
YES to allow closing, NO
to prevent it
- (BOOL)
drawerShouldOpen: (
NSDrawer*)sender;
Availability: OpenStep
Asks the delegate whether the drawer should open.
sender: The drawer requesting to open Returns:
YES to allow opening, NO
to prevent it
- (void)
drawerWillClose: (
NSNotification*)notification;
Availability: OpenStep
Notifies the delegate that the drawer is about to
close. notification: NSNotification containing
drawer information
- (void)
drawerWillOpen: (
NSNotification*)notification;
Availability: OpenStep
Notifies the delegate that the drawer is about to
open. notification: NSNotification containing drawer
information
- (
NSSize)
drawerWillResizeContents: (
NSDrawer*)sender
toSize: (
NSSize)contentSize;
Availability: OpenStep
Allows the delegate to modify the drawer's content
size during resizing. sender: The drawer being resized
contentSize: The proposed new content size
Returns: The actual content size to use (may be
different from proposed)
Up