[lazarus] Drag and Drop - The Saga Continues

Michal Bukovjan m_bukovjan at advis.cz
Sat Apr 8 03:32:37 EDT 2000


I guess that internal LCL controls are somehow based on something platform
specific anyway (i.e. GTK+/GDK provides canvas, Win32 provides canvas), so we
could look whether the DnD is supported on that canvas level.

This way, all custom controls would inherit the DnD features from canvas /
TCustomControl / TGraphicControl, and the support would be transparent.

Just my theory,

Michal Bukovjan

Marc Weustink wrote:

> 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.
>
> Marc
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>     archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list