What is Drag and Drop in the Computer?
Drag and drop is a way to interact with virtual objects displayed on the screen of the computer: by hovering the mouse cursor over one object, pressing and holding a mouse button, moving the cursor away while be button is still held (i.e. dragging it), hovering the mouse cursor over a target location, then releasing the button (dropping it).
Generally, a drag and drop action results in transferring the virtual object from one virtual location to another, e.g. moving a file from a folder to another, moving a dockable window from one pane to another, etc.
While the virtual object is being dragged, there should be some indication that it's being "held" by the cursor, such as an icon representing the object appearing under the cursor, or the cursor turning into a closed hand icon. The visual analogy of a typical graphical operating system is that the mouse cursor is floating (hovering) "above" the objects on the screen, so dragging and dropping looks like you are "fishing up" an object using the cursor, then dropping it so it falls back down.
When drag and drop occurs from one application to another, some common protocol must exist between the two applications that allows the transfer of the data being dragged. Examples of such inter-application protocols include:
- You can drag and drop a file from a file manager into an application to open it. This a universally supported convention. I'd even say if an application doesn't support this, it's not a good application.
- You can drag and drop a file from an archiver viewing a zipped folder into a file manager to extract it.
- You can drag and drop an image from a web browser into a file manager to save it (copying directly from the browser's cache) or download it. This depends on the support of the applications involved: the former works on Windows, the latter tends to happen on Linux.
Observation: it seems there are only conventions for dragging and dropping things from or into a file manager, which is kind of sad. It would be interesting if more applications could communicate with each other somehow using the drag and drop interface, but that really requires some common protocol, and, to my knowledge, there is no place on the Internet where you can find or discuss such potential protocols with other application developers, so there isn't much collaboration on this area.