On 12/12/2011 04:44 AM, Albrecht Schlosser wrote:
> Am 12.12.2011 00:12, Ian MacArthur wrote:

> 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.

This is true of X as well.

> 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.

On X the conversion is always delayed. On Windows this is optional, but 
FLTK uses it.

X DnD is somewhat better as they realized it is the same thing as cut & 
paste. On Windows it looks like DnD is a complete mess and no code is 
shared at all between it and the clipboard.

> 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 this works on Windows. FLTK converts the UTF8 to UTF16 and 
back again when going to the clipboard. I'm not sure what happens with 
UTF8 but I believe it fails to work in far too many applications.

> 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?

I think the clipboard should remain text and contain a URL for any 
non-text data.
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to