Implementing Drag and Drop
Drag and drop on Mac OS X is implemented using a few standard protocols and pasteboards. All drag and drop operations have three major elements, a source, a destination, and the data being dragged. The source and destination are usually NSView objects, but any NSWindow can also be a source or destination. The data being dragged is placed on a pasteboard. A standard pasteboard, NSDragPboard, has been set aside for drag and drop, but it is possible to use a private pasteboard instead if desired.
The term dragging session (or just drag session) is used to describe the whole process from the initiation of a drag at mouse-down until the mouse-up event is received. The source, destination, data, and all mouse-dragged events ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access