Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSViewControlMBS control.
NSViewControlMBS.draggingEnded(sender as NSDraggingInfoMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.draggingEntered(sender as NSDraggingInfoMBS) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.draggingExited(sender as NSDraggingInfoMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
sender: The object sending the message; use it to get details about the dragging operation.
NSViewControlMBS.draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
NSViewControlMBS.draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
NSViewControlMBS.draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific "within" values in the future. To account for this, for unrecognized localities, return the operation mask for the most specific context that you are concerned with.
NSViewControlMBS.draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
NSViewControlMBS.draggingUpdated(sender as NSDraggingInfoMBS) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.drawFocusRingMask(g as NSGraphicsMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If false is returned, the default method from NSView class runs.
This method provides the shape of the focus ring mask by drawing the focus ring mask. An implementation of this method should draw in the view's interior (bounds) coordinate space, that the focus ring style has been set (it will be set it to NSFocusRingOnly to capture the focus ring itself), and that the fill and stroke colors have been set to an arbitrary fully opaque color.
Subclasses that find the default behavior insufficient should only draw the focus ring shape.
The NSView default implementation of this method simply fills self.bounds.
Available in Mac OS X v10.7 and later.
Please use NSGraphicsMBS class for drawing.
NSViewControlMBS.DrawRect(g as NSGraphicsMBS, left as Double, top as Double, width as Double, height as Double)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The items on this page are in the following plugins: MBS MacControls Plugin.