Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWindowDelegateMBS class.

Previous items

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
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
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
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
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:

Previous items

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


The biggest plugin in space...