> > > >> Talking about copy/paste on windows at least apparently > the clipboard can > >> hold a reference for the original source and in case the > receiver can't > >> handle the original code it's converted somehow to plain > text sometimes. > ... > > > I think the fltk core just basically says (whether acting > as a sender or as a receiver) that it can handle UTF8 plain > text, and nothing else, > > Yep, that's true, IIRC. > > > so ideally the app would convert whatever it has into plain > text before the clipboard was loaded. > > > > Though there are subtleties to this I am glossing over and > there may well be bits of this I simply do not understand... > > I'm not sure if I'm mixing something from Windows and X, but maybe > they are very similar in this regard. That said,... > > At least on Windows, you can push more than one format (text, html, > image, whatever) to the clipboard, and the receiver can request more > than one format. IIRC, the order the receiver requests the format is > used to match the best format in the clipboard.
(From memory only, I have not checked recently!) I don't think X11 DnD can work like this it is more like... > Second, you can delay the conversion (and actually putting anything > on the clipboard) until the receiver decided which format it requests. > Of course, the sender must specify which format(s) it can supply. This > is maybe only true for drag'n'drop though, since normal copying to the > clipboard can not be delayed. Maybe. This is, I think, what DnD under X11 does. The conversion happens when the receiver asks for one of the formats the sender claimed it knew how to send... > Third (again I know for sure only from Windows) the OS can convert > some compatible formats (e.g. UTF-8 text and "ANSI" text, as it is > called in Windows, or Wide Character format, and also some different > graphics formats like bitmaps and JPEG). I don't think the X11 layer supports any "magic" translations - it is only the messenger, the sender has to do the actual work. > > The question is: in which cases could FLTK improve it to provide > multiple clipboard formats? I can only think of Fl_Help_View (html > and oridinary text). Anything else? The original context of the question was striping markup (of any sort) from fltk labels, e.g. the escaping (or not) of "@" symbols etc. So I guess any sort of markup, really. However, if we exposed more of the underlying logic, we might make it easier to DnD binary blobs or files around. At present, if I want to drag a PNG image from my app to another app, all I can do is send a path / UNC / whatever to locate the file, as that is all that will fit in a plain-text string. And generally, that's OK. But some apps could actually take the PNG blob directly, if I could send it that way. Or... SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
