<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to EncodingSyntax</title><link>https://sourceforge.net/p/ansigl/wiki/EncodingSyntax/</link><description>Recent changes to EncodingSyntax</description><atom:link href="https://sourceforge.net/p/ansigl/wiki/EncodingSyntax/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 14 Jan 2012 08:15:45 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/ansigl/wiki/EncodingSyntax/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage EncodingSyntax modified by NicroHobak</title><link>https://sourceforge.net/p/ansigl/wiki/EncodingSyntax/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -11,7 +11,7 @@
 Syntax
 ----------------------------------------
 
-A carat ('^', shift+6 on US keyboard layouts) signals the start of an ANSI code sequence.  Once started, a single character code can be given (ex: "^r" to change the color to red), or a list can be contained withing curly brackets (ex: "^{...}" with any number of ANSI codes inbetween) to pass multiple ANSI codes at once.
+A carat ('^', shift+6 on US keyboard layouts) signals the start of an ANSI code sequence.  Once started, a single character code can be given (ex: "^r" to change the color to red), a list can be contained withing curly brackets (ex: "^{...}" with any number of ANSI codes inbetween) to pass multiple ANSI codes at once, or another carat ("^^") to print a carat character into the string.
 
 
 AnsiGL ANSI Codes
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NicroHobak</dc:creator><pubDate>Sat, 14 Jan 2012 08:15:45 -0000</pubDate><guid>https://sourceforge.net0b8203a17c1d4b53875c525ef0e7b5f791df69a5</guid></item><item><title>WikiPage EncodingSyntax modified by NicroHobak</title><link>https://sourceforge.net/p/ansigl/wiki/EncodingSyntax/</link><description>Encoding Syntax
========================================


Overview
----------------------------------------

These codes are parsed via an [astring](Classes_astring) conversion function.  Any function in AnsiGL that accepts a std::string will (so far, without exception) automatically convert easily-typable codes with ANSI codes via this basic syntax...


Syntax
----------------------------------------

A carat ('^', shift+6 on US keyboard layouts) signals the start of an ANSI code sequence.  Once started, a single character code can be given (ex: "^r" to change the color to red), or a list can be contained withing curly brackets (ex: "^{...}" with any number of ANSI codes inbetween) to pass multiple ANSI codes at once.


AnsiGL ANSI Codes
----------------------------------------

Character | ANSI
--------- | --------------------------------
          | *Special Control Codes*
D         | Restore everything to defaults
          | *Normal Foreground Colors*
k         | Foreground color: Black
r         | Foreground color: Red
y         | Foreground color: Yellow
g         | Foreground color: Green
b         | Foreground color: Blue
m         | Foreground color: Magenta
c         | Foreground color: Cyan
w         | Foreground color: White
d         | Foreground color: Default
          | *Bold Foreground Colors*
K         | Foreground color: Bold Black
R         | Foreground color: Bold Red
Y         | Foreground color: Bold Yellow
G         | Foreground color: Bold Green
B         | Foreground color: Bold Blue
M         | Foreground color: Bold Magenta
C         | Foreground color: Bold Cyan
W         | Foreground color: Bold White
          | *Background Colors*
1         | Background color: Black
2         | Background color: Red
3         | Background color: Yellow
4         | Background color: Green
5         | Background color: Blue
6         | Background color: Magenta
7         | Background color: Cyan
8         | Background color: White
9         | Background color: Default
          | *Special Formatting*
*         | Bold On
.         | Bold Off
/         | Italics On
\         | Italics Off
_         | Underscore On
-         | Underscore Off
:         | Blink On
;         | Blink Off
I         | Invert Colors (foreground and background)
i         | Un-invert Colors


Examples
----------------------------------------

ANSI Code Sequence             | Result
------------------------------ | ----------------------------
*Single Character Sequences*   | *Single Character Sequences*
^r                             | Normal red foreground
^8                             | White background
^/                             | Italic text
*Multiple Character Sequences* | *Multiple Character Sequences*
^{g3:}                         | Green foreground, yellow background, blinking text
^{k8}                          | Black foreground, white background
^{1243567KybM}                 | Bold Magenta foreground, cyan background (and lots of ignored codes due to code conflicts, the right-most codes have priority)


Just to show a full example:

    ^{7k}AnsiGL ^Rr^Yo^Gc^Mk^Ws^B!

Results in:

    "AnsiGL rocks!"


Colorized to have: a cyan background, AnsiGL in black text, the 'r' in bold red, the 'o in bold yellow, the 'c' in bold green, the k in bold magenta, the s in bold white, and the exclamation point in bold blue.
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NicroHobak</dc:creator><pubDate>Fri, 13 Jan 2012 23:57:25 -0000</pubDate><guid>https://sourceforge.neta0221f4b5657672243cbc07b11b1a97bb481c73a</guid></item></channel></rss>