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

Next items

NSWindowDelegateMBS.concludeDragOperation(sender as NSDraggingInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked when the dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.

For this method to be invoked, the previous performDragOperation must have returned true.

The destination implements this method to perform any tidying up that it needs to do, such as updating its visual representation now that it has incorporated the dragged data. This message is the last message sent from sender to the destination during a dragging session.

If the sender object's animatesToDestination property was set to true in prepareForDragOperation, then the drag image is still visible. At this point you should draw the final visual representation in the view. When this method returns, the drag image is removed form the screen. If your final visual representation matches the visual representation in the drag, this is a seamless transition.

Feedback, Comments & Corrections

NSWindowDelegateMBS.didDecodeRestorableState(win as NSWindowMBS, state as NSCoderMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate the window is has extracted its restorable state from a given archiver.
Notes:
win: The window extracting its restorable state from an archive.
state: The coder extracting the archive.

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

Available in Mac OS X v10.7 and later.

Feedback, Comments & Corrections

NSWindowDelegateMBS.draggingEnded(sender as NSDraggingInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Implement this event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.

This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.

Feedback, Comments & Corrections

NSWindowDelegateMBS.draggingEntered(sender as NSDraggingInfoMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked when the dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.

Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is the value returned by the previous draggingEntered message.

Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer enters the destination's bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).

This method must return a value that indicates which dragging operation the destination will perform when the image is released. In deciding which dragging operation to return, the method should evaluate the overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination itself supports.

If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.

Feedback, Comments & Corrections

NSWindowDelegateMBS.draggingExited(sender as NSDraggingInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked when the dragged image exits the destination's bounds rectangle (in the case of a view object) or its frame rectangle (in the case of a window object).
Notes: sender: The object sending the message; use it to get details about the dragging operation.

Feedback, Comments & Corrections

NSWindowDelegateMBS.draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked periodically as the image is held within the destination area, allowing modification of the dragging operation or mouse-pointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.

Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is the value returned by the previous draggingEntered message.

For this to be invoked, the destination must have registered for the pasteboard data type involved in the drag operation. The messages continue until the image is either released or dragged out of the window or view.

This method provides the destination with an opportunity to modify the dragging operation depending on the position of the mouse pointer inside of the destination view or window object. For example, you may have several graphics or areas of text contained within the same view and wish to tailor the dragging operation, or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the time when the user releases the dragged image and the performDragOperation method is invoked.

You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.

Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is within the bounds of two overlapping views that are both valid destinations, the uppermost view receives these messages until the image is either released or dragged out.

Feedback, Comments & Corrections

NSWindowDelegateMBS.encodeRestorableStateWithCoder(win as NSWindowMBS, coder as NSCoderMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 13.2 Yes No No No No
Function: Method called to save the restorable state.
Notes:
The receiver is passed an NSCoderMBS that supports keyed encoding (but not decoding), and should encode its restorable state. If you override this method, you should call through to super. You should not otherwise invoke this method. If you encode an object that implements the NSUserInterfaceItemIdentification protocol, the object itself is not archived; only its identifier is stored. Thus, for example, a window may efficiently store its firstResponder as restorable state.

Called only if you called InstallRestoreEvents at least ones.

Feedback, Comments & Corrections

NSWindowDelegateMBS.performDragOperation(sender as NSDraggingInfoMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked after the released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.

Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return false.

For this method to be invoked, the previous prepareForDragOperation message must have returned true. The destination should implement this method to do the real work of importing the pasteboard data represented by the image.

If the sender object's animatesToDestination was set to true in prepareForDragOperation, then setup any animation to arrange space for the drag items to animate to. Also at this time, enumerate through the dragging items to set their destination frames and destination images.

Feedback, Comments & Corrections

NSWindowDelegateMBS.prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked when the image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your view, set the sender object's animatesToDestination property to true in your implementation of this method.

Feedback, Comments & Corrections

NSWindowDelegateMBS.restoreStateWithCoder(win as NSWindowMBS, coder as NSCoderMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 13.2 Yes No No No No
Function: Method called to restore state.
Notes:
The receiver is passed an NSCoder that supports keyed decoding (but not encoding). The receiver should decode any previously stored state. If you override this method, you should call through to super. You should not otherwise invoke this method.
Called only if you called InstallRestoreEvents at least ones.

Feedback, Comments & Corrections

NSWindowDelegateMBS.shouldDragDocumentWithEvent(win as NSWindowMBS, evnt as NSEventMBS, dragImageLocation as NSPointMBS, pasteboard as Variant) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Asks the delegate whether a user can drag the document icon from the window's title bar.
Notes:
win: The window containing the document icon the user wants to drag.
evnt: The left-mouse down event that triggered the dragging operation.
dragImageLocation: The location at which the user started the dragging operation.
pasteboard: The pasteboard containing the contents of the document, which the delegate can modify. This is a NSPasteboardMBS object.

Return true to allow the drag to proceed; false to prevent it. Before turning no the delegate can implement its own dragging behavior as described below.

Implementing this method allows an application to customize the process of dragging the window's document icon.implement its own dragging process, the delegate can perform the dragging operation and return false.

The delegate can prohibit the drag by returning false. Before returning false, the delegate may implement its own dragging behavior.

Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSWindowDelegateMBS.shouldPopUpDocumentPathMenu(win as NSWindowMBS, menu as NSMenuMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Asks the delegate whether the window displays the title pop-up menu in response to a Command-click or Control-click on its title.
Notes:
win: The window whose title the user Command-clicked or Control-clicked.
menu: The menu the window will display, if allowed. By default, its items are the path components of the file represented by window.

Returns true to allow the display of the title pop-up menu; false to prevent it.

Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSWindowDelegateMBS.updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Invoked when the dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.

While a destination may change the dragging images at any time, it is recommended to wait until this method is called before updating the dragging images.

This allows the system to delay changing the dragging images until it is likely that the user will drop on this destination. Otherwise, the dragging images will change too often during the drag which would be distracting to the user.

Feedback, Comments & Corrections

NSWindowDelegateMBS.wantsPeriodicDraggingUpdates as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 16.5 Yes No No No No
Function: Asks the destination object whether it wants to receive periodic draggingUpdated messages.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.willEncodeRestorableState(win as NSWindowMBS, state as NSCoderMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate the window is about to add its restorable state to a given archiver.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.willPositionSheet(win as NSWindowMBS, sheet as NSWindowMBS, rect as NSRectMBS) as NSRectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: 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.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.willResizeForVersionBrowser(win as NSWindowMBS, maxPreferredFrameSize as NSSizeMBS, maxAllowedFrameSize as NSSizeMBS) as NSSizeMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate the the window will resize for presentation during version browsing.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidBecomeKey(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Informs the delegate that the window has become the key window.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidBecomeMain(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Informs the delegate that the window has become main.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidChangeScreen(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has changed screens.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidChangeScreenProfile(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has changed screen display profiles.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidDeminiaturize(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has been deminimized.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidEndLiveResize(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Informs the delegate that a live resize operation on the window has ended.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidEndSheet(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has closed a sheet.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidEnterVersionBrowser(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate the the window just entered version browsing.
Notes:
notification: An NSWindowDidEnterVersionBrowserNotification notification.

Available in Mac OS X v10.7 and later.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidExitVersionBrowser(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate the the window is about to leave version browsing.
Notes:
notification: An NSWindowDidExitVersionBrowserNotification notification.
Available in Mac OS X v10.7 and later.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidExpose(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has been exposed.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidMiniaturize(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has been minimized.
Notes:
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.

Feedback, Comments & Corrections

NSWindowDelegateMBS.windowDidMove(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacCocoa Plugin 11.2 Yes No No No No
Function: Tells the delegate that the window has moved.
Notes:
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.

Feedback, Comments & Corrections

Next items

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




Links
MBS Xojo blog