Allows the user to drag objects from the view without activating the app or moving the window of the view forward, possibly obscuring the destination.
- macOS 10.0+
An object representing an initial mouse-down event.
If this method returns
true, the normal window-ordering and activation mechanism is delayed (not necessarily prevented) until the next mouse-up event. If it returns
false, then normal ordering and activation occur.
Never invoke this method directly; it’s invoked automatically for each mouse-down event directed at the NSView.
NSView subclass that allows dragging should implement this method to return
the is potentially the beginning of a dragging session or of some other context where window ordering isn’t appropriate. This method is invoked before a
mouse message for
the is sent. The default implementation returns
If, after delaying window ordering, the view actually initiates a dragging session or similar operation, it should also send a
prevent message to
NSApp, which completely prevents the window from ordering forward and the activation from becoming active.
prevent is sent automatically by the
drag methods of