RichText, RichEdit, Qtf: added horizontal ruler, optimized language encoding in Qtf

git-svn-id: svn://ultimatepp.org/upp/trunk@415 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-09-09 14:24:23 +00:00
parent fa5ab4b386
commit eae373679d
3 changed files with 276 additions and 252 deletions

View file

@ -22,18 +22,19 @@ String FmtColor(Color c)
return Sprintf("(%d.%d.%d)", c.GetR(), c.GetG(), c.GetB());
}
String LngFmt(const RichPara::CharFormat& a, const RichPara::CharFormat& b, dword lang)
void LngFmt(String& fmt, dword l, dword lang)
{
String fmt;
if(lang != (dword)b.language)
if(b.language)
fmt << "%" << LNGAsText(b.language);
if(lang != (dword)l)
if(l == 0)
fmt << "%-";
else
fmt << "%" << "00-00";
return fmt;
if(l == LNG_ENGLISH)
fmt << "%%";
else
fmt << "%" << LNGAsText(l);
}
void CharFmt(String& fmt, const RichPara::CharFormat& a, const RichPara::CharFormat& b, dword lang)
void CharFmt(String& fmt, const RichPara::CharFormat& a, const RichPara::CharFormat& b)
{
if(a.IsBold() != b.IsBold()) fmt.Cat('*');
if(a.IsItalic() != b.IsItalic()) fmt.Cat('/');
@ -182,13 +183,22 @@ void QTFEncodePara(String& qtf, const RichPara& p, const RichPara::Format& style
{
int d = qtf.GetLength();
QTFEncodeParaFormat(qtf, p.format, style);
CharFmt(qtf, style, p.format, lang);
if(p.part.GetCount()) {
dword l = p.part.Top().format.language;
LngFmt(qtf, l, lang);
lang = l;
}
else {
CharFmt(qtf, style, p.format);
LngFmt(qtf, p.format.language, lang);
}
qtf.Cat(' ');
d = qtf.GetLength() - d;
for(int i = 0; i < p.part.GetCount(); i++) {
const RichPara::Part& part = p.part[i];
String cf = LngFmt(p.format, part.format, lang);
CharFmt(cf, p.format, part.format, lang);
String cf;
LngFmt(cf, part.format.language, lang);
CharFmt(cf, p.format, part.format);
if(!cf.IsEmpty()) {
qtf << '[' << cf << ' ';
d += cf.GetLength();
@ -456,7 +466,7 @@ String AsQTF(const RichText& text, byte charset, dword options)
const RichStyle& s = text.GetStyle(id);
qtf << '[';
QTFEncodeParaFormat(qtf, s.format, dpf);
CharFmt(qtf, dpf, s.format, s.format.language);
CharFmt(qtf, dpf, s.format);
qtf << ' ';
qtf << "$$" << i << ',' << max(sm.Find(s.next), 0)
<< '#' << Format(id)

View file

@ -615,9 +615,20 @@ void RichQtfParser::Parse(const char *qtf, byte _accesskey)
}
case '%': {
String h;
while(*term && h.GetLength() < 5)
h.Cat(*term++);
format.language = LNGFromText(h);
if(*term == '-') {
format.language = 0;
term++;
}
else
if(*term == '%') {
format.language = LNG_ENGLISH;
term++;
}
else {
while(*term && h.GetLength() < 5)
h.Cat(*term++);
format.language = LNGFromText(h);
}
break;
}
default:

View file

@ -32,94 +32,94 @@ of inch.&]
[s0; Colors are described as either number [@(128.0.255) 0]`-[@(128.0.255) 9],
with meaning&]
[s0; &]
[ {{1000:1000:1000:1000:1000:1000:1000:1000:1000:1000<96;>96;f4; [s0;=* [%00-00 0]]
:: [s0;=* [%00-00 1]]
:: [s0;=* [%00-00 2]]
:: [s0;=* [%00-00 3]]
:: [s0;=* [%00-00 4]]
:: [s0;=* [%00-00 5]]
:: [s0;=* [%00-00 6]]
:: [s0;=* [%00-00 7]]
:: [s0;=* [%00-00 8]]
:: [s0;=* [%00-00 9]]
::l/0r/0t/0b/0@0 [s0;0 ]
::@1 [s0;0 ]
::@2 [s0;0 ]
::@3 [s0;0 ]
::@4 [s0;0 ]
::@5 [s0;0 ]
::@6 [s0;0 ]
::@7 [s0;0 ]
::@8 [s0;0 ]
::@9 [s0;0 ]
::l/25r/25t/15b/15@2 [s0;=1 [%00-00 Black]]
:: [s0;=1 LtGray]
:: [s0;=1 White]
:: [s0;=1 [%00-00 Red]]
:: [s0;=1 [%00-00 Green]]
:: [s0;=1 [%00-00 Blue]]
:: [s0;=1 [%00-00 LtRed]]
:: [s0;=1 [%00-00 WhiteGray]]
:: [s0;=1 [%00-00 LtCyan]]
:: [s0;=1 [%00-00 Yellow]]}}&]
[ {{1000:1000:1000:1000:1000:1000:1000:1000:1000:1000<96;>96;f4; [s0;* [%00-00 0]]
:: [s0;* [%00-00 1]]
:: [s0;* [%00-00 2]]
:: [s0;* [%00-00 3]]
:: [s0;* [%00-00 4]]
:: [s0;* [%00-00 5]]
:: [s0;* [%00-00 6]]
:: [s0;* [%00-00 7]]
:: [s0;* [%00-00 8]]
:: [s0;* [%00-00 9]]
::l/0r/0t/0b/0@0 [s0; ]
::@1 [s0; ]
::@2 [s0; ]
::@3 [s0; ]
::@4 [s0; ]
::@5 [s0; ]
::@6 [s0; ]
::@7 [s0; ]
::@8 [s0; ]
::@9 [s0; ]
::l/25r/25t/15b/15@2 [s0;1 [%00-00 Black]]
:: [s0;1 LtGray]
:: [s0;1 White]
:: [s0;1 [%00-00 Red]]
:: [s0;1 [%00-00 Green]]
:: [s0;1 [%00-00 Blue]]
:: [s0;1 [%00-00 LtRed]]
:: [s0;1 [%00-00 WhiteGray]]
:: [s0;1 [%00-00 LtCyan]]
:: [s0;1 [%00-00 Yellow]]}}&]
[s0; &]
[s0; or letters&]
[s0; &]
[ {{1109:1109:1109:1109:1109:1109:1109:1109:1128<96;>96;f4; [s0;=*C@(128.0.255) [%00-00 b]]
:: [s0;=*C@(128.0.255) [%00-00 c]]
:: [s0;=*C@(128.0.255) [%00-00 g]]
:: [s0;=*C@(128.0.255) [%00-00 k]]
:: [s0;=*C@(128.0.255) [%00-00 l]]
:: [s0;=*C@(128.0.255) [%00-00 m]]
:: [s0;=*C@(128.0.255) [%00-00 o]]
:: [s0;=*C@(128.0.255) [%00-00 r]]
:: [s0;=*C@(128.0.255) [%00-00 y]]
::l/0r/0t/0b/0@5 [s0;0 ]
::@(0.128.128) [s0;0 ]
::@4 [s0;0 ]
::@0 [s0;0 ]
::@1 [s0;0 ]
::@(128.0.255) [s0;0 ]
::@(128.128.0) [s0;0 ]
::@3 [s0;0 ]
::@9 [s0;0 ]
::l/25r/25t/15b/15@2 [s0;=1 [%00-00 Blue]]
:: [s0;=1 [%00-00 Cyan]]
:: [s0;=1 [%00-00 Green]]
:: [s0;=1 [%00-00 Black]]
:: [s0;=1 [%00-00 LtGray]]
:: [s0;=1 [%00-00 Magenta]]
:: [s0;=1 [%00-00 Brown]]
:: [s0;=1 [%00-00 Red]]
:: [s0;=1 [%00-00 Yellow]]}}&]
[ {{1109:1109:1109:1109:1109:1109:1109:1109:1128<96;>96;f4; [s0;*C@(128.0.255) [%00-00 b]]
:: [s0;*C@(128.0.255) [%00-00 c]]
:: [s0;*C@(128.0.255) [%00-00 g]]
:: [s0;*C@(128.0.255) [%00-00 k]]
:: [s0;*C@(128.0.255) [%00-00 l]]
:: [s0;*C@(128.0.255) [%00-00 m]]
:: [s0;*C@(128.0.255) [%00-00 o]]
:: [s0;*C@(128.0.255) [%00-00 r]]
:: [s0;*C@(128.0.255) [%00-00 y]]
::l/0r/0t/0b/0@5 [s0; ]
::@(0.128.128) [s0; ]
::@4 [s0; ]
::@0 [s0; ]
::@1 [s0; ]
::@(128.0.255) [s0; ]
::@(128.128.0) [s0; ]
::@3 [s0; ]
::@9 [s0; ]
::l/25r/25t/15b/15@2 [s0;1 [%00-00 Blue]]
:: [s0;1 [%00-00 Cyan]]
:: [s0;1 [%00-00 Green]]
:: [s0;1 [%00-00 Black]]
:: [s0;1 [%00-00 LtGray]]
:: [s0;1 [%00-00 Magenta]]
:: [s0;1 [%00-00 Brown]]
:: [s0;1 [%00-00 Red]]
:: [s0;1 [%00-00 Yellow]]}}&]
[s0; &]
[ {{1109:1109:1109:1109:1109:1109:1109:1109:1128<96;>96;f4; [s0;=*@(128.0.255) [%00-00 B]]
:: [s0;=*@(128.0.255) [%00-00 C]]
:: [s0;=*@(128.0.255) [%00-00 G]]
:: [s0;=*@(128.0.255) [%00-00 K]]
:: [s0;=*@(128.0.255) [%00-00 L]]
:: [s0;=*@(128.0.255) [%00-00 M]]
:: [s0;=*@(128.0.255) [%00-00 W]]
:: [s0;=*@(128.0.255) [%00-00 R]]
:: [s0;=*@(128.0.255) [%00-00 Y]]
::l/0r/0t/0b/0@(0.0.255) [s0;0 ]
::@8 [s0;0 ]
::@(0.255.0) [s0;0 ]
::@(128) [s0;0 ]
::@(238) [s0;0 ]
::@(255.0.255) [s0;0 ]
::@2 [s0;0 ]
::@6 [s0;0 ]
::@(255.255.180) [s0;0 ]
::l/25r/25t/15b/15@2 [s0;=1 [%00-00 LtBlue]]
:: [s0;=1 [%00-00 LtCyan]]
:: [s0;=1 [%00-00 LtGreen]]
:: [s0;=1 [%00-00 Gray]]
:: [s0;=1 [%00-00 WhiteGray]]
:: [s0;=1 [%00-00 LtMagenta]]
:: [s0;=1 [%00-00 White]]
:: [s0;=1 [%00-00 LtRed]]
:: [s0;=1 [%00-00 LtYellow]]}}&]
[ {{1109:1109:1109:1109:1109:1109:1109:1109:1128<96;>96;f4; [s0;*@(128.0.255) [%00-00 B]]
:: [s0;*@(128.0.255) [%00-00 C]]
:: [s0;*@(128.0.255) [%00-00 G]]
:: [s0;*@(128.0.255) [%00-00 K]]
:: [s0;*@(128.0.255) [%00-00 L]]
:: [s0;*@(128.0.255) [%00-00 M]]
:: [s0;*@(128.0.255) [%00-00 W]]
:: [s0;*@(128.0.255) [%00-00 R]]
:: [s0;*@(128.0.255) [%00-00 Y]]
::l/0r/0t/0b/0@(0.0.255) [s0; ]
::@8 [s0; ]
::@(0.255.0) [s0; ]
::@(128) [s0; ]
::@(238) [s0; ]
::@(255.0.255) [s0; ]
::@2 [s0; ]
::@6 [s0; ]
::@(255.255.180) [s0; ]
::l/25r/25t/15b/15@2 [s0;1 [%00-00 LtBlue]]
:: [s0;1 [%00-00 LtCyan]]
:: [s0;1 [%00-00 LtGreen]]
:: [s0;1 [%00-00 Gray]]
:: [s0;1 [%00-00 WhiteGray]]
:: [s0;1 [%00-00 LtMagenta]]
:: [s0;1 [%00-00 White]]
:: [s0;1 [%00-00 LtRed]]
:: [s0;1 [%00-00 LtYellow]]}}&]
[s0; &]
[s0; or as the RGB value in form&]
[s0; &]
@ -143,13 +143,13 @@ with meaning&]
[s2; Basic QTF codes&]
[s0; &]
[s0; &]
[ {{2003:7997<96;>96; [s1;C `_]
[ {{2003:7997<96;>96; [s0;C@(128.0.255) `_]
:: [s0; Hard`-space `- space that cannot be divided at the end of line.]
:: [s1;C `&]
:: [s0;C@(128.0.255) `&]
:: [s0; New paragraph.]
:: [s1;C `-`|]
:: [s0;C@(128.0.255) `-`|]
:: [s0; Tabulator]
:: [s1;C `@`$[*@(0.0.255) hex][%00-00 ;]]
:: [s0;C@(128.0.255) `@`$[*@(0.0.255) hex][%00-00 ;]]
:: [s0; Unicode character as hexadecimal number.]}}&]
[s0; &]
[s0; &]
@ -167,211 +167,214 @@ matching&]
[s0;@(128.0.255) &]
[s0; is encountered.&]
[s0; &]
[ {{1879:8121^@(229.229.248)-1 [s1;*/@0 Character/paragraph formating sequence]
[ {{1879:8121^@(229.229.248)-1 [s0;*/ Character/paragraph formating sequence]
::=@2 [s0; ]
::^ [s1;C [%00-00 /]]
::^ [s0;C@(128.0.255) [%00-00 /]]
::= [s0; Italic.]
::^ [s1;C [%00-00 `*]]
::^ [s0;C@(128.0.255) [%00-00 `*]]
::= [s0; Bold.]
::^ [s1;C [%00-00 `_]]
::^ [s0;C@(128.0.255) [%00-00 `_]]
::= [s0; Underline.]
::^ [s1;C [%00-00 `-]]
::^ [s0;C@(128.0.255) [%00-00 `-]]
::= [s0; Strikeout.]
::^ [s1;C [%00-00 c]]
::^ [s0;C@(128.0.255) [%00-00 c]]
::= [s0; Capitals.]
::^ [s1;C [%00-00 ``]]
::^ [s0;C@(128.0.255) [%00-00 ``]]
::= [s0; Superscript.]
::^ [s1;C [%00-00 ,]]
::^ [s0;C@(128.0.255) [%00-00 ,]]
::= [s0; Subscript.]
::^ [s1;C [%00-00 d]]
::^ [s0;C@(128.0.255) [%00-00 d]]
::= [s0; Dashed underline.]
::^ [s1;C [%00-00 t]]
::^ [s0;C@(128.0.255) [%00-00 t]]
::= [s0; Non anti aliased font.]
::^ [s1;C [%00-00 `^][%00-00/@(0.0.255) text][%00-00 `^]]
::^ [s0;C@(128.0.255) [%00-00 `^][%00-00/@(0.0.255) text][%00-00 `^]]
::= [s0; Hyperlink.]
::^ [s1;C [%00-00 I][%00-00/@(0.0.255) text][%00-00 ;]]
::^ [s0;C@(128.0.255) [%00-00 I][%00-00/@(0.0.255) text][%00-00 ;]]
::= [s0; Index entry.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) `+][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) `+][%00-00 number]]
::= [s0; Font height in dots.]
::^ [s1;C [%00-00 0]]
::^ [s0;C@(128.0.255) [%00-00 0]]
::= [s0; Font height 50 dots (6 points).]
::^ [s1;C [%00-00 1]]
::^ [s0;C@(128.0.255) [%00-00 1]]
::= [s0; Font height 67 dots (8 points).]
::^ [s1;C [%00-00 2]]
::^ [s0;C@(128.0.255) [%00-00 2]]
::= [s0; Font height 84 dots (10 points).]
::^ [s1;C [%00-00 3]]
::^ [s0;C@(128.0.255) [%00-00 3]]
::= [s0; Font height 100 dots (12 points).]
::^ [s1;C [%00-00 4]]
::^ [s0;C@(128.0.255) [%00-00 4]]
::= [s0; Font height 134 dots (16 points).]
::^ [s1;C [%00-00 5]]
::^ [s0;C@(128.0.255) [%00-00 5]]
::= [s0; Font height 167 dots (20 points).]
::^ [s1;C [%00-00 6]]
::^ [s0;C@(128.0.255) [%00-00 6]]
::= [s0; Font height 200 dots (24 points).]
::^ [s1;C [%00-00 7]]
::^ [s0;C@(128.0.255) [%00-00 7]]
::= [s0; Font height 234 dots (28 points).]
::^ [s1;C [%00-00 8]]
::^ [s0;C@(128.0.255) [%00-00 8]]
::= [s0; Font height 300 dots (36 points).]
::^ [s1;C [%00-00 9]]
::^ [s0;C@(128.0.255) [%00-00 9]]
::= [s0; Font height 400 dots (48 points).]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) `@][%00-00 color]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) `@][%00-00 color]]
::= [s0; Text color.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) `$][%00-00 color]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) `$][%00-00 color]]
::= [s0; Text background color.]
::^ [s1;C [%00-00 A]]
::^ [s0;C@(128.0.255) [%00-00 A]]
::= [s0; Arial font.]
::^ [s1;C [%00-00 R]]
::^ [s0;C@(128.0.255) [%00-00 R]]
::= [s0; Times New Roman font.]
::^ [s1;C [%00-00 C]]
::^ [s0;C@(128.0.255) [%00-00 C]]
::= [s0; Courier font.]
::^ [s1;C [%00-00 G]]
::^ [s0;C@(128.0.255) [%00-00 G]]
::= [s0; Standard GUI font.]
::^ [s1;C [%00-00 S]]
::^ [s0;C@(128.0.255) [%00-00 S]]
::= [s0; Symbol font.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) .][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) .][%00-00 number]]
::= [s0; Font with specified font [/@(0.0.255) number].]
::^ [s1;C [%00-00 !][%00-00/@(0.0.255) text][%00-00 !]]
::^ [s0;C@(128.0.255) [%00-00 !][%00-00/@(0.0.255) text][%00-00 !]]
::= [s0; Font with face name equal to [/@(0.0.255) text]. If such font
does not exist on system, Arial is used.]
::^ [s1;C [%00-00 `{][%00-00/@(0.0.255) charset][%00-00 `}]&]
[s1;C ]
[s0; ]
::= [s0; Character set. It can be defined as either single character&]
[s0; &]
[ {{1840:8160<330;>1757;f4;h1; [s1;=C `_]
[ {{1840:8160<330;>1757;f4;h1; [s0;C@(128.0.255) `_]
:: [s0; utf`-8]
:: [s1;=C 0]
:: [s0;C@(128.0.255) 0]
:: [s0; windows`-1250]
:: [s1;=C 1]
:: [s0;C@(128.0.255) 1]
:: [s0; windows`-1251]
:: [s1;=C 2]
:: [s0;C@(128.0.255) 2]
:: [s0; windows`-1252]
:: [s1;=C 3]
:: [s0;C@(128.0.255) 3]
:: [s0; windows`-1253]
:: [s1;=C 4]
:: [s0;C@(128.0.255) 4]
:: [s0; windows`-1254]
:: [s1;=C 5]
:: [s0;C@(128.0.255) 5]
:: [s0; windows`-1255]
:: [s1;=C 6]
:: [s0;C@(128.0.255) 6]
:: [s0; windows`-1256]
:: [s1;=C 7]
:: [s0;C@(128.0.255) 7]
:: [s0; windows`-1257]
:: [s1;=C A]
:: [s0;C@(128.0.255) A]
:: [s0; iso`-8859`-1]
:: [s1;=C B]
:: [s0;C@(128.0.255) B]
:: [s0; iso`-8859`-2]
:: [s1;=C C]
:: [s0;C@(128.0.255) C]
:: [s0; iso`-8859`-3]
:: [s1;=C D]
:: [s0;C@(128.0.255) D]
:: [s0; iso`-8859`-4]
:: [s1;=C E]
:: [s0;C@(128.0.255) E]
:: [s0; iso`-8859`-5]
:: [s1;=C F]
:: [s0;C@(128.0.255) F]
:: [s0; iso`-8859`-6]
:: [s1;=C G]
:: [s0;C@(128.0.255) G]
:: [s0; iso`-8859`-7]
:: [s1;=C H]
:: [s0;C@(128.0.255) H]
:: [s0; iso`-8859`-8]
:: [s1;=C I]
:: [s0;C@(128.0.255) I]
:: [s0; iso`-8859`-9]
:: [s1;=C J]
:: [s0;C@(128.0.255) J]
:: [s0; iso`-8859`-10]}}&]
[s0; &]
[s0; or as the string designating character set (example: [*C@3 `"`[`{`_`}_...`]`"][* ,
][*C@3 `"`[`{windows`-1250`}_...`]`"]).]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) %][%00-00 lang]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) %][%00-00 lang]]
::= [s0; Language. It is defined in form [@(0.0.255) XX]`-[@(0.0.255) YY],
according to ISO 639 and ISO 3166 standards. (example: [*C@3 `"`[%EN`-US_...`]`"]).
[*C@3 `"`[%00`-00_`"] represents `"none`" language.]
::^ [s1;C [%00-00 :][%00-00/@(0.0.255) text][%00-00 :]]
[*C@3 `"`[%00`-00_`"] represents `"none`" language. As special
optimization, [*@(128.0.255) %`-] is equivalent to [@(128.0.255) %][@(0.0.255) 00`-00]
(no language) and&]
[s0; [@(128.0.255) %%] is equivalent to [@(128.0.255) %][@(0.0.255) EN`-US].]
::^ [s0;C@(128.0.255) [%00-00 :][%00-00/@(0.0.255) text][%00-00 :]]
::= [s0; Paragraph label.]
::^ [s1;C [%00-00 <]]
::^ [s0;C@(128.0.255) [%00-00 <]]
::= [s0; Align paragraph left.]
::^ [s1;C [%00-00 `=]]
::^ [s0;C@(128.0.255) [%00-00 `=]]
::= [s0; Center paragraph.]
::^ [s1;C [%00-00 >]]
::^ [s0;C@(128.0.255) [%00-00 >]]
::= [s0; Align paragraph right.]
::^ [s1;C [%00-00 #]]
::^ [s0;C@(128.0.255) [%00-00 #]]
::= [s0; Justify paragraph.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) l][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) l][%00-00 number]]
::= [s0; Left margin in dots.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) r][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) r][%00-00 number]]
::= [s0; Right margin in dots.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) i][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) i][%00-00 number]]
::= [s0; Indent in dots.]
::^ [s1;C [%00-00 pn]]
::^ [s0;C@(128.0.255) [%00-00 pn]]
::= [s0; Line spacing 1.0.]
::^ [s1;C [%00-00 ph]]
::^ [s0;C@(128.0.255) [%00-00 ph]]
::= [s0; Line spacing 1.5.]
::^ [s1;C [%00-00 pd]]
::^ [s0;C@(128.0.255) [%00-00 pd]]
::= [s0; Line spacing 2.0.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) H][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) H][%00-00 number]]
::= [s0; Horizontal ruler height (if zero, there is no ruler).]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) h][%00-00 color]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) h][%00-00 color]]
::= [s0; Color of horizontal ruler (default is black).]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) b][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) b][%00-00 number]]
::= [s0; Space before paragraph in dots.]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) a][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) a][%00-00 number]]
::= [s0; Space after paragraph in dots.]
::^ [s1;C [%00-00 P]]
::^ [s0;C@(128.0.255) [%00-00 P]]
::= [s0; Page break before paragraph.]
::^ [s1;C [%00-00 k]]
::^ [s0;C@(128.0.255) [%00-00 k]]
::= [s0; Keep paragraph on single page.]
::^ [s1;C [%00-00 K]]
::^ [s0;C@(128.0.255) [%00-00 K]]
::= [s0; Keep paragraph on same page as next one.]
::^ [s1;C [%00-00 Q]]
::^ [s0;C@(128.0.255) [%00-00 Q]]
::= [s0; Orphan control.]
::^ [s1;C [%00-00 n][%00-00/@(0.0.255) text][%00-00 ;]]
::^ [s0;C@(128.0.255) [%00-00 n][%00-00/@(0.0.255) text][%00-00 ;]]
::= [s0; Text to insert before paragraph number.]
::^ [s1;C [%00-00 m][%00-00/@(0.0.255) text][%00-00 ;]]
::^ [s0;C@(128.0.255) [%00-00 m][%00-00/@(0.0.255) text][%00-00 ;]]
::= [s0; Text to insert after paragraph number.]
::^ [s1;C [%00-00 N]]
::^ [s0;C@(128.0.255) [%00-00 N]]
::= [s0; Numbering. It is followed by up to 8 characters defining numbering
style of each level&]
[s0; &]
[ {{864:9136<342;>861;f4; [s0;=C@(128.0.255) `-]
[ {{864:9136<342;>861;f4; [s0;C@(128.0.255) `-]
:: [s0; Level is not used.]
:: [s0;=C@(128.0.255) 1]
:: [s0;C@(128.0.255) 1]
:: [s0; Numbers, starting with 1.]
:: [s0;=C@(128.0.255) 0]
:: [s0;C@(128.0.255) 0]
:: [s0; Numbers, starting with 0.]
:: [s0;=C@(128.0.255) a]
:: [s0;C@(128.0.255) a]
:: [s0; Lowercase letters, starting with a.]
:: [s0;=C@(128.0.255) A]
:: [s0;C@(128.0.255) A]
:: [s0; Uppercase letters, starting with A.]
:: [s0;=C@(128.0.255) i]
:: [s0;C@(128.0.255) i]
:: [s0; Lowercase roman numbers, starting with i.]
:: [s0;=C@(128.0.255) I]
:: [s0;C@(128.0.255) I]
:: [s0; Uppercase roman numbers, starting with I]}}&]
[s0; ]
::^ [s1;C [%00-00 o]]
::= [s0;i150;O0; Bullet style.]
::^ [s1;C [%00-00 O`_]]
::^ [s0;C@(128.0.255) [%00-00 o]]
::= [s0; Bullet style.]
::^ [s0;C@(128.0.255) [%00-00 O`_]]
::= [s0; No bullet.]
::^ [s1;C [%00-00 O0]]
::= [s0;i150;O0; Bullet style.]
::^ [s1;C [%00-00 O1]]
::= [s0;i150;O1; Bullet style.]
::^ [s1;C [%00-00 O2]]
::= [s0;i150;O2; Bullet style.]
::^ [s1;C [%00-00 O3]]
::= [s0;i150;O3; Bullet style.]
::^ [s1;C [%00-00 O9]]
::^ [s0;C@(128.0.255) [%00-00 O0]]
::= [s0; Bullet style.]
::^ [s0;C@(128.0.255) [%00-00 O1]]
::= [s0; Bullet style.]
::^ [s0;C@(128.0.255) [%00-00 O2]]
::= [s0; Bullet style.]
::^ [s0;C@(128.0.255) [%00-00 O3]]
::= [s0; Bullet style.]
::^ [s0;C@(128.0.255) [%00-00 O9]]
::= [s0; Text bullet style.]
::^ [s1;C [%00-00 `~]]
::^ [s0;C@(128.0.255) [%00-00 `~]]
::= [s0; Tabulator setting. Can be followed by character designating
type of tabulation&]
[s0; &]
[ {{864:9136<342;>861;f4; [s0;=C@(128.0.255) >]
[ {{864:9136<342;>861;f4; [s0;C@(128.0.255) >]
:: [s0; Normal tabulation.]
:: [s0;=C@(128.0.255) <]
:: [s0;C@(128.0.255) <]
:: [s0; Left tabulation.]
:: [s0;=C@(128.0.255) `=]
:: [s0;C@(128.0.255) `=]
:: [s0; Centered tabulation.]}}&]
[s0; &]
[s0; (default is normal) and by filler character &]
[s0; &]
[ {{3312:3436:3252<342;>861;f4; [s0;=C@(128.0.255) .]
:: [s0;=C@(128.0.255) `-]
:: [s0;=C@(128.0.255) `_]}}&]
[ {{3312:3436:3252<342;>861;f4; [s0;C@(128.0.255) .]
:: [s0;C@(128.0.255) `-]
:: [s0;C@(128.0.255) `_]}}&]
[s0; &]
[s0; and must be followed by number specifying tabulator position
in dots.&]
@ -379,7 +382,7 @@ in dots.&]
[s0; When followed by [C@(128.0.255) `~] ([*C@3 `"`~`~`"]), clears all
current tab settings (including those inherited from paragraph
style).]
::^ [s1;C [%00-00 ;]]
::^ [s0;C@(128.0.255) [%00-00 ;]]
::= [s0;*C@3 [*A@0 NOP separator. In some cases it is needed to separate
command code. Example: ]`"`[l200;4 `"]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) s]number&]
@ -397,15 +400,15 @@ formatting sequence with&]
[s0; &]
[s0; instead of text, where&]
[s0; &]
[ {{1879:8121^ [s1;@(0.0.255) [%00-00 number]]
[ {{1879:8121^ [s0;@(0.0.255) [%00-00 number]]
:: [s0; Number of style `- can be used with [@(128.0.255) s] paragraph
format command code.]
:: [s1;@(0.0.255) [%00-00 nnumber]]
:: [s0;@(0.0.255) [%00-00 nnumber]]
:: [s0; Number of style of next paragraph `- used by RichText editor
when inserting paragraphs.]
:: [s1;@(0.0.255) [%00-00 uuid]]
:: [s0;@(0.0.255) [%00-00 uuid]]
:: [s0; 32 digit unique hexadecimal identifier of style.]
:: [s1;@(0.0.255) [%00-00 name]]
:: [s0;@(0.0.255) [%00-00 name]]
:: [s0; Name of style, displayed by editors. Can also be used with [@(128.0.255) s]
paragraph format command code.]}}&]
[s0; &]
@ -426,12 +429,12 @@ according to its type. It is started with a header in the form&]
[s0;@(0.0.255) &]
[s0; [%00-00 where]&]
[s0; &]
[ {{1879:8121^ [s1;@(0.0.255) format]
[ {{1879:8121^ [s0;@(0.0.255) format]
:: [s0; Format of objects. This format must be recognized by the application.
By default, RichText recognizes the PNG format.]
:: [s1;@(0.0.255) cx]
:: [s0;@(0.0.255) cx]
:: [s0; Width of object in dots.]
:: [s1;@(0.0.255) cy]
:: [s0;@(0.0.255) cy]
:: [s0; Height of object in dots.]}}&]
[s0;@(0.0.255) &]
[s0; Header is followed by binary data of object, encoded in 7 bit
@ -470,41 +473,41 @@ from previous cells. Table ends with&]
[s0;@(128.0.255) &]
[s0; pair.&]
[s0; &]
[ {{1993:8007^@(229.229.248)-1 [s1;*/@0 Table/cell formating sequence]
[ {{1993:8007^@(229.229.248)-1 [s0;*/ Table/cell formating sequence]
::=@2 [s0; ]
::^ [s1;/C@(0.0.255) [%00-00/@(128.0.255) <][%00-00 number]]
::^ [s0;/C@(0.0.255) [%00-00/@(128.0.255) <][%00-00 number]]
:: [s0; Left margin of table in dots.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) >][%00-00 number]]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) >][%00-00 number]]
:: [s0; Right margin of table in dots.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) B][%00-00 number]]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) B][%00-00 number]]
:: [s0; Space before table in dots.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) A][%00-00 number]]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) A][%00-00 number]]
:: [s0; Space after table in dots.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) f][%00-00 number]]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) f][%00-00 number]]
:: [s0; Frame thickness in dots. Frame is outer border of table. Default
value is 10.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) F][%00-00 color]]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) F][%00-00 color]]
:: [s0; Color of the frame.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) g]number]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) g]number]
:: [s0; Grid thickness in dots. Grid are lines dividing cells inside
table. Default value is 4.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) G][%00-00 color]]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) G][%00-00 color]]
:: [s0; Color of the grid.]
:: [s1;C [%00-00 k]]
:: [s0;C@(128.0.255) [%00-00 k]]
:: [s0; Keep the cell on single page.]
:: [s1;C [%00-00 K]]
:: [s0;C@(128.0.255) [%00-00 K]]
:: [s0; Keep the table on single page.]
:: [s1;C [%00-00 `~]]
:: [s0;C@(128.0.255) [%00-00 `~]]
:: [s0; Sets grid and frame thickness to zero. Useful when using tables
to organize text.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) h]number]
:: [s0;/C@(0.0.255) [%00-00/@(128.0.255) h]number]
:: [s0; Number of header rows. Header rows are repeated at the beginning
of every page.]
:: [s1;C [%00-00 `^]]
:: [s0;C@(128.0.255) [%00-00 `^]]
:: [s0; Cell aligns to top. Default.]
:: [s1;C [%00-00 `=]]
:: [s0;C@(128.0.255) [%00-00 `=]]
:: [s0; Cell aligns to center (vertical).]
:: [s1;C [%00-00 v]]
:: [s0;C@(128.0.255) [%00-00 v]]
:: [s0; Cell aligns to bottom.]
:: [s1;/C@(0.0.255) [%00-00/@(128.0.255) l]number/number&]
[s0;/C@(0.0.255) [%00-00/@(128.0.255) l]number&]
@ -535,20 +538,20 @@ Default is border: 0, margin: 15.]
[s0;/C@(0.0.255) [/@(128.0.255) a]/number]
:: [s0; Sets all cell borders (first [/@(0.0.255) number]) and margins
in dots. If any of numbers is missing, sets only the one present.]
:: [s1;/C@(0.0.255) [/@(128.0.255) `@]color]
:: [s0;/C@(0.0.255) [/@(128.0.255) `@]color]
:: [s0; Cell background color. Default is White.]
:: [s1;/C@(0.0.255) [/@(128.0.255) R]color]
:: [s0;/C@(0.0.255) [/@(128.0.255) R]color]
:: [s0; Cell border color. Default is Black.]
:: [s1;C !]
:: [s0;C@(128.0.255) !]
:: [s0; Resets cell formatting to default values.]
:: [s1;/C@(0.0.255) [/@(128.0.255) H]number]
:: [s0;/C@(0.0.255) [/@(128.0.255) H]number]
:: [s0; Sets the minimal height of cell (and therefore also of row)
in dots.]
:: [s1;/C@(0.0.255) [/@(128.0.255) `-]number]
:: [s0;/C@(0.0.255) [/@(128.0.255) `-]number]
:: [s0; Horizontal cell span.]
:: [s1;/C@(0.0.255) [/@(128.0.255) `|]number]
:: [s0;/C@(0.0.255) [/@(128.0.255) `|]number]
:: [s0; Vertical cell span.]
:: [s1;C ;]
:: [s0;C@(128.0.255) ;]
::= [s0; NOP separator. In some cases it helps to separate command code.]}}&]
[s0;3 &]
[s0; Note: There is also legacy support for old table format (from
@ -593,40 +596,40 @@ entry`]`"]
:: [s0;Icompiler`, linker; [^upp`.sf`.net^I; Hyperlink][I; ]Index entry]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[:label: Labeled paragraph`]`"]
:: [s0;:label: Labeled paragraph]}}&]
:: [s0; Labeled paragraph]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[< Left paragraph alignment`]`"]
:: [s0; Left paragraph alignment]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[`= Center paragraph alignment`]`"]
:: [s0;= Center paragraph alignment]}}&]
:: [s0; Center paragraph alignment]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[> Right paragraph alignment`]`"]
:: [s0;> Right paragraph alignment]}}&]
:: [s0; Right paragraph alignment]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[# Justify alignment. Just some text to demosntrate
it... Just some text to demonstrate it... Just some text to demonstrate
it...`]`"]
:: [s0;# Justify alignment. Just some text to demosntrate it... Just
:: [s0; Justify alignment. Just some text to demosntrate it... Just
some text to demonstrate it... Just some text to demonstrate
it...]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[l1000 Left margin 1000dots`]`"]
:: [s0;l1000; Left margin 1000dots]}}&]
:: [s0; Left margin 1000dots]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[i1000 Indent 1000 dots.Just some text to demonstrate
it... Just some text to demonstrate it...`]`"]
:: [s0;i1000; Indent 1000 dots.Just some text to demonstrate it... Just
some text to demonstrate it...]}}&]
:: [s0; Indent 1000 dots.Just some text to demonstrate it... Just some
text to demonstrate it...]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[r1000 Right margin 1000 dots.Just some text to demonstrate
it... Just some text to demonstrate it...`]`"]
:: [s0;r1000; Right margin 1000 dots.Just some text to demonstrate it...
Just some text to demonstrate it...]}}&]
:: [s0; Right margin 1000 dots.Just some text to demonstrate it... Just
some text to demonstrate it...]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"Paragraph`&`[b200 Before 200dots`]`"]
:: [s0; Paragraph&]
[s0;b200; Before 200dots]}}&]
[s0; Before 200dots]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[a200 After 200dots`]`&Paragraph`"]
:: [s0;a200; After 200dots&]
@ -637,14 +640,14 @@ bullet`]`]`"]
:: [s0;i200;O0; bullet&]
[s0;i200;O1; bullet&]
[s0;i200;O2; bullet&]
[s0;i200;O3; bullet]}}&]
[s0; bullet]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[O9i500 text bullet`-`|Just some text to demonstrate
it... Just some text to demonstrate it...Just some text to demonstrate
it... Just some text to demonstrate it...`]`"]
:: [s0;i500;O9; text bullet-|Just some text to demonstrate it... Just
some text to demonstrate it...Just some text to demonstrate it...
Just some text to demonstrate it...]}}&]
:: [s0; text bullet-|Just some text to demonstrate it... Just some text
to demonstrate it...Just some text to demonstrate it... Just
some text to demonstrate it...]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[O9i200 `[N1m.; `-`|level 1`&`]`[N1a `-`|level 2`&`]`[N1a
`-`|level 2`&`]`[N1 `-`|level 1`&`]`[N1a `-`|level 2`]`]`"]
@ -652,11 +655,11 @@ Just some text to demonstrate it...]}}&]
[s0;i200;O9;N1a; -|level 2&]
[s0;i200;O9;N1a; -|level 2&]
[s0;i200;O9;N1; -|level 1&]
[s0;i200;O9;N1a; -|level 2]}}&]
[s0; -|level 2]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`[`~300`~`=.2000`~>`-3000 `-`|Normal tab`-`|Centered
tab`-`|Right tab`]`"]
:: [s0;~~~300~=.2000~>-3000; -|Normal tab-|Centered tab-|Right tab]}}&]
:: [s0; -|Normal tab-|Centered tab-|Right tab]}}&]
[s0; &]
[ {{10000 [s0;*C@3;1 `"`{`{1:2 A1]
:: [s0;*C@3;1 A2]