Programmer Reference : Drag and Drop
Drag and Drop
Pluggable drag and drop support is provided for the widgets in both Common Widgets and Extended Widgets subsystems without requiring modifications to the widgets. The Drag and Drop subsystem uses the portable CG and CW subsystems. No platform-specific drag and drop API is used. Platform-integrated drag and drop covers drag and drop among applications. This chapter covers drag and drop within a Smalltalk application. Currently, drag and drop is limited to widgets in a single Smalltalk image.
An application might wish to support drag and drop for a variety of reasons. It is not the purpose of Drag and Drop subsystem support to prescribe the semantics of drag and drop; this is left to the application. Instead, generalized objects called adapters are provided to map low-level mouse and keyboard operations to drag and drop callbacks. The primary role of the application in drag and drop is to create the widgets and adapters required, hook the drag and drop callbacks on the adapters, and then make the changes to the underlying objects as drag and drop occurs.
Because the adaptors hook low-level mouse and keyboard events, any widget that provides these events can be adapted to drop and drag. This includes those widgets in the Common Widgets subsystem that fully support mouse and keyboard events.
Last modified date: 01/29/2015