Graeme Geldenhuys schrieb:
That's the beauty of that design.... internal component-to-component
or external app-to-app DND is handled exactly the same - from the
developers perspective. That was the whole point of that
implementation - so you application is single source, no matter the
platform (and importantly, no IFDEF's).
Very nice, so far.
Internally the fpGUI frame can
optimize for internal component-to-component DND without needing to
speak to the OS or window manager.
This is what may pollute the current design.
I have also note that the fpGUI DND implementation is not 100%
complete yet. Currently I still need to implement the non-text data
transmission. Not hard to implement, because the internal workings are
already implement in fpGUI. I just need to find some time, to complete
the alternative data types handling.
I feel that there remains much more to do. It starts with the assignment
and handling of the existing and possibly added mime types, adding
process information (and more) to the drag info...
- More drag and drop types should be defined, in addition to "drop" and
"dock", e.g. "open files", "link" or "embed". Eventually specialized drag
targets must register themselves, for e.g. accepting files or embedding
objects, in addition do DockSite registration.
I'm all for it. Although I'm not sure that this can be implemented in a
cross-platform way.
I not sure if I understand the original statement, but in fpGUI I use
the mime types to register the data that must be transfered via DND.
Under Windows, I also register common mime-types that have easy
mappings to Windows weird CF_xxx types. So if you register
'text/plain' data in fpGUI, then under Windows, it will also register
CF_TEXT for example.
Clipboard formats (CF_...) may be usable on all platforms with a
comparable/compatible clipboard functionality. But what about all the
other platforms?
On Windows, the intra-app drag/drop is handled using OLE/DDE. On Linux,
there is no such thing, and I think it depends on the used desktop software
(KDE vs Gnome).
Correct, under Windows I use OLE DND, and under Linux I use the XDND
protocol which uses mime-types. The XDND protocol has support for any
data types that you can describe with mime.
Your current implementation is restricted to purely textual information,
and I'm not sure whether your implementation of rich (html...) text will
match the platform standards - with possibly different standards on
every single platform :-(
Question remains: which mime type should be associated with e.g.
dragging files, or forms?
How comes that I cannot drop anything from outside the demo app, and no
other app accepts the "Drag Me!"?
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus