Document that the dropping of filenames under X11 produces a URL-encoded, UTF_8 string.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2012-06-10 12:33:04 +00:00
parent 2e2e637c2f
commit 25b66914d5

View File

@ -265,8 +265,16 @@ selection indication. Most modern programs ignore this.
FLTK supports drag and drop of text and files from any
application on the desktop to an FLTK widget. Text is transferred
using UTF-8 encoding. Files are received as a list of full path
and file names, separated by newline. On some platforms, path
names are prepended with <tt>%file://</tt>.
and file names, separated by newline.
On some X11 platforms, files are received as a URL-encoded UTF-8 string,
that is, non-ASCII bytes (and a few others such as space and %) are
replaced by the 3 bytes "%XY" where XY are the byte's hexadecimal value.
The \ref fl_decode_uri() function can be used to transform in-place
the received string into a proper UTF-8 string. On these platforms,
strings corresponding to dropped files are further prepended
by <tt>file://</tt> (or other prefixes such as <tt>computer://</tt>).
See Fl::dnd() for drag and drop from an FLTK widget.
The drag and drop data is available in Fl::event_text()