[Lazarus] GTK2: Drag files to other applications (to the file manager, Thunar, Nautilus, etc)

Bernd prof7bit at gmail.com
Tue Aug 21 20:34:06 CEST 2012


2012/8/21 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> On 21 August 2012 12:41, Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>> They *have* to use the platform protocols, so why should dragging files or
>> other objects run through an widgetset instead of using the API directly?
>
> I have to admit that Bernd's implementation does seem strange - now
> with multiple DND implementation between the LCL's TWinControl and his
> TComponent descendant. But if it works, then great.

its not *between* the TWinControl and my component, my component is
just there as a wrapper around some internal state (which could also
be implemented in the TWinControl directly) and to add a few more
events (which could also be added to TWinControl) and around the
platform specific code between the ifdefs which could later be moved
into lcl/interfaces/gtk2/ once it is complete.

I just did it this way (with a separate component) because now it does
not require me to patch the LCL for my experiments.

Also I don't want to implement an *additional* DND mechanism, I just
wanted to have something that enables me to drag files to other
applications which was imposible before. Its not meant to replace LCL
internal DND mechanism, at least not yet in this incomplete state. At
the moment it should only exist as a separate optional component.




More information about the Lazarus mailing list