Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSWindowMBS.representedFile as folderitem
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The pathname of the file the window represents.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.representedFilename as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The pathname of the file the window represents.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.representedURL as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The URL of the file the window represents.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rtf")
dim n as new NSWindowMBS(window1)
n.representedURL = f.URLPath

MsgBox n.representedURL
Notes:
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:

FilepathDocument icon
EmptyNone.
Specifies a nonexistent fileGeneric.
Specifies an existent fileSpecific 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)

Feedback, Comments & Corrections

NSWindowMBS.resizeIncrements as NSSizeMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The window's resizing increments.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.Restorable as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 13.2 Yes No No Yes, macOS only No
Function: Specifies whether the window configuration is preserved between application launches.
Notes:
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)

Feedback, Comments & Corrections

NSWindowMBS.screen as NSScreenMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns the screen the window is on.
Notes:
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)

Feedback, Comments & Corrections

NSWindowMBS.sharingType as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The level of access other processes have to the window's content.
Notes:
Available in Mac OS X v10.5 and later.
(Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.showsResizeIndicator as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 8.4 Yes No No Yes, macOS only No
Function: Whether the receiver's resize indicator is visible
Notes:
True to show it, false to hide it.
This method does not affect whether the receiver is resizable.
(Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.showsToolbarButton as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 8.4 Yes No No Yes, macOS only No
Function: Whether the receiver shows the toolbar control button.
Notes:
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)

Feedback, Comments & Corrections

NSWindowMBS.styleMask as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 8.4 Yes No No Yes, macOS only No
Function: The receiver's style mask, indicating what kinds of control items it displays.
Example:
dim p as new IKPictureTakerMBS
p.styleMask = BitwiseAnd(p.styleMask, &hFD) // disable close button
Notes:
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 = 0The window displays none of the usual peripheral elements. Useful only for display or caching purposes.
NSTitledWindowMask = 1The window displays a title bar.
NSClosableWindowMask = 2The window displays a close button.
NSMiniaturizableWindowMask = 4The window displays a minimize button.
NSResizableWindowMask = 8The window displays a resize control.
NSTexturedBackgroundWindowMask = 256The 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.
(Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.tabbingIdentifier as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 16.5 Yes No No Yes, macOS only No
Function: Windows with the same tabbingIdentifier will have the ability to be tabbed together when a window is being shown.
Example:
dim n as NSWindowMBS = window1.NSWindowMBS
n.tabbingIdentifier = "test"
MsgBox n.tabbingIdentifier
Notes:
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)

Feedback, Comments & Corrections

NSWindowMBS.tabbingMode as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 16.5 Yes No No Yes, macOS only No
Function: Get and set the tabbing mode for this window.
Example:
dim n as NSWindowMBS = window1.NSWindowMBS
n.tabbingMode = n.NSWindowTabbingModeDisallowed
MsgBox str(n.tabbingMode) // shows 2
Notes:
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)

Feedback, Comments & Corrections

NSWindowMBS.Title as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 8.2 Yes No No Yes, macOS only No
Function: The title of the color panel window.
Example:
if TargetCocoa then
dim w as new NSWindowMBS(window1)

MsgBox w.title

else
MsgBox "this sample requires REALbasic Cocoa Target"
end if
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.titlebarAppearsTransparent as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 15.1 Yes No No Yes, macOS only No
Function: Whether titlebar appears transparent.
Notes:
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)

Feedback, Comments & Corrections

NSWindowMBS.titleVisibility as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 14.3 Yes Yes Yes Yes No
Function: The title visibility.
Notes:
Can be NSWindowTitleVisible, NSWindowTitleHidden or NSWindowTitleHiddenWhenActive.
Available on Mac OS X 10.10 and newer.
(Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.toolbar as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: The window's toolbar.
Notes:
Value is a NSToolbarMBS object.
Returned as Variant to reduce plugin dependencies.
(Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.Top as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
Property Cocoa MBS MacBase Plugin 8.2 Yes No No Yes, macOS only No
Function: The vertical position of the color panel in pixel.
Notes:
In the Cocoa world this is the distance from the bottom of the screen.
(Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.viewsNeedDisplay as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Indicates whether any of the window's views need to be displayed.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.Visible as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 8.2 Yes No No Yes, macOS only No
Function: Whether the color panel is currently visible.
Notes:
Setting to false calls Hide and setting to true calls show.
(Read only property)

Feedback, Comments & Corrections

NSWindowMBS.Width as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
Property Cocoa MBS MacBase Plugin 8.2 Yes No No Yes, macOS only No
Function: The width of the color panel in pixel.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.windowController as NSWindowControllerMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 13.5 Yes No No Yes, macOS only No
Function: The window's window controller.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSWindowMBS.windowNumber as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 8.4 Yes No No Yes, macOS only No
Function: Provides the window number of the receiver's window device.
Example:
if TargetCocoa then
dim w as new NSWindowMBS(window1)

MsgBox str(w.windowNumber)

else
MsgBox "this sample requires REALbasic Cocoa Target"
end if
Notes: (Read only property)

Feedback, Comments & Corrections

NSWindowMBS.worksWhenModal as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.
Notes:
True if the window is able to receive keyboard and mouse events even when some other window is being run modally; otherwise, false.

The NSWindow implementation of this method returns false. Only subclasses of NSPanel should override this default.
(Read only property)

Feedback, Comments & Corrections

Previous items

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




Links
MBS Xojo tutorial videos