Arbortext Command Language > Callbacks > session_add_callback > drop_file_over
  
drop_file_over
Function prototype:
function funcname(op, count, flags)
drop_file_over is called to receive more information on the progress of a drag and drop operation and to provide feedback that will cause different mouse pointers, and possibly a drop cursor, to be displayed or not. The callback might be called multiple times (possibly hundreds of times) for a single drag and drop operation as the mouse pointer moves over the window, so should be written as efficiently as possible.
The drop file operation ends with either a call to the drop_file callback or a final call to the drop_file_over callback indicating that the drag and drop operation has been cancelled or is no longer over the Arbortext Editor window. If multiple drop_file_over callbacks are registered, the first callback that does not return -1 determines what action will be taken. Any remaining callbacks will not be called until the mouse moves.
Arguments:
op is an operation code that has the following possible values:
1 — Indicates that a drag and drop operation is over the Arbortext Editor window.
2 — Indicates that a previously started drag and drop operation is no longer over the Arbortext Editor window. This value is only made if the drag and drop operation is canceled or the mouse pointer leaves the Arbortext Editor window.
count is the number of files being dropped by the operation.
flags is a bit mask giving the following information about the drop operation:
0x0001 — The Shift key is pressed.
0x0002 — The Ctrl key is pressed.
0x0004 — The path specifies a graphic file.
0x0008 — The Alt key is pressed.
The function returns one of the following codes:
-1 — Indicates processing should continue.
That is, the next drop_file_over callback is called or default system processing is used to determine what mouse pointer and drop cursor to display.
0 — Indicates that the request is not allowed at this point.
In this case, the drop_file callback, if any, will not be called.
1 — Indicates that the request is allowed and will result in a file open operation that is independent of the mouse position at the time of the drop.
2 — Indicates that a drop at this point will result in an insertion and that a drop insertion cursor should be drawn to show the point of insertion.
* 
This callback is only available on the Windows platform.
Related Topics
drop_file_info function