Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWindowMBS class.

NSWindowMBS.contentRectForFrameRect(windowFrame as NSRectMBS, styleMask as UInt32) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the content rectangle used by a window with a given frame rectangle and window style.

windowFrame: The frame rectangle for the window expressed in screen coordinates.
windowStyle: The window style for the window. See constants for a list of style mask values.

Returns the content rectangle, expressed in screen coordinates, used by the window with windowFrame and windowStyle.
When a NSWindowMBS instance is available, you should use contentRectForFrameRect instead of this method.

See also:

NSWindowMBS.frameRectForContentRect(windowContentRect as NSRectMBS, styleMask as UInt32) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the frame rectangle used by a window with a given content rectangle and window style.

windowContentRect: The content rectangle for a window expressed in screen coordinates.
windowStyle: The window style for the window. See Window Style Mask constants for a list of style mask values.

Returns the frame rectangle, expressed in screen coordinates, used by the window with windowContentRect and windowStyle.
When a NSWindowMBS instance is available, you should use frameRectForContentRect instead of this method.

See also:

NSWindowMBS.minFrameWidthWithTitle(WindowTitle as string, styleMask as UInt32) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the minimum width a window's frame rectangle must have for it to display a title, with a given window style.
Example
// shows 84.77588
MsgBox str(NSWindowMBS.minFrameWidthWithTitle("Hello World",0))

windowTitle: The title for the window.
windowStyle: The window style for the window. See Window Style Mask constants for a list of style mask values.

The minimum width of the window's frame, using windowStyle, in order to display windowTitle.

NSWindowMBS.NSDockWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The level for the doc. (Deprecated. There is no replacement.)

NSWindowMBS.NSFloatingWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

Useful for floating palettes.

Some examples using this method:

NSWindowMBS.NSMainMenuWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

Reserved for the application's main menu.

NSWindowMBS.NSModalPanelWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The level for a modal panel.

NSWindowMBS.NSNormalWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The default level for NSWindow objects.

Some examples using this method:

NSWindowMBS.NSPopUpMenuWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The level for a pop-up menu.

NSWindowMBS.NSScreenSaverWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The level for a screen saver.

NSWindowMBS.NSStatusWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The level for a status window.

Some examples using this method:

NSWindowMBS.NSSubmenuWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

Reserved for submenus. Synonymous with NSTornOffMenuWindowLevel, which is preferred.

NSWindowMBS.NSTornOffMenuWindowLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the standard window levels in Mac OS X.

The level for a torn-off menu. Synonymous with NSSubmenuWindowLevel.

NSWindowMBS.NSWindowDidBecomeKeyNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object becomes the key window.

The notification object is the NSWindow object that has become key. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidBecomeMainNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object becomes the main window.

The notification object is the NSWindow object that has become main. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidChangeScreenNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever a portion of an NSWindow object's frame moves onto or off of a screen.

The notification object is the NSWindow object that has changed screens. This notification does not contain a userInfo dictionary.

This notification is not sent in Mac OS X versions earlier than 10.4.

NSWindowMBS.NSWindowDidChangeScreenProfileNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever the display profile for the screen containing the window changes.

This notification is sent only if the window returns true from displaysWhenScreenProfileChanges. This notification may be sent when a majority of the window is moved to a different screen (whose profile is also different from the previous screen) or when the ColorSync profile for the current screen changes.

The notification object is the NSWindow object whose profile changed. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.4 and later.

NSWindowMBS.NSWindowDidDeminiaturizeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is deminimized.

The notification object is the NSWindow object that has been deminimized. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidEndLiveResizeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted after the user resizes a window.

This notification is sent only once for a series of window resize operations.

The notification object is the NSWindow object that was resized. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.6 and later.

NSWindowMBS.NSWindowDidEndSheetNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object closes an attached sheet.

The notification object is the NSWindow object that contained the sheet. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidEnterFullScreenNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window entered full screen mode.
The notification object is the NSWindow object entered full screen mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowDidEnterVersionBrowserNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window will exit full screen mode.
The notification object is the NSWindow object that will exit full screen mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowDidExitFullScreenNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window will exit full screen mode.
The notification object is the NSWindow object that will exit full screen mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowDidExitVersionBrowserNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window did exit version browser mode.
The notification object is the NSWindow object that did exit version browser mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowDidExposeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever a portion of a nonretained NSWindow object is exposed, whether by being ordered in front of other windows or by other windows being removed from in front of it.

The notification object is the NSWindow object that has been exposed. The userInfo dictionary contains the following information:

KeyValue
NSExposedRectThe rectangle that has been exposed (NSRect).

