> I want to add a way to support custom drop formats to Scintilla.
> ...
> - The drop was handled, but there is nothing for Scintilla to do (say,
> a File was dropped, and a menu poped up, and the user can choose
If you want access to file dropping, this is not the standard
supported way to do it.
SciTE supports file dropping through the DragAcceptFiles API and
subsequent WM_DROPFILES message.
Neil
> I want to add a way to support custom drop formats to Scintilla. This
> is, I think, mostly relevant on windows. I see a need to add five
> things for this:
I'd like to be sure that this was going to be sufficient before
inclusion. When even more functionality is needed, the end point will be
taking over from ScintillaWin's IDropTarget interface completely. In
which case there should be a call to get the current IDropTarget
interface after which RevokeDragDrop and RegisterDragDrop are called to
use the container's IDropTarget. There could be a call to position the
drag caret although that could also be achieved through calling the
original DragOver.
> - Members for the custom clipformats in the ScintillaWin class
> - A new message that allows me to set these (tow arguments: a count
> and a pointer to an array of formats).
To accommodate multiple container languages, arrays are frowned on
unless really necessary. A message to add a format would be more consistent.
> The parent does it's work, and returns telling if
> something was done, and if so, the text of this is dropped in a
> handle.
In Scintilla notifications do not return any form of response code.
The preferred mechanism is to send a message for the exceptional case
which here is probably to abandon default handling of the drop.
The case where the container wants to intercept drops of text should
be considered.
Neil
> Also, it seems that when you register a target,
> you need to provide the supported formats, I have not seens a means per
> se of adding formats later, but that can probably be handled anyway).
You register an IDropTarget. It is called for each drag so the set
of formats that can be accepted can change over time.
Neil