Up
Authors
- Scott Christley (
scottc@net-community.com
)
-
- Felipe A. Rodriguez (
far@ix.netcom.com
)
-
- Richard Frith-Macdonald (
richard@brainstorm.co.uk
)
-
The window class
Copyright: (C) 1996-2015 Free Software Foundation, Inc.
Instances of the NSWindow class handle on-screen
windows, their associated NSViews, and events generate
by the user. An NSWindow's size is defined by its frame
rectangle, which encompasses its entire structure,
and its content rectangle, which includes only the content.
Every NSWindow has a content view, the NSView which forms
the root of the window's view hierarchy. This view can be
set using the setContentView:
method, and
accessed through the contentView
method.
setContentView:
replaces the default
content view created by NSWindow.
Other views may be added to the window by using the
content view's addSubview:
method. These
subviews can also have subviews added, forming a tree
structure, the view hierarchy. When an NSWindow must
display itself, it causes this hierarchy to draw
itself. Leaf nodes in the view hierarchy are drawn
last, causing them to potentially obscure views further
up in the hierarchy.
A delegate can be specified for an NSWindow, which will
receive notifications of events pertaining to the
window. The delegate is set using
setDelegate:
, and can be retrieved using
delegate
. The delegate can restrain
resizing by implementing the
windowWillResize: toSize:
method, or
control the closing of the window by implementing
windowShouldClose:
.
- Declared in:
- AppKit/NSWindow.h
- Conforms to:
- NSCoding
Availability: OpenStep
An NSWindow instance represents a window, panel or menu
on the screen.
Each window has a style, which
determines how the window is decorated: ie
whether it has a border, a title bar, a resize bar,
minimise and close buttons.
A window has a frame. This is the frame of the
entire window on the screen, including all
decorations and borders. The origin of the
frame represents its bottom left corner and the frame
is expressed in screen coordinates (see
NSScreen
).
When a window is created, it has a private
NSView
instance which fills the entire window frame
and whose coordinate system is the same as the base
coordinate system of the window (ie zero x
and y coordinates are at the bottom left corner of
the window, with increasing x and y corresponding
to points to the right and above the origin).
This view may be used by the library internals
(and theme engines) to draw window decorations if
the backend library is not handling the window
decorations.
A window always contains a content view
which is the highest level view available for
public (application) use. This view fills the
area of the window inside any decoration/border.
This is the only part of the window that
application programmers are allowed to draw
in directly.
You can convert between view coordinates and window
base coordinates using the
[NSView -convertPoint:fromView:]
, [NSView -convertPoint:toView:]
, [NSView -convertRect:fromView:]
, and [NSView -convertRect:toView:]
methods with a nil
view argument.
You can convert between window and screen coordinates using the -convertBaseToScreen:
and -convertScreenToBase:
methods.
Instance Variables
Method summary
+ (
NSRect)
contentRectForFrameRect: (
NSRect)aRect
styleMask: (
NSUInteger)aStyle;
Availability: OpenStep
Returns the rectangle which would be used for the
content view of a window whose on-screen size and
position is specified by aRect and
which is decorated with the border and title etc
given by aStyle.
Both rectangles
are expressed in screen coordinates.
+ (
NSWindowDepth)
defaultDepthLimit;
Availability: OpenStep
Description forthcoming.
+ (
NSRect)
frameRectForContentRect: (
NSRect)aRect
styleMask: (
NSUInteger)aStyle;
Availability: OpenStep
Returns the rectangle which would be used for the
on-screen frame of a window if that window had a
content view occupying the rectangle
aRect and was decorated with the border
and title etc given by aStyle.
Both
rectangles are expressed in screen coordinates.
+ (void)
menuChanged: (
NSMenu*)aMenu;
Availability: MacOS-X 10.0.0
Description forthcoming.
+ (
CGFloat)
minFrameWidthWithTitle: (
NSString*)aTitle
styleMask: (
NSUInteger)aStyle;
Availability: OpenStep
Returns the smallest frame width that will fit the
given title and style. This is the on-screen width of
the window including decorations.
+ (void)
removeFrameUsingName: (
NSString*)name;
Availability: OpenStep
Description forthcoming.
- (BOOL)
acceptsMouseMovedEvents;
Availability: OpenStep
Description forthcoming.
- (BOOL)
allowsToolTipsWhenApplicationIsInactive;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
CGFloat)
alphaValue;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSTimeInterval)
animationResizeTime: (
NSRect)newFrame;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
areCursorRectsEnabled;
Availability: OpenStep
Description forthcoming.
- (
NSSize)
aspectRatio;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
autorecalculatesKeyViewLoop;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSColor*)
backgroundColor;
Availability: OpenStep
Description forthcoming.
- (void)
becomeKeyWindow;
Availability: OpenStep
Description forthcoming.
- (void)
becomeMainWindow;
Availability: OpenStep
Description forthcoming.
- (void)
cacheImageInRect: (
NSRect)aRect;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
canBecomeKeyWindow;
Availability: OpenStep
Returns YES
if the receiver can be
made key. If this method returns NO
, the
window will not be made key. This implementation
returns YES
if the window is resizable
or has a title bar. You can override this method to
change it's behavior
- (BOOL)
canBecomeMainWindow;
Availability: OpenStep
Returns YES
if the receiver can be the
main window. If this method returns NO
,
the window will not become the main window. This
implementation returns YES
if
the window is resizable or has a title bar and is
visible and is not an NSPanel. You can override
this method to change it's behavior
- (BOOL)
canHide;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
canStoreColor;
Availability: OpenStep
Description forthcoming.
- (
NSPoint)
cascadeTopLeftFromPoint: (
NSPoint)topLeftPoint;
Availability: OpenStep
Positions the receiver at topLeftPoint
(or if topLeftPoint is NSZeroPoint, leaves
the receiver unmoved except for any necessary
constraint to fit on screen).
Returns the
position of the top left corner of the receivers
content view (after repositioning), so that another
window cascaded at the returned point will not
obscure the title bar of the receiver.
- (void)
center;
Availability: OpenStep
Description forthcoming.
- (
NSArray*)
childWindows;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (void)
close;
Availability: OpenStep
Description forthcoming.
- (
NSRect)
constrainFrameRect: (
NSRect)frameRect
toScreen: (
NSScreen*)screen;
Availability: OpenStep
Given a proposed frame rectangle, return a modified
version which will fit inside the screen
.
- (
NSSize)
contentAspectRatio;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSSize)
contentMaxSize;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSSize)
contentMinSize;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSRect)
contentRectForFrameRect: (
NSRect)frameRect;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSSize)
contentResizeIncrements;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (id)
contentView;
Availability: OpenStep
Description forthcoming.
- (
NSPoint)
convertBaseToScreen: (
NSPoint)aPoint;
Availability: OpenStep
Converts aPoint from the base
coordinate system of the receiver to a point in
the screen coordinate system.
Convert from a
point in the base coordinate system for the window to
a point in the screen coordinate system.
- (
NSRect)
convertRectFromScreen: (
NSRect)aRect;
Availability: OpenStep
Converts aRect from the coordinate
system of the screen to the coordinate system of the
window.
- (
NSRect)
convertRectToScreen: (
NSRect)aRect;
Availability: OpenStep
Converts aRect from the window
coordinate system to a rect in the screen
coordinate system.
- (
NSPoint)
convertScreenToBase: (
NSPoint)aPoint;
Availability: OpenStep
Converts aPoint from the screen
coordinate system to a point in the base
coordinate system of the receiver.
Convert from a point in the screen coordinate
system to a point in the screen coordinate system of
the receiver.
- (
NSWindow*)
counterpart;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (
NSEvent*)
currentEvent;
Availability: OpenStep
Description forthcoming.
- (
NSData*)
dataWithEPSInsideRect: (
NSRect)rect;
Availability: OpenStep
Description forthcoming.
- (
NSData*)
dataWithPDFInsideRect: (
NSRect)aRect;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSScreen*)
deepestScreen;
Availability: OpenStep
Returns the screen the window is on. Unlike
(apparently) OpenStep and MacOSX, GNUstep does
not support windows being split across multiple screens
- (
NSButtonCell*)
defaultButtonCell;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (id)
delegate;
Availability: OpenStep
Returns the delegate.
- (void)
deminiaturize: (id)sender;
Availability: OpenStep
Causes the window to deminiaturize. Normally you
would not call this method directly. A window is
automatically deminiaturized by the user via
a mouse click event. Does nothing it the window isn't
miniaturized.
- (
NSWindowDepth)
depthLimit;
Availability: OpenStep
Description forthcoming.
- (
NSDictionary*)
deviceDescription;
Availability: OpenStep
Description forthcoming.
- (void)
disableCursorRects;
Availability: OpenStep
Description forthcoming.
- (void)
disableFlushWindow;
Availability: OpenStep
Description forthcoming.
- (void)
disableKeyEquivalentForDefaultButtonCell;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
discardCachedImage;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
discardCursorRects;
Availability: OpenStep
Description forthcoming.
- (void)
discardEventsMatchingMask: (
NSUInteger)mask
beforeEvent: (
NSEvent*)lastEvent;
Availability: OpenStep
Description forthcoming.
- (void)
display;
Availability: OpenStep
Description forthcoming.
- (void)
displayIfNeeded;
Availability: OpenStep
Description forthcoming.
- (BOOL)
displaysWhenScreenProfileChanges;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
dragImage: (
NSImage*)anImage
at: (
NSPoint)baseLocation
offset: (
NSSize)initialOffset
event: (
NSEvent*)event
pasteboard: (
NSPasteboard*)pboard
source: (id)sourceObject
slideBack: (BOOL)slideFlag;
Availability: OpenStep
Description forthcoming.
- (
NSArray*)
drawers;
Availability: MacOS-X 10.0.0
Returns all drawers associated with this window.
- (void)
enableCursorRects;
Availability: OpenStep
Description forthcoming.
- (void)
enableFlushWindow;
Availability: OpenStep
Description forthcoming.
- (void)
enableKeyEquivalentForDefaultButtonCell;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
endEditingFor: (id)anObject;
Availability: OpenStep
Description forthcoming.
- (void)
fax: (id)sender;
Availability: OpenStep
Opens the fax panel to allow the user to fax the
contents of the window view.
- (NSText*)
fieldEditor: (BOOL)createFlag
forObject: (id)anObject;
Availability: OpenStep
Description forthcoming.
- (
NSResponder*)
firstResponder;
Availability: OpenStep
Returns the first responder of the window.
- (void)
flushWindow;
Availability: OpenStep
Flush all drawing in the windows buffer to the screen
unless the window is not buffered or flushing is not
enabled.
- (void)
flushWindowIfNeeded;
Availability: OpenStep
Description forthcoming.
- (
NSRect)
frame;
Availability: OpenStep
Returns the frame of the receiver... the
rectangular area that the window (including any
border, title, and other decorations) occupies on
screen.
- (
NSString*)
frameAutosaveName;
Availability: OpenStep
Description forthcoming.
- (
NSRect)
frameRectForContentRect: (
NSRect)contentRect;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSInteger)
gState;
Availability: OpenStep
Description forthcoming.
- (
NSGraphicsContext*)
graphicsContext;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (BOOL)
hasDynamicDepthLimit;
Availability: OpenStep
Description forthcoming.
- (BOOL)
hasShadow;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
hidesOnDeactivate;
Availability: OpenStep
Description forthcoming.
- (BOOL)
ignoresMouseEvents;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (id)
initWithContentRect: (
NSRect)contentRect
styleMask: (
NSUInteger)aStyle
backing: (
NSBackingStoreType)bufferingType
defer: (BOOL)flag;
Availability: OpenStep
Initializes the receiver with a content rect
of contentRect, a style mask of
styleMask, and a backing store type of
backingType. This is the designated
initializer.
The style mask values are
NSTitledWindowMask
, for a window with
a title, NSClosableWindowMask
, for a
window with a close widget,
NSMiniaturizableWindowMask
, for a
window with a miniaturize widget, and
NSResizableWindowMask
, for a window
with a resizing widget. These mask values can be
OR'd in any combination.
Backing store values are
NSBackingStoreBuffered
,
NSBackingStoreRetained
and
NSBackingStoreNonretained
.
- (id)
initWithContentRect: (
NSRect)contentRect
styleMask: (
NSUInteger)aStyle
backing: (
NSBackingStoreType)bufferingType
defer: (BOOL)flag
screen: (
NSScreen*)aScreen;
Availability: OpenStep
Creates a new window with the specified
characteristics.
The
contentRect is expressed in screen
coordinates (for
aScreen) and the
window frame is calculated from the content
rectangle and the window style mask.
Initializes the receiver with a content rect
of contentRect, a style mask of
styleMask, a backing store type of
backingType and a boolean
flag. flag specifies whether
the window should be created now (NO
),
or when it is displayed (YES
).
The style mask values are
NSTitledWindowMask
, for a window with
a title, NSClosableWindowMask
, for a
window with a close widget,
NSMiniaturizableWindowMask
, for a
window with a miniaturize widget, and
NSResizableWindowMask
, for a window
with a resizing widget. These mask values can be
OR'd in any combination.
Backing store values are
NSBackingStoreBuffered
,
NSBackingStoreRetained
and
NSBackingStoreNonretained
.
- (id)
initWithWindowRef: (void*)windowRef;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSView*)
initialFirstResponder;
Availability: MacOS-X 10.0.0
returns the initial first responder of the
receiver.
- (void)
invalidateCursorRectsForView: (
NSView*)aView;
Availability: OpenStep
Description forthcoming.
- (void)
invalidateShadow;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (BOOL)
isAutodisplay;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isDocumentEdited;
Availability: OpenStep
Returns YES
, if the document has been
changed.
- (BOOL)
isExcludedFromWindowsMenu;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isFlushWindowDisabled;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isKeyWindow;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isMainWindow;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isMiniaturized;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isMovableByWindowBackground;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (BOOL)
isOneShot;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isOpaque;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
isReleasedWhenClosed;
Availability: OpenStep
Returns YES
, if the window is released
when it is closed.
- (BOOL)
isVisible;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isZoomed;
Availability: MacOS-X 10.0.0
Returns yes, if the receiver is zoomed.
- (void)
keyDown: (
NSEvent*)theEvent;
Availability: OpenStep
Processes theEvent when a key is
pressed while within the window.
- (
NSSelectionDirection)
keyViewSelectionDirection;
Availability: MacOS-X 10.0.0
Returns the value of _selectionDirection, the
direction of the current key view.
See
Also:
- (
NSInteger)
level;
Availability: OpenStep
Description forthcoming.
- (BOOL)
makeFirstResponder: (
NSResponder*)aResponder;
Availability: OpenStep
This method attempts to make
aResponder the
first responder.
If
aResponder is
already the first responder, this method has no
effect and simply returns
YES
.
Otherwise, the method sends a
-resignFirstResponder
message to the current first responder (if there is
one) and immediately returns
NO
if the
current first responder refuses to resign.
Then the method asks
aResponder to become
first responder by sending it a
-becomeFirstResponder
message, and if that returns
YES
then
this method immediately returns
YES
.
However, if that returns
NO
, the
receiver is made the first responder by sending it
a
-becomeFirstResponder
message, and this method returns
NO
.
If
aResponder is neither
nil
nor an instance of NSResponder (or
of a subclass of NSResponder) then behavior is undefined
(though the current GNUstep implementation just
returns
NO
).
Makes
aResponder the first responder within the
receiver.
- (void)
makeKeyAndOrderFront: (id)sender;
Availability: OpenStep
Description forthcoming.
- (void)
makeKeyWindow;
Availability: OpenStep
Description forthcoming.
- (void)
makeMainWindow;
Availability: OpenStep
Description forthcoming.
- (
NSSize)
maxSize;
Availability: OpenStep
Description forthcoming.
- (
NSSize)
minSize;
Availability: OpenStep
Description forthcoming.
- (void)
miniaturize: (id)sender;
Availability: OpenStep
Causes the window to miniaturize, that is the window
is removed from the screen and it's counterpart
(mini)window is displayed. Does nothing if the
window can't be miniaturized (eg. because it's
already miniaturized).
- (
NSImage*)
miniwindowImage;
Availability: OpenStep
Description forthcoming.
- (
NSString*)
miniwindowTitle;
Availability: OpenStep
Description forthcoming.
- (
NSPoint)
mouseLocationOutsideOfEventStream;
Availability: OpenStep
Description forthcoming.
- (
NSEvent*)
nextEventMatchingMask: (
NSUInteger)mask;
Availability: OpenStep
Description forthcoming.
- (
NSEvent*)
nextEventMatchingMask: (
NSUInteger)mask
untilDate: (
NSDate*)expiration
inMode: (
NSString*)mode
dequeue: (BOOL)deqFlag;
Availability: OpenStep
Description forthcoming.
- (void)
orderBack: (id)sender;
Availability: OpenStep
- (void)
orderFront: (id)sender;
Availability: OpenStep
If the application is active, orders the window to the
front in its level. If the application is not active,
the window is ordered in as far forward as possible in
its level without being ordered in front of the key or
main window of the currently active app. The current
key and main window status is not changed. Equivalent
to
-orderWindow:relativeTo:
with arguments NSWindowAbove and 0.
- (void)
orderFrontRegardless;
Availability: OpenStep
Orders the window to the front in its level (even in
front of the key and main windows of the current app)
regardless of whether the app is current or not.
This method should only be used in rare cases where
the app is cooperating with another app that is
displaying data for it. The current key and main
window status is not changed.
- (void)
orderOut: (id)sender;
Availability: OpenStep
- (void)
orderWindow: (
NSWindowOrderingMode)place
relativeTo: (
NSInteger)otherWin;
Availability: OpenStep
If place is NSWindowOut, removes the window
from the screen. If place is
NSWindowAbove, places the window directly
above otherWin, or directly above all
windows in its level if otherWin is 0.
If place is NSWindowBelow, places the
window directly below otherWin, or
directly below all windows in its level if
otherWin is 0.
If otherWin is zero and the key window is
at the same window level as the receiver, the receiver
cannot be positioned above the key window.
If place is NSWindowAbove or NSWindowBelow
and the application is hidden, the application is
unhidden.
- (
NSWindow*)
parentWindow;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (void)
performClose: (id)sender;
Availability: OpenStep
Causes the window to close. Calls the
windowShouldClose: method on the
delegate to determine if it should close and calls
shouldCloseWindowController on
the controller for the receiver.
- (void)
performMiniaturize: (id)sender;
Availability: OpenStep
Miniaturize the receiver... as
long as its style mask includes
NSMiniaturizableWindowMask (and
as
long as the receiver is not an icon
or mini window itsself). Calls
-miniaturize:
to do this.
Beeps if the window can't be
miniaturised.
Should ideally provide
visual feedback (highlighting the miniaturize button
as if it had been clicked) first... but that's not yet
implemented.
- (void)
performZoom: (id)sender;
Availability: MacOS-X 10.0.0
Performs the zoom method on the receiver.
- (void)
postEvent: (
NSEvent*)event
atStart: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (BOOL)
preservesContentDuringLiveResize;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
print: (id)sender;
Availability: OpenStep
Opens the print panel to allow the user to print the
contents of the window view.
- (void)
recalculateKeyViewLoop;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
registerForDraggedTypes: (
NSArray*)newTypes;
Availability: OpenStep
Description forthcoming.
- (void)
removeChildWindow: (
NSWindow*)child;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (
NSString*)
representedFilename;
Availability: OpenStep
Description forthcoming.
- (void)
resetCursorRects;
Availability: OpenStep
Description forthcoming.
- (void)
resignKeyWindow;
Availability: OpenStep
Description forthcoming.
- (void)
resignMainWindow;
Availability: OpenStep
Description forthcoming.
- (
NSInteger)
resizeFlags;
Availability: OpenStep
Description forthcoming.
- (
NSSize)
resizeIncrements;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
restoreCachedImage;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
saveFrameUsingName: (
NSString*)name;
Availability: OpenStep
Description forthcoming.
- (
NSScreen*)
screen;
Availability: OpenStep
Returns the screen the window is on.
- (void)
selectKeyViewFollowingView: (
NSView*)aView;
Availability: MacOS-X 10.0.0
- (void)
selectKeyViewPrecedingView: (
NSView*)aView;
Availability: MacOS-X 10.0.0
- (void)
selectNextKeyView: (id)sender;
Availability: MacOS-X 10.0.0
This method checks if:
If any of these checks return a NSView, call
-makeFirstResponder:
on this NSView.
- (void)
selectPreviousKeyView: (id)sender;
Availability: MacOS-X 10.0.0
This method checks if:
If any of these checks return a NSView, call
-makeFirstResponder:
on this NSView.
- (void)
sendEvent: (
NSEvent*)theEvent;
Availability: OpenStep
Handles mouse and other events sent to the receiver
by NSApplication. Do not invoke this method directly.
- (void)
setAcceptsMouseMovedEvents: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setAllowsToolTipsWhenApplicationIsInactive: (BOOL)flag;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setAlphaValue: (
CGFloat)windowAlpha;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setAspectRatio: (
NSSize)ratio;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setAutodisplay: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setAutorecalculatesKeyViewLoop: (BOOL)flag;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setBackgroundColor: (
NSColor*)color;
Availability: OpenStep
Description forthcoming.
- (void)
setBackingType: (
NSBackingStoreType)type;
Availability: OpenStep
Description forthcoming.
- (void)
setCanHide: (BOOL)flag;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setContentAspectRatio: (
NSSize)ratio;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setContentMaxSize: (
NSSize)size;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setContentMinSize: (
NSSize)size;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setContentResizeIncrements: (
NSSize)increments;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setContentSize: (
NSSize)aSize;
Availability: OpenStep
Sets the size of the receiver's content view to
aSize, implicitly adjusting the size of
the receiver's frame to match.
- (void)
setContentView: (
NSView*)aView;
Availability: OpenStep
Sets the window's content view to aView,
replacing any previous content view.
- (void)
setDefaultButtonCell: (
NSButtonCell*)aCell;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setDelegate: (id)anObject;
Availability: OpenStep
Sets the delegate to anObject.
- (void)
setDepthLimit: (
NSWindowDepth)limit;
Availability: OpenStep
Description forthcoming.
- (void)
setDisplaysWhenScreenProfileChanges: (BOOL)flag;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setDocumentEdited: (BOOL)flag;
Availability: OpenStep
Set document edit status. If YES
, then, if
the receiver has a close button, the close button will
show a broken X. If NO
, then, if the
reciever has a close button, the close button will
show a solid X.
- (void)
setDynamicDepthLimit: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setExcludedFromWindowsMenu: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setFrame: (
NSRect)frameRect
display: (BOOL)flag;
Availability: OpenStep
Sets the frame for the receiver to
frameRect and if flag is
YES
causes the window contents to be
refreshed. The value of frameRect
is the desired on-screen size and position of the
window including all border/decoration.
The size of the frame is constrained to the minimum
and maximum sizes set for the receiver (if any).
Its position is constrained to be on screen
if it is a titled window.
- (void)
setFrame: (
NSRect)frameRect
display: (BOOL)displayFlag
animate: (BOOL)animationFlag;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
setFrameAutosaveName: (
NSString*)name;
Availability: OpenStep
Description forthcoming.
- (void)
setFrameFromString: (
NSString*)string;
Availability: OpenStep
Description forthcoming.
- (void)
setFrameOrigin: (
NSPoint)aPoint;
Availability: OpenStep
Sets the origin (bottom left corner) of the receiver's
frame to be the specified point (in screen
coordinates).
- (void)
setFrameTopLeftPoint: (
NSPoint)aPoint;
Availability: OpenStep
Sets the top left corner of the receiver's frame to be
the specified point (in screen coordinates).
- (BOOL)
setFrameUsingName: (
NSString*)name;
Availability: OpenStep
Description forthcoming.
- (BOOL)
setFrameUsingName: (
NSString*)name
force: (BOOL)force;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setHasShadow: (BOOL)hasShadow;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setHidesOnDeactivate: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setIgnoresMouseEvents: (BOOL)flag;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (void)
setInitialFirstResponder: (
NSView*)aView;
Availability: MacOS-X 10.0.0
Sets the initial first responder of the receiver.
- (void)
setLevel: (
NSInteger)newLevel;
Availability: OpenStep
Description forthcoming.
- (void)
setMaxSize: (
NSSize)aSize;
Availability: OpenStep
Description forthcoming.
- (void)
setMinSize: (
NSSize)aSize;
Availability: OpenStep
Description forthcoming.
- (void)
setMiniwindowImage: (
NSImage*)image;
Availability: OpenStep
Description forthcoming.
- (void)
setMiniwindowTitle: (
NSString*)title;
Availability: OpenStep
Description forthcoming.
- (void)
setMovableByWindowBackground: (BOOL)flag;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (void)
setOneShot: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setOpaque: (BOOL)isOpaque;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setParentWindow: (
NSWindow*)window;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (void)
setPreservesContentDuringLiveResize: (BOOL)flag;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setReleasedWhenClosed: (BOOL)flag;
Availability: OpenStep
If YES
, then the window is released when
the close method is called.
- (void)
setRepresentedFilename: (
NSString*)aString;
Availability: OpenStep
Description forthcoming.
- (void)
setResizeIncrements: (
NSSize)aSize;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setShowsResizeIndicator: (BOOL)show;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setShowsToolbarButton: (BOOL)flag;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setTitle: (
NSString*)aString;
Availability: OpenStep
Sets the window's title to the string
aString.
- (void)
setTitleWithRepresentedFilename: (
NSString*)aString;
Availability: OpenStep
Description forthcoming.
- (void)
setViewsNeedDisplay: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setWindowController: (
NSWindowController*)windowController;
Availability: OpenStep
Description forthcoming.
- (BOOL)
showsResizeIndicator;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
showsToolbarButton;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSButton*)
standardWindowButton: (
NSWindowButton)button;
Availability: MacOS-X 10.2.0
Description forthcoming.
- (
NSString*)
stringWithSavedFrame;
Availability: OpenStep
Description forthcoming.
- (
NSUInteger)
styleMask;
Availability: OpenStep
Description forthcoming.
- (
NSString*)
title;
Availability: OpenStep
Returns an NSString containing the text of the
window's title.
- (BOOL)
tryToPerform: (SEL)anAction
with: (id)anObject;
Availability: OpenStep
Description forthcoming.
- (void)
unregisterDraggedTypes;
Availability: OpenStep
Description forthcoming.
- (void)
update;
Availability: OpenStep
Description forthcoming.
- (void)
useOptimizedDrawing: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (
CGFloat)
userSpaceScaleFactor;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (id)
validRequestorForSendType: (
NSString*)sendType
returnType: (
NSString*)returnType;
Availability: OpenStep
Description forthcoming.
- (BOOL)
viewsNeedDisplay;
Availability: OpenStep
Description forthcoming.
- (id)
windowController;
Availability: OpenStep
Description forthcoming.
- (void*)
windowHandle;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSInteger)
windowNumber;
Availability: OpenStep
Description forthcoming.
- (void*)
windowRef;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
worksWhenModal;
Availability: OpenStep
Description forthcoming.
- (void)
zoom: (id)sender;
Availability: MacOS-X 10.0.0
Zooms the receiver. This method calls the delegate
method windowShouldZoom:toFrame: to determine if the
window should be allowed to zoom to full screen.
Instance Variables for NSWindow Class
@protected CGFloat _alphaValue;
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 NSWindow* _attachedSheet;
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 NSString* _autosaveName;
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 NSColor* _backgroundColor;
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 NSBackingStoreType _backingType;
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 NSCachedImageRep* _cachedImage;
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 NSPoint _cachedImageOrigin;
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 NSMutableArray* _children;
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 _contentView;
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 NSGraphicsContext* _context;
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 _counterpart;
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 _defaultButtonCell;
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 NSWindowDepth _depthLimit;
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 unsigned int _disableFlushWindow;
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 _fieldEditor;
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 _firstResponder;
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 NSRect _frame;
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 _futureFirstResponder;
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 _gstate;
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 _increments;
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 NSView* _initialFirstResponder;
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 _lastDragOperationMask;
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 _lastDragView;
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 _lastLeftMouseDownView;
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 _lastOtherMouseDownView;
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 _lastRightMouseDownView;
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 _maximumSize;
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 NSImage* _miniaturizedImage;
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 NSString* _miniaturizedTitle;
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 _minimumSize;
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 NSWindow* _parent;
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 NSMutableArray* _rectsBeingDrawn;
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 NSString* _representedFilename;
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 void* _reserved_1;
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 NSScreen* _screen;
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 NSUInteger _styleMask;
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 NSToolbar* _toolbar;
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 NSWindowController* _windowController;
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 _windowLevel;
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 _windowNum;
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 NSString* _windowTitle;
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 GSWindowDecorationView* _wv;
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/NSWindow.h
Availability: MacOS-X 10.0.0
Description forthcoming.
Method summary
- (
NSRect)
window: (
NSWindow*)window
willPositionSheet: (
NSWindow*)sheet
usingRect: (
NSRect)rect;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
windowDidBecomeKey: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidBecomeMain: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidChangeScreen: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidChangeScreenProfile: (
NSNotification*)aNotification;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
windowDidDeminiaturize: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidEndSheet: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidExpose: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidMiniaturize: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidMove: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidResignKey: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidResignMain: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidResize: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowDidUpdate: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
windowShouldClose: (id)sender;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (BOOL)
windowShouldZoom: (
NSWindow*)sender
toFrame: (
NSRect)aFrame;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowWillBeginSheet: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowWillClose: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowWillMiniaturize: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
windowWillMove: (
NSNotification*)aNotification;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSSize)
windowWillResize: (
NSWindow*)sender
toSize: (
NSSize)frameSize;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (id)
windowWillReturnFieldEditor: (
NSWindow*)sender
toObject: (id)client;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSUndoManager*)
windowWillReturnUndoManager: (
NSWindow*)sender;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSRect)
windowWillUseStandardFrame: (
NSWindow*)sender
defaultFrame: (
NSRect)aFrame;
Availability: MacOS-X 10.0.0
Description forthcoming.
- Declared in:
- AppKit/NSWindow.h
- Conforms to:
- NSWindowDelegate
Availability: OpenStep
Description forthcoming.
Method summary
- (
NSWindow*)
attachedSheet;
Availability: MacOS-X 10.1.0
Description forthcoming.
- Declared in:
- AppKit/NSWindow.h
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
Method summary
- (void)
_captureMouse: (id)sender;
Availability: Not in OpenStep/MacOS-X
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (void)
_initDefaults;
Availability: Not in OpenStep/MacOS-X
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (void)
_releaseMouse: (id)sender;
Availability: Not in OpenStep/MacOS-X
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (void)
_setVisible: (BOOL)flag;
Availability: Not in OpenStep/MacOS-X
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- Declared in:
- AppKit/NSWindow.h
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
Method summary
- (id)
_futureFirstResponder;
Availability: Not in OpenStep/MacOS-X
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- Declared in:
- AppKit/NSWindow.h
Availability: OpenStep
Description forthcoming.
Method summary
- (void)
runToolbarCustomizationPalette: (id)sender;
Availability: OpenStep
Description forthcoming.
- (void)
setToolbar: (
NSToolbar*)toolbar;
Availability: OpenStep
Description forthcoming.
- (void)
toggleToolbarShown: (id)sender;
Availability: OpenStep
Description forthcoming.
- (
NSToolbar*)
toolbar;
Availability: OpenStep
Description forthcoming.
- Declared in:
- AppKit/NSWindow.h
- Conforms to:
- NSObject
Availability: MacOS-X 10.0.0
Description forthcoming.
Up