NSWindowMBS.NSWindowDidMiniaturizeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is minimized.

The notification object is the NSWindow object that has been minimized. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidMoveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is moved.

The notification object is the NSWindow object that has moved. This notification does not contain a userInfo dictionary.

Note: This notification is sent when the window that moved didn't also change size. See NSWindowDidResizeNotification for more information.

NSWindowMBS.NSWindowDidResignKeyNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object resigns its status as key window.

The notification object is the NSWindow object that has resigned its key window status. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidResignMainNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object resigns its status as main window.

The notification object is the NSWindow object that has resigned its main window status. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidResizeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object's size changes.

The notification object is the NSWindow object whose size has changed. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowDidUpdateNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object receives an update message.

The notification object is the NSWindow object that received the update message. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowWillBeginSheetNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is about to open a sheet.

The notification object is the NSWindow object that is about to open the sheet. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowWillCloseNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is about to close.

The notification object is the NSWindow object that is about to close. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowWillEnterFullScreenNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window will enter full screen mode.
The notification object is the NSWindow object will enter full screen mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowWillEnterVersionBrowserNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window will enter version browser mode.
The notification object is the NSWindow object that will enter version browser mode. This notification does not contain a userInfo dictionary.
Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowWillExitFullScreenNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window will exit full screen mode.
The notification object is the NSWindow object that will exit full screen mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowWillExitVersionBrowserNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted when the window will exit version browser mode.
The notification object is the NSWindow object that will exit version browser mode. This notification does not contain a userInfo dictionary.

Available in Mac OS X v10.7 and later.

NSWindowMBS.NSWindowWillMiniaturizeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is about to be minimized.

The notification object is the NSWindow object that is about to be minimized. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowWillMoveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted whenever an NSWindow object is about to move.

The notification object is the NSWindow object that is about to move. This notification does not contain a userInfo dictionary.

NSWindowMBS.NSWindowWillStartLiveResizeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
One of the notification strings you can use with the NSNotification* classes.

Posted before the user resizes a window.
This notification is sent only once for a series of window resize operations.
The notification object is the NSWindow object that is about to be live resized. This notification does not contain a userInfo dictionary.
Available in Mac OS X v10.6 and later.

NSWindowMBS.removeFrameUsingName(name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 15.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Removes the frame data stored under a given name from the application's user defaults.

NSWindowMBS.standardWindowButton(button as Integer, StyleMask as Integer) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns a new instance of a given standard window button, sized appropriately for a given window style.

button: The kind of standard window button to return.
StyleMask: The window style for which windowButtonKind is to be sized. See "Window Style Masks" for the list of allowable values.

Returns the new window button of the kind identified by windowButtonKind; nil when no such button kind exists.

The caller is responsible for adding the button to the view hierarchy and for setting the target to be the window.

Declared as Variant for reduced plugin dependencies.
Button constants: NSWindowCloseButton, NSWindowDocumentIconButton, NSWindowMiniaturizeButton, NSWindowToolbarButton and NSWindowZoomButton

See also:

NSWindowMBS.windowNumberAtPoint(x as Double, y as Double, belowWindowWithWindowNumber as Integer = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the number of the frontmost window that would be hit by a mouseDown at the screen location point.

belowWindowWithWindowNumber can be specified to exclude a given window along with all windows above it, and may belong to any application. If no windows are to be excluded, specify 0 for belowWindowWithWindowNumber. The windowNumber returned may correspond to a window in another application.
Requires Mac OS X 10.6 or newer.

Some examples using this method:

NSWindowMBS.windowNumbersWithOptions(options as Integer = 0) as Integer()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns an array of integers containing windowNumbers for all visible windows satisfying options.
Example
Var windowNumbers1() as Integer
Var windowNumbers2() as Integer
Var windowNumbers3() as Integer

// To get an array of windowNumbers visible on the current space and belonging to the calling application:
windowNumbers1 = NSWindowMBS.windowNumbersWithOptions(0)
// To get an array of windowNumbers visible on any space and belonging to any application:
windowNumbers2 = NSWindowMBS.windowNumbersWithOptions(NSWindowMBS.NSWindowNumberListAllApplications+NSWindowMBS.NSWindowNumberListAllSpaces)
// To get an array of windowNumbers visible on any space and belonging to the calling application:
windowNumbers3 = NSWindowMBS.windowNumbersWithOptions(NSWindowMBS.NSWindowNumberListAllSpaces)

In no options are specified, only visible windows belonging to the calling application and on the active space are included. If options include NSWindowNumberListAllApplications, visible windows belonging to all applications are included. If options include NSWindowNumberListAllSpaces, visible windows on all spaces are included.

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


The biggest plugin in space...