Johannes Knaus wrote:
First of all, I simply didn't realize that mouse drag'n'drop did not
work in Lyx and thought this could maybe a platform specific issue, not
a general one.
On Fri, 2009-07-31 at 11:43 -0400, Michael Joyner:
"Drag and drop" text is one the most annoying things I have found with
word processors.
It is too easy to do it by accident, not notice, and output garbage
for people to read.
I can't imagine how one could mark some text with the mouse
hold-and-click it and drag it around by accident.
Openoffice do this now and then. Firefox is very prone to this problem,
but there it doesn't matter as you aren't actually editing the website.
This is what happens:
1. User selects something with the mouse (click+drag+release)
2. User notices that the selection is slightly wrong. Maybe there is
a letter too much or too little selected.
3. User tries to re-do the selection. (click+drag). The selection
is supposed to start in the _same_ position, so it is very easy
to accidentally grab the wrongly selected text.
4. Seeing things go wrong, the user release the mouse button
and the text lands somewhere. :-(
5. The smart user does an angry undo, the not so smart try editing
the document into shape again, the ignorant don't notice what
happened, and merely select the text to be copied and goes on with
that.
I think the discussion on going on here is somewhat dogmatic. Many
people use Ctrl+X and then Ctrl+V to shift textparts around. That's o.k.
and that's what I do as I have no other chance in Lyx to do this.
My point is: Drag and drop is something many Mac Users (I am one) and
Windows users may be very used to in everyday work. So implementing this
feature would make Lyx a little easier to work with when you are new to
Lyx.
If it can be done so that it isn't so accident prone - fine.
Those who don't like drag and drop are not forced to use it, it would be
just another editing option (maybe to be activated or deactivated via
GUI). Still, I don't see the problem in having this feature – if you
want to use it, use it, if not, don't. I don't think this can create any
trouble by accident.
See above. I do use the mouse for selections now and then, even if I use
ctrl+c and ctrl+v to do the copying. Of course, LyX normally uses a nice
large font, so it is somewhat less vulnerable to mis-selection.
It certainly would be a problem, if implementing this feature really
costs a lot of time. I simply don't know this as I'm not a programmer.
Mouse marking is already implemented. So is copy and cut.
So all it takes is to recognise that the user tries to drag the
selection, and drop it somewhere. LyX could then:
1. Change the mouse cursor to a "drag text" cursor, when the drag
starts.
2. Use the existing "copy" code that gets called upon ctrl+c.
3. Move the cursor as if the user had clicked the drop location
4. Use the existing "paste" code as if the user typed ctrl+v
A "copy drag" might be easy. A "move drag" may be trickier, as the
window changes upon "cut". The drop location then moves from where
the pointer is.
Perhaps the cut should be done at the beginning of the drag,
so that the drop location will be valid. On the other hand, that
makes aborting the drag harder instead.
Helge Hafting