Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSWindowMBS class.
NSWindowMBS.acceptsMouseMovedEvents as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
True to have the receiver accept mouse-moved events (and to distribute them to its responders); false to not accept such events.
(Read and Write property)
Some examples using this property:
NSWindowMBS.allowsConcurrentViewDrawing as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Whether threading of view drawing should be enabled for this window. Defaults to true. When this is set to true, AppKit's view system is allowed to perform drawRect activity for the window's views on threads other than the main thread, for views that have canDrawConcurrently = true. When this is set to false, the window's views will be drawn serially as on 10.5 and earlier, even though some of the views may have canDrawConcurrently = true.
Available on Mac OS X 10.6.
(Read and Write property)
NSWindowMBS.allowsToolTipsWhenApplicationIsInactive as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Default is false. Set to true to allow a window to display tooltips even when the application is in the background. Note that, enabling tooltips in an inactive application will cause the app to do work any time the mouse passes over the window. This can degrade system performance.
(Read and Write property)
NSWindowMBS.alphaValue as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.animationBehavior as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Can be set to NSWindowAnimationBehaviorNone to disable Appkit's automatic animations for a given window, or to one of the other non-Default NSWindowAnimationBehavior values to override AppKit's automatic inference of appropriate animation behavior based on the window's apparent type.
Available on Mac OS X 10.7 or later.
(Read and Write property)
NSWindowMBS.aspectRatio as NSSizeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.Autodisplay as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Automatic display typically occurs on each pass through the event loop.
Available in Mac OS X v10.0 and later.
(Read and Write property)
NSWindowMBS.backgroundColor as NSColorMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.backingLocation as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The location of the window's backing store. See "Constants" for possible values.
Available in Mac OS X v10.5 and later.
(Read only property)
NSWindowMBS.backingScaleFactor as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Returns 2.0 for high resolution scaled display modes, and 1.0 for all other cases.
There are some scenarios where an application that is resolution-aware may want to reason on its own about the display environment it is running in.
It is important to note that this number returned by this method does not represent anything concrete, such as pixel density or physical size, since it can vary based on the configured display mode. For example, the display may be in a mirrored configuration that is still high resolution scaled, resulting in pixel geometry that may not match the native resolution of the display device.
Note: For almost all common cases, developers should avoid using the backingScaleFactor as an input to layout or drawing calculations. Developers should instead use the backing coordinate space conversion methods instead, as the resulting code will more likely work consistently and correctly under both low and high resolution operation.
For apps which are not enabled for retina support, the function returns 1. So you only see 2 here if app is Cocoa, display is retina and info.plist has the NSHighResolutionCapable key.
(Read only property)
NSWindowMBS.backingType as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Use constants like this:
| Name | Value | Description |
|---|---|---|
| NSBackingStoreRetained | = 0 | The window uses a buffer, but draws directly to the screen where possible and to the buffer for obscured portions. You should not use this mode. It combines the limitations of NSBackingStoreNonretained with the memory use of NSBackingStoreBuffered. The original NeXTSTEP implementation was an interesting compromise that worked well with fast memory mapped framebuffers on the CPU bus—something that hasn't been in general use since around 1994. These tend to have performance problems. In Mac OS X 10.5 and later, requests for retained windows will result in the window system creating a buffered window, as that better matches actual use. Available in Mac OS X v10.0 and later. |
| NSBackingStoreNonretained | = 1 | The window draws directly to the screen without using any buffer. You should not use this mode. It exists primarily for use in the original Classic Blue Box. It does not support Quartz drawing, alpha blending, or opacity. Moreover, it does not support hardware acceleration, and interferes with system-wide display acceleration. If you use this mode, your application must manage visibility region clipping itself, and manage repainting on visibility changes. Available in Mac OS X v10.0 and later. |
| NSBackingStoreBuffered | = 2 | The window renders all drawing into a display buffer and then flushes it to the screen. You should use this mode. It supports hardware acceleration, Quartz drawing, and takes advantage of the GPU when possible. It also supports alpha channel drawing, opacity controls, using the compositor. Available in Mac OS X v10.0 and later. |
Some examples using this property:
NSWindowMBS.deepestScreen as NSScreenMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The deepest screen the window is on; nil when the window is offscreen.
(Read only property)
NSWindowMBS.depthLimit as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The value returned can be examined with the Application Kit functions NSPlanarFromDepth, NSColorSpaceFromDepth, NSBitsPerSampleFromDepth, and NSBitsPerPixelFromDepth.
(Read and Write property)
NSWindowMBS.displaysWhenScreenProfileChanges as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Returns true when the window context should be updated when the screen profile changes or when the window moves to a different screen; otherwise, false.
The default value is false.
Available in Mac OS X v10.4 and later.
(Read and Write property)
NSWindowMBS.frame as NSRectMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read only property)
NSWindowMBS.hasDynamicDepthLimit as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
True when the window has a dynamic depth limit; otherwise, false.
(Read and Write property)
NSWindowMBS.hasShadow as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
True when the receiver has a shadow, false when it doesn't.
(Read and Write property)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| Property | Cocoa | MBS MacBase Plugin | 8.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.hidesOnDeactivate as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
True when the receiver is removed from the screen when its application is deactivated; false if it remains onscreen.
The default for NSWindow is false; the default for NSPanel is true.
(Read and Write property)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| Property | Cocoa | MBS MacBase Plugin | 8.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.maxSize as NSSizeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The maximum size to which the window's frame (including its title bar) can be sized either by the user or by the setFrame... methods other than setFrame.
(Read and Write property)
NSWindowMBS.miniwindowImage as Variant
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The miniaturized window image is the image displayed in the Dock when the window is minimized. If you did not assign a custom image to the window, this method returns nil.
Value is declares as Variant to minimize plugin dependencies, but should be NSImageMBS.
(Read and Write property)
NSWindowMBS.miniwindowTitle as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.minSize as NSSizeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The minimum size to which the window's frame (including its title bar) can be sized either by the user or by the setFrame... methods other than setFrame.
(Read and Write property)
NSWindowMBS.Movable as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
setMovableByWindowBackground, called with the argument true, is ignored by a window that returns false from isMovable. If a window returns false, that means it can only be dragged between spaces in F8 mode, and its relative screen position is always preserved. Note that a resizable window may still be resized, and the window frame may be changed programmatically. A non-movable window will not be moved or resized by the system in response to a display reconfiguration. Applications may choose to enable application-controlled window dragging after disabling user-initiating dragging by handling the mouseDown/mouseDragged/mouseUp sequence in sendEvent in an NSWindow subclass.
Available in Mac OS X v10.6 and later.
(Read and Write property)
Some examples using this property:
NSWindowMBS.parentWindow as NSWindowMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Available in Mac OS X v10.2 and later.
(Read and Write property)
NSWindowMBS.preferredBackingLocation as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Available in Mac OS X v10.5 and later.
(Read and Write property)
NSWindowMBS.preservesContentDuringLiveResize as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Returns true if the window tries to optimize live resize operations by preserving the content of views that have not moved; otherwise, false.
Discussion
When live-resize optimization is active, the window redraws only those views that moved (or do not support this optimization) during a live resize operation.
See preservesContentDuringLiveResize in NSView for additional information on how to support this optimization.
Available in Mac OS X v10.4 and later.
(Read and Write property)
NSWindowMBS.preventsApplicationTerminationWhenModal as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Available in Mac OS X v10.6 and later.
(Read and Write property)
NSWindowMBS.representedFile as folderitem
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.representedFilename as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.representedURL as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The URL for the file the window represents.
When the URL specifies a path, the window shows an icon in its title bar, as described in Table 1.
Title bar document icon display:
| Filepath | Document icon |
| Empty | None. |
| Specifies a nonexistent file | Generic. |
| Specifies an existent file | Specific for the file's type. |
You can customize the file icon in the tile bar with the following code:
window.standardWindowButton(NSWindowDocumentIconButton).Image=theImage
When the URL identifies an existing file, the window's title offers a pop-up menu showing the path components of the URL. (The user displays this menu by Command-clicking the title.) The behavior and contents of this menu can be controlled with shouldPopUpDocumentPathMenu.
Available in Mac OS X v10.5 and later.
(Read and Write property)
NSWindowMBS.resizeIncrements as NSSizeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.Restorable as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
value: Specify true if you want the window to be preserved or false if you do not want it preserved.
Windows should be preserved between launch cycles to maintain interface continuity for the user. During subsequent launch cycles, the system tries to recreate the window and restore its configuration to the preserved state. Configuration data is updated as needed and saved automatically by the system.
If you enable preservation for a given window, you should also specify a restoration class for the window using the setRestorationClass method.
Available in OS X v10.7 and later.
(Read and Write property)
NSWindowMBS.screen as NSScreenMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The screen where most of the window is on; nil when the window is offscreen.
When the window is partly on one screen and partly on another, the screen where most of it lies is returned.
(Read only property)
NSWindowMBS.sharingType as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Available in Mac OS X v10.5 and later.
(Read and Write property)
NSWindowMBS.showsResizeIndicator as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
True to show it, false to hide it.
This method does not affect whether the receiver is resizable.
(Read and Write property)
NSWindowMBS.showsToolbarButton as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
True to display the toolbar control button; false to hide the button.
If the window does not have a toolbar, this method has no effect.
(Read and Write property)
Some examples using this property:
NSWindowMBS.styleMask as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
See the information about the style mask in constants below. An NSWindow object's style is set when the object is initialized. Once set, it can't be changed.
constants:
| NSBorderlessWindowMask = 0 | The window displays none of the usual peripheral elements. Useful only for display or caching purposes. |
| NSTitledWindowMask = 1 | The window displays a title bar. |
| NSClosableWindowMask = 2 | The window displays a close button. |
| NSMiniaturizableWindowMask = 4 | The window displays a minimize button. |
| NSResizableWindowMask = 8 | The window displays a resize control. |
| NSTexturedBackgroundWindowMask = 256 | The window displays with a metal-textured background. Additionally, the window may be moved by clicking and dragging anywhere in the window background. A bordered window with this mask gets rounded bottom corners. |
Some examples using this property:
- /AVFoundation/Donut Video Player
- /AVFoundation/Transparent Player
- /MacCocoa/Fullsize Window Content
- /MacCocoa/HUDObjects/HUDControls
- /MacCocoa/NSWindow HUD Test
- /MacCocoa/NSWindow HUD with RB window
- /MacCocoa/NSWindow transparent
- /MacCocoa/Unified Bars Example
- /MacCocoa/utility window style
- /MacControls/HUDPopupMenu
NSWindowMBS.SubTitle as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 20.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
A value of empty string will remove the subtitle from the window layout.
(Read and Write property)
NSWindowMBS.tabbingIdentifier as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
This allows aggregation of similiar windows. By default, the tabbingIdentifier will be generated based on inherit window properties, such as the window class name, the delegate class name, the window controller class name, and some additional state. Windows can be explicilty made to group together by using the same tabbingIdentifier.
Raises an exception when used on OS X 10.11 and older.
(Read and Write property)
NSWindowMBS.tabbingMode as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
This should be set before a window is shown. The default value is NSWindowTabbingModeAutomatic. When the value is NSWindowTabbingModeAutomatic, the system will look at the userTabbingPreference and automatically tab windows together based on the tabbingIdentifier, when it is appropriate to do so.
Raises an exception when used on OS X 10.11 and older.
(Read and Write property)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 8.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
NSWindowMBS.titlebarAppearsTransparent as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 15.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
When True, the titlebar doesn't draw its background, allowing all buttons to show through, and "click through" to happen. In general, this is only useful when NSFullSizeContentViewWindowMask is set.
Available on Mac OS X 10.10 and newer.
(Read and Write property)
Some examples using this property:
NSWindowMBS.titlebarSeparatorStyle as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 20.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The default value is NSTitlebarSeparatorStyleAutomatic. Changing this value will override any preference made by NSSplitViewItem.
(Read and Write property)
NSWindowMBS.titleVisibility as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Can be NSWindowTitleVisible, NSWindowTitleHidden or NSWindowTitleHiddenWhenActive.
Available on Mac OS X 10.10 and newer.
(Read and Write property)
NSWindowMBS.toolbarStyle as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Cocoa | MBS MacBase Plugin | 20.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
(Read and Write property)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| Property | Cocoa | MBS MacBase Plugin | 8.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
In the Cocoa world this is the distance from the bottom of the screen.
(Read and Write property)
The items on this page are in the following plugins: MBS MacBase Plugin.