[lazarus] CVS changes

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Feb 22 13:11:18 EST 2002

On Fri, 22 Feb 2002 17:15:13 +0100
"Marc Weustink" <Marc.Weustink at cuperus.nl> wrote:

> + From: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de]
> +
> + On Fri, 22 Feb 2002 16:08:17 +0100
> + "Marc Weustink" <Marc.Weustink at cuperus.nl> wrote:
> +
> + > + From: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de]
> + > +
> + > + Shane and I do not like the Delphi way. We want realtime
> + > + wysiwyg. The problem is, that some gtk widgets work
> + > + differently (mouse capturing), which is IMO a bug in the
> + > + gtk-interface.
> + >
> + > [ list of troubles ]
> + >
> + > Still I think (seen the problems you give for
> + > mousecapturing) that dragging a fake image is way
> + > easier than dragging the component itself.
> +
> + Easier?
> Jep, if you drag the (GTK)component, you get (GTK)mousemove events relative
> to the (GTK)component itself. Since the timing of (GTK)mouse events and the
> (GTK)component placement have no relation to each other (depends on when X
> wants to do something), IMO you never get a nice drag.

Ah, u mean easier to implement in the gtk interface. 
AFAIK, the gtk maintains consistency. And even if the placement is not always in sync, it should not matter. Because the aligning stuff of the lcl can also move the component to different positions, than a standard drag. A moving/resizing drag is always only a try and not a must.
The designer should just keep the absolute start mouse position, the start coordinates of all components and the take the current absolute mouse coordinate to calculate the new positions/sizes of all components. I think, that should be possible with all interfaces.
The current problem is, that a few widgets in the gtk-interface does not report the correct absolute mouse coordinates. If the mouse is above such a component, we ask the component, which is under the mouse cursor, for the relative mouse coordinate and calculate the absolute one. And this is a big door for bugs. Is there a way to ask the gtk for the absolute mouse coordinate without the use of the entered widget? 

> + > For dragging
> + > you can grab the image of the component and grab that, so
> + > the one get still the impression one is draging a control.
> + > An advantage maybe is that one still can see the original
> + > place of the component (if one for example wants
> + > to align relative to to original position)
> +
> + Good point. Although I think, that having a component and an
> + stretched image does not look nice.
> I was only refering to dragging, not stretching.

Sorry. Just to prevent misunderstandings: When I talk about dragging in the designer I always mean moving components, resizing components, rubberband, moving form and all stuff that needs dragging.

> + I prefer a dotted rectangle to show the old position. But the nicest way
> would
> + be an transparent image. If we can manage that, then I'm on your side.
> Transparent of the new, or old ?

The new. Opacity about 80%.


More information about the Lazarus mailing list