"Kirill M. Katsnelson" <kkm(a)kis.ru> writes:
| It's up to the application to initiate a drag operation. The
win32 user
| interface guidlines recommend that the application should initiate a
| drag operation when the user clicks and holds the left-button (with or
| without modifiers) within selected text. Most applications also initiate
| a drag when the right button (button3 in XEmacs) is used in the same
| way.
Let me pick a nit. Drag is initiated after mouse is moved minimum distance
with a button down.
This is also one of my favorites. Needs some changes to the
mouse-select-some-region stuff...
| On dropping text, the text should be copied if the Ctrl modifier
is held
| down and should be moved if Ctrl isn't down. Mod and Shift are ignored.
| Some applications display a popup menu when text is dropped with the
| right button: the menu offers the user the choice of copying or moving
| the text. We probably don't need to bother with this and can just treat
| a right-button like a left-button. The button and modifier state is
| ignored for file drops.
Not exactly. They may have the same meaning for drop targets which are
file containers. What does dropping a file on a dired buffer mean?
My current plan to implent the drop API goes the following way:
- a drop is received by the protocol depended code (certainly c)
- the drop is converted to a misc-user-event with dragdrop-drop-dispatch as
function
** until here it is implemented **
- dragdrop-drop-dispatch (I' currently working on this -- expect patch this
evening):
+ looks if the drop is inside some buffer
yes:
* check for a extend at point that defines dragdrop-drop-rules
and if it's there, do whatever it asks
* check for a buffer local variable called dragdrop-drop-rules
and if there is one, do whatever it asks
* do the some for the mode
* look for some global
* do the default stuff
no:
* semilar to the yes part
Note: how this rules look like is still open...
Drop (and later drag) data is always one or more URLs or MIME data. This seems
to be the best way to handle data application independant in a heterogenous
environment. The protocol code has to do the proper conversions.
Having a menu displayed on a right-button drop is a big plus. Pie in
the
sky but the DND abstraction should not deny this.
Not exactly, cause it depends on the code what the code does. A popup is
certainly possible.
Regards,
Oliver.