Contents

dragSelection(with:offset:slideBack:)

Begins dragging the current selected text range.

Declaration

func dragSelection(with event: NSEvent, offset mouseOffset: NSSize, slideBack: Bool) -> Bool

Parameters

  • event:

    The event that initiated dragging the selection.

  • mouseOffset:

    The cursor’s current location relative to the mouse-down event.

  • slideBack:

    True if the image being dragged should slide back to its original position if the drag does not succeed, False otherwise.

Return Value

true if the drag can be successfully initiated, false otherwise.

Discussion

Primarily for subclasses, who can override it to intervene at the beginning of a drag.

See Also

Dragging