Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWindowDelegateMBS class.

NSWindowDelegateMBS.wantsPeriodicDraggingUpdates as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Asks the destination object whether it wants to receive periodic draggingUpdated messages.

Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.

If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes. Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages even if nothing changes.

NSWindowDelegateMBS.willEncodeRestorableState(win as NSWindowMBS, state as NSCoderMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate the window is about to add its restorable state to a given archiver.

win: The window adding its restorable state to an archive.
state: The coder creating the archive.

This method is invoked during the window's encodeRestorableStateWithCoder method.

Available in Mac OS X v10.7 and later.

NSWindowDelegateMBS.willPositionSheet(win as NSWindowMBS, sheet as NSWindowMBS, rect as NSRectMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window is about to show a sheet at the specified location, giving it the opportunity to return a custom location for the attachment of the sheet to the window.

win: The window containing the sheet to be animated.
sheet: The sheet to be shown.
rect: The default sheet location, just under the title bar of the window, aligned with the left and right edges of the window.

Return the custom location specified.

This method is also invoked whenever the user resizes window while sheet is attached.

This method is useful in many situations. If your window has a toolbar, for example, you can specify a location for the sheet that is just below it. If you want the sheet associated with a certain control or view, you could position the sheet so that it appears to originate from the object (through animation) or is positioned next to it.

Neither the rect parameter nor the returned NSRect value define the boundary of the sheet. They indicate where the top-left edge of the sheet is attached to the window. The origin is expressed in window coordinates; the default origin.y value is the height of the content view and the default origin.x value is 0. The size.width value indicates the width and behavior of the initial animation; if size.width is narrower than the sheet, the sheet genies out from the specified location, and if size.width is wider than the sheet, the sheet slides out. You cannot affect the size of the sheet through the size.width and size.height fields. It is recommended that you specify zero for the size.height value as this field may have additional meaning in a future release.

Available in Mac OS X v10.3 and later.

NSWindowDelegateMBS.willResizeForVersionBrowser(win as NSWindowMBS, maxPreferredFrameSize as NSSizeMBS, maxAllowedFrameSize as NSSizeMBS) as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate the the window will resize for presentation during version browsing.

win: The window being presented in a version browser.
maxPreferredSize: The maximum size the version browser would prefer the window to be.
maxAllowedSize: The maximum allowed size for the window (the full screen frame minus the margins required to ensure the Versions controls are still visible).

Returns the size that the window should be.

Windows entering the version browser will be resized to the size returned by this method. If either dimension of the returned size is larger than the maxPreferredFrameSize, the window will also be scaled down to ensure it fits properly in the version browser.

If this method is not implemented, the version browser will use windowWillUseStandardFrame to determine the resulting window frame size.

Available in Mac OS X v10.7 and later.

NSWindowDelegateMBS.windowDidBecomeKey(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that the window has become the key window.

notification: A notification named NSWindowDidBecomeKeyNotification.

You can retrieve the window object in question by sending object to notification.

Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidBecomeMain(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that the window has become main.

notification: A notification named NSWindowDidBecomeMainNotification.

You can retrieve the window object in question by sending object to notification.

Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidChangeScreen(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has changed screens.

notification: A notification named NSWindowDidChangeScreenNotification.

You can retrieve the NSWindow object in question by sending object to notification.

Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidChangeScreenProfile(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has changed screen display profiles.

notification: A notification named NSWindowDidChangeScreenProfileNotification.

You can retrieve the NSWindow object in question by sending object to notification.

Available in Mac OS X v10.4 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidDeminiaturize(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has been deminimized.

notification: A notification named NSWindowDidDeminiaturizeNotification

You can retrieve the NSWindow object in question by sending object to notification.

Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidEndLiveResize(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that a live resize operation on the window has ended.

notification: A notification named NSWindowDidEndLiveResizeNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.6 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidEndSheet(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has closed a sheet.

notification: A notification named NSWindowDidEndSheetNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.1 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidEnterVersionBrowser(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate the the window just entered version browsing.

notification: An NSWindowDidEnterVersionBrowserNotification notification.

Available in Mac OS X v10.7 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidExitVersionBrowser(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate the the window is about to leave version browsing.

notification: An NSWindowDidExitVersionBrowserNotification notification.
Available in Mac OS X v10.7 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidExpose(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has been exposed.

notification: A notification named NSWindowDidExposeNotification.
You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidMiniaturize(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has been minimized.

notification: A notification named NSWindowDidMiniaturizeNotification.

You can retrieve the NSWindow object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidMove(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window has moved.

notification: A notification named NSWindowDidMoveNotification.

You can retrieve the NSWindow object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidResignKey(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that the window has resigned key window status.

notification: A notification named NSWindowDidResignKeyNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidResignMain(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that the window has resigned main window status.

notification: A notification named NSWindowDidResignMainNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidResize(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that the window has been resized.

notification: A notification named NSWindowDidResizeNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowDidUpdate(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window received an update message.

notification: A notification named NSWindowDidUpdateNotification

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowShouldClose as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the user has attempted to close a window or the window has received a performClose message.

Return true to allow sender to be closed; otherwise, false.

This method may not always be called during window closing. Specifically, this method is not called when a user quits an application.

Available in Mac OS X v10.0 and later.

NSWindowDelegateMBS.windowShouldZoom(win as NSWindowMBS, newFrame as NSRectMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Asks the delegate whether the specified window should zoom to the specified frame.

win: The window being zoomed.
newFrame: The rectangle to which the specified window is being zoomed.

Return true to allow window's frame to become newFrame; otherwise, false.

Available in Mac OS X v10.0 and later.

NSWindowDelegateMBS.windowWillBeginSheet(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Notifies the delegate that the window is about to open a sheet.

notification: A notification named NSWindowWillBeginSheetNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.1 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillClose(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window is about to close.

notification: A notification named NSWindowWillCloseNotification.

You can retrieve the NSWindow object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillEnterVersionBrowser(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate the the window is about to enter version browsing.

notification: An NSWindowWillEnterVersionBrowserNotification notification.
Available in Mac OS X v10.7 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillExitVersionBrowser(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate the the window just left version browsing.

notification: An NSWindowWillExitVersionBrowserNotification notification.
Available in Mac OS X v10.7 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillMiniaturize(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window is about to be minimized.

notification: A notification named NSWindowWillMiniaturizeNotification.
You can retrieve the NSWindow object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillMove(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window is about to move.

notification: A notification named NSWindowWillMoveNotification.
You can retrieve the NSWindow object in question by sending object to notification.
Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillResize(win as NSWindowMBS, newFrameSize as NSSizeMBS, newSize as NSSizeMBS) as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window is being resized (whether by the user or through one of the setFrame... methods other than setFrame:display:).

The plugin first passes the event to Xojo runtime. In the newSize parameter you get the result from the runtime. Now you can decide. If you return nil, the newSize value is used.

win: The window being resized.
frameSize: The size to which the specified window is being resized.
newSize: The size Xojo wants to use.

Return a custom size to which the specified window will be resized.

The frameSize contains the size (in screen coordinates) sender will be resized to. To resize to a different size, simply return the desired size from this method; to avoid resizing, return the current size. sender's minimum and maximum size constraints have already been applied when this method is invoked.

While the user is resizing a window, the delegate is sent a series of windowWillResize messages as the window's outline is dragged. The window's outline is displayed at the constrained size as set by this method.

Available in Mac OS X v10.0 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillReturnUndoManager(win as NSWindowMBS) as NSUndoManagerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tells the delegate that the window's undo manager has been requested. Returns the appropriate undo manager for the window.

win: The window whose undo manager is being requested.

Return the appropriate undo manager for the specified window.

If this method is not implemented by the delegate, the window creates an NSUndoManager for window.

Available in Mac OS X v10.0 and later.

NSWindowDelegateMBS.windowWillStartLiveResize(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Informs the delegate that the window is about to be live resized.

notification: A notification named NSWindowWillStartLiveResizeNotification.

You can retrieve the window object in question by sending object to notification.
Available in Mac OS X v10.6 and later.

Some examples using this event:

NSWindowDelegateMBS.windowWillUseStandardFrame(win as NSWindowMBS, newFrame as NSRectMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Invoked by NSWindow's zoom: method while determining the frame a window may be zoomed to.

win: The window whose frame size is being determined.
newFrame: The size of the current screen, which is the screen containing the largest part of the window's current frame, possibly reduced on the top, bottom, left, or right, depending on the current interface style. The frame is reduced on the top to leave room for the menu bar.

Return the specified window's standard frame.

The standard frame for a window should supply the size and location that are "best" for the type of information shown in the window, taking into account the available display or displays. For example, the best width for a window that displays a word-processing document is the width of a page or the width of the display, whichever is smaller. The best height can be determined similarly. On return from this method, the zoom: method modifies the returned standard frame, if necessary, to fit on the current screen.

Available in Mac OS X v10.0 and later.

Some examples using this event:

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...