From 199d7ee000fcb1ce24d3f4a919dc825e6c0d2f45 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 22 Jul 2013 19:36:55 +1000 Subject: Added the character representation feature. --- doc/ScintillaDoc.html | 112 ++++++++++++++++++++++++++++++++++------------ doc/ScintillaHistory.html | 12 +++++ 2 files changed, 95 insertions(+), 29 deletions(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index c0b0fc72b..723ddb025 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -212,6 +212,7 @@ o Searching and replacing o Overtype + @@ -220,6 +221,7 @@ o Error handling o Undo and Redo + @@ -229,6 +231,7 @@ o Scrolling and automatic scrolling + @@ -237,6 +240,7 @@ o Cursor o Mouse capture + @@ -245,91 +249,103 @@ o Styling o Style definition + o Caret, selection, and hotspot styles + + o Character representations o Margins - o Annotations + o Annotations + o Other settings o Brace highlighting - o Tabs and Indentation - Guides + o Tabs and Indentation + Guides + o Markers o Indicators - o Autocompletion + o Autocompletion + o User lists o Call tips - o Keyboard commands + o Keyboard commands + o Key bindings o Popup edit menu - o Macro recording + o Macro recording + o Printing o Direct access - o Multiple views + o Multiple views + o Background loading and saving o Folding - o Line wrapping + o Line wrapping + o Zooming o Long lines - o Lexer + o Lexer + o Lexer objects o Notifications - o Images + o Images + o GTK+ o Provisional messages - o Deprecated messages - + o Deprecated messages + o Edit messages never supported by Scintilla @@ -2691,8 +2707,6 @@ struct Sci_TextToFind { SCI_GETHOTSPOTACTIVEUNDERLINE
SCI_SETHOTSPOTSINGLELINE(bool singleLine)
SCI_GETHOTSPOTSINGLELINE
- SCI_SETCONTROLCHARSYMBOL(int symbol)
- SCI_GETCONTROLCHARSYMBOL
SCI_SETCARETSTICKY(int useCaretStickyBehaviour)
SCI_GETCARETSTICKY
SCI_TOGGLECARETSTICKY
@@ -2789,21 +2803,6 @@ struct Sci_TextToFind { the default colouring can be modified and an underline drawn with these settings. Single line mode stops a hotspot from wrapping onto next line.

-

SCI_SETCONTROLCHARSYMBOL(int symbol)
- SCI_GETCONTROLCHARSYMBOL
- By default, Scintilla displays control characters (characters with codes less than 32) in a - rounded rectangle as ASCII mnemonics: "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", - "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", - "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US". These mnemonics come from the - early days of signaling, though some are still used (LF = Line Feed, BS = Back Space, CR = - Carriage Return, for example).

- -

You can choose to replace these mnemonics by a nominated symbol with an ASCII code in the - range 32 to 255. If you set a symbol value less than 32, all control characters are displayed - as mnemonics. The symbol you set is rendered in the font of the style set for the character. - You can read back the current symbol with the SCI_GETCONTROLCHARSYMBOL message. - The default symbol value is 0.

-

SCI_SETCARETSTICKY(int useCaretStickyBehaviour)
SCI_GETCARETSTICKY
SCI_TOGGLECARETSTICKY
@@ -2824,6 +2823,61 @@ struct Sci_TextToFind {

SCI_TOGGLECARETSTICKY switches from SC_CARETSTICKY_ON and SC_CARETSTICKY_WHITESPACE to SC_CARETSTICKY_OFF and from SC_CARETSTICKY_OFF to SC_CARETSTICKY_ON.

+

Character representations

+ +

Some characters, such as control characters and invalid bytes, do not have a visual glyph or use a glyph that is hard to distinguish.

+ +

Control characters (characters with codes less than 32, or between 128 and 159 in some encodings) + are displayed by Scintilla using their mnemonics inverted in a rounded rectangle. These mnemonics come from the + early days of signalling, though some are still used (LF = Line Feed, BS = Back Space, CR = + Carriage Return, for example).

+ +

For the low 'C0' values: "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", + "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", + "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US".

+ +

For the high 'C1' values: + "PAD", "HOP", "BPH", "NBH", "IND", "NEL", "SSA", "ESA", + "HTS", "HTJ", "VTS", "PLD", "PLU", "RI", "SS2", "SS3", + "DCS", "PU1", "PU2", "STS", "CCH", "MW", "SPA", "EPA", + "SOS", "SGCI", "SCI", "CSI", "ST", "OSC", "PM", "APC".

+ +

Invalid bytes are shown in a similar way with an 'x' followed by their value in hexadecimal, like "xFE".

+ + + SCI_SETREPRESENTATION(const char *encodedCharacter, const char *representation)
+ SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation)
+ SCI_CLEARREPRESENTATION(const char *encodedCharacter)
+ SCI_SETCONTROLCHARSYMBOL(int symbol)
+ SCI_GETCONTROLCHARSYMBOL
+
+ +

SCI_SETREPRESENTATION(const char *encodedCharacter, const char *representation)
+ SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation)
+ SCI_CLEARREPRESENTATION(const char *encodedCharacter)
+ +

Any character, including those normally displayed as mnemonics may be represented by a + string inverted in a rounded rectangle.

+ +

For example, the Ohm sign Ω U+2126 looks very similar to the Greek Omega character Ω U+03C9 so, + for the UTF-8 encoding, to distinguish the Ohm sign as "U+2126 Ω" this call could be made: + SCI_SETREPRESENTATION("\xe2\x84\xa6", "U+2126 \xe2\x84\xa6")

+ +

The encodedCharacter parameter is a NUL-terminated string of the bytes for one character in the + current encoding. This can not be used to set a representation for multiple-character strings.

+ +

The NUL (0) character is a special case since the encodedCharacter parameter is NUL terminated, the NUL + character is specified as an empty string.

+ +

SCI_SETCONTROLCHARSYMBOL(int symbol)
+ SCI_GETCONTROLCHARSYMBOL
+ +

The mnemonics may be replaced by a nominated symbol with an ASCII code in the + range 32 to 255. If you set a symbol value less than 32, all control characters are displayed + as mnemonics. The symbol you set is rendered in the font of the style set for the character. + You can read back the current symbol with the SCI_GETCONTROLCHARSYMBOL message. + The default symbol value is 0.

+

Margins

There may be up to five margins, numbered 0 to SC_MAX_MARGIN (4) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 83fed2c52..2009a369c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -438,6 +438,18 @@ Icons Copyright(C) 1998 by Dean S. Jones
+

+ Release 3.4.0 +

+

Release 3.3.4

-- cgit v1.2.3