Keywords: LessTif

Next: 2. Protocol Basics Up: 7. Drag and Drop Previous: 7. Drag and Drop Contents Index

# 1. Introduction

The "Drag & Drop" mechanism is a metaphor for data transfer, which allows the user to pick up an object with the mouse pointer, and move it to another location (which can be even in another application) and drop it there. This metaphor is the same no matter what kind of data is transfered. In most cases, the ``Drag & Drop'' gesture results in data being moved or copied to the new location, but it can also invoke an action - like printing a file when dropping the icon of a file on a printer icon, or de-installing some so-called ``operating system'' when dropping its flying logo into the trash bin.

Although the term ``Drag & Drop'' suggests that both the drag and the drop operation are inseparable, in fact the drop operation is independent of the drag operation. To transfer data, only the drop operation is needed. The drag operation is just there to make the metaphor work better, as an application can provide accurate visual feedback about the state of the operation. As a consequence of this, we'll discuss the drag protocol and the drop protocol in separate sections.

As you can easily imagine, a good part of the whole protocol mess is undocumented. Fortunately, Daniel Dardailler's documentation and initial implementation example of the dynamic drag protocol was invaluable help for understanding the drag and drop protocol. Unfortunately, his documentation does only cover the dynamic mode of operation, which is now standardized with CDE 2. The other mode, preregister, is still undocumented, although it is the default mode for drag and drop operations in the M*TIF toolkit (one more own goal for the CSF).

Next: 2. Protocol Basics Up: 7. Drag and Drop Previous: 7. Drag and Drop Contents Index