The OpenD Programming Language

GenericDropHandlerBase

A generic helper base class for making a drop handler with a preference list of custom types. This is the base for TextDropHandler and FilesDropHandler and you can use it for your own droppers too.

It assumes the whole window it used, but you can subclass to change that.

This is not yet stable and may break in future versions without notice.
class GenericDropHandlerBase : DropHandler {}

Inherited Members

From DropHandler

dragEnter
DragAndDropAction dragEnter(DropPackage* )

Called when the drag enters the handler's area.

dragLeave
void dragLeave()

Called when the drag leaves the handler's area or is cancelled. You should free your resources when this is called.

dragOver
DropParameters dragOver(Point pt)

Called continually as the drag moves over the handler's area.

drop
void drop(DropPackage* )

The user dropped the data and you should process it now. You can access the data through the given DropPackage.

finish
void finish()

Called when the drop is complete. You should free whatever temporary resources you were using. It is often reasonable to simply forward this call to dragLeave.

DropParameters
struct DropParameters

Parameters returned by DropHandler.drop.

See Also

Meta

History

Added February 19, 2021