Drop files event

The drop files event will be invoked when the user drops one or multiple dragged files on one of application's forms.

First this event should be fired for target form (or main form if drop target is unknown), then for the application.

Possible implementation for LCL

edit
TDropFilesEvent = procedure (Sender: TObject; const FileNames: Array of String) of Object;

Add OnDropFiles: TDropFilesEvent to TCustomForm, TApplication and TApplicationProperties. Each form will have property AllowDropFiles: Boolean, which enables this event.

Possible implementation per widgetsets

edit

The widgetsets should call method IntfDropFiles of target form (or main form if drop target is unknown) and the application.

Win32/64

edit
  • set DragAcceptFiles for every form
  • respond to WM_DROPFILES message

GTK1/2

edit
  • enable: gtk_drag_dest_set
  • respond to drag_data_received signal

Qt

edit

Carbon

edit
  • respond to kAECoreSuite/kAEOpenDocuments event to open application associated files
  • modify Application Bundle
edit
  • [bug 1772](http://www.freepascal.org/mantis/view.php?id=1772)
  • [bug 8976](http://www.freepascal.org/mantis/view.php?id=8976)

TODO

edit
  1. implement for Qt already implemented (during 0.9.27)