Workplace Shell makes implementing drag/drop considerably easier for the programmer than it is under PM. Much of the filling of data structures and the drag part of drag/drop is handled by WPS, so that WPS simply sends the target object a pre-defined message if a successful drop sequence is completed.
Without this help from WPS, a program must, for example, include code to handle the DM_DRAGOVER messages that occurs when an icon is being dragged over another icon without being dropped on it. If each application had to code an exchange for each device object in the system, as well as all the other possible objects, this would significantly complicate application development. It would also increase program size and memory usage, since each application would need to be running all the time.
The Workplace Shell avoids this requirement by allowing a developer to register a small object which understands all the capabilities of the application, and can call the relevant parts of the main application when required. The standard direct manipulation capabilities of the WPS include Print, Delete and File Move/Copy.
Workplace Shell implements the standard PM Print rendering mechanism (DRM_PRINT); after a successful drop, the source icon is sent a "DM_PRINTOBJECT" message with the name of the relevant print queue as one of its parameters. For WPS objects, the WPS may print the object automatically; non-WPS programs should perform the print to the specified queue when they receive the DM_PRINTOBJECT message.
Delete
The Workplace Shell shredder object supports a rendering mechanism called DRM_DISCARD. This is not one of the standard PM rendering mechanisms. If an item supporting this rendering mechanism is dropped on a shredder, then the source program is sent a "DM_DISCARDOBJECT" message. In the case of a Workplace Shell object, it will be deleted; in the case of a non-WPS PM program, the program must delete the dragged item in response to this message.
File Move/Copy
When an item is dropped onto a folder object and the dropped item is either a WPS object derived from WPFileSystem or a PM item whose associated data structures indicate that it is suitable, the target initiates the OS/2 File rendering mechanism (DRM_OS2FILE). In the case of the PM item, its suitability depends on whether its associated DRAGITEM structure includes a reference to DRM_OS2FILE in its hstrRMF field. For details of this see OS/2 Version 2.0 - Volume 4: Application Development, which includes a detailed discussion of direct manipulation.
In both cases, copy and move operations are supported according to any modified keys the user may be holding down at the time. The implementation of this rendering mechanism results in files being moved or copied between directories on disk.