Styled text
The JX Application Framework implements a very simple format for transfering styled text. This is used in the styled text editor for copy/paste and Drag-and-Drop.
Currently, there is only one version: 0
Since this format is used to transfer data between different programs that may contain different versions of the styled text editor, one is required to read and write all versions. Each version has a different atom name. In the list of X Selection target types, one should include the atom for every version that one can write. The requestor should ask for the latest version that is available.
Atom name:
Version 0: "text/x-jxstyled0"
Format:
Version number
Number of characters
One space (ASCII 32) (indicates start of text)
Text (not delimited)
Number of fonts
Name of each font (quote delimited)
Number of colors
{red, green, blue} for each color
Number of style runs
For each style run:
Length
Index into font table
Font size (points)
Bold (T/F)
Italic (T/F)
Strike (T/F)
Number of underlines
Index into color table
All numbers are delimited by spaces to make it easy to read them from an istream object.