[lazarus] Drag and Drop - The Saga Continues

Marc Weustink weus at quicknet.nl
Fri Apr 7 15:58:15 EDT 2000

At 12:13 07-04-2000 -0400, Michael A. Hess wrote:
>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.

Just thinking of the following, how is it handled in delphi. Not all 
controls are system widgets, so how is this working.... You cant DnD a 
control to another application ???

I've tried to find it in the help but couldn't find something. Somewhere I 
remembered delphi has two ways of DnD.
One is the internal DnD (begindrag enddrag) this is out method 1
Another is the inter application Dnd, I thought is was called OLE-DnD, but 
couldn't find it and this is more method 2.

Our case is similar not all LCL components have a widget so they need metod 
1 other witgets already have a buildin support.

I think we should find something which works transparent in both ways. I 
don't feel for a solution completely depending on the underlying platform 
and I tend to method 1 for LCL internally while using method 2 outside LCL.
I'll have a closer look to find out if my statements are crap, but hthats 
after thost )@$(@ makefiles.


More information about the Lazarus mailing list