The hierarchy of drag and drop adapter classes is the following:
Class hierarchy | Responsibility |
EwDragAndDropAdapter | Defines common behavior for all adapters |
EwSourceAdapter | Defines common behavior for all drag and drop sources |
EwBlockSourceAdapter | Defines a drag and drop source that uses an application-defined block to determine the drag source items |
EwContainerListSourceAdapter | Defines a source adapter for EW container- style widgets |
EwIconAreaSourceAdapter | Defines a source adapter for EwIconArea widgets |
EwDrawnListSourceAdapter | Defines a source adapter for EwDrawnList widgets |
EwTargetAdapter | Defines common behavior for all drag and drop targets |
EwContainerListTargetAdapter | Defines a target adapter for EW container-style widgets |
EwIconAreaTargetAdapter | Defines a target adapter for EwIconArea widgets |
The Drag and Drop subsystem provides two kinds of adapters for use in drag and drop: source adapters and target adapters. The adapters serve as a wrapper around widgets, providing drag and drop callbacks that the widgets themselves do not provide.
An application should create a source adapter for each widget that an application designates as a drag and drop source.
An application creates one source adapter for each source widget as follows:
aSourceAdapter := EwSourceAdapter on: aWidget.
The source adapter provides the following callbacks for drag and drop source operations:
The application also should create a target adapter for each widget that is to be a target for drag and drop. The target adapter is created as follows:
aTargetAdapter := EwTargetAdapter on: aWidget
The target adapter provides the following callbacks for drag and drop target operations: