[lazarus] Drag and Drop - The Saga Continues

Michael A. Hess mhess at miraclec.com
Fri Apr 7 12:09:25 EDT 2000

Shane Miller wrote:
> Method 1:  By tracking the MouseMOve and MouseDown and MouseUp
> messages we can implement drag and drop within the LCL.
> Method 2:  Starting with GTK, it is already built into the widgets.
> What is everyone's thought?  I have implemented it both ways so far.
> The first is quite a bit more involved but it's similiar to the method
> used in Delphi. However, that's not needed in this case.  By remaining
> similiar to Delphi in this case gains us nothing so that should not be
> a deciding factor.

I think it had better be Method 2. Both GTK and Qt have come to an
understanding of their implementations of DnD. Method 1 would make the
DnD part of the LCL and not dependent on a widget set but totally break
inter-application communication. We must be sure that the DnD can
operate outside of the application built with FPC/Lazarus. By using the
GTK/Qt DnD feature we can be sure that dragging outside of our
application to another application can be handled. Also if you look at
some of the ToDo list items with regards to GTK 1.4 they will be adding
more features dealing with DnD. Let's let the widget set handle it so
when those added features become available any existing Lazarus
application will be able to use them with not further work on our part.

Now I just talked about our dragging out to another application. We also
want to be sure that other applications can drag to ours. In other words
we better be able to recognize a drop from another applications. Using
the GTK/Qt DnD built in features will allow us to do just that.

==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com

More information about the Lazarus mailing list