Re: patch for using gtk dnd in unix

From: <msevior_at_physics.unimelb.edu.au>
Date: Fri Jan 26 2007 - 14:13:47 CET

>
> Of course, I realize this is not near to be able to be committed. I plan
> to continue my work on this during the weekend. Thanks to all for your
> comments!
>

Hi Tomeu,
          Thanks for getting this started. Here are a few points. I have
considered doing something like this myself. However if I did it
I would use the gtk dnd code only for displaying the content to
be moved and for connecting the final paste at the end.

The three methods:

FV_VisualDragText::mouseCut(UT_sint32 x, UT_sint32 y)

FV_VisualDragText::mouseCopy(UT_sint32 x, UT_sint32 y)

 FV_VisualDragText::mouseRelease(UT_sint32 x, UT_sint32 y)

Are vital for the operation of the feature. If all possible, resue them.
If you don't reuse them you'll need to reimplent their functionality.

There is actually quite a sophisticated interplay between
ap_EditMethods.cpp, FV_View and FV_VisualText in order to make everything
work in the most transparent method possible to the user. Please try to
reuse this code otherwise a lot of assumotions we be invalid.

Likewise the method:

FV_VisualDragText::getImageFromSelection(UT_sint32 x, UT_sint32 y)

Generates an image from the current selection. I think the easiest thing
would be reuse this method and translate the pixbuf image into the
appropriate mouse icon.

I think that if we want to drag content out of abiword we should allow
this if the drag in the direction requested by the user is already at it's
fullest extent. For example, if the user attempts to drag the selection to
the left, the document is first scrolled as far left as possible then the
content can leave AbiWord to be dropped into a different program.

You need to set up special drop handler to handle the content drop to
arbitary locations. This can be tricky. For example it possible to
visually drag a table column. In this case the content is actually a
number of different rtf selections.

The handler of the drop text will need to be quite sophisticated to do the
right thing with this.

Also note that visual dragged content does not get placed on the clipboard.
Received on Fri Jan 26 14:13:54 2007

This archive was generated by hypermail 2.1.8 : Fri Jan 26 2007 - 14:13:56 CET