> > > i just implemented DND import (user drags file from eg the=20 > > desktop to my app and the file is being loaded). now i'd like=20 > > to have DND export too. like some box that one can drag from=20 > > to "somewhere on the fs" and which in turn receives that path=20 > > to "somewhere on the fs". is it possible and if so, how, and=20 > > is linux/win and mac supported? > > What platforms are you targeting, and what version of fltk?
fltk 1.1.10 mac win and linux > > FWIW, the DnD support in fltk needs to be a "lowest common denominator" > solution so that it works OK across multiple platforms. > > What this means is that the drop payload is pretty much always treated > as being just a text string, but the various types of meta-data that the > different hosts systems support are not readily accessible. > So you can fill that payload with the pathname of your file (as a text > string) but you may not be able to set whatever attributes the host > system provides to say "this is a reference to a file, not just a string > of text" unless you use platform specific coding. > > Now, it may be that just passing the path and filename is adequate for > your needs? I do not know. > > What are you trying to do? Have you looked at the > howto-drag-and-drop.cxx example in the fltk-1.3 examples folder, it > shows how to get started with this, though probably does not go far > enough for your needs, I guess? yes, i've read the dnd example and it works great, but now i also want it to work the other way around (best would be portable for win, linux and mac): i have some data that i want to write to a file. as another option to using a filebrowser i thought it would be nice if the user could drag the "file" (which doesn't exist yet, its just data in memory) from my program anywhere into the filesystem. if i could know where the user "dropped" (a path is all i need) i could create the file there. does dnd work this way too? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

