summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scintilla/cppcheck.suppress13
-rw-r--r--scintilla/doc/SciCoding.html36
-rw-r--r--scintilla/doc/ScintillaDoc.html2601
-rw-r--r--scintilla/doc/ScintillaDownload.html10
-rw-r--r--scintilla/doc/ScintillaHistory.html145
-rw-r--r--scintilla/doc/ScintillaToDo.html2
-rw-r--r--scintilla/doc/index.html11
-rw-r--r--scintilla/include/SciLexer.h59
-rw-r--r--scintilla/include/Scintilla.h10
-rw-r--r--scintilla/include/Scintilla.iface332
-rw-r--r--scintilla/lexers/LexBaan.cxx728
-rw-r--r--scintilla/lexers/LexCoffeeScript.cxx72
-rw-r--r--scintilla/lexers/LexErrorList.cxx4
-rw-r--r--scintilla/lexers/LexJSON.cxx6
-rw-r--r--scintilla/lexers/LexPowerShell.cxx2
-rw-r--r--scintilla/lexers/LexProgress.cxx787
-rw-r--r--scintilla/lexers/LexYAML.cxx68
-rw-r--r--scintilla/lexlib/CharacterSet.cxx8
-rw-r--r--scintilla/lexlib/CharacterSet.h9
-rw-r--r--scintilla/lexlib/StyleContext.cxx17
-rw-r--r--scintilla/lexlib/StyleContext.h23
-rw-r--r--scintilla/lexlib/WordList.cxx60
-rw-r--r--scintilla/lexlib/WordList.h1
-rw-r--r--scintilla/scripts/Face.py2
-rw-r--r--scintilla/scripts/HeaderCheck.py92
-rw-r--r--scintilla/scripts/HeaderOrder.txt9
-rw-r--r--scintilla/src/Document.cxx462
-rw-r--r--scintilla/src/Document.h36
-rw-r--r--scintilla/src/EditView.cxx62
-rw-r--r--scintilla/src/Editor.cxx79
-rw-r--r--scintilla/src/Editor.h2
-rw-r--r--scintilla/src/MarginView.cxx5
-rw-r--r--scintilla/src/SplitVector.h22
-rw-r--r--scintilla/src/ViewStyle.cxx16
-rw-r--r--scintilla/src/ViewStyle.h20
-rw-r--r--scintilla/version.txt2
-rw-r--r--scintilla/win32/ScintillaWin.cxx12
37 files changed, 3817 insertions, 2008 deletions
diff --git a/scintilla/cppcheck.suppress b/scintilla/cppcheck.suppress
index 95fe6c4..8f777b9 100644
--- a/scintilla/cppcheck.suppress
+++ b/scintilla/cppcheck.suppress
@@ -11,7 +11,15 @@ noExplicitConstructor
// cppcheck does not understand private methods can be called from static methods
unusedPrivateFunction:scintilla/win32/PlatWin.cxx
+// ScintillaDocument is providing an API and there are no consumers of the API inside Scintilla
+unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp
+
+// The performance cost of by-value passing is often small and using a reference decreases
+// code legibility.
+passedByValue
+
// Suppress most lexer warnings since the lexers are maintained by others
+redundantCondition:scintilla/lexers/LexA68k.cxx
useInitializationList:scintilla/lexers/LexAsm.cxx
useInitializationList:scintilla/lexers/LexBasic.cxx
uninitMemberVar:scintilla/lexers/LexBash.cxx
@@ -30,6 +38,7 @@ variableScope:scintilla/lexers/LexNimrod.cxx
variableScope:scintilla/lexers/LexNsis.cxx
variableScope:scintilla/lexers/LexOpal.cxx
variableScope:scintilla/lexers/LexPB.cxx
+variableScope:scintilla/lexers/LexProgress.cxx
variableScope:scintilla/lexers/LexRuby.cxx
uninitMemberVar:scintilla/lexers/LexRuby.cxx
variableScope:scintilla/lexers/LexSpecman.cxx
@@ -40,3 +49,7 @@ variableScope:scintilla/lexers/LexVHDL.cxx
// Suppress everything in catch.hpp as won't be changing
*:scintilla/test/unit/catch.hpp
+// Spurious errors due to choice of variadic or two argument TEST_CASE macro
+preprocessorErrorDirective:scintilla/test/unit/*.cxx
+syntaxError:scintilla/test/unit/UnitTester.cxx
+syntaxError:scintilla/test/unit/unitTest.cxx
diff --git a/scintilla/doc/SciCoding.html b/scintilla/doc/SciCoding.html
index a487031..a226240 100644
--- a/scintilla/doc/SciCoding.html
+++ b/scintilla/doc/SciCoding.html
@@ -124,6 +124,8 @@
compilers on diverse platforms with high performance and low resource usage.
Scintilla has stricter portability requirements to SciTE as it may be ported to
low capability platforms.
+ Scintilla code must build with C++03 which can be checked with "g++ --std=gnu++03".
+ SciTE can use C++11 features that are widely available from g++ 4.6, MSVC 2012 and clang 3.4 compilers.
</p>
<p>
To achieve portability, only a subset of C++ features are used.
@@ -139,6 +141,14 @@
maintaining FORTRAN programs. The union feature is not used as it can lead to
non-type-safe value access.
</p>
+ <p>
+ The SCI_METHOD preprocessor definition should be used when implementing
+ interfaces which include it like ILexer and only there.
+ </p>
+ <p>
+ Headers should always be included in the same order as given by the
+ scripts/HeaderOrder.txt file.
+ </p>
<h3>
Casting
</h3>
@@ -255,5 +265,31 @@
<p>Ensure there are no warnings under the compiler you use. Warnings from other compilers
will be noted on the feature request.</p>
<p>sc.ch is an int: do not pass this around as a char.</p>
+ <p>The ctype functions like isalnum and isdigit only work on ASCII (0..127) and may cause
+ undefined behaviour including crashes if used on other values. Check with IsASCII before calling is*.</p>
+ <p>Functions, structs and classes in lexers should be in an unnamed namespace (see LexCPP)
+ or be marked "static" so they will not leak into other lexers.</p>
+ <p>If you copy from an existing lexer, remove any code that is not needed since it makes it
+ more difficult to maintain and review.</p>
+ <p>When modifying an existing lexer, try to maintain as much compatibility as possible.
+ Do not renumber lexical styles as current client code may be built against the earlier values.</p>
+ <h4>
+ Properties
+ </h4>
+ <p>
+ Properties provided by a new lexer should follow the naming conventions
+ and should include a comment suitable for showing to end users.
+ The convention is for properties that control styling to be named
+ lexer.&lt;lexername&gt;.* and those that control folding to be named
+ fold.&lt;lexername&gt;.*.
+ Examples are "lexer.python.literals.binary" and "fold.haskell.imports".
+ </p>
+ <p>
+ The properties "fold" and "fold.comment" are generic and can be used by
+ any lexer.
+ </p>
+ <p>
+ See LexPython for examples of properties in an object lexer and LexHTML for a functional lexer.
+ </p>
</body>
</html>
diff --git a/scintilla/doc/ScintillaDoc.html b/scintilla/doc/ScintillaDoc.html
index 36eb6ad..adf3b99 100644
--- a/scintilla/doc/ScintillaDoc.html
+++ b/scintilla/doc/ScintillaDoc.html
@@ -14,12 +14,15 @@
<style type="text/css">
<!--
/*<![CDATA[*/
- CODE { font-weight: bold; font-family: Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
+ CODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
A:visited { color: blue; }
A:hover { text-decoration: underline ! important; }
- A.message { text-decoration: none; font-weight: bold; font-family: Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
+ A.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
+ A.seealso { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
A.toc { text-decoration: none; }
A.jump { text-decoration: none; }
+ LI.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
+ H2 { background: #E0EAFF; }
.S0 {
color: #808080;
}
@@ -64,6 +67,9 @@
.provisional {
background: #FFB000;
}
+ .parameter {
+ font-style:italic;
+ }
/*]]>*/
-->
</style>
@@ -82,7 +88,7 @@
<h1>Scintilla Documentation</h1>
- <p>Last edited 8 May 2016 NH</p>
+ <p>Last edited 29 September 2016 NH</p>
<p>There is <a class="jump" href="Design.html">an overview of the internal design of
Scintilla</a>.<br />
@@ -250,109 +256,113 @@
<tr>
<td>o <a class="toc" href="#LineEndings">Line endings</a></td>
- <td>o <a class="toc" href="#Styling">Styling</a></td>
+ <td>o <a class="toc" href="#Words">Words</a></td>
- <td>o <a class="toc" href="#StyleDefinition">Style definition</a></td>
+ <td>o <a class="toc" href="#Styling">Styling</a></td>
</tr>
<tr>
+ <td>o <a class="toc" href="#StyleDefinition">Style definition</a></td>
+
<td>o <a class="toc" href="#CaretAndSelectionStyles">Caret, selection, and hotspot styles</a></td>
<td>o <a class="toc" href="#CharacterRepresentations">Character representations</a></td>
- <td>o <a class="toc" href="#Margins">Margins</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#Margins">Margins</a></td>
+
<td>o <a class="toc" href="#Annotations">Annotations</a></td>
<td>o <a class="toc" href="#OtherSettings">Other settings</a></td>
- <td>o <a class="toc" href="#BraceHighlighting">Brace highlighting</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#BraceHighlighting">Brace highlighting</a></td>
+
<td>o <a class="toc" href="#TabsAndIndentationGuides">Tabs and Indentation
Guides</a></td>
<td>o <a class="toc" href="#Markers">Markers</a></td>
- <td>o <a class="toc" href="#Indicators">Indicators</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#Indicators">Indicators</a></td>
+
<td>o <a class="toc" href="#Autocompletion">Autocompletion</a></td>
<td>o <a class="toc" href="#UserLists">User lists</a></td>
- <td>o <a class="toc" href="#CallTips">Call tips</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#CallTips">Call tips</a></td>
+
<td>o <a class="toc" href="#KeyboardCommands">Keyboard commands</a></td>
<td>o <a class="toc" href="#KeyBindings">Key bindings</a></td>
- <td>o <a class="toc" href="#PopupEditMenu">Popup edit menu</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#PopupEditMenu">Popup edit menu</a></td>
+
<td>o <a class="toc" href="#MacroRecording">Macro recording</a></td>
<td>o <a class="toc" href="#Printing">Printing</a></td>
- <td>o <a class="toc" href="#DirectAccess">Direct access</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#DirectAccess">Direct access</a></td>
+
<td>o <a class="toc" href="#MultipleViews">Multiple views</a></td>
<td>o <a class="toc" href="#BackgroundLoadSave">Background loading and saving</a></td>
- <td>o <a class="toc" href="#Folding">Folding</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#Folding">Folding</a></td>
+
<td>o <a class="toc" href="#LineWrapping">Line wrapping</a></td>
<td>o <a class="toc" href="#Zooming">Zooming</a></td>
- <td>o <a class="toc" href="#LongLines">Long lines</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#LongLines">Long lines</a></td>
+
<td>o <a class="toc" href="#Lexer">Lexer</a></td>
<td>o <a class="toc" href="#LexerObjects">Lexer objects</a></td>
- <td>o <a class="toc" href="#Notifications">Notifications</a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#Notifications">Notifications</a></td>
+
<td>o <a class="toc" href="#Images">Images</a></td>
<td>o <a class="toc" href="#GTK">GTK+</a></td>
- <td>o <a class="toc" href="#ProvisionalMessages"><span class="provisional">Provisional messages</span></a></td>
-
</tr>
<tr>
+ <td>o <a class="toc" href="#ProvisionalMessages"><span class="provisional">Provisional messages</span></a></td>
+
<td>o <a class="toc" href="#DeprecatedMessages">Deprecated messages</a></td>
<td>o <a class="toc" href="#EditMessagesNeverSupportedByScintilla">Edit messages never
supported by Scintilla</a></td>
+ </tr>
+ <tr>
<td>o <a class="toc" href="#BuildingScintilla">Building Scintilla</a></td>
</tr>
@@ -389,38 +399,36 @@
largest font in any current style. This restriction is for performance; if lines differed in
height then calculations involving positioning of text would require the text to be styled
first.</p>
- <code><a class="message" href="#SCI_GETTEXT">SCI_GETTEXT(int length, char *text)</a><br />
+ <code><a class="message" href="#SCI_GETTEXT">SCI_GETTEXT(int length, char *text) &rarr; int</a><br />
<a class="message" href="#SCI_SETTEXT">SCI_SETTEXT(&lt;unused&gt;, const char *text)</a><br />
<a class="message" href="#SCI_SETSAVEPOINT">SCI_SETSAVEPOINT</a><br />
- <a class="message" href="#SCI_GETLINE">SCI_GETLINE(int line, char *text)</a><br />
+ <a class="message" href="#SCI_GETLINE">SCI_GETLINE(int line, char *text) &rarr; int</a><br />
<a class="message" href="#SCI_REPLACESEL">SCI_REPLACESEL(&lt;unused&gt;, const char
*text)</a><br />
<a class="message" href="#SCI_SETREADONLY">SCI_SETREADONLY(bool readOnly)</a><br />
- <a class="message" href="#SCI_GETREADONLY">SCI_GETREADONLY</a><br />
- <a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, Sci_TextRange
- *tr)</a><br />
- <a class="message" href="#SCI_ALLOCATE">SCI_ALLOCATE(int bytes, &lt;unused&gt;)</a><br />
- <a class="message" href="#SCI_ADDTEXT">SCI_ADDTEXT(int length, const char *s)</a><br />
- <a class="message" href="#SCI_ADDSTYLEDTEXT">SCI_ADDSTYLEDTEXT(int length, cell *s)</a><br />
- <a class="message" href="#SCI_APPENDTEXT">SCI_APPENDTEXT(int length, const char *s)</a><br />
+ <a class="message" href="#SCI_GETREADONLY">SCI_GETREADONLY &rarr; bool</a><br />
+ <a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, Sci_TextRange *tr) &rarr; int</a><br />
+ <a class="message" href="#SCI_ALLOCATE">SCI_ALLOCATE(int bytes)</a><br />
+ <a class="message" href="#SCI_ADDTEXT">SCI_ADDTEXT(int length, const char *text)</a><br />
+ <a class="message" href="#SCI_ADDSTYLEDTEXT">SCI_ADDSTYLEDTEXT(int length, cell *c)</a><br />
+ <a class="message" href="#SCI_APPENDTEXT">SCI_APPENDTEXT(int length, const char *text)</a><br />
<a class="message" href="#SCI_INSERTTEXT">SCI_INSERTTEXT(int pos, const char *text)</a><br />
<a class="message" href="#SCI_CHANGEINSERTION">SCI_CHANGEINSERTION(int length, const char *text)</a><br />
<a class="message" href="#SCI_CLEARALL">SCI_CLEARALL</a><br />
- <a class="message" href="#SCI_DELETERANGE">SCI_DELETERANGE(int pos, int deleteLength)</a><br />
+ <a class="message" href="#SCI_DELETERANGE">SCI_DELETERANGE(int start, int lengthDelete)</a><br />
<a class="message" href="#SCI_CLEARDOCUMENTSTYLE">SCI_CLEARDOCUMENTSTYLE</a><br />
- <a class="message" href="#SCI_GETCHARAT">SCI_GETCHARAT(int position)</a><br />
- <a class="message" href="#SCI_GETSTYLEAT">SCI_GETSTYLEAT(int position)</a><br />
- <a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, Sci_TextRange
- *tr)</a><br />
+ <a class="message" href="#SCI_GETCHARAT">SCI_GETCHARAT(int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETSTYLEAT">SCI_GETSTYLEAT(int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, Sci_TextRange *tr) &rarr; int</a><br />
<a class="message" href="#SCI_RELEASEALLEXTENDEDSTYLES">SCI_RELEASEALLEXTENDEDSTYLES</a><br />
- <a class="message" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles)</a><br />
- <a class="message" href="#SCI_TARGETASUTF8">SCI_TARGETASUTF8(&lt;unused&gt;, char *s)</a><br />
- <a class="message" href="#SCI_ENCODEDFROMUTF8">SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded)</a><br />
+ <a class="message" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles) &rarr; int</a><br />
+ <a class="message" href="#SCI_TARGETASUTF8">SCI_TARGETASUTF8(&lt;unused&gt;, char *s) &rarr; int</a><br />
+ <a class="message" href="#SCI_ENCODEDFROMUTF8">SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) &rarr; int</a><br />
<a class="message" href="#SCI_SETLENGTHFORENCODE">SCI_SETLENGTHFORENCODE(int bytes)</a><br />
</code>
- <p><b id="SCI_GETTEXT">SCI_GETTEXT(int length, char *text NUL-terminated)</b><br />
- This returns <code>length</code>-1 characters of text from the start of the document plus one
+ <p><b id="SCI_GETTEXT">SCI_GETTEXT(int length, char *text NUL-terminated) &rarr; int</b><br />
+ This returns <code class="parameter">length</code>-1 characters of text from the start of the document plus one
terminating 0 character. To collect all the text in a document, use <code>SCI_GETLENGTH</code>
to get the number of characters in the document (<code>nLen</code>), allocate a character
buffer of length <code>nLen+1</code> bytes, then call <code>SCI_GETTEXT(nLen+1, char
@@ -429,11 +437,11 @@
If you then save the text, you should use <code>SCI_SETSAVEPOINT</code> to mark
the text as unmodified.</p>
- <p>See also: <code><a class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>, <a
- class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>, <a class="message"
- href="#SCI_GETLINE">SCI_GETLINE</a>, <a class="message"
- href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>, <a class="message"
- href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a></code></p>
+ <p>See also: <code><a class="seealso" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>,
+ <a class="seealso" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
+ <a class="seealso" href="#SCI_GETLINE">SCI_GETLINE</a>,
+ <a class="seealso "href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
+ <a class="seealso" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a></code></p>
<p><b id="SCI_SETTEXT">SCI_SETTEXT(&lt;unused&gt;, const char *text)</b><br />
This replaces all the text in the document with the zero terminated text string you pass
@@ -452,7 +460,7 @@
<p>See also: <code><a class="message" href="#SCI_EMPTYUNDOBUFFER">SCI_EMPTYUNDOBUFFER</a>, <a
class="message" href="#SCI_GETMODIFY">SCI_GETMODIFY</a></code></p>
- <p><b id="SCI_GETLINE">SCI_GETLINE(int line, char *text)</b><br />
+ <p><b id="SCI_GETLINE">SCI_GETLINE(int line, char *text) &rarr; int</b><br />
This fills the buffer defined by text with the contents of the nominated line (lines start at
0). The buffer is not terminated by a 0 character. It is up to you to make sure that the buffer
is long enough for the text, use <a class="message"
@@ -462,11 +470,11 @@
characters are copied. If the text argument is 0 then the length that should be allocated
to store the entire line is returned.</p>
- <p>See also: <code><a class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>, <a
- class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>, <a class="message"
- href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>, <a class="message"
- href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>, <a class="message"
- href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
+ <p>See also: <code><a class="seealso" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
+ <a class="seealso" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>,
+ <a class="seealso" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>,
+ <a class="seealso" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
+ <a class="seealso" href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
<p><b id="SCI_REPLACESEL">SCI_REPLACESEL(&lt;unused&gt;, const char *text)</b><br />
The currently selected text between the <a class="jump" href="#SelectionAndInformation">anchor
@@ -475,13 +483,12 @@
positioned after the inserted text and the caret is scrolled into view.</p>
<p><b id="SCI_SETREADONLY">SCI_SETREADONLY(bool readOnly)</b><br />
- <b id="SCI_GETREADONLY">SCI_GETREADONLY</b><br />
+ <b id="SCI_GETREADONLY">SCI_GETREADONLY &rarr; bool</b><br />
These messages set and get the read-only flag for the document. If you mark a document as read
only, attempts to modify the text cause the <a class="message"
href="#SCN_MODIFYATTEMPTRO"><code>SCN_MODIFYATTEMPTRO</code></a> notification.</p>
- <p><b id="SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, <a class="jump"
- href="#Sci_TextRange">Sci_TextRange</a> *tr)</b><br />
+ <p><b id="SCI_GETTEXTRANGE">SCI_GETTEXTRANGE(&lt;unused&gt;, <a class="jump" href="#Sci_TextRange">Sci_TextRange</a> *tr) &rarr; int</b><br />
This collects the text between the positions <code>cpMin</code> and <code>cpMax</code> and
copies it to <code>lpstrText</code> (see <code>struct Sci_TextRange</code> in
<code>Scintilla.h</code>). If <code>cpMax</code> is -1, text is returned to the end of the
@@ -489,14 +496,13 @@
longer than the number of characters you wish to read. The return value is the length of the
returned text not including the terminating 0.</p>
- <p>See also: <code><a class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>, <a
- class="message" href="#SCI_GETLINE">SCI_GETLINE</a>, <a class="message"
- href="#SCI_GETCURLINE">SCI_GETCURLINE</a>, <a class="message"
- href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>, <a class="message"
- href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
+ <p>See also: <code><a class="seealso" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>,
+ <a class="seealso" href="#SCI_GETLINE">SCI_GETLINE</a>,
+ <a class="seealso" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
+ <a class="seealso" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
+ <a class="seealso" href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
- <p><b id="SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, <a class="jump"
- href="#Sci_TextRange">Sci_TextRange</a> *tr)</b><br />
+ <p><b id="SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT(&lt;unused&gt;, <a class="jump" href="#Sci_TextRange">Sci_TextRange</a> *tr) &rarr; int</b><br />
This collects styled text into a buffer using two bytes for each cell, with the character at
the lower address of each pair and the style byte at the upper address. Characters between the
positions <code>cpMin</code> and <code>cpMax</code> are copied to <code>lpstrText</code> (see
@@ -506,34 +512,36 @@
<code>cpMin</code> or <code>cpMax</code>. Positions outside the document return character codes
and style bytes of 0.</p>
- <p>See also: <code><a class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>, <a
- class="message" href="#SCI_GETLINE">SCI_GETLINE</a>, <a class="message"
- href="#SCI_GETCURLINE">SCI_GETCURLINE</a>, <a class="message"
- href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>, <a class="message"
- href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
+ <p>See also: <code><a class="seealso" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>,
+ <a class="seealso" href="#SCI_GETLINE">SCI_GETLINE</a>,
+ <a class="seealso" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
+ <a class="seealso" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>,
+ <a class="seealso" href="#SCI_GETTEXT">SCI_GETTEXT</a></code></p>
- <p><b id="SCI_ALLOCATE">SCI_ALLOCATE(int bytes, &lt;unused&gt;)</b><br />
+ <p><b id="SCI_ALLOCATE">SCI_ALLOCATE(int bytes)</b><br />
Allocate a document buffer large enough to store a given number of bytes.
The document will not be made smaller than its current contents.</p>
- <p><b id="SCI_ADDTEXT">SCI_ADDTEXT(int length, const char *s)</b><br />
- This inserts the first <code>length</code> characters from the string <code>s</code>
+ <p><b id="SCI_ADDTEXT">SCI_ADDTEXT(int length, const char *text)</b><br />
+ This inserts the first <code class="parameter">length</code> characters from the string
+ <code class="parameter">text</code>
at the current position. This will include any 0's in the string that you might have expected
to stop the insert operation. The current position is set at the end of the inserted text,
but it is not scrolled into view.</p>
- <p><b id="SCI_ADDSTYLEDTEXT">SCI_ADDSTYLEDTEXT(int length, cell *s)</b><br />
+ <p><b id="SCI_ADDSTYLEDTEXT">SCI_ADDSTYLEDTEXT(int length, cell *c)</b><br />
This behaves just like <code>SCI_ADDTEXT</code>, but inserts styled text.</p>
- <p><b id="SCI_APPENDTEXT">SCI_APPENDTEXT(int length, const char *s)</b><br />
- This adds the first <code>length</code> characters from the string <code>s</code> to the end
+ <p><b id="SCI_APPENDTEXT">SCI_APPENDTEXT(int length, const char *text)</b><br />
+ This adds the first <code class="parameter">length</code> characters from the string
+ <code class="parameter">text</code> to the end
of the document. This will include any 0's in the string that you might have expected to stop
the operation. The current selection is not changed and the new text is not scrolled into
view.</p>
<p><b id="SCI_INSERTTEXT">SCI_INSERTTEXT(int pos, const char *text)</b><br />
- This inserts the zero terminated <code>text</code> string at position <code>pos</code> or at
- the current position if <code>pos</code> is -1. If the current position is after the insertion point
+ This inserts the zero terminated <code class="parameter">text</code> string at position <code class="parameter">pos</code> or at
+ the current position if <code class="parameter">pos</code> is -1. If the current position is after the insertion point
then it is moved along with its surrounding text but no scrolling is performed.</p>
<p><b id="SCI_CHANGEINSERTION">SCI_CHANGEINSERTION(int length, const char *text)</b><br />
@@ -543,7 +551,7 @@
<p><b id="SCI_CLEARALL">SCI_CLEARALL</b><br />
Unless the document is read-only, this deletes all the text.</p>
- <p><b id="SCI_DELETERANGE">SCI_DELETERANGE(int pos, int deleteLength)</b><br />
+ <p><b id="SCI_DELETERANGE">SCI_DELETERANGE(int start, int lengthDelete)</b><br />
Deletes a range of text in the document.</p>
<p><b id="SCI_CLEARDOCUMENTSTYLE">SCI_CLEARDOCUMENTSTYLE</b><br />
@@ -551,16 +559,16 @@
<code>SCI_CLEARDOCUMENTSTYLE</code> can be used to clear all styling information and reset the
folding state.</p>
- <p><b id="SCI_GETCHARAT">SCI_GETCHARAT(int pos)</b><br />
- This returns the character at <code>pos</code> in the document or 0 if <code>pos</code> is
+ <p><b id="SCI_GETCHARAT">SCI_GETCHARAT(int pos) &rarr; int</b><br />
+ This returns the character at <code class="parameter">pos</code> in the document or 0 if <code class="parameter">pos</code> is
negative or past the end of the document.</p>
- <p><b id="SCI_GETSTYLEAT">SCI_GETSTYLEAT(int pos)</b><br />
- This returns the style at <code>pos</code> in the document, or 0 if <code>pos</code> is
+ <p><b id="SCI_GETSTYLEAT">SCI_GETSTYLEAT(int pos) &rarr; int</b><br />
+ This returns the style at <code class="parameter">pos</code> in the document, or 0 if <code class="parameter">pos</code> is
negative or past the end of the document.</p>
<p><b id="SCI_RELEASEALLEXTENDEDSTYLES">SCI_RELEASEALLEXTENDEDSTYLES</b><br />
- <b id="SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles)</b><br />
+ <b id="SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles) &rarr; int</b><br />
Extended styles are used for features like textual margins and annotations as well as internally by Scintilla.
They are outside the range 0..255 used for the styles bytes associated with document bytes.
These functions manage the use of extended styles to ensures that components cooperate in defining styles.
@@ -568,8 +576,8 @@
<code>SCI_ALLOCATEEXTENDEDSTYLES</code> allocates a range of style numbers after the byte style values and returns
the number of the first allocated style.
Ranges for margin and annotation styles should be allocated before calling
- <a class="message" href="#SCI_MARGINSETSTYLEOFFSET">SCI_MARGINSETSTYLEOFFSET</a> or
- <a class="message" href="#SCI_ANNOTATIONSETSTYLEOFFSET">SCI_ANNOTATIONSETSTYLEOFFSET</a>.</p>
+ <a class="seealso" href="#SCI_MARGINSETSTYLEOFFSET">SCI_MARGINSETSTYLEOFFSET</a> or
+ <a class="seealso" href="#SCI_ANNOTATIONSETSTYLEOFFSET">SCI_ANNOTATIONSETSTYLEOFFSET</a>.</p>
<p><b id="Sci_TextRange">Sci_TextRange</b> and <b id="Sci_CharacterRange">Sci_CharacterRange</b><br />
These structures are defined to be exactly the same shape as the Win32 <code>TEXTRANGE</code>
@@ -593,7 +601,7 @@ struct Sci_TextRange {
<h3 id="EncodedAccess">Specific to GTK+, Cocoa and Windows only: Access to encoded text</h3>
- <p><b id="SCI_TARGETASUTF8">SCI_TARGETASUTF8(&lt;unused&gt;, char *s)</b><br />
+ <p><b id="SCI_TARGETASUTF8">SCI_TARGETASUTF8(&lt;unused&gt;, char *s) &rarr; int</b><br />
This method retrieves the value of the target encoded as UTF-8 which is the default
encoding of GTK+ so is useful for retrieving text for use in other parts of the user interface,
such as find and replace dialogs. The length of the encoded text in bytes is returned.
@@ -601,7 +609,7 @@ struct Sci_TextRange {
more complex work of transcoding from the various encodings supported.
</p>
- <p><b id="SCI_ENCODEDFROMUTF8">SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded)</b><br />
+ <p><b id="SCI_ENCODEDFROMUTF8">SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) &rarr; int</b><br />
<b id="SCI_SETLENGTHFORENCODE">SCI_SETLENGTHFORENCODE(int bytes)</b><br />
<code>SCI_ENCODEDFROMUTF8</code> converts a UTF-8 string into the document's
encoding which is useful for taking the results of a find dialog, for example, and receiving
@@ -616,7 +624,7 @@ struct Sci_TextRange {
<p>
There are methods to search for text and for regular expressions.
Most applications should use
- <a class="message" href="#SCI_SEARCHINTARGET">SCI_SEARCHINTARGET</a>
+ <a class="seealso" href="#SCI_SEARCHINTARGET">SCI_SEARCHINTARGET</a>
as the basis for their search implementations.
Other calls augment this or were implemented before <code>SCI_SEARCHINTARGET</code>.
</p>
@@ -629,7 +637,7 @@ struct Sci_TextRange {
A different regular expression
library can be <a class="jump" href="#AlternativeRegEx">integrated into Scintilla</a>
or can be called from the container using direct access to the buffer contents through
- <a class="message" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a>.
+ <a class="seealso" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a>.
</p>
<h3 id="SearchAndReplaceUsingTheTarget">Search and replace using the target</h3>
@@ -640,30 +648,26 @@ struct Sci_TextRange {
<code>SCI_SEARCHINTARGET</code> such as <code>SCFIND_MATCHCASE</code>,
<code>SCFIND_WHOLEWORD</code>, <code>SCFIND_WORDSTART</code>, and <code>SCFIND_REGEXP</code>
can be set with <code>SCI_SETSEARCHFLAGS</code>.</p>
- <code><a class="message" href="#SCI_SETTARGETSTART">SCI_SETTARGETSTART(int pos)</a><br />
- <a class="message" href="#SCI_GETTARGETSTART">SCI_GETTARGETSTART</a><br />
- <a class="message" href="#SCI_SETTARGETEND">SCI_SETTARGETEND(int pos)</a><br />
- <a class="message" href="#SCI_GETTARGETEND">SCI_GETTARGETEND</a><br />
+ <code><a class="message" href="#SCI_SETTARGETSTART">SCI_SETTARGETSTART(int start)</a><br />
+ <a class="message" href="#SCI_GETTARGETSTART">SCI_GETTARGETSTART &rarr; position</a><br />
+ <a class="message" href="#SCI_SETTARGETEND">SCI_SETTARGETEND(int end)</a><br />
+ <a class="message" href="#SCI_GETTARGETEND">SCI_GETTARGETEND &rarr; position</a><br />
<a class="message" href="#SCI_SETTARGETRANGE">SCI_SETTARGETRANGE(int start, int end)</a><br />
<a class="message" href="#SCI_TARGETFROMSELECTION">SCI_TARGETFROMSELECTION</a><br />
<a class="message" href="#SCI_TARGETWHOLEDOCUMENT">SCI_TARGETWHOLEDOCUMENT</a><br />
<a class="message" href="#SCI_SETSEARCHFLAGS">SCI_SETSEARCHFLAGS(int searchFlags)</a><br />
- <a class="message" href="#SCI_GETSEARCHFLAGS">SCI_GETSEARCHFLAGS</a><br />
- <a class="message" href="#SCI_SEARCHINTARGET">SCI_SEARCHINTARGET(int length, const char
- *text)</a><br />
- <a class="message" href="#SCI_GETTARGETTEXT">SCI_GETTARGETTEXT(&lt;unused&gt;,
- char *text)</a><br />
- <a class="message" href="#SCI_REPLACETARGET">SCI_REPLACETARGET(int length, const char
- *text)</a><br />
- <a class="message" href="#SCI_REPLACETARGETRE">SCI_REPLACETARGETRE(int length, const char
- *text)</a><br />
- <a class="message" href="#SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue)</a><br />
+ <a class="message" href="#SCI_GETSEARCHFLAGS">SCI_GETSEARCHFLAGS &rarr; int</a><br />
+ <a class="message" href="#SCI_SEARCHINTARGET">SCI_SEARCHINTARGET(int length, const char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETTARGETTEXT">SCI_GETTARGETTEXT(&lt;unused&gt;, char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_REPLACETARGET">SCI_REPLACETARGET(int length, const char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_REPLACETARGETRE">SCI_REPLACETARGETRE(int length, const char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue) &rarr; int</a><br />
</code>
- <p><b id="SCI_SETTARGETSTART">SCI_SETTARGETSTART(int pos)</b><br />
- <b id="SCI_GETTARGETSTART">SCI_GETTARGETSTART</b><br />
- <b id="SCI_SETTARGETEND">SCI_SETTARGETEND(int pos)</b><br />
- <b id="SCI_GETTARGETEND">SCI_GETTARGETEND</b><br />
+ <p><b id="SCI_SETTARGETSTART">SCI_SETTARGETSTART(int start)</b><br />
+ <b id="SCI_GETTARGETSTART">SCI_GETTARGETSTART &rarr; position</b><br />
+ <b id="SCI_SETTARGETEND">SCI_SETTARGETEND(int end)</b><br />
+ <b id="SCI_GETTARGETEND">SCI_GETTARGETEND &rarr; position</b><br />
<b id="SCI_SETTARGETRANGE">SCI_SETTARGETRANGE(int start, int end)</b><br />
These functions set and return the start and end of the target. When searching
you can set start greater than end to find the last matching text in the
@@ -677,47 +681,47 @@ struct Sci_TextRange {
Set the target start to the start of the document and target end to the end of the document.</p>
<p><b id="SCI_SETSEARCHFLAGS">SCI_SETSEARCHFLAGS(int searchFlags)</b><br />
- <b id="SCI_GETSEARCHFLAGS">SCI_GETSEARCHFLAGS</b><br />
- These get and set the <a class="jump" href="#searchFlags"><code>searchFlags</code></a> used by
+ <b id="SCI_GETSEARCHFLAGS">SCI_GETSEARCHFLAGS &rarr; int</b><br />
+ These get and set the <a class="jump" href="#searchFlags"><code class="parameter">searchFlags</code></a> used by
<code>SCI_SEARCHINTARGET</code>. There are several option flags including a simple regular
expression search.</p>
- <p><b id="SCI_SEARCHINTARGET">SCI_SEARCHINTARGET(int length, const char *text)</b><br />
+ <p><b id="SCI_SEARCHINTARGET">SCI_SEARCHINTARGET(int length, const char *text) &rarr; int</b><br />
This searches for the first occurrence of a text string in the target defined by
<code>SCI_SETTARGETSTART</code> and <code>SCI_SETTARGETEND</code>. The text string is not zero
- terminated; the size is set by <code>length</code>. The search is modified by the search flags
+ terminated; the size is set by <code class="parameter">length</code>. The search is modified by the search flags
set by <code>SCI_SETSEARCHFLAGS</code>. If the search succeeds, the target is set to the found
text and the return value is the position of the start of the matching text. If the search
fails, the result is -1.</p>
- <p><b id="SCI_GETTARGETTEXT">SCI_GETTARGETTEXT(&lt;unused&gt;, char *text)</b><br />
+ <p><b id="SCI_GETTARGETTEXT">SCI_GETTARGETTEXT(&lt;unused&gt;, char *text) &rarr; int</b><br />
Retrieve the value in the target.</p>
- <p><b id="SCI_REPLACETARGET">SCI_REPLACETARGET(int length, const char *text)</b><br />
- If <code>length</code> is -1, <code>text</code> is a zero terminated string, otherwise
- <code>length</code> sets the number of character to replace the target with.
+ <p><b id="SCI_REPLACETARGET">SCI_REPLACETARGET(int length, const char *text) &rarr; int</b><br />
+ If <code class="parameter">length</code> is -1, <code class="parameter">text</code> is a zero terminated string, otherwise
+ <code class="parameter">length</code> sets the number of character to replace the target with.
After replacement, the target range refers to the replacement text.
The return value
is the length of the replacement string.<br />
Note that the recommended way to delete text in the document is to set the target to the text to be removed,
and to perform a replace target with an empty string.</p>
- <p><b id="SCI_REPLACETARGETRE">SCI_REPLACETARGETRE(int length, const char *text)</b><br />
- This replaces the target using regular expressions. If <code>length</code> is -1,
- <code>text</code> is a zero terminated string, otherwise <code>length</code> is the number of
+ <p><b id="SCI_REPLACETARGETRE">SCI_REPLACETARGETRE(int length, const char *text) &rarr; int</b><br />
+ This replaces the target using regular expressions. If <code class="parameter">length</code> is -1,
+ <code class="parameter">text</code> is a zero terminated string, otherwise <code class="parameter">length</code> is the number of
characters to use. The replacement string is formed from the text string with any sequences of
<code>\1</code> through <code>\9</code> replaced by tagged matches from the most recent regular
expression search. <code>\0</code> is replaced with all the matched text from the most recent search.
After replacement, the target range refers to the replacement text.
The return value is the length of the replacement string.</p>
- <p><b id="SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue NUL-terminated)</b><br />
+ <p><b id="SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue NUL-terminated) &rarr; int</b><br />
Discover what text was matched by tagged expressions in a regular expression search.
This is useful if the application wants to interpret the replacement string itself.</p>
<p>See also: <a class="message" href="#SCI_FINDTEXT"><code>SCI_FINDTEXT</code></a></p>
- <p><b id="searchFlags"><code>searchFlags</code></b><br />
+ <p><b id="searchFlags"><code class="parameter">searchFlags</code></b><br />
Several of the search routines use flag options, which include a simple regular expression
search. Combine the flag options by adding them:</p>
@@ -732,13 +736,15 @@ struct Sci_TextRange {
<tr>
<td><code>SCFIND_WHOLEWORD</code></td>
- <td>A match only occurs if the characters before and after are not word characters.</td>
+ <td>A match only occurs if the characters before and after are not word characters as defined
+ by <a class="message" href="#SCI_SETWORDCHARS"><code>SCI_SETWORDCHARS</code></a>.</td>
</tr>
<tr>
<td><code>SCFIND_WORDSTART</code></td>
- <td>A match only occurs if the character before is not a word character.</td>
+ <td>A match only occurs if the character before is not a word character as defined
+ by <a class="message" href="#SCI_SETWORDCHARS"><code>SCI_SETWORDCHARS</code></a>.</td>
</tr>
<tr>
@@ -868,19 +874,15 @@ struct Sci_TextRange {
generally similar to regular expression support in JavaScript.
See the documentation of your C++ runtime for details on what is supported.</p>
- <code><a class="message" href="#SCI_FINDTEXT">SCI_FINDTEXT(int flags, Sci_TextToFind
- *ttf)</a><br />
+ <code><a class="message" href="#SCI_FINDTEXT">SCI_FINDTEXT(int searchFlags, Sci_TextToFind *ft) &rarr; position</a><br />
<a class="message" href="#SCI_SEARCHANCHOR">SCI_SEARCHANCHOR</a><br />
- <a class="message" href="#SCI_SEARCHNEXT">SCI_SEARCHNEXT(int searchFlags, const char
- *text)</a><br />
- <a class="message" href="#SCI_SEARCHPREV">SCI_SEARCHPREV(int searchFlags, const char
- *text)</a><br />
+ <a class="message" href="#SCI_SEARCHNEXT">SCI_SEARCHNEXT(int searchFlags, const char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_SEARCHPREV">SCI_SEARCHPREV(int searchFlags, const char *text) &rarr; int</a><br />
</code>
- <p><b id="SCI_FINDTEXT">SCI_FINDTEXT(int searchFlags, <a class="jump"
- href="#Sci_TextToFind">Sci_TextToFind</a> *ttf)</b><br />
+ <p><b id="SCI_FINDTEXT">SCI_FINDTEXT(int searchFlags, <a class="jump" href="#Sci_TextToFind">Sci_TextToFind</a> *ft) &rarr; position</b><br />
This message searches for text in the document. It does not use or move the current selection.
- The <a class="jump" href="#searchFlags"><code>searchFlags</code></a> argument controls the
+ The <a class="jump" href="#searchFlags"><code class="parameter">searchFlags</code></a> argument controls the
search type, which includes regular expression searches.</p>
<p>You can
@@ -914,8 +916,8 @@ struct Sci_TextToFind {
</pre>
<p><b id="SCI_SEARCHANCHOR">SCI_SEARCHANCHOR</b><br />
- <b id="SCI_SEARCHNEXT">SCI_SEARCHNEXT(int searchFlags, const char *text)</b><br />
- <b id="SCI_SEARCHPREV">SCI_SEARCHPREV(int searchFlags, const char *text)</b><br />
+ <b id="SCI_SEARCHNEXT">SCI_SEARCHNEXT(int searchFlags, const char *text) &rarr; int</b><br />
+ <b id="SCI_SEARCHPREV">SCI_SEARCHPREV(int searchFlags, const char *text) &rarr; int</b><br />
These messages provide relocatable search support. This allows multiple incremental
interactive searches to be macro recorded while still setting the selection to found text so
the find/select operation is self-contained. These three messages send <a class="message"
@@ -930,7 +932,7 @@ struct Sci_TextToFind {
<p><code>SCI_SEARCHNEXT</code> and <code>SCI_SEARCHPREV</code> search for the next and previous
occurrence of the zero terminated search string pointed at by text. The search is modified by
- the <a class="jump" href="#searchFlags"><code>searchFlags</code></a>. </p>
+ the <a class="jump" href="#searchFlags"><code class="parameter">searchFlags</code></a>. </p>
<p>The return value is -1 if nothing is found, otherwise the return value is the start position
of the matching text. The selection is updated to show the matched text, but is not scrolled
@@ -941,12 +943,16 @@ struct Sci_TextToFind {
<h2 id="Overtype">Overtype</h2>
+ <code><a class="message" href="#SCI_SETOVERTYPE">SCI_SETOVERTYPE(bool overType)</a><br />
+ <a class="message" href="#SCI_GETOVERTYPE">SCI_GETOVERTYPE &rarr; bool</a><br />
+ </code>
+
<p><b id="SCI_SETOVERTYPE">SCI_SETOVERTYPE(bool overType)</b><br />
- <b id="SCI_GETOVERTYPE">SCI_GETOVERTYPE</b><br />
+ <b id="SCI_GETOVERTYPE">SCI_GETOVERTYPE &rarr; bool</b><br />
When overtype is enabled, each typed character replaces the character to the right of the text
caret. When overtype is disabled, characters are inserted at the caret.
- <code>SCI_GETOVERTYPE</code> returns <code>TRUE</code> (1) if overtyping is active, otherwise
- <code>FALSE</code> (0) will be returned. Use <code>SCI_SETOVERTYPE</code> to set the overtype
+ <code>SCI_GETOVERTYPE</code> returns <code>true</code> (1) if overtyping is active, otherwise
+ <code>false</code> (0) will be returned. Use <code>SCI_SETOVERTYPE</code> to set the overtype
mode.</p>
<h2 id="CutCopyAndPaste">Cut, copy and paste</h2>
@@ -955,20 +961,19 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_COPY">SCI_COPY</a><br />
<a class="message" href="#SCI_PASTE">SCI_PASTE</a><br />
<a class="message" href="#SCI_CLEAR">SCI_CLEAR</a><br />
- <a class="message" href="#SCI_CANPASTE">SCI_CANPASTE</a><br />
+ <a class="message" href="#SCI_CANPASTE">SCI_CANPASTE &rarr; bool</a><br />
<a class="message" href="#SCI_COPYRANGE">SCI_COPYRANGE(int start, int end)</a><br />
- <a class="message" href="#SCI_COPYTEXT">SCI_COPYTEXT(int length,
- const char *text)</a><br />
+ <a class="message" href="#SCI_COPYTEXT">SCI_COPYTEXT(int length, const char *text)</a><br />
<a class="message" href="#SCI_COPYALLOWLINE">SCI_COPYALLOWLINE</a><br />
<a class="message" href="#SCI_SETPASTECONVERTENDINGS">SCI_SETPASTECONVERTENDINGS(bool convert)</a><br />
- <a class="message" href="#SCI_GETPASTECONVERTENDINGS">SCI_GETPASTECONVERTENDINGS</a><br />
+ <a class="message" href="#SCI_GETPASTECONVERTENDINGS">SCI_GETPASTECONVERTENDINGS &rarr; bool</a><br />
</code>
<p><b id="SCI_CUT">SCI_CUT</b><br />
<b id="SCI_COPY">SCI_COPY</b><br />
<b id="SCI_PASTE">SCI_PASTE</b><br />
<b id="SCI_CLEAR">SCI_CLEAR</b><br />
- <b id="SCI_CANPASTE">SCI_CANPASTE</b><br />
+ <b id="SCI_CANPASTE">SCI_CANPASTE &rarr; bool</b><br />
<b id="SCI_COPYALLOWLINE">SCI_COPYALLOWLINE</b><br />
These commands perform the standard tasks of cutting and copying data to the clipboard,
pasting from the clipboard into the document, and clearing the document.
@@ -977,7 +982,7 @@ struct Sci_TextToFind {
<code>SCI_GETSELECTIONEMPTY()</code>, which will be zero if there are any non-empty
selection ranges implying that a copy or cut to the clipboard should work.</p>
- <p>GTK+ does not really support <code>SCI_CANPASTE</code> and always returns <code>TRUE</code>
+ <p>GTK+ does not really support <code>SCI_CANPASTE</code> and always returns <code>true</code>
unless the document is read-only.</p>
<p>On X, the clipboard is asynchronous and may require several messages between
@@ -996,16 +1001,20 @@ struct Sci_TextToFind {
text to the system clipboard.</p>
<p><b id="SCI_SETPASTECONVERTENDINGS">SCI_SETPASTECONVERTENDINGS(bool convert)</b><br />
- <b id="SCI_GETPASTECONVERTENDINGS">SCI_GETPASTECONVERTENDINGS</b><br />
+ <b id="SCI_GETPASTECONVERTENDINGS">SCI_GETPASTECONVERTENDINGS &rarr; bool</b><br />
If this property is set then when text is pasted any line ends are converted to match the document's
end of line mode as set with
- <a class="message" href="#SCI_SETEOLMODE">SCI_SETEOLMODE</a>.
+ <a class="seealso" href="#SCI_SETEOLMODE">SCI_SETEOLMODE</a>.
Defaults to true.</p>
<h2 id="ErrorHandling">Error handling</h2>
+ <code><a class="message" href="#SCI_SETSTATUS">SCI_SETSTATUS(int status)</a><br />
+ <a class="message" href="#SCI_GETSTATUS">SCI_GETSTATUS &rarr; int</a><br />
+ </code>
+
<p><b id="SCI_SETSTATUS">SCI_SETSTATUS(int status)</b><br />
- <b id="SCI_GETSTATUS">SCI_GETSTATUS</b><br />
+ <b id="SCI_GETSTATUS">SCI_GETSTATUS &rarr; int</b><br />
If an error occurs, Scintilla may set an internal error number that can be retrieved with
<code>SCI_GETSTATUS</code>.
To clear the error status call <code>SCI_SETSTATUS(0)</code>.
@@ -1054,20 +1063,19 @@ struct Sci_TextToFind {
<code>SCI_ENDUNDOACTION</code> messages. These transactions can be nested and only the top-level
sequences are undone as units.</p>
<code><a class="message" href="#SCI_UNDO">SCI_UNDO</a><br />
- <a class="message" href="#SCI_CANUNDO">SCI_CANUNDO</a><br />
+ <a class="message" href="#SCI_CANUNDO">SCI_CANUNDO &rarr; bool</a><br />
<a class="message" href="#SCI_EMPTYUNDOBUFFER">SCI_EMPTYUNDOBUFFER</a><br />
<a class="message" href="#SCI_REDO">SCI_REDO</a><br />
- <a class="message" href="#SCI_CANREDO">SCI_CANREDO</a><br />
- <a class="message" href="#SCI_SETUNDOCOLLECTION">SCI_SETUNDOCOLLECTION(bool
- collectUndo)</a><br />
- <a class="message" href="#SCI_GETUNDOCOLLECTION">SCI_GETUNDOCOLLECTION</a><br />
+ <a class="message" href="#SCI_CANREDO">SCI_CANREDO &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETUNDOCOLLECTION">SCI_SETUNDOCOLLECTION(bool collectUndo)</a><br />
+ <a class="message" href="#SCI_GETUNDOCOLLECTION">SCI_GETUNDOCOLLECTION &rarr; bool</a><br />
<a class="message" href="#SCI_BEGINUNDOACTION">SCI_BEGINUNDOACTION</a><br />
<a class="message" href="#SCI_ENDUNDOACTION">SCI_ENDUNDOACTION</a><br />
<a class="message" href="#SCI_ADDUNDOACTION">SCI_ADDUNDOACTION(int token, int flags)</a><br />
</code>
<p><b id="SCI_UNDO">SCI_UNDO</b><br />
- <b id="SCI_CANUNDO">SCI_CANUNDO</b><br />
+ <b id="SCI_CANUNDO">SCI_CANUNDO &rarr; bool</b><br />
<code>SCI_UNDO</code> undoes one action, or if the undo buffer has reached a
<code>SCI_ENDUNDOACTION</code> point, all the actions back to the corresponding
<code>SCI_BEGINUNDOACTION</code>.</p>
@@ -1076,7 +1084,7 @@ struct Sci_TextToFind {
typically use the result of this message to enable/disable the Edit menu Undo command.</p>
<p><b id="SCI_REDO">SCI_REDO</b><br />
- <b id="SCI_CANREDO">SCI_CANREDO</b><br />
+ <b id="SCI_CANREDO">SCI_CANREDO &rarr; bool</b><br />
<code>SCI_REDO</code> undoes the effect of the last <code>SCI_UNDO</code> operation.</p>
<p><code>SCI_CANREDO</code> returns 0 if there is no action to redo and 1 if there are undo
@@ -1093,7 +1101,7 @@ struct Sci_TextToFind {
<p>See also: <a class="message" href="#SCI_SETSAVEPOINT"><code>SCI_SETSAVEPOINT</code></a></p>
<p><b id="SCI_SETUNDOCOLLECTION">SCI_SETUNDOCOLLECTION(bool collectUndo)</b><br />
- <b id="SCI_GETUNDOCOLLECTION">SCI_GETUNDOCOLLECTION</b><br />
+ <b id="SCI_GETUNDOCOLLECTION">SCI_GETUNDOCOLLECTION &rarr; bool</b><br />
You can control whether Scintilla collects undo information with
<code>SCI_SETUNDOCOLLECTION</code>. Pass in <code>true</code> (1) to collect information and
<code>false</code> (0) to stop collecting. If you stop collection, you should also use
@@ -1142,83 +1150,73 @@ struct Sci_TextToFind {
(after the last character). If you use messages, there is nothing to stop you setting a
position that is in the middle of a CRLF pair, or in the middle of a 2 byte character. However,
keyboard commands will not move the caret into such positions.</p>
- <code><a class="message" href="#SCI_GETTEXTLENGTH">SCI_GETTEXTLENGTH</a><br />
- <a class="message" href="#SCI_GETLENGTH">SCI_GETLENGTH</a><br />
- <a class="message" href="#SCI_GETLINECOUNT">SCI_GETLINECOUNT</a><br />
- <a class="message" href="#SCI_LINESONSCREEN">SCI_LINESONSCREEN</a><br />
- <a class="message" href="#SCI_GETMODIFY">SCI_GETMODIFY</a><br />
- <a class="message" href="#SCI_SETSEL">SCI_SETSEL(int anchorPos, int currentPos)</a><br />
- <a class="message" href="#SCI_GOTOPOS">SCI_GOTOPOS(int position)</a><br />
+ <code><a class="message" href="#SCI_GETTEXTLENGTH">SCI_GETTEXTLENGTH &rarr; int</a><br />
+ <a class="message" href="#SCI_GETLENGTH">SCI_GETLENGTH &rarr; int</a><br />
+ <a class="message" href="#SCI_GETLINECOUNT">SCI_GETLINECOUNT &rarr; int</a><br />
+ <a class="message" href="#SCI_LINESONSCREEN">SCI_LINESONSCREEN &rarr; int</a><br />
+ <a class="message" href="#SCI_GETMODIFY">SCI_GETMODIFY &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETSEL">SCI_SETSEL(int anchor, int caret)</a><br />
+ <a class="message" href="#SCI_GOTOPOS">SCI_GOTOPOS(int caret)</a><br />
<a class="message" href="#SCI_GOTOLINE">SCI_GOTOLINE(int line)</a><br />
- <a class="message" href="#SCI_SETCURRENTPOS">SCI_SETCURRENTPOS(int position)</a><br />
- <a class="message" href="#SCI_GETCURRENTPOS">SCI_GETCURRENTPOS</a><br />
- <a class="message" href="#SCI_SETANCHOR">SCI_SETANCHOR(int position)</a><br />
- <a class="message" href="#SCI_GETANCHOR">SCI_GETANCHOR</a><br />
- <a class="message" href="#SCI_SETSELECTIONSTART">SCI_SETSELECTIONSTART(int position)</a><br />
- <a class="message" href="#SCI_GETSELECTIONSTART">SCI_GETSELECTIONSTART</a><br />
- <a class="message" href="#SCI_SETSELECTIONEND">SCI_SETSELECTIONEND(int position)</a><br />
- <a class="message" href="#SCI_GETSELECTIONEND">SCI_GETSELECTIONEND</a><br />
- <a class="message" href="#SCI_SETEMPTYSELECTION">SCI_SETEMPTYSELECTION(int pos)</a><br />
+ <a class="message" href="#SCI_SETCURRENTPOS">SCI_SETCURRENTPOS(int caret)</a><br />
+ <a class="message" href="#SCI_GETCURRENTPOS">SCI_GETCURRENTPOS &rarr; position</a><br />
+ <a class="message" href="#SCI_SETANCHOR">SCI_SETANCHOR(int anchor)</a><br />
+ <a class="message" href="#SCI_GETANCHOR">SCI_GETANCHOR &rarr; position</a><br />
+ <a class="message" href="#SCI_SETSELECTIONSTART">SCI_SETSELECTIONSTART(int anchor)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONSTART">SCI_GETSELECTIONSTART &rarr; position</a><br />
+ <a class="message" href="#SCI_SETSELECTIONEND">SCI_SETSELECTIONEND(int caret)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONEND">SCI_GETSELECTIONEND &rarr; position</a><br />
+ <a class="message" href="#SCI_SETEMPTYSELECTION">SCI_SETEMPTYSELECTION(int caret)</a><br />
<a class="message" href="#SCI_SELECTALL">SCI_SELECTALL</a><br />
- <a class="message" href="#SCI_LINEFROMPOSITION">SCI_LINEFROMPOSITION(int position)</a><br />
- <a class="message" href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(int line)</a><br />
- <a class="message" href="#SCI_GETLINEENDPOSITION">SCI_GETLINEENDPOSITION(int line)</a><br />
- <a class="message" href="#SCI_LINELENGTH">SCI_LINELENGTH(int line)</a><br />
- <a class="message" href="#SCI_GETCOLUMN">SCI_GETCOLUMN(int position)</a><br />
- <a class="message" href="#SCI_FINDCOLUMN">SCI_FINDCOLUMN(int line, int column)</a><br />
- <a class="message" href="#SCI_POSITIONFROMPOINT">SCI_POSITIONFROMPOINT(int x, int y)</a><br />
- <a class="message" href="#SCI_POSITIONFROMPOINTCLOSE">SCI_POSITIONFROMPOINTCLOSE(int x, int
- y)</a><br />
- <a class="message" href="#SCI_CHARPOSITIONFROMPOINT">SCI_CHARPOSITIONFROMPOINT(int x, int y)</a><br />
- <a class="message" href="#SCI_CHARPOSITIONFROMPOINTCLOSE">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int
- y)</a><br />
- <a class="message" href="#SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(&lt;unused&gt;, int
- position)</a><br />
- <a class="message" href="#SCI_POINTYFROMPOSITION">SCI_POINTYFROMPOSITION(&lt;unused&gt;, int
- position)</a><br />
+ <a class="message" href="#SCI_LINEFROMPOSITION">SCI_LINEFROMPOSITION(int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(int line) &rarr; position</a><br />
+ <a class="message" href="#SCI_GETLINEENDPOSITION">SCI_GETLINEENDPOSITION(int line) &rarr; position</a><br />
+ <a class="message" href="#SCI_LINELENGTH">SCI_LINELENGTH(int line) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETCOLUMN">SCI_GETCOLUMN(int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_FINDCOLUMN">SCI_FINDCOLUMN(int line, int column) &rarr; int</a><br />
+ <a class="message" href="#SCI_POSITIONFROMPOINT">SCI_POSITIONFROMPOINT(int x, int y) &rarr; position</a><br />
+ <a class="message" href="#SCI_POSITIONFROMPOINTCLOSE">SCI_POSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</a><br />
+ <a class="message" href="#SCI_CHARPOSITIONFROMPOINT">SCI_CHARPOSITIONFROMPOINT(int x, int y) &rarr; position</a><br />
+ <a class="message" href="#SCI_CHARPOSITIONFROMPOINTCLOSE">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</a><br />
+ <a class="message" href="#SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(&lt;unused&gt;, int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_POINTYFROMPOSITION">SCI_POINTYFROMPOSITION(&lt;unused&gt;, int pos) &rarr; int</a><br />
<a class="message" href="#SCI_HIDESELECTION">SCI_HIDESELECTION(bool hide)</a><br />
- <a class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT(&lt;unused&gt;, char *text)</a><br />
- <a class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE(int textLen, char *text)</a><br />
- <a class="message" href="#SCI_SELECTIONISRECTANGLE">SCI_SELECTIONISRECTANGLE</a><br />
- <a class="message" href="#SCI_SETSELECTIONMODE">SCI_SETSELECTIONMODE(int mode)</a><br />
- <a class="message" href="#SCI_GETSELECTIONMODE">SCI_GETSELECTIONMODE</a><br />
- <a class="message" href="#SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line)</a><br />
- <a class="message" href="#SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line)</a><br />
+ <a class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT(&lt;unused&gt;, char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE(int length, char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_SELECTIONISRECTANGLE">SCI_SELECTIONISRECTANGLE &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETSELECTIONMODE">SCI_SETSELECTIONMODE(int selectionMode)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONMODE">SCI_GETSELECTIONMODE &rarr; int</a><br />
+ <a class="message" href="#SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line) &rarr; position</a><br />
+ <a class="message" href="#SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line) &rarr; position</a><br />
<a class="message" href="#SCI_MOVECARETINSIDEVIEW">SCI_MOVECARETINSIDEVIEW</a><br />
- <a class="message" href="#SCI_WORDENDPOSITION">SCI_WORDENDPOSITION(int position, bool
- onlyWordCharacters)</a><br />
- <a class="message" href="#SCI_WORDSTARTPOSITION">SCI_WORDSTARTPOSITION(int position, bool
- onlyWordCharacters)</a><br />
- <a class="message" href="#SCI_ISRANGEWORD">SCI_ISRANGEWORD(int start, int end)</a><br />
- <a class="message" href="#SCI_POSITIONBEFORE">SCI_POSITIONBEFORE(int position)</a><br />
- <a class="message" href="#SCI_POSITIONAFTER">SCI_POSITIONAFTER(int position)</a><br />
- <a class="message" href="#SCI_POSITIONRELATIVE">SCI_POSITIONRELATIVE(int position, int relative)</a><br />
- <a class="message" href="#SCI_COUNTCHARACTERS">SCI_COUNTCHARACTERS(int startPos, int endPos)</a><br />
- <a class="message" href="#SCI_TEXTWIDTH">SCI_TEXTWIDTH(int styleNumber, const char *text)</a><br />
- <a class="message" href="#SCI_TEXTHEIGHT">SCI_TEXTHEIGHT(int line)</a><br />
+ <a class="message" href="#SCI_POSITIONBEFORE">SCI_POSITIONBEFORE(int pos) &rarr; position</a><br />
+ <a class="message" href="#SCI_POSITIONAFTER">SCI_POSITIONAFTER(int pos) &rarr; position</a><br />
+ <a class="message" href="#SCI_POSITIONRELATIVE">SCI_POSITIONRELATIVE(int pos, int relative) &rarr; position</a><br />
+ <a class="message" href="#SCI_COUNTCHARACTERS">SCI_COUNTCHARACTERS(int start, int end) &rarr; int</a><br />
+ <a class="message" href="#SCI_TEXTWIDTH">SCI_TEXTWIDTH(int style, const char *text) &rarr; int</a><br />
+ <a class="message" href="#SCI_TEXTHEIGHT">SCI_TEXTHEIGHT(int line) &rarr; int</a><br />
<a class="message" href="#SCI_CHOOSECARETX">SCI_CHOOSECARETX</a><br />
<a class="message" href="#SCI_MOVESELECTEDLINESUP">SCI_MOVESELECTEDLINESUP</a><br />
<a class="message" href="#SCI_MOVESELECTEDLINESDOWN">SCI_MOVESELECTEDLINESDOWN</a><br />
- <a class="message" href="#SCI_SETMOUSESELECTIONRECTANGULARSWITCH">SCI_SETMOUSESELECTIONRECTANGULARSWITCH(bool
- mouseSelectionRectangularSwitch)</a><br />
- <a class="message" href="#SCI_GETMOUSESELECTIONRECTANGULARSWITCH">SCI_GETMOUSESELECTIONRECTANGULARSWITCH</a><br />
+ <a class="message" href="#SCI_SETMOUSESELECTIONRECTANGULARSWITCH">SCI_SETMOUSESELECTIONRECTANGULARSWITCH(bool mouseSelectionRectangularSwitch)</a><br />
+ <a class="message" href="#SCI_GETMOUSESELECTIONRECTANGULARSWITCH">SCI_GETMOUSESELECTIONRECTANGULARSWITCH &rarr; bool</a><br />
</code>
- <p><b id="SCI_GETTEXTLENGTH">SCI_GETTEXTLENGTH</b><br />
- <b id="SCI_GETLENGTH">SCI_GETLENGTH</b><br />
+ <p><b id="SCI_GETTEXTLENGTH">SCI_GETTEXTLENGTH &rarr; int</b><br />
+ <b id="SCI_GETLENGTH">SCI_GETLENGTH &rarr; int</b><br />
Both these messages return the length of the document in bytes.</p>
- <p><b id="SCI_GETLINECOUNT">SCI_GETLINECOUNT</b><br />
+ <p><b id="SCI_GETLINECOUNT">SCI_GETLINECOUNT &rarr; int</b><br />
This returns the number of lines in the document. An empty document contains 1 line. A
document holding only an end of line sequence has 2 lines.</p>
- <p><b id="SCI_LINESONSCREEN">SCI_LINESONSCREEN</b><br />
+ <p><b id="SCI_LINESONSCREEN">SCI_LINESONSCREEN &rarr; int</b><br />
This returns the number of complete lines visible on the screen. With a constant line height,
this is the vertical space available divided by the line separation. Unless you arrange to size
your window to an integral number of lines, there may be a partial line visible at the bottom
of the view.</p>
- <p><b id="SCI_GETMODIFY">SCI_GETMODIFY</b><br />
+ <p><b id="SCI_GETMODIFY">SCI_GETMODIFY &rarr; bool</b><br />
This returns non-zero if the document is modified and 0 if it is unmodified. The modified
status of a document is determined by the undo position relative to the save point. The save
point is set by <a class="message" href="#SCI_SETSAVEPOINT"><code>SCI_SETSAVEPOINT</code></a>,
@@ -1230,44 +1228,44 @@ struct Sci_TextToFind {
href="#SCN_SAVEPOINTLEFT"><code>SCN_SAVEPOINTLEFT</code></a> <a class="jump"
href="#Notifications">notification messages</a>.</p>
- <p><b id="SCI_SETSEL">SCI_SETSEL(int anchorPos, int currentPos)</b><br />
- This message sets both the anchor and the current position. If <code>currentPos</code> is
- negative, it means the end of the document. If <code>anchorPos</code> is negative, it means
- remove any selection (i.e. set the anchor to the same position as <code>currentPos</code>). The
+ <p><b id="SCI_SETSEL">SCI_SETSEL(int anchor, int caret)</b><br />
+ This message sets both the anchor and the current position. If <code class="parameter">caret</code> is
+ negative, it means the end of the document. If <code class="parameter">anchor</code> is negative, it means
+ remove any selection (i.e. set the anchor to the same position as <code class="parameter">caret</code>). The
caret is scrolled into view after this operation.</p>
- <p><b id="SCI_GOTOPOS">SCI_GOTOPOS(int pos)</b><br />
- This removes any selection, sets the caret at <code>pos</code> and scrolls the view to make
+ <p><b id="SCI_GOTOPOS">SCI_GOTOPOS(int caret)</b><br />
+ This removes any selection, sets the caret at <code class="parameter">caret</code> and scrolls the view to make
the caret visible, if necessary. It is equivalent to
- <code>SCI_SETSEL(pos, pos)</code>. The anchor position is set the same as the current
+ <code>SCI_SETSEL(caret, caret)</code>. The anchor position is set the same as the current
position.</p>
<p><b id="SCI_GOTOLINE">SCI_GOTOLINE(int line)</b><br />
- This removes any selection and sets the caret at the start of line number <code>line</code>
+ This removes any selection and sets the caret at the start of line number <code class="parameter">line</code>
and scrolls the view (if needed) to make it visible. The anchor position is set the same as the
- current position. If <code>line</code> is outside the lines in the document (first line is 0),
+ current position. If <code class="parameter">line</code> is outside the lines in the document (first line is 0),
the line set is the first or last.</p>
- <p><b id="SCI_SETCURRENTPOS">SCI_SETCURRENTPOS(int pos)</b><br />
+ <p><b id="SCI_SETCURRENTPOS">SCI_SETCURRENTPOS(int caret)</b><br />
This sets the current position and creates a selection between the anchor and the current
position. The caret is not scrolled into view.</p>
<p>See also: <a class="message" href="#SCI_SCROLLCARET"><code>SCI_SCROLLCARET</code></a></p>
- <p><b id="SCI_GETCURRENTPOS">SCI_GETCURRENTPOS</b><br />
+ <p><b id="SCI_GETCURRENTPOS">SCI_GETCURRENTPOS &rarr; position</b><br />
This returns the current position.</p>
- <p><b id="SCI_SETANCHOR">SCI_SETANCHOR(int pos)</b><br />
+ <p><b id="SCI_SETANCHOR">SCI_SETANCHOR(int anchor)</b><br />
This sets the anchor position and creates a selection between the anchor position and the
current position. The caret is not scrolled into view.</p>
<p>See also: <a class="message" href="#SCI_SCROLLCARET"><code>SCI_SCROLLCARET</code></a></p>
- <p><b id="SCI_GETANCHOR">SCI_GETANCHOR</b><br />
+ <p><b id="SCI_GETANCHOR">SCI_GETANCHOR &rarr; position</b><br />
This returns the current anchor position.</p>
- <p><b id="SCI_SETSELECTIONSTART">SCI_SETSELECTIONSTART(int pos)</b><br />
- <b id="SCI_SETSELECTIONEND">SCI_SETSELECTIONEND(int pos)</b><br />
+ <p><b id="SCI_SETSELECTIONSTART">SCI_SETSELECTIONSTART(int anchor)</b><br />
+ <b id="SCI_SETSELECTIONEND">SCI_SETSELECTIONEND(int caret)</b><br />
These set the selection based on the assumption that the anchor position is less than the
current position. They do not make the caret visible. The table shows the positions of the
anchor and the current position after using these messages.</p>
@@ -1276,11 +1274,12 @@ struct Sci_TextToFind {
<thead align="center">
<tr>
<th>
+ New value for
</th>
<th>anchor</th>
- <th>current</th>
+ <th>caret</th>
</tr>
</thead>
@@ -1288,96 +1287,96 @@ struct Sci_TextToFind {
<tr>
<th><code>SCI_SETSELECTIONSTART</code></th>
- <td><code>pos</code></td>
+ <td><code class="parameter">anchor</code></td>
- <td><code>Max(pos, current)</code></td>
+ <td><code>Max(</code><code class="parameter">anchor</code><code>, current)</code></td>
</tr>
<tr>
<th><code>SCI_SETSELECTIONEND</code></th>
- <td><code>Min(anchor, pos)</code></td>
+ <td><code>Min(anchor, </code><code class="parameter">caret</code><code>)</code></td>
- <td><code>pos</code></td>
+ <td><code class="parameter">caret</code></td>
</tr>
</tbody>
</table>
<p>See also: <a class="message" href="#SCI_SCROLLCARET"><code>SCI_SCROLLCARET</code></a></p>
- <p><b id="SCI_GETSELECTIONSTART">SCI_GETSELECTIONSTART</b><br />
- <b id="SCI_GETSELECTIONEND">SCI_GETSELECTIONEND</b><br />
+ <p><b id="SCI_GETSELECTIONSTART">SCI_GETSELECTIONSTART &rarr; position</b><br />
+ <b id="SCI_GETSELECTIONEND">SCI_GETSELECTIONEND &rarr; position</b><br />
These return the start and end of the selection without regard to which end is the current
position and which is the anchor. <code>SCI_GETSELECTIONSTART</code> returns the smaller of the
current position or the anchor position. <code>SCI_GETSELECTIONEND</code> returns the larger of
the two values.</p>
- <p><b id="SCI_SETEMPTYSELECTION">SCI_SETEMPTYSELECTION(int pos)</b><br />
- This removes any selection and sets the caret at <code>pos</code>. The caret is not scrolled into view.</p>
+ <p><b id="SCI_SETEMPTYSELECTION">SCI_SETEMPTYSELECTION(int caret)</b><br />
+ This removes any selection and sets the caret at <code class="parameter">caret</code>. The caret is not scrolled into view.</p>
<p><b id="SCI_SELECTALL">SCI_SELECTALL</b><br />
This selects all the text in the document. The current position is not scrolled into view.</p>
- <p><b id="SCI_LINEFROMPOSITION">SCI_LINEFROMPOSITION(int pos)</b><br />
- This message returns the line that contains the position <code>pos</code> in the document. The
- return value is 0 if <code>pos</code> &lt;= 0. The return value is the last line if
- <code>pos</code> is beyond the end of the document.</p>
+ <p><b id="SCI_LINEFROMPOSITION">SCI_LINEFROMPOSITION(int pos) &rarr; int</b><br />
+ This message returns the line that contains the position <code class="parameter">pos</code> in the document. The
+ return value is 0 if <code class="parameter">pos</code> &lt;= 0. The return value is the last line if
+ <code class="parameter">pos</code> is beyond the end of the document.</p>
- <p><b id="SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(int line)</b><br />
+ <p><b id="SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(int line) &rarr; position</b><br />
This returns the document position that corresponds with the start of the line. If
- <code>line</code> is negative, the position of the line holding the start of the selection is
- returned. If <code>line</code> is greater than the lines in the document, the return value is
- -1. If <code>line</code> is equal to the number of lines in the document (i.e. 1 line past the
+ <code class="parameter">line</code> is negative, the position of the line holding the start of the selection is
+ returned. If <code class="parameter">line</code> is greater than the lines in the document, the return value is
+ -1. If <code class="parameter">line</code> is equal to the number of lines in the document (i.e. 1 line past the
last line), the return value is the end of the document.</p>
- <p><b id="SCI_GETLINEENDPOSITION">SCI_GETLINEENDPOSITION(int line)</b><br />
- This returns the position at the end of the line, before any line end characters. If <code>line</code>
+ <p><b id="SCI_GETLINEENDPOSITION">SCI_GETLINEENDPOSITION(int line) &rarr; position</b><br />
+ This returns the position at the end of the line, before any line end characters. If <code class="parameter">line</code>
is the last line in the document (which does not have any end of line characters) or greater,
the result is the size of the document.
- If <code>line</code> is negative the result is undefined.</p>
+ If <code class="parameter">line</code> is negative the result is undefined.</p>
- <p><b id="SCI_LINELENGTH">SCI_LINELENGTH(int line)</b><br />
- This returns the length of the line, including any line end characters. If <code>line</code>
+ <p><b id="SCI_LINELENGTH">SCI_LINELENGTH(int line) &rarr; int</b><br />
+ This returns the length of the line, including any line end characters. If <code class="parameter">line</code>
is negative or beyond the last line in the document, the result is 0. If you want the length of
the line not including any end of line characters, use <a class="message"
href="#SCI_GETLINEENDPOSITION"><code>SCI_GETLINEENDPOSITION(line)</code></a> - <a class="message"
href="#SCI_POSITIONFROMLINE"><code>SCI_POSITIONFROMLINE(line)</code></a>.</p>
- <p><b id="SCI_GETSELTEXT">SCI_GETSELTEXT(&lt;unused&gt;, char *text NUL-terminated)</b><br />
- This copies the currently selected text and a terminating 0 byte to the <code>text</code>
- buffer. The buffer size should be determined by calling with a NULL pointer for the <code>text</code> argument
+ <p><b id="SCI_GETSELTEXT">SCI_GETSELTEXT(&lt;unused&gt;, char *text NUL-terminated) &rarr; int</b><br />
+ This copies the currently selected text and a terminating 0 byte to the <code class="parameter">text</code>
+ buffer. The buffer size should be determined by calling with a NULL pointer for the <code class="parameter">text</code> argument
<code>SCI_GETSELTEXT(0,0)</code>.
This allows for rectangular and discontiguous selections as well as simple selections.
See <a class="toc" href="#MultipleSelectionAndVirtualSpace">Multiple Selection</a> for information on
how multiple and rectangular selections and virtual space are copied.</p>
- <p>See also: <code><a class="message" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
- <a class="message" href="#SCI_GETLINE">SCI_GETLINE</a>,
- <a class="message" href="#SCI_GETTEXT">SCI_GETTEXT</a>,
- <a class="message" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
- <a class="message" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>
+ <p>See also: <code><a class="seealso" href="#SCI_GETCURLINE">SCI_GETCURLINE</a>,
+ <a class="seealso" href="#SCI_GETLINE">SCI_GETLINE</a>,
+ <a class="seealso" href="#SCI_GETTEXT">SCI_GETTEXT</a>,
+ <a class="seealso" href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>,
+ <a class="seealso" href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a>
</code></p>
- <p><b id="SCI_GETCURLINE">SCI_GETCURLINE(int textLen, char *text NUL-terminated)</b><br />
+ <p><b id="SCI_GETCURLINE">SCI_GETCURLINE(int length, char *text NUL-terminated) &rarr; int</b><br />
This retrieves the text of the line containing the caret and returns the position within the
line of the caret. Pass in <code>char* text</code> pointing at a buffer large enough to hold
the text you wish to retrieve and a terminating 0 character.
- Set <code>textLen</code> to the
+ Set <code class="parameter">length</code> to the
length of the buffer which must be at least 1 to hold the terminating 0 character.
If the text argument is 0 then the length that should be allocated
to store the entire current line is returned.</p>
- <p>See also: <code><a class="message" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>, <a
- class="message" href="#SCI_GETLINE">SCI_GETLINE</a>, <a class="message"
- href="#SCI_GETTEXT">SCI_GETTEXT</a>, <a class="message"
- href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>, <a class="message"
+ <p>See also: <code><a class="seealso" href="#SCI_GETSELTEXT">SCI_GETSELTEXT</a>, <a
+ class="seealso" href="#SCI_GETLINE">SCI_GETLINE</a>, <a class="seealso"
+ href="#SCI_GETTEXT">SCI_GETTEXT</a>, <a class="seealso"
+ href="#SCI_GETSTYLEDTEXT">SCI_GETSTYLEDTEXT</a>, <a class="seealso"
href="#SCI_GETTEXTRANGE">SCI_GETTEXTRANGE</a></code></p>
- <p><b id="SCI_SELECTIONISRECTANGLE">SCI_SELECTIONISRECTANGLE</b><br />
+ <p><b id="SCI_SELECTIONISRECTANGLE">SCI_SELECTIONISRECTANGLE &rarr; bool</b><br />
This returns 1 if the current selection is in rectangle mode, 0 if not.</p>
- <p><b id="SCI_SETSELECTIONMODE">SCI_SETSELECTIONMODE(int mode)</b><br />
- <b id="SCI_GETSELECTIONMODE">SCI_GETSELECTIONMODE</b><br />
+ <p><b id="SCI_SETSELECTIONMODE">SCI_SETSELECTIONMODE(int selectionMode)</b><br />
+ <b id="SCI_GETSELECTIONMODE">SCI_GETSELECTIONMODE &rarr; int</b><br />
The two functions set and get the selection mode, which can be
stream (<code>SC_SEL_STREAM</code>=0) or
rectangular (<code>SC_SEL_RECTANGLE</code>=1) or
@@ -1390,8 +1389,8 @@ struct Sci_TextToFind {
<code>SC_SEL_THIN</code> is the mode after a rectangular selection has been typed into and ensures
that no characters are selected.</p>
- <p><b id="SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line)</b><br />
- <b id="SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line)</b><br />
+ <p><b id="SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line) &rarr; position</b><br />
+ <b id="SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line) &rarr; position</b><br />
Retrieve the position of the start and end of the selection at the given line with
<code>INVALID_POSITION</code> returned if no selection on this line.</p>
@@ -1399,153 +1398,61 @@ struct Sci_TextToFind {
If the caret is off the top or bottom of the view, it is moved to the nearest line that is
visible to its current position. Any selection is lost.</p>
- <p><b id="SCI_WORDENDPOSITION">SCI_WORDENDPOSITION(int position, bool
- onlyWordCharacters)</b><br />
- <b id="SCI_WORDSTARTPOSITION">SCI_WORDSTARTPOSITION(int position, bool
- onlyWordCharacters)</b><br />
- These messages return the start and end of words using the same definition of words as used
- internally within Scintilla. You can set your own list of characters that count as words with
- <a class="message" href="#SCI_SETWORDCHARS"><code>SCI_SETWORDCHARS</code></a>. The position
- sets the start or the search, which is forwards when searching for the end and backwards when
- searching for the start.</p>
-
- <p><b id="SCI_ISRANGEWORD">SCI_ISRANGEWORD(int start, int end)</b><br />
- Is the range start..end a word or set of words? This message checks that start is at a word start transition and that
- end is at a word end transition. It does not check whether there are any spaces inside the range.</p>
-
- <a class="message" href="#SCI_ISRANGEWORD">SCI_ISRANGEWORD(int start, int end)</a><br />
-
- <p>Set <code>onlyWordCharacters</code> to <code>true</code> (1) to stop searching at the first
- non-word character in the search direction. If <code>onlyWordCharacters</code> is
- <code>false</code> (0), the first character in the search direction sets the type of the search
- as word or non-word and the search stops at the first non-matching character. Searches are also
- terminated by the start or end of the document.</p>
-
- <p>If "w" represents word characters and "." represents non-word characters and "|" represents
- the position and <code>true</code> or <code>false</code> is the state of
- <code>onlyWordCharacters</code>:</p>
-
- <table cellpadding="3" cellspacing="0" border="1" summary="Word start and end positions">
- <thead align="center">
- <tr>
- <th>Initial state</th>
-
- <th>end, true</th>
-
- <th>end, false</th>
-
- <th>start, true</th>
-
- <th>start, false</th>
- </tr>
- </thead>
-
- <tbody align="center">
- <tr>
- <td>..ww..|..ww..</td>
-
- <td>..ww..|..ww..</td>
-
- <td>..ww....|ww..</td>
-
- <td>..ww..|..ww..</td>
-
- <td>..ww|....ww..</td>
- </tr>
-
- <tr>
- <td>....ww|ww....</td>
-
- <td>....wwww|....</td>
-
- <td>....wwww|....</td>
-
- <td>....|wwww....</td>
-
- <td>....|wwww....</td>
- </tr>
-
- <tr>
- <td>..ww|....ww..</td>
-
- <td>..ww|....ww..</td>
-
- <td>..ww....|ww..</td>
-
- <td>..|ww....ww..</td>
-
- <td>..|ww....ww..</td>
- </tr>
-
- <tr>
- <td>..ww....|ww..</td>
-
- <td>..ww....ww|..</td>
-
- <td>..ww....ww|..</td>
-
- <td>..ww....|ww..</td>
-
- <td>..ww|....ww..</td>
- </tr>
- </tbody>
- </table>
-
- <p><b id="SCI_POSITIONBEFORE">SCI_POSITIONBEFORE(int position)</b><br />
- <b id="SCI_POSITIONAFTER">SCI_POSITIONAFTER(int position)</b><br />
+ <p><b id="SCI_POSITIONBEFORE">SCI_POSITIONBEFORE(int pos) &rarr; position</b><br />
+ <b id="SCI_POSITIONAFTER">SCI_POSITIONAFTER(int pos) &rarr; position</b><br />
These messages return the position before and after another position
in the document taking into account the current code page. The minimum
position returned is 0 and the maximum is the last position in the document.
If called with a position within a multi byte character will return the position
of the start/end of that character.</p>
- <p><b id="SCI_POSITIONRELATIVE">SCI_POSITIONRELATIVE(int position, int relative)</b><br />
+ <p><b id="SCI_POSITIONRELATIVE">SCI_POSITIONRELATIVE(int pos, int relative) &rarr; position</b><br />
Count a number of whole characters before or after the argument position and return that position.
The minimum position returned is 0 and the maximum is the last position in the document.
If the position goes past the document end then 0 is returned.
</p>
- <p><b id="SCI_COUNTCHARACTERS">SCI_COUNTCHARACTERS(int startPos, int endPos)</b><br />
+ <p><b id="SCI_COUNTCHARACTERS">SCI_COUNTCHARACTERS(int start, int end) &rarr; int</b><br />
Returns the number of whole characters between two positions..</p>
- <p><b id="SCI_TEXTWIDTH">SCI_TEXTWIDTH(int styleNumber, const char *text)</b><br />
- This returns the pixel width of a string drawn in the given <code>styleNumber</code> which can
+ <p><b id="SCI_TEXTWIDTH">SCI_TEXTWIDTH(int style, const char *text) &rarr; int</b><br />
+ This returns the pixel width of a string drawn in the given <code class="parameter">style</code> which can
be used, for example, to decide how wide to make the line number margin in order to display a
given number of numerals.</p>
- <p><b id="SCI_TEXTHEIGHT">SCI_TEXTHEIGHT(int line)</b><br />
+ <p><b id="SCI_TEXTHEIGHT">SCI_TEXTHEIGHT(int line) &rarr; int</b><br />
This returns the height in pixels of a particular line. Currently all lines are the same
height.</p>
- <p><b id="SCI_GETCOLUMN">SCI_GETCOLUMN(int pos)</b><br />
- This message returns the column number of a position <code>pos</code> within the document
+ <p><b id="SCI_GETCOLUMN">SCI_GETCOLUMN(int pos) &rarr; int</b><br />
+ This message returns the column number of a position <code class="parameter">pos</code> within the document
taking the width of tabs into account. This returns the column number of the last tab on the
- line before <code>pos</code>, plus the number of characters between the last tab and
- <code>pos</code>. If there are no tab characters on the line, the return value is the number of
+ line before <code class="parameter">pos</code>, plus the number of characters between the last tab and
+ <code class="parameter">pos</code>. If there are no tab characters on the line, the return value is the number of
characters up to the position on the line. In both cases, double byte characters count as a
single character. This is probably only useful with monospaced fonts.</p>
- <p><b id="SCI_FINDCOLUMN">SCI_FINDCOLUMN(int line, int column)</b><br />
- This message returns the position of a <code>column</code> on a <code>line</code>
+ <p><b id="SCI_FINDCOLUMN">SCI_FINDCOLUMN(int line, int column) &rarr; int</b><br />
+ This message returns the position of a <code class="parameter">column</code> on a <code class="parameter">line</code>
taking the width of tabs into account. It treats a multi-byte character as a single column.
Column numbers, like lines start at 0.</p>
- <p><b id="SCI_POSITIONFROMPOINT">SCI_POSITIONFROMPOINT(int x, int y)</b><br />
- <b id="SCI_POSITIONFROMPOINTCLOSE">SCI_POSITIONFROMPOINTCLOSE(int x, int y)</b><br />
+ <p><b id="SCI_POSITIONFROMPOINT">SCI_POSITIONFROMPOINT(int x, int y) &rarr; position</b><br />
+ <b id="SCI_POSITIONFROMPOINTCLOSE">SCI_POSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</b><br />
<code>SCI_POSITIONFROMPOINT</code> finds the closest character position to a point and
<code>SCI_POSITIONFROMPOINTCLOSE</code> is similar but returns -1 if the point is outside the
window or not close to any characters.</p>
- <p><b id="SCI_CHARPOSITIONFROMPOINT">SCI_CHARPOSITIONFROMPOINT(int x, int y)</b><br />
- <b id="SCI_CHARPOSITIONFROMPOINTCLOSE">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y)</b><br />
+ <p><b id="SCI_CHARPOSITIONFROMPOINT">SCI_CHARPOSITIONFROMPOINT(int x, int y) &rarr; position</b><br />
+ <b id="SCI_CHARPOSITIONFROMPOINTCLOSE">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</b><br />
<code>SCI_CHARPOSITIONFROMPOINT</code> finds the closest character to a point and
<code>SCI_CHARPOSITIONFROMPOINTCLOSE</code> is similar but returns -1 if the point is outside the
window or not close to any characters. This is similar to the previous methods but finds characters rather than
inter-character positions.</p>
- <p><b id="SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(&lt;unused&gt;, int pos)</b><br />
- <b id="SCI_POINTYFROMPOSITION">SCI_POINTYFROMPOSITION(&lt;unused&gt;, int pos)</b><br />
- These messages return the x and y display pixel location of text at position <code>pos</code>
+ <p><b id="SCI_POINTXFROMPOSITION">SCI_POINTXFROMPOSITION(&lt;unused&gt;, int pos) &rarr; int</b><br />
+ <b id="SCI_POINTYFROMPOSITION">SCI_POINTYFROMPOSITION(&lt;unused&gt;, int pos) &rarr; int</b><br />
+ These messages return the x and y display pixel location of text at position <code class="parameter">pos</code>
in the document.</p>
<p><b id="SCI_HIDESELECTION">SCI_HIDESELECTION(bool hide)</b><br />
@@ -1571,7 +1478,7 @@ struct Sci_TextToFind {
<p><b id="SCI_SETMOUSESELECTIONRECTANGULARSWITCH">SCI_SETMOUSESELECTIONRECTANGULARSWITCH(bool
mouseSelectionRectangularSwitch)</b><br />
- <b id="SCI_GETMOUSESELECTIONRECTANGULARSWITCH">SCI_GETMOUSESELECTIONRECTANGULARSWITCH</b><br />
+ <b id="SCI_GETMOUSESELECTIONRECTANGULARSWITCH">SCI_GETMOUSESELECTIONRECTANGULARSWITCH &rarr; bool</b><br />
Enable or disable the ability to switch to rectangular selection mode while making a selection with the mouse.
When this option is turned on, mouse selections in stream mode can be switched to rectangular mode by pressing
the corresponding modifier key. They then stick to rectangular mode even when the modifier key is released again.
@@ -1582,61 +1489,61 @@ struct Sci_TextToFind {
<code>
<a class="message" href="#SCI_SETMULTIPLESELECTION">SCI_SETMULTIPLESELECTION(bool multipleSelection)</a><br />
- <a class="message" href="#SCI_GETMULTIPLESELECTION">SCI_GETMULTIPLESELECTION</a><br />
+ <a class="message" href="#SCI_GETMULTIPLESELECTION">SCI_GETMULTIPLESELECTION &rarr; bool</a><br />
<a class="message" href="#SCI_SETADDITIONALSELECTIONTYPING">SCI_SETADDITIONALSELECTIONTYPING(bool additionalSelectionTyping)</a><br />
- <a class="message" href="#SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING</a><br />
+ <a class="message" href="#SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING &rarr; bool</a><br />
<a class="message" href="#SCI_SETMULTIPASTE">SCI_SETMULTIPASTE(int multiPaste)</a><br />
- <a class="message" href="#SCI_GETMULTIPASTE">SCI_GETMULTIPASTE</a><br />
+ <a class="message" href="#SCI_GETMULTIPASTE">SCI_GETMULTIPASTE &rarr; int</a><br />
<a class="message" href="#SCI_SETVIRTUALSPACEOPTIONS">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpaceOptions)</a><br />
- <a class="message" href="#SCI_GETVIRTUALSPACEOPTIONS">SCI_GETVIRTUALSPACEOPTIONS</a><br />
+ <a class="message" href="#SCI_GETVIRTUALSPACEOPTIONS">SCI_GETVIRTUALSPACEOPTIONS &rarr; int</a><br />
<a class="message" href="#SCI_SETRECTANGULARSELECTIONMODIFIER">SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)</a><br />
- <a class="message" href="#SCI_GETRECTANGULARSELECTIONMODIFIER">SCI_GETRECTANGULARSELECTIONMODIFIER</a><br />
+ <a class="message" href="#SCI_GETRECTANGULARSELECTIONMODIFIER">SCI_GETRECTANGULARSELECTIONMODIFIER &rarr; int</a><br />
<br />
- <a class="message" href="#SCI_GETSELECTIONS">SCI_GETSELECTIONS</a><br />
- <a class="message" href="#SCI_GETSELECTIONEMPTY">SCI_GETSELECTIONEMPTY</a><br />
+ <a class="message" href="#SCI_GETSELECTIONS">SCI_GETSELECTIONS &rarr; int</a><br />
+ <a class="message" href="#SCI_GETSELECTIONEMPTY">SCI_GETSELECTIONEMPTY &rarr; bool</a><br />
<a class="message" href="#SCI_CLEARSELECTIONS">SCI_CLEARSELECTIONS</a><br />
- <a class="message" href="#SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor)</a><br />
- <a class="message" href="#SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor)</a><br />
+ <a class="message" href="#SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor) &rarr; int</a><br />
+ <a class="message" href="#SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor) &rarr; int</a><br />
<a class="message" href="#SCI_DROPSELECTIONN">SCI_DROPSELECTIONN(int selection)</a><br />
<a class="message" href="#SCI_SETMAINSELECTION">SCI_SETMAINSELECTION(int selection)</a><br />
- <a class="message" href="#SCI_GETMAINSELECTION">SCI_GETMAINSELECTION</a><br />
+ <a class="message" href="#SCI_GETMAINSELECTION">SCI_GETMAINSELECTION &rarr; int</a><br />
<br />
- <a class="message" href="#SCI_SETSELECTIONNCARET">SCI_SETSELECTIONNCARET(int selection, int pos)</a><br />
- <a class="message" href="#SCI_GETSELECTIONNCARET">SCI_GETSELECTIONNCARET(int selection)</a><br />
+ <a class="message" href="#SCI_SETSELECTIONNCARET">SCI_SETSELECTIONNCARET(int selection, int caret)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONNCARET">SCI_GETSELECTIONNCARET(int selection) &rarr; position</a><br />
<a class="message" href="#SCI_SETSELECTIONNCARETVIRTUALSPACE">SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, int space)</a><br />
- <a class="message" href="#SCI_GETSELECTIONNCARETVIRTUALSPACE">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection)</a><br />
- <a class="message" href="#SCI_SETSELECTIONNANCHOR">SCI_SETSELECTIONNANCHOR(int selection, int posAnchor)</a><br />
- <a class="message" href="#SCI_GETSELECTIONNANCHOR">SCI_GETSELECTIONNANCHOR(int selection)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONNCARETVIRTUALSPACE">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) &rarr; int</a><br />
+ <a class="message" href="#SCI_SETSELECTIONNANCHOR">SCI_SETSELECTIONNANCHOR(int selection, int anchor)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONNANCHOR">SCI_GETSELECTIONNANCHOR(int selection) &rarr; position</a><br />
<a class="message" href="#SCI_SETSELECTIONNANCHORVIRTUALSPACE">SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, int space)</a><br />
- <a class="message" href="#SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection)</a><br />
- <a class="message" href="#SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, int pos)</a><br />
- <a class="message" href="#SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection)</a><br />
- <a class="message" href="#SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, int pos)</a><br />
- <a class="message" href="#SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) &rarr; int</a><br />
+ <a class="message" href="#SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, int anchor)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection) &rarr; position</a><br />
+ <a class="message" href="#SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, int caret)</a><br />
+ <a class="message" href="#SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection) &rarr; position</a><br />
<br />
- <a class="message" href="#SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(int pos)</a><br />
- <a class="message" href="#SCI_GETRECTANGULARSELECTIONCARET">SCI_GETRECTANGULARSELECTIONCARET</a><br />
+ <a class="message" href="#SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(int caret)</a><br />
+ <a class="message" href="#SCI_GETRECTANGULARSELECTIONCARET">SCI_GETRECTANGULARSELECTIONCARET &rarr; position</a><br />
<a class="message" href="#SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(int space)</a><br />
- <a class="message" href="#SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE</a><br />
- <a class="message" href="#SCI_SETRECTANGULARSELECTIONANCHOR">SCI_SETRECTANGULARSELECTIONANCHOR(int posAnchor)</a><br />
- <a class="message" href="#SCI_GETRECTANGULARSELECTIONANCHOR">SCI_GETRECTANGULARSELECTIONANCHOR</a><br />
+ <a class="message" href="#SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE &rarr; int</a><br />
+ <a class="message" href="#SCI_SETRECTANGULARSELECTIONANCHOR">SCI_SETRECTANGULARSELECTIONANCHOR(int anchor)</a><br />
+ <a class="message" href="#SCI_GETRECTANGULARSELECTIONANCHOR">SCI_GETRECTANGULARSELECTIONANCHOR &rarr; position</a><br />
<a class="message" href="#SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(int space)</a><br />
- <a class="message" href="#SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE</a><br />
+ <a class="message" href="#SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE &rarr; int</a><br />
<br />
- <a class="message" href="#SCI_SETADDITIONALSELALPHA">SCI_SETADDITIONALSELALPHA(int alpha)</a><br />
- <a class="message" href="#SCI_GETADDITIONALSELALPHA">SCI_GETADDITIONALSELALPHA</a><br />
- <a class="message" href="#SCI_SETADDITIONALSELFORE">SCI_SETADDITIONALSELFORE(int colour)</a><br />
- <a class="message" href="#SCI_SETADDITIONALSELBACK">SCI_SETADDITIONALSELBACK(int colour)</a><br />
- <a class="message" href="#SCI_SETADDITIONALCARETFORE">SCI_SETADDITIONALCARETFORE(int colour)</a><br />
- <a class="message" href="#SCI_GETADDITIONALCARETFORE">SCI_GETADDITIONALCARETFORE</a><br />
+ <a class="message" href="#SCI_SETADDITIONALSELALPHA">SCI_SETADDITIONALSELALPHA(alpha alpha)</a><br />
+ <a class="message" href="#SCI_GETADDITIONALSELALPHA">SCI_GETADDITIONALSELALPHA &rarr; int</a><br />
+ <a class="message" href="#SCI_SETADDITIONALSELFORE">SCI_SETADDITIONALSELFORE(colour fore)</a><br />
+ <a class="message" href="#SCI_SETADDITIONALSELBACK">SCI_SETADDITIONALSELBACK(colour back)</a><br />
+ <a class="message" href="#SCI_SETADDITIONALCARETFORE">SCI_SETADDITIONALCARETFORE(colour fore)</a><br />
+ <a class="message" href="#SCI_GETADDITIONALCARETFORE">SCI_GETADDITIONALCARETFORE &rarr; colour</a><br />
<a class="message" href="#SCI_SETADDITIONALCARETSBLINK">SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)</a><br />
- <a class="message" href="#SCI_GETADDITIONALCARETSBLINK">SCI_GETADDITIONALCARETSBLINK</a><br />
+ <a class="message" href="#SCI_GETADDITIONALCARETSBLINK">SCI_GETADDITIONALCARETSBLINK &rarr; bool</a><br />
<a class="message" href="#SCI_SETADDITIONALCARETSVISIBLE">SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)</a><br />
- <a class="message" href="#SCI_GETADDITIONALCARETSVISIBLE">SCI_GETADDITIONALCARETSVISIBLE</a><br />
+ <a class="message" href="#SCI_GETADDITIONALCARETSVISIBLE">SCI_GETADDITIONALCARETSVISIBLE &rarr; bool</a><br />
<br />
<a class="message" href="#SCI_SWAPMAINANCHORCARET">SCI_SWAPMAINANCHORCARET</a><br />
@@ -1675,26 +1582,26 @@ struct Sci_TextToFind {
<p>
<b id="SCI_SETMULTIPLESELECTION">SCI_SETMULTIPLESELECTION(bool multipleSelection)</b><br />
- <b id="SCI_GETMULTIPLESELECTION">SCI_GETMULTIPLESELECTION</b><br />
+ <b id="SCI_GETMULTIPLESELECTION">SCI_GETMULTIPLESELECTION &rarr; bool</b><br />
Enable or disable multiple selection. When multiple selection is disabled, it is not possible to select
multiple ranges by holding down the Ctrl key while dragging with the mouse.</p>
<p>
<b id="SCI_SETADDITIONALSELECTIONTYPING">SCI_SETADDITIONALSELECTIONTYPING(bool additionalSelectionTyping)</b><br />
- <b id="SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING</b><br />
+ <b id="SCI_GETADDITIONALSELECTIONTYPING">SCI_GETADDITIONALSELECTIONTYPING &rarr; bool</b><br />
Whether typing, new line, cursor left/right/up/down, backspace, delete, home, and end work
with multiple selections simultaneously.
Also allows selection and word and line deletion commands.</p>
<p>
<b id="SCI_SETMULTIPASTE">SCI_SETMULTIPASTE(int multiPaste)</b><br />
- <b id="SCI_GETMULTIPASTE">SCI_GETMULTIPASTE</b><br />
+ <b id="SCI_GETMULTIPASTE">SCI_GETMULTIPASTE &rarr; int</b><br />
When pasting into multiple selections, the pasted text can go into just the main selection with <code>SC_MULTIPASTE_ONCE</code>=0
or into each selection with <code>SC_MULTIPASTE_EACH</code>=1. <code>SC_MULTIPASTE_ONCE</code> is the default.</p>
<p>
- <b id="SCI_SETVIRTUALSPACEOPTIONS">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpace)</b><br />
- <b id="SCI_GETVIRTUALSPACEOPTIONS">SCI_GETVIRTUALSPACEOPTIONS</b><br />
+ <b id="SCI_SETVIRTUALSPACEOPTIONS">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpaceOptions)</b><br />
+ <b id="SCI_GETVIRTUALSPACEOPTIONS">SCI_GETVIRTUALSPACEOPTIONS &rarr; int</b><br />
Virtual space can be enabled or disabled for rectangular selections or in other circumstances or in both.
There are three bit flags <code>SCVS_RECTANGULARSELECTION</code>=1,
<code>SCVS_USERACCESSIBLE</code>=2, and
@@ -1707,7 +1614,7 @@ struct Sci_TextToFind {
<p>
<b id="SCI_SETRECTANGULARSELECTIONMODIFIER">SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)</b><br />
- <b id="SCI_GETRECTANGULARSELECTIONMODIFIER">SCI_GETRECTANGULARSELECTIONMODIFIER</b><br />
+ <b id="SCI_GETRECTANGULARSELECTIONMODIFIER">SCI_GETRECTANGULARSELECTIONMODIFIER &rarr; int</b><br />
On GTK+, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set.
The three possible values are <code>SCMOD_CTRL</code>=2 (default), <code>SCMOD_ALT</code>=4 or <code>SCMOD_SUPER</code>=8.
Since <code>SCMOD_ALT</code> is often already used by a window manager, the window manager may need configuring to allow this choice.
@@ -1715,11 +1622,11 @@ struct Sci_TextToFind {
Command key on a Mac.</p>
<p>
- <b id="SCI_GETSELECTIONS">SCI_GETSELECTIONS</b><br />
+ <b id="SCI_GETSELECTIONS">SCI_GETSELECTIONS &rarr; int</b><br />
Return the number of selections currently active. There is always at least one selection.</p>
<p>
- <b id="SCI_GETSELECTIONEMPTY">SCI_GETSELECTIONEMPTY</b><br />
+ <b id="SCI_GETSELECTIONEMPTY">SCI_GETSELECTIONEMPTY &rarr; bool</b><br />
Return 1 if every selected range is empty else 0.</p>
<p>
@@ -1727,12 +1634,12 @@ struct Sci_TextToFind {
Set a single empty selection at 0 as the only selection.</p>
<p>
- <b id="SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor)</b><br />
- Set a single selection from <code>anchor</code> to <code>caret</code> as the only selection.</p>
+ <b id="SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor) &rarr; int</b><br />
+ Set a single selection from <code class="parameter">anchor</code> to <code class="parameter">caret</code> as the only selection.</p>
<p>
- <b id="SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor)</b><br />
- Add a new selection from <code>anchor</code> to <code>caret</code> as the main selection retaining all other
+ <b id="SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor) &rarr; int</b><br />
+ Add a new selection from <code class="parameter">anchor</code> to <code class="parameter">caret</code> as the main selection retaining all other
selections as additional selections.
Since there is always at least one selection, to set a list of selections, the first selection should be
added with <code>SCI_SETSELECTION</code> and later selections added with <code>SCI_ADDSELECTION</code></p>
@@ -1741,51 +1648,51 @@ struct Sci_TextToFind {
<b id="SCI_DROPSELECTIONN">SCI_DROPSELECTIONN(int selection)</b><br />
If there are multiple selections, remove the indicated selection.
If this was the main selection then make the previous selection the main and if it was the first then the last selection becomes main.
- If there is only one selection, or there is no selection <code>selection</code>, then there is no effect.</p>
+ If there is only one selection, or there is no selection <code class="parameter">selection</code>, then there is no effect.</p>
<p>
<b id="SCI_SETMAINSELECTION">SCI_SETMAINSELECTION(int selection)</b><br />
- <b id="SCI_GETMAINSELECTION">SCI_GETMAINSELECTION</b><br />
+ <b id="SCI_GETMAINSELECTION">SCI_GETMAINSELECTION &rarr; int</b><br />
One of the selections is the main selection which is used to determine what range of text is automatically visible.
The main selection may be displayed in different colours or with a differently styled caret.
Only an already existing selection can be made main.</p>
<p>
- <b id="SCI_SETSELECTIONNCARET">SCI_SETSELECTIONNCARET(int selection, int pos)</b><br />
- <b id="SCI_GETSELECTIONNCARET">SCI_GETSELECTIONNCARET(int selection)</b><br />
+ <b id="SCI_SETSELECTIONNCARET">SCI_SETSELECTIONNCARET(int selection, int caret)</b><br />
+ <b id="SCI_GETSELECTIONNCARET">SCI_GETSELECTIONNCARET(int selection) &rarr; position</b><br />
<b id="SCI_SETSELECTIONNCARETVIRTUALSPACE">SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, int space)</b><br />
- <b id="SCI_GETSELECTIONNCARETVIRTUALSPACE">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection)</b><br />
- <b id="SCI_SETSELECTIONNANCHOR">SCI_SETSELECTIONNANCHOR(int selection, int posAnchor)</b><br />
- <b id="SCI_GETSELECTIONNANCHOR">SCI_GETSELECTIONNANCHOR(int selection)</b><br />
+ <b id="SCI_GETSELECTIONNCARETVIRTUALSPACE">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) &rarr; int</b><br />
+ <b id="SCI_SETSELECTIONNANCHOR">SCI_SETSELECTIONNANCHOR(int selection, int anchor)</b><br />
+ <b id="SCI_GETSELECTIONNANCHOR">SCI_GETSELECTIONNANCHOR(int selection) &rarr; position</b><br />
<b id="SCI_SETSELECTIONNANCHORVIRTUALSPACE">SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, int space)</b><br />
- <b id="SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection)</b><br />
+ <b id="SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) &rarr; int</b><br />
Set or query the position and amount of virtual space for the caret and anchor of each already existing selection.</p>
<p>
- <b id="SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, int pos)</b><br />
- <b id="SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection)</b><br />
- <b id="SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, int pos)</b><br />
- <b id="SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection)</b><br />
+ <b id="SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, int anchor)</b><br />
+ <b id="SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection) &rarr; position</b><br />
+ <b id="SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, int caret)</b><br />
+ <b id="SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection) &rarr; position</b><br />
Set or query the start and end position of each already existing selection.
Mostly of use to query each range for its text. The selection parameter is zero-based. </p>
<p>
- <b id="SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(int pos)</b><br />
- <b id="SCI_GETRECTANGULARSELECTIONCARET">SCI_GETRECTANGULARSELECTIONCARET</b><br />
+ <b id="SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(int caret)</b><br />
+ <b id="SCI_GETRECTANGULARSELECTIONCARET">SCI_GETRECTANGULARSELECTIONCARET &rarr; position</b><br />
<b id="SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(int space)</b><br />
- <b id="SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE</b><br />
- <b id="SCI_SETRECTANGULARSELECTIONANCHOR">SCI_SETRECTANGULARSELECTIONANCHOR(int posAnchor)</b><br />
- <b id="SCI_GETRECTANGULARSELECTIONANCHOR">SCI_GETRECTANGULARSELECTIONANCHOR</b><br />
+ <b id="SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE &rarr; int</b><br />
+ <b id="SCI_SETRECTANGULARSELECTIONANCHOR">SCI_SETRECTANGULARSELECTIONANCHOR(int anchor)</b><br />
+ <b id="SCI_GETRECTANGULARSELECTIONANCHOR">SCI_GETRECTANGULARSELECTIONANCHOR &rarr; position</b><br />
<b id="SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(int space)</b><br />
- <b id="SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE</b><br />
+ <b id="SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE &rarr; int</b><br />
Set or query the position and amount of virtual space for the caret and anchor of the rectangular selection.
After setting the rectangular selection, this is broken down into multiple selections, one for each line.</p>
<p>
- <b id="SCI_SETADDITIONALSELALPHA">SCI_SETADDITIONALSELALPHA(int alpha)</b><br />
- <b id="SCI_GETADDITIONALSELALPHA">SCI_GETADDITIONALSELALPHA</b><br />
- <b id="SCI_SETADDITIONALSELFORE">SCI_SETADDITIONALSELFORE(int <a class="jump" href="#colour">colour</a>)</b><br />
- <b id="SCI_SETADDITIONALSELBACK">SCI_SETADDITIONALSELBACK(int <a class="jump" href="#colour">colour</a>)</b><br />
+ <b id="SCI_SETADDITIONALSELALPHA">SCI_SETADDITIONALSELALPHA(<a class="jump" href="#alpha">alpha</a> alpha)</b><br />
+ <b id="SCI_GETADDITIONALSELALPHA">SCI_GETADDITIONALSELALPHA &rarr; int</b><br />
+ <b id="SCI_SETADDITIONALSELFORE">SCI_SETADDITIONALSELFORE(<a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_SETADDITIONALSELBACK">SCI_SETADDITIONALSELBACK(<a class="jump" href="#colour">colour</a> back)</b><br />
Modify the appearance of additional selections so that they can be differentiated from the main selection which has its appearance set with
<a class="message" href="#SCI_SETSELALPHA"><code>SCI_SETSELALPHA</code></a>,
<a class="message" href="#SCI_GETSELALPHA"><code>SCI_GETSELALPHA</code></a>,
@@ -1800,10 +1707,10 @@ struct Sci_TextToFind {
and <a class="message" href="#SCI_SETSELBACK"><code>SCI_SETSELBACK</code></a> will
overwrite the values set by <code>SCI_SETADDITIONALSEL*</code> functions.</p>
<p>
- <b id="SCI_SETADDITIONALCARETFORE">SCI_SETADDITIONALCARETFORE(int <a class="jump" href="#colour">colour</a>)</b><br />
- <b id="SCI_GETADDITIONALCARETFORE">SCI_GETADDITIONALCARETFORE</b><br />
+ <b id="SCI_SETADDITIONALCARETFORE">SCI_SETADDITIONALCARETFORE(<a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_GETADDITIONALCARETFORE">SCI_GETADDITIONALCARETFORE &rarr; colour</b><br />
<b id="SCI_SETADDITIONALCARETSBLINK">SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)</b><br />
- <b id="SCI_GETADDITIONALCARETSBLINK">SCI_GETADDITIONALCARETSBLINK</b><br />
+ <b id="SCI_GETADDITIONALCARETSBLINK">SCI_GETADDITIONALCARETSBLINK &rarr; bool</b><br />
Modify the appearance of additional carets so that they can be differentiated from the main caret which has its appearance set with
<a class="message" href="#SCI_SETCARETFORE"><code>SCI_SETCARETFORE</code></a>,
<a class="message" href="#SCI_GETCARETFORE"><code>SCI_GETCARETFORE</code></a>,
@@ -1812,7 +1719,7 @@ struct Sci_TextToFind {
<p>
<b id="SCI_SETADDITIONALCARETSVISIBLE">SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)</b><br />
- <b id="SCI_GETADDITIONALCARETSVISIBLE">SCI_GETADDITIONALCARETSVISIBLE</b><br />
+ <b id="SCI_GETADDITIONALCARETSVISIBLE">SCI_GETADDITIONALCARETSVISIBLE &rarr; bool</b><br />
Determine whether to show additional carets (defaults to <code>true</code>).</p>
<p>
@@ -1833,44 +1740,44 @@ struct Sci_TextToFind {
<h2 id="ScrollingAndAutomaticScrolling">Scrolling and automatic scrolling</h2>
<code>
- <a class="message" href="#SCI_SETFIRSTVISIBLELINE">SCI_SETFIRSTVISIBLELINE(int lineDisplay)</a><br />
- <a class="message" href="#SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE</a><br />
+ <a class="message" href="#SCI_SETFIRSTVISIBLELINE">SCI_SETFIRSTVISIBLELINE(int displayLine)</a><br />
+ <a class="message" href="#SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE &rarr; int</a><br />
<a class="message" href="#SCI_SETXOFFSET">SCI_SETXOFFSET(int xOffset)</a><br />
- <a class="message" href="#SCI_GETXOFFSET">SCI_GETXOFFSET</a><br />
- <a class="message" href="#SCI_LINESCROLL">SCI_LINESCROLL(int column, int line)</a><br />
+ <a class="message" href="#SCI_GETXOFFSET">SCI_GETXOFFSET &rarr; int</a><br />
+ <a class="message" href="#SCI_LINESCROLL">SCI_LINESCROLL(int columns, int lines)</a><br />
<a class="message" href="#SCI_SCROLLCARET">SCI_SCROLLCARET</a><br />
<a class="message" href="#SCI_SCROLLRANGE">SCI_SCROLLRANGE(int secondary, int primary)</a><br />
<a class="message" href="#SCI_SETXCARETPOLICY">SCI_SETXCARETPOLICY(int caretPolicy, int
caretSlop)</a><br />
<a class="message" href="#SCI_SETYCARETPOLICY">SCI_SETYCARETPOLICY(int caretPolicy, int
caretSlop)</a><br />
- <a class="message" href="#SCI_SETVISIBLEPOLICY">SCI_SETVISIBLEPOLICY(int caretPolicy, int
- caretSlop)</a><br />
+ <a class="message" href="#SCI_SETVISIBLEPOLICY">SCI_SETVISIBLEPOLICY(int visiblePolicy, int
+ visibleSlop)</a><br />
<a class="message" href="#SCI_SETHSCROLLBAR">SCI_SETHSCROLLBAR(bool visible)</a><br />
- <a class="message" href="#SCI_GETHSCROLLBAR">SCI_GETHSCROLLBAR</a><br />
+ <a class="message" href="#SCI_GETHSCROLLBAR">SCI_GETHSCROLLBAR &rarr; bool</a><br />
<a class="message" href="#SCI_SETVSCROLLBAR">SCI_SETVSCROLLBAR(bool visible)</a><br />
- <a class="message" href="#SCI_GETVSCROLLBAR">SCI_GETVSCROLLBAR</a><br />
+ <a class="message" href="#SCI_GETVSCROLLBAR">SCI_GETVSCROLLBAR &rarr; bool</a><br />
<a class="message" href="#SCI_SETSCROLLWIDTH">SCI_SETSCROLLWIDTH(int pixelWidth)</a><br />
- <a class="message" href="#SCI_GETSCROLLWIDTH">SCI_GETSCROLLWIDTH</a><br />
+ <a class="message" href="#SCI_GETSCROLLWIDTH">SCI_GETSCROLLWIDTH &rarr; int</a><br />
<a class="message" href="#SCI_SETSCROLLWIDTHTRACKING">SCI_SETSCROLLWIDTHTRACKING(bool tracking)</a><br />
- <a class="message" href="#SCI_GETSCROLLWIDTHTRACKING">SCI_GETSCROLLWIDTHTRACKING</a><br />
+ <a class="message" href="#SCI_GETSCROLLWIDTHTRACKING">SCI_GETSCROLLWIDTHTRACKING &rarr; bool</a><br />
<a class="message" href="#SCI_SETENDATLASTLINE">SCI_SETENDATLASTLINE(bool
endAtLastLine)</a><br />
- <a class="message" href="#SCI_GETENDATLASTLINE">SCI_GETENDATLASTLINE</a><br />
+ <a class="message" href="#SCI_GETENDATLASTLINE">SCI_GETENDATLASTLINE &rarr; bool</a><br />
</code>
- <p><b id="SCI_SETFIRSTVISIBLELINE">SCI_SETFIRSTVISIBLELINE(int lineDisplay)</b><br />
- <b id="SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE</b><br />
+ <p><b id="SCI_SETFIRSTVISIBLELINE">SCI_SETFIRSTVISIBLELINE(int displayLine)</b><br />
+ <b id="SCI_GETFIRSTVISIBLELINE">SCI_GETFIRSTVISIBLELINE &rarr; int</b><br />
These messages retrieve and set the line number of the first visible line in the Scintilla view. The first line
in the document is numbered 0. The value is a visible line rather than a document line.</p>
<p><b id="SCI_SETXOFFSET">SCI_SETXOFFSET(int xOffset)</b><br />
- <b id="SCI_GETXOFFSET">SCI_GETXOFFSET</b><br />
- The <code>xOffset</code> is the horizontal scroll position in pixels of the start of the text
+ <b id="SCI_GETXOFFSET">SCI_GETXOFFSET &rarr; int</b><br />
+ The <code class="parameter">xOffset</code> is the horizontal scroll position in pixels of the start of the text
view. A value of 0 is the normal position with the first text column visible at the left of the
view.</p>
- <p><b id="SCI_LINESCROLL">SCI_LINESCROLL(int column, int line)</b><br />
+ <p><b id="SCI_LINESCROLL">SCI_LINESCROLL(int columns, int lines)</b><br />
This will attempt to scroll the display by the number of columns and lines that you specify.
Positive line values increase the line number at the top of the screen (i.e. they move the text
upwards as far as the user is concerned), Negative line values do the reverse.</p>
@@ -1895,7 +1802,7 @@ struct Sci_TextToFind {
<p><b id="SCI_SETXCARETPOLICY">SCI_SETXCARETPOLICY(int caretPolicy, int caretSlop)</b><br />
<b id="SCI_SETYCARETPOLICY">SCI_SETYCARETPOLICY(int caretPolicy, int caretSlop)</b><br />
- These set the caret policy. The value of <code>caretPolicy</code> is a combination of
+ These set the caret policy. The value of <code class="parameter">caretPolicy</code> is a combination of
<code>CARET_SLOP</code>, <code>CARET_STRICT</code>, <code>CARET_JUMPS</code> and
<code>CARET_EVEN</code>.</p>
@@ -1904,7 +1811,7 @@ struct Sci_TextToFind {
<tr>
<th align="left"><code>CARET_SLOP</code></th>
- <td>If set, we can define a slop value: <code>caretSlop</code>. This value defines an
+ <td>If set, we can define a slop value: <code class="parameter">caretSlop</code>. This value defines an
unwanted zone (UZ) where the caret is... unwanted. This zone is defined as a number of
pixels near the vertical margins, and as a number of lines near the horizontal margins.
By keeping the caret away from the edges, it is seen within its context. This makes it
@@ -1917,8 +1824,8 @@ struct Sci_TextToFind {
<th align="left"><code>CARET_STRICT</code></th>
<td>If set, the policy set by <code>CARET_SLOP</code> is enforced... strictly. The caret
- is centred on the display if <code>caretSlop</code> is not set, and cannot go in the UZ
- if <code>caretSlop</code> is set.</td>
+ is centred on the display if <code class="parameter">caretSlop</code> is not set, and cannot go in the UZ
+ if <code class="parameter">caretSlop</code> is set.</td>
</tr>
<tr>
@@ -2143,7 +2050,7 @@ struct Sci_TextToFind {
</tbody>
</table>
- <p><b id="SCI_SETVISIBLEPOLICY">SCI_SETVISIBLEPOLICY(int caretPolicy, int caretSlop)</b><br />
+ <p><b id="SCI_SETVISIBLEPOLICY">SCI_SETVISIBLEPOLICY(int visiblePolicy, int visibleSlop)</b><br />
This determines how the vertical positioning is determined when <a class="message"
href="#SCI_ENSUREVISIBLEENFORCEPOLICY"><code>SCI_ENSUREVISIBLEENFORCEPOLICY</code></a> is
called. It takes <code>VISIBLE_SLOP</code> and <code>VISIBLE_STRICT</code> flags for the policy
@@ -2152,16 +2059,16 @@ struct Sci_TextToFind {
caretSlop)</code></a>.</p>
<p><b id="SCI_SETHSCROLLBAR">SCI_SETHSCROLLBAR(bool visible)</b><br />
- <b id="SCI_GETHSCROLLBAR">SCI_GETHSCROLLBAR</b><br />
+ <b id="SCI_GETHSCROLLBAR">SCI_GETHSCROLLBAR &rarr; bool</b><br />
The horizontal scroll bar is only displayed if it is needed for the assumed width.
If you never wish to see it, call
<code>SCI_SETHSCROLLBAR(0)</code>. Use <code>SCI_SETHSCROLLBAR(1)</code> to enable it again.
<code>SCI_GETHSCROLLBAR</code> returns the current state. The default state is to display it
when needed.</p>
- <p>See also: <a class="message" href="#SCI_SETSCROLLWIDTH">SCI_SETSCROLLWIDTH</a>.</p>
+ <p>See also: <a class="seealso" href="#SCI_SETSCROLLWIDTH">SCI_SETSCROLLWIDTH</a>.</p>
<p><b id="SCI_SETVSCROLLBAR">SCI_SETVSCROLLBAR(bool visible)</b><br />
- <b id="SCI_GETVSCROLLBAR">SCI_GETVSCROLLBAR</b><br />
+ <b id="SCI_GETVSCROLLBAR">SCI_GETVSCROLLBAR &rarr; bool</b><br />
By default, the vertical scroll bar is always displayed when required. You can choose to hide
or show it with <code>SCI_SETVSCROLLBAR</code> and get the current state with
<code>SCI_GETVSCROLLBAR</code>.</p>
@@ -2169,7 +2076,7 @@ struct Sci_TextToFind {
<p>See also: <a class="message" href="#SCI_LINESCROLL"><code>SCI_LINESCROLL</code></a></p>
<p><b id="SCI_SETSCROLLWIDTH">SCI_SETSCROLLWIDTH(int pixelWidth)</b><br />
- <b id="SCI_GETSCROLLWIDTH">SCI_GETSCROLLWIDTH</b><br />
+ <b id="SCI_GETSCROLLWIDTH">SCI_GETSCROLLWIDTH &rarr; int</b><br />
For performance, Scintilla does not measure the display width of the document to determine
the properties of the horizontal scroll bar. Instead, an assumed width is used.
These messages set and get the document width in pixels assumed by Scintilla.
@@ -2178,39 +2085,39 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_SETSCROLLWIDTHTRACKING"><code>SCI_SETSCROLLWIDTHTRACKING</code></a></p>
<p><b id="SCI_SETSCROLLWIDTHTRACKING">SCI_SETSCROLLWIDTHTRACKING(bool tracking)</b><br />
- <b id="SCI_GETSCROLLWIDTHTRACKING">SCI_GETSCROLLWIDTHTRACKING</b><br />
+ <b id="SCI_GETSCROLLWIDTHTRACKING">SCI_GETSCROLLWIDTHTRACKING &rarr; bool</b><br />
If scroll width tracking is enabled then the scroll width is adjusted to ensure that all of the lines currently
displayed can be completely scrolled. This mode never adjusts the scroll width to be narrower.</p>
<p><b id="SCI_SETENDATLASTLINE">SCI_SETENDATLASTLINE(bool endAtLastLine)</b><br />
- <b id="SCI_GETENDATLASTLINE">SCI_GETENDATLASTLINE</b><br />
+ <b id="SCI_GETENDATLASTLINE">SCI_GETENDATLASTLINE &rarr; bool</b><br />
<code>SCI_SETENDATLASTLINE</code> sets the scroll range so that maximum scroll position has
the last line at the bottom of the view (default). Setting this to <code>false</code> allows
scrolling one page below the last line.</p>
<h2 id="WhiteSpace">White space</h2>
- <code><a class="message" href="#SCI_SETVIEWWS">SCI_SETVIEWWS(int wsMode)</a><br />
- <a class="message" href="#SCI_GETVIEWWS">SCI_GETVIEWWS</a><br />
+ <code><a class="message" href="#SCI_SETVIEWWS">SCI_SETVIEWWS(int viewWS)</a><br />
+ <a class="message" href="#SCI_GETVIEWWS">SCI_GETVIEWWS &rarr; int</a><br />
<a class="message" href="#SCI_SETWHITESPACEFORE">SCI_SETWHITESPACEFORE(bool
- useWhitespaceForeColour, int colour)</a><br />
+ useSetting, colour fore)</a><br />
<a class="message" href="#SCI_SETWHITESPACEBACK">SCI_SETWHITESPACEBACK(bool
- useWhitespaceBackColour, int colour)</a><br />
+ useSetting, colour back)</a><br />
<a class="message" href="#SCI_SETWHITESPACESIZE">SCI_SETWHITESPACESIZE(int
size)</a><br />
- <a class="message" href="#SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE</a><br />
+ <a class="message" href="#SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE &rarr; int</a><br />
<a class="message" href="#SCI_SETEXTRAASCENT">SCI_SETEXTRAASCENT(int extraAscent)</a><br />
- <a class="message" href="#SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT</a><br />
+ <a class="message" href="#SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT &rarr; int</a><br />
<a class="message" href="#SCI_SETEXTRADESCENT">SCI_SETEXTRADESCENT(int extraDescent)</a><br />
- <a class="message" href="#SCI_GETEXTRADESCENT">SCI_GETEXTRADESCENT</a><br />
+ <a class="message" href="#SCI_GETEXTRADESCENT">SCI_GETEXTRADESCENT &rarr; int</a><br />
</code>
- <p><b id="SCI_SETVIEWWS">SCI_SETVIEWWS(int wsMode)</b><br />
- <b id="SCI_GETVIEWWS">SCI_GETVIEWWS</b><br />
+ <p><b id="SCI_SETVIEWWS">SCI_SETVIEWWS(int viewWS)</b><br />
+ <b id="SCI_GETVIEWWS">SCI_GETVIEWWS &rarr; int</b><br />
White space can be made visible which may be useful for languages in which white space is
significant, such as Python. Space characters appear as small centred dots and tab characters
as light arrows pointing to the right. There are also ways to control the display of <a
class="jump" href="#LineEndings">end of line characters</a>. The two messages set and get the
- white space display mode. The <code>wsMode</code> argument can be one of:</p>
+ white space display mode. The <code class="parameter">viewWS</code> argument can be one of:</p>
<table cellpadding="1" cellspacing="2" border="0" summary="White space policy">
<tbody valign="top">
@@ -2250,28 +2157,26 @@ struct Sci_TextToFind {
</tbody>
</table>
- <p>The effect of using any other <code>wsMode</code> value is undefined.</p>
+ <p>The effect of using any other <code class="parameter">viewWS</code> value is undefined.</p>
- <p><b id="SCI_SETWHITESPACEFORE">SCI_SETWHITESPACEFORE(bool useWhitespaceForeColour, int <a
- class="jump" href="#colour">colour</a>)</b><br />
- <b id="SCI_SETWHITESPACEBACK">SCI_SETWHITESPACEBACK(bool useWhitespaceBackColour, int <a
- class="jump" href="#colour">colour</a>)</b><br />
+ <p><b id="SCI_SETWHITESPACEFORE">SCI_SETWHITESPACEFORE(bool useSetting, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_SETWHITESPACEBACK">SCI_SETWHITESPACEBACK(bool useSetting, <a class="jump" href="#colour">colour</a> back)</b><br />
By default, the colour of visible white space is determined by the lexer in use. The
foreground and/or background colour of all visible white space can be set globally, overriding
the lexer's colours with <code>SCI_SETWHITESPACEFORE</code> and
<code>SCI_SETWHITESPACEBACK</code>.</p>
<p><b id="SCI_SETWHITESPACESIZE">SCI_SETWHITESPACESIZE(int size)</b><br />
- <b id="SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE</b><br />
+ <b id="SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE &rarr; int</b><br />
<code>SCI_SETWHITESPACESIZE</code> sets the size of the dots used for mark space characters.
The <code>SCI_GETWHITESPACESIZE</code> message retrieves the current size.
</p>
<p>
<b id="SCI_SETEXTRAASCENT">SCI_SETEXTRAASCENT(int extraAscent)</b><br />
- <b id="SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT</b><br />
+ <b id="SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT &rarr; int</b><br />
<b id="SCI_SETEXTRADESCENT">SCI_SETEXTRADESCENT(int extraDescent)</b><br />
- <b id="SCI_GETEXTRADESCENT">SCI_GETEXTRADESCENT</b><br />
+ <b id="SCI_GETEXTRADESCENT">SCI_GETEXTRADESCENT &rarr; int</b><br />
Text is drawn with the base of each character on a 'baseline'. The height of a line is found from the maximum
that any style extends above the baseline (its 'ascent'), added to the maximum that any style extends below the
baseline (its 'descent').
@@ -2281,12 +2186,14 @@ struct Sci_TextToFind {
</p>
<h2 id="Cursor">Cursor</h2>
+ <a class="message" href="#SCI_SETCURSOR">SCI_SETCURSOR(int cursorType)</a><br />
+ <a class="message" href="#SCI_GETCURSOR">SCI_GETCURSOR &rarr; int</a><br />
- <p><b id="SCI_SETCURSOR">SCI_SETCURSOR(int curType)</b><br />
- <b id="SCI_GETCURSOR">SCI_GETCURSOR</b><br />
+ <p><b id="SCI_SETCURSOR">SCI_SETCURSOR(int cursorType)</b><br />
+ <b id="SCI_GETCURSOR">SCI_GETCURSOR &rarr; int</b><br />
The cursor is normally chosen in a context sensitive way, so it will be different over the
margin than when over the text. When performing a slow action, you may wish to change to a wait
- cursor. You set the cursor type with <code>SCI_SETCURSOR</code>. The <code>curType</code>
+ cursor. You set the cursor type with <code>SCI_SETCURSOR</code>. The <code class="parameter">cursorType</code>
argument can be:</p>
<table cellpadding="1" cellspacing="2" border="0" summary="Mouse cursors">
@@ -2311,18 +2218,31 @@ struct Sci_TextToFind {
</table>
<p>Cursor values 1 through 7 have defined cursors, but only <code>SC_CURSORWAIT</code> is
- usefully controllable. Other values of <code>curType</code> cause a pointer to be displayed.
+ usefully controllable. Other values of <code class="parameter">cursorType</code> cause a pointer to be displayed.
The <code>SCI_GETCURSOR</code> message returns the last cursor type you set, or
<code>SC_CURSORNORMAL</code> (-1) if you have not set a cursor type.</p>
<h2 id="MouseCapture">Mouse capture</h2>
+ <a class="message" href="#SCI_SETMOUSEDOWNCAPTURES">SCI_SETMOUSEDOWNCAPTURES(bool captures)</a><br />
+ <a class="message" href="#SCI_GETMOUSEDOWNCAPTURES">SCI_GETMOUSEDOWNCAPTURES &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETMOUSEWHEELCAPTURES">SCI_SETMOUSEWHEELCAPTURES(bool captures)</a><br />
+ <a class="message" href="#SCI_GETMOUSEWHEELCAPTURES">SCI_GETMOUSEWHEELCAPTURES &rarr; bool</a><br />
<p><b id="SCI_SETMOUSEDOWNCAPTURES">SCI_SETMOUSEDOWNCAPTURES(bool captures)</b><br />
- <b id="SCI_GETMOUSEDOWNCAPTURES">SCI_GETMOUSEDOWNCAPTURES</b><br />
+ <b id="SCI_GETMOUSEDOWNCAPTURES">SCI_GETMOUSEDOWNCAPTURES &rarr; bool</b><br />
When the mouse is pressed inside Scintilla, it is captured so future mouse movement events are
sent to Scintilla. This behaviour may be turned off with
<code>SCI_SETMOUSEDOWNCAPTURES(0)</code>.</p>
+ <p><b id="SCI_SETMOUSEWHEELCAPTURES">SCI_SETMOUSEWHEELCAPTURES(bool captures)</b><br />
+ <b id="SCI_GETMOUSEWHEELCAPTURES">SCI_GETMOUSEWHEELCAPTURES &rarr; bool</b><br />
+ On Windows, Scintilla captures all <code>WM_MOUSEWHEEL</code> messages if it has the
+ focus, even if the mouse pointer is nowhere near the Scintilla editor window. This
+ behavior can be changed with <code>SCI_SETMOUSEWHEELCAPTURES(0)</code> so that
+ Scintilla passes the <code>WM_MOUSEWHEEL</code> messages to its parent window.
+ Scintilla will still react to the mouse wheel if the mouse pointer is over
+ the editor window.</p>
+
<h2 id="LineEndings">Line endings</h2>
<p>Scintilla can handle the major line end conventions and, depending on settings and
@@ -2342,53 +2262,240 @@ struct Sci_TextToFind {
Unicode line ends.</p>
<a class="message" href="#SCI_SETEOLMODE">SCI_SETEOLMODE(int eolMode)</a><br />
- <a class="message" href="#SCI_GETEOLMODE">SCI_GETEOLMODE</a><br />
+ <a class="message" href="#SCI_GETEOLMODE">SCI_GETEOLMODE &rarr; int</a><br />
<a class="message" href="#SCI_CONVERTEOLS">SCI_CONVERTEOLS(int eolMode)</a><br />
<a class="message" href="#SCI_SETVIEWEOL">SCI_SETVIEWEOL(bool visible)</a><br />
- <a class="message" href="#SCI_GETVIEWEOL">SCI_GETVIEWEOL</a><br />
+ <a class="message" href="#SCI_GETVIEWEOL">SCI_GETVIEWEOL &rarr; bool</a><br />
- <a class="message" href="#SCI_GETLINEENDTYPESSUPPORTED">SCI_GETLINEENDTYPESSUPPORTED</a><br />
+ <a class="message" href="#SCI_GETLINEENDTYPESSUPPORTED">SCI_GETLINEENDTYPESSUPPORTED &rarr; int</a><br />
<a class="message" href="#SCI_SETLINEENDTYPESALLOWED">SCI_SETLINEENDTYPESALLOWED(int lineEndBitSet)</a><br />
- <a class="message" href="#SCI_GETLINEENDTYPESALLOWED">SCI_GETLINEENDTYPESALLOWED</a><br />
- <a class="message" href="#SCI_GETLINEENDTYPESACTIVE">SCI_GETLINEENDTYPESACTIVE</a><br />
+ <a class="message" href="#SCI_GETLINEENDTYPESALLOWED">SCI_GETLINEENDTYPESALLOWED &rarr; int</a><br />
+ <a class="message" href="#SCI_GETLINEENDTYPESACTIVE">SCI_GETLINEENDTYPESACTIVE &rarr; int</a><br />
<p><b id="SCI_SETEOLMODE">SCI_SETEOLMODE(int eolMode)</b><br />
- <b id="SCI_GETEOLMODE">SCI_GETEOLMODE</b><br />
+ <b id="SCI_GETEOLMODE">SCI_GETEOLMODE &rarr; int</b><br />
<code>SCI_SETEOLMODE</code> sets the characters that are added into the document when the user
- presses the Enter key. You can set <code>eolMode</code> to one of <code>SC_EOL_CRLF</code> (0),
+ presses the Enter key. You can set <code class="parameter">eolMode</code> to one of <code>SC_EOL_CRLF</code> (0),
<code>SC_EOL_CR</code> (1), or <code>SC_EOL_LF</code> (2). The <code>SCI_GETEOLMODE</code>
message retrieves the current state.</p>
<p><b id="SCI_CONVERTEOLS">SCI_CONVERTEOLS(int eolMode)</b><br />
This message changes all the end of line characters in the document to match
- <code>eolMode</code>. Valid values are: <code>SC_EOL_CRLF</code> (0), <code>SC_EOL_CR</code>
+ <code class="parameter">eolMode</code>. Valid values are: <code>SC_EOL_CRLF</code> (0), <code>SC_EOL_CR</code>
(1), or <code>SC_EOL_LF</code> (2).</p>
<p><b id="SCI_SETVIEWEOL">SCI_SETVIEWEOL(bool visible)</b><br />
- <b id="SCI_GETVIEWEOL">SCI_GETVIEWEOL</b><br />
+ <b id="SCI_GETVIEWEOL">SCI_GETVIEWEOL &rarr; bool</b><br />
Normally, the end of line characters are hidden, but <code>SCI_SETVIEWEOL</code> allows you to
- display (or hide) them by setting <code>visible</code> <code>true</code> (or
+ display (or hide) them by setting <code class="parameter">visible</code> <code>true</code> (or
<code>false</code>). The visible rendering of the end of line characters is similar to
<code>(CR)</code>, <code>(LF)</code>, or <code>(CR)(LF)</code>. <code>SCI_GETVIEWEOL</code>
returns the current state.</p>
- <p><b id="SCI_GETLINEENDTYPESSUPPORTED">SCI_GETLINEENDTYPESSUPPORTED</b><br />
+ <p><b id="SCI_GETLINEENDTYPESSUPPORTED">SCI_GETLINEENDTYPESSUPPORTED &rarr; int</b><br />
<code>SCI_GETLINEENDTYPESSUPPORTED</code> reports the different types of line ends supported
by the current lexer. This is a bit set although there is currently only a single choice
with either <code>SC_LINE_END_TYPE_DEFAULT</code> (0) or <code>SC_LINE_END_TYPE_UNICODE</code> (1).
These values are also used by the other messages concerned with Unicode line ends.</p>
<p><b id="SCI_SETLINEENDTYPESALLOWED">SCI_SETLINEENDTYPESALLOWED(int lineEndBitSet)</b><br />
- <b id="SCI_GETLINEENDTYPESALLOWED">SCI_GETLINEENDTYPESALLOWED</b><br />
+ <b id="SCI_GETLINEENDTYPESALLOWED">SCI_GETLINEENDTYPESALLOWED &rarr; int</b><br />
By default, only the ASCII line ends are interpreted. Unicode line ends may be requested with
<code>SCI_SETLINEENDTYPESALLOWED(SC_LINE_END_TYPE_UNICODE)</code>
but this will be ineffective unless the lexer also allows you Unicode line ends.
<code>SCI_GETLINEENDTYPESALLOWED</code> returns the current state.</p>
- <p><b id="SCI_GETLINEENDTYPESACTIVE">SCI_GETLINEENDTYPESACTIVE</b><br />
+ <p><b id="SCI_GETLINEENDTYPESACTIVE">SCI_GETLINEENDTYPESACTIVE &rarr; int</b><br />
<code>SCI_GETLINEENDTYPESACTIVE</code> reports the set of line ends currently interpreted
by Scintilla. It is <code>SCI_GETLINEENDTYPESSUPPORTED &amp; SCI_GETLINEENDTYPESALLOWED</code>.</p>
+ <h2 id="Words">Words</h2>
+
+ <p>There is support for selecting, navigating by, and searching for words.</p>
+
+ <p>
+ Words are contiguous sequences of characters from a particular set of characters.
+ 4 categories define words: word, whitespace, punctuation, and line ends with each category
+ having a role in word functions.
+ Double clicking selects the word at that point, which may be a sequence of word, punctuation,
+ or whitespace bytes.
+ Line ends are not selected by double clicking but do act as word separators.
+ </p>
+
+ <p>Words are defined in terms of characters and the sets of characters in each category can be customized to an extent.
+ The NUL character (0) is always a space as the APIs to set categories use NUL-terminated strings.
+ For single-byte encodings a category may be assigned to any character (1 to 0xFF).
+ For multi-byte encodings a category may be assigned to characters from 1 to 0x7F with static behaviour from 0x80.
+ For UTF-8, characters from 0x80 will use a category based on their Unicode general category.
+ For Asian encodings, code pages 932, 936, 949, 950, and 1361, characters from 0x80 are treated as word characters.
+ </p>
+
+ <p>Identifiers in programming languages are often sequences of words with capitalisation
+ (aCamelCaseIdentifier) or underscores (an_under_bar_ident) used to mark word boundaries.
+ The <code>SCI_WORDPART*</code> commands are used for moving between word parts:
+ <a class="message" href="#SCI_WORDPARTLEFT"><code>SCI_WORDPARTLEFT</code></a>,
+ <a class="message" href="#SCI_WORDPARTLEFTEXTEND"><code>SCI_WORDPARTLEFTEXTEND</code></a>,
+ <a class="message" href="#SCI_WORDPARTRIGHT"><code>SCI_WORDPARTRIGHT</code></a>, and
+ <a class="message" href="#SCI_WORDPARTRIGHTEXTEND"><code>SCI_WORDPARTRIGHTEXTEND</code></a>.
+ </p>
+
+ <a class="message" href="#SCI_WORDENDPOSITION">SCI_WORDENDPOSITION(int pos, bool onlyWordCharacters) &rarr; int</a><br />
+ <a class="message" href="#SCI_WORDSTARTPOSITION">SCI_WORDSTARTPOSITION(int pos, bool onlyWordCharacters) &rarr; int</a><br />
+ <a class="message" href="#SCI_ISRANGEWORD">SCI_ISRANGEWORD(int start, int end) &rarr; bool</a><br />
+
+ <a class="message" href="#SCI_SETWORDCHARS">SCI_SETWORDCHARS(&lt;unused&gt;, const char *characters)</a><br />
+ <a class="message" href="#SCI_GETWORDCHARS">SCI_GETWORDCHARS(&lt;unused&gt;, char *characters) &rarr; int</a><br />
+ <a class="message" href="#SCI_SETWHITESPACECHARS">SCI_SETWHITESPACECHARS(&lt;unused&gt;, const char *characters)</a><br />
+ <a class="message" href="#SCI_GETWHITESPACECHARS">SCI_GETWHITESPACECHARS(&lt;unused&gt;, char *characters) &rarr; int</a><br />
+ <a class="message" href="#SCI_SETPUNCTUATIONCHARS">SCI_SETPUNCTUATIONCHARS(&lt;unused&gt;, const char *characters)</a><br />
+ <a class="message" href="#SCI_GETPUNCTUATIONCHARS">SCI_GETPUNCTUATIONCHARS(&lt;unused&gt;, char *characters) &rarr; int</a><br />
+ <a class="message" href="#SCI_SETCHARSDEFAULT">SCI_SETCHARSDEFAULT</a><br />
+
+ <p><b id="SCI_WORDENDPOSITION">SCI_WORDENDPOSITION(int pos, bool onlyWordCharacters) &rarr; int</b><br />
+ <b id="SCI_WORDSTARTPOSITION">SCI_WORDSTARTPOSITION(int pos, bool onlyWordCharacters) &rarr; int</b><br />
+ These messages return the start and end of words using the same definition of words as used
+ internally within Scintilla. You can set your own list of characters that count as words with
+ <a class="message" href="#SCI_SETWORDCHARS"><code>SCI_SETWORDCHARS</code></a>. The position
+ sets the start or the search, which is forwards when searching for the end and backwards when
+ searching for the start.</p>
+
+ <p><b id="SCI_ISRANGEWORD">SCI_ISRANGEWORD(int start, int end) &rarr; bool</b><br />
+ Is the range start..end a word or set of words? This message checks that start is at a word start transition and that
+ end is at a word end transition. It does not check whether there are any spaces inside the range.</p>
+
+ <a class="message" href="#SCI_ISRANGEWORD">SCI_ISRANGEWORD(int start, int end) &rarr; bool</a><br />
+
+ <p>Set <code class="parameter">onlyWordCharacters</code> to <code>true</code> (1) to stop searching at the first
+ non-word character in the search direction. If <code class="parameter">onlyWordCharacters</code> is
+ <code>false</code> (0), the first character in the search direction sets the type of the search
+ as word or non-word and the search stops at the first non-matching character. Searches are also
+ terminated by the start or end of the document.</p>
+
+ <p>If "w" represents word characters and "." represents non-word characters and "|" represents
+ the position and <code>true</code> or <code>false</code> is the state of
+ <code class="parameter">onlyWordCharacters</code>:</p>
+
+ <table cellpadding="3" cellspacing="0" border="1" summary="Word start and end positions">
+ <thead align="center">
+ <tr>
+ <th>Initial state</th>
+
+ <th>end, true</th>
+
+ <th>end, false</th>
+
+ <th>start, true</th>
+
+ <th>start, false</th>
+ </tr>
+ </thead>
+
+ <tbody align="center">
+ <tr>
+ <td>..ww..|..ww..</td>
+
+ <td>..ww..|..ww..</td>
+
+ <td>..ww....|ww..</td>
+
+ <td>..ww..|..ww..</td>
+
+ <td>..ww|....ww..</td>
+ </tr>
+
+ <tr>
+ <td>....ww|ww....</td>
+
+ <td>....wwww|....</td>
+
+ <td>....wwww|....</td>
+
+ <td>....|wwww....</td>
+
+ <td>....|wwww....</td>
+ </tr>
+
+ <tr>
+ <td>..ww|....ww..</td>
+
+ <td>..ww|....ww..</td>
+
+ <td>..ww....|ww..</td>
+
+ <td>..|ww....ww..</td>
+
+ <td>..|ww....ww..</td>
+ </tr>
+
+ <tr>
+ <td>..ww....|ww..</td>
+
+ <td>..ww....ww|..</td>
+
+ <td>..ww....ww|..</td>
+
+ <td>..ww....|ww..</td>
+
+ <td>..ww|....ww..</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p><b id="SCI_SETWORDCHARS">SCI_SETWORDCHARS(&lt;unused&gt;, const char *characters)</b><br />
+ This message defines which characters are members of the word category.
+ The character categories are set to default values before processing this function.
+ For example, if you don't allow '_' in your set of characters
+ use:<br />
+ <code>SCI_SETWORDCHARS(0, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")</code>;</p>
+
+ <p><b id="SCI_GETWORDCHARS">SCI_GETWORDCHARS(&lt;unused&gt;, char *characters) &rarr; int</b><br />
+ This fills the characters parameter with all the characters included in words.
+ The characters parameter must be large enough to hold all of the characters.
+ If the characters parameter is 0 then the length that should be allocated
+ to store the entire set is returned.</p>
+
+ <p>For multi-byte encodings, this API will not return meaningful values for 0x80 and above.</p>
+
+ <p><b id="SCI_SETWHITESPACECHARS">SCI_SETWHITESPACECHARS(&lt;unused&gt;, const char *characters)</b><br />
+ <b id="SCI_GETWHITESPACECHARS">SCI_GETWHITESPACECHARS(&lt;unused&gt;, char *characters) &rarr; int</b><br />
+ Similar to <code>SCI_SETWORDCHARS</code>, this message allows the user to define which chars Scintilla considers
+ as whitespace. Setting the whitespace chars allows the user to fine-tune Scintilla's behaviour doing
+ such things as moving the cursor to the start or end of a word; for example, by defining punctuation chars
+ as whitespace, they will be skipped over when the user presses ctrl+left or ctrl+right.
+ This function should be called after <code>SCI_SETWORDCHARS</code> as it will
+ reset the whitespace characters to the default set.
+ <code>SCI_GETWHITESPACECHARS</code> behaves similarly to <code>SCI_GETWORDCHARS</code>.</p>
+
+ <p><b id="SCI_SETPUNCTUATIONCHARS">SCI_SETPUNCTUATIONCHARS(&lt;unused&gt;, const char *characters)</b><br />
+ <b id="SCI_GETPUNCTUATIONCHARS">SCI_GETPUNCTUATIONCHARS(&lt;unused&gt;, char *characters) &rarr; int</b><br />
+ Similar to <code>SCI_SETWORDCHARS</code> and <code>SCI_SETWHITESPACECHARS</code>, this message
+ allows the user to define which chars Scintilla considers as punctuation.
+ <code>SCI_GETPUNCTUATIONCHARS</code> behaves similarly to <code>SCI_GETWORDCHARS</code>.</p>
+
+ <p><b id="SCI_SETCHARSDEFAULT">SCI_SETCHARSDEFAULT</b><br />
+ Use the default sets of word and whitespace characters. This sets whitespace to space, tab and other
+ characters with codes less than 0x20, with word characters set to alphanumeric and '_'.
+ </p>
+
+ <p>Word keyboard commands are:</p>
+ <ul>
+ <li class="message" id="SCI_WORDLEFT">SCI_WORDLEFT</li>
+ <li class="message" id="SCI_WORDLEFTEXTEND">SCI_WORDLEFTEXTEND</li>
+ <li class="message" id="SCI_WORDRIGHT">SCI_WORDRIGHT</li>
+ <li class="message" id="SCI_WORDRIGHTEXTEND">SCI_WORDRIGHTEXTEND</li>
+ <li class="message" id="SCI_WORDLEFTEND">SCI_WORDLEFTEND</li>
+ <li class="message" id="SCI_WORDLEFTENDEXTEND">SCI_WORDLEFTENDEXTEND</li>
+ <li class="message" id="SCI_WORDRIGHTEND">SCI_WORDRIGHTEND</li>
+ <li class="message" id="SCI_WORDRIGHTENDEXTEND">SCI_WORDRIGHTENDEXTEND</li>
+ <li class="message" id="SCI_WORDPARTLEFT">SCI_WORDPARTLEFT</li>
+ <li class="message" id="SCI_WORDPARTLEFTEXTEND">SCI_WORDPARTLEFTEXTEND</li>
+ <li class="message" id="SCI_WORDPARTRIGHT">SCI_WORDPARTRIGHT</li>
+ <li class="message" id="SCI_WORDPARTRIGHTEXTEND">SCI_WORDPARTRIGHTEXTEND</li>
+ <li class="message" id="SCI_DELWORDLEFT">SCI_DELWORDLEFT</li>
+ <li class="message" id="SCI_DELWORDRIGHT">SCI_DELWORDRIGHT</li>
+ <li class="message" id="SCI_DELWORDRIGHTEND">SCI_DELWORDRIGHTEND</li>
+ </ul>
+
<h2 id="Styling">Styling</h2>
<p>The styling messages allow you to assign styles to text. If your styling needs can be met by
@@ -2401,19 +2508,19 @@ struct Sci_TextToFind {
alternative, you might use idle time to style the document. Even if you use a lexer, you might
use the styling commands to mark errors detected by a compiler. The following commands can be
used.</p>
- <code><a class="message" href="#SCI_GETENDSTYLED">SCI_GETENDSTYLED</a><br />
- <a class="message" href="#SCI_STARTSTYLING">SCI_STARTSTYLING(int position, int unused)</a><br />
+ <code><a class="message" href="#SCI_GETENDSTYLED">SCI_GETENDSTYLED &rarr; position</a><br />
+ <a class="message" href="#SCI_STARTSTYLING">SCI_STARTSTYLING(int start, int unused)</a><br />
<a class="message" href="#SCI_SETSTYLING">SCI_SETSTYLING(int length, int style)</a><br />
<a class="message" href="#SCI_SETSTYLINGEX">SCI_SETSTYLINGEX(int length, const char
*styles)</a><br />
<a class="message" href="#SCI_SETIDLESTYLING">SCI_SETIDLESTYLING(int idleStyling)</a><br />
- <a class="message" href="#SCI_GETIDLESTYLING">SCI_GETIDLESTYLING</a><br />
- <a class="message" href="#SCI_SETLINESTATE">SCI_SETLINESTATE(int line, int value)</a><br />
- <a class="message" href="#SCI_GETLINESTATE">SCI_GETLINESTATE(int line)</a><br />
- <a class="message" href="#SCI_GETMAXLINESTATE">SCI_GETMAXLINESTATE</a><br />
+ <a class="message" href="#SCI_GETIDLESTYLING">SCI_GETIDLESTYLING &rarr; int</a><br />
+ <a class="message" href="#SCI_SETLINESTATE">SCI_SETLINESTATE(int line, int state)</a><br />
+ <a class="message" href="#SCI_GETLINESTATE">SCI_GETLINESTATE(int line) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETMAXLINESTATE">SCI_GETMAXLINESTATE &rarr; int</a><br />
</code>
- <p><b id="SCI_GETENDSTYLED">SCI_GETENDSTYLED</b><br />
+ <p><b id="SCI_GETENDSTYLED">SCI_GETENDSTYLED &rarr; position</b><br />
Scintilla keeps a record of the last character that is likely to be styled correctly. This is
moved forwards when characters after it are styled and moved backwards if changes are made to
the text of the document before it. Before drawing text, this position is checked to see if any
@@ -2422,29 +2529,29 @@ struct Sci_TextToFind {
container. The container can send <code>SCI_GETENDSTYLED</code> to work out where it needs to
start styling. Scintilla will always ask to style whole lines.</p>
- <p><b id="SCI_STARTSTYLING">SCI_STARTSTYLING(int pos, int unused)</b><br />
- This prepares for styling by setting the styling position <code>pos</code> to start at.
+ <p><b id="SCI_STARTSTYLING">SCI_STARTSTYLING(int start, int unused)</b><br />
+ This prepares for styling by setting the styling position <code class="parameter">start</code> to start at.
The unused argument was used in earlier versions but is now ignored.
After
<code>SCI_STARTSTYLING</code>, send multiple <code>SCI_SETSTYLING</code> messages for each
lexical entity to style or send <code>SCI_SETSTYLINGEX</code> to style in blocks.</p>
<p><b id="SCI_SETSTYLING">SCI_SETSTYLING(int length, int style)</b><br />
- This message sets the style of <code>length</code> characters starting at the styling position
- and then increases the styling position by <code>length</code>, ready for the next call.
+ This message sets the style of <code class="parameter">length</code> characters starting at the styling position
+ and then increases the styling position by <code class="parameter">length</code>, ready for the next call.
<code>SCI_STARTSTYLING</code> should be called before the first call to this.
</p>
<p><b id="SCI_SETSTYLINGEX">SCI_SETSTYLINGEX(int length, const char *styles)</b><br />
As an alternative to <code>SCI_SETSTYLING</code>, which applies the same style to each byte,
- you can use this message which specifies the styles for each of <code>length</code> bytes from
- the styling position and then increases the styling position by <code>length</code>, ready for
+ you can use this message which specifies the styles for each of <code class="parameter">length</code> bytes from
+ the styling position and then increases the styling position by <code class="parameter">length</code>, ready for
the next call.
<code>SCI_STARTSTYLING</code> should be called before the first call to this.
</p>
<p><b id="SCI_SETIDLESTYLING">SCI_SETIDLESTYLING(int idleStyling)</b><br />
- <b id="SCI_GETIDLESTYLING">SCI_GETIDLESTYLING</b><br />
+ <b id="SCI_GETIDLESTYLING">SCI_GETIDLESTYLING &rarr; int</b><br />
By default, <code>SC_IDLESTYLING_NONE</code> (0),
syntax styling is performed for all the currently visible text before displaying it.
On very large files, this may make scrolling down slow.
@@ -2460,8 +2567,8 @@ struct Sci_TextToFind {
the document is displayed wrapped.
</p>
- <p><b id="SCI_SETLINESTATE">SCI_SETLINESTATE(int line, int value)</b><br />
- <b id="SCI_GETLINESTATE">SCI_GETLINESTATE(int line)</b><br />
+ <p><b id="SCI_SETLINESTATE">SCI_SETLINESTATE(int line, int state)</b><br />
+ <b id="SCI_GETLINESTATE">SCI_GETLINESTATE(int line) &rarr; int</b><br />
As well as the 8 bits of lexical state stored for each character there is also an integer
stored for each line. This can be used for longer lived parse states such as what the current
scripting language is in an ASP page. Use <code>SCI_SETLINESTATE</code> to set the integer
@@ -2469,7 +2576,7 @@ struct Sci_TextToFind {
Changing the value produces a <a class="message" href="#SC_MOD_CHANGELINESTATE">SC_MOD_CHANGELINESTATE</a> notification.
</p>
- <p><b id="SCI_GETMAXLINESTATE">SCI_GETMAXLINESTATE</b><br />
+ <p><b id="SCI_GETMAXLINESTATE">SCI_GETMAXLINESTATE &rarr; int</b><br />
This returns the last line that has any line state.</p>
<h2 id="StyleDefinition">Style definition</h2>
@@ -2552,7 +2659,7 @@ struct Sci_TextToFind {
<td>38</td>
<td> Call tips normally use the font attributes defined by <code>STYLE_DEFAULT</code>.
- Use of <a class="message" href="#SCI_CALLTIPUSESTYLE"><code>SCI_CALLTIPUSESTYLE</code></a>
+ Use of <a class="seealso" href="#SCI_CALLTIPUSESTYLE"><code>SCI_CALLTIPUSESTYLE</code></a>
causes call tips to use this style instead. Only the font face name, font size,
foreground and background colours and character set attributes are used.</td>
</tr>
@@ -2590,51 +2697,49 @@ struct Sci_TextToFind {
style 4 for preprocessor, style 5 for operators, and so on.</p>
<code><a class="message" href="#SCI_STYLERESETDEFAULT">SCI_STYLERESETDEFAULT</a><br />
<a class="message" href="#SCI_STYLECLEARALL">SCI_STYLECLEARALL</a><br />
- <a class="message" href="#SCI_STYLESETFONT">SCI_STYLESETFONT(int styleNumber, char
+ <a class="message" href="#SCI_STYLESETFONT">SCI_STYLESETFONT(int style, const char
*fontName)</a><br />
- <a class="message" href="#SCI_STYLEGETFONT">SCI_STYLEGETFONT(int styleNumber, char *fontName)</a><br />
- <a class="message" href="#SCI_STYLESETSIZE">SCI_STYLESETSIZE(int styleNumber, int
- sizeInPoints)</a><br />
- <a class="message" href="#SCI_STYLEGETSIZE">SCI_STYLEGETSIZE(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETSIZEFRACTIONAL">SCI_STYLESETSIZEFRACTIONAL(int styleNumber, int
- sizeInHundredthPoints)</a><br />
- <a class="message" href="#SCI_STYLEGETSIZEFRACTIONAL">SCI_STYLEGETSIZEFRACTIONAL(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETBOLD">SCI_STYLESETBOLD(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETFONT">SCI_STYLEGETFONT(int style, char *fontName) &rarr; int</a><br />
+ <a class="message" href="#SCI_STYLESETSIZE">SCI_STYLESETSIZE(int style, int
+ sizePoints)</a><br />
+ <a class="message" href="#SCI_STYLEGETSIZE">SCI_STYLEGETSIZE(int style) &rarr; int</a><br />
+ <a class="message" href="#SCI_STYLESETSIZEFRACTIONAL">SCI_STYLESETSIZEFRACTIONAL(int style, int
+ sizeHundredthPoints)</a><br />
+ <a class="message" href="#SCI_STYLEGETSIZEFRACTIONAL">SCI_STYLEGETSIZEFRACTIONAL(int style) &rarr; int</a><br />
+ <a class="message" href="#SCI_STYLESETBOLD">SCI_STYLESETBOLD(int style, bool
bold)</a><br />
- <a class="message" href="#SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETWEIGHT">SCI_STYLESETWEIGHT(int styleNumber, int
+ <a class="message" href="#SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int style) &rarr; bool</a><br />
+ <a class="message" href="#SCI_STYLESETWEIGHT">SCI_STYLESETWEIGHT(int style, int
weight)</a><br />
- <a class="message" href="#SCI_STYLEGETWEIGHT">SCI_STYLEGETWEIGHT(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETITALIC">SCI_STYLESETITALIC(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETWEIGHT">SCI_STYLEGETWEIGHT(int style) &rarr; int</a><br />
+ <a class="message" href="#SCI_STYLESETITALIC">SCI_STYLESETITALIC(int style, bool
italic)</a><br />
- <a class="message" href="#SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int style) &rarr; bool</a><br />
+ <a class="message" href="#SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int style, bool
underline)</a><br />
- <a class="message" href="#SCI_STYLEGETUNDERLINE">SCI_STYLEGETUNDERLINE(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETFORE">SCI_STYLESETFORE(int styleNumber, int
- colour)</a><br />
- <a class="message" href="#SCI_STYLEGETFORE">SCI_STYLEGETFORE(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int
- colour)</a><br />
- <a class="message" href="#SCI_STYLEGETBACK">SCI_STYLEGETBACK(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETUNDERLINE">SCI_STYLEGETUNDERLINE(int style) &rarr; bool</a><br />
+ <a class="message" href="#SCI_STYLESETFORE">SCI_STYLESETFORE(int style, colour fore)</a><br />
+ <a class="message" href="#SCI_STYLEGETFORE">SCI_STYLEGETFORE(int style) &rarr; colour</a><br />
+ <a class="message" href="#SCI_STYLESETBACK">SCI_STYLESETBACK(int style, colour back)</a><br />
+ <a class="message" href="#SCI_STYLEGETBACK">SCI_STYLEGETBACK(int style) &rarr; colour</a><br />
+ <a class="message" href="#SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int style, bool
eolFilled)</a><br />
- <a class="message" href="#SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int styleNumber,
- int charSet)</a><br />
- <a class="message" href="#SCI_STYLEGETCHARACTERSET">SCI_STYLEGETCHARACTERSET(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETCASE">SCI_STYLESETCASE(int styleNumber, int
- caseMode)</a><br />
- <a class="message" href="#SCI_STYLEGETCASE">SCI_STYLEGETCASE(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int style) &rarr; bool</a><br />
+ <a class="message" href="#SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int style,
+ int characterSet)</a><br />
+ <a class="message" href="#SCI_STYLEGETCHARACTERSET">SCI_STYLEGETCHARACTERSET(int style) &rarr; int</a><br />
+ <a class="message" href="#SCI_STYLESETCASE">SCI_STYLESETCASE(int style, int
+ caseVisible)</a><br />
+ <a class="message" href="#SCI_STYLEGETCASE">SCI_STYLEGETCASE(int style) &rarr; int</a><br />
+ <a class="message" href="#SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int style, bool
visible)</a><br />
- <a class="message" href="#SCI_STYLEGETVISIBLE">SCI_STYLEGETVISIBLE(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETVISIBLE">SCI_STYLEGETVISIBLE(int style) &rarr; bool</a><br />
+ <a class="message" href="#SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int style, bool
changeable)</a><br />
- <a class="message" href="#SCI_STYLEGETCHANGEABLE">SCI_STYLEGETCHANGEABLE(int styleNumber)</a><br />
- <a class="message" href="#SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int styleNumber, bool
+ <a class="message" href="#SCI_STYLEGETCHANGEABLE">SCI_STYLEGETCHANGEABLE(int style) &rarr; bool</a><br />
+ <a class="message" href="#SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int style, bool
hotspot)</a><br />
- <a class="message" href="#SCI_STYLEGETHOTSPOT">SCI_STYLEGETHOTSPOT(int styleNumber)</a><br />
+ <a class="message" href="#SCI_STYLEGETHOTSPOT">SCI_STYLEGETHOTSPOT(int style) &rarr; bool</a><br />
</code>
<p><b id="SCI_STYLERESETDEFAULT">SCI_STYLERESETDEFAULT</b><br />
@@ -2649,23 +2754,23 @@ struct Sci_TextToFind {
2. Use <code>SCI_STYLECLEARALL</code> to copy this to all styles.<br />
3. Set the style attributes that make your lexical styles different.</p>
- <p><b id="SCI_STYLESETFONT">SCI_STYLESETFONT(int styleNumber, const char *fontName)</b><br />
- <b id="SCI_STYLEGETFONT">SCI_STYLEGETFONT(int styleNumber, char *fontName NUL-terminated)</b><br />
- <b id="SCI_STYLESETSIZE">SCI_STYLESETSIZE(int styleNumber, int sizeInPoints)</b><br />
- <b id="SCI_STYLEGETSIZE">SCI_STYLEGETSIZE(int styleNumber)</b><br />
- <b id="SCI_STYLESETSIZEFRACTIONAL">SCI_STYLESETSIZEFRACTIONAL(int styleNumber, int sizeInHundredthPoints)</b><br />
- <b id="SCI_STYLEGETSIZEFRACTIONAL">SCI_STYLEGETSIZEFRACTIONAL(int styleNumber)</b><br />
- <b id="SCI_STYLESETBOLD">SCI_STYLESETBOLD(int styleNumber, bool bold)</b><br />
- <b id="SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int styleNumber)</b><br />
- <b id="SCI_STYLESETWEIGHT">SCI_STYLESETWEIGHT(int styleNumber, int weight)</b><br />
- <b id="SCI_STYLEGETWEIGHT">SCI_STYLEGETWEIGHT(int styleNumber)</b><br />
- <b id="SCI_STYLESETITALIC">SCI_STYLESETITALIC(int styleNumber, bool italic)</b><br />
- <b id="SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int styleNumber)</b><br />
+ <p><b id="SCI_STYLESETFONT">SCI_STYLESETFONT(int style, const char *fontName)</b><br />
+ <b id="SCI_STYLEGETFONT">SCI_STYLEGETFONT(int style, char *fontName NUL-terminated) &rarr; int</b><br />
+ <b id="SCI_STYLESETSIZE">SCI_STYLESETSIZE(int style, int sizePoints)</b><br />
+ <b id="SCI_STYLEGETSIZE">SCI_STYLEGETSIZE(int style) &rarr; int</b><br />
+ <b id="SCI_STYLESETSIZEFRACTIONAL">SCI_STYLESETSIZEFRACTIONAL(int style, int sizeHundredthPoints)</b><br />
+ <b id="SCI_STYLEGETSIZEFRACTIONAL">SCI_STYLEGETSIZEFRACTIONAL(int style) &rarr; int</b><br />
+ <b id="SCI_STYLESETBOLD">SCI_STYLESETBOLD(int style, bool bold)</b><br />
+ <b id="SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int style) &rarr; bool</b><br />
+ <b id="SCI_STYLESETWEIGHT">SCI_STYLESETWEIGHT(int style, int weight)</b><br />
+ <b id="SCI_STYLEGETWEIGHT">SCI_STYLEGETWEIGHT(int style) &rarr; int</b><br />
+ <b id="SCI_STYLESETITALIC">SCI_STYLESETITALIC(int style, bool italic)</b><br />
+ <b id="SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int style) &rarr; bool</b><br />
These messages (plus <a class="message"
href="#SCI_STYLESETCHARACTERSET"><code>SCI_STYLESETCHARACTERSET</code></a>) set the font
attributes that are used to match the fonts you request to those available.</p>
<p>The
- <code>fontName</code> is a zero terminated string holding the name of a font. Under Windows,
+ <code class="parameter">fontName</code> is a zero terminated string holding the name of a font. Under Windows,
only the first 32 characters of the name are used, the name is decoded as UTF-8, and the name is not case sensitive. For
internal caching, Scintilla tracks fonts by name and does care about the casing of font names,
so please be consistent.
@@ -2688,36 +2793,34 @@ struct Sci_TextToFind {
and 1 <code>SC_WEIGHT_BOLD</code>.
</p>
- <p><b id="SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int styleNumber, bool
+ <p><b id="SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int style, bool
underline)</b><br />
- <b id="SCI_STYLEGETUNDERLINE">SCI_STYLEGETUNDERLINE(int styleNumber)</b><br />
+ <b id="SCI_STYLEGETUNDERLINE">SCI_STYLEGETUNDERLINE(int style) &rarr; bool</b><br />
You can set a style to be underlined. The underline is drawn in the foreground colour. All
characters with a style that includes the underline attribute are underlined, even if they are
white space.</p>
- <p><b id="SCI_STYLESETFORE">SCI_STYLESETFORE(int styleNumber, int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_STYLEGETFORE">SCI_STYLEGETFORE(int styleNumber)</b><br />
- <b id="SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_STYLEGETBACK">SCI_STYLEGETBACK(int styleNumber)</b><br />
+ <p><b id="SCI_STYLESETFORE">SCI_STYLESETFORE(int style, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_STYLEGETFORE">SCI_STYLEGETFORE(int style) &rarr; colour</b><br />
+ <b id="SCI_STYLESETBACK">SCI_STYLESETBACK(int style, <a class="jump" href="#colour">colour</a> back)</b><br />
+ <b id="SCI_STYLEGETBACK">SCI_STYLEGETBACK(int style) &rarr; colour</b><br />
Text is drawn in the foreground colour. The space in each character cell that is not occupied
by the character is drawn in the background colour.</p>
- <p><b id="SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int styleNumber, bool
+ <p><b id="SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int style, bool
eolFilled)</b><br />
- <b id="SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int styleNumber)</b><br />
+ <b id="SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int style) &rarr; bool</b><br />
If the last character in the line has a style with this attribute set, the remainder of the
line up to the right edge of the window is filled with the background colour set for the last
character. This is useful when a document contains embedded sections in another language such
- as HTML pages with embedded JavaScript. By setting <code>eolFilled</code> to <code>true</code>
+ as HTML pages with embedded JavaScript. By setting <code class="parameter">eolFilled</code> to <code>true</code>
and a consistent background colour (different from the background colour set for the HTML
styles) to all JavaScript styles then JavaScript sections will be easily distinguished from
HTML.</p>
- <p><b id="SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int styleNumber, int
- charSet)</b><br />
- <b id="SCI_STYLEGETCHARACTERSET">SCI_STYLEGETCHARACTERSET(int styleNumber)</b><br />
+ <p><b id="SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int style, int
+ characterSet)</b><br />
+ <b id="SCI_STYLEGETCHARACTERSET">SCI_STYLEGETCHARACTERSET(int style) &rarr; int</b><br />
You can set a style to use a different character set than the default. The places where such
characters sets are likely to be useful are comments and literal strings. For example,
<code>SCI_STYLESETCHARACTERSET(SCE_C_STRING, SC_CHARSET_RUSSIAN)</code> would ensure that
@@ -2751,7 +2854,7 @@ struct Sci_TextToFind {
<p>The character sets supported on GTK+ are:<br />
<code>SC_CHARSET_ANSI</code>,
- <code>SC_CHARSET_DEFAULT</code> (8859-1),
+ <code>SC_CHARSET_DEFAULT</code> (8859-1),
<code>SC_CHARSET_OEM866</code> (code page 866),
<code>SC_CHARSET_CYRILLIC</code> (code page 1251),
<code>SC_CHARSET_EASTEUROPE</code>,
@@ -2768,7 +2871,7 @@ struct Sci_TextToFind {
<code>SC_CHARSET_BALTIC</code>,
<code>SC_CHARSET_CHINESEBIG5</code>,
<code>SC_CHARSET_CYRILLIC</code> (code page 1251),
- <code>SC_CHARSET_DEFAULT</code> (8859-1),
+ <code>SC_CHARSET_DEFAULT</code> (8859-1),
<code>SC_CHARSET_EASTEUROPE</code>,
<code>SC_CHARSET_GB2312</code>,
<code>SC_CHARSET_GREEK</code>,
@@ -2784,30 +2887,30 @@ struct Sci_TextToFind {
<code>SC_CHARSET_TURKISH</code>,
<code>SC_CHARSET_VIETNAMESE</code>.</p>
- <p><b id="SCI_STYLESETCASE">SCI_STYLESETCASE(int styleNumber, int caseMode)</b><br />
- <b id="SCI_STYLEGETCASE">SCI_STYLEGETCASE(int styleNumber)</b><br />
- The value of caseMode determines how text is displayed. You can set upper case
+ <p><b id="SCI_STYLESETCASE">SCI_STYLESETCASE(int style, int caseVisible)</b><br />
+ <b id="SCI_STYLEGETCASE">SCI_STYLEGETCASE(int style) &rarr; int</b><br />
+ The value of <code>caseVisible</code> determines how text is displayed. You can set upper case
(<code>SC_CASE_UPPER</code>, 1) or lower case (<code>SC_CASE_LOWER</code>, 2) or camel case (<code>SC_CASE_CAMEL</code>, 3)
or display normally (<code>SC_CASE_MIXED</code>, 0). This does not change the stored text, only how it is
displayed.</p>
- <p><b id="SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int styleNumber, bool visible)</b><br />
- <b id="SCI_STYLEGETVISIBLE">SCI_STYLEGETVISIBLE(int styleNumber)</b><br />
+ <p><b id="SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int style, bool visible)</b><br />
+ <b id="SCI_STYLEGETVISIBLE">SCI_STYLEGETVISIBLE(int style) &rarr; bool</b><br />
Text is normally visible. However, you can completely hide it by giving it a style with the
- <code>visible</code> set to 0. This could be used to hide embedded formatting instructions or
+ <code class="parameter">visible</code> set to 0. This could be used to hide embedded formatting instructions or
hypertext keywords in HTML or XML.</p>
- <p><b id="SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int styleNumber, bool
+ <p><b id="SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int style, bool
changeable)</b><br />
- <b id="SCI_STYLEGETCHANGEABLE">SCI_STYLEGETCHANGEABLE(int styleNumber)</b><br />
+ <b id="SCI_STYLEGETCHANGEABLE">SCI_STYLEGETCHANGEABLE(int style) &rarr; bool</b><br />
This is an experimental and incompletely implemented style attribute. The default setting is
- <code>changeable</code> set <code>true</code> but when set <code>false</code> it makes text
+ <code class="parameter">changeable</code> set <code>true</code> but when set <code>false</code> it makes text
read-only. Currently it only stops the caret from being within not-changeable text and does not
yet stop deleting a range that contains not-changeable text.</p>
- <p><b id="SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int styleNumber, bool
+ <p><b id="SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int style, bool
hotspot)</b><br />
- <b id="SCI_STYLEGETHOTSPOT">SCI_STYLEGETHOTSPOT(int styleNumber)</b><br />
+ <b id="SCI_STYLEGETHOTSPOT">SCI_STYLEGETHOTSPOT(int style) &rarr; bool</b><br />
This style is used to mark ranges of text that can detect mouse clicks.
The cursor changes to a hand over hotspots, and the foreground, and background colours
may change and an underline appear to indicate that these areas are sensitive to clicking.
@@ -2821,71 +2924,68 @@ struct Sci_TextToFind {
it was not selected. When there is no selection, the current insertion point is marked by the
text caret. This is a vertical line that is normally blinking on and off to attract the users
attention.</p>
- <code><a class="message" href="#SCI_SETSELFORE">SCI_SETSELFORE(bool useSelectionForeColour, int colour)</a><br />
- <a class="message" href="#SCI_SETSELBACK">SCI_SETSELBACK(bool useSelectionBackColour, int colour)</a><br />
- <a class="message" href="#SCI_SETSELALPHA">SCI_SETSELALPHA(int alpha)</a><br />
- <a class="message" href="#SCI_GETSELALPHA">SCI_GETSELALPHA</a><br />
+ <code><a class="message" href="#SCI_SETSELFORE">SCI_SETSELFORE(bool useSetting, colour fore)</a><br />
+ <a class="message" href="#SCI_SETSELBACK">SCI_SETSELBACK(bool useSetting, colour back)</a><br />
+ <a class="message" href="#SCI_SETSELALPHA">SCI_SETSELALPHA(alpha alpha)</a><br />
+ <a class="message" href="#SCI_GETSELALPHA">SCI_GETSELALPHA &rarr; int</a><br />
<a class="message" href="#SCI_SETSELEOLFILLED">SCI_SETSELEOLFILLED(bool filled)</a><br />
- <a class="message" href="#SCI_GETSELEOLFILLED">SCI_GETSELEOLFILLED</a><br />
- <a class="message" href="#SCI_SETCARETFORE">SCI_SETCARETFORE(int colour)</a><br />
- <a class="message" href="#SCI_GETCARETFORE">SCI_GETCARETFORE</a><br />
+ <a class="message" href="#SCI_GETSELEOLFILLED">SCI_GETSELEOLFILLED &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETCARETFORE">SCI_SETCARETFORE(colour fore)</a><br />
+ <a class="message" href="#SCI_GETCARETFORE">SCI_GETCARETFORE &rarr; colour</a><br />
<a class="message" href="#SCI_SETCARETLINEVISIBLE">SCI_SETCARETLINEVISIBLE(bool show)</a><br />
- <a class="message" href="#SCI_GETCARETLINEVISIBLE">SCI_GETCARETLINEVISIBLE</a><br />
- <a class="message" href="#SCI_SETCARETLINEBACK">SCI_SETCARETLINEBACK(int colour)</a><br />
- <a class="message" href="#SCI_GETCARETLINEBACK">SCI_GETCARETLINEBACK</a><br />
- <a class="message" href="#SCI_SETCARETLINEBACKALPHA">SCI_SETCARETLINEBACKALPHA(int alpha)</a><br />
- <a class="message" href="#SCI_GETCARETLINEBACKALPHA">SCI_GETCARETLINEBACKALPHA</a><br />
+ <a class="message" href="#SCI_GETCARETLINEVISIBLE">SCI_GETCARETLINEVISIBLE &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETCARETLINEBACK">SCI_SETCARETLINEBACK(colour back)</a><br />
+ <a class="message" href="#SCI_GETCARETLINEBACK">SCI_GETCARETLINEBACK &rarr; colour</a><br />
+ <a class="message" href="#SCI_SETCARETLINEBACKALPHA">SCI_SETCARETLINEBACKALPHA(alpha alpha)</a><br />
+ <a class="message" href="#SCI_GETCARETLINEBACKALPHA">SCI_GETCARETLINEBACKALPHA &rarr; int</a><br />
<a class="message" href="#SCI_SETCARETLINEVISIBLEALWAYS">SCI_SETCARETLINEVISIBLEALWAYS(bool alwaysVisible)</a><br />
- <a class="message" href="#SCI_GETCARETLINEVISIBLEALWAYS">SCI_GETCARETLINEVISIBLEALWAYS</a><br />
- <a class="message" href="#SCI_SETCARETPERIOD">SCI_SETCARETPERIOD(int milliseconds)</a><br />
- <a class="message" href="#SCI_GETCARETPERIOD">SCI_GETCARETPERIOD</a><br />
- <a class="message" href="#SCI_SETCARETSTYLE">SCI_SETCARETSTYLE(int style)</a><br />
- <a class="message" href="#SCI_GETCARETSTYLE">SCI_GETCARETSTYLE</a><br />
- <a class="message" href="#SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixels)</a><br />
- <a class="message" href="#SCI_GETCARETWIDTH">SCI_GETCARETWIDTH</a><br />
- <a class="message" href="#SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE(bool useSetting, int colour)</a><br />
- <a class="message" href="#SCI_GETHOTSPOTACTIVEFORE">SCI_GETHOTSPOTACTIVEFORE</a><br />
- <a class="message" href="#SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useSetting, int colour)</a><br />
- <a class="message" href="#SCI_GETHOTSPOTACTIVEBACK">SCI_GETHOTSPOTACTIVEBACK</a><br />
+ <a class="message" href="#SCI_GETCARETLINEVISIBLEALWAYS">SCI_GETCARETLINEVISIBLEALWAYS &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETCARETPERIOD">SCI_SETCARETPERIOD(int periodMilliseconds)</a><br />
+ <a class="message" href="#SCI_GETCARETPERIOD">SCI_GETCARETPERIOD &rarr; int</a><br />
+ <a class="message" href="#SCI_SETCARETSTYLE">SCI_SETCARETSTYLE(int caretStyle)</a><br />
+ <a class="message" href="#SCI_GETCARETSTYLE">SCI_GETCARETSTYLE &rarr; int</a><br />
+ <a class="message" href="#SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixelWidth)</a><br />
+ <a class="message" href="#SCI_GETCARETWIDTH">SCI_GETCARETWIDTH &rarr; int</a><br />
+ <a class="message" href="#SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE(bool useSetting, colour fore)</a><br />
+ <a class="message" href="#SCI_GETHOTSPOTACTIVEFORE">SCI_GETHOTSPOTACTIVEFORE &rarr; colour</a><br />
+ <a class="message" href="#SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useSetting, colour back)</a><br />
+ <a class="message" href="#SCI_GETHOTSPOTACTIVEBACK">SCI_GETHOTSPOTACTIVEBACK &rarr; colour</a><br />
<a class="message" href="#SCI_SETHOTSPOTACTIVEUNDERLINE">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)</a><br />
- <a class="message" href="#SCI_GETHOTSPOTACTIVEUNDERLINE">SCI_GETHOTSPOTACTIVEUNDERLINE</a><br />
+ <a class="message" href="#SCI_GETHOTSPOTACTIVEUNDERLINE">SCI_GETHOTSPOTACTIVEUNDERLINE &rarr; bool</a><br />
<a class="message" href="#SCI_SETHOTSPOTSINGLELINE">SCI_SETHOTSPOTSINGLELINE(bool singleLine)</a><br />
- <a class="message" href="#SCI_GETHOTSPOTSINGLELINE">SCI_GETHOTSPOTSINGLELINE</a><br />
+ <a class="message" href="#SCI_GETHOTSPOTSINGLELINE">SCI_GETHOTSPOTSINGLELINE &rarr; bool</a><br />
<a class="message" href="#SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(int useCaretStickyBehaviour)</a><br />
- <a class="message" href="#SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</a><br />
+ <a class="message" href="#SCI_GETCARETSTICKY">SCI_GETCARETSTICKY &rarr; int</a><br />
<a class="message" href="#SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</a><br />
</code>
- <p><b id="SCI_SETSELFORE">SCI_SETSELFORE(bool useSelectionForeColour, int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_SETSELBACK">SCI_SETSELBACK(bool useSelectionBackColour, int <a class="jump"
- href="#colour">colour</a>)</b><br />
+ <p><b id="SCI_SETSELFORE">SCI_SETSELFORE(bool useSetting, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_SETSELBACK">SCI_SETSELBACK(bool useSetting, <a class="jump" href="#colour">colour</a> back)</b><br />
You can choose to override the default selection colouring with these two messages. The colour
- you provide is used if you set <code>useSelection*Colour</code> to <code>true</code>. If it is
- set to <code>false</code>, the default styled colouring is used and the <code>colour</code>
+ you provide is used if you set <code class="parameter">useSelection*Colour</code> to <code>true</code>. If it is
+ set to <code>false</code>, the default styled colouring is used and the
+ <code class="parameter">fore</code> or <code class="parameter">back</code>
argument has no effect.</p>
- <p><b id="SCI_SETSELALPHA">SCI_SETSELALPHA(int <a class="jump" href="#alpha">alpha</a>)</b><br />
- <b id="SCI_GETSELALPHA">SCI_GETSELALPHA</b><br />
+ <p><b id="SCI_SETSELALPHA">SCI_SETSELALPHA(<a class="jump" href="#alpha">alpha</a> alpha)</b><br />
+ <b id="SCI_GETSELALPHA">SCI_GETSELALPHA &rarr; int</b><br />
The selection can be drawn translucently in the selection background colour by
setting an alpha value.</p>
<p><b id="SCI_SETSELEOLFILLED">SCI_SETSELEOLFILLED(bool filled)</b><br />
- <b id="SCI_GETSELEOLFILLED">SCI_GETSELEOLFILLED</b><br />
+ <b id="SCI_GETSELEOLFILLED">SCI_GETSELEOLFILLED &rarr; bool</b><br />
The selection can be drawn up to the right hand border by setting this property.</p>
- <p><b id="SCI_SETCARETFORE">SCI_SETCARETFORE(int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_GETCARETFORE">SCI_GETCARETFORE</b><br />
+ <p><b id="SCI_SETCARETFORE">SCI_SETCARETFORE(<a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_GETCARETFORE">SCI_GETCARETFORE &rarr; colour</b><br />
The colour of the caret can be set with <code>SCI_SETCARETFORE</code> and retrieved with
<code>SCI_GETCARETFORE</code>.</p>
<p><b id="SCI_SETCARETLINEVISIBLE">SCI_SETCARETLINEVISIBLE(bool show)</b><br />
- <b id="SCI_GETCARETLINEVISIBLE">SCI_GETCARETLINEVISIBLE</b><br />
- <b id="SCI_SETCARETLINEBACK">SCI_SETCARETLINEBACK(int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_GETCARETLINEBACK">SCI_GETCARETLINEBACK</b><br />
- <b id="SCI_SETCARETLINEBACKALPHA">SCI_SETCARETLINEBACKALPHA(int <a class="jump" href="#alpha">alpha</a>)</b><br />
- <b id="SCI_GETCARETLINEBACKALPHA">SCI_GETCARETLINEBACKALPHA</b><br />
+ <b id="SCI_GETCARETLINEVISIBLE">SCI_GETCARETLINEVISIBLE &rarr; bool</b><br />
+ <b id="SCI_SETCARETLINEBACK">SCI_SETCARETLINEBACK(<a class="jump" href="#colour">colour</a> back)</b><br />
+ <b id="SCI_GETCARETLINEBACK">SCI_GETCARETLINEBACK &rarr; colour</b><br />
+ <b id="SCI_SETCARETLINEBACKALPHA">SCI_SETCARETLINEBACKALPHA(<a class="jump" href="#alpha">alpha</a> alpha)</b><br />
+ <b id="SCI_GETCARETLINEBACKALPHA">SCI_GETCARETLINEBACKALPHA &rarr; int</b><br />
You can choose to make the background colour of the line containing the caret different with
these messages. To do this, set the desired background colour with
<code>SCI_SETCARETLINEBACK</code>, then use <code>SCI_SETCARETLINEVISIBLE(true)</code> to
@@ -2900,20 +3000,20 @@ struct Sci_TextToFind {
</p>
<p><b id="SCI_SETCARETLINEVISIBLEALWAYS">SCI_SETCARETLINEVISIBLEALWAYS(bool alwaysVisible)</b><br />
- <b id="SCI_GETCARETLINEVISIBLEALWAYS">SCI_GETCARETLINEVISIBLEALWAYS</b><br />
+ <b id="SCI_GETCARETLINEVISIBLEALWAYS">SCI_GETCARETLINEVISIBLEALWAYS &rarr; bool</b><br />
Choose to make the caret line always visible even when the window is not in focus.
Default behaviour <code>SCI_SETCARETLINEVISIBLEALWAYS(false)</code> the caret line is only visible when the window is in focus.
</p>
- <p><b id="SCI_SETCARETPERIOD">SCI_SETCARETPERIOD(int milliseconds)</b><br />
- <b id="SCI_GETCARETPERIOD">SCI_GETCARETPERIOD</b><br />
+ <p><b id="SCI_SETCARETPERIOD">SCI_SETCARETPERIOD(int periodMilliseconds)</b><br />
+ <b id="SCI_GETCARETPERIOD">SCI_GETCARETPERIOD &rarr; int</b><br />
The rate at which the caret blinks can be set with <code>SCI_SETCARETPERIOD</code> which
determines the time in milliseconds that the caret is visible or invisible before changing
state. Setting the period to 0 stops the caret blinking. The default value is 500 milliseconds.
<code>SCI_GETCARETPERIOD</code> returns the current setting.</p>
- <p><b id="SCI_SETCARETSTYLE">SCI_SETCARETSTYLE(int style)</b><br />
- <b id="SCI_GETCARETSTYLE">SCI_GETCARETSTYLE</b><br />
+ <p><b id="SCI_SETCARETSTYLE">SCI_SETCARETSTYLE(int caretStyle)</b><br />
+ <b id="SCI_GETCARETSTYLE">SCI_GETCARETSTYLE &rarr; int</b><br />
The style of the caret can be set with <code>SCI_SETCARETSTYLE</code> to be a line caret
(CARETSTYLE_LINE=1), a block caret (CARETSTYLE_BLOCK=2) or to not draw at all
(CARETSTYLE_INVISIBLE=0). The default value is the line caret (CARETSTYLE_LINE=1).
@@ -2924,8 +3024,8 @@ struct Sci_TextToFind {
the cursor is positioned at these characters, which may result in only drawing a part of the
cursor character sequence. This is most notable on Windows platforms.</p>
- <p><b id="SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixels)</b><br />
- <b id="SCI_GETCARETWIDTH">SCI_GETCARETWIDTH</b><br />
+ <p><b id="SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixelWidth)</b><br />
+ <b id="SCI_GETCARETWIDTH">SCI_GETCARETWIDTH &rarr; int</b><br />
The width of the line caret can be set with <code>SCI_SETCARETWIDTH</code> to a value of
0, 1, 2 or 3 pixels. The default width is 1 pixel. You can read back the current width with
<code>SCI_GETCARETWIDTH</code>. A width of 0 makes the caret invisible (added at version
@@ -2933,22 +3033,21 @@ struct Sci_TextToFind {
This setting only affects the width of the cursor when the cursor style is set to line caret
mode, it does not affect the width for a block caret.</p>
- <p><b id="SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE(bool useHotSpotForeColour, int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_GETHOTSPOTACTIVEFORE">SCI_GETHOTSPOTACTIVEFORE</b><br />
- <b id="SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useHotSpotBackColour, int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_GETHOTSPOTACTIVEBACK">SCI_GETHOTSPOTACTIVEBACK</b><br />
+ <p><b id="SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE(bool useSetting, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_GETHOTSPOTACTIVEFORE">SCI_GETHOTSPOTACTIVEFORE &rarr; colour</b><br />
+ <b id="SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useSetting,
+ <a class="jump" href="#colour">colour</a> back)</b><br />
+ <b id="SCI_GETHOTSPOTACTIVEBACK">SCI_GETHOTSPOTACTIVEBACK &rarr; colour</b><br />
<b id="SCI_SETHOTSPOTACTIVEUNDERLINE">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)</b><br />
- <b id="SCI_GETHOTSPOTACTIVEUNDERLINE">SCI_GETHOTSPOTACTIVEUNDERLINE</b><br />
+ <b id="SCI_GETHOTSPOTACTIVEUNDERLINE">SCI_GETHOTSPOTACTIVEUNDERLINE &rarr; bool</b><br />
<b id="SCI_SETHOTSPOTSINGLELINE">SCI_SETHOTSPOTSINGLELINE(bool singleLine)</b><br />
- <b id="SCI_GETHOTSPOTSINGLELINE">SCI_GETHOTSPOTSINGLELINE</b><br />
+ <b id="SCI_GETHOTSPOTSINGLELINE">SCI_GETHOTSPOTSINGLELINE &rarr; bool</b><br />
While the cursor hovers over text in a style with the hotspot attribute set,
the default colouring can be modified and an underline drawn with these settings.
Single line mode stops a hotspot from wrapping onto next line.</p>
<p><b id="SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(int useCaretStickyBehaviour)</b><br />
- <b id="SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</b><br />
+ <b id="SCI_GETCARETSTICKY">SCI_GETCARETSTICKY &rarr; int</b><br />
<b id="SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</b><br />
These messages set, get or toggle the caretSticky setting which controls when the last position
of the caret on the line is saved.</p>
@@ -2990,14 +3089,14 @@ struct Sci_TextToFind {
<code>
<a class="message" href="#SCI_SETREPRESENTATION">SCI_SETREPRESENTATION(const char *encodedCharacter, const char *representation)</a><br />
- <a class="message" href="#SCI_GETREPRESENTATION">SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation)</a><br />
+ <a class="message" href="#SCI_GETREPRESENTATION">SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation) &rarr; int</a><br />
<a class="message" href="#SCI_CLEARREPRESENTATION">SCI_CLEARREPRESENTATION(const char *encodedCharacter)</a><br />
<a class="message" href="#SCI_SETCONTROLCHARSYMBOL">SCI_SETCONTROLCHARSYMBOL(int symbol)</a><br />
- <a class="message" href="#SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL</a><br />
+ <a class="message" href="#SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL &rarr; int</a><br />
</code>
<p><b id="SCI_SETREPRESENTATION">SCI_SETREPRESENTATION(const char *encodedCharacter, const char *representation)</b><br />
- <b id="SCI_GETREPRESENTATION">SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation NUL-terminated)</b><br />
+ <b id="SCI_GETREPRESENTATION">SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation NUL-terminated) &rarr; int</b><br />
<b id="SCI_CLEARREPRESENTATION">SCI_CLEARREPRESENTATION(const char *encodedCharacter)</b><br />
Any character, including those normally displayed as mnemonics may be represented by a
string inverted in a rounded rectangle.</p>
@@ -3013,7 +3112,7 @@ struct Sci_TextToFind {
character is specified as an empty string.</p>
<p><b id="SCI_SETCONTROLCHARSYMBOL">SCI_SETCONTROLCHARSYMBOL(int symbol)</b><br />
- <b id="SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL</b><br />
+ <b id="SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL &rarr; int</b><br />
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.
@@ -3022,10 +3121,12 @@ struct Sci_TextToFind {
<h2 id="Margins">Margins</h2>
- <p>There may be up to five margins, numbered 0 to <code>SC_MAX_MARGIN</code> (4)
- to the left of the text display, plus a gap either side of
- the text. Each margin can be set to display only symbols, line numbers, or text with <a
- class="message" href="#SCI_SETMARGINTYPEN"><code>SCI_SETMARGINTYPEN</code></a>.
+ <p>There may be multiple margins to the left of the text display plus a gap either side of the text.
+ 5 margins are allocated initially numbered from 0 to <code>SC_MAX_MARGIN</code> (4)
+ but this may be changed by calling
+ <a class="message" href="#SCI_SETMARGINS"><code>SCI_SETMARGINS</code></a>.
+ Each margin can be set to display only symbols, line numbers, or text with
+ <a class="message" href="#SCI_SETMARGINTYPEN"><code>SCI_SETMARGINTYPEN</code></a>.
Textual margins may also display symbols.
The markers
that can be displayed in each margin are set with <a class="message"
@@ -3036,7 +3137,7 @@ struct Sci_TextToFind {
href="#SCN_MARGINCLICK"><code>SCN_MARGINCLICK</code></a> notification to the container or
selects a line of text.</p>
- <p>The margins are numbered 0 to 4. Using a margin number outside the valid range has no
+ <p>Using a margin number outside the valid range has no
effect. By default, margin 0 is set to display line numbers, but is given a width of 0, so it
is hidden. Margin 1 is set to display non-folding symbols and is given a width of 16 pixels, so
it is visible. Margin 2 is set to display the folding symbols, but is given a width of 0, so it
@@ -3045,58 +3146,65 @@ struct Sci_TextToFind {
<p>Styled text margins used to show revision and blame information:</p>
<p><img src="styledmargin.png" alt="Styled text margins used to show revision and blame information" /></p>
- <code><a class="message" href="#SCI_SETMARGINTYPEN">SCI_SETMARGINTYPEN(int margin, int
- type)</a><br />
- <a class="message" href="#SCI_GETMARGINTYPEN">SCI_GETMARGINTYPEN(int margin)</a><br />
+ <code>
+ <a class="message" href="#SCI_SETMARGINS">SCI_SETMARGINS(int margins)</a><br />
+ <a class="message" href="#SCI_GETMARGINS">SCI_GETMARGINS &rarr; int</a><br />
+ <a class="message" href="#SCI_SETMARGINTYPEN">SCI_SETMARGINTYPEN(int margin, int marginType)</a><br />
+ <a class="message" href="#SCI_GETMARGINTYPEN">SCI_GETMARGINTYPEN(int margin) &rarr; int</a><br />
<a class="message" href="#SCI_SETMARGINWIDTHN">SCI_SETMARGINWIDTHN(int margin, int
pixelWidth)</a><br />
- <a class="message" href="#SCI_GETMARGINWIDTHN">SCI_GETMARGINWIDTHN(int margin)</a><br />
+ <a class="message" href="#SCI_GETMARGINWIDTHN">SCI_GETMARGINWIDTHN(int margin) &rarr; int</a><br />
<a class="message" href="#SCI_SETMARGINMASKN">SCI_SETMARGINMASKN(int margin, int
mask)</a><br />
- <a class="message" href="#SCI_GETMARGINMASKN">SCI_GETMARGINMASKN(int margin)</a><br />
+ <a class="message" href="#SCI_GETMARGINMASKN">SCI_GETMARGINMASKN(int margin) &rarr; int</a><br />
<a class="message" href="#SCI_SETMARGINSENSITIVEN">SCI_SETMARGINSENSITIVEN(int margin, bool
sensitive)</a><br />
- <a class="message" href="#SCI_GETMARGINSENSITIVEN">SCI_GETMARGINSENSITIVEN(int
- margin)</a><br />
+ <a class="message" href="#SCI_GETMARGINSENSITIVEN">SCI_GETMARGINSENSITIVEN(int margin) &rarr; bool</a><br />
<a class="message" href="#SCI_SETMARGINCURSORN">SCI_SETMARGINCURSORN(int margin, int
cursor)</a><br />
- <a class="message" href="#SCI_GETMARGINCURSORN">SCI_GETMARGINCURSORN(int
- margin)</a><br />
+ <a class="message" href="#SCI_GETMARGINCURSORN">SCI_GETMARGINCURSORN(int margin) &rarr; int</a><br />
+ <a class="message" href="#SCI_SETMARGINBACKN">SCI_SETMARGINBACKN(int margin, colour back)</a><br />
+ <a class="message" href="#SCI_GETMARGINBACKN">SCI_GETMARGINBACKN(int margin) &rarr; colour</a><br />
<a class="message" href="#SCI_SETMARGINLEFT">SCI_SETMARGINLEFT(&lt;unused&gt;, int
- pixels)</a><br />
- <a class="message" href="#SCI_GETMARGINLEFT">SCI_GETMARGINLEFT</a><br />
+ pixelWidth)</a><br />
+ <a class="message" href="#SCI_GETMARGINLEFT">SCI_GETMARGINLEFT &rarr; int</a><br />
<a class="message" href="#SCI_SETMARGINRIGHT">SCI_SETMARGINRIGHT(&lt;unused&gt;, int
- pixels)</a><br />
- <a class="message" href="#SCI_GETMARGINRIGHT">SCI_GETMARGINRIGHT</a><br />
- <a class="message" href="#SCI_SETFOLDMARGINCOLOUR">SCI_SETFOLDMARGINCOLOUR(bool useSetting, int colour)</a><br />
- <a class="message" href="#SCI_SETFOLDMARGINHICOLOUR">SCI_SETFOLDMARGINHICOLOUR(bool useSetting, int colour)</a><br />
- <a class="message" href="#SCI_MARGINSETTEXT">SCI_MARGINSETTEXT(int line, char *text)</a><br />
- <a class="message" href="#SCI_MARGINGETTEXT">SCI_MARGINGETTEXT(int line, char *text)</a><br />
+ pixelWidth)</a><br />
+ <a class="message" href="#SCI_GETMARGINRIGHT">SCI_GETMARGINRIGHT &rarr; int</a><br />
+ <a class="message" href="#SCI_SETFOLDMARGINCOLOUR">SCI_SETFOLDMARGINCOLOUR(bool useSetting, colour back)</a><br />
+ <a class="message" href="#SCI_SETFOLDMARGINHICOLOUR">SCI_SETFOLDMARGINHICOLOUR(bool useSetting, colour fore)</a><br />
+ <a class="message" href="#SCI_MARGINSETTEXT">SCI_MARGINSETTEXT(int line, const char *text)</a><br />
+ <a class="message" href="#SCI_MARGINGETTEXT">SCI_MARGINGETTEXT(int line, char *text) &rarr; int</a><br />
<a class="message" href="#SCI_MARGINSETSTYLE">SCI_MARGINSETSTYLE(int line, int style)</a><br />
- <a class="message" href="#SCI_MARGINGETSTYLE">SCI_MARGINGETSTYLE(int line)</a><br />
- <a class="message" href="#SCI_MARGINSETSTYLES">SCI_MARGINSETSTYLES(int line, char *styles)</a><br />
- <a class="message" href="#SCI_MARGINGETSTYLES">SCI_MARGINGETSTYLES(int line, char *styles)</a><br />
+ <a class="message" href="#SCI_MARGINGETSTYLE">SCI_MARGINGETSTYLE(int line) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARGINSETSTYLES">SCI_MARGINSETSTYLES(int line, const char *styles)</a><br />
+ <a class="message" href="#SCI_MARGINGETSTYLES">SCI_MARGINGETSTYLES(int line, char *styles) &rarr; int</a><br />
<a class="message" href="#SCI_MARGINTEXTCLEARALL">SCI_MARGINTEXTCLEARALL</a><br />
<a class="message" href="#SCI_MARGINSETSTYLEOFFSET">SCI_MARGINSETSTYLEOFFSET(int style)</a><br />
- <a class="message" href="#SCI_MARGINGETSTYLEOFFSET">SCI_MARGINGETSTYLEOFFSET</a><br />
+ <a class="message" href="#SCI_MARGINGETSTYLEOFFSET">SCI_MARGINGETSTYLEOFFSET &rarr; int</a><br />
<a class="message" href="#SCI_SETMARGINOPTIONS">SCI_SETMARGINOPTIONS(int marginOptions)</a><br />
- <a class="message" href="#SCI_GETMARGINOPTIONS">SCI_GETMARGINOPTIONS</a><br />
+ <a class="message" href="#SCI_GETMARGINOPTIONS">SCI_GETMARGINOPTIONS &rarr; int</a><br />
</code>
- <p><b id="SCI_SETMARGINTYPEN">SCI_SETMARGINTYPEN(int margin, int iType)</b><br />
- <b id="SCI_GETMARGINTYPEN">SCI_GETMARGINTYPEN(int margin)</b><br />
+<p><b id="SCI_SETMARGINS">SCI_SETMARGINS(int margins)</b><br />
+ <b id="SCI_GETMARGINS">SCI_GETMARGINS &rarr; int</b><br />
+ Allocate the number of margins or find the number of margins currently allocated.</p>
+
+ <p><b id="SCI_SETMARGINTYPEN">SCI_SETMARGINTYPEN(int margin, int marginType)</b><br />
+ <b id="SCI_GETMARGINTYPEN">SCI_GETMARGINTYPEN(int margin) &rarr; int</b><br />
These two routines set and get the type of a margin. The margin argument should be 0, 1, 2, 3 or 4.
You can use the predefined constants <code>SC_MARGIN_SYMBOL</code> (0) and
<code>SC_MARGIN_NUMBER</code> (1) to set a margin as either a line number or a symbol margin.
A margin with application defined text may use <code>SC_MARGIN_TEXT</code> (4) or
<code>SC_MARGIN_RTEXT</code> (5) to right justify the text.
By convention, margin 0 is used for line numbers and the next two are used for symbols. You can
- also use the constants <code>SC_MARGIN_BACK</code> (2) and <code>SC_MARGIN_FORE</code> (3) for
+ also use the constants <code>SC_MARGIN_BACK</code> (2), <code>SC_MARGIN_FORE</code> (3),
+ and <code>SC_MARGIN_COLOUR</code> (6) for
symbol margins that set their background colour to match the STYLE_DEFAULT background and
- foreground colours.</p>
+ foreground colours or a specified colour.</p>
<p><b id="SCI_SETMARGINWIDTHN">SCI_SETMARGINWIDTHN(int margin, int pixelWidth)</b><br />
- <b id="SCI_GETMARGINWIDTHN">SCI_GETMARGINWIDTHN(int margin)</b><br />
+ <b id="SCI_GETMARGINWIDTHN">SCI_GETMARGINWIDTHN(int margin) &rarr; int</b><br />
These routines set and get the width of a margin in pixels. A margin with zero width is
invisible. By default, Scintilla sets margin 1 for symbols with a width of 16 pixels, so this
is a reasonable guess if you are not sure what would be appropriate. Line number margins widths
@@ -3106,7 +3214,7 @@ struct Sci_TextToFind {
suitable width.</p>
<p><b id="SCI_SETMARGINMASKN">SCI_SETMARGINMASKN(int margin, int mask)</b><br />
- <b id="SCI_GETMARGINMASKN">SCI_GETMARGINMASKN(int margin)</b><br />
+ <b id="SCI_GETMARGINMASKN">SCI_GETMARGINMASKN(int margin) &rarr; int</b><br />
The mask is a 32-bit value. Each bit corresponds to one of 32 logical symbols that can be
displayed in a margin that is enabled for symbols. There is a useful constant,
<code>SC_MASK_FOLDERS</code> (0xFE000000 or -33554432), that is a mask for the 7 logical
@@ -3133,7 +3241,7 @@ struct Sci_TextToFind {
<p><b id="SCI_SETMARGINSENSITIVEN">SCI_SETMARGINSENSITIVEN(int margin, bool
sensitive)</b><br />
- <b id="SCI_GETMARGINSENSITIVEN">SCI_GETMARGINSENSITIVEN(int margin)</b><br />
+ <b id="SCI_GETMARGINSENSITIVEN">SCI_GETMARGINSENSITIVEN(int margin) &rarr; bool</b><br />
Each of the five margins can be set sensitive or insensitive to mouse clicks. A click in a
sensitive margin sends a <a class="message"
href="#SCN_MARGINCLICK"><code>SCN_MARGINCLICK</code></a> <a class="jump"
@@ -3143,32 +3251,36 @@ struct Sci_TextToFind {
<p><b id="SCI_SETMARGINCURSORN">SCI_SETMARGINCURSORN(int margin, int
cursor)</b><br />
- <b id="SCI_GETMARGINCURSORN">SCI_GETMARGINCURSORN(int margin)</b><br />
+ <b id="SCI_GETMARGINCURSORN">SCI_GETMARGINCURSORN(int margin) &rarr; int</b><br />
A reversed arrow cursor is normally shown over all margins. This may be changed to a normal arrow with
<code>SCI_SETMARGINCURSORN(margin, SC_CURSORARROW)</code> or restored to a
reversed arrow with
<code>SCI_SETMARGINCURSORN(margin, SC_CURSORREVERSEARROW)</code>.</p>
-
- <p><b id="SCI_SETMARGINLEFT">SCI_SETMARGINLEFT(&lt;unused&gt;, int pixels)</b><br />
- <b id="SCI_GETMARGINLEFT">SCI_GETMARGINLEFT</b><br />
- <b id="SCI_SETMARGINRIGHT">SCI_SETMARGINRIGHT(&lt;unused&gt;, int pixels)</b><br />
- <b id="SCI_GETMARGINRIGHT">SCI_GETMARGINRIGHT</b><br />
+ <p><b id="SCI_SETMARGINBACKN">SCI_SETMARGINBACKN(int margin, <a class="jump" href="#colour">colour</a> back)</b><br />
+ <b id="SCI_GETMARGINBACKN">SCI_GETMARGINBACKN(int margin) &rarr; colour</b><br />
+ A margin of type <code>SC_MARGIN_COLOUR</code>
+ may have its colour set with <code>SCI_SETMARGINBACKN</code>.</p>
+
+ <p><b id="SCI_SETMARGINLEFT">SCI_SETMARGINLEFT(&lt;unused&gt;, int pixelWidth)</b><br />
+ <b id="SCI_GETMARGINLEFT">SCI_GETMARGINLEFT &rarr; int</b><br />
+ <b id="SCI_SETMARGINRIGHT">SCI_SETMARGINRIGHT(&lt;unused&gt;, int pixelWidth)</b><br />
+ <b id="SCI_GETMARGINRIGHT">SCI_GETMARGINRIGHT &rarr; int</b><br />
These messages set and get the width of the blank margin on both sides of the text in pixels.
The default is to one pixel on each side.</p>
- <p><b id="SCI_SETFOLDMARGINCOLOUR">SCI_SETFOLDMARGINCOLOUR(bool useSetting, int colour)</b><br />
- <b id="SCI_SETFOLDMARGINHICOLOUR">SCI_SETFOLDMARGINHICOLOUR(bool useSetting, int colour)</b><br />
+ <p><b id="SCI_SETFOLDMARGINCOLOUR">SCI_SETFOLDMARGINCOLOUR(bool useSetting, <a class="jump" href="#colour">colour</a> back)</b><br />
+ <b id="SCI_SETFOLDMARGINHICOLOUR">SCI_SETFOLDMARGINHICOLOUR(bool useSetting, <a class="jump" href="#colour">colour</a> fore)</b><br />
These messages allow changing the colour of the fold margin and fold margin highlight.
On Windows the fold margin colour defaults to ::GetSysColor(COLOR_3DFACE) and the fold margin highlight
colour to ::GetSysColor(COLOR_3DHIGHLIGHT).</p>
<p>
- <b id="SCI_MARGINSETTEXT">SCI_MARGINSETTEXT(int line, char *text)</b><br />
- <b id="SCI_MARGINGETTEXT">SCI_MARGINGETTEXT(int line, char *text)</b><br />
+ <b id="SCI_MARGINSETTEXT">SCI_MARGINSETTEXT(int line, const char *text)</b><br />
+ <b id="SCI_MARGINGETTEXT">SCI_MARGINGETTEXT(int line, char *text) &rarr; int</b><br />
<b id="SCI_MARGINSETSTYLE">SCI_MARGINSETSTYLE(int line, int style)</b><br />
- <b id="SCI_MARGINGETSTYLE">SCI_MARGINGETSTYLE(int line)</b><br />
- <b id="SCI_MARGINSETSTYLES">SCI_MARGINSETSTYLES(int line, char *styles)</b><br />
- <b id="SCI_MARGINGETSTYLES">SCI_MARGINGETSTYLES(int line, char *styles)</b><br />
+ <b id="SCI_MARGINGETSTYLE">SCI_MARGINGETSTYLE(int line) &rarr; int</b><br />
+ <b id="SCI_MARGINSETSTYLES">SCI_MARGINSETSTYLES(int line, const char *styles)</b><br />
+ <b id="SCI_MARGINGETSTYLES">SCI_MARGINGETSTYLES(int line, char *styles) &rarr; int</b><br />
<b id="SCI_MARGINTEXTCLEARALL">SCI_MARGINTEXTCLEARALL</b><br />
Text margins are created with the type SC_MARGIN_TEXT or SC_MARGIN_RTEXT.
A different string may be set for each line with <code>SCI_MARGINSETTEXT</code>.
@@ -3185,19 +3297,19 @@ struct Sci_TextToFind {
</p>
<p>
<b id="SCI_MARGINSETSTYLEOFFSET">SCI_MARGINSETSTYLEOFFSET(int style)</b><br />
- <b id="SCI_MARGINGETSTYLEOFFSET">SCI_MARGINGETSTYLEOFFSET</b><br />
+ <b id="SCI_MARGINGETSTYLEOFFSET">SCI_MARGINGETSTYLEOFFSET &rarr; int</b><br />
Margin styles may be completely separated from standard text styles by setting a style offset. For example,
<code>SCI_MARGINSETSTYLEOFFSET(256)</code> would allow the margin styles to be numbered from
256 up to 511 so they do not overlap styles set by lexers. Each style number set with <code>SCI_MARGINSETSTYLE</code>
or <code>SCI_MARGINSETSTYLES</code> has the offset added before looking up the style.
</p>
<p>
- Always call <a class="message" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES</a>
+ Always call <a class="seealso" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES</a>
before <code>SCI_MARGINSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_MARGINSETSTYLEOFFSET</code>.
</p>
<p>
<b id="SCI_SETMARGINOPTIONS">SCI_SETMARGINOPTIONS(int marginOptions)</b><br />
- <b id="SCI_GETMARGINOPTIONS">SCI_GETMARGINOPTIONS</b><br />
+ <b id="SCI_GETMARGINOPTIONS">SCI_GETMARGINOPTIONS &rarr; int</b><br />
Define margin options by enabling appropriate bit flags. At the moment, only one flag is available
<code>SC_MARGINOPTION_SUBLINESELECT</code>=1, which controls how wrapped lines are selected when clicking
on margin in front of them. If <code>SC_MARGINOPTION_SUBLINESELECT</code> is set only sub line of wrapped
@@ -3218,28 +3330,28 @@ struct Sci_TextToFind {
<p><img src="annotations.png" alt="Annotations used for inline diagnostics" /></p>
<code>
- <a class="message" href="#SCI_ANNOTATIONSETTEXT">SCI_ANNOTATIONSETTEXT(int line, char *text)</a><br />
- <a class="message" href="#SCI_ANNOTATIONGETTEXT">SCI_ANNOTATIONGETTEXT(int line, char *text)</a><br />
+ <a class="message" href="#SCI_ANNOTATIONSETTEXT">SCI_ANNOTATIONSETTEXT(int line, const char *text)</a><br />
+ <a class="message" href="#SCI_ANNOTATIONGETTEXT">SCI_ANNOTATIONGETTEXT(int line, char *text) &rarr; int</a><br />
<a class="message" href="#SCI_ANNOTATIONSETSTYLE">SCI_ANNOTATIONSETSTYLE(int line, int style)</a><br />
- <a class="message" href="#SCI_ANNOTATIONGETSTYLE">SCI_ANNOTATIONGETSTYLE(int line)</a><br />
- <a class="message" href="#SCI_ANNOTATIONSETSTYLES">SCI_ANNOTATIONSETSTYLES(int line, char *styles)</a><br />
- <a class="message" href="#SCI_ANNOTATIONGETSTYLES">SCI_ANNOTATIONGETSTYLES(int line, char *styles)</a><br />
- <a class="message" href="#SCI_ANNOTATIONGETLINES">SCI_ANNOTATIONGETLINES(int line)</a><br />
+ <a class="message" href="#SCI_ANNOTATIONGETSTYLE">SCI_ANNOTATIONGETSTYLE(int line) &rarr; int</a><br />
+ <a class="message" href="#SCI_ANNOTATIONSETSTYLES">SCI_ANNOTATIONSETSTYLES(int line, const char *styles)</a><br />
+ <a class="message" href="#SCI_ANNOTATIONGETSTYLES">SCI_ANNOTATIONGETSTYLES(int line, char *styles) &rarr; int</a><br />
+ <a class="message" href="#SCI_ANNOTATIONGETLINES">SCI_ANNOTATIONGETLINES(int line) &rarr; int</a><br />
<a class="message" href="#SCI_ANNOTATIONCLEARALL">SCI_ANNOTATIONCLEARALL</a><br />
<a class="message" href="#SCI_ANNOTATIONSETVISIBLE">SCI_ANNOTATIONSETVISIBLE(int visible)</a><br />
- <a class="message" href="#SCI_ANNOTATIONGETVISIBLE">SCI_ANNOTATIONGETVISIBLE</a><br />
+ <a class="message" href="#SCI_ANNOTATIONGETVISIBLE">SCI_ANNOTATIONGETVISIBLE &rarr; int</a><br />
<a class="message" href="#SCI_ANNOTATIONSETSTYLEOFFSET">SCI_ANNOTATIONSETSTYLEOFFSET(int style)</a><br />
- <a class="message" href="#SCI_ANNOTATIONGETSTYLEOFFSET">SCI_ANNOTATIONGETSTYLEOFFSET</a><br />
+ <a class="message" href="#SCI_ANNOTATIONGETSTYLEOFFSET">SCI_ANNOTATIONGETSTYLEOFFSET &rarr; int</a><br />
</code>
<p>
- <b id="SCI_ANNOTATIONSETTEXT">SCI_ANNOTATIONSETTEXT(int line, char *text)</b><br />
- <b id="SCI_ANNOTATIONGETTEXT">SCI_ANNOTATIONGETTEXT(int line, char *text)</b><br />
+ <b id="SCI_ANNOTATIONSETTEXT">SCI_ANNOTATIONSETTEXT(int line, const char *text)</b><br />
+ <b id="SCI_ANNOTATIONGETTEXT">SCI_ANNOTATIONGETTEXT(int line, char *text) &rarr; int</b><br />
<b id="SCI_ANNOTATIONSETSTYLE">SCI_ANNOTATIONSETSTYLE(int line, int style)</b><br />
- <b id="SCI_ANNOTATIONGETSTYLE">SCI_ANNOTATIONGETSTYLE(int line)</b><br />
- <b id="SCI_ANNOTATIONSETSTYLES">SCI_ANNOTATIONSETSTYLES(int line, char *styles)</b><br />
- <b id="SCI_ANNOTATIONGETSTYLES">SCI_ANNOTATIONGETSTYLES(int line, char *styles)</b><br />
- <b id="SCI_ANNOTATIONGETLINES">SCI_ANNOTATIONGETLINES(int line)</b><br />
+ <b id="SCI_ANNOTATIONGETSTYLE">SCI_ANNOTATIONGETSTYLE(int line) &rarr; int</b><br />
+ <b id="SCI_ANNOTATIONSETSTYLES">SCI_ANNOTATIONSETSTYLES(int line, const char *styles)</b><br />
+ <b id="SCI_ANNOTATIONGETSTYLES">SCI_ANNOTATIONGETSTYLES(int line, char *styles) &rarr; int</b><br />
+ <b id="SCI_ANNOTATIONGETLINES">SCI_ANNOTATIONGETLINES(int line) &rarr; int</b><br />
<b id="SCI_ANNOTATIONCLEARALL">SCI_ANNOTATIONCLEARALL</b><br />
A different string may be set for each line with <code>SCI_ANNOTATIONSETTEXT</code>.
To clear annotations call <code>SCI_ANNOTATIONSETTEXT</code> with a NULL pointer.
@@ -3262,9 +3374,9 @@ struct Sci_TextToFind {
</p>
<p>
<b id="SCI_ANNOTATIONSETVISIBLE">SCI_ANNOTATIONSETVISIBLE(int visible)</b><br />
- <b id="SCI_ANNOTATIONGETVISIBLE">SCI_ANNOTATIONGETVISIBLE</b><br />
+ <b id="SCI_ANNOTATIONGETVISIBLE">SCI_ANNOTATIONGETVISIBLE &rarr; int</b><br />
Annotations can be made visible in a view and there is a choice of display style when visible.
- The two messages set and get the annotation display mode. The <code>visible</code>
+ The two messages set and get the annotation display mode. The <code class="parameter">visible</code>
argument can be one of:</p>
<table cellpadding="1" cellspacing="2" border="0" summary="Annotation visibility">
@@ -3305,7 +3417,7 @@ struct Sci_TextToFind {
<p>
<b id="SCI_ANNOTATIONSETSTYLEOFFSET">SCI_ANNOTATIONSETSTYLEOFFSET(int style)</b><br />
- <b id="SCI_ANNOTATIONGETSTYLEOFFSET">SCI_ANNOTATIONGETSTYLEOFFSET</b><br />
+ <b id="SCI_ANNOTATIONGETSTYLEOFFSET">SCI_ANNOTATIONGETSTYLEOFFSET &rarr; int</b><br />
Annotation styles may be completely separated from standard text styles by setting a style offset. For example,
<code>SCI_ANNOTATIONSETSTYLEOFFSET(512)</code> would allow the annotation styles to be numbered from
512 up to 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).
@@ -3313,36 +3425,29 @@ struct Sci_TextToFind {
or <code>SCI_ANNOTATIONSETSTYLES</code> has the offset added before looking up the style.
</p>
<p>
- Always call <a class="message" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES</a>
+ Always call <a class="seealso" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES</a>
before <code>SCI_ANNOTATIONSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_ANNOTATIONSETSTYLEOFFSET</code>.
</p>
<h2 id="OtherSettings">Other settings</h2>
<code>
- <a class="message" href="#SCI_SETBUFFEREDDRAW">SCI_SETBUFFEREDDRAW(bool isBuffered)</a><br />
- <a class="message" href="#SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW</a><br />
+ <a class="message" href="#SCI_SETBUFFEREDDRAW">SCI_SETBUFFEREDDRAW(bool buffered)</a><br />
+ <a class="message" href="#SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW &rarr; bool</a><br />
<a class="message" href="#SCI_SETPHASESDRAW">SCI_SETPHASESDRAW(int phases)</a><br />
- <a class="message" href="#SCI_GETPHASESDRAW">SCI_GETPHASESDRAW</a><br />
+ <a class="message" href="#SCI_GETPHASESDRAW">SCI_GETPHASESDRAW &rarr; int</a><br />
<a class="message" href="#SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</a><br />
- <a class="message" href="#SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW</a><br />
+ <a class="message" href="#SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW &rarr; bool</a><br />
<a class="message" href="#SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY(int technology)</a><br />
- <a class="message" href="#SCI_GETTECHNOLOGY">SCI_GETTECHNOLOGY</a><br />
+ <a class="message" href="#SCI_GETTECHNOLOGY">SCI_GETTECHNOLOGY &rarr; int</a><br />
<a class="message" href="#SCI_SETFONTQUALITY">SCI_SETFONTQUALITY(int fontQuality)</a><br />
- <a class="message" href="#SCI_GETFONTQUALITY">SCI_GETFONTQUALITY</a><br />
+ <a class="message" href="#SCI_GETFONTQUALITY">SCI_GETFONTQUALITY &rarr; int</a><br />
<a class="message" href="#SCI_SETCODEPAGE">SCI_SETCODEPAGE(int codePage)</a><br />
- <a class="message" href="#SCI_GETCODEPAGE">SCI_GETCODEPAGE</a><br />
+ <a class="message" href="#SCI_GETCODEPAGE">SCI_GETCODEPAGE &rarr; int</a><br />
<a class="message" href="#SCI_SETIMEINTERACTION">SCI_SETIMEINTERACTION(int imeInteraction)</a><br />
- <a class="message" href="#SCI_GETIMEINTERACTION">SCI_GETIMEINTERACTION</a><br />
- <a class="message" href="#SCI_SETWORDCHARS">SCI_SETWORDCHARS(&lt;unused&gt;, const char *characters)</a><br />
- <a class="message" href="#SCI_GETWORDCHARS">SCI_GETWORDCHARS(&lt;unused&gt;, char *characters)</a><br />
- <a class="message" href="#SCI_SETWHITESPACECHARS">SCI_SETWHITESPACECHARS(&lt;unused&gt;, const char *characters)</a><br />
- <a class="message" href="#SCI_GETWHITESPACECHARS">SCI_GETWHITESPACECHARS(&lt;unused&gt;, char *characters)</a><br />
- <a class="message" href="#SCI_SETPUNCTUATIONCHARS">SCI_SETPUNCTUATIONCHARS(&lt;unused&gt;, const char *characters)</a><br />
- <a class="message" href="#SCI_GETPUNCTUATIONCHARS">SCI_GETPUNCTUATIONCHARS(&lt;unused&gt;, char *characters)</a><br />
- <a class="message" href="#SCI_SETCHARSDEFAULT">SCI_SETCHARSDEFAULT</a><br />
+ <a class="message" href="#SCI_GETIMEINTERACTION">SCI_GETIMEINTERACTION &rarr; int</a><br />
<a class="message" href="#SCI_GRABFOCUS">SCI_GRABFOCUS</a><br />
<a class="message" href="#SCI_SETFOCUS">SCI_SETFOCUS(bool focus)</a><br />
- <a class="message" href="#SCI_GETFOCUS">SCI_GETFOCUS</a><br />
+ <a class="message" href="#SCI_GETFOCUS">SCI_GETFOCUS &rarr; bool</a><br />
</code>
<p>To forward a message <code>(WM_XXXX, WPARAM, LPARAM)</code> to Scintilla, you can use
@@ -3354,8 +3459,8 @@ struct Sci_TextToFind {
collect changes to mouse settings, but could be used for other user interface items in the
future).</p>
- <p><b id="SCI_SETBUFFEREDDRAW">SCI_SETBUFFEREDDRAW(bool isBuffered)</b><br />
- <b id="SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW</b><br />
+ <p><b id="SCI_SETBUFFEREDDRAW">SCI_SETBUFFEREDDRAW(bool buffered)</b><br />
+ <b id="SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW &rarr; bool</b><br />
These messages turn buffered drawing on or off and report the buffered drawing state. Buffered
drawing draws each line into a bitmap rather than directly to the screen and then copies the
bitmap to the screen. This avoids flickering although it does take longer. The default is for
@@ -3369,7 +3474,7 @@ struct Sci_TextToFind {
</p>
<p><b id="SCI_SETPHASESDRAW">SCI_SETPHASESDRAW(int phases)</b><br />
- <b id="SCI_GETPHASESDRAW">SCI_GETPHASESDRAW</b><br />
+ <b id="SCI_GETPHASESDRAW">SCI_GETPHASESDRAW &rarr; int</b><br />
There are several orders in which the text area may be drawn offering a trade-off between speed
and allowing all pixels of text to be seen even when they overlap other elements.</p>
<p>In single phase drawing (<code>SC_PHASES_ONE</code>) each
@@ -3395,16 +3500,18 @@ struct Sci_TextToFind {
This mode is incompatible with buffered drawing and will act as <code>SC_PHASES_TWO</code>
if buffered drawing is turned on.
Multiple phase drawing is slower than two phase drawing.
- Setting the layout cache to <a class="message" href="#SCI_SETLAYOUTCACHE">SC_CACHE_PAGE</a>
+ Setting the layout cache with
+ <a class="message" href="#SCI_SETLAYOUTCACHE"><code>
+ SCI_SETLAYOUTCACHE(SC_CACHE_PAGE)</code></a>
or higher can ensure that multiple phase drawing is not significantly slower.</p>
<p><b id="SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</b><br />
- <b id="SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW</b><br />
+ <b id="SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW &rarr; bool</b><br />
This property has been replaced with the preceding PHASESDRAW property which is more general,
allowing multiple phase drawing as well as one and two phase drawing.</p>
<p><b id="SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY(int technology)</b><br />
- <b id="SCI_GETTECHNOLOGY">SCI_GETTECHNOLOGY</b><br />
+ <b id="SCI_GETTECHNOLOGY">SCI_GETTECHNOLOGY &rarr; int</b><br />
The technology property allows choosing between different drawing APIs and options.
On most platforms, the only choice is <code>SC_TECHNOLOGY_DEFAULT</code> (0).
On Windows Vista or later, <code>SC_TECHNOLOGY_DIRECTWRITE</code> (1),
@@ -3423,7 +3530,7 @@ struct Sci_TextToFind {
are provisional, they may be changed or removed in a future release if a better solution is found.</span></p>
<p><b id="SCI_SETFONTQUALITY">SCI_SETFONTQUALITY(int fontQuality)</b><br />
- <b id="SCI_GETFONTQUALITY">SCI_GETFONTQUALITY</b><br />
+ <b id="SCI_GETFONTQUALITY">SCI_GETFONTQUALITY &rarr; int</b><br />
Manage font quality (antialiasing method). Currently, the following values are available on Windows:
<code>SC_EFF_QUALITY_DEFAULT</code> (backward compatible),
<code>SC_EFF_QUALITY_NON_ANTIALIASED</code>,
@@ -3433,14 +3540,14 @@ struct Sci_TextToFind {
by SC_EFF_QUALITY_MASK (0xf) will be used for quality.</p>
<p><b id="SCI_SETCODEPAGE">SCI_SETCODEPAGE(int codePage)</b><br />
- <b id="SCI_GETCODEPAGE">SCI_GETCODEPAGE</b><br />
+ <b id="SCI_GETCODEPAGE">SCI_GETCODEPAGE &rarr; int</b><br />
Scintilla has some support for Japanese, Chinese and Korean DBCS. Use this message with
- <code>codePage</code> set to the code page number to set Scintilla to use code page information
+ <code class="parameter">codePage</code> set to the code page number to set Scintilla to use code page information
to ensure double byte characters are treated as one character rather than two. This also stops
the caret from moving between the two bytes in a double byte character.
Do not use this message to choose between different single byte character sets: it doesn't do that.
Call with
- <code>codePage</code> set to zero to disable DBCS support. The default is
+ <code class="parameter">codePage</code> set to zero to disable DBCS support. The default is
<code>SCI_SETCODEPAGE(0)</code>.</p>
<p>Code page <code>SC_CP_UTF8</code> (65001) sets Scintilla into Unicode mode with the document
@@ -3455,7 +3562,7 @@ struct Sci_TextToFind {
although these may require installation of language specific support.</p>
<p><b id="SCI_SETIMEINTERACTION">SCI_SETIMEINTERACTION(int imeInteraction)</b><br />
- <b id="SCI_GETIMEINTERACTION">SCI_GETIMEINTERACTION</b><br />
+ <b id="SCI_GETIMEINTERACTION">SCI_GETIMEINTERACTION &rarr; int</b><br />
When entering text in Chinese, Japanese, or Korean an Input Method Editor (IME) may be displayed.
The IME may be an extra window appearing above Scintilla or may be displayed by Scintilla itself
as text. On some platforms there is a choice between the two techniques.
@@ -3467,46 +3574,9 @@ struct Sci_TextToFind {
and the inline behaviour with <code>SCI_SETIMEINTERACTION(SC_IME_INLINE)</code>.
Scintilla may ignore this call in some cases. For example, the inline behaviour might only be supported for some languages.</p>
- <p><b id="SCI_SETWORDCHARS">SCI_SETWORDCHARS(&lt;unused&gt;, const char *characters)</b><br />
- Scintilla has several functions that operate on words, which are defined to be contiguous
- sequences of characters from a particular set of characters. This message defines which
- characters are members of that set. The character sets are set to default values before processing this
- function.
- For example, if you don't allow '_' in your set of characters
- use:<br />
- <code>SCI_SETWORDCHARS(0, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")</code>;</p>
-
- <p><b id="SCI_GETWORDCHARS">SCI_GETWORDCHARS(&lt;unused&gt;, char *characters)</b><br />
- This fills the characters parameter with all the characters included in words.
- The characters parameter must be large enough to hold all of the characters.
- If the characters parameter is 0 then the length that should be allocated
- to store the entire set is returned.</p>
-
- <p><b id="SCI_SETWHITESPACECHARS">SCI_SETWHITESPACECHARS(&lt;unused&gt;, const char *characters)</b><br />
- <b id="SCI_GETWHITESPACECHARS">SCI_GETWHITESPACECHARS(&lt;unused&gt;, char *characters)</b><br />
- Similar to <code>SCI_SETWORDCHARS</code>, this message allows the user to define which chars Scintilla considers
- as whitespace. Setting the whitespace chars allows the user to fine-tune Scintilla's behaviour doing
- such things as moving the cursor to the start or end of a word; for example, by defining punctuation chars
- as whitespace, they will be skipped over when the user presses ctrl+left or ctrl+right.
- This function should be called after <code>SCI_SETWORDCHARS</code> as it will
- reset the whitespace characters to the default set.
- <code>SCI_GETWHITESPACECHARS</code> behaves similarly to <code>SCI_GETWORDCHARS</code>.</p>
-
- <p><b id="SCI_SETPUNCTUATIONCHARS">SCI_SETPUNCTUATIONCHARS(&lt;unused&gt;, const char *characters)</b><br />
- <b id="SCI_GETPUNCTUATIONCHARS">SCI_GETPUNCTUATIONCHARS(&lt;unused&gt;, char *characters)</b><br />
- Similar to <code>SCI_SETWORDCHARS</code> and <code>SCI_SETWHITESPACECHARS</code>, this message
- allows the user to define which chars Scintilla considers as punctuation.
- <code>SCI_GETPUNCTUATIONCHARS</code> behaves similarly to <code>SCI_GETWORDCHARS</code>.</p>
-
- <p><b id="SCI_SETCHARSDEFAULT">SCI_SETCHARSDEFAULT</b><br />
- Use the default sets of word and whitespace characters. This sets whitespace to space, tab and other
- characters with codes less than 0x20, with word characters set to alphanumeric and '_'.
- </p>
-
-
<p><b id="SCI_GRABFOCUS">SCI_GRABFOCUS</b><br />
<b id="SCI_SETFOCUS">SCI_SETFOCUS(bool focus)</b><br />
- <b id="SCI_GETFOCUS">SCI_GETFOCUS</b><br />
+ <b id="SCI_GETFOCUS">SCI_GETFOCUS &rarr; bool</b><br />
Scintilla can be told to grab the focus with this message. This is needed more on GTK+ where
focus handling is more complicated than on Windows.</p>
@@ -3515,16 +3585,15 @@ struct Sci_TextToFind {
but with the need to indicate that Scintilla has the logical focus.</p>
<h2 id="BraceHighlighting">Brace highlighting</h2>
- <code><a class="message" href="#SCI_BRACEHIGHLIGHT">SCI_BRACEHIGHLIGHT(int pos1, int
- pos2)</a><br />
- <a class="message" href="#SCI_BRACEBADLIGHT">SCI_BRACEBADLIGHT(int pos1)</a><br />
- <a class="message" href="#SCI_BRACEHIGHLIGHTINDICATOR">SCI_BRACEHIGHLIGHTINDICATOR(bool useBraceHighlightIndicator, int indicatorNumber)</a><br />
- <a class="message" href="#SCI_BRACEBADLIGHTINDICATOR">SCI_BRACEBADLIGHTINDICATOR(bool useBraceBadLightIndicator, int indicatorNumber)</a><br />
- <a class="message" href="#SCI_BRACEMATCH">SCI_BRACEMATCH(int position, int
- maxReStyle)</a><br />
+ <code><a class="message" href="#SCI_BRACEHIGHLIGHT">SCI_BRACEHIGHLIGHT(int posA, int
+ posB)</a><br />
+ <a class="message" href="#SCI_BRACEBADLIGHT">SCI_BRACEBADLIGHT(int pos)</a><br />
+ <a class="message" href="#SCI_BRACEHIGHLIGHTINDICATOR">SCI_BRACEHIGHLIGHTINDICATOR(bool useSetting, int indicator)</a><br />
+ <a class="message" href="#SCI_BRACEBADLIGHTINDICATOR">SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)</a><br />
+ <a class="message" href="#SCI_BRACEMATCH">SCI_BRACEMATCH(int pos, int maxReStyle) &rarr; position</a><br />
</code>
- <p><b id="SCI_BRACEHIGHLIGHT">SCI_BRACEHIGHLIGHT(int pos1, int pos2)</b><br />
+ <p><b id="SCI_BRACEHIGHLIGHT">SCI_BRACEHIGHLIGHT(int posA, int posB)</b><br />
Up to two characters can be highlighted in a 'brace highlighting style', which is defined as
style number <a class="message" href="#StyleDefinition"><code>STYLE_BRACELIGHT</code></a> (34).
If you have enabled indent guides, you may also wish to highlight the indent that corresponds
@@ -3532,21 +3601,21 @@ struct Sci_TextToFind {
href="#SCI_GETCOLUMN"><code>SCI_GETCOLUMN</code></a> and highlight the indent with <a
class="message" href="#SCI_SETHIGHLIGHTGUIDE"><code>SCI_SETHIGHLIGHTGUIDE</code></a>.</p>
- <p><b id="SCI_BRACEBADLIGHT">SCI_BRACEBADLIGHT(int pos1)</b><br />
+ <p><b id="SCI_BRACEBADLIGHT">SCI_BRACEBADLIGHT(int pos)</b><br />
If there is no matching brace then the <a class="jump" href="#StyleDefinition">brace
badlighting style</a>, style <code>STYLE_BRACEBAD</code> (35), can be used to show the brace
that is unmatched. Using a position of <code>INVALID_POSITION</code> (-1) removes the
highlight.</p>
- <p><b id="SCI_BRACEHIGHLIGHTINDICATOR">SCI_BRACEHIGHLIGHTINDICATOR(bool useBraceHighlightIndicator, int indicatorNumber)</b><br />
+ <p><b id="SCI_BRACEHIGHLIGHTINDICATOR">SCI_BRACEHIGHLIGHTINDICATOR(bool useSetting, int indicator)</b><br />
Use specified indicator to highlight matching braces instead of changing their style.</p>
- <p><b id="SCI_BRACEBADLIGHTINDICATOR">SCI_BRACEBADLIGHTINDICATOR(bool useBraceBadLightIndicator, int indicatorNumber)</b><br />
+ <p><b id="SCI_BRACEBADLIGHTINDICATOR">SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)</b><br />
Use specified indicator to highlight non matching brace instead of changing its style.</p>
- <p><b id="SCI_BRACEMATCH">SCI_BRACEMATCH(int pos, int maxReStyle)</b><br />
+ <p><b id="SCI_BRACEMATCH">SCI_BRACEMATCH(int pos, int maxReStyle) &rarr; position</b><br />
The <code>SCI_BRACEMATCH</code> message finds a corresponding matching brace given
- <code>pos</code>, the position of one brace. The brace characters handled are '(', ')', '[',
+ <code class="parameter">pos</code>, the position of one brace. The brace characters handled are '(', ')', '[',
']', '{', '}', '&lt;', and '&gt;'. The search is forwards from an opening brace and backwards
from a closing brace. If the character at position is not a brace character, or a matching
brace cannot be found, the return value is -1. Otherwise, the return value is the position of
@@ -3554,7 +3623,7 @@ struct Sci_TextToFind {
<p>A match only occurs if the style of the matching brace is the same as the starting brace or
the matching brace is beyond the end of styling. Nested braces are handled correctly. The
- <code>maxReStyle</code> parameter must currently be 0 - it may be used in the future to limit
+ <code class="parameter">maxReStyle</code> parameter must currently be 0 - it may be used in the future to limit
the length of brace searches.</p>
<h2 id="TabsAndIndentationGuides">Tabs and Indentation Guides</h2>
@@ -3573,40 +3642,39 @@ struct Sci_TextToFind {
inserting a tab at the current character position and backspace unindents the line rather than
deleting a character. Scintilla can also display indentation guides (vertical lines) to help
you to generate code.</p>
- <code><a class="message" href="#SCI_SETTABWIDTH">SCI_SETTABWIDTH(int widthInChars)</a><br />
- <a class="message" href="#SCI_GETTABWIDTH">SCI_GETTABWIDTH</a><br />
+ <code><a class="message" href="#SCI_SETTABWIDTH">SCI_SETTABWIDTH(int tabWidth)</a><br />
+ <a class="message" href="#SCI_GETTABWIDTH">SCI_GETTABWIDTH &rarr; int</a><br />
<a class="message" href="#SCI_CLEARTABSTOPS">SCI_CLEARTABSTOPS(int line)</a><br />
<a class="message" href="#SCI_ADDTABSTOP">SCI_ADDTABSTOP(int line, int x)</a><br />
- <a class="message" href="#SCI_GETNEXTTABSTOP">SCI_GETNEXTTABSTOP(int line, int x)</a><br />
+ <a class="message" href="#SCI_GETNEXTTABSTOP">SCI_GETNEXTTABSTOP(int line, int x) &rarr; int</a><br />
<a class="message" href="#SCI_SETUSETABS">SCI_SETUSETABS(bool useTabs)</a><br />
- <a class="message" href="#SCI_GETUSETABS">SCI_GETUSETABS</a><br />
- <a class="message" href="#SCI_SETINDENT">SCI_SETINDENT(int widthInChars)</a><br />
- <a class="message" href="#SCI_GETINDENT">SCI_GETINDENT</a><br />
+ <a class="message" href="#SCI_GETUSETABS">SCI_GETUSETABS &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETINDENT">SCI_SETINDENT(int indentSize)</a><br />
+ <a class="message" href="#SCI_GETINDENT">SCI_GETINDENT &rarr; int</a><br />
<a class="message" href="#SCI_SETTABINDENTS">SCI_SETTABINDENTS(bool tabIndents)</a><br />
- <a class="message" href="#SCI_GETTABINDENTS">SCI_GETTABINDENTS</a><br />
+ <a class="message" href="#SCI_GETTABINDENTS">SCI_GETTABINDENTS &rarr; bool</a><br />
<a class="message" href="#SCI_SETBACKSPACEUNINDENTS">SCI_SETBACKSPACEUNINDENTS(bool
bsUnIndents)</a><br />
- <a class="message" href="#SCI_GETBACKSPACEUNINDENTS">SCI_GETBACKSPACEUNINDENTS</a><br />
+ <a class="message" href="#SCI_GETBACKSPACEUNINDENTS">SCI_GETBACKSPACEUNINDENTS &rarr; bool</a><br />
<a class="message" href="#SCI_SETLINEINDENTATION">SCI_SETLINEINDENTATION(int line, int
indentation)</a><br />
- <a class="message" href="#SCI_GETLINEINDENTATION">SCI_GETLINEINDENTATION(int line)</a><br />
- <a class="message" href="#SCI_GETLINEINDENTPOSITION">SCI_GETLINEINDENTPOSITION(int
- line)</a><br />
+ <a class="message" href="#SCI_GETLINEINDENTATION">SCI_GETLINEINDENTATION(int line) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETLINEINDENTPOSITION">SCI_GETLINEINDENTPOSITION(int line) &rarr; position</a><br />
<a class="message" href="#SCI_SETINDENTATIONGUIDES">SCI_SETINDENTATIONGUIDES(int indentView)</a><br />
- <a class="message" href="#SCI_GETINDENTATIONGUIDES">SCI_GETINDENTATIONGUIDES</a><br />
+ <a class="message" href="#SCI_GETINDENTATIONGUIDES">SCI_GETINDENTATIONGUIDES &rarr; int</a><br />
<a class="message" href="#SCI_SETHIGHLIGHTGUIDE">SCI_SETHIGHLIGHTGUIDE(int column)</a><br />
- <a class="message" href="#SCI_GETHIGHLIGHTGUIDE">SCI_GETHIGHLIGHTGUIDE</a><br />
+ <a class="message" href="#SCI_GETHIGHLIGHTGUIDE">SCI_GETHIGHLIGHTGUIDE &rarr; int</a><br />
</code>
- <p><b id="SCI_SETTABWIDTH">SCI_SETTABWIDTH(int widthInChars)</b><br />
- <b id="SCI_GETTABWIDTH">SCI_GETTABWIDTH</b><br />
+ <p><b id="SCI_SETTABWIDTH">SCI_SETTABWIDTH(int tabWidth)</b><br />
+ <b id="SCI_GETTABWIDTH">SCI_GETTABWIDTH &rarr; int</b><br />
<code>SCI_SETTABWIDTH</code> sets the size of a tab as a multiple of the size of a space
character in <code>STYLE_DEFAULT</code>. The default tab width is 8 characters. There are no
limits on tab sizes, but values less than 1 or large values may have undesirable effects.</p>
<p><b id="SCI_CLEARTABSTOPS">SCI_CLEARTABSTOPS(int line)</b><br />
<b id="SCI_ADDTABSTOP">SCI_ADDTABSTOP(int line, int x)</b><br />
- <b id="SCI_GETNEXTTABSTOP">SCI_GETNEXTTABSTOP(int line, int x)</b><br />
+ <b id="SCI_GETNEXTTABSTOP">SCI_GETNEXTTABSTOP(int line, int x) &rarr; int</b><br />
<code>SCI_CLEARTABSTOPS</code> clears explicit tabstops on a line. <code>SCI_ADDTABSTOP</code>
adds an explicit tabstop at the specified distance from the left (in pixels), and
<code>SCI_GETNEXTTABSTOP</code> gets the next explicit tabstop position set after the given x position,
@@ -3615,14 +3683,14 @@ struct Sci_TextToFind {
</p>
<p><b id="SCI_SETUSETABS">SCI_SETUSETABS(bool useTabs)</b><br />
- <b id="SCI_GETUSETABS">SCI_GETUSETABS</b><br />
+ <b id="SCI_GETUSETABS">SCI_GETUSETABS &rarr; bool</b><br />
<code>SCI_SETUSETABS</code> determines whether indentation should be created out of a mixture
- of tabs and spaces or be based purely on spaces. Set <code>useTabs</code> to <code>false</code>
+ of tabs and spaces or be based purely on spaces. Set <code class="parameter">useTabs</code> to <code>false</code>
(0) to create all tabs and indents out of spaces. The default is <code>true</code>. You can use
<a class="message" href="#SCI_GETCOLUMN"><code>SCI_GETCOLUMN</code></a> to get the column of a
position taking the width of a tab into account.</p>
- <p><b id="SCI_SETINDENT">SCI_SETINDENT(int widthInChars)</b><br />
- <b id="SCI_GETINDENT">SCI_GETINDENT</b><br />
+ <p><b id="SCI_SETINDENT">SCI_SETINDENT(int indentSize)</b><br />
+ <b id="SCI_GETINDENT">SCI_GETINDENT &rarr; int</b><br />
<code>SCI_SETINDENT</code> sets the size of indentation in terms of the width of a space in <a
class="message" href="#StyleDefinition"><code>STYLE_DEFAULT</code></a>. If you set a width of
0, the indent size is the same as the tab size. There are no limits on indent sizes, but values
@@ -3630,9 +3698,9 @@ struct Sci_TextToFind {
</p>
<p><b id="SCI_SETTABINDENTS">SCI_SETTABINDENTS(bool tabIndents)</b><br />
- <b id="SCI_GETTABINDENTS">SCI_GETTABINDENTS</b><br />
+ <b id="SCI_GETTABINDENTS">SCI_GETTABINDENTS &rarr; bool</b><br />
<b id="SCI_SETBACKSPACEUNINDENTS">SCI_SETBACKSPACEUNINDENTS(bool bsUnIndents)</b><br />
- <b id="SCI_GETBACKSPACEUNINDENTS">SCI_GETBACKSPACEUNINDENTS</b><br />
+ <b id="SCI_GETBACKSPACEUNINDENTS">SCI_GETBACKSPACEUNINDENTS &rarr; bool</b><br />
</p>
<p>Inside indentation white space, the tab and backspace keys can be made to indent and
@@ -3640,16 +3708,16 @@ struct Sci_TextToFind {
<code>SCI_SETTABINDENTS</code> and <code>SCI_SETBACKSPACEUNINDENTS</code> functions.</p>
<p><b id="SCI_SETLINEINDENTATION">SCI_SETLINEINDENTATION(int line, int indentation)</b><br />
- <b id="SCI_GETLINEINDENTATION">SCI_GETLINEINDENTATION(int line)</b><br />
+ <b id="SCI_GETLINEINDENTATION">SCI_GETLINEINDENTATION(int line) &rarr; int</b><br />
The amount of indentation on a line can be discovered and set with
<code>SCI_GETLINEINDENTATION</code> and <code>SCI_SETLINEINDENTATION</code>. The indentation is
measured in character columns, which correspond to the width of space characters.</p>
- <p><b id="SCI_GETLINEINDENTPOSITION">SCI_GETLINEINDENTPOSITION(int line)</b><br />
+ <p><b id="SCI_GETLINEINDENTPOSITION">SCI_GETLINEINDENTPOSITION(int line) &rarr; position</b><br />
This returns the position at the end of indentation of a line.</p>
<p><b id="SCI_SETINDENTATIONGUIDES">SCI_SETINDENTATIONGUIDES(int indentView)</b><br />
- <b id="SCI_GETINDENTATIONGUIDES">SCI_GETINDENTATIONGUIDES</b><br />
+ <b id="SCI_GETINDENTATIONGUIDES">SCI_GETINDENTATIONGUIDES &rarr; int</b><br />
Indentation guides are dotted vertical lines that appear within indentation white space every
indent size columns. They make it easy to see which constructs line up especially when they
extend over multiple pages. Style <a class="message"
@@ -3690,10 +3758,10 @@ struct Sci_TextToFind {
</table>
<p><b id="SCI_SETHIGHLIGHTGUIDE">SCI_SETHIGHLIGHTGUIDE(int column)</b><br />
- <b id="SCI_GETHIGHLIGHTGUIDE">SCI_GETHIGHLIGHTGUIDE</b><br />
+ <b id="SCI_GETHIGHLIGHTGUIDE">SCI_GETHIGHLIGHTGUIDE &rarr; int</b><br />
When brace highlighting occurs, the indentation guide corresponding to the braces may be
highlighted with the brace highlighting style, <a class="message"
- href="#StyleDefinition"><code>STYLE_BRACELIGHT</code></a> (34). Set <code>column</code> to 0 to
+ href="#StyleDefinition"><code>STYLE_BRACELIGHT</code></a> (34). Set <code class="parameter">column</code> to 0 to
cancel this highlight.</p>
<h2 id="Markers">Markers</h2>
@@ -3720,41 +3788,36 @@ struct Sci_TextToFind {
their line moves. When a line is deleted, its markers are combined, by an <code>OR</code>
operation, with the markers of the next line.</p>
<code><a class="message" href="#SCI_MARKERDEFINE">SCI_MARKERDEFINE(int markerNumber, int
- markerSymbols)</a><br />
+ markerSymbol)</a><br />
<a class="message" href="#SCI_MARKERDEFINEPIXMAP">SCI_MARKERDEFINEPIXMAP(int markerNumber,
- const char *xpm)</a><br />
+ const char *pixmap)</a><br />
<a class="message" href="#SCI_RGBAIMAGESETWIDTH">SCI_RGBAIMAGESETWIDTH(int width)</a><br />
<a class="message" href="#SCI_RGBAIMAGESETHEIGHT">SCI_RGBAIMAGESETHEIGHT(int height)</a><br />
<a class="message" href="#SCI_RGBAIMAGESETSCALE">SCI_RGBAIMAGESETSCALE(int scalePercent)</a><br />
<a class="message" href="#SCI_MARKERDEFINERGBAIMAGE">SCI_MARKERDEFINERGBAIMAGE(int markerNumber,
const char *pixels)</a><br />
- <a class="message" href="#SCI_MARKERSYMBOLDEFINED">SCI_MARKERSYMBOLDEFINED(int markerNumber)
- </a><br />
- <a class="message" href="#SCI_MARKERSETFORE">SCI_MARKERSETFORE(int markerNumber, int
- colour)</a><br />
- <a class="message" href="#SCI_MARKERSETBACK">SCI_MARKERSETBACK(int markerNumber, int
- colour)</a><br />
- <a class="message" href="#SCI_MARKERSETBACKSELECTED">SCI_MARKERSETBACKSELECTED(int markerNumber, int
- colour)</a><br />
+ <a class="message" href="#SCI_MARKERSYMBOLDEFINED">SCI_MARKERSYMBOLDEFINED(int markerNumber) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARKERSETFORE">SCI_MARKERSETFORE(int markerNumber, colour
+ fore)</a><br />
+ <a class="message" href="#SCI_MARKERSETBACK">SCI_MARKERSETBACK(int markerNumber, colour
+ back)</a><br />
+ <a class="message" href="#SCI_MARKERSETBACKSELECTED">SCI_MARKERSETBACKSELECTED(int markerNumber, colour
+ back)</a><br />
<a class="message" href="#SCI_MARKERENABLEHIGHLIGHT">SCI_MARKERENABLEHIGHLIGHT(bool enabled)</a><br />
- <a class="message" href="#SCI_MARKERSETALPHA">SCI_MARKERSETALPHA(int markerNumber, int
- alpha)</a><br />
- <a class="message" href="#SCI_MARKERADD">SCI_MARKERADD(int line, int markerNumber)</a><br />
- <a class="message" href="#SCI_MARKERADDSET">SCI_MARKERADDSET(int line, int markerMask)</a><br />
+ <a class="message" href="#SCI_MARKERSETALPHA">SCI_MARKERSETALPHA(int markerNumber, alpha alpha)</a><br />
+ <a class="message" href="#SCI_MARKERADD">SCI_MARKERADD(int line, int markerNumber) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARKERADDSET">SCI_MARKERADDSET(int line, int markerSet)</a><br />
<a class="message" href="#SCI_MARKERDELETE">SCI_MARKERDELETE(int line, int
markerNumber)</a><br />
<a class="message" href="#SCI_MARKERDELETEALL">SCI_MARKERDELETEALL(int markerNumber)</a><br />
- <a class="message" href="#SCI_MARKERGET">SCI_MARKERGET(int line)</a><br />
- <a class="message" href="#SCI_MARKERNEXT">SCI_MARKERNEXT(int lineStart, int
- markerMask)</a><br />
- <a class="message" href="#SCI_MARKERPREVIOUS">SCI_MARKERPREVIOUS(int lineStart, int
- markerMask)</a><br />
- <a class="message" href="#SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int
- handle)</a><br />
- <a class="message" href="#SCI_MARKERDELETEHANDLE">SCI_MARKERDELETEHANDLE(int handle)</a><br />
+ <a class="message" href="#SCI_MARKERGET">SCI_MARKERGET(int line) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARKERNEXT">SCI_MARKERNEXT(int lineStart, int markerMask) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARKERPREVIOUS">SCI_MARKERPREVIOUS(int lineStart, int markerMask) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; int</a><br />
+ <a class="message" href="#SCI_MARKERDELETEHANDLE">SCI_MARKERDELETEHANDLE(int markerHandle)</a><br />
</code>
- <p><b id="SCI_MARKERDEFINE">SCI_MARKERDEFINE(int markerNumber, int markerSymbols)</b><br />
+ <p><b id="SCI_MARKERDEFINE">SCI_MARKERDEFINE(int markerNumber, int markerSymbol)</b><br />
This message associates a marker number in the range 0 to 31 with one of the marker symbols or
an ASCII character. The general-purpose marker symbols currently available are:<br />
<code>SC_MARK_CIRCLE</code>,
@@ -3926,7 +3989,7 @@ struct Sci_TextToFind {
<p><img src="Markers.png" alt="Marker samples" /></p>
<p><b id="SCI_MARKERDEFINEPIXMAP">SCI_MARKERDEFINEPIXMAP(int markerNumber, const char
- *xpm)</b><br />
+ *pixmap)</b><br />
Markers can be set to pixmaps with this message. The
<a class="jump" href="#XPM">XPM format</a> is used for the pixmap.
Pixmaps use the <code>SC_MARK_PIXMAP</code> marker symbol. </p>
@@ -3945,38 +4008,35 @@ struct Sci_TextToFind {
The default scale, 100, will stretch each image pixel to cover 4 screen pixels on a retina display.</p>
<p>Pixmaps use the <code>SC_MARK_RGBAIMAGE</code> marker symbol. </p>
- <p><b id="SCI_MARKERSYMBOLDEFINED">SCI_MARKERSYMBOLDEFINED(int markerNumber)</b><br />
+ <p><b id="SCI_MARKERSYMBOLDEFINED">SCI_MARKERSYMBOLDEFINED(int markerNumber) &rarr; int</b><br />
Returns the symbol defined for a markerNumber with <code>SCI_MARKERDEFINE</code>
or <code>SC_MARK_PIXMAP</code> if defined with <code>SCI_MARKERDEFINEPIXMAP</code>
or <code>SC_MARK_RGBAIMAGE</code> if defined with <code>SCI_MARKERDEFINERGBAIMAGE</code>.</p>
- <p><b id="SCI_MARKERSETFORE">SCI_MARKERSETFORE(int markerNumber, int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_MARKERSETBACK">SCI_MARKERSETBACK(int markerNumber, int <a class="jump"
- href="#colour">colour</a>)</b><br />
+ <p><b id="SCI_MARKERSETFORE">SCI_MARKERSETFORE(int markerNumber, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_MARKERSETBACK">SCI_MARKERSETBACK(int markerNumber, <a class="jump" href="#colour">colour</a> back)</b><br />
These two messages set the foreground and background colour of a marker number.<br />
- <b id="SCI_MARKERSETBACKSELECTED">SCI_MARKERSETBACKSELECTED(int markerNumber, int <a class="jump"
- href="#colour">colour</a>)</b><br />
+ <b id="SCI_MARKERSETBACKSELECTED">SCI_MARKERSETBACKSELECTED(int markerNumber, <a class="jump" href="#colour">colour</a> back)</b><br />
This message sets the highlight background colour of a marker number when its folding block is selected. The default colour is #FF0000.</p>
<p><b id="SCI_MARKERENABLEHIGHLIGHT">SCI_MARKERENABLEHIGHLIGHT(bool enabled)</b><br />
This message allows to enable/disable the highlight folding block when it is selected. (i.e. block that contains the caret)</p>
- <p><b id="SCI_MARKERSETALPHA">SCI_MARKERSETALPHA(int markerNumber, int <a class="jump"
- href="#alpha">alpha</a>)</b><br />
+ <p><b id="SCI_MARKERSETALPHA">SCI_MARKERSETALPHA(int markerNumber,
+ <a class="jump" href="#alpha">alpha</a> alpha)</b><br />
When markers are drawn in the content area, either because there is no margin for them or
they are of <code>SC_MARK_BACKGROUND</code> or <code>SC_MARK_UNDERLINE</code> types, they may be drawn translucently by
setting an alpha value.</p>
- <p><b id="SCI_MARKERADD">SCI_MARKERADD(int line, int markerNumber)</b><br />
- This message adds marker number <code>markerNumber</code> to a line. The message returns -1 if
+ <p><b id="SCI_MARKERADD">SCI_MARKERADD(int line, int markerNumber) &rarr; int</b><br />
+ This message adds marker number <code class="parameter">markerNumber</code> to a line. The message returns -1 if
this fails (illegal line number, out of memory) or it returns a marker handle number that
- identifies the added marker. You can use this returned handle with <a class="message"
+ identifies the added marker. You can use this returned handle with <a class="seealso"
href="#SCI_MARKERLINEFROMHANDLE"><code>SCI_MARKERLINEFROMHANDLE</code></a> to find where a
marker is after moving or combining lines and with <a class="message"
href="#SCI_MARKERDELETEHANDLE"><code>SCI_MARKERDELETEHANDLE</code></a> to delete the marker
based on its handle. The message does not check the value of markerNumber, nor does it
check if the line already contains the marker.</p>
- <p><b id="SCI_MARKERADDSET">SCI_MARKERADDSET(int line, int markerMask)</b><br />
+ <p><b id="SCI_MARKERADDSET">SCI_MARKERADDSET(int line, int markerSet)</b><br />
This message can add one or more markers to a line with a single call, specified in the same "one-bit-per-marker" 32-bit integer format returned by
<a class="message" href="#SCI_MARKERGET"><code>SCI_MARKERGET</code></a>
(and used by the mask-based marker search functions
@@ -3996,28 +4056,28 @@ struct Sci_TextToFind {
This removes markers of the given number from all lines. If markerNumber is -1, it deletes all
markers from all lines.</p>
- <p><b id="SCI_MARKERGET">SCI_MARKERGET(int line)</b><br />
+ <p><b id="SCI_MARKERGET">SCI_MARKERGET(int line) &rarr; int</b><br />
This returns a 32-bit integer that indicates which markers were present on the line. Bit 0 is
set if marker 0 is present, bit 1 for marker 1 and so on.</p>
- <p><b id="SCI_MARKERNEXT">SCI_MARKERNEXT(int lineStart, int markerMask)</b><br />
- <b id="SCI_MARKERPREVIOUS">SCI_MARKERPREVIOUS(int lineStart, int markerMask)</b><br />
+ <p><b id="SCI_MARKERNEXT">SCI_MARKERNEXT(int lineStart, int markerMask) &rarr; int</b><br />
+ <b id="SCI_MARKERPREVIOUS">SCI_MARKERPREVIOUS(int lineStart, int markerMask) &rarr; int</b><br />
These messages search efficiently for lines that include a given set of markers. The search
- starts at line number <code>lineStart</code> and continues forwards to the end of the file
+ starts at line number <code class="parameter">lineStart</code> and continues forwards to the end of the file
(<code>SCI_MARKERNEXT</code>) or backwards to the start of the file
- (<code>SCI_MARKERPREVIOUS</code>). The <code>markerMask</code> argument should have one bit set
+ (<code>SCI_MARKERPREVIOUS</code>). The <code class="parameter">markerMask</code> argument should have one bit set
for each marker you wish to find. Set bit 0 to find marker 0, bit 1 for marker 1 and so on. The
message returns the line number of the first line that contains one of the markers in
- <code>markerMask</code> or -1 if no marker is found.</p>
+ <code class="parameter">markerMask</code> or -1 if no marker is found.</p>
- <p><b id="SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle)</b><br />
- The <code>markerHandle</code> argument is an identifier for a marker returned by <a
+ <p><b id="SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; int</b><br />
+ The <code class="parameter">markerHandle</code> argument is an identifier for a marker returned by <a
class="message" href="#SCI_MARKERADD"><code>SCI_MARKERADD</code></a>. This function searches
the document for the marker with this handle and returns the line number that contains it or -1
if it is not found.</p>
<p><b id="SCI_MARKERDELETEHANDLE">SCI_MARKERDELETEHANDLE(int markerHandle)</b><br />
- The <code>markerHandle</code> argument is an identifier for a marker returned by <a
+ The <code class="parameter">markerHandle</code> argument is an identifier for a marker returned by <a
class="message" href="#SCI_MARKERADD"><code>SCI_MARKERADD</code></a>. This function searches
the document for the marker with this handle and deletes the marker if it is found.</p>
@@ -4035,7 +4095,7 @@ struct Sci_TextToFind {
They may also be invisible when used to track pieces of content for the application as <code>INDIC_HIDDEN</code>.</p>
<p>The <code>SCI_INDIC*</code> messages allow you to get and set the visual appearance of the
- indicators. They all use an <code>indicatorNumber</code> argument in the range 0 to INDIC_MAX(35)
+ indicators. They all use an <code class="parameter">indicator</code> argument in the range 0 to INDIC_MAX(35)
to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use
by lexers (0..7) a range for use by containers
(8=<code>INDIC_CONTAINER</code> .. 31=<code>INDIC_IME-1</code>)
@@ -4044,7 +4104,7 @@ struct Sci_TextToFind {
<p>Indicators are stored in a format similar to run length encoding which is efficient in both
speed and storage for sparse information.</p>
<p>An indicator may store different values for each range but normally all values are drawn the same.
- The <a class="message" href="#SCI_INDICSETFLAGS">SCI_INDICSETFLAGS</a>
+ The <a class="seealso" href="#SCI_INDICSETFLAGS">SCI_INDICSETFLAGS</a>
API may be used to display different colours for different values.</p>
<p>Originally, Scintilla used a different technique for indicators but this
@@ -4053,47 +4113,47 @@ struct Sci_TextToFind {
While both techniques were supported, the term "modern indicators" was used for the
newer implementation.</p>
- <code><a class="message" href="#SCI_INDICSETSTYLE">SCI_INDICSETSTYLE(int indicatorNumber, int
+ <code><a class="message" href="#SCI_INDICSETSTYLE">SCI_INDICSETSTYLE(int indicator, int
indicatorStyle)</a><br />
- <a class="message" href="#SCI_INDICGETSTYLE">SCI_INDICGETSTYLE(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETFORE">SCI_INDICSETFORE(int indicatorNumber, int
- colour)</a><br />
- <a class="message" href="#SCI_INDICGETFORE">SCI_INDICGETFORE(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA(int indicatorNumber, int alpha)</a><br />
- <a class="message" href="#SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA(int indicatorNumber, int alpha)</a><br />
- <a class="message" href="#SCI_INDICGETOUTLINEALPHA">SCI_INDICGETOUTLINEALPHA(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicatorNumber, bool under)</a><br />
- <a class="message" href="#SCI_INDICGETUNDER">SCI_INDICGETUNDER(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETHOVERSTYLE">SCI_INDICSETHOVERSTYLE(int indicatorNumber, int
+ <a class="message" href="#SCI_INDICGETSTYLE">SCI_INDICGETSTYLE(int indicator) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICSETFORE">SCI_INDICSETFORE(int indicator, colour
+ fore)</a><br />
+ <a class="message" href="#SCI_INDICGETFORE">SCI_INDICGETFORE(int indicator) &rarr; colour</a><br />
+ <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA(int indicator, alpha alpha)</a><br />
+ <a class="message" href="#SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicator) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA(int indicator, alpha alpha)</a><br />
+ <a class="message" href="#SCI_INDICGETOUTLINEALPHA">SCI_INDICGETOUTLINEALPHA(int indicator) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicator, bool under)</a><br />
+ <a class="message" href="#SCI_INDICGETUNDER">SCI_INDICGETUNDER(int indicator) &rarr; bool</a><br />
+ <a class="message" href="#SCI_INDICSETHOVERSTYLE">SCI_INDICSETHOVERSTYLE(int indicator, int
indicatorStyle)</a><br />
- <a class="message" href="#SCI_INDICGETHOVERSTYLE">SCI_INDICGETHOVERSTYLE(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETHOVERFORE">SCI_INDICSETHOVERFORE(int indicatorNumber, int
- colour)</a><br />
- <a class="message" href="#SCI_INDICGETHOVERFORE">SCI_INDICGETHOVERFORE(int indicatorNumber)</a><br />
- <a class="message" href="#SCI_INDICSETFLAGS">SCI_INDICSETFLAGS(int indicatorNumber, int flags)</a><br />
- <a class="message" href="#SCI_INDICGETFLAGS">SCI_INDICGETFLAGS(int indicatorNumber)</a><br />
+ <a class="message" href="#SCI_INDICGETHOVERSTYLE">SCI_INDICGETHOVERSTYLE(int indicator) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICSETHOVERFORE">SCI_INDICSETHOVERFORE(int indicator, colour
+ fore)</a><br />
+ <a class="message" href="#SCI_INDICGETHOVERFORE">SCI_INDICGETHOVERFORE(int indicator) &rarr; colour</a><br />
+ <a class="message" href="#SCI_INDICSETFLAGS">SCI_INDICSETFLAGS(int indicator, int flags)</a><br />
+ <a class="message" href="#SCI_INDICGETFLAGS">SCI_INDICGETFLAGS(int indicator) &rarr; int</a><br />
<br />
<a class="message" href="#SCI_SETINDICATORCURRENT">SCI_SETINDICATORCURRENT(int indicator)</a><br />
- <a class="message" href="#SCI_GETINDICATORCURRENT">SCI_GETINDICATORCURRENT</a><br />
+ <a class="message" href="#SCI_GETINDICATORCURRENT">SCI_GETINDICATORCURRENT &rarr; int</a><br />
<a class="message" href="#SCI_SETINDICATORVALUE">SCI_SETINDICATORVALUE(int value)</a><br />
- <a class="message" href="#SCI_GETINDICATORVALUE">SCI_GETINDICATORVALUE</a><br />
- <a class="message" href="#SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE(int position, int fillLength)</a><br />
- <a class="message" href="#SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(int position, int clearLength)</a><br />
- <a class="message" href="#SCI_INDICATORALLONFOR">SCI_INDICATORALLONFOR(int position)</a><br />
- <a class="message" href="#SCI_INDICATORVALUEAT">SCI_INDICATORVALUEAT(int indicator, int position)</a><br />
- <a class="message" href="#SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, int position)</a><br />
- <a class="message" href="#SCI_INDICATOREND">SCI_INDICATOREND(int indicator, int position)</a><br />
+ <a class="message" href="#SCI_GETINDICATORVALUE">SCI_GETINDICATORVALUE &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE(int start, int lengthFill)</a><br />
+ <a class="message" href="#SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(int start, int lengthClear)</a><br />
+ <a class="message" href="#SCI_INDICATORALLONFOR">SCI_INDICATORALLONFOR(int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICATORVALUEAT">SCI_INDICATORVALUEAT(int indicator, int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, int pos) &rarr; int</a><br />
+ <a class="message" href="#SCI_INDICATOREND">SCI_INDICATOREND(int indicator, int pos) &rarr; int</a><br />
<a class="message" href="#SCI_FINDINDICATORSHOW">SCI_FINDINDICATORSHOW(int start, int end)</a><br />
<a class="message" href="#SCI_FINDINDICATORFLASH">SCI_FINDINDICATORFLASH(int start, int end)</a><br />
<a class="message" href="#SCI_FINDINDICATORHIDE">SCI_FINDINDICATORHIDE</a><br />
</code>
- <p><b id="SCI_INDICSETSTYLE">SCI_INDICSETSTYLE(int indicatorNumber, int
+ <p><b id="SCI_INDICSETSTYLE">SCI_INDICSETSTYLE(int indicator, int
indicatorStyle)</b><br />
- <b id="SCI_INDICGETSTYLE">SCI_INDICGETSTYLE(int indicatorNumber)</b><br />
+ <b id="SCI_INDICGETSTYLE">SCI_INDICGETSTYLE(int indicator) &rarr; int</b><br />
These two messages set and get the style for a particular indicator. The indicator styles
currently available are:<br />
@@ -4174,8 +4234,8 @@ struct Sci_TextToFind {
<td>A rectangle with rounded corners around the text using translucent drawing with the
interior usually more transparent than the border. You can use
- <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and
- <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a>
+ <a class="seealso" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and
+ <a class="seealso" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a>
to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour.</td>
</tr>
@@ -4186,8 +4246,8 @@ struct Sci_TextToFind {
<td>A rectangle around the text using translucent drawing with the
interior usually more transparent than the border. You can use
- <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and
- <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a>
+ <a class="seealso" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and
+ <a class="seealso" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a>
to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour.
This indicator does not colour the top pixel of the line so that indicators on contiguous lines are visually distinct
and disconnected.</td>
@@ -4234,8 +4294,8 @@ struct Sci_TextToFind {
<td>A dotted rectangle around the text using translucent drawing.
Translucency alternates between the alpha and outline alpha settings with the top-left pixel using the alpha setting.
- <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and
- <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a>
+ <a class="seealso" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and
+ <a class="seealso" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a>
control the alpha transparency values. The default values are 30 for alpha and 50 for outline alpha.
To avoid excessive memory allocation the maximum width of a dotted box is 4000 pixels.</td>
</tr>
@@ -4287,94 +4347,94 @@ struct Sci_TextToFind {
<code>SCI_INDICSETSTYLE(1, INDIC_TT);</code><br />
<code>SCI_INDICSETSTYLE(2, INDIC_PLAIN);</code></p>
- <p><b id="SCI_INDICSETFORE">SCI_INDICSETFORE(int indicatorNumber, int <a class="jump" href="#colour">colour</a>)</b><br />
- <b id="SCI_INDICGETFORE">SCI_INDICGETFORE(int indicatorNumber)</b><br />
+ <p><b id="SCI_INDICSETFORE">SCI_INDICSETFORE(int indicator, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_INDICGETFORE">SCI_INDICGETFORE(int indicator) &rarr; colour</b><br />
These two messages set and get the colour used to draw an indicator. The default indicator
colours are equivalent to:<br />
<code>SCI_INDICSETFORE(0, 0x007f00);</code> (dark green)<br />
<code>SCI_INDICSETFORE(1, 0xff0000);</code> (light blue)<br />
<code>SCI_INDICSETFORE(2, 0x0000ff);</code> (light red)</p>
- <p><b id="SCI_INDICSETALPHA">SCI_INDICSETALPHA(int indicatorNumber, int alpha)</b><br />
- <b id="SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicatorNumber)</b><br />
+ <p><b id="SCI_INDICSETALPHA">SCI_INDICSETALPHA(int indicator, <a class="jump" href="#alpha">alpha</a> alpha)</b><br />
+ <b id="SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicator) &rarr; int</b><br />
These two messages set and get the alpha transparency used for drawing the
fill colour of the INDIC_ROUNDBOX and INDIC_STRAIGHTBOX rectangle. The alpha value can range from
0 (completely transparent) to 255 (no transparency).
</p>
- <p><b id="SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA(int indicatorNumber, int alpha)</b><br />
- <b id="SCI_INDICGETOUTLINEALPHA">SCI_INDICGETOUTLINEALPHA(int indicatorNumber)</b><br />
+ <p><b id="SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA(int indicator, <a class="jump" href="#alpha">alpha</a> alpha)</b><br />
+ <b id="SCI_INDICGETOUTLINEALPHA">SCI_INDICGETOUTLINEALPHA(int indicator) &rarr; int</b><br />
These two messages set and get the alpha transparency used for drawing the
outline colour of the INDIC_ROUNDBOX and INDIC_STRAIGHTBOX rectangle. The alpha value can range from
0 (completely transparent) to 255 (no transparency).
</p>
- <p><b id="SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicatorNumber, bool under)</b><br />
- <b id="SCI_INDICGETUNDER">SCI_INDICGETUNDER(int indicatorNumber)</b><br />
+ <p><b id="SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicator, bool under)</b><br />
+ <b id="SCI_INDICGETUNDER">SCI_INDICGETUNDER(int indicator) &rarr; bool</b><br />
These two messages set and get whether an indicator is drawn under text or over(default).
Drawing under text works only for indicators when <a class="message" href="#SCI_SETTWOPHASEDRAW">two phase drawing</a>
is enabled.</p>
- <p><b id="SCI_INDICSETHOVERSTYLE">SCI_INDICSETHOVERSTYLE(int indicatorNumber, int
+ <p><b id="SCI_INDICSETHOVERSTYLE">SCI_INDICSETHOVERSTYLE(int indicator, int
indicatorStyle)</b><br />
- <b id="SCI_INDICGETHOVERSTYLE">SCI_INDICGETHOVERSTYLE(int indicatorNumber)</b><br />
- <b id="SCI_INDICSETHOVERFORE">SCI_INDICSETHOVERFORE(int indicatorNumber, int <a class="jump" href="#colour">colour</a>)</b><br />
- <b id="SCI_INDICGETHOVERFORE">SCI_INDICGETHOVERFORE(int indicatorNumber)</b><br />
+ <b id="SCI_INDICGETHOVERSTYLE">SCI_INDICGETHOVERSTYLE(int indicator) &rarr; int</b><br />
+ <b id="SCI_INDICSETHOVERFORE">SCI_INDICSETHOVERFORE(int indicator, <a class="jump" href="#colour">colour</a> fore)</b><br />
+ <b id="SCI_INDICGETHOVERFORE">SCI_INDICGETHOVERFORE(int indicator) &rarr; colour</b><br />
These messages set and get the colour and style used to draw indicators when the mouse is over them or the caret moved into them.
The mouse cursor also changes when an indicator is drawn in hover style.
The default is for the hover appearance to be the same as the normal appearance and calling
- <a class="message" href="#SCI_INDICSETFORE">SCI_INDICSETFORE</a> or
- <a class="message" href="#SCI_INDICSETSTYLE">SCI_INDICSETSTYLE</a> will
+ <a class="seealso" href="#SCI_INDICSETFORE">SCI_INDICSETFORE</a> or
+ <a class="seealso" href="#SCI_INDICSETSTYLE">SCI_INDICSETSTYLE</a> will
also reset the hover attribute.</p>
- <p><b id="SCI_INDICSETFLAGS">SCI_INDICSETFLAGS(int indicatorNumber, int flags)</b><br />
- <b id="SCI_INDICGETFLAGS">SCI_INDICGETFLAGS(int indicatorNumber)</b><br />
+ <p><b id="SCI_INDICSETFLAGS">SCI_INDICSETFLAGS(int indicator, int flags)</b><br />
+ <b id="SCI_INDICGETFLAGS">SCI_INDICGETFLAGS(int indicator) &rarr; int</b><br />
These messages set and get the flags associated with an indicator.
There is currently one flag defined, <code>SC_INDICFLAG_VALUEFORE</code>: when this flag is set
the colour used by the indicator is not from the indicator's fore setting but instead from the value of the indicator at
that point in the file. This allows many colours to be displayed for a single indicator. The value is an <a class="jump"
href="#colour">RGB integer colour</a> that has been ored with <code>SC_INDICVALUEBIT</code>(0x1000000)
- when calling <a class="message" href="#SCI_SETINDICATORVALUE">SCI_SETINDICATORVALUE</a>.
+ when calling <a class="seealso" href="#SCI_SETINDICATORVALUE">SCI_SETINDICATORVALUE</a>.
To find the colour from the value, and the value with <code>SC_INDICVALUEMASK</code>(0xFFFFFF).
</p>
<p>
<b id="SCI_SETINDICATORCURRENT">SCI_SETINDICATORCURRENT(int indicator)</b><br />
- <b id="SCI_GETINDICATORCURRENT">SCI_GETINDICATORCURRENT</b><br />
+ <b id="SCI_GETINDICATORCURRENT">SCI_GETINDICATORCURRENT &rarr; int</b><br />
These two messages set and get the indicator that will be affected by calls to
- <a class="message" href="#SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE(int position, int fillLength)</a> and
- <a class="message" href="#SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(int position, int clearLength)</a>.
+ <a class="message" href="#SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE(int start, int lengthFill)</a> and
+ <a class="message" href="#SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(int start, int lengthClear)</a>.
</p>
<p>
<b id="SCI_SETINDICATORVALUE">SCI_SETINDICATORVALUE(int value)</b><br />
- <b id="SCI_GETINDICATORVALUE">SCI_GETINDICATORVALUE</b><br />
+ <b id="SCI_GETINDICATORVALUE">SCI_GETINDICATORVALUE &rarr; int</b><br />
These two messages set and get the value that will be set by calls to
- <a class="message" href="#SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE</a>.
+ <a class="seealso" href="#SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE</a>.
</p>
<p>
- <b id="SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE(int position, int fillLength)</b><br />
- <b id="SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(int position, int clearLength)</b><br />
+ <b id="SCI_INDICATORFILLRANGE">SCI_INDICATORFILLRANGE(int start, int lengthFill)</b><br />
+ <b id="SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(int start, int lengthClear)</b><br />
These two messages fill or clear a range for the current indicator.
<code>SCI_INDICATORFILLRANGE</code> fills with the
the current value.
</p>
<p>
- <b id="SCI_INDICATORALLONFOR">SCI_INDICATORALLONFOR(int position)</b><br />
+ <b id="SCI_INDICATORALLONFOR">SCI_INDICATORALLONFOR(int pos) &rarr; int</b><br />
Retrieve a bitmap value representing which indicators are non-zero at a position.
Only the first 32 indicators are represented in the result so no IME indicators are included.
</p>
<p>
- <b id="SCI_INDICATORVALUEAT">SCI_INDICATORVALUEAT(int indicator, int position)</b><br />
+ <b id="SCI_INDICATORVALUEAT">SCI_INDICATORVALUEAT(int indicator, int pos) &rarr; int</b><br />
Retrieve the value of a particular indicator at a position.
</p>
<p>
- <b id="SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, int position)</b><br />
- <b id="SCI_INDICATOREND">SCI_INDICATOREND(int indicator, int position)</b><br />
+ <b id="SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, int pos) &rarr; int</b><br />
+ <b id="SCI_INDICATOREND">SCI_INDICATOREND(int indicator, int pos) &rarr; int</b><br />
Find the start or end of a range with one value from a position within the range.
Can be used to iterate through the document to discover all the indicator positions.
</p>
@@ -4428,58 +4488,57 @@ struct Sci_TextToFind {
<p>To make use of autocompletion you must monitor each character added to the document. See
<code>SciTEBase::CharAdded()</code> in SciTEBase.cxx for an example of autocompletion.</p>
- <code><a class="message" href="#SCI_AUTOCSHOW">SCI_AUTOCSHOW(int lenEntered, const char
- *list)</a><br />
+ <code><a class="message" href="#SCI_AUTOCSHOW">SCI_AUTOCSHOW(int lengthEntered, const char
+ *itemList)</a><br />
<a class="message" href="#SCI_AUTOCCANCEL">SCI_AUTOCCANCEL</a><br />
- <a class="message" href="#SCI_AUTOCACTIVE">SCI_AUTOCACTIVE</a><br />
- <a class="message" href="#SCI_AUTOCPOSSTART">SCI_AUTOCPOSSTART</a><br />
+ <a class="message" href="#SCI_AUTOCACTIVE">SCI_AUTOCACTIVE &rarr; bool</a><br />
+ <a class="message" href="#SCI_AUTOCPOSSTART">SCI_AUTOCPOSSTART &rarr; position</a><br />
<a class="message" href="#SCI_AUTOCCOMPLETE">SCI_AUTOCCOMPLETE</a><br />
<a class="message" href="#SCI_AUTOCSTOPS">SCI_AUTOCSTOPS(&lt;unused&gt;, const char
- *chars)</a><br />
- <a class="message" href="#SCI_AUTOCSETSEPARATOR">SCI_AUTOCSETSEPARATOR(char
- separator)</a><br />
- <a class="message" href="#SCI_AUTOCGETSEPARATOR">SCI_AUTOCGETSEPARATOR</a><br />
+ *characterSet)</a><br />
+ <a class="message" href="#SCI_AUTOCSETSEPARATOR">SCI_AUTOCSETSEPARATOR(int
+ separatorCharacter)</a><br />
+ <a class="message" href="#SCI_AUTOCGETSEPARATOR">SCI_AUTOCGETSEPARATOR &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSELECT">SCI_AUTOCSELECT(&lt;unused&gt;, const char
*select)</a><br />
- <a class="message" href="#SCI_AUTOCGETCURRENT">SCI_AUTOCGETCURRENT</a><br />
- <a class="message" href="#SCI_AUTOCGETCURRENTTEXT">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;,
- char *text)</a><br />
+ <a class="message" href="#SCI_AUTOCGETCURRENT">SCI_AUTOCGETCURRENT &rarr; int</a><br />
+ <a class="message" href="#SCI_AUTOCGETCURRENTTEXT">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;, char *text) &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSETCANCELATSTART">SCI_AUTOCSETCANCELATSTART(bool
cancel)</a><br />
- <a class="message" href="#SCI_AUTOCGETCANCELATSTART">SCI_AUTOCGETCANCELATSTART</a><br />
+ <a class="message" href="#SCI_AUTOCGETCANCELATSTART">SCI_AUTOCGETCANCELATSTART &rarr; bool</a><br />
<a class="message" href="#SCI_AUTOCSETFILLUPS">SCI_AUTOCSETFILLUPS(&lt;unused&gt;, const char
- *chars)</a><br />
+ *characterSet)</a><br />
<a class="message" href="#SCI_AUTOCSETCHOOSESINGLE">SCI_AUTOCSETCHOOSESINGLE(bool
chooseSingle)</a><br />
- <a class="message" href="#SCI_AUTOCGETCHOOSESINGLE">SCI_AUTOCGETCHOOSESINGLE</a><br />
+ <a class="message" href="#SCI_AUTOCGETCHOOSESINGLE">SCI_AUTOCGETCHOOSESINGLE &rarr; bool</a><br />
<a class="message" href="#SCI_AUTOCSETIGNORECASE">SCI_AUTOCSETIGNORECASE(bool
ignoreCase)</a><br />
- <a class="message" href="#SCI_AUTOCGETIGNORECASE">SCI_AUTOCGETIGNORECASE</a><br />
+ <a class="message" href="#SCI_AUTOCGETIGNORECASE">SCI_AUTOCGETIGNORECASE &rarr; bool</a><br />
<a class="message" href="#SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR">SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR(int behaviour)</a><br />
- <a class="message" href="#SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR">SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR</a><br />
+ <a class="message" href="#SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR">SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSETMULTI">SCI_AUTOCSETMULTI(int multi)</a><br />
- <a class="message" href="#SCI_AUTOCGETMULTI">SCI_AUTOCGETMULTI</a><br />
+ <a class="message" href="#SCI_AUTOCGETMULTI">SCI_AUTOCGETMULTI &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSETORDER">SCI_AUTOCSETORDER(int order)</a><br />
- <a class="message" href="#SCI_AUTOCGETORDER">SCI_AUTOCGETORDER</a><br />
+ <a class="message" href="#SCI_AUTOCGETORDER">SCI_AUTOCGETORDER &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSETAUTOHIDE">SCI_AUTOCSETAUTOHIDE(bool autoHide)</a><br />
- <a class="message" href="#SCI_AUTOCGETAUTOHIDE">SCI_AUTOCGETAUTOHIDE</a><br />
+ <a class="message" href="#SCI_AUTOCGETAUTOHIDE">SCI_AUTOCGETAUTOHIDE &rarr; bool</a><br />
<a class="message" href="#SCI_AUTOCSETDROPRESTOFWORD">SCI_AUTOCSETDROPRESTOFWORD(bool
dropRestOfWord)</a><br />
- <a class="message" href="#SCI_AUTOCGETDROPRESTOFWORD">SCI_AUTOCGETDROPRESTOFWORD</a><br />
+ <a class="message" href="#SCI_AUTOCGETDROPRESTOFWORD">SCI_AUTOCGETDROPRESTOFWORD &rarr; bool</a><br />
<a class="message" href="#SCI_REGISTERIMAGE">SCI_REGISTERIMAGE(int type, const char *xpmData)</a><br />
<a class="message" href="#SCI_REGISTERRGBAIMAGE">SCI_REGISTERRGBAIMAGE(int type, const char *pixels)</a><br />
<a class="message" href="#SCI_CLEARREGISTEREDIMAGES">SCI_CLEARREGISTEREDIMAGES</a><br />
- <a class="message" href="#SCI_AUTOCSETTYPESEPARATOR">SCI_AUTOCSETTYPESEPARATOR(char separatorCharacter)</a><br />
- <a class="message" href="#SCI_AUTOCGETTYPESEPARATOR">SCI_AUTOCGETTYPESEPARATOR</a><br />
+ <a class="message" href="#SCI_AUTOCSETTYPESEPARATOR">SCI_AUTOCSETTYPESEPARATOR(int separatorCharacter)</a><br />
+ <a class="message" href="#SCI_AUTOCGETTYPESEPARATOR">SCI_AUTOCGETTYPESEPARATOR &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSETMAXHEIGHT">SCI_AUTOCSETMAXHEIGHT(int rowCount)</a><br />
- <a class="message" href="#SCI_AUTOCGETMAXHEIGHT">SCI_AUTOCGETMAXHEIGHT</a><br />
+ <a class="message" href="#SCI_AUTOCGETMAXHEIGHT">SCI_AUTOCGETMAXHEIGHT &rarr; int</a><br />
<a class="message" href="#SCI_AUTOCSETMAXWIDTH">SCI_AUTOCSETMAXWIDTH(int characterCount)</a><br />
- <a class="message" href="#SCI_AUTOCGETMAXWIDTH">SCI_AUTOCGETMAXWIDTH</a><br />
+ <a class="message" href="#SCI_AUTOCGETMAXWIDTH">SCI_AUTOCGETMAXWIDTH &rarr; int</a><br />
</code>
- <p><b id="SCI_AUTOCSHOW">SCI_AUTOCSHOW(int lenEntered, const char *list)</b><br />
- This message causes a list to be displayed. <code>lenEntered</code> is the number of
- characters of the word already entered and <code>list</code> is the list of words separated by
+ <p><b id="SCI_AUTOCSHOW">SCI_AUTOCSHOW(int lengthEntered, const char *itemList)</b><br />
+ This message causes a list to be displayed. <code class="parameter">lengthEntered</code> is the number of
+ characters of the word already entered and <code class="parameter">itemList</code> is the list of words separated by
separator characters. The initial separator character is a space but this can be set or got
with <a class="message" href="#SCI_AUTOCSETSEPARATOR"><code>SCI_AUTOCSETSEPARATOR</code></a>
and <a class="message"
@@ -4490,7 +4549,7 @@ struct Sci_TextToFind {
strings are matched after being converted to upper case. One result of this is that the list
should be sorted with the punctuation characters '[', '\', ']', '^', '_', and '`' sorted after
letters.
- Alternative handling of list order may be specified with <a class="message" href="#SCI_AUTOCSETORDER">SCI_AUTOCSETORDER</a>
+ Alternative handling of list order may be specified with <a class="seealso" href="#SCI_AUTOCSETORDER">SCI_AUTOCSETORDER</a>
</p>
<p><b id="SCI_AUTOCCANCEL">SCI_AUTOCCANCEL</b><br />
@@ -4500,90 +4559,90 @@ struct Sci_TextToFind {
autocompletion can be specified with <a class="message"
href="#SCI_AUTOCSTOPS"><code>SCI_AUTOCSTOPS</code></a>.</p>
- <p><b id="SCI_AUTOCACTIVE">SCI_AUTOCACTIVE</b><br />
+ <p><b id="SCI_AUTOCACTIVE">SCI_AUTOCACTIVE &rarr; bool</b><br />
This message returns non-zero if there is an active autocompletion list and zero if there is
not.</p>
- <p><b id="SCI_AUTOCPOSSTART">SCI_AUTOCPOSSTART</b><br />
+ <p><b id="SCI_AUTOCPOSSTART">SCI_AUTOCPOSSTART &rarr; position</b><br />
This returns the value of the current position when <code>SCI_AUTOCSHOW</code> started display
of the list.</p>
<p><b id="SCI_AUTOCCOMPLETE">SCI_AUTOCCOMPLETE</b><br />
This message triggers autocompletion. This has the same effect as the tab key.</p>
- <p><b id="SCI_AUTOCSTOPS">SCI_AUTOCSTOPS(&lt;unused&gt;, const char *chars)</b><br />
- The <code>chars</code> argument is a string containing a list of characters that will
+ <p><b id="SCI_AUTOCSTOPS">SCI_AUTOCSTOPS(&lt;unused&gt;, const char *characterSet)</b><br />
+ The <code class="parameter">characterSet</code> argument is a string containing a list of characters that will
automatically cancel the autocompletion list. When you start the editor, this list is
empty.</p>
- <p><b id="SCI_AUTOCSETSEPARATOR">SCI_AUTOCSETSEPARATOR(char separator)</b><br />
- <b id="SCI_AUTOCGETSEPARATOR">SCI_AUTOCGETSEPARATOR</b><br />
+ <p><b id="SCI_AUTOCSETSEPARATOR">SCI_AUTOCSETSEPARATOR(int separatorCharacter)</b><br />
+ <b id="SCI_AUTOCGETSEPARATOR">SCI_AUTOCGETSEPARATOR &rarr; int</b><br />
These two messages set and get the separator character used to separate words in the
<code>SCI_AUTOCSHOW</code> list. The default is the space character.</p>
<p><b id="SCI_AUTOCSELECT">SCI_AUTOCSELECT(&lt;unused&gt;, const char *select)</b><br />
- <b id="SCI_AUTOCGETCURRENT">SCI_AUTOCGETCURRENT</b><br />
+ <b id="SCI_AUTOCGETCURRENT">SCI_AUTOCGETCURRENT &rarr; int</b><br />
This message selects an item in the autocompletion list. It searches the list of words for the
- first that matches <code>select</code>. By default, comparisons are case sensitive, but you can
+ first that matches <code class="parameter">select</code>. By default, comparisons are case sensitive, but you can
change this with <a class="message"
href="#SCI_AUTOCSETIGNORECASE"><code>SCI_AUTOCSETIGNORECASE</code></a>. The match is character
- by character for the length of the <code>select</code> string. That is, if select is "Fred" it
+ by character for the length of the <code class="parameter">select</code> string. That is, if select is "Fred" it
will match "Frederick" if this is the first item in the list that begins with "Fred". If an
item is found, it is selected. If the item is not found, the autocompletion list closes if
auto-hide is true (see <a class="message"
href="#SCI_AUTOCSETAUTOHIDE"><code>SCI_AUTOCSETAUTOHIDE</code></a>).<br />
The current selection index can be retrieved with <code>SCI_AUTOCGETCURRENT</code>.</p>
- <p><b id="SCI_AUTOCGETCURRENTTEXT">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;, char *text NUL-terminated)</b><br />
+ <p><b id="SCI_AUTOCGETCURRENTTEXT">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;, char *text NUL-terminated) &rarr; int</b><br />
This message retrieves the current selected text in the autocompletion list. Normally the
<a class="message" href="#SCN_AUTOCSELECTION"><code>SCN_AUTOCSELECTION</code></a> notification
is used instead.</p>
- <p>The value is copied to the <code>text</code> buffer, returning the length (not including the
+ <p>The value is copied to the <code class="parameter">text</code> buffer, returning the length (not including the
terminating 0). If not found, an empty string is copied to the buffer and 0 is returned.</p>
<p>If the value argument is 0 then the length that should be allocated to store the value is
returned; again, the terminating 0 is not included.</p>
<p><b id="SCI_AUTOCSETCANCELATSTART">SCI_AUTOCSETCANCELATSTART(bool cancel)</b><br />
- <b id="SCI_AUTOCGETCANCELATSTART">SCI_AUTOCGETCANCELATSTART</b><br />
+ <b id="SCI_AUTOCGETCANCELATSTART">SCI_AUTOCGETCANCELATSTART &rarr; bool</b><br />
The default behaviour is for the list to be cancelled if the caret moves to the location it
was at when the list was displayed. By calling this message with a <code>false</code> argument,
the list is not cancelled until the caret moves at least one character before the word being
completed.</p>
- <p><b id="SCI_AUTOCSETFILLUPS">SCI_AUTOCSETFILLUPS(&lt;unused&gt;, const char *chars)</b><br />
+ <p><b id="SCI_AUTOCSETFILLUPS">SCI_AUTOCSETFILLUPS(&lt;unused&gt;, const char *characterSet)</b><br />
If a fillup character is typed with an autocompletion list active, the currently selected item
in the list is added into the document, then the fillup character is added. Common fillup
characters are '(', '[' and '.' but others are possible depending on the language. By default,
no fillup characters are set.</p>
<p><b id="SCI_AUTOCSETCHOOSESINGLE">SCI_AUTOCSETCHOOSESINGLE(bool chooseSingle)</b><br />
- <b id="SCI_AUTOCGETCHOOSESINGLE">SCI_AUTOCGETCHOOSESINGLE</b><br />
+ <b id="SCI_AUTOCGETCHOOSESINGLE">SCI_AUTOCGETCHOOSESINGLE &rarr; bool</b><br />
If you use <code>SCI_AUTOCSETCHOOSESINGLE(1)</code> and a list has only one item, it is
automatically added and no list is displayed. The default is to display the list even if there
is only a single item.</p>
<p><b id="SCI_AUTOCSETIGNORECASE">SCI_AUTOCSETIGNORECASE(bool ignoreCase)</b><br />
- <b id="SCI_AUTOCGETIGNORECASE">SCI_AUTOCGETIGNORECASE</b><br />
+ <b id="SCI_AUTOCGETIGNORECASE">SCI_AUTOCGETIGNORECASE &rarr; bool</b><br />
By default, matching of characters to list members is case sensitive. These messages let you
set and get case sensitivity.</p>
<p><b id="SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR">SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR(int behaviour)</b><br />
- <b id="SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR">SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR</b><br />
+ <b id="SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR">SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR &rarr; int</b><br />
When autocompletion is set to ignore case (<code>SCI_AUTOCSETIGNORECASE</code>), by default it will
nonetheless select the first list member that matches in a case sensitive way to entered characters.
This corresponds to a behaviour property of <code>SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE</code> (0).
If you want autocompletion to ignore case at all, choose <code>SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE</code> (1).</p>
<p><b id="SCI_AUTOCSETMULTI">SCI_AUTOCSETMULTI(int multi)</b><br />
- <b id="SCI_AUTOCGETMULTI">SCI_AUTOCGETMULTI</b><br />
+ <b id="SCI_AUTOCGETMULTI">SCI_AUTOCGETMULTI &rarr; int</b><br />
When autocompleting with multiple selections present, the autocompleted text can go into just the main selection with
<code>SC_MULTIAUTOC_ONCE</code> (0) or into each selection with <code>SC_MULTIAUTOC_EACH</code> (1).
The default is <code>SC_MULTIAUTOC_ONCE</code>.</p>
<p><b id="SCI_AUTOCSETORDER">SCI_AUTOCSETORDER(int order)</b><br />
- <b id="SCI_AUTOCGETORDER">SCI_AUTOCGETORDER</b><br />
+ <b id="SCI_AUTOCGETORDER">SCI_AUTOCGETORDER &rarr; int</b><br />
The default setting <code>SC_ORDER_PRESORTED</code> (0) requires that the list be provided in alphabetical sorted order.
</p>
<p>Sorting the list can be done by Scintilla instead of the application with <code>SC_ORDER_PERFORMSORT</code> (1).
@@ -4591,29 +4650,29 @@ struct Sci_TextToFind {
</p>
<p>Applications that wish to prioritize some values and show the list in order of priority instead
of alphabetical order can use <code>SC_ORDER_CUSTOM</code> (2).
- This requires extra processing in <a class="message" href="#SCI_AUTOCSHOW">SCI_AUTOCSHOW</a> to create a sorted index.
+ This requires extra processing in <a class="seealso" href="#SCI_AUTOCSHOW">SCI_AUTOCSHOW</a> to create a sorted index.
</p>
- <p>Setting the order should be done before calling <a class="message" href="#SCI_AUTOCSHOW">SCI_AUTOCSHOW</a>.
+ <p>Setting the order should be done before calling <a class="seealso" href="#SCI_AUTOCSHOW">SCI_AUTOCSHOW</a>.
</p>
<p><b id="SCI_AUTOCSETAUTOHIDE">SCI_AUTOCSETAUTOHIDE(bool autoHide)</b><br />
- <b id="SCI_AUTOCGETAUTOHIDE">SCI_AUTOCGETAUTOHIDE</b><br />
+ <b id="SCI_AUTOCGETAUTOHIDE">SCI_AUTOCGETAUTOHIDE &rarr; bool</b><br />
By default, the list is cancelled if there are no viable matches (the user has typed
characters that no longer match a list entry). If you want to keep displaying the original
- list, set <code>autoHide</code> to <code>false</code>. This also effects <a class="message"
+ list, set <code class="parameter">autoHide</code> to <code>false</code>. This also effects <a class="seealso"
href="#SCI_AUTOCSELECT"><code>SCI_AUTOCSELECT</code></a>.</p>
<p><b id="SCI_AUTOCSETDROPRESTOFWORD">SCI_AUTOCSETDROPRESTOFWORD(bool dropRestOfWord)</b><br />
- <b id="SCI_AUTOCGETDROPRESTOFWORD">SCI_AUTOCGETDROPRESTOFWORD</b><br />
+ <b id="SCI_AUTOCGETDROPRESTOFWORD">SCI_AUTOCGETDROPRESTOFWORD &rarr; bool</b><br />
When an item is selected, any word characters following the caret are first erased if
- <code>dropRestOfWord</code> is set <code>true</code>. The default is <code>false</code>.</p>
+ <code class="parameter">dropRestOfWord</code> is set <code>true</code>. The default is <code>false</code>.</p>
<p>
<b id="SCI_REGISTERIMAGE">SCI_REGISTERIMAGE(int type, const char *xpmData)</b><br />
<b id="SCI_REGISTERRGBAIMAGE">SCI_REGISTERRGBAIMAGE(int type, const char *pixels)</b><br />
<b id="SCI_CLEARREGISTEREDIMAGES">SCI_CLEARREGISTEREDIMAGES</b><br />
- <b id="SCI_AUTOCSETTYPESEPARATOR">SCI_AUTOCSETTYPESEPARATOR(char separatorCharacter)</b><br />
- <b id="SCI_AUTOCGETTYPESEPARATOR">SCI_AUTOCGETTYPESEPARATOR</b><br />
+ <b id="SCI_AUTOCSETTYPESEPARATOR">SCI_AUTOCSETTYPESEPARATOR(int separatorCharacter)</b><br />
+ <b id="SCI_AUTOCGETTYPESEPARATOR">SCI_AUTOCGETTYPESEPARATOR &rarr; int</b><br />
Autocompletion list items may display an image as well as text. Each image is first registered with an integer
type. Then this integer is included in the text of the list separated by a '?' from the text. For example,
@@ -4629,7 +4688,7 @@ struct Sci_TextToFind {
<p>
<b id="SCI_AUTOCSETMAXHEIGHT">SCI_AUTOCSETMAXHEIGHT(int rowCount)</b><br />
- <b id="SCI_AUTOCGETMAXHEIGHT">SCI_AUTOCGETMAXHEIGHT</b><br />
+ <b id="SCI_AUTOCGETMAXHEIGHT">SCI_AUTOCGETMAXHEIGHT &rarr; int</b><br />
Get or set the maximum number of rows that will be visible in an autocompletion list. If there are more rows in the list, then a vertical
scrollbar is shown. The default is 5.
@@ -4637,7 +4696,7 @@ struct Sci_TextToFind {
<p>
<b id="SCI_AUTOCSETMAXWIDTH">SCI_AUTOCSETMAXWIDTH(int characterCount)</b><br />
- <b id="SCI_AUTOCGETMAXWIDTH">SCI_AUTOCGETMAXWIDTH</b><br />
+ <b id="SCI_AUTOCGETMAXWIDTH">SCI_AUTOCGETMAXWIDTH &rarr; int</b><br />
Get or set the maximum width of an autocompletion list expressed as the number of characters in the longest item that will be totally visible.
If zero (the default) then the list's width is calculated to fit the item with the most characters. Any items that cannot be fully displayed within
@@ -4650,24 +4709,26 @@ struct Sci_TextToFind {
listed for autocompletion work on them; you cannot display a user list at the same time as an
autocompletion list is active. They differ in the following respects:</p>
+ <code><a class="message" href="#SCI_USERLISTSHOW">SCI_USERLISTSHOW(int listType, const char *itemList)</a><br /></code>
+
<p>o The <code><a class="message"
href="#SCI_AUTOCSETCHOOSESINGLE">SCI_AUTOCSETCHOOSESINGLE</a></code> message has no
effect.<br />
o When the user makes a selection you are sent a <code><a class="jump"
href="#SCN_USERLISTSELECTION">SCN_USERLISTSELECTION</a></code> <a class="jump"
href="#Notifications">notification message</a> rather than <code><a class="jump"
- href="#SCN_AUTOCSELECTION">SCN_AUTOCSELECTION</a></code>.<br>
+ href="#SCN_AUTOCSELECTION">SCN_AUTOCSELECTION</a></code>.</p>
<p>BEWARE: if you have set fillup characters or stop characters, these will still be active
with the user list, and may result in items being selected or the user list cancelled due to
the user typing into the editor.</p>
- <p><b id="SCI_USERLISTSHOW">SCI_USERLISTSHOW(int listType, const char *list)</b><br />
- The <code>listType</code> parameter is returned to the container as the <code>wParam</code>
+ <p><b id="SCI_USERLISTSHOW">SCI_USERLISTSHOW(int listType, const char *itemList)</b><br />
+ The <code class="parameter">listType</code> parameter is returned to the container as the <code>wParam</code>
field of the <a class="message" href="#SCNotification"><code>SCNotification</code></a>
structure. It must be greater than 0 as this is how Scintilla tells the difference between an
autocompletion list and a user list. If you have different types of list, for example a list of
- buffers and a list of macros, you can use <code>listType</code> to tell which one has returned
+ buffers and a list of macros, you can use <code class="parameter">listType</code> to tell which one has returned
a selection. </p>
<h2 id="CallTips">Call tips</h2>
@@ -4678,7 +4739,7 @@ struct Sci_TextToFind {
<code><a class="message" href="#StyleDefinition">STYLE_DEFAULT</a></code>. You can choose to
use <code><a class="message" href="#StyleDefinition">STYLE_CALLTIP</a></code> to define the
facename, size, foreground and background colours and character set with
- <code><a class="message" href="#SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE</a></code>.
+ <code><a class="seealso" href="#SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE</a></code>.
This also enables support for Tab characters.
There is some interaction between call tips and autocompletion lists in that showing a
@@ -4705,34 +4766,34 @@ struct Sci_TextToFind {
href="#SCN_DWELLEND">SCN_DWELLEND</a></code>. This method could be used in a debugger to give
the value of a variable, or during editing to give information about the word under the
pointer.</p>
- <code><a class="message" href="#SCI_CALLTIPSHOW">SCI_CALLTIPSHOW(int posStart, const char
+ <code><a class="message" href="#SCI_CALLTIPSHOW">SCI_CALLTIPSHOW(int pos, const char
*definition)</a><br />
<a class="message" href="#SCI_CALLTIPCANCEL">SCI_CALLTIPCANCEL</a><br />
- <a class="message" href="#SCI_CALLTIPACTIVE">SCI_CALLTIPACTIVE</a><br />
- <a class="message" href="#SCI_CALLTIPPOSSTART">SCI_CALLTIPPOSSTART</a><br />
+ <a class="message" href="#SCI_CALLTIPACTIVE">SCI_CALLTIPACTIVE &rarr; bool</a><br />
+ <a class="message" href="#SCI_CALLTIPPOSSTART">SCI_CALLTIPPOSSTART &rarr; position</a><br />
<a class="message" href="#SCI_CALLTIPSETPOSSTART">SCI_CALLTIPSETPOSSTART(int posStart)</a><br />
<a class="message" href="#SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(int highlightStart, int
highlightEnd)</a><br />
- <a class="message" href="#SCI_CALLTIPSETBACK">SCI_CALLTIPSETBACK(int colour)</a><br />
- <a class="message" href="#SCI_CALLTIPSETFORE">SCI_CALLTIPSETFORE(int colour)</a><br />
- <a class="message" href="#SCI_CALLTIPSETFOREHLT">SCI_CALLTIPSETFOREHLT(int colour)</a><br />
- <a class="message" href="#SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE(int tabsize)</a><br />
+ <a class="message" href="#SCI_CALLTIPSETBACK">SCI_CALLTIPSETBACK(colour back)</a><br />
+ <a class="message" href="#SCI_CALLTIPSETFORE">SCI_CALLTIPSETFORE(colour fore)</a><br />
+ <a class="message" href="#SCI_CALLTIPSETFOREHLT">SCI_CALLTIPSETFOREHLT(colour fore)</a><br />
+ <a class="message" href="#SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE(int tabSize)</a><br />
<a class="message" href="#SCI_CALLTIPSETPOSITION">SCI_CALLTIPSETPOSITION(bool above)</a><br />
</code>
- <p><b id="SCI_CALLTIPSHOW">SCI_CALLTIPSHOW(int posStart, const char *definition)</b><br />
+ <p><b id="SCI_CALLTIPSHOW">SCI_CALLTIPSHOW(int pos, const char *definition)</b><br />
This message starts the process by displaying the call tip window. If a call tip is already
active, this has no effect.<br />
- <code>posStart</code> is the position in the document at which to align the call tip. The call
+ <code class="parameter">pos</code> is the position in the document at which to align the call tip. The call
tip text is aligned to start 1 line below this character unless you have included up and/or
down arrows in the call tip text in which case the tip is aligned to the right-hand edge of
the rightmost arrow. The assumption is that you will start the text with something like
"\001 1 of 3 \002".<br />
- <code>definition</code> is the call tip text. This can contain multiple lines separated by
+ <code class="parameter">definition</code> is the call tip text. This can contain multiple lines separated by
'\n' (Line Feed, ASCII code 10) characters. Do not include '\r' (Carriage Return, ASCII
code 13), as this will most likely print as an empty box. '\t' (Tab, ASCII code 9) is
supported if you set a tabsize with
- <code><a class="message" href="#SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE</a></code>.<br />
+ <code><a class="seealso" href="#SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE</a></code>.<br />
The position of the caret is remembered here so that the call tip can be cancelled automatically if subsequent deletion
moves the caret before this position.</p>
@@ -4742,19 +4803,20 @@ struct Sci_TextToFind {
function.
Call tips are cancelled if you delete back past the position where the caret was when the tip was triggered.</p>
- <p><b id="SCI_CALLTIPACTIVE">SCI_CALLTIPACTIVE</b><br />
+ <p><b id="SCI_CALLTIPACTIVE">SCI_CALLTIPACTIVE &rarr; bool</b><br />
This returns 1 if a call tip is active and 0 if it is not active.</p>
- <p><b id="SCI_CALLTIPPOSSTART">SCI_CALLTIPPOSSTART</b><br />
+ <p><b id="SCI_CALLTIPPOSSTART">SCI_CALLTIPPOSSTART &rarr; position</b><br />
<b id="SCI_CALLTIPSETPOSSTART">SCI_CALLTIPSETPOSSTART(int posStart)</b><br />
This message returns or sets the value of the current position when <code>SCI_CALLTIPSHOW</code>
started to display the tip.</p>
- <p><b id="SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(int hlStart, int hlEnd)</b><br />
+ <p><b id="SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(int highlightStart, int highlightEnd)</b><br />
This sets the region of the call tips text to display in a highlighted style.
- <code>hlStart</code> is the zero-based index into the string of the first character to
- highlight and <code>hlEnd</code> is the index of the first character after the highlight.
- <code>hlEnd</code> must be greater than <code>hlStart</code>; <code>hlEnd-hlStart</code> is the
+ <code class="parameter">highlightStart</code> is the zero-based index into the string of the first character to
+ highlight and <code class="parameter">highlightEnd</code> is the index of the first character after the highlight.
+ <code class="parameter">highlightEnd</code> must be greater than <code class="parameter">highlightStart</code>;
+ <code>highlightEnd-highlightStart</code> is the
number of characters to highlight. Highlights can extend over line ends if this is
required.</p>
@@ -4765,23 +4827,23 @@ struct Sci_TextToFind {
<code>SCI_CALLTIPSETFOREHLT</code>.
</p>
- <p><b id="SCI_CALLTIPSETBACK">SCI_CALLTIPSETBACK(int colour)</b><br />
+ <p><b id="SCI_CALLTIPSETBACK">SCI_CALLTIPSETBACK(<a class="jump" href="#colour">colour</a> back)</b><br />
The background colour of call tips can be set with this message; the default colour is white.
It is not a good idea to set a dark colour as the background as the default colour for normal
calltip text is mid grey and the default colour for highlighted text is dark blue. This also
sets the background colour of <code>STYLE_CALLTIP</code>.</p>
- <p><b id="SCI_CALLTIPSETFORE">SCI_CALLTIPSETFORE(int colour)</b><br />
+ <p><b id="SCI_CALLTIPSETFORE">SCI_CALLTIPSETFORE(<a class="jump" href="#colour">colour</a> fore)</b><br />
The colour of call tip text can be set with this message; the default colour is mid grey.
This also sets the foreground colour of <code>STYLE_CALLTIP</code>.</p>
- <p><b id="SCI_CALLTIPSETFOREHLT">SCI_CALLTIPSETFOREHLT(int colour)</b><br />
+ <p><b id="SCI_CALLTIPSETFOREHLT">SCI_CALLTIPSETFOREHLT(<a class="jump" href="#colour">colour</a> fore)</b><br />
The colour of highlighted call tip text can be set with this message; the default colour
is dark blue.</p>
- <p><b id="SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE(int tabsize)</b><br />
+ <p><b id="SCI_CALLTIPUSESTYLE">SCI_CALLTIPUSESTYLE(int tabSize)</b><br />
This message changes the style used for call tips from <code>STYLE_DEFAULT</code> to
- <code>STYLE_CALLTIP</code> and sets a tab size in screen pixels. If <code>tabsize</code> is
+ <code>STYLE_CALLTIP</code> and sets a tab size in screen pixels. If <code class="parameter">tabsize</code> is
less than 1, Tab characters are not treated specially. Once this call has been used, the
call tip foreground and background colours are also taken from the style.</p>
@@ -5049,6 +5111,9 @@ struct Sci_TextToFind {
<p>The <code>SCI_WORDPART*</code> commands are used to move between word segments marked by
capitalisation (aCamelCaseIdentifier) or underscores (an_under_bar_ident).</p>
+ <p>The <code>SCI_WORD[LEFT|RIGHT]END*</code> commands are
+ similar to <code>SCI_WORD[LEFT|RIGHT]*</code> but move between word ends instead of word starts.</p>
+
<p>The <code>SCI_HOME*</code> commands move the caret to the start of the line, while the
<code>SCI_VCHOME*</code> commands move the caret to the first non-blank character of the line
(ie. just after the indentation) unless it is already there; in this case, it acts as SCI_HOME*.</p>
@@ -5117,7 +5182,7 @@ struct Sci_TextToFind {
<p><b id="SCI_ASSIGNCMDKEY">SCI_ASSIGNCMDKEY(int <a class="jump"
href="#keyDefinition">keyDefinition</a>, int sciCommand)</b><br />
This assigns the given key definition to a Scintilla command identified by
- <code>sciCommand</code>. <code>sciCommand</code> can be any <code>SCI_*</code> command that has
+ <code class="parameter">sciCommand</code>. <code class="parameter">sciCommand</code> can be any <code>SCI_*</code> command that has
no arguments.</p>
<p><b id="SCI_CLEARCMDKEY">SCI_CLEARCMDKEY(int <a class="jump"
@@ -5135,7 +5200,10 @@ struct Sci_TextToFind {
<h2 id="PopupEditMenu">Popup edit menu</h2>
- <p><b id="SCI_USEPOPUP">SCI_USEPOPUP(bool bEnablePopup)</b><br />
+ <code><a class="message" href="#SCI_USEPOPUP">SCI_USEPOPUP(bool allowPopUp)</a><br />
+ </code>
+
+ <p><b id="SCI_USEPOPUP">SCI_USEPOPUP(bool allowPopUp)</b><br />
Clicking the wrong button on the mouse pops up a short default editing menu. This may be
turned off with <code>SCI_USEPOPUP(0)</code>. If you turn it off, context menu commands (in
Windows, <code>WM_CONTEXTMENU</code>) will not be handled by Scintilla, so the parent of the
@@ -5148,6 +5216,10 @@ struct Sci_TextToFind {
<a class="jump" href="#Notifications">notifications</a>. It is then up to the container to
record these actions for future replay.</p>
+ <code><a class="message" href="#SCI_STARTRECORD">SCI_STARTRECORD</a><br />
+ <a class="message" href="#SCI_STOPRECORD">SCI_STOPRECORD</a><br />
+ </code>
+
<p><b id="SCI_STARTRECORD">SCI_STARTRECORD</b><br />
<b id="SCI_STOPRECORD">SCI_STOPRECORD</b><br />
These two messages turn macro recording on and off.</p>
@@ -5163,25 +5235,24 @@ struct Sci_TextToFind {
<code>HDC</code>s., on GTK+ 3.x <code>cairo_t *</code>,
and on Cocoa <code>CGContextRef</code> is used.</p>
- <code><a class="message" href="#SCI_FORMATRANGE">SCI_FORMATRANGE(bool bDraw, Sci_RangeToFormat
- *pfr)</a><br />
+ <code><a class="message" href="#SCI_FORMATRANGE">SCI_FORMATRANGE(bool draw, Sci_RangeToFormat *fr) &rarr; position</a><br />
<a class="message" href="#SCI_SETPRINTMAGNIFICATION">SCI_SETPRINTMAGNIFICATION(int
magnification)</a><br />
- <a class="message" href="#SCI_GETPRINTMAGNIFICATION">SCI_GETPRINTMAGNIFICATION</a><br />
+ <a class="message" href="#SCI_GETPRINTMAGNIFICATION">SCI_GETPRINTMAGNIFICATION &rarr; int</a><br />
<a class="message" href="#SCI_SETPRINTCOLOURMODE">SCI_SETPRINTCOLOURMODE(int mode)</a><br />
- <a class="message" href="#SCI_GETPRINTCOLOURMODE">SCI_GETPRINTCOLOURMODE</a><br />
- <a class="message" href="#SCI_SETPRINTWRAPMODE">SCI_SETPRINTWRAPMODE</a><br />
- <a class="message" href="#SCI_GETPRINTWRAPMODE">SCI_GETPRINTWRAPMODE</a><br />
+ <a class="message" href="#SCI_GETPRINTCOLOURMODE">SCI_GETPRINTCOLOURMODE &rarr; int</a><br />
+ <a class="message" href="#SCI_SETPRINTWRAPMODE">SCI_SETPRINTWRAPMODE(int wrapMode)</a><br />
+ <a class="message" href="#SCI_GETPRINTWRAPMODE">SCI_GETPRINTWRAPMODE &rarr; int</a><br />
</code>
- <p><b id="SCI_FORMATRANGE">SCI_FORMATRANGE(bool bDraw, Sci_RangeToFormat *pfr)</b><br />
+ <p><b id="SCI_FORMATRANGE">SCI_FORMATRANGE(bool draw, Sci_RangeToFormat *fr) &rarr; position</b><br />
This call renders a range of text into a device context. If you use
this for printing, you will probably want to arrange a page header and footer; Scintilla does
not do this for you. See <code>SciTEWin::Print()</code> in <code>SciTEWinDlg.cxx</code> for an
example. Each use of this message renders a range of text into a rectangular area and returns
the position in the document of the next character to print.</p>
- <p><code>bDraw</code> controls if any output is done. Set this to false if you are paginating
+ <p><code class="parameter">draw</code> controls if any output is done. Set this to false if you are paginating
(for example, if you use this with MFC you will need to paginate in
<code>OnBeginPrinting()</code> before you output each page.</p>
<pre>
@@ -5207,9 +5278,9 @@ struct Sci_RangeToFormat {
<code>chrg.cpMin</code> and <code>chrg.cpMax</code> define the start position and maximum
position of characters to output. All of each line within this character range is drawn.</p>
- <p>On Cocoa, the surface IDs for printing (<code>bDraw=1</code>) should be the graphics port of the current context
+ <p>On Cocoa, the surface IDs for printing (<code>draw=1</code>) should be the graphics port of the current context
(<code>(CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]</code>) when the view's drawRect method is called.
- The Surface IDs are not really used for measurement (<code>bDraw=0</code>) but can be set
+ The Surface IDs are not really used for measurement (<code>draw=0</code>) but can be set
to a bitmap context (created with <code>CGBitmapContextCreate</code>) to avoid runtime warnings.</p>
<p>On GTK+, the surface IDs to use can be found from the printing context with
@@ -5225,14 +5296,14 @@ struct Sci_RangeToFormat {
area, header and footer code.</p>
<p><b id="SCI_SETPRINTMAGNIFICATION">SCI_SETPRINTMAGNIFICATION(int magnification)</b><br />
- <b id="SCI_GETPRINTMAGNIFICATION">SCI_GETPRINTMAGNIFICATION</b><br />
+ <b id="SCI_GETPRINTMAGNIFICATION">SCI_GETPRINTMAGNIFICATION &rarr; int</b><br />
<code>SCI_GETPRINTMAGNIFICATION</code> lets you to print at a different size than the screen
- font. <code>magnification</code> is the number of points to add to the size of each screen
+ font. <code class="parameter">magnification</code> is the number of points to add to the size of each screen
font. A value of -3 or -4 gives reasonably small print. You can get this value with
<code>SCI_GETPRINTMAGNIFICATION</code>.</p>
<p><b id="SCI_SETPRINTCOLOURMODE">SCI_SETPRINTCOLOURMODE(int mode)</b><br />
- <b id="SCI_GETPRINTCOLOURMODE">SCI_GETPRINTCOLOURMODE</b><br />
+ <b id="SCI_GETPRINTCOLOURMODE">SCI_GETPRINTCOLOURMODE &rarr; int</b><br />
These two messages set and get the method used to render coloured text on a printer that is
probably using white paper. It is especially important to consider the treatment of colour if
you use a dark or black screen background. Printing white on black uses up toner and ink very
@@ -5295,8 +5366,8 @@ struct Sci_RangeToFormat {
</table>
<p><b id="SCI_SETPRINTWRAPMODE">SCI_SETPRINTWRAPMODE(int wrapMode)</b><br />
- <b id="SCI_GETPRINTWRAPMODE">SCI_GETPRINTWRAPMODE</b><br />
- These two functions get and set the printer wrap mode. <code>wrapMode</code> can be
+ <b id="SCI_GETPRINTWRAPMODE">SCI_GETPRINTWRAPMODE &rarr; int</b><br />
+ These two functions get and set the printer wrap mode. <code class="parameter">wrapMode</code> can be
set to <code>SC_WRAP_NONE</code> (0), <code>SC_WRAP_WORD</code> (1) or
<code>SC_WRAP_CHAR</code> (2). The default is
<code>SC_WRAP_WORD</code>, which wraps printed output so that all characters fit
@@ -5310,11 +5381,11 @@ struct Sci_RangeToFormat {
between words.</p>
<h2 id="DirectAccess">Direct access</h2>
- <code><a class="message" href="#SCI_GETDIRECTFUNCTION">SCI_GETDIRECTFUNCTION</a><br />
- <a class="message" href="#SCI_GETDIRECTPOINTER">SCI_GETDIRECTPOINTER</a><br />
- <a class="message" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a><br />
- <a class="message" href="#SCI_GETRANGEPOINTER">SCI_GETRANGEPOINTER(int position, int rangeLength)</a><br />
- <a class="message" href="#SCI_GETGAPPOSITION">SCI_GETGAPPOSITION</a><br />
+ <code><a class="message" href="#SCI_GETDIRECTFUNCTION">SCI_GETDIRECTFUNCTION &rarr; int</a><br />
+ <a class="message" href="#SCI_GETDIRECTPOINTER">SCI_GETDIRECTPOINTER &rarr; int</a><br />
+ <a class="message" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER &rarr; int</a><br />
+ <a class="message" href="#SCI_GETRANGEPOINTER">SCI_GETRANGEPOINTER(int start, int lengthRange) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETGAPPOSITION">SCI_GETGAPPOSITION &rarr; position</a><br />
</code>
<p>On Windows, the message-passing scheme used to communicate between the container and
@@ -5334,7 +5405,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</pre>
<p><code>SciFnDirect</code>, <code>sptr_t</code> and <code>uptr_t</code> are declared in
- <code>Scintilla.h</code>. <code>hSciWnd</code> is the window handle returned when you created
+ <code>Scintilla.h</code>. <code class="parameter">hSciWnd</code> is the window handle returned when you created
the Scintilla window.</p>
<p>While faster, this direct calling will cause problems if performed from a different thread
@@ -5349,19 +5420,19 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<code>SCI_GETDIRECTFUNCTION</code> and the need to call Scintilla indirectly via the function
pointer.</p>
- <p><b id="SCI_GETDIRECTFUNCTION">SCI_GETDIRECTFUNCTION</b><br />
+ <p><b id="SCI_GETDIRECTFUNCTION">SCI_GETDIRECTFUNCTION &rarr; int</b><br />
This message returns the address of the function to call to handle Scintilla messages without
the overhead of passing through the Windows messaging system. You need only call this once,
regardless of the number of Scintilla windows you create.</p>
- <p><b id="SCI_GETDIRECTPOINTER">SCI_GETDIRECTPOINTER</b><br />
+ <p><b id="SCI_GETDIRECTPOINTER">SCI_GETDIRECTPOINTER &rarr; int</b><br />
This returns a pointer to data that identifies which Scintilla window is in use. You must call
this once for each Scintilla window you create. When you call the direct function, you must
pass in the direct pointer associated with the target window.</p>
- <p><b id="SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</b><br />
- <b id="SCI_GETRANGEPOINTER">SCI_GETRANGEPOINTER(int position, int rangeLength)</b><br />
- <b id="SCI_GETGAPPOSITION">SCI_GETGAPPOSITION</b><br />
+ <p><b id="SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER &rarr; int</b><br />
+ <b id="SCI_GETRANGEPOINTER">SCI_GETRANGEPOINTER(int start, int lengthRange) &rarr; int</b><br />
+ <b id="SCI_GETGAPPOSITION">SCI_GETGAPPOSITION &rarr; position</b><br />
Grant temporary direct read-only access to the memory used by Scintilla to store
the document.</p>
<p><code>SCI_GETCHARACTERPOINTER</code> moves the gap within Scintilla so that the
@@ -5402,35 +5473,35 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
documents in a single Scintilla window and so you can display a single document in multiple
windows (for use with splitter windows).</p>
- <p>Although these messages use <code>document *pDoc</code>, to ensure compatibility with future
- releases of Scintilla you should treat <code>pDoc</code> as an opaque <code>void*</code>. That
+ <p>Although these messages use <code>document *doc</code>, to ensure compatibility with future
+ releases of Scintilla you should treat <code class="parameter">doc</code> as an opaque <code>void*</code>. That
is, you can use and store the pointer as described in this section but you should not
dereference it.</p>
- <code><a class="message" href="#SCI_GETDOCPOINTER">SCI_GETDOCPOINTER</a><br />
+ <code><a class="message" href="#SCI_GETDOCPOINTER">SCI_GETDOCPOINTER &rarr; document *</a><br />
<a class="message" href="#SCI_SETDOCPOINTER">SCI_SETDOCPOINTER(&lt;unused&gt;, document
- *pDoc)</a><br />
- <a class="message" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT</a><br />
+ *doc)</a><br />
+ <a class="message" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT &rarr; document *</a><br />
<a class="message" href="#SCI_ADDREFDOCUMENT">SCI_ADDREFDOCUMENT(&lt;unused&gt;, document
- *pDoc)</a><br />
+ *doc)</a><br />
<a class="message" href="#SCI_RELEASEDOCUMENT">SCI_RELEASEDOCUMENT(&lt;unused&gt;, document
- *pDoc)</a><br />
+ *doc)</a><br />
</code>
- <p><b id="SCI_GETDOCPOINTER">SCI_GETDOCPOINTER</b><br />
+ <p><b id="SCI_GETDOCPOINTER">SCI_GETDOCPOINTER &rarr; document *</b><br />
This returns a pointer to the document currently in use by the window. It has no other
effect.</p>
- <p><b id="SCI_SETDOCPOINTER">SCI_SETDOCPOINTER(&lt;unused&gt;, document *pDoc)</b><br />
+ <p><b id="SCI_SETDOCPOINTER">SCI_SETDOCPOINTER(&lt;unused&gt;, document *doc)</b><br />
This message does the following:<br />
1. It removes the current window from the list held by the current document.<br />
2. It reduces the reference count of the current document by 1.<br />
3. If the reference count reaches 0, the document is deleted.<br />
- 4. <code>pDoc</code> is set as the new document for the window.<br />
- 5. If <code>pDoc</code> was 0, a new, empty document is created and attached to the
+ 4. <code class="parameter">doc</code> is set as the new document for the window.<br />
+ 5. If <code class="parameter">doc</code> was 0, a new, empty document is created and attached to the
window.<br />
- 6. If <code>pDoc</code> was not 0, its reference count is increased by 1.</p>
+ 6. If <code class="parameter">doc</code> was not 0, its reference count is increased by 1.</p>
- <p><b id="SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT</b><br />
+ <p><b id="SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT &rarr; document *</b><br />
This message creates a new, empty document and returns a pointer to it. This document is not
selected into the editor and starts with a reference count of 1. This means that you have
ownership of it and must either reduce its reference count by 1 after using
@@ -5438,18 +5509,18 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
you reduce the reference count by 1 with <code>SCI_RELEASEDOCUMENT</code> before you close the
application to avoid memory leaks.</p>
- <p><b id="SCI_ADDREFDOCUMENT">SCI_ADDREFDOCUMENT(&lt;unused&gt;, document *pDoc)</b><br />
+ <p><b id="SCI_ADDREFDOCUMENT">SCI_ADDREFDOCUMENT(&lt;unused&gt;, document *doc)</b><br />
This increases the reference count of a document by 1. If you want to replace the current
document in the Scintilla window and take ownership of the current document, for example if you
are editing many documents in one window, do the following:<br />
1. Use <code>SCI_GETDOCPOINTER</code> to get a pointer to the document,
- <code>pDoc</code>.<br />
- 2. Use <code>SCI_ADDREFDOCUMENT(0, pDoc)</code> to increment the reference count.<br />
- 3. Use <code>SCI_SETDOCPOINTER(0, pNewDoc)</code> to set a different document or
+ <code class="parameter">doc</code>.<br />
+ 2. Use <code>SCI_ADDREFDOCUMENT(0, doc)</code> to increment the reference count.<br />
+ 3. Use <code>SCI_SETDOCPOINTER(0, docNew)</code> to set a different document or
<code>SCI_SETDOCPOINTER(0, 0)</code> to set a new, empty document.</p>
- <p><b id="SCI_RELEASEDOCUMENT">SCI_RELEASEDOCUMENT(&lt;unused&gt;, document *pDoc)</b><br />
- This message reduces the reference count of the document identified by <code>pDoc</code>. pDoc
+ <p><b id="SCI_RELEASEDOCUMENT">SCI_RELEASEDOCUMENT(&lt;unused&gt;, document *doc)</b><br />
+ This message reduces the reference count of the document identified by <code class="parameter">doc</code>. doc
must be the result of <code>SCI_GETDOCPOINTER</code> or <code>SCI_CREATEDOCUMENT</code> and
must point at a document that still exists. If you call this on a document with a reference
count of 1 that is still attached to a Scintilla window, bad things will happen. To keep the
@@ -5463,16 +5534,19 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<h3 id="BackgroundLoad">Loading in the background</h3>
+ <code><a class="message" href="#SCI_CREATELOADER">SCI_CREATELOADER(int bytes) &rarr; int</a><br />
+ </code>
+
<p>An application can load all of a file into a buffer it allocates on a background thread and then add the data in that buffer
into a Scintilla document on the user interface thread. That technique uses extra memory to store a complete copy of the
file and also means that the time that Scintilla takes to perform initial line end discovery blocks the user interface.</p>
<p>To avoid these issues, a loader object may be created and used to load the file. The loader object supports the ILoader interface.</p>
- <p><b id="SCI_CREATELOADER">SCI_CREATELOADER(int bytes)</b><br />
+ <p><b id="SCI_CREATELOADER">SCI_CREATELOADER(int bytes) &rarr; int</b><br />
Create an object that supports the <code>ILoader</code> interface which can be used to load data and then
be turned into a Scintilla document object for attachment to a view object.
- The <code>bytes</code> argument determines the initial memory allocation for the document as it is more efficient
+ The <code class="parameter">bytes</code> argument determines the initial memory allocation for the document as it is more efficient
to allocate once rather than rely on the buffer growing as data is added.
If <code>SCI_CREATELOADER</code> fails then 0 is returned.</p>
@@ -5494,14 +5568,14 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
the <code>Release</code> call.
When the whole file has been read, the <code>ConvertToDocument</code> method should be called to produce a Scintilla
document pointer which can be used in the same way as a document pointer returned from
- <a class="message" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT</a>.
+ <a class="seealso" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT</a>.
There is no need to call <code>Release</code> after <code>ConvertToDocument</code>.</p>
<h3 id="BackgroundSave">Saving in the background</h3>
<p>An application that wants to save in the background should lock the document with <code>SCI_SETREADONLY(1)</code>
to prevent modifications and retrieve a pointer to the unified document contents with
- <a class="message" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a>.
+ <a class="seealso" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a>.
The buffer of a locked document will not move so the pointer is valid until the application calls <code>SCI_SETREADONLY(0)</code>.</p>
<p>If the user tries to performs a modification while the document is locked then a <code><a class="message"
@@ -5526,25 +5600,23 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
markers and a folding margin to complete your folding implementation.
The <code>"fold"</code> property should be set to <code>"1"</code> with
<code>SCI_SETPROPERTY("fold", "1")</code> to enable folding. </p>
- <code><a class="message" href="#SCI_VISIBLEFROMDOCLINE">SCI_VISIBLEFROMDOCLINE(int
- docLine)</a><br />
- <a class="message" href="#SCI_DOCLINEFROMVISIBLE">SCI_DOCLINEFROMVISIBLE(int
- displayLine)</a><br />
+ <code><a class="message" href="#SCI_VISIBLEFROMDOCLINE">SCI_VISIBLEFROMDOCLINE(int docLine) &rarr; int</a><br />
+ <a class="message" href="#SCI_DOCLINEFROMVISIBLE">SCI_DOCLINEFROMVISIBLE(int displayLine) &rarr; int</a><br />
<a class="message" href="#SCI_SHOWLINES">SCI_SHOWLINES(int lineStart, int lineEnd)</a><br />
<a class="message" href="#SCI_HIDELINES">SCI_HIDELINES(int lineStart, int lineEnd)</a><br />
- <a class="message" href="#SCI_GETLINEVISIBLE">SCI_GETLINEVISIBLE(int line)</a><br />
- <a class="message" href="#SCI_GETALLLINESVISIBLE">SCI_GETALLLINESVISIBLE</a><br />
+ <a class="message" href="#SCI_GETLINEVISIBLE">SCI_GETLINEVISIBLE(int line) &rarr; bool</a><br />
+ <a class="message" href="#SCI_GETALLLINESVISIBLE">SCI_GETALLLINESVISIBLE &rarr; bool</a><br />
<a class="message" href="#SCI_SETFOLDLEVEL">SCI_SETFOLDLEVEL(int line, int level)</a><br />
- <a class="message" href="#SCI_GETFOLDLEVEL">SCI_GETFOLDLEVEL(int line)</a><br />
+ <a class="message" href="#SCI_GETFOLDLEVEL">SCI_GETFOLDLEVEL(int line) &rarr; int</a><br />
<a class="message" href="#SCI_SETAUTOMATICFOLD">SCI_SETAUTOMATICFOLD(int automaticFold)</a><br />
- <a class="message" href="#SCI_GETAUTOMATICFOLD">SCI_GETAUTOMATICFOLD</a><br />
+ <a class="message" href="#SCI_GETAUTOMATICFOLD">SCI_GETAUTOMATICFOLD &rarr; int</a><br />
<a class="message" href="#SCI_SETFOLDFLAGS">SCI_SETFOLDFLAGS(int flags)</a><br />
- <a class="message" href="#SCI_GETLASTCHILD">SCI_GETLASTCHILD(int line, int level)</a><br />
- <a class="message" href="#SCI_GETFOLDPARENT">SCI_GETFOLDPARENT(int line)</a><br />
+ <a class="message" href="#SCI_GETLASTCHILD">SCI_GETLASTCHILD(int line, int level) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETFOLDPARENT">SCI_GETFOLDPARENT(int line) &rarr; int</a><br />
<a class="message" href="#SCI_SETFOLDEXPANDED">SCI_SETFOLDEXPANDED(int line, bool
expanded)</a><br />
- <a class="message" href="#SCI_GETFOLDEXPANDED">SCI_GETFOLDEXPANDED(int line)</a><br />
- <a class="message" href="#SCI_CONTRACTEDFOLDNEXT">SCI_CONTRACTEDFOLDNEXT(int lineStart)</a><br />
+ <a class="message" href="#SCI_GETFOLDEXPANDED">SCI_GETFOLDEXPANDED(int line) &rarr; bool</a><br />
+ <a class="message" href="#SCI_CONTRACTEDFOLDNEXT">SCI_CONTRACTEDFOLDNEXT(int lineStart) &rarr; int</a><br />
<a class="message" href="#SCI_TOGGLEFOLD">SCI_TOGGLEFOLD(int line)</a><br />
<a class="message" href="#SCI_FOLDLINE">SCI_FOLDLINE(int line, int action)</a><br />
<a class="message" href="#SCI_FOLDCHILDREN">SCI_FOLDCHILDREN(int line, int action)</a><br />
@@ -5555,30 +5627,30 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
line)</a><br />
</code>
- <p><b id="SCI_VISIBLEFROMDOCLINE">SCI_VISIBLEFROMDOCLINE(int docLine)</b><br />
+ <p><b id="SCI_VISIBLEFROMDOCLINE">SCI_VISIBLEFROMDOCLINE(int docLine) &rarr; int</b><br />
When some lines are hidden and/or annotations are displayed, then a particular line in the
document may be displayed at a
different position to its document position. If no lines are hidden and there are no annotations,
this message returns
- <code>docLine</code>. Otherwise, this returns the display line (counting the very first visible
+ <code class="parameter">docLine</code>. Otherwise, this returns the display line (counting the very first visible
line as 0). The display line of an invisible line is the same as the previous visible line. The
display line number of the first line in the document is 0. If lines are hidden and
- <code>docLine</code> is outside the range of lines in the document, the return value is -1.
+ <code class="parameter">docLine</code> is outside the range of lines in the document, the return value is -1.
Lines can occupy more than one display line if they wrap.</p>
- <p><b id="SCI_DOCLINEFROMVISIBLE">SCI_DOCLINEFROMVISIBLE(int displayLine)</b><br />
+ <p><b id="SCI_DOCLINEFROMVISIBLE">SCI_DOCLINEFROMVISIBLE(int displayLine) &rarr; int</b><br />
When some lines are hidden and/or annotations are displayed, then a particular line in the
document may be displayed at a
different position to its document position. This message returns the document line number that
corresponds to a display line (counting the display line of the first line in the document as
- 0). If <code>displayLine</code> is less than or equal to 0, the result is 0. If
- <code>displayLine</code> is greater than or equal to the number of displayed lines, the result
+ 0). If <code class="parameter">displayLine</code> is less than or equal to 0, the result is 0. If
+ <code class="parameter">displayLine</code> is greater than or equal to the number of displayed lines, the result
is the number of lines in the document.</p>
<p><b id="SCI_SHOWLINES">SCI_SHOWLINES(int lineStart, int lineEnd)</b><br />
<b id="SCI_HIDELINES">SCI_HIDELINES(int lineStart, int lineEnd)</b><br />
- <b id="SCI_GETLINEVISIBLE">SCI_GETLINEVISIBLE(int line)</b><br />
- <b id="SCI_GETALLLINESVISIBLE">SCI_GETALLLINESVISIBLE</b><br />
+ <b id="SCI_GETLINEVISIBLE">SCI_GETLINEVISIBLE(int line) &rarr; bool</b><br />
+ <b id="SCI_GETALLLINESVISIBLE">SCI_GETALLLINESVISIBLE &rarr; bool</b><br />
The first two messages mark a range of lines as visible or invisible and then redraw the
display.
<code>SCI_GETLINEVISIBLE</code> reports on the visible state of a line and returns 1 if it is
@@ -5589,11 +5661,11 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
flags. The first line can not be hidden.</p>
<p><b id="SCI_SETFOLDLEVEL">SCI_SETFOLDLEVEL(int line, int level)</b><br />
- <b id="SCI_GETFOLDLEVEL">SCI_GETFOLDLEVEL(int line)</b><br />
+ <b id="SCI_GETFOLDLEVEL">SCI_GETFOLDLEVEL(int line) &rarr; int</b><br />
These two messages set and get a 32-bit value that contains the fold level of a line and some
flags associated with folding. The fold level is a number in the range 0 to
- <code>SC_FOLDLEVELNUMBERMASK</code> (4095). However, the initial fold level is set to
- <code>SC_FOLDLEVELBASE</code> (1024) to allow unsigned arithmetic on folding levels. There are
+ <code>SC_FOLDLEVELNUMBERMASK</code> (0x0FFF). However, the initial fold level is set to
+ <code>SC_FOLDLEVELBASE</code> (0x400) to allow unsigned arithmetic on folding levels. There are
two addition flag bits. <code>SC_FOLDLEVELWHITEFLAG</code> indicates that the line is blank and
allows it to be treated slightly different then its level may indicate. For example, blank
lines should generally not be fold points and will be considered part of the preceding section even though
@@ -5615,7 +5687,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
In addition to showing markers in the folding margin, you can indicate folds to the user by
drawing lines in the text area. The lines are drawn in the foreground colour set for <a
class="message" href="#StyleDefinition"><code>STYLE_DEFAULT</code></a>. Bits set in
- <code>flags</code> determine where folding lines are drawn:<br />
+ <code class="parameter">flags</code> determine where folding lines are drawn:<br />
</p>
<table cellpadding="1" cellspacing="2" border="0" summary="Fold flags">
@@ -5682,18 +5754,18 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p>This message causes the display to redraw.</p>
- <p><b id="SCI_GETLASTCHILD">SCI_GETLASTCHILD(int startLine, int level)</b><br />
- This message searches for the next line after <code>startLine</code>, that has a folding level
- that is less than or equal to <code>level</code> and then returns the previous line number. If
- you set <code>level</code> to -1, <code>level</code> is set to the folding level of line
- <code>startLine</code>. If <code>from</code> is a fold point, <code>SCI_GETLASTCHILD(from,
+ <p><b id="SCI_GETLASTCHILD">SCI_GETLASTCHILD(int line, int level) &rarr; int</b><br />
+ This message searches for the next line after <code class="parameter">line</code>, that has a folding level
+ that is less than or equal to <code class="parameter">level</code> and then returns the previous line number. If
+ you set <code class="parameter">level</code> to -1, <code class="parameter">level</code> is set to the folding level of line
+ <code class="parameter">line</code>. If <code>from</code> is a fold point, <code>SCI_GETLASTCHILD(from,
-1)</code> returns the last line that would be in made visible or hidden by toggling the fold
state.</p>
- <p><b id="SCI_GETFOLDPARENT">SCI_GETFOLDPARENT(int startLine)</b><br />
- This message returns the line number of the first line before <code>startLine</code> that is
+ <p><b id="SCI_GETFOLDPARENT">SCI_GETFOLDPARENT(int line) &rarr; int</b><br />
+ This message returns the line number of the first line before <code class="parameter">line</code> that is
marked as a fold point with <code>SC_FOLDLEVELHEADERFLAG</code> and has a fold level less than
- the <code>startLine</code>. If no line is found, or if the header flags and fold levels are
+ the <code class="parameter">line</code>. If no line is found, or if the header flags and fold levels are
inconsistent, the return value is -1.</p>
<p><b id="SCI_TOGGLEFOLD">SCI_TOGGLEFOLD(int line)</b><br />
@@ -5703,7 +5775,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
all the lines that depend on the line. The display updates after this message.</p>
<p><b id="SCI_SETFOLDEXPANDED">SCI_SETFOLDEXPANDED(int line, bool expanded)</b><br />
- <b id="SCI_GETFOLDEXPANDED">SCI_GETFOLDEXPANDED(int line)</b><br />
+ <b id="SCI_GETFOLDEXPANDED">SCI_GETFOLDEXPANDED(int line) &rarr; bool</b><br />
These messages set and get the expanded state of a single line. The set message has no effect
on the visible state of the line or any lines that depend on it. It does change the markers in
the folding margin. If you ask for the expansion state of a line that is outside the document,
@@ -5765,9 +5837,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</p>
<p><b id="SCI_SETAUTOMATICFOLD">SCI_SETAUTOMATICFOLD(int automaticFold)</b><br />
- <b id="SCI_GETAUTOMATICFOLD">SCI_GETAUTOMATICFOLD</b><br />
+ <b id="SCI_GETAUTOMATICFOLD">SCI_GETAUTOMATICFOLD &rarr; int</b><br />
Instead of implementing all the logic for handling folding in the container, Scintilla can provide behaviour
- that is adequate for many applications. The <code>automaticFold</code> argument is a bit set defining
+ that is adequate for many applications. The <code class="parameter">automaticFold</code> argument is a bit set defining
which of the 3 pieces of folding implementation should be enabled. Most applications should be able to use the
<code>SC_AUTOMATICFOLD_SHOW</code> and <code>SC_AUTOMATICFOLD_CHANGE</code>
flags unless they wish to implement quite different behaviour such as defining their own fold structure.
@@ -5810,11 +5882,11 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</tbody>
</table>
- <p><b id="SCI_CONTRACTEDFOLDNEXT">SCI_CONTRACTEDFOLDNEXT(int lineStart)</b><br />
+ <p><b id="SCI_CONTRACTEDFOLDNEXT">SCI_CONTRACTEDFOLDNEXT(int lineStart) &rarr; int</b><br />
Search efficiently for lines that are contracted fold headers.
This is useful when saving the user's folding when switching documents or saving folding with a file.
- The search starts at line number <code>lineStart</code> and continues forwards to the end of the file.
- <code>lineStart</code> is returned if it is a contracted fold header otherwise the next contracted
+ The search starts at line number <code class="parameter">lineStart</code> and continues forwards to the end of the file.
+ <code class="parameter">lineStart</code> is returned if it is a contracted fold header otherwise the next contracted
fold header is returned. If there are no more contracted fold headers then -1 is returned.</p>
<p><b id="SCI_ENSUREVISIBLE">SCI_ENSUREVISIBLE(int line)</b><br />
@@ -5828,22 +5900,22 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<h2 id="LineWrapping">Line wrapping</h2>
<code><a class="message" href="#SCI_SETWRAPMODE">SCI_SETWRAPMODE(int wrapMode)</a><br />
- <a class="message" href="#SCI_GETWRAPMODE">SCI_GETWRAPMODE</a><br />
+ <a class="message" href="#SCI_GETWRAPMODE">SCI_GETWRAPMODE &rarr; int</a><br />
<a class="message" href="#SCI_SETWRAPVISUALFLAGS">SCI_SETWRAPVISUALFLAGS(int wrapVisualFlags)</a><br />
- <a class="message" href="#SCI_GETWRAPVISUALFLAGS">SCI_GETWRAPVISUALFLAGS</a><br />
+ <a class="message" href="#SCI_GETWRAPVISUALFLAGS">SCI_GETWRAPVISUALFLAGS &rarr; int</a><br />
<a class="message" href="#SCI_SETWRAPVISUALFLAGSLOCATION">SCI_SETWRAPVISUALFLAGSLOCATION(int wrapVisualFlagsLocation)</a><br />
- <a class="message" href="#SCI_GETWRAPVISUALFLAGSLOCATION">SCI_GETWRAPVISUALFLAGSLOCATION</a><br />
- <a class="message" href="#SCI_SETWRAPINDENTMODE">SCI_SETWRAPINDENTMODE(int indentMode)</a><br />
- <a class="message" href="#SCI_GETWRAPINDENTMODE">SCI_GETWRAPINDENTMODE</a><br />
+ <a class="message" href="#SCI_GETWRAPVISUALFLAGSLOCATION">SCI_GETWRAPVISUALFLAGSLOCATION &rarr; int</a><br />
+ <a class="message" href="#SCI_SETWRAPINDENTMODE">SCI_SETWRAPINDENTMODE(int wrapIndentMode)</a><br />
+ <a class="message" href="#SCI_GETWRAPINDENTMODE">SCI_GETWRAPINDENTMODE &rarr; int</a><br />
<a class="message" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT(int indent)</a><br />
- <a class="message" href="#SCI_GETWRAPSTARTINDENT">SCI_GETWRAPSTARTINDENT</a><br />
+ <a class="message" href="#SCI_GETWRAPSTARTINDENT">SCI_GETWRAPSTARTINDENT &rarr; int</a><br />
<a class="message" href="#SCI_SETLAYOUTCACHE">SCI_SETLAYOUTCACHE(int cacheMode)</a><br />
- <a class="message" href="#SCI_GETLAYOUTCACHE">SCI_GETLAYOUTCACHE</a><br />
+ <a class="message" href="#SCI_GETLAYOUTCACHE">SCI_GETLAYOUTCACHE &rarr; int</a><br />
<a class="message" href="#SCI_SETPOSITIONCACHE">SCI_SETPOSITIONCACHE(int size)</a><br />
- <a class="message" href="#SCI_GETPOSITIONCACHE">SCI_GETPOSITIONCACHE</a><br />
+ <a class="message" href="#SCI_GETPOSITIONCACHE">SCI_GETPOSITIONCACHE &rarr; int</a><br />
<a class="message" href="#SCI_LINESSPLIT">SCI_LINESSPLIT(int pixelWidth)</a><br />
<a class="message" href="#SCI_LINESJOIN">SCI_LINESJOIN</a><br />
- <a class="message" href="#SCI_WRAPCOUNT">SCI_WRAPCOUNT(int docLine)</a><br />
+ <a class="message" href="#SCI_WRAPCOUNT">SCI_WRAPCOUNT(int docLine) &rarr; int</a><br />
</code>
<p>By default, Scintilla does not wrap lines of text. If you enable line wrapping, lines wider
@@ -5877,7 +5949,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<a class="message" href="#SCN_PAINTED">SCN_PAINTED</a> notification.</p>
<p><b id="SCI_SETWRAPMODE">SCI_SETWRAPMODE(int wrapMode)</b><br />
- <b id="SCI_GETWRAPMODE">SCI_GETWRAPMODE</b><br />
+ <b id="SCI_GETWRAPMODE">SCI_GETWRAPMODE &rarr; int</b><br />
Set wrapMode to <code>SC_WRAP_WORD</code> (1) to enable wrapping
on word or style boundaries, <code>SC_WRAP_CHAR</code> (2) to enable wrapping
between any characters, <code>SC_WRAP_WHITESPACE</code> (3) to enable
@@ -5888,7 +5960,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p><b id="SCI_SETWRAPVISUALFLAGS">SCI_SETWRAPVISUALFLAGS(int wrapVisualFlags)</b><br />
- <b id="SCI_GETWRAPVISUALFLAGS">SCI_GETWRAPVISUALFLAGS</b><br />
+ <b id="SCI_GETWRAPVISUALFLAGS">SCI_GETWRAPVISUALFLAGS &rarr; int</b><br />
You can enable the drawing of visual flags to indicate a line is wrapped. Bits set in
wrapVisualFlags determine which visual flags are drawn.
</p>
@@ -5931,7 +6003,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</table>
<p><b id="SCI_SETWRAPVISUALFLAGSLOCATION">SCI_SETWRAPVISUALFLAGSLOCATION(int wrapVisualFlagsLocation)</b><br />
- <b id="SCI_GETWRAPVISUALFLAGSLOCATION">SCI_GETWRAPVISUALFLAGSLOCATION</b><br />
+ <b id="SCI_GETWRAPVISUALFLAGSLOCATION">SCI_GETWRAPVISUALFLAGSLOCATION &rarr; int</b><br />
You can set whether the visual flags to indicate a line is wrapped are drawn near the border or near the text.
Bits set in wrapVisualFlagsLocation set the location to near the text for the corresponding visual flag.
</p>
@@ -5966,8 +6038,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</tbody>
</table>
- <p><b id="SCI_SETWRAPINDENTMODE">SCI_SETWRAPINDENTMODE(int indentMode)</b><br />
- <b id="SCI_GETWRAPINDENTMODE">SCI_GETWRAPINDENTMODE</b><br />
+ <p><b id="SCI_SETWRAPINDENTMODE">SCI_SETWRAPINDENTMODE(int wrapIndentMode)</b><br />
+ <b id="SCI_GETWRAPINDENTMODE">SCI_GETWRAPINDENTMODE &rarr; int</b><br />
Wrapped sublines can be indented to the position of their first subline or one more indent level.
The default is <code>SC_WRAPINDENT_FIXED</code>.
The modes are:
@@ -5987,7 +6059,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<td align="left"><code>SC_WRAPINDENT_FIXED</code></td>
<td align="center">0</td>
<td>Wrapped sublines aligned to left of window plus amount set by
- <a class="message" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT</a></td>
+ <a class="seealso" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT</a></td>
</tr>
<tr>
@@ -6005,7 +6077,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</table>
<p><b id="SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT(int indent)</b><br />
- <b id="SCI_GETWRAPSTARTINDENT">SCI_GETWRAPSTARTINDENT</b><br />
+ <b id="SCI_GETWRAPSTARTINDENT">SCI_GETWRAPSTARTINDENT &rarr; int</b><br />
<code>SCI_SETWRAPSTARTINDENT</code> sets the size of indentation of sublines for
wrapped lines in terms of the average character width in
<a class="message" href="#StyleDefinition"><code>STYLE_DEFAULT</code></a>.
@@ -6016,8 +6088,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</p>
<p><b id="SCI_SETLAYOUTCACHE">SCI_SETLAYOUTCACHE(int cacheMode)</b><br />
- <b id="SCI_GETLAYOUTCACHE">SCI_GETLAYOUTCACHE</b><br />
- You can set <code>cacheMode</code> to one of the symbols in the table:</p>
+ <b id="SCI_GETLAYOUTCACHE">SCI_GETLAYOUTCACHE &rarr; int</b><br />
+ You can set <code class="parameter">cacheMode</code> to one of the symbols in the table:</p>
<table cellpadding="1" cellspacing="2" border="0" summary="Line caching styles">
<tbody>
@@ -6066,7 +6138,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
</table>
<p><b id="SCI_SETPOSITIONCACHE">SCI_SETPOSITIONCACHE(int size)</b><br />
- <b id="SCI_GETPOSITIONCACHE">SCI_GETPOSITIONCACHE</b><br />
+ <b id="SCI_GETPOSITIONCACHE">SCI_GETPOSITIONCACHE &rarr; int</b><br />
The position cache stores position information for short runs of text
so that their layout can be determined more quickly if the run recurs.
The size in entries of this cache can be set with <code>SCI_SETPOSITIONCACHE</code>.</p>
@@ -6074,7 +6146,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p><b id="SCI_LINESSPLIT">SCI_LINESSPLIT(int pixelWidth)</b><br />
Split a range of lines indicated by the target into lines that are at most pixelWidth wide.
Splitting occurs on word boundaries wherever possible in a similar manner to line wrapping.
- When <code>pixelWidth</code> is 0 then the width of the window is used.
+ When <code class="parameter">pixelWidth</code> is 0 then the width of the window is used.
</p>
<p><b id="SCI_LINESJOIN">SCI_LINESJOIN</b><br />
@@ -6083,7 +6155,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
Where this would lead to no space between words, an extra space is inserted.
</p>
- <p><b id="SCI_WRAPCOUNT">SCI_WRAPCOUNT(int docLine)</b><br />
+ <p><b id="SCI_WRAPCOUNT">SCI_WRAPCOUNT(int docLine) &rarr; int</b><br />
Document lines can occupy more than one display line if they wrap and this
returns the number of display lines needed to wrap a document line.</p>
@@ -6095,7 +6167,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<code><a class="message" href="#SCI_ZOOMIN">SCI_ZOOMIN</a><br />
<a class="message" href="#SCI_ZOOMOUT">SCI_ZOOMOUT</a><br />
<a class="message" href="#SCI_SETZOOM">SCI_SETZOOM(int zoomInPoints)</a><br />
- <a class="message" href="#SCI_GETZOOM">SCI_GETZOOM</a><br />
+ <a class="message" href="#SCI_GETZOOM">SCI_GETZOOM &rarr; int</a><br />
</code>
<p><b id="SCI_ZOOMIN">SCI_ZOOMIN</b><br />
@@ -6105,7 +6177,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
current zoom factor is greater than -10 points.</p>
<p><b id="SCI_SETZOOM">SCI_SETZOOM(int zoomInPoints)</b><br />
- <b id="SCI_GETZOOM">SCI_GETZOOM</b><br />
+ <b id="SCI_GETZOOM">SCI_GETZOOM &rarr; int</b><br />
These messages let you set and get the zoom factor directly. There is no limit set on the
factors you can set, so limiting yourself to -10 to +20 to match the incremental zoom functions
is a good idea.</p>
@@ -6114,16 +6186,19 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p>You can choose to mark lines that exceed a given length by drawing a vertical line or by
colouring the background of characters that exceed the set length.</p>
- <code><a class="message" href="#SCI_SETEDGEMODE">SCI_SETEDGEMODE(int mode)</a><br />
- <a class="message" href="#SCI_GETEDGEMODE">SCI_GETEDGEMODE</a><br />
+ <code><a class="message" href="#SCI_SETEDGEMODE">SCI_SETEDGEMODE(int edgeMode)</a><br />
+ <a class="message" href="#SCI_GETEDGEMODE">SCI_GETEDGEMODE &rarr; int</a><br />
<a class="message" href="#SCI_SETEDGECOLUMN">SCI_SETEDGECOLUMN(int column)</a><br />
- <a class="message" href="#SCI_GETEDGECOLUMN">SCI_GETEDGECOLUMN</a><br />
- <a class="message" href="#SCI_SETEDGECOLOUR">SCI_SETEDGECOLOUR(int colour)</a><br />
- <a class="message" href="#SCI_GETEDGECOLOUR">SCI_GETEDGECOLOUR</a><br />
+ <a class="message" href="#SCI_GETEDGECOLUMN">SCI_GETEDGECOLUMN &rarr; int</a><br />
+ <a class="message" href="#SCI_SETEDGECOLOUR">SCI_SETEDGECOLOUR(colour edgeColour)</a><br />
+ <a class="message" href="#SCI_GETEDGECOLOUR">SCI_GETEDGECOLOUR &rarr; colour</a><br />
+ <br />
+ <a class="message" href="#SCI_MULTIEDGEADDLINE">SCI_MULTIEDGEADDLINE(int column, colour edgeColour)</a><br />
+ <a class="message" href="#SCI_MULTIEDGECLEARALL">SCI_MULTIEDGECLEARALL</a><br />
</code>
<p><b id="SCI_SETEDGEMODE">SCI_SETEDGEMODE(int edgeMode)</b><br />
- <b id="SCI_GETEDGEMODE">SCI_GETEDGEMODE</b><br />
+ <b id="SCI_GETEDGEMODE">SCI_GETEDGEMODE &rarr; int</b><br />
These two messages set and get the mode used to display long lines. You can set one of the
values in the table:</p>
@@ -6168,22 +6243,40 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<td>The background colour of characters after the column limit is changed to the colour
set by <code>SCI_SETEDGECOLOUR</code>. This is recommended for proportional fonts.</td>
</tr>
+
+ <tr>
+ <td align="left"><code>EDGE_MULTILINE</code></td>
+
+ <td align="center">3</td>
+
+ <td>This is similar to <code>EDGE_LINE</code> but in contrary to showing only one single
+ line a configurable set of vertical lines can be shown simultaneously. This <code>edgeMode
+ </code> uses a completely independent dataset that can only be configured by using the
+ <code>SCI_MULTIEDGE*</code> messages.</td>
+ </tr>
</tbody>
</table>
<p><b id="SCI_SETEDGECOLUMN">SCI_SETEDGECOLUMN(int column)</b><br />
- <b id="SCI_GETEDGECOLUMN">SCI_GETEDGECOLUMN</b><br />
+ <b id="SCI_GETEDGECOLUMN">SCI_GETEDGECOLUMN &rarr; int</b><br />
These messages set and get the column number at which to display the long line marker. When
drawing lines, the column sets a position in units of the width of a space character in
<code>STYLE_DEFAULT</code>. When setting the background colour, the column is a character count
(allowing for tabs) into the line.</p>
- <p><b id="SCI_SETEDGECOLOUR">SCI_SETEDGECOLOUR(int <a class="jump"
- href="#colour">colour</a>)</b><br />
- <b id="SCI_GETEDGECOLOUR">SCI_GETEDGECOLOUR</b><br />
+ <p><b id="SCI_SETEDGECOLOUR">SCI_SETEDGECOLOUR(<a class="jump" href="#colour">colour</a> edgeColour)</b><br />
+ <b id="SCI_GETEDGECOLOUR">SCI_GETEDGECOLOUR &rarr; colour</b><br />
These messages set and get the colour of the marker used to show that a line has exceeded the
length set by <code>SCI_SETEDGECOLUMN</code>.</p>
+ <p><b id="SCI_MULTIEDGEADDLINE">SCI_MULTIEDGEADDLINE(int column,
+ <a class="jump" href="#colour">colour</a> edgeColour)</b><br />
+ <b id="SCI_MULTIEDGECLEARALL">SCI_MULTIEDGECLEARALL</b><br />
+ <code>SCI_MULTIEDGEADDLINE</code> adds a new vertical edge to the view. The edge will be
+ displayed at the given column number. The resulting edge position depends on the metric
+ of a space character in <code>STYLE_DEFAULT</code>. All the edges can be cleared with
+ <code>SCI_MULTIEDGECLEARALL</code>.</p>
+
<h2 id="Lexer">Lexer</h2>
<p>If you define the symbol <code>SCI_LEXER</code> when building Scintilla, (this is sometimes
@@ -6196,38 +6289,38 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
functions: <code>GetLexerCount</code>, <code>GetLexerName</code>, and
<code>GetLexerFactory</code>. See <code>externalLexer.cxx</code> for more.</p>
<a class="message" href="#SCI_SETLEXER">SCI_SETLEXER(int lexer)</a><br />
- <a class="message" href="#SCI_GETLEXER">SCI_GETLEXER</a><br />
+ <a class="message" href="#SCI_GETLEXER">SCI_GETLEXER &rarr; int</a><br />
<a class="message" href="#SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, const char
- *name)</a><br />
- <a class="message" href="#SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char
- *name)</a><br />
+ *language)</a><br />
+ <a class="message" href="#SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *language) &rarr; int</a><br />
<a class="message" href="#SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(&lt;unused&gt;, const char
*path)</a><br />
<a class="message" href="#SCI_COLOURISE">SCI_COLOURISE(int start, int end)</a><br />
- <a class="message" href="#SCI_CHANGELEXERSTATE">SCI_CHANGELEXERSTATE(int start, int end)</a><br />
- <a class="message" href="#SCI_PROPERTYNAMES">SCI_PROPERTYNAMES(&lt;unused&gt;, char *names)</a><br />
- <a class="message" href="#SCI_PROPERTYTYPE">SCI_PROPERTYTYPE(const char *name)</a><br />
- <a class="message" href="#SCI_DESCRIBEPROPERTY">SCI_DESCRIBEPROPERTY(const char *name, char *description)</a><br />
+ <a class="message" href="#SCI_CHANGELEXERSTATE">SCI_CHANGELEXERSTATE(int start, int end) &rarr; int</a><br />
+ <a class="message" href="#SCI_PROPERTYNAMES">SCI_PROPERTYNAMES(&lt;unused&gt;, char *names) &rarr; int</a><br />
+ <a class="message" href="#SCI_PROPERTYTYPE">SCI_PROPERTYTYPE(const char *name) &rarr; int</a><br />
+ <a class="message" href="#SCI_DESCRIBEPROPERTY">SCI_DESCRIBEPROPERTY(const char *name, char *description) &rarr; int</a><br />
<a class="message" href="#SCI_SETPROPERTY">SCI_SETPROPERTY(const char *key, const char *value)</a><br />
- <a class="message" href="#SCI_GETPROPERTY">SCI_GETPROPERTY(const char *key, char *value)</a><br />
- <a class="message" href="#SCI_GETPROPERTYEXPANDED">SCI_GETPROPERTYEXPANDED(const char *key, char *value)</a><br />
- <a class="message" href="#SCI_GETPROPERTYINT">SCI_GETPROPERTYINT(const char *key, int default)</a><br />
- <a class="message" href="#SCI_DESCRIBEKEYWORDSETS">SCI_DESCRIBEKEYWORDSETS(&lt;unused&gt;, char *descriptions)</a><br />
+ <a class="message" href="#SCI_GETPROPERTY">SCI_GETPROPERTY(const char *key, char *value) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETPROPERTYEXPANDED">SCI_GETPROPERTYEXPANDED(const char *key, char *value) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETPROPERTYINT">SCI_GETPROPERTYINT(const char *key, int defaultValue) &rarr; int</a><br />
+ <a class="message" href="#SCI_DESCRIBEKEYWORDSETS">SCI_DESCRIBEKEYWORDSETS(&lt;unused&gt;, char *descriptions) &rarr; int</a><br />
<a class="message" href="#SCI_SETKEYWORDS">SCI_SETKEYWORDS(int keyWordSet, const char
- *keyWordList)</a><br />
+ *keyWords)</a><br />
- <a class="message" href="#SCI_GETSUBSTYLEBASES">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles)</a><br />
- <a class="message" href="#SCI_DISTANCETOSECONDARYSTYLES">SCI_DISTANCETOSECONDARYSTYLES</a><br />
- <a class="message" href="#SCI_ALLOCATESUBSTYLES">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles)</a><br />
+ <a class="message" href="#SCI_GETSUBSTYLEBASES">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles) &rarr; int</a><br />
+ <a class="message" href="#SCI_DISTANCETOSECONDARYSTYLES">SCI_DISTANCETOSECONDARYSTYLES &rarr; int</a><br />
+ <a class="message" href="#SCI_ALLOCATESUBSTYLES">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles) &rarr; int</a><br />
<a class="message" href="#SCI_FREESUBSTYLES">SCI_FREESUBSTYLES</a><br />
- <a class="message" href="#SCI_GETSUBSTYLESSTART">SCI_GETSUBSTYLESSTART(int styleBase)</a><br />
- <a class="message" href="#SCI_GETSUBSTYLESLENGTH">SCI_GETSUBSTYLESLENGTH(int styleBase)</a><br />
- <a class="message" href="#SCI_GETSTYLEFROMSUBSTYLE">SCI_GETSTYLEFROMSUBSTYLE(int subStyle)</a><br />
- <a class="message" href="#SCI_GETPRIMARYSTYLEFROMSTYLE">SCI_GETPRIMARYSTYLEFROMSTYLE(int style)</a><br />
+ <a class="message" href="#SCI_GETSUBSTYLESSTART">SCI_GETSUBSTYLESSTART(int styleBase) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETSUBSTYLESLENGTH">SCI_GETSUBSTYLESLENGTH(int styleBase) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETSTYLEFROMSUBSTYLE">SCI_GETSTYLEFROMSUBSTYLE(int subStyle) &rarr; int</a><br />
+ <a class="message" href="#SCI_GETPRIMARYSTYLEFROMSTYLE">SCI_GETPRIMARYSTYLEFROMSTYLE(int style) &rarr; int</a><br />
<a class="message" href="#SCI_SETIDENTIFIERS">SCI_SETIDENTIFIERS(int style, const char *identifiers)</a><br />
+ <a class="message" href="#SCI_PRIVATELEXERCALL">SCI_PRIVATELEXERCALL(int operation, int pointer) &rarr; int</a><br />
<p><b id="SCI_SETLEXER">SCI_SETLEXER(int lexer)</b><br />
- <b id="SCI_GETLEXER">SCI_GETLEXER</b><br />
+ <b id="SCI_GETLEXER">SCI_GETLEXER &rarr; int</b><br />
You can select the lexer to use with an integer code from the <code>SCLEX_*</code> enumeration
in <code>Scintilla.h</code>. There are two codes in this sequence that do not use lexers:
<code>SCLEX_NULL</code> to select no lexing action and <code>SCLEX_CONTAINER</code> which sends
@@ -6236,11 +6329,11 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<code>SCLEX_AUTOMATIC</code> value; this identifies additional external lexers that Scintilla
assigns unused lexer numbers to.</p>
- <p><b id="SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, const char *name)</b><br />
- <b id="SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *name NUL-terminated)</b><br />
+ <p><b id="SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, const char *language)</b><br />
+ <b id="SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *language NUL-terminated) &rarr; int</b><br />
<code>SCI_SETLEXERLANGUAGE</code> lets you select a lexer by name, and is the only method if you are using an
external lexer or if you have written a lexer module for a language of your own and do not wish
- to assign it an explicit lexer number. To select an existing lexer, set <code>name</code> to
+ to assign it an explicit lexer number. To select an existing lexer, set <code class="parameter">language</code> to
match the (case sensitive) name given to the module, for example "ada" or "python", not "Ada"
or "Python". To locate the name for the built-in lexers, open the relevant
<code>Lex*.cxx</code> file and search for <code>LexerModule</code>. The third argument in the
@@ -6256,21 +6349,21 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
Load a lexer implemented in a shared library. This is a .so file on GTK+/Linux or a .DLL file on Windows.
</p>
- <p><b id="SCI_COLOURISE">SCI_COLOURISE(int startPos, int endPos)</b><br />
+ <p><b id="SCI_COLOURISE">SCI_COLOURISE(int start, int end)</b><br />
This requests the current lexer or the container (if the lexer is set to
- <code>SCLEX_CONTAINER</code>) to style the document between <code>startPos</code> and
- <code>endPos</code>. If <code>endPos</code> is -1, the document is styled from
- <code>startPos</code> to the end. If the <code>"fold"</code> property is set to
+ <code>SCLEX_CONTAINER</code>) to style the document between <code class="parameter">start</code> and
+ <code class="parameter">end</code>. If <code class="parameter">end</code> is -1, the document is styled from
+ <code class="parameter">start</code> to the end. If the <code>"fold"</code> property is set to
<code>"1"</code> and your lexer or container supports folding, fold levels are also set. This
message causes a redraw.</p>
- <p><b id="SCI_CHANGELEXERSTATE">SCI_CHANGELEXERSTATE(int startPos, int endPos)</b><br />
+ <p><b id="SCI_CHANGELEXERSTATE">SCI_CHANGELEXERSTATE(int start, int end) &rarr; int</b><br />
Indicate that the internal state of a lexer has changed over a range and therefore
there may be a need to redraw.</p>
- <p><b id="SCI_PROPERTYNAMES">SCI_PROPERTYNAMES(&lt;unused&gt;, char *names NUL-terminated)</b><br />
- <b id="SCI_PROPERTYTYPE">SCI_PROPERTYTYPE(const char *name)</b><br />
- <b id="SCI_DESCRIBEPROPERTY">SCI_DESCRIBEPROPERTY(const char *name, char *description NUL-terminated)</b><br />
+ <p><b id="SCI_PROPERTYNAMES">SCI_PROPERTYNAMES(&lt;unused&gt;, char *names NUL-terminated) &rarr; int</b><br />
+ <b id="SCI_PROPERTYTYPE">SCI_PROPERTYTYPE(const char *name) &rarr; int</b><br />
+ <b id="SCI_DESCRIBEPROPERTY">SCI_DESCRIBEPROPERTY(const char *name, char *description NUL-terminated) &rarr; int</b><br />
Information may be retrieved about the properties that can be set for the current lexer.
This information is only available for newer lexers.
<code>SCI_PROPERTYNAMES</code> returns a string with all of the valid properties separated by "\n".
@@ -6281,14 +6374,14 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p><b id="SCI_SETPROPERTY">SCI_SETPROPERTY(const char *key, const char *value)</b><br />
You can communicate settings to lexers with keyword:value string pairs. There is no limit to
- the number of keyword pairs you can set, other than available memory. <code>key</code> is a
- case sensitive keyword, <code>value</code> is a string that is associated with the keyword. If
+ the number of keyword pairs you can set, other than available memory. <code class="parameter">key</code> is a
+ case sensitive keyword, <code class="parameter">value</code> is a string that is associated with the keyword. If
there is already a value string associated with the keyword, it is replaced. If you pass a zero
- length string, the message does nothing. Both <code>key</code> and <code>value</code> are used
- without modification; extra spaces at the beginning or end of <code>key</code> are
+ length string, the message does nothing. Both <code class="parameter">key</code> and <code class="parameter">value</code> are used
+ without modification; extra spaces at the beginning or end of <code class="parameter">key</code> are
significant.</p>
- <p>The <code>value</code> string can refer to other keywords. For example,
+ <p>The <code class="parameter">value</code> string can refer to other keywords. For example,
<code>SCI_SETPROPERTY("foldTimes10", "$(fold)0")</code> stores the string
<code>"$(fold)0"</code>, but when this is accessed, the <code>$(fold)</code> is replaced by the
value of the <code>"fold"</code> keyword (or by nothing if this keyword does not exist).</p>
@@ -6309,7 +6402,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
Documentation for the property may be located above the call as a multi-line comment starting with
<br/><code>// property &lt;property-name&gt;</code></p>
- <p><b id="SCI_GETPROPERTY">SCI_GETPROPERTY(const char *key, char *value NUL-terminated)</b><br />
+ <p><b id="SCI_GETPROPERTY">SCI_GETPROPERTY(const char *key, char *value NUL-terminated) &rarr; int</b><br />
Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied
buffer and return the length (not including the terminating 0). If not found, copy an empty string
to the buffer and return 0.</p>
@@ -6320,7 +6413,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p>If the value argument is 0 then the length that should be allocated to store the value is returned;
again, the terminating 0 is not included.</p>
- <p><b id="SCI_GETPROPERTYEXPANDED">SCI_GETPROPERTYEXPANDED(const char *key, char *value)</b><br />
+ <p><b id="SCI_GETPROPERTYEXPANDED">SCI_GETPROPERTYEXPANDED(const char *key, char *value) &rarr; int</b><br />
Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied
buffer and return the length (not including the terminating 0). If not found, copy an empty string
to the buffer and return 0.</p>
@@ -6331,7 +6424,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p>If the value argument is 0 then the length that should be allocated to store the value (including any indicated keyword replacement)
is returned; again, the terminating 0 is not included.</p>
- <p><b id="SCI_GETPROPERTYINT">SCI_GETPROPERTYINT(const char *key, int default)</b><br />
+ <p><b id="SCI_GETPROPERTYINT">SCI_GETPROPERTYINT(const char *key, int defaultValue) &rarr; int</b><br />
Lookup a keyword:value pair using the specified key; if found, interpret the value as an integer and return it.
If not found (or the value is an empty string) then return the supplied default. If the keyword:value pair is found but is not
a number, then return 0.</p>
@@ -6339,10 +6432,10 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p>Note that "keyword replacement" as described in <a class="message" href="#SCI_SETPROPERTY">
<code>SCI_SETPROPERTY</code></a> will be performed before any numeric interpretation.</p>
- <p><b id="SCI_SETKEYWORDS">SCI_SETKEYWORDS(int keyWordSet, const char *keyWordList)</b><br />
+ <p><b id="SCI_SETKEYWORDS">SCI_SETKEYWORDS(int keyWordSet, const char *keyWords)</b><br />
You can set up to 9 lists of keywords for use by the current lexer.
- <code>keyWordSet</code> can be 0 to 8 (actually 0 to <code>KEYWORDSET_MAX</code>)
- and selects which keyword list to replace. <code>keyWordList</code> is a list of keywords
+ <code class="parameter">keyWordSet</code> can be 0 to 8 (actually 0 to <code>KEYWORDSET_MAX</code>)
+ and selects which keyword list to replace. <code class="parameter">keyWords</code> is a list of keywords
separated by spaces, tabs, <code>"\n"</code> or <code>"\r"</code> or any combination of these.
It is expected that the keywords will be composed of standard ASCII printing characters,
but there is nothing to stop you using any non-separator character codes from 1 to 255
@@ -6361,7 +6454,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
There is nothing to stop you building your own keyword lists into the lexer, but this means
that the lexer must be rebuilt if more keywords are added.</p>
- <p><b id="SCI_DESCRIBEKEYWORDSETS">SCI_DESCRIBEKEYWORDSETS(&lt;unused&gt;, char *descriptions NUL-terminated)</b><br />
+ <p><b id="SCI_DESCRIBEKEYWORDSETS">SCI_DESCRIBEKEYWORDSETS(&lt;unused&gt;, char *descriptions NUL-terminated) &rarr; int</b><br />
A description of all of the keyword sets separated by "\n" is returned by <code>SCI_DESCRIBEKEYWORDSETS</code>.</p>
<h3 id="Substyles">Substyles</h3>
@@ -6372,33 +6465,36 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
each purpose.
Lexers have to explicitly support this feature by implementing the methods in <code>ILexerWithSubStyles</code>.</p>
- <p><b id="SCI_GETSUBSTYLEBASES">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles NUL-terminated)</b><br />
- Fill <code>styles</code> with a byte for each style that can be split into substyles.</p>
+ <p><b id="SCI_GETSUBSTYLEBASES">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles NUL-terminated) &rarr; int</b><br />
+ Fill <code class="parameter">styles</code> with a byte for each style that can be split into substyles.</p>
- <p><b id="SCI_DISTANCETOSECONDARYSTYLES">SCI_DISTANCETOSECONDARYSTYLES</b><br />
+ <p><b id="SCI_DISTANCETOSECONDARYSTYLES">SCI_DISTANCETOSECONDARYSTYLES &rarr; int</b><br />
Returns the distance between a primary style and its corresponding secondary style.</p>
- <p><b id="SCI_ALLOCATESUBSTYLES">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles)</b><br />
+ <p><b id="SCI_ALLOCATESUBSTYLES">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles) &rarr; int</b><br />
Allocate some number of substyles for a particular base style returning the first substyle number allocated.
Substyles are allocated contiguously.</p>
<p><b id="SCI_FREESUBSTYLES">SCI_FREESUBSTYLES</b><br />
Free all allocated substyles.</p>
- <p><b id="SCI_GETSUBSTYLESSTART">SCI_GETSUBSTYLESSTART(int styleBase)</b><br />
- <b id="SCI_GETSUBSTYLESLENGTH">SCI_GETSUBSTYLESLENGTH(int styleBase)</b><br />
+ <p><b id="SCI_GETSUBSTYLESSTART">SCI_GETSUBSTYLESSTART(int styleBase) &rarr; int</b><br />
+ <b id="SCI_GETSUBSTYLESLENGTH">SCI_GETSUBSTYLESLENGTH(int styleBase) &rarr; int</b><br />
Return the start and length of the substyles allocated for a base style.</p>
- <p><b id="SCI_GETSTYLEFROMSUBSTYLE">SCI_GETSTYLEFROMSUBSTYLE(int subStyle)</b><br />
+ <p><b id="SCI_GETSTYLEFROMSUBSTYLE">SCI_GETSTYLEFROMSUBSTYLE(int subStyle) &rarr; int</b><br />
For a sub style, return the base style, else return the argument.</p>
- <p><b id="SCI_GETPRIMARYSTYLEFROMSTYLE">SCI_GETPRIMARYSTYLEFROMSTYLE(int style)</b><br />
+ <p><b id="SCI_GETPRIMARYSTYLEFROMSTYLE">SCI_GETPRIMARYSTYLEFROMSTYLE(int style) &rarr; int</b><br />
For a secondary style, return the primary style, else return the argument.</p>
<p><b id="SCI_SETIDENTIFIERS">SCI_SETIDENTIFIERS(int style, const char *identifiers)</b><br />
Similar to <code>SCI_SETKEYWORDS</code> but for substyles.
The prefix feature available with <code>SCI_SETKEYWORDS</code> is not implemented for <code>SCI_SETIDENTIFIERS</code>.</p>
+ <p><b id="SCI_PRIVATELEXERCALL">SCI_PRIVATELEXERCALL(int operation, int pointer) &rarr; int</b><br />
+ Call into a lexer in a way not understood by Scintilla.</p>
+
<h2 id="LexerObjects">Lexer Objects</h2>
<p>Lexers are programmed as objects that implement the ILexer interface and that interact
@@ -6567,7 +6663,7 @@ returning <code>INVALID_POSITION</code> for movement beyond the start and end of
conversion from UTF-8 bytes to a UTF-32 character or from DBCS to a 16 bit value.
Bytes in invalid UTF-8 are reported individually with values 0xDC80+byteValue, which are
not valid Unicode code points.
-The <code>pWidth</code> argument can be NULL if the caller does not need to know the number of
+The <code class="parameter">pWidth</code> argument can be NULL if the caller does not need to know the number of
bytes in the character.
</p>
@@ -6684,11 +6780,11 @@ struct SCNotification {
<p>The following <code>SCI_*</code> messages are associated with these notifications:</p>
<code><a class="message" href="#SCI_SETMODEVENTMASK">SCI_SETMODEVENTMASK(int eventMask)</a><br />
- <a class="message" href="#SCI_GETMODEVENTMASK">SCI_GETMODEVENTMASK</a><br />
- <a class="message" href="#SCI_SETMOUSEDWELLTIME">SCI_SETMOUSEDWELLTIME(int milliseconds)</a><br />
- <a class="message" href="#SCI_GETMOUSEDWELLTIME">SCI_GETMOUSEDWELLTIME</a><br />
+ <a class="message" href="#SCI_GETMODEVENTMASK">SCI_GETMODEVENTMASK &rarr; int</a><br />
+ <a class="message" href="#SCI_SETMOUSEDWELLTIME">SCI_SETMOUSEDWELLTIME(int periodMilliseconds)</a><br />
+ <a class="message" href="#SCI_GETMOUSEDWELLTIME">SCI_GETMOUSEDWELLTIME &rarr; int</a><br />
<a class="message" href="#SCI_SETIDENTIFIER">SCI_SETIDENTIFIER(int identifier)</a><br />
- <a class="message" href="#SCI_GETIDENTIFIER">SCI_GETIDENTIFIER</a><br />
+ <a class="message" href="#SCI_GETIDENTIFIER">SCI_GETIDENTIFIER &rarr; int</a><br />
</code>
<p>The following additional notifications are sent using a secondary "command" method and should
@@ -6705,7 +6801,7 @@ struct SCNotification {
</code>
<p><b id="SCI_SETIDENTIFIER">SCI_SETIDENTIFIER(int identifier)</b><br />
- <b id="SCI_GETIDENTIFIER">SCI_GETIDENTIFIER</b><br />
+ <b id="SCI_GETIDENTIFIER">SCI_GETIDENTIFIER &rarr; int</b><br />
These two messages set and get the identifier of the Scintilla instance which is included in notifications as the
<code>idFrom</code> field.
When an application creates multiple Scintilla widgets, this allows the source of each notification to be found.
@@ -6720,14 +6816,14 @@ struct SCNotification {
href="#SCI_SETLEXER">SCI_SETLEXER</a>(SCLEX_CONTAINER)</code> to make the container act as the
lexer, you will receive this notification when Scintilla is about to display or print text that
requires styling. You are required to style the text from the line that contains the position
- returned by <a class="message" href="#SCI_GETENDSTYLED"><code>SCI_GETENDSTYLED</code></a> up to
+ returned by <a class="seealso" href="#SCI_GETENDSTYLED"><code>SCI_GETENDSTYLED</code></a> up to
the position passed in <code>SCNotification.position</code>. Symbolically, you need code of the
form:</p>
<pre>
- startPos = <a class="message" href="#SCI_GETENDSTYLED">SCI_GETENDSTYLED</a>()
- lineNumber = <a class="message"
+ startPos = <a class="seealso" href="#SCI_GETENDSTYLED">SCI_GETENDSTYLED</a>()
+ lineNumber = <a class="seealso"
href="#SCI_LINEFROMPOSITION">SCI_LINEFROMPOSITION</a>(startPos);
- startPos = <a class="message"
+ startPos = <a class="seealso"
href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
MyStyleRoutine(startPos, SCNotification.position);
</pre>
@@ -7052,7 +7148,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
<td align="right">0x8000</td>
- <td>A line state has changed because <a class="message" href="#SCI_SETLINESTATE">SCI_SETLINESTATE</a>
+ <td>A line state has changed because <a class="seealso" href="#SCI_SETLINESTATE">SCI_SETLINESTATE</a>
was called.</td>
<td><code>line</code></td>
@@ -7063,8 +7159,8 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
<td align="right">0x200000</td>
- <td>The explicit tab stops on a line have changed because <a class="message" href="#SCI_CLEARTABSTOPS">SCI_CLEARTABSTOPS</a> or
- <a class="message" href="#SCI_ADDTABSTOP">SCI_ADDTABSTOP</a> was called.</td>
+ <td>The explicit tab stops on a line have changed because <a class="seealso" href="#SCI_CLEARTABSTOPS">SCI_CLEARTABSTOPS</a> or
+ <a class="seealso" href="#SCI_ADDTABSTOP">SCI_ADDTABSTOP</a> was called.</td>
<td><code>line</code></td>
</tr>
@@ -7105,7 +7201,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
<td align="right">0x100000</td>
<td>Text is about to be inserted. The handler may change the text being inserted by calling
- <a class="message" href="#SCI_CHANGEINSERTION">SCI_CHANGEINSERTION</a>.
+ <a class="seealso" href="#SCI_CHANGEINSERTION">SCI_CHANGEINSERTION</a>.
No other modifications may be made in this handler.</td>
<td><code>position, length, text</code></td>
@@ -7172,7 +7268,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
href="#SCI_SETMODEVENTMASK"><code>SCI_SETMODEVENTMASK</code></a>.</p>
<p><b id="SCI_SETMODEVENTMASK">SCI_SETMODEVENTMASK(int eventMask)</b><br />
- <b id="SCI_GETMODEVENTMASK">SCI_GETMODEVENTMASK</b><br />
+ <b id="SCI_GETMODEVENTMASK">SCI_GETMODEVENTMASK &rarr; int</b><br />
These messages set and get an event mask that determines which document change events are
notified to the container with <a class="message"
href="#SCN_MODIFIED"><code>SCN_MODIFIED</code></a> and <a class="message"
@@ -7392,15 +7488,15 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
</table>
<br />
- <p><b id="SCI_SETMOUSEDWELLTIME">SCI_SETMOUSEDWELLTIME(int milliseconds)</b><br />
- <b id="SCI_GETMOUSEDWELLTIME">SCI_GETMOUSEDWELLTIME</b><br />
+ <p><b id="SCI_SETMOUSEDWELLTIME">SCI_SETMOUSEDWELLTIME(int periodMilliseconds)</b><br />
+ <b id="SCI_GETMOUSEDWELLTIME">SCI_GETMOUSEDWELLTIME &rarr; int</b><br />
These two messages set and get the time the mouse must sit still, in milliseconds, to generate
a <code><a class="message" href="#SCN_DWELLSTART">SCN_DWELLSTART</a></code> notification. If
set to <code>SC_TIME_FOREVER</code>, the default, no dwell events are generated.</p>
<p><b id="SCN_ZOOM">SCN_ZOOM</b><br />
This notification is generated when the user zooms the display using the keyboard or the
- <code><a class="message" href="#SCI_SETZOOM">SCI_SETZOOM</a></code> method is called. This
+ <code><a class="seealso" href="#SCI_SETZOOM">SCI_SETZOOM</a></code> method is called. This
notification can be used to recalculate positions, such as the width of the line number margin
to maintain sizes in terms of characters rather than pixels. <code>SCNotification</code> has no
additional information.</p>
@@ -7491,7 +7587,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<tr>
<td align="left"><code>SC_AC_FILLUP</code></td>
- <td align="center">0x01</td>
+ <td align="center">1</td>
<td>A fillup character triggered the completion. The character used is
in ch. </td>
@@ -7501,7 +7597,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<tr>
<td align="left"><code>SC_AC_DOUBLECLICK</code></td>
- <td align="center">0x02</td>
+ <td align="center">2</td>
<td>A double-click triggered the completion. ch is 0.</td>
@@ -7510,7 +7606,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<tr>
<td align="left"><code>SC_AC_TAB</code></td>
- <td align="center">0x04</td>
+ <td align="center">3</td>
<td>The tab key or SCI_TAB triggered the completion. ch is 0.</td>
@@ -7519,7 +7615,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<tr>
<td align="left"><code>SC_AC_NEWLINE</code></td>
- <td align="center">0x08</td>
+ <td align="center">4</td>
<td>A new line or SCI_NEWLINE triggered the completion. ch is 0.</td>
@@ -7528,11 +7624,11 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<tr>
<td align="left"><code>SC_AC_COMMAND</code></td>
- <td align="center">0x10</td>
+ <td align="center">5</td>
<td>The
<code>
- <a class="message" href="#SCI_AUTOCSELECT">SCI_AUTOCSELECT</a></code> message
+ <a class="seealso" href="#SCI_AUTOCSELECT">SCI_AUTOCSELECT</a></code> message
triggered the completion. ch is 0.</td>
</tr>
@@ -7623,7 +7719,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<p><b id="scintilla_set_id">void scintilla_set_id(ScintillaObject *sci, uptr_t id)</b><br />
Set the control ID which will be used in the idFrom field of the NotifyHeader structure of all
notifications for this instance.
- This is equivalent to <a class="message" href="#SCI_SETIDENTIFIER">SCI_SETIDENTIFIER</a>.</p>
+ This is equivalent to <a class="seealso" href="#SCI_SETIDENTIFIER">SCI_SETIDENTIFIER</a>.</p>
<p><b id="scintilla_send_message">sptr_t scintilla_send_message(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam)</b><br />
The main entry point allows sending any of the messages described in this document.</p>
@@ -7641,7 +7737,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<p>There are currently no provisional messages.
The <code class="provisional">SC_TECHNOLOGY_DIRECTWRITERETAIN</code> and
<code class="provisional">SC_TECHNOLOGY_DIRECTWRITEDC</code> values for
- <a class="message" href="#SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY</a> are provisional.</p>
+ <a class="seealso" href="#SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY</a> are provisional.</p>
<p>Some developers may want to only use features that are stable and have graduated from
provisional status. To avoid using provisional messages compile with the symbol
@@ -7700,25 +7796,34 @@ EM_FORMATRANGE
<code>INCLUDE_DEPRECATED_FEATURES</code> in <code>Scintilla.h</code>. To ensure future
compatibility you should change them as indicated.</p>
+ <code><a class="message" href="#SCI_SETUSEPALETTE">SCI_SETUSEPALETTE(bool usePalette)</a><br />
+ <a class="message" href="#SCI_GETUSEPALETTE">SCI_GETUSEPALETTE &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETKEYSUNICODE">SCI_SETKEYSUNICODE(bool keysUnicode)</a><br />
+ <a class="message" href="#SCI_GETKEYSUNICODE">SCI_GETKEYSUNICODE &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETSTYLEBITS">SCI_SETSTYLEBITS(int bits)</a><br />
+ <a class="message" href="#SCI_GETSTYLEBITS">SCI_GETSTYLEBITS &rarr; int</a><br />
+ <a class="message" href="#SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED &rarr; int</a><br />
+ </code>
+
<p><b id="SC_CP_DBCS">SC_CP_DBCS</b> Deprecated<br />
This was used to set a DBCS (Double Byte Character Set) mode on GTK+.
- An explicit DBCS code page should be used when calling <a class="message" href="#SCI_SETCODEPAGE">SCI_SETCODEPAGE</a></p>
+ An explicit DBCS code page should be used when calling <a class="seealso" href="#SCI_SETCODEPAGE">SCI_SETCODEPAGE</a></p>
- <p><b id="SCI_SETUSEPALETTE">SCI_SETUSEPALETTE(bool allowPaletteUse)</b> Deprecated<br />
- <b id="SCI_GETUSEPALETTE">SCI_GETUSEPALETTE</b> Deprecated<br />
+ <p><b id="SCI_SETUSEPALETTE">SCI_SETUSEPALETTE(bool usePalette)</b> Deprecated<br />
+ <b id="SCI_GETUSEPALETTE">SCI_GETUSEPALETTE &rarr; bool</b> Deprecated<br />
Scintilla no longer supports palette mode. The last version to support palettes was 2.29.
Any calls to these methods should be removed.</p>
<p><b id="SCI_SETKEYSUNICODE">SCI_SETKEYSUNICODE(bool keysUnicode)</b> Deprecated<br />
- <b id="SCI_GETKEYSUNICODE">SCI_GETKEYSUNICODE</b> Deprecated<br />
+ <b id="SCI_GETKEYSUNICODE">SCI_GETKEYSUNICODE &rarr; bool</b> Deprecated<br />
On Windows, Scintilla no longer supports narrow character windows so input is always treated as Unicode.</p>
<p>The following are features that should be removed from calling code but are still
defined to avoid breaking callers.</p>
<p id="StyleByteIndicators"><b id="SCI_SETSTYLEBITS">SCI_SETSTYLEBITS(int bits)</b> Deprecated<br />
- <b id="SCI_GETSTYLEBITS">SCI_GETSTYLEBITS</b> Deprecated<br />
- <b id="SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED</b> Deprecated<br />
+ <b id="SCI_GETSTYLEBITS">SCI_GETSTYLEBITS &rarr; int</b> Deprecated<br />
+ <b id="SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED &rarr; int</b> Deprecated<br />
<code>INDIC0_MASK</code>, <code>INDIC1_MASK</code>, <code>INDIC2_MASK</code>, <code>INDICS_MASK</code> Deprecated<br />
Scintilla no longer supports style byte indicators. The last version to support style byte indicators was 3.4.2.
Any use of these symbols should be removed and replaced with <a href="#Indicators">standard indicators</a>.
diff --git a/scintilla/doc/ScintillaDownload.html b/scintilla/doc/ScintillaDownload.html
index 934d243..7d14eee 100644
--- a/scintilla/doc/ScintillaDownload.html
+++ b/scintilla/doc/ScintillaDownload.html
@@ -26,9 +26,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
- <font size="4"> <a href="http://www.scintilla.org/scintilla367.zip">
+ <font size="4"> <a href="http://www.scintilla.org/scintilla370.zip">
Windows</a>&nbsp;&nbsp;
- <a href="http://www.scintilla.org/scintilla367.tgz">
+ <a href="http://www.scintilla.org/scintilla370.tgz">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
@@ -42,7 +42,7 @@
containing very few restrictions.
</p>
<h3>
- Release 3.6.7
+ Release 3.7.0
</h3>
<h4>
Source Code
@@ -50,8 +50,8 @@
The source code package contains all of the source code for Scintilla but no binary
executable code and is available in
<ul>
- <li><a href="http://www.scintilla.org/scintilla367.zip">zip format</a> (1500K) commonly used on Windows</li>
- <li><a href="http://www.scintilla.org/scintilla367.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
+ <li><a href="http://www.scintilla.org/scintilla370.zip">zip format</a> (1500K) commonly used on Windows</li>
+ <li><a href="http://www.scintilla.org/scintilla370.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<h4>
diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html
index 75851c2..623903b 100644
--- a/scintilla/doc/ScintillaHistory.html
+++ b/scintilla/doc/ScintillaHistory.html
@@ -499,6 +499,12 @@
</tr><tr>
<td>Alexey Denisov</td>
<td>jedailey</td>
+ <td>oirfeodent</td>
+ <td>A-R-C-A</td>
+ </tr>
+ </tr><tr>
+ <td>Roberto Rossi</td>
+ <td>Kenny Liu</td>
</tr>
</table>
<p>
@@ -511,6 +517,145 @@
</li>
</ul>
<h3>
+ <a href="http://www.scintilla.org/scite371.zip">Release 3.7.1</a>
+ </h3>
+ <ul>
+ <li>
+ Released 16 October 2016.
+ </li>
+ <li>
+ Accessibility supported on GTK+.
+ </li>
+ <li>
+ Baan folder accomodates main sections and lexer fixes definition of SCE_BAAN_FUNCDEF.
+ </li>
+ <li>
+ JSON folder fixed where it didn't resume folding with the correct fold level.
+ </li>
+ <li>
+ YAML lexer fixed style of references and keywords when followed by a comment.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1872/">Bug #1872</a>.
+ </li>
+ <li>
+ Margin click to select line now clears rectangular and additional selections.
+ </li>
+ <li>
+ Fixed a NULL access bug on GTK+ where the scrollbars could be used during destruction.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1873/">Bug #1873</a>.
+ </li>
+ <li>
+ A potential bug on GTK+ fixed where asynchronous clipboard could be delivered after its
+ target Scintilla instance was destroyed.
+ </li>
+ <li>
+ SciTE on Windows restores focus to edit pane after closing user strip.
+ </li>
+ </ul>
+ <h3>
+ <a href="http://www.scintilla.org/scite370.zip">Release 3.7.0</a>
+ </h3>
+ <ul>
+ <li>
+ Released 16 October 2016.
+ </li>
+ <li>
+ Word selection, navigation, and manipulation is now performed on characters instead of bytes
+ leading to more natural behaviour for multi-byte encodings like UTF-8.
+ For UTF-8 characters 0x80 and above, classification into word; punctuation; space; or line-end
+ is based on the Unicode general category of the character and is not customizable.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1832/">Bug #1832</a>.
+ </li>
+ <li>
+ Two enums changed in Scintilla.iface which may lead to changed bindings.
+ There were 2 FontQuality enums and the first is now PhasesDraw.
+ The prefix for FoldAction was SC_FOLDACTION and is now SC_FOLDACTION_
+ which is similar to other enums.
+ These changes do not affect the standard C/C++ binding.
+ </li>
+ <li>
+ EDGE_MULTILINE and SCI_MULTIEDGEADDLINE added to allow displaying multiple
+ vertical edges simultaneously.
+ </li>
+ <li>
+ The number of margins can be changed with SCI_SETMARGINS.
+ </li>
+ <li>
+ Margin type SC_MARGIN_COLOUR added so that the application may
+ choose any colour for a margin with SCI_SETMARGINBACKN.
+ </li>
+ <li>
+ On Win32, mouse wheel scrolling can be restricted to only occur when the mouse is
+ within the window.
+ </li>
+ <li>
+ The WordList class in lexlib used by lexers adds an InListAbridged method for
+ matching keywords that have particular prefixes and/or suffixes.
+ </li>
+ <li>
+ The Baan lexer was changed significantly with more lexical states, keyword sets,
+ and support for abridged keywords.
+ </li>
+ <li>
+ The CoffeeScript lexer styles interpolated code in strings.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1865/">Bug #1865</a>.
+ </li>
+ <li>
+ The Progress lexer "progress" has been replaced with a new lexer "abl"
+ (Advanced Business Language)
+ with a different set of lexical states and more functionality.
+ The lexical state prefix has changed from SCE_4GL_ to SCE_ABL_.
+ <a href="http://sourceforge.net/p/scintilla/feature-requests/1143/">Feature #1143.</a>
+ </li>
+ <li>
+ The PowerShell lexer understands the grave accent escape character.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1868/">Bug #1868</a>.
+ </li>
+ <li>
+ The YAML lexer recognizes inline comments.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1660/">Bug #1660</a>.
+ </li>
+ <li>
+ SciTE on Windows can retain coloured selection when inactive with
+ selection.always.visible property.
+ </li>
+ <li>
+ SciTE on Windows adds a state to close.on.find to close the find strip when
+ a match is found.
+ </li>
+ <li>
+ Fix caret position after left or right movement with rectangular selection.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1861/">Bug #1861</a>.
+ </li>
+ <li>
+ In SciTE, optional prefix argument added to scite.ConstantName method.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1860/">Bug #1860</a>.
+ </li>
+ <li>
+ On Cocoa, include ILexer.h in the public headers of the framework.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1855/">Bug #1855</a>.
+ </li>
+ <li>
+ On Cocoa, allow subclass of SCIContentView to set cursor.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1863/">Bug #1863</a>.
+ </li>
+ <li>
+ On Cocoa, recognize the numeric keypad '+', '-', and '/' keys as
+ SCK_ADD, SCK_SUBTRACT, and SCK_DIVIDE.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1867/">Bug #1867</a>.
+ </li>
+ <li>
+ On GTK+ 3.21+ fix incorrect font size in auto-completion list.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1859/">Bug #1859</a>.
+ </li>
+ <li>
+ Fix SciTE crash when command.mode ends with comma.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1857/">Bug #1857</a>.
+ </li>
+ <li>
+ SciTE on Windows has a full size toolbar icon for "Close".
+ </li>
+ </ul>
+ <h3>
<a href="http://www.scintilla.org/scite367.zip">Release 3.6.7</a>
</h3>
<ul>
diff --git a/scintilla/doc/ScintillaToDo.html b/scintilla/doc/ScintillaToDo.html
index c408acf..c8c1fa2 100644
--- a/scintilla/doc/ScintillaToDo.html
+++ b/scintilla/doc/ScintillaToDo.html
@@ -31,7 +31,7 @@
</h3>
<p>
Issues can be reported on the <a href="http://sourceforge.net/p/scintilla/bugs/">Bug Tracker</a>
- and features requested on the <a href="http://sourceforge.net/p/scintilla/feature-requests/">Feature Request Tracker</a>.
+ and features requested on the <a href="http://sourceforge.net/p/scintilla/feature-requests/">Feature Request Tracker</a>.
</p>
<h3>
Scintilla Bugs
diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html
index a0c5a8a..4048458 100644
--- a/scintilla/doc/index.html
+++ b/scintilla/doc/index.html
@@ -9,7 +9,7 @@
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
<meta name="Description"
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
- <meta name="Date.Modified" content="20160904" />
+ <meta name="Date.Modified" content="20161016" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
#versionlist {
@@ -56,8 +56,8 @@
GTK+, and OS X</font>
</td>
<td width="40%" align="right">
- <font color="#FFCC99" size="3"> Release version 3.6.7<br />
- Site last modified September 4 2016</font>
+ <font color="#FFCC99" size="3"> Release version 3.7.0<br />
+ Site last modified October 16 2016</font>
</td>
<td width="20%">
&nbsp;
@@ -72,8 +72,9 @@
</tr>
</table>
<ul id="versionlist">
- <li>Version 3.6.7 changes SC_CHARSET_DEFAULT on Windows to mean European code page 1252 unless a code page is set.
- <li>Version 3.6.6 enables C++11 &lt;regex&gt; by default.
+ <li>Version 3.7.0 improves word selection, navigation, and manipulation for UTF-8 documents.</li>
+ <li>Version 3.6.7 changes SC_CHARSET_DEFAULT on Windows to mean European code page 1252 unless a code page is set.</li>
+ <li>Version 3.6.6 enables C++11 &lt;regex&gt; by default.</li>
<li>Version 3.6.5 adds a JSON lexer and removes the font cache on GTK+.
Type definitions Sci_Position, Sci_PositionU, and Sci_PositionCR allow client
code to prepare for a future change allowing larger than 2 GB documents.</li>
diff --git a/scintilla/include/SciLexer.h b/scintilla/include/SciLexer.h
index 55cfece..6fc19eb 100644
--- a/scintilla/include/SciLexer.h
+++ b/scintilla/include/SciLexer.h
@@ -600,6 +600,20 @@
#define SCE_BAAN_IDENTIFIER 8
#define SCE_BAAN_STRINGEOL 9
#define SCE_BAAN_WORD2 10
+#define SCE_BAAN_WORD3 11
+#define SCE_BAAN_WORD4 12
+#define SCE_BAAN_WORD5 13
+#define SCE_BAAN_WORD6 14
+#define SCE_BAAN_WORD7 15
+#define SCE_BAAN_WORD8 16
+#define SCE_BAAN_WORD9 17
+#define SCE_BAAN_TABLEDEF 18
+#define SCE_BAAN_TABLESQL 19
+#define SCE_BAAN_FUNCTION 20
+#define SCE_BAAN_DOMDEF 21
+#define SCE_BAAN_FUNCDEF 22
+#define SCE_BAAN_OBJECTDEF 23
+#define SCE_BAAN_DEFINEDEF 24
#define SCE_LISP_DEFAULT 0
#define SCE_LISP_COMMENT 1
#define SCE_LISP_NUMBER 2
@@ -1278,38 +1292,19 @@
#define SCE_PLM_OPERATOR 5
#define SCE_PLM_CONTROL 6
#define SCE_PLM_KEYWORD 7
-#define SCE_4GL_DEFAULT 0
-#define SCE_4GL_NUMBER 1
-#define SCE_4GL_WORD 2
-#define SCE_4GL_STRING 3
-#define SCE_4GL_CHARACTER 4
-#define SCE_4GL_PREPROCESSOR 5
-#define SCE_4GL_OPERATOR 6
-#define SCE_4GL_IDENTIFIER 7
-#define SCE_4GL_BLOCK 8
-#define SCE_4GL_END 9
-#define SCE_4GL_COMMENT1 10
-#define SCE_4GL_COMMENT2 11
-#define SCE_4GL_COMMENT3 12
-#define SCE_4GL_COMMENT4 13
-#define SCE_4GL_COMMENT5 14
-#define SCE_4GL_COMMENT6 15
-#define SCE_4GL_DEFAULT_ 16
-#define SCE_4GL_NUMBER_ 17
-#define SCE_4GL_WORD_ 18
-#define SCE_4GL_STRING_ 19
-#define SCE_4GL_CHARACTER_ 20
-#define SCE_4GL_PREPROCESSOR_ 21
-#define SCE_4GL_OPERATOR_ 22
-#define SCE_4GL_IDENTIFIER_ 23
-#define SCE_4GL_BLOCK_ 24
-#define SCE_4GL_END_ 25
-#define SCE_4GL_COMMENT1_ 26
-#define SCE_4GL_COMMENT2_ 27
-#define SCE_4GL_COMMENT3_ 28
-#define SCE_4GL_COMMENT4_ 29
-#define SCE_4GL_COMMENT5_ 30
-#define SCE_4GL_COMMENT6_ 31
+#define SCE_ABL_DEFAULT 0
+#define SCE_ABL_NUMBER 1
+#define SCE_ABL_WORD 2
+#define SCE_ABL_STRING 3
+#define SCE_ABL_CHARACTER 4
+#define SCE_ABL_PREPROCESSOR 5
+#define SCE_ABL_OPERATOR 6
+#define SCE_ABL_IDENTIFIER 7
+#define SCE_ABL_BLOCK 8
+#define SCE_ABL_END 9
+#define SCE_ABL_COMMENT 10
+#define SCE_ABL_TASKMARKER 11
+#define SCE_ABL_LINECOMMENT 12
#define SCE_ABAQUS_DEFAULT 0
#define SCE_ABAQUS_COMMENT 1
#define SCE_ABAQUS_COMMENTBLOCK 2
diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h
index 64be67e..c0c0506 100644
--- a/scintilla/include/Scintilla.h
+++ b/scintilla/include/Scintilla.h
@@ -167,6 +167,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_MARGIN_FORE 3
#define SC_MARGIN_TEXT 4
#define SC_MARGIN_RTEXT 5
+#define SC_MARGIN_COLOUR 6
#define SCI_SETMARGINTYPEN 2240
#define SCI_GETMARGINTYPEN 2241
#define SCI_SETMARGINWIDTHN 2242
@@ -177,6 +178,10 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETMARGINSENSITIVEN 2247
#define SCI_SETMARGINCURSORN 2248
#define SCI_GETMARGINCURSORN 2249
+#define SCI_SETMARGINBACKN 2250
+#define SCI_GETMARGINBACKN 2251
+#define SCI_SETMARGINS 2252
+#define SCI_GETMARGINS 2253
#define STYLE_DEFAULT 32
#define STYLE_LINENUMBER 33
#define STYLE_BRACELIGHT 34
@@ -650,12 +655,15 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define EDGE_NONE 0
#define EDGE_LINE 1
#define EDGE_BACKGROUND 2
+#define EDGE_MULTILINE 3
#define SCI_GETEDGECOLUMN 2360
#define SCI_SETEDGECOLUMN 2361
#define SCI_GETEDGEMODE 2362
#define SCI_SETEDGEMODE 2363
#define SCI_GETEDGECOLOUR 2364
#define SCI_SETEDGECOLOUR 2365
+#define SCI_MULTIEDGEADDLINE 2694
+#define SCI_MULTIEDGECLEARALL 2695
#define SCI_SEARCHANCHOR 2366
#define SCI_SEARCHNEXT 2367
#define SCI_SEARCHPREV 2368
@@ -679,6 +687,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETSTATUS 2383
#define SCI_SETMOUSEDOWNCAPTURES 2384
#define SCI_GETMOUSEDOWNCAPTURES 2385
+#define SCI_SETMOUSEWHEELCAPTURES 2696
+#define SCI_GETMOUSEWHEELCAPTURES 2697
#define SC_CURSORNORMAL -1
#define SC_CURSORARROW 2
#define SC_CURSORWAIT 4
diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface
index ec87d96..4451b53 100644
--- a/scintilla/include/Scintilla.iface
+++ b/scintilla/include/Scintilla.iface
@@ -105,7 +105,7 @@ fun void ChangeInsertion=2672(int length, string text)
fun void ClearAll=2004(,)
# Delete a range of text in the document.
-fun void DeleteRange=2645(position pos, int deleteLength)
+fun void DeleteRange=2645(position start, int lengthDelete)
# Set all style bytes to 0, remove all folding information.
fun void ClearDocumentStyle=2005(,)
@@ -147,10 +147,10 @@ fun int GetStyledText=2015(, textrange tr)
fun bool CanRedo=2016(,)
# Retrieve the line number at which a particular marker is located.
-fun int MarkerLineFromHandle=2017(int handle,)
+fun int MarkerLineFromHandle=2017(int markerHandle,)
# Delete a marker.
-fun void MarkerDeleteHandle=2018(int handle,)
+fun void MarkerDeleteHandle=2018(int markerHandle,)
# Is undo history being collected?
get bool GetUndoCollection=2019(,)
@@ -179,11 +179,11 @@ fun position PositionFromPointClose=2023(int x, int y)
fun void GotoLine=2024(int line,)
# Set caret to a position and ensure it is visible.
-fun void GotoPos=2025(position pos,)
+fun void GotoPos=2025(position caret,)
# Set the selection anchor to a position. The anchor is the opposite
# end of the selection from the caret.
-set void SetAnchor=2026(position posAnchor,)
+set void SetAnchor=2026(position anchor,)
# Retrieve the text of the line containing the caret.
# Returns the index of the caret on the line.
@@ -207,9 +207,9 @@ get int GetEOLMode=2030(,)
# Set the current end of line mode.
set void SetEOLMode=2031(int eolMode,)
-# Set the current styling position to pos and the styling mask to mask.
-# The styling mask can be used to protect some bits in each styling byte from modification.
-fun void StartStyling=2032(position pos, int mask)
+# Set the current styling position to start.
+# The unused parameter is no longer used and should be set to 0.
+fun void StartStyling=2032(position start, int unused)
# Change style from current styling position for length characters to a style
# and move the current styling position to after this newly styled segment.
@@ -346,7 +346,7 @@ fun int MarkerPrevious=2048(int lineStart, int markerMask)
fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap)
# Add a set of markers to a line.
-fun void MarkerAddSet=2466(int line, int set)
+fun void MarkerAddSet=2466(int line, int markerSet)
# Set the alpha used for a marker that is drawn in the text area, not the margin.
set void MarkerSetAlpha=2476(int markerNumber, int alpha)
@@ -360,6 +360,7 @@ val SC_MARGIN_BACK=2
val SC_MARGIN_FORE=3
val SC_MARGIN_TEXT=4
val SC_MARGIN_RTEXT=5
+val SC_MARGIN_COLOUR=6
# Set a margin to be either numeric or symbolic.
set void SetMarginTypeN=2240(int margin, int marginType)
@@ -391,6 +392,18 @@ set void SetMarginCursorN=2248(int margin, int cursor)
# Retrieve the cursor shown in a margin.
get int GetMarginCursorN=2249(int margin,)
+# Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR.
+set void SetMarginBackN=2250(int margin, colour back)
+
+# Retrieve the background colour of a margin
+get colour GetMarginBackN=2251(int margin,)
+
+# Allocate a non-standard number of margins.
+set void SetMargins=2252(int margins,)
+
+# How many margins are there?.
+get int GetMargins=2253(,)
+
# Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles.
# Style 39 is for future use.
enu StylesCommon=STYLE_
@@ -452,7 +465,7 @@ set void StyleSetSize=2055(int style, int sizePoints)
set void StyleSetFont=2056(int style, string fontName)
# Set a style to have its end of line filled or not.
-set void StyleSetEOLFilled=2057(int style, bool filled)
+set void StyleSetEOLFilled=2057(int style, bool eolFilled)
# Reset the default style to its state at startup
fun void StyleResetDefault=2058(,)
@@ -509,12 +522,12 @@ get bool StyleGetChangeable=2492(int style,)
get bool StyleGetHotSpot=2493(int style,)
# Set a style to be mixed case, or to force upper or lower case.
-set void StyleSetCase=2060(int style, int caseForce)
+set void StyleSetCase=2060(int style, int caseVisible)
val SC_FONT_SIZE_MULTIPLIER=100
# Set the size of characters of a style. Size is in points multiplied by 100.
-set void StyleSetSizeFractional=2061(int style, int caseForce)
+set void StyleSetSizeFractional=2061(int style, int sizeHundredthPoints)
# Get the size of characters of a style in points multiplied by 100
get int StyleGetSizeFractional=2062(int style,)
@@ -557,11 +570,11 @@ set void SetSelEOLFilled=2480(bool filled,)
# Set the foreground colour of the caret.
set void SetCaretFore=2069(colour fore,)
-# When key+modifier combination km is pressed perform msg.
-fun void AssignCmdKey=2070(keymod km, int msg)
+# When key+modifier combination keyDefinition is pressed perform sciCommand.
+fun void AssignCmdKey=2070(keymod keyDefinition, int sciCommand)
-# When key+modifier combination km is pressed do nothing.
-fun void ClearCmdKey=2071(keymod km,)
+# When key+modifier combination keyDefinition is pressed do nothing.
+fun void ClearCmdKey=2071(keymod keyDefinition,)
# Drop all key mappings.
fun void ClearAllCmdKeys=2072(,)
@@ -623,34 +636,34 @@ val INDIC2_MASK=0x80
val INDICS_MASK=0xE0
# Set an indicator to plain, squiggle or TT.
-set void IndicSetStyle=2080(int indic, int style)
+set void IndicSetStyle=2080(int indicator, int indicatorStyle)
# Retrieve the style of an indicator.
-get int IndicGetStyle=2081(int indic,)
+get int IndicGetStyle=2081(int indicator,)
# Set the foreground colour of an indicator.
-set void IndicSetFore=2082(int indic, colour fore)
+set void IndicSetFore=2082(int indicator, colour fore)
# Retrieve the foreground colour of an indicator.
-get colour IndicGetFore=2083(int indic,)
+get colour IndicGetFore=2083(int indicator,)
# Set an indicator to draw under text or over(default).
-set void IndicSetUnder=2510(int indic, bool under)
+set void IndicSetUnder=2510(int indicator, bool under)
# Retrieve whether indicator drawn under or over text.
-get bool IndicGetUnder=2511(int indic,)
+get bool IndicGetUnder=2511(int indicator,)
# Set a hover indicator to plain, squiggle or TT.
-set void IndicSetHoverStyle=2680(int indic, int style)
+set void IndicSetHoverStyle=2680(int indicator, int indicatorStyle)
# Retrieve the hover style of an indicator.
-get int IndicGetHoverStyle=2681(int indic,)
+get int IndicGetHoverStyle=2681(int indicator,)
# Set the foreground hover colour of an indicator.
-set void IndicSetHoverFore=2682(int indic, colour fore)
+set void IndicSetHoverFore=2682(int indicator, colour fore)
# Retrieve the foreground hover colour of an indicator.
-get colour IndicGetHoverFore=2683(int indic,)
+get colour IndicGetHoverFore=2683(int indicator,)
val SC_INDICVALUEBIT=0x1000000
val SC_INDICVALUEMASK=0xFFFFFF
@@ -659,10 +672,10 @@ enu IndicFlag=SC_INDICFLAG_
val SC_INDICFLAG_VALUEFORE=1
# Set the attributes of an indicator.
-set void IndicSetFlags=2684(int indic, int flags)
+set void IndicSetFlags=2684(int indicator, int flags)
# Retrieve the attributes of an indicator.
-get int IndicGetFlags=2685(int indic,)
+get int IndicGetFlags=2685(int indicator,)
# Set the foreground colour of all whitespace and whether to use this setting.
fun void SetWhitespaceFore=2084(bool useSetting, colour fore)
@@ -710,9 +723,9 @@ set void SetCaretLineBack=2098(colour back,)
set void StyleSetChangeable=2099(int style, bool changeable)
# Display a auto-completion list.
-# The lenEntered parameter indicates how many characters before
+# The lengthEntered parameter indicates how many characters before
# the caret should be used to provide context.
-fun void AutoCShow=2100(int lenEntered, string itemList)
+fun void AutoCShow=2100(int lengthEntered, string itemList)
# Remove the auto-completion list from the screen.
fun void AutoCCancel=2101(,)
@@ -737,7 +750,7 @@ set void AutoCSetSeparator=2106(int separatorCharacter,)
get int AutoCGetSeparator=2107(,)
# Select the item in the auto-completion list that starts with a string.
-fun void AutoCSelect=2108(, string text)
+fun void AutoCSelect=2108(, string select)
# Should the auto-completion list be cancelled if the user backspaces to a
# position before where the box was created.
@@ -820,7 +833,7 @@ set void SetUseTabs=2124(bool useTabs,)
get bool GetUseTabs=2125(,)
# Change the indentation of a line to a number of columns.
-set void SetLineIndentation=2126(int line, int indentSize)
+set void SetLineIndentation=2126(int line, int indentation)
# Retrieve the number of columns that a line is indented.
get int GetLineIndentation=2127(int line,)
@@ -832,10 +845,10 @@ get position GetLineIndentPosition=2128(int line,)
get int GetColumn=2129(position pos,)
# Count characters between two positions.
-fun int CountCharacters=2633(int startPos, int endPos)
+fun int CountCharacters=2633(position start, position end)
# Show or hide the horizontal scroll bar.
-set void SetHScrollBar=2130(bool show,)
+set void SetHScrollBar=2130(bool visible,)
# Is the horizontal scroll bar visible?
get bool GetHScrollBar=2131(,)
@@ -871,22 +884,22 @@ get colour GetCaretFore=2138(,)
get bool GetReadOnly=2140(,)
# Sets the position of the caret.
-set void SetCurrentPos=2141(position pos,)
+set void SetCurrentPos=2141(position caret,)
# Sets the position that starts the selection - this becomes the anchor.
-set void SetSelectionStart=2142(position pos,)
+set void SetSelectionStart=2142(position anchor,)
# Returns the position at the start of the selection.
get position GetSelectionStart=2143(,)
-# Sets the position that ends the selection - this becomes the currentPosition.
-set void SetSelectionEnd=2144(position pos,)
+# Sets the position that ends the selection - this becomes the caret.
+set void SetSelectionEnd=2144(position caret,)
# Returns the position at the end of the selection.
get position GetSelectionEnd=2145(,)
# Set caret to a position, while removing any existing selection.
-fun void SetEmptySelection=2556(position pos,)
+fun void SetEmptySelection=2556(position caret,)
# Sets the print magnification added to the point size of each style for printing.
set void SetPrintMagnification=2146(int magnification,)
@@ -921,7 +934,7 @@ val SCFIND_POSIX=0x00400000
val SCFIND_CXX11REGEX=0x00800000
# Find some text in the document.
-fun position FindText=2150(int flags, findtext ft)
+fun position FindText=2150(int searchFlags, findtext ft)
# On Windows, will draw the document into a display context such as a printer.
fun position FormatRange=2151(bool draw, formatrange fr)
@@ -952,7 +965,7 @@ get int GetMarginRight=2158(,)
get bool GetModify=2159(,)
# Select a range of text.
-fun void SetSel=2160(position start, position end)
+fun void SetSel=2160(position anchor, position caret)
# Retrieve the selected text.
# Return the length of the text.
@@ -964,7 +977,7 @@ fun int GetSelText=2161(, stringresult text)
fun int GetTextRange=2162(, textrange tr)
# Draw the selection in normal style or with selection highlighted.
-fun void HideSelection=2163(bool normal,)
+fun void HideSelection=2163(bool hide,)
# Retrieve the x value of the point in the window where a position is displayed.
fun int PointXFromPosition=2164(, position pos)
@@ -1041,7 +1054,7 @@ get int GetDirectFunction=2184(,)
get int GetDirectPointer=2185(,)
# Set to overtype (true) or insert mode.
-set void SetOvertype=2186(bool overtype,)
+set void SetOvertype=2186(bool overType,)
# Returns true if overtype mode is active otherwise false is returned.
get bool GetOvertype=2187(,)
@@ -1054,14 +1067,14 @@ get int GetCaretWidth=2189(,)
# Sets the position that starts the target which is used for updating the
# document without affecting the scroll position.
-set void SetTargetStart=2190(position pos,)
+set void SetTargetStart=2190(position start,)
# Get the position that starts the target.
get position GetTargetStart=2191(,)
# Sets the position that ends the target which is used for updating the
# document without affecting the scroll position.
-set void SetTargetEnd=2192(position pos,)
+set void SetTargetEnd=2192(position end,)
# Get the position that ends the target.
get position GetTargetEnd=2193(,)
@@ -1070,7 +1083,7 @@ get position GetTargetEnd=2193(,)
fun void SetTargetRange=2686(position start, position end)
# Retrieve the text in the target.
-get int GetTargetText=2687(, stringresult characters)
+get int GetTargetText=2687(, stringresult text)
# Make the target range start and end be the same as the selection range start and end.
fun void TargetFromSelection=2287(,)
@@ -1097,7 +1110,7 @@ fun int ReplaceTargetRE=2195(int length, string text)
fun int SearchInTarget=2197(int length, string text)
# Set the search flags used by SearchInTarget.
-set void SetSearchFlags=2198(int flags,)
+set void SetSearchFlags=2198(int searchFlags,)
# Get the search flags used by SearchInTarget.
get int GetSearchFlags=2199(,)
@@ -1118,7 +1131,7 @@ fun position CallTipPosStart=2203(,)
set void CallTipSetPosStart=2214(int posStart,)
# Highlight a segment of the definition.
-fun void CallTipSetHlt=2204(int start, int end)
+fun void CallTipSetHlt=2204(int highlightStart, int highlightEnd)
# Set the background colour for the call tip.
set void CallTipSetBack=2205(colour back,)
@@ -1136,13 +1149,13 @@ set void CallTipUseStyle=2212(int tabSize,)
set void CallTipSetPosition=2213(bool above,)
# Find the display line of a document line taking hidden lines into account.
-fun int VisibleFromDocLine=2220(int line,)
+fun int VisibleFromDocLine=2220(int docLine,)
# Find the document line of a display line taking hidden lines into account.
-fun int DocLineFromVisible=2221(int lineDisplay,)
+fun int DocLineFromVisible=2221(int displayLine,)
# The number of display lines needed to wrap a document line
-fun int WrapCount=2235(int line,)
+fun int WrapCount=2235(int docLine,)
enu FoldLevel=SC_FOLDLEVEL
val SC_FOLDLEVELBASE=0x400
@@ -1185,7 +1198,7 @@ get bool GetFoldExpanded=2230(int line,)
# Switch a header line between expanded and contracted.
fun void ToggleFold=2231(int line,)
-enu FoldAction=SC_FOLDACTION
+enu FoldAction=SC_FOLDACTION_
val SC_FOLDACTION_CONTRACT=0
val SC_FOLDACTION_EXPAND=1
val SC_FOLDACTION_TOGGLE=2
@@ -1279,7 +1292,7 @@ val SC_WRAP_CHAR=2
val SC_WRAP_WHITESPACE=3
# Sets whether text is word wrapped.
-set void SetWrapMode=2268(int mode,)
+set void SetWrapMode=2268(int wrapMode,)
# Retrieve whether text is word wrapped.
get int GetWrapMode=2269(,)
@@ -1319,7 +1332,7 @@ val SC_WRAPINDENT_SAME=1
val SC_WRAPINDENT_INDENT=2
# Sets how wrapped sublines are placed. Default is fixed.
-set void SetWrapIndentMode=2472(int mode,)
+set void SetWrapIndentMode=2472(int wrapIndentMode,)
# Retrieve how wrapped sublines are placed. Default is fixed.
get int GetWrapIndentMode=2473(,)
@@ -1331,7 +1344,7 @@ val SC_CACHE_PAGE=2
val SC_CACHE_DOCUMENT=3
# Sets the degree of caching of layout information.
-set void SetLayoutCache=2272(int mode,)
+set void SetLayoutCache=2272(int cacheMode,)
# Retrieve the degree of caching of layout information.
get int GetLayoutCache=2273(,)
@@ -1366,7 +1379,7 @@ get bool GetEndAtLastLine=2278(,)
fun int TextHeight=2279(int line,)
# Show or hide the vertical scroll bar.
-set void SetVScrollBar=2280(bool show,)
+set void SetVScrollBar=2280(bool visible,)
# Is the vertical scroll bar visible?
get bool GetVScrollBar=2281(,)
@@ -1381,7 +1394,7 @@ get bool GetTwoPhaseDraw=2283(,)
# and then the foreground. This avoids chopping off characters that overlap the next run.
set void SetTwoPhaseDraw=2284(bool twoPhase,)
-enu FontQuality=SC_PHASES_
+enu PhasesDraw=SC_PHASES_
val SC_PHASES_ONE=0
val SC_PHASES_TWO=1
val SC_PHASES_MULTIPLE=2
@@ -1411,7 +1424,7 @@ set void SetFontQuality=2611(int fontQuality,)
get int GetFontQuality=2612(,)
# Scroll so that a display line is at the top of the display.
-set void SetFirstVisibleLine=2613(int lineDisplay,)
+set void SetFirstVisibleLine=2613(int displayLine,)
enu MultiPaste=SC_MULTIPASTE_
val SC_MULTIPASTE_ONCE=0
@@ -1434,8 +1447,9 @@ fun void LinesJoin=2288(,)
# where possible.
fun void LinesSplit=2289(int pixelWidth,)
-# Set the colours used as a chequerboard pattern in the fold margin
+# Set one of the colours used as a chequerboard pattern in the fold margin
fun void SetFoldMarginColour=2290(bool useSetting, colour back)
+# Set the other colour used as a chequerboard pattern in the fold margin
fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore)
## New messages go here
@@ -1599,17 +1613,28 @@ fun void LineEndDisplay=2347(,)
# caret position.
fun void LineEndDisplayExtend=2348(,)
-# These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
-# except they behave differently when word-wrap is enabled:
-# They go first to the start / end of the display line, like (Home|LineEnd)Display
-# The difference is that, the cursor is already at the point, it goes on to the start
-# or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
-
+# Like Home but when word-wrap is enabled goes first to start of display line
+# HomeDisplay, then to start of document line Home.
fun void HomeWrap=2349(,)
+
+# Like HomeExtend but when word-wrap is enabled extends first to start of display line
+# HomeDisplayExtend, then to start of document line HomeExtend.
fun void HomeWrapExtend=2450(,)
+
+# Like LineEnd but when word-wrap is enabled goes first to end of display line
+# LineEndDisplay, then to start of document line LineEnd.
fun void LineEndWrap=2451(,)
+
+# Like LineEndExtend but when word-wrap is enabled extends first to end of display line
+# LineEndDisplayExtend, then to start of document line LineEndExtend.
fun void LineEndWrapExtend=2452(,)
+
+# Like VCHome but when word-wrap is enabled goes first to start of display line
+# VCHomeDisplay, then behaves like VCHome.
fun void VCHomeWrap=2453(,)
+
+# Like VCHomeExtend but when word-wrap is enabled extends first to start of display line
+# VCHomeDisplayExtend, then behaves like VCHomeExtend.
fun void VCHomeWrapExtend=2454(,)
# Copy the line containing the caret.
@@ -1622,19 +1647,20 @@ fun void MoveCaretInsideView=2401(,)
fun int LineLength=2350(int line,)
# Highlight the characters at two positions.
-fun void BraceHighlight=2351(position pos1, position pos2)
+fun void BraceHighlight=2351(position posA, position posB)
# Use specified indicator to highlight matching braces instead of changing their style.
-fun void BraceHighlightIndicator=2498(bool useBraceHighlightIndicator, int indicator)
+fun void BraceHighlightIndicator=2498(bool useSetting, int indicator)
# Highlight the character at a position indicating there is no matching brace.
fun void BraceBadLight=2352(position pos,)
# Use specified indicator to highlight non matching brace instead of changing its style.
-fun void BraceBadLightIndicator=2499(bool useBraceBadLightIndicator, int indicator)
+fun void BraceBadLightIndicator=2499(bool useSetting, int indicator)
# Find the position of a matching brace or INVALID_POSITION if no match.
-fun position BraceMatch=2353(position pos,)
+# The maxReStyle must be 0 for now. It may be defined in a future release.
+fun position BraceMatch=2353(position pos, int maxReStyle)
# Are the end of line characters visible?
get bool GetViewEOL=2355(,)
@@ -1646,15 +1672,16 @@ set void SetViewEOL=2356(bool visible,)
get int GetDocPointer=2357(,)
# Change the document object used.
-set void SetDocPointer=2358(, int pointer)
+set void SetDocPointer=2358(, int doc)
# Set which document modification events are sent to the container.
-set void SetModEventMask=2359(int mask,)
+set void SetModEventMask=2359(int eventMask,)
enu EdgeVisualStyle=EDGE_
val EDGE_NONE=0
val EDGE_LINE=1
val EDGE_BACKGROUND=2
+val EDGE_MULTILINE=3
# Retrieve the column number which text should be kept within.
get int GetEdgeColumn=2360(,)
@@ -1666,9 +1693,9 @@ set void SetEdgeColumn=2361(int column,)
# Retrieve the edge highlight mode.
get int GetEdgeMode=2362(,)
-# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
+# The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that
# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
-set void SetEdgeMode=2363(int mode,)
+set void SetEdgeMode=2363(int edgeMode,)
# Retrieve the colour used in edge indication.
get colour GetEdgeColour=2364(,)
@@ -1676,16 +1703,22 @@ get colour GetEdgeColour=2364(,)
# Change the colour used in edge indication.
set void SetEdgeColour=2365(colour edgeColour,)
+# Add a new vertical edge to the view.
+fun void MultiEdgeAddLine=2694(int column, colour edgeColour)
+
+# Clear all vertical edges.
+fun void MultiEdgeClearAll=2695(,)
+
# Sets the current caret position to be the search anchor.
fun void SearchAnchor=2366(,)
# Find some text starting at the search anchor.
# Does not ensure the selection is visible.
-fun int SearchNext=2367(int flags, string text)
+fun int SearchNext=2367(int searchFlags, string text)
# Find some text starting at the search anchor and moving backwards.
# Does not ensure the selection is visible.
-fun int SearchPrev=2368(int flags, string text)
+fun int SearchPrev=2368(int searchFlags, string text)
# Retrieves the number of lines completely visible.
get int LinesOnScreen=2370(,)
@@ -1699,7 +1732,7 @@ get bool SelectionIsRectangle=2372(,)
# Set the zoom level. This number of points is added to the size of all fonts.
# It may be positive to magnify or negative to reduce.
-set void SetZoom=2373(int zoom,)
+set void SetZoom=2373(int zoomInPoints,)
# Retrieve the zoom level.
get int GetZoom=2374(,)
@@ -1727,7 +1760,7 @@ val SC_STATUS_WARN_START=1000
val SC_STATUS_WARN_REGEX=1001
# Change error status - 0 = OK.
-set void SetStatus=2382(int statusCode,)
+set void SetStatus=2382(int status,)
# Get error status.
get int GetStatus=2383(,)
@@ -1736,6 +1769,11 @@ set void SetMouseDownCaptures=2384(bool captures,)
# Get whether mouse gets captured.
get bool GetMouseDownCaptures=2385(,)
+# Set whether the mouse wheel can be active outside the window.
+set void SetMouseWheelCaptures=2696(bool captures,)
+# Get whether mouse wheel can be active outside the window.
+get bool GetMouseWheelCaptures=2697(,)
+
enu CursorShape=SC_CURSOR
val SC_CURSORNORMAL=-1
val SC_CURSORARROW=2
@@ -1777,7 +1815,7 @@ fun void DelLineLeft=2395(,)
fun void DelLineRight=2396(,)
# Get and Set the xOffset (ie, horizontal scroll position).
-set void SetXOffset=2397(int newOffset,)
+set void SetXOffset=2397(int xOffset,)
get int GetXOffset=2398(,)
# Set the last x chosen value to be the caret x position.
@@ -1819,7 +1857,7 @@ fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop)
fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop)
# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
-set void SetPrintWrapMode=2406(int mode,)
+set void SetPrintWrapMode=2406(int wrapMode,)
# Is printing line wrapped?
get int GetPrintWrapMode=2407(,)
@@ -1848,10 +1886,13 @@ set void SetHotspotSingleLine=2421(bool singleLine,)
# Get the HotspotSingleLine property
get bool GetHotspotSingleLine=2497(,)
-# Move caret between paragraphs (delimited by empty lines).
+# Move caret down one paragraph (delimited by empty lines).
fun void ParaDown=2413(,)
+# Extend selection down one paragraph (delimited by empty lines).
fun void ParaDownExtend=2414(,)
+# Move caret up one paragraph (delimited by empty lines).
fun void ParaUp=2415(,)
+# Extend selection up one paragraph (delimited by empty lines).
fun void ParaUpExtend=2416(,)
# Given a valid document position, return the previous position taking code
@@ -1880,7 +1921,7 @@ val SC_SEL_THIN=3
# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
# by lines (SC_SEL_LINES).
-set void SetSelectionMode=2422(int mode,)
+set void SetSelectionMode=2422(int selectionMode,)
# Get the mode of the current selection.
get int GetSelectionMode=2423(,)
@@ -1970,7 +2011,7 @@ get int AutoCGetCurrent=2445(,)
# Get currently selected item text in the auto-completion list
# Returns the length of the item text
# Result is NUL-terminated.
-get int AutoCGetCurrentText=2610(, stringresult s)
+get int AutoCGetCurrentText=2610(, stringresult text)
enu CaseInsensitiveBehaviour=SC_CASEINSENSITIVEBEHAVIOUR_
val SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0
@@ -2080,22 +2121,22 @@ set void SetIndicatorValue=2502(int value,)
get int GetIndicatorValue=2503(,)
# Turn a indicator on over a range.
-fun void IndicatorFillRange=2504(int position, int fillLength)
+fun void IndicatorFillRange=2504(position start, int lengthFill)
# Turn a indicator off over a range.
-fun void IndicatorClearRange=2505(int position, int clearLength)
+fun void IndicatorClearRange=2505(position start, int lengthClear)
-# Are any indicators present at position?
-fun int IndicatorAllOnFor=2506(int position,)
+# Are any indicators present at pos?
+fun int IndicatorAllOnFor=2506(position pos,)
-# What value does a particular indicator have at at a position?
-fun int IndicatorValueAt=2507(int indicator, int position)
+# What value does a particular indicator have at a position?
+fun int IndicatorValueAt=2507(int indicator, position pos)
# Where does a particular indicator start?
-fun int IndicatorStart=2508(int indicator, int position)
+fun int IndicatorStart=2508(int indicator, position pos)
# Where does a particular indicator end?
-fun int IndicatorEnd=2509(int indicator, int position)
+fun int IndicatorEnd=2509(int indicator, position pos)
# Set number of entries in position cache
set void SetPositionCache=2514(int size,)
@@ -2112,8 +2153,8 @@ get int GetCharacterPointer=2520(,)
# Return a read-only pointer to a range of characters in the document.
# May move the gap so that the range is contiguous, but will only move up
-# to rangeLength bytes.
-get int GetRangePointer=2643(int position, int rangeLength)
+# to lengthRange bytes.
+get int GetRangePointer=2643(position start, int lengthRange)
# Return a position which, to avoid performance costs, should not be within
# the range of a call to GetRangePointer.
@@ -2268,7 +2309,7 @@ set void SetAdditionalCaretsBlink=2567(bool additionalCaretsBlink,)
get bool GetAdditionalCaretsBlink=2568(,)
# Set whether additional carets are visible
-set void SetAdditionalCaretsVisible=2608(bool additionalCaretsBlink,)
+set void SetAdditionalCaretsVisible=2608(bool additionalCaretsVisible,)
# Whether additional carets are visible
get bool GetAdditionalCaretsVisible=2609(,)
@@ -2283,10 +2324,10 @@ get bool GetSelectionEmpty=2650(,)
fun void ClearSelections=2571(,)
# Set a simple selection
-fun int SetSelection=2572(int caret, int anchor)
+fun int SetSelection=2572(position caret, position anchor)
# Add a selection
-fun int AddSelection=2573(int caret, int anchor)
+fun int AddSelection=2573(position caret, position anchor)
# Drop one selection
fun void DropSelectionN=2671(int selection,)
@@ -2297,34 +2338,50 @@ set void SetMainSelection=2574(int selection,)
# Which selection is the main selection
get int GetMainSelection=2575(,)
-set void SetSelectionNCaret=2576(int selection, position pos)
+# Set the caret position of the nth selection.
+set void SetSelectionNCaret=2576(int selection, position caret)
+# Return the caret position of the nth selection.
get position GetSelectionNCaret=2577(int selection,)
-set void SetSelectionNAnchor=2578(int selection, position posAnchor)
+# Set the anchor position of the nth selection.
+set void SetSelectionNAnchor=2578(int selection, position anchor)
+# Return the anchor position of the nth selection.
get position GetSelectionNAnchor=2579(int selection,)
+# Set the virtual space of the caret of the nth selection.
set void SetSelectionNCaretVirtualSpace=2580(int selection, int space)
+# Return the virtual space of the caret of the nth selection.
get int GetSelectionNCaretVirtualSpace=2581(int selection,)
+# Set the virtual space of the anchor of the nth selection.
set void SetSelectionNAnchorVirtualSpace=2582(int selection, int space)
+# Return the virtual space of the anchor of the nth selection.
get int GetSelectionNAnchorVirtualSpace=2583(int selection,)
# Sets the position that starts the selection - this becomes the anchor.
-set void SetSelectionNStart=2584(int selection, position pos)
+set void SetSelectionNStart=2584(int selection, position anchor)
# Returns the position at the start of the selection.
get position GetSelectionNStart=2585(int selection,)
# Sets the position that ends the selection - this becomes the currentPosition.
-set void SetSelectionNEnd=2586(int selection, position pos)
+set void SetSelectionNEnd=2586(int selection, position caret)
# Returns the position at the end of the selection.
get position GetSelectionNEnd=2587(int selection,)
-set void SetRectangularSelectionCaret=2588(position pos,)
+# Set the caret position of the rectangular selection.
+set void SetRectangularSelectionCaret=2588(position caret,)
+# Return the caret position of the rectangular selection.
get position GetRectangularSelectionCaret=2589(,)
-set void SetRectangularSelectionAnchor=2590(position posAnchor,)
+# Set the anchor position of the rectangular selection.
+set void SetRectangularSelectionAnchor=2590(position anchor,)
+# Return the anchor position of the rectangular selection.
get position GetRectangularSelectionAnchor=2591(,)
+# Set the virtual space of the caret of the rectangular selection.
set void SetRectangularSelectionCaretVirtualSpace=2592(int space,)
+# Return the virtual space of the caret of the rectangular selection.
get int GetRectangularSelectionCaretVirtualSpace=2593(,)
+# Set the virtual space of the anchor of the rectangular selection.
set void SetRectangularSelectionAnchorVirtualSpace=2594(int space,)
+# Return the virtual space of the anchor of the rectangular selection.
get int GetRectangularSelectionAnchorVirtualSpace=2595(,)
enu VirtualSpace=SCVS_
@@ -2333,7 +2390,9 @@ val SCVS_RECTANGULARSELECTION=1
val SCVS_USERACCESSIBLE=2
val SCVS_NOWRAPLINESTART=4
+# Set options for virtual space behaviour.
set void SetVirtualSpaceOptions=2596(int virtualSpaceOptions,)
+# Return options for virtual space behaviour.
get int GetVirtualSpaceOptions=2597(,)
# On GTK+, allow selecting the modifier key to use for mouse-based
@@ -2510,7 +2569,7 @@ set void SetProperty=4004(string key, string value)
val KEYWORDSET_MAX=8
# Set up the key words used by the lexer.
-set void SetKeyWords=4005(int keywordSet, string keyWords)
+set void SetKeyWords=4005(int keyWordSet, string keyWords)
# Set the lexing language of the document based on string name.
set void SetLexerLanguage=4006(, string language)
@@ -2520,16 +2579,16 @@ fun void LoadLexerLibrary=4007(, string path)
# Retrieve a "property" value previously set with SetProperty.
# Result is NUL-terminated.
-get int GetProperty=4008(string key, stringresult buf)
+get int GetProperty=4008(string key, stringresult value)
# Retrieve a "property" value previously set with SetProperty,
# with "$()" variable replacement on returned buffer.
# Result is NUL-terminated.
-get int GetPropertyExpanded=4009(string key, stringresult buf)
+get int GetPropertyExpanded=4009(string key, stringresult value)
# Retrieve a "property" value previously set with SetProperty,
# interpreted as an int AFTER any "$()" variable replacement.
-get int GetPropertyInt=4010(string key,)
+get int GetPropertyInt=4010(string key, int defaultValue)
# Retrieve the number of bits the current lexer needs for styling.
get int GetStyleBitsNeeded=4011(,)
@@ -2537,7 +2596,7 @@ get int GetStyleBitsNeeded=4011(,)
# Retrieve the name of the lexer.
# Return the length of the text.
# Result is NUL-terminated.
-get int GetLexerLanguage=4012(, stringresult text)
+get int GetLexerLanguage=4012(, stringresult language)
# For private communication between an application and a known lexer.
fun int PrivateLexerCall=4013(int operation, int pointer)
@@ -3336,6 +3395,20 @@ val SCE_BAAN_OPERATOR=7
val SCE_BAAN_IDENTIFIER=8
val SCE_BAAN_STRINGEOL=9
val SCE_BAAN_WORD2=10
+val SCE_BAAN_WORD3=11
+val SCE_BAAN_WORD4=12
+val SCE_BAAN_WORD5=13
+val SCE_BAAN_WORD6=14
+val SCE_BAAN_WORD7=15
+val SCE_BAAN_WORD8=16
+val SCE_BAAN_WORD9=17
+val SCE_BAAN_TABLEDEF=18
+val SCE_BAAN_TABLESQL=19
+val SCE_BAAN_FUNCTION=20
+val SCE_BAAN_DOMDEF=21
+val SCE_BAAN_FUNCDEF=22
+val SCE_BAAN_OBJECTDEF=23
+val SCE_BAAN_DEFINEDEF=24
# Lexical states for SCLEX_LISP
lex Lisp=SCLEX_LISP SCE_LISP_
val SCE_LISP_DEFAULT=0
@@ -4110,39 +4183,20 @@ val SCE_PLM_OPERATOR=5
val SCE_PLM_CONTROL=6
val SCE_PLM_KEYWORD=7
# Lexical state for SCLEX_PROGRESS
-lex Progress=SCLEX_PROGRESS SCE_4GL_
-val SCE_4GL_DEFAULT=0
-val SCE_4GL_NUMBER=1
-val SCE_4GL_WORD=2
-val SCE_4GL_STRING=3
-val SCE_4GL_CHARACTER=4
-val SCE_4GL_PREPROCESSOR=5
-val SCE_4GL_OPERATOR=6
-val SCE_4GL_IDENTIFIER=7
-val SCE_4GL_BLOCK=8
-val SCE_4GL_END=9
-val SCE_4GL_COMMENT1=10
-val SCE_4GL_COMMENT2=11
-val SCE_4GL_COMMENT3=12
-val SCE_4GL_COMMENT4=13
-val SCE_4GL_COMMENT5=14
-val SCE_4GL_COMMENT6=15
-val SCE_4GL_DEFAULT_=16
-val SCE_4GL_NUMBER_=17
-val SCE_4GL_WORD_=18
-val SCE_4GL_STRING_=19
-val SCE_4GL_CHARACTER_=20
-val SCE_4GL_PREPROCESSOR_=21
-val SCE_4GL_OPERATOR_=22
-val SCE_4GL_IDENTIFIER_=23
-val SCE_4GL_BLOCK_=24
-val SCE_4GL_END_=25
-val SCE_4GL_COMMENT1_=26
-val SCE_4GL_COMMENT2_=27
-val SCE_4GL_COMMENT3_=28
-val SCE_4GL_COMMENT4_=29
-val SCE_4GL_COMMENT5_=30
-val SCE_4GL_COMMENT6_=31
+lex Progress=SCLEX_PROGRESS SCE_ABL_
+val SCE_ABL_DEFAULT=0
+val SCE_ABL_NUMBER=1
+val SCE_ABL_WORD=2
+val SCE_ABL_STRING=3
+val SCE_ABL_CHARACTER=4
+val SCE_ABL_PREPROCESSOR=5
+val SCE_ABL_OPERATOR=6
+val SCE_ABL_IDENTIFIER=7
+val SCE_ABL_BLOCK=8
+val SCE_ABL_END=9
+val SCE_ABL_COMMENT=10
+val SCE_ABL_TASKMARKER=11
+val SCE_ABL_LINECOMMENT=12
# Lexical states for SCLEX_ABAQUS
lex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_
val SCE_ABAQUS_DEFAULT=0
diff --git a/scintilla/lexers/LexBaan.cxx b/scintilla/lexers/LexBaan.cxx
index 8b9905f..bdc6b32 100644
--- a/scintilla/lexers/LexBaan.cxx
+++ b/scintilla/lexers/LexBaan.cxx
@@ -1,134 +1,581 @@
// Scintilla source code edit control
/** @file LexBaan.cxx
- ** Lexer for Baan.
- ** Based heavily on LexCPP.cxx
- **/
+** Lexer for Baan.
+** Based heavily on LexCPP.cxx
+**/
// Copyright 2001- by Vamsi Potluru <vamsi@who.net> & Praveen Ambekar <ambekarpraveen@yahoo.com>
// The License.txt file describes the conditions under which this software may be distributed.
+// C standard library
#include <stdlib.h>
#include <string.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <ctype.h>
+// C++ wrappers of C standard library
+#include <cassert>
+
+// C++ standard library
+#include <string>
+#include <map>
+
+// Scintilla headers
+
+// Non-platform-specific headers
+
+// include
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
+// lexlib
#include "WordList.h"
#include "LexAccessor.h"
-#include "Accessor.h"
#include "StyleContext.h"
#include "CharacterSet.h"
#include "LexerModule.h"
+#include "OptionSet.h"
-#ifdef SCI_NAMESPACE
+# ifdef SCI_NAMESPACE
using namespace Scintilla;
-#endif
+# endif
+
+namespace {
+ // Use an unnamed namespace to protect the functions and classes from name conflicts
+
+// Options used for LexerBaan
+struct OptionsBaan {
+ bool fold;
+ bool foldComment;
+ bool foldPreprocessor;
+ bool foldCompact;
+ bool baanFoldSyntaxBased;
+ bool baanFoldKeywordsBased;
+ bool baanStylingWithinPreprocessor;
+ OptionsBaan() {
+ fold = false;
+ foldComment = false;
+ foldPreprocessor = false;
+ foldCompact = false;
+ baanFoldSyntaxBased = false;
+ baanFoldKeywordsBased = false;
+ baanStylingWithinPreprocessor = false;
+ }
+};
+
+const char *const baanWordLists[] = {
+ "Baan & BaanSQL Reserved Keywords ",
+ "Baan Standard functions",
+ "Baan Functions Abridged",
+ "Baan Main Sections ",
+ "Baan Sub Sections",
+ "PreDefined Variables",
+ "PreDefined Attributes",
+ "Enumerates",
+ 0,
+};
+
+struct OptionSetBaan : public OptionSet<OptionsBaan> {
+ OptionSetBaan() {
+ DefineProperty("fold", &OptionsBaan::fold);
+
+ DefineProperty("fold.comment", &OptionsBaan::foldComment);
+
+ DefineProperty("fold.preprocessor", &OptionsBaan::foldPreprocessor);
+
+ DefineProperty("fold.compact", &OptionsBaan::foldCompact);
+
+ DefineProperty("fold.baan.syntax.based", &OptionsBaan::baanFoldSyntaxBased,
+ "Set this property to 0 to disable syntax based folding, which is folding based on '{' & '('.");
+
+ DefineProperty("fold.baan.keywords.based", &OptionsBaan::baanFoldKeywordsBased,
+ "Set this property to 0 to disable keywords based folding, which is folding based on "
+ " for, if, on (case), repeat, select, while and fold ends based on endfor, endif, endcase, until, endselect, endwhile respectively.");
+
+ DefineProperty("lexer.baan.styling.within.preprocessor", &OptionsBaan::baanStylingWithinPreprocessor,
+ "For Baan code, determines whether all preprocessor code is styled in the "
+ "preprocessor style (0, the default) or only from the initial # to the end "
+ "of the command word(1).");
+
+ DefineWordListSets(baanWordLists);
+ }
+};
static inline bool IsAWordChar(const int ch) {
- return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$' || ch == ':');
+ return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$');
}
static inline bool IsAWordStart(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '_');
}
-static void ColouriseBaanDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],
- Accessor &styler) {
+static inline bool IsAnOperator(int ch) {
+ if (IsAlphaNumeric(ch))
+ return false;
+ if (ch == '#' || ch == '^' || ch == '&' || ch == '*' ||
+ ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
+ ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
+ ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
+ ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
+ ch == '?' || ch == '!' || ch == '"' || ch == '~' ||
+ ch == '\\')
+ return true;
+ return false;
+}
+
+static inline int IsAnyOtherIdentifier(char *s, int sLength) {
+
+ /* IsAnyOtherIdentifier uses standard templates used in baan.
+ The matching template is shown as comments just above the return condition.
+ ^ - refers to any character [a-z].
+ # - refers to any number [0-9].
+ Other characters shown are compared as is.
+ Tried implementing with Regex... it was too complicated for me.
+ Any other implementation suggestion welcome.
+ */
+ switch (sLength) {
+ case 8:
+ if (isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {
+ //^^^^^###
+ return(SCE_BAAN_TABLEDEF);
+ }
+ break;
+ case 9:
+ if (s[0] == 't' && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && isalpha(s[5]) && IsADigit(s[6]) && IsADigit(s[7]) && IsADigit(s[8])) {
+ //t^^^^^###
+ return(SCE_BAAN_TABLEDEF);
+ }
+ else if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {
+ //^^^^^###.
+ return(SCE_BAAN_TABLESQL);
+ }
+ break;
+ case 13:
+ if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {
+ //^^^^^###.****
+ return(SCE_BAAN_TABLESQL);
+ }
+ else if (s[0] == 'r' && s[1] == 'c' && s[2] == 'd' && s[3] == '.' && s[4] == 't' && isalpha(s[5]) && isalpha(s[6]) && isalpha(s[7]) && isalpha(s[8]) && isalpha(s[9]) && IsADigit(s[10]) && IsADigit(s[11]) && IsADigit(s[12])) {
+ //rcd.t^^^^^###
+ return(SCE_BAAN_TABLEDEF);
+ }
+ break;
+ case 14:
+ case 15:
+ if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {
+ if (s[13] != ':') {
+ //^^^^^###.******
+ return(SCE_BAAN_TABLESQL);
+ }
+ }
+ break;
+ case 16:
+ case 17:
+ if (s[8] == '.' && s[9] == '_' && s[10] == 'i' && s[11] == 'n' && s[12] == 'd' && s[13] == 'e' && s[14] == 'x' && IsADigit(s[15]) && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {
+ //^^^^^###._index##
+ return(SCE_BAAN_TABLEDEF);
+ }
+ else if (s[8] == '.' && s[9] == '_' && s[10] == 'c' && s[11] == 'o' && s[12] == 'm' && s[13] == 'p' && s[14] == 'n' && s[15] == 'r' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {
+ //^^^^^###._compnr
+ return(SCE_BAAN_TABLEDEF);
+ }
+ break;
+ default:
+ break;
+ }
+ if (sLength > 14 && s[5] == '.' && s[6] == 'd' && s[7] == 'l' && s[8] == 'l' && s[13] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[9]) && IsADigit(s[10]) && IsADigit(s[11]) && IsADigit(s[12])) {
+ //^^^^^.dll####.
+ return(SCE_BAAN_FUNCTION);
+ }
+ else if (sLength > 15 && s[2] == 'i' && s[3] == 'n' && s[4] == 't' && s[5] == '.' && s[6] == 'd' && s[7] == 'l' && s[8] == 'l' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[9]) && isalpha(s[10]) && isalpha(s[11]) && isalpha(s[12]) && isalpha(s[13])) {
+ //^^int.dll^^^^^.
+ return(SCE_BAAN_FUNCTION);
+ }
+ else if (sLength > 11 && s[0] == 'i' && s[10] == '.' && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && isalpha(s[5]) && IsADigit(s[6]) && IsADigit(s[7]) && IsADigit(s[8]) && IsADigit(s[9])) {
+ //i^^^^^####.
+ return(SCE_BAAN_FUNCTION);
+ }
+
+ return(SCE_BAAN_DEFAULT);
+}
+
+static bool IsCommentLine(Sci_Position line, LexAccessor &styler) {
+ Sci_Position pos = styler.LineStart(line);
+ Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
+ for (Sci_Position i = pos; i < eol_pos; i++) {
+ char ch = styler[i];
+ int style = styler.StyleAt(i);
+ if (ch == '|' && style == SCE_BAAN_COMMENT)
+ return true;
+ else if (!IsASpaceOrTab(ch))
+ return false;
+ }
+ return false;
+}
+
+static bool IsPreProcLine(Sci_Position line, LexAccessor &styler) {
+ Sci_Position pos = styler.LineStart(line);
+ Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
+ for (Sci_Position i = pos; i < eol_pos; i++) {
+ char ch = styler[i];
+ if (ch == '#' || ch == '|' || ch == '^')
+ return true;
+ else if (!IsASpaceOrTab(ch))
+ return false;
+ }
+ return false;
+}
+
+static bool IsMainSectionLine(Sci_Position line, LexAccessor &styler) {
+ Sci_Position pos = styler.LineStart(line);
+ Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
+ for (Sci_Position i = pos; i < eol_pos; i++) {
+ char ch = styler[i];
+ int style = styler.StyleAt(i);
+ if (style == SCE_BAAN_WORD5)
+ return true;
+ else if (!IsASpaceOrTab(ch))
+ return false;
+ }
+ return false;
+}
+
+static inline int ToLowerCase(int c) {
+ if (c >= 'A' && c <= 'Z')
+ return 'a' + c - 'A';
+ return c;
+}
+
+static inline bool wordInArray(const std::string& value, std::string *array, int length)
+{
+ for (int i = 0; i < length; i++)
+ {
+ if (value == array[i])
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+class WordListAbridged : public WordList {
+public:
+ WordListAbridged() {
+ kwAbridged = false;
+ kwHasSection = false;
+ };
+ ~WordListAbridged() {
+ Clear();
+ };
+ bool kwAbridged;
+ bool kwHasSection;
+ bool Contains(const char *s) {
+ return kwAbridged ? InListAbridged(s, '~') : InList(s);
+ };
+};
+
+}
+
+class LexerBaan : public ILexer {
+ WordListAbridged keywords;
+ WordListAbridged keywords2;
+ WordListAbridged keywords3;
+ WordListAbridged keywords4;
+ WordListAbridged keywords5;
+ WordListAbridged keywords6;
+ WordListAbridged keywords7;
+ WordListAbridged keywords8;
+ WordListAbridged keywords9;
+ OptionsBaan options;
+ OptionSetBaan osBaan;
+public:
+ LexerBaan() {
+ }
+
+ virtual ~LexerBaan() {
+ }
+
+ int SCI_METHOD Version() const {
+ return lvOriginal;
+ }
+
+ void SCI_METHOD Release() {
+ delete this;
+ }
+
+ const char * SCI_METHOD PropertyNames() {
+ return osBaan.PropertyNames();
+ }
+
+ int SCI_METHOD PropertyType(const char * name) {
+ return osBaan.PropertyType(name);
+ }
+
+ const char * SCI_METHOD DescribeProperty(const char * name) {
+ return osBaan.DescribeProperty(name);
+ }
+
+ int SCI_METHOD PropertySet(const char *key, const char *val);
+
+ const char * SCI_METHOD DescribeWordListSets() {
+ return osBaan.DescribeWordListSets();
+ }
+
+ Sci_Position SCI_METHOD WordListSet(int n, const char *wl);
+
+ void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess);
+
+ void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess);
+
+ void * SCI_METHOD PrivateCall(int, void *) {
+ return NULL;
+ }
+
+ static ILexer * LexerFactoryBaan() {
+ return new LexerBaan();
+ }
+};
+
+Sci_Position SCI_METHOD LexerBaan::PropertySet(const char *key, const char *val) {
+ if (osBaan.PropertySet(&options, key, val)) {
+ return 0;
+ }
+ return -1;
+}
+
+Sci_Position SCI_METHOD LexerBaan::WordListSet(int n, const char *wl) {
+ WordListAbridged *WordListAbridgedN = 0;
+ switch (n) {
+ case 0:
+ WordListAbridgedN = &keywords;
+ break;
+ case 1:
+ WordListAbridgedN = &keywords2;
+ break;
+ case 2:
+ WordListAbridgedN = &keywords3;
+ break;
+ case 3:
+ WordListAbridgedN = &keywords4;
+ break;
+ case 4:
+ WordListAbridgedN = &keywords5;
+ break;
+ case 5:
+ WordListAbridgedN = &keywords6;
+ break;
+ case 6:
+ WordListAbridgedN = &keywords7;
+ break;
+ case 7:
+ WordListAbridgedN = &keywords8;
+ break;
+ case 8:
+ WordListAbridgedN = &keywords9;
+ break;
+ }
+ Sci_Position firstModification = -1;
+ if (WordListAbridgedN) {
+ WordListAbridged wlNew;
+ wlNew.Set(wl);
+ if (*WordListAbridgedN != wlNew) {
+ WordListAbridgedN->Set(wl);
+ WordListAbridgedN->kwAbridged = strchr(wl, '~') != NULL;
+ WordListAbridgedN->kwHasSection = strchr(wl, ':') != NULL;
- WordList &keywords = *keywordlists[0];
- WordList &keywords2 = *keywordlists[1];
- bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0;
+ firstModification = 0;
+ }
+ }
+ return firstModification;
+}
+
+void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
if (initStyle == SCE_BAAN_STRINGEOL) // Does not leak onto next line
initStyle = SCE_BAAN_DEFAULT;
int visibleChars = 0;
+ bool lineHasDomain = false;
+ bool lineHasFunction = false;
+ bool lineHasPreProc = false;
+ bool lineIgnoreString = false;
+ bool lineHasDefines = false;
+ LexAccessor styler(pAccess);
StyleContext sc(startPos, length, initStyle, styler);
for (; sc.More(); sc.Forward()) {
- if (sc.state == SCE_BAAN_OPERATOR) {
+ // Determine if the current state should terminate.
+ switch (sc.state) {
+ case SCE_BAAN_OPERATOR:
sc.SetState(SCE_BAAN_DEFAULT);
- } else if (sc.state == SCE_BAAN_NUMBER) {
+ break;
+ case SCE_BAAN_NUMBER:
if (!IsAWordChar(sc.ch)) {
sc.SetState(SCE_BAAN_DEFAULT);
}
- } else if (sc.state == SCE_BAAN_IDENTIFIER) {
+ break;
+ case SCE_BAAN_IDENTIFIER:
if (!IsAWordChar(sc.ch)) {
- char s[100];
+ char s[1000];
+ char s1[1000];
sc.GetCurrentLowered(s, sizeof(s));
- if (keywords.InList(s)) {
+ if (sc.ch == ':') {
+ memcpy(s1, s, sizeof(s));
+ s1[sc.LengthCurrent()] = sc.ch;
+ s1[sc.LengthCurrent() + 1] = '\0';
+ }
+ if ((keywords.kwHasSection && (sc.ch == ':')) ? keywords.Contains(s1) : keywords.Contains(s)) {
sc.ChangeState(SCE_BAAN_WORD);
- } else if (keywords2.InList(s)) {
+ if (0 == strcmp(s, "domain")) {
+ lineHasDomain = true;
+ }
+ else if (0 == strcmp(s, "function")) {
+ lineHasFunction = true;
+ }
+ }
+ else if (lineHasDomain) {
+ sc.ChangeState(SCE_BAAN_DOMDEF);
+ lineHasDomain = false;
+ }
+ else if (lineHasFunction) {
+ sc.ChangeState(SCE_BAAN_FUNCDEF);
+ lineHasFunction = false;
+ }
+ else if ((keywords2.kwHasSection && (sc.ch == ':')) ? keywords2.Contains(s1) : keywords2.Contains(s)) {
sc.ChangeState(SCE_BAAN_WORD2);
}
+ else if ((keywords3.kwHasSection && (sc.ch == ':')) ? keywords3.Contains(s1) : keywords3.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD3);
+ }
+ else if ((keywords4.kwHasSection && (sc.ch == ':')) ? keywords4.Contains(s1) : keywords4.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD4);
+ }
+ else if ((keywords5.kwHasSection && (sc.ch == ':')) ? keywords5.Contains(s1) : keywords5.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD5);
+ }
+ else if ((keywords6.kwHasSection && (sc.ch == ':')) ? keywords6.Contains(s1) : keywords6.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD6);
+ }
+ else if ((keywords7.kwHasSection && (sc.ch == ':')) ? keywords7.Contains(s1) : keywords7.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD7);
+ }
+ else if ((keywords8.kwHasSection && (sc.ch == ':')) ? keywords8.Contains(s1) : keywords8.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD8);
+ }
+ else if ((keywords9.kwHasSection && (sc.ch == ':')) ? keywords9.Contains(s1) : keywords9.Contains(s)) {
+ sc.ChangeState(SCE_BAAN_WORD9);
+ }
+ else if (lineHasPreProc) {
+ sc.ChangeState(SCE_BAAN_OBJECTDEF);
+ lineHasPreProc = false;
+ }
+ else if (lineHasDefines) {
+ sc.ChangeState(SCE_BAAN_DEFINEDEF);
+ lineHasDefines = false;
+ }
+ else {
+ int state = IsAnyOtherIdentifier(s, sc.LengthCurrent());
+ if (state > 0) {
+ sc.ChangeState(state);
+ }
+ }
sc.SetState(SCE_BAAN_DEFAULT);
}
- } else if (sc.state == SCE_BAAN_PREPROCESSOR) {
- if (stylingWithinPreprocessor) {
- if (IsASpace(sc.ch)) {
+ break;
+ case SCE_BAAN_PREPROCESSOR:
+ if (options.baanStylingWithinPreprocessor) {
+ if (IsASpace(sc.ch) || IsAnOperator(sc.ch)) {
sc.SetState(SCE_BAAN_DEFAULT);
}
- } else {
+ }
+ else {
if (sc.atLineEnd && (sc.chNext != '^')) {
sc.SetState(SCE_BAAN_DEFAULT);
}
}
- } else if (sc.state == SCE_BAAN_COMMENT) {
+ break;
+ case SCE_BAAN_COMMENT:
if (sc.atLineEnd) {
sc.SetState(SCE_BAAN_DEFAULT);
}
- } else if (sc.state == SCE_BAAN_COMMENTDOC) {
+ break;
+ case SCE_BAAN_COMMENTDOC:
if (sc.MatchIgnoreCase("enddllusage")) {
- for (unsigned int i = 0; i < 10; i++){
+ for (unsigned int i = 0; i < 10; i++) {
sc.Forward();
}
sc.ForwardSetState(SCE_BAAN_DEFAULT);
}
- } else if (sc.state == SCE_BAAN_STRING) {
+ else if (sc.MatchIgnoreCase("endfunctionusage")) {
+ for (unsigned int i = 0; i < 15; i++) {
+ sc.Forward();
+ }
+ sc.ForwardSetState(SCE_BAAN_DEFAULT);
+ }
+ break;
+ case SCE_BAAN_STRING:
if (sc.ch == '\"') {
sc.ForwardSetState(SCE_BAAN_DEFAULT);
- } else if ((sc.atLineEnd) && (sc.chNext != '^')) {
+ }
+ else if ((sc.atLineEnd) && (sc.chNext != '^')) {
sc.ChangeState(SCE_BAAN_STRINGEOL);
- sc.ForwardSetState(SCE_C_DEFAULT);
+ sc.ForwardSetState(SCE_BAAN_DEFAULT);
visibleChars = 0;
}
+ break;
}
+ // Determine if a new state should be entered.
if (sc.state == SCE_BAAN_DEFAULT) {
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
sc.SetState(SCE_BAAN_NUMBER);
- } else if (sc.MatchIgnoreCase("dllusage")){
- sc.SetState(SCE_BAAN_COMMENTDOC);
- do {
- sc.Forward();
- } while ((!sc.atLineEnd) && sc.More());
- } else if (IsAWordStart(sc.ch)) {
- sc.SetState(SCE_BAAN_IDENTIFIER);
- } else if (sc.Match('|')){
- sc.SetState(SCE_BAAN_COMMENT);
- } else if (sc.ch == '\"') {
+ }
+ else if (sc.MatchIgnoreCase("dllusage") || sc.MatchIgnoreCase("functionusage")) {
+ sc.SetState(SCE_BAAN_COMMENTDOC);
+ do {
+ sc.Forward();
+ } while ((!sc.atLineEnd) && sc.More());
+ }
+ else if (IsAWordStart(sc.ch)) {
+ sc.SetState(SCE_BAAN_IDENTIFIER);
+ }
+ else if (sc.Match('|')) {
+ sc.SetState(SCE_BAAN_COMMENT);
+ }
+ else if (sc.ch == '\"' && !(lineIgnoreString)) {
sc.SetState(SCE_BAAN_STRING);
- } else if (sc.ch == '#' && visibleChars == 0) {
+ }
+ else if (sc.ch == '#' && visibleChars == 0) {
// Preprocessor commands are alone on their line
sc.SetState(SCE_BAAN_PREPROCESSOR);
// Skip whitespace between # and preprocessor word
do {
sc.Forward();
} while (IsASpace(sc.ch) && sc.More());
- } else if (isoperator(static_cast<char>(sc.ch))) {
+ if (sc.MatchIgnoreCase("pragma") || sc.MatchIgnoreCase("include")) {
+ lineHasPreProc = true;
+ lineIgnoreString = true;
+ }
+ else if (sc.MatchIgnoreCase("define") || sc.MatchIgnoreCase("undef")) {
+ lineHasDefines = true;
+ lineIgnoreString = false;
+ }
+ }
+ else if (IsAnOperator(static_cast<char>(sc.ch))) {
sc.SetState(SCE_BAAN_OPERATOR);
}
}
+
if (sc.atLineEnd) {
// Reset states to begining of colourise so no surprises
// if different sets of lines lexed.
visibleChars = 0;
+ lineHasDomain = false;
+ lineHasFunction = false;
+ lineHasPreProc = false;
+ lineIgnoreString = false;
+ lineHasDefines = false;
}
if (!IsASpace(sc.ch)) {
visibleChars++;
@@ -137,44 +584,204 @@ static void ColouriseBaanDoc(Sci_PositionU startPos, Sci_Position length, int in
sc.Complete();
}
-static void FoldBaanDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],
- Accessor &styler) {
- bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
- bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
+void SCI_METHOD LexerBaan::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
+ if (!options.fold)
+ return;
+
+ char word[100];
+ int wordlen = 0;
+ bool foldStart = true;
+ bool foldNextSelect = true;
+ bool afterFunctionSection = false;
+ bool beforeDeclarationSection = false;
+
+ std::string startTags[6] = { "for", "if", "on", "repeat", "select", "while" };
+ std::string endTags[6] = { "endcase", "endfor", "endif", "endselect", "endwhile", "until" };
+ std::string selectCloseTags[5] = { "selectdo", "selecteos", "selectempty", "selecterror", "endselect" };
+
+ LexAccessor styler(pAccess);
Sci_PositionU endPos = startPos + length;
int visibleChars = 0;
Sci_Position lineCurrent = styler.GetLine(startPos);
- int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
+
+ // Backtrack to previous line in case need to fix its fold status
+ if (startPos > 0) {
+ if (lineCurrent > 0) {
+ lineCurrent--;
+ startPos = styler.LineStart(lineCurrent);
+ }
+ }
+
+ int levelPrev = SC_FOLDLEVELBASE;
+ if (lineCurrent > 0)
+ levelPrev = styler.LevelAt(lineCurrent - 1) >> 16;
int levelCurrent = levelPrev;
char chNext = styler[startPos];
- int styleNext = styler.StyleAt(startPos);
int style = initStyle;
+ int styleNext = styler.StyleAt(startPos);
+
for (Sci_PositionU i = startPos; i < endPos; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
- int stylePrev = style;
style = styleNext;
styleNext = styler.StyleAt(i + 1);
+ int stylePrev = (i) ? styler.StyleAt(i - 1) : SCE_BAAN_DEFAULT;
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
- if (foldComment &&
- (style == SCE_BAAN_COMMENT || style == SCE_BAAN_COMMENTDOC)) {
+
+ // Comment folding
+ if (options.foldComment && style == SCE_BAAN_COMMENTDOC) {
if (style != stylePrev) {
levelCurrent++;
- } else if ((style != styleNext) && !atEOL) {
- // Comments don't end at end of line and the next character may be unstyled.
+ }
+ else if (style != styleNext) {
levelCurrent--;
}
}
- if (style == SCE_BAAN_OPERATOR) {
- if (ch == '{') {
+ if (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) {
+ if (!IsCommentLine(lineCurrent - 1, styler)
+ && IsCommentLine(lineCurrent + 1, styler))
+ levelCurrent++;
+ else if (IsCommentLine(lineCurrent - 1, styler)
+ && !IsCommentLine(lineCurrent + 1, styler))
+ levelCurrent--;
+ }
+ // PreProcessor Folding
+ if (options.foldPreprocessor && atEOL && IsPreProcLine(lineCurrent, styler)) {
+ if (!IsPreProcLine(lineCurrent - 1, styler)
+ && IsPreProcLine(lineCurrent + 1, styler))
levelCurrent++;
- } else if (ch == '}') {
+ else if (IsPreProcLine(lineCurrent - 1, styler)
+ && !IsPreProcLine(lineCurrent + 1, styler))
levelCurrent--;
+ }
+ //Syntax Folding
+ if (options.baanFoldSyntaxBased && (style == SCE_BAAN_OPERATOR)) {
+ if (ch == '{' || ch == '(') {
+ levelCurrent++;
+ }
+ else if (ch == '}' || ch == ')') {
+ levelCurrent--;
+ }
+ }
+ //Keywords Folding
+ if (options.baanFoldKeywordsBased && style == SCE_BAAN_WORD) {
+ word[wordlen++] = static_cast<char>(ToLowerCase(ch));
+ if (wordlen == 100) { // prevent overflow
+ word[0] = '\0';
+ wordlen = 1;
+ }
+ if (styleNext != SCE_BAAN_WORD) {
+ word[wordlen] = '\0';
+ wordlen = 0;
+ if (strcmp(word, "for") == 0) {
+ Sci_PositionU j = i + 1;
+ while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {
+ j++;
+ }
+ if (styler.Match(j, "update")) {
+ // Means this is a "for update" used by Select which is already folded.
+ foldStart = false;
+ }
+ }
+ else if (strcmp(word, "on") == 0) {
+ Sci_PositionU j = i + 1;
+ while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {
+ j++;
+ }
+ if (!styler.Match(j, "case")) {
+ // Means this is not a "on Case" statement... could be "on" used by index.
+ foldStart = false;
+ }
+ }
+ else if (strcmp(word, "select") == 0) {
+ if (foldNextSelect) {
+ // Next Selects are sub-clause till reach of selectCloseTags[] array.
+ foldNextSelect = false;
+ foldStart = true;
+ }
+ else {
+ foldNextSelect = false;
+ foldStart = false;
+ }
+ }
+ else if (wordInArray(word, selectCloseTags, 5)) {
+ // select clause ends, next select clause can be folded.
+ foldNextSelect = true;
+ foldStart = true;
+ }
+ else {
+ foldStart = true;
+ }
+ if (foldStart) {
+ if (wordInArray(word, startTags, 6)) {
+ levelCurrent++;
+ }
+ else if (wordInArray(word, endTags, 6)) {
+ levelCurrent--;
+ }
+ }
+ }
+ }
+ // Main Section Foldings.
+ // One way of implementing Section Foldings, as there is no END markings of sections.
+ // first section ends on the previous line of next section.
+ // Re-written whole folding to accomodate this.
+ if (options.baanFoldKeywordsBased && atEOL) {
+ if (IsMainSectionLine(lineCurrent, styler)) {
+ if (levelCurrent < levelPrev)
+ --levelPrev;
+ for (Sci_Position j = styler.LineStart(lineCurrent); j < styler.LineStart(lineCurrent + 1) - 1; j++) {
+ if (IsASpaceOrTab(styler[j]))
+ continue;
+ else if (styler.StyleAt(j) == SCE_BAAN_WORD5) {
+ if (styler.Match(j, "functions:")) {
+ // Means functions: is the end of MainSections.
+ // Nothing to fold after this.
+ afterFunctionSection = true;
+ break;
+ }
+ else {
+ afterFunctionSection = false;
+ break;
+ }
+ }
+ else {
+ afterFunctionSection = false;
+ break;
+ }
+ }
+ if (!afterFunctionSection)
+ levelCurrent++;
+ }
+ else if (IsMainSectionLine(lineCurrent + 1, styler)) {
+ for (Sci_Position j = styler.LineStart(lineCurrent + 1); j < styler.LineStart(lineCurrent + 1 + 1) - 1; j++) {
+ if (IsASpaceOrTab(styler[j]))
+ continue;
+ else if (styler.StyleAt(j) == SCE_BAAN_WORD5) {
+ if (styler.Match(j, "declaration:")) {
+ // Means declaration: is the start of MainSections.
+ // Nothing to fold before this.
+ beforeDeclarationSection = true;
+ break;
+ }
+ else {
+ beforeDeclarationSection = false;
+ break;
+ }
+ }
+ else {
+ beforeDeclarationSection = false;
+ break;
+ }
+ }
+ if (!beforeDeclarationSection)
+ levelCurrent--;
}
}
if (atEOL) {
int lev = levelPrev;
- if (visibleChars == 0 && foldCompact)
+ lev |= levelCurrent << 16;
+ if (visibleChars == 0 && options.foldCompact)
lev |= SC_FOLDLEVELWHITEFLAG;
if ((levelCurrent > levelPrev) && (visibleChars > 0))
lev |= SC_FOLDLEVELHEADERFLAG;
@@ -188,9 +795,8 @@ static void FoldBaanDoc(Sci_PositionU startPos, Sci_Position length, int initSty
if (!isspacechar(ch))
visibleChars++;
}
- // Fill in the real level of the next line, keeping the current flags as they will be filled in later
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
}
-LexerModule lmBaan(SCLEX_BAAN, ColouriseBaanDoc, "baan", FoldBaanDoc);
+LexerModule lmBaan(SCLEX_BAAN, LexerBaan::LexerFactoryBaan, "baan", baanWordLists);
diff --git a/scintilla/lexers/LexCoffeeScript.cxx b/scintilla/lexers/LexCoffeeScript.cxx
index 51229b1..df81e11 100644
--- a/scintilla/lexers/LexCoffeeScript.cxx
+++ b/scintilla/lexers/LexCoffeeScript.cxx
@@ -40,6 +40,36 @@ static bool IsSpaceEquiv(int state) {
|| state == SCE_COFFEESCRIPT_REGEX);
}
+// Store the current lexer state and brace count prior to starting a new
+// `#{}` interpolation level.
+// Based on LexRuby.cxx.
+static void enterInnerExpression(int *p_inner_string_types,
+ int *p_inner_expn_brace_counts,
+ int& inner_string_count,
+ int state,
+ int& brace_counts
+ ) {
+ p_inner_string_types[inner_string_count] = state;
+ p_inner_expn_brace_counts[inner_string_count] = brace_counts;
+ brace_counts = 0;
+ ++inner_string_count;
+}
+
+// Restore the lexer state and brace count for the previous `#{}` interpolation
+// level upon returning to it.
+// Note the previous lexer state is the return value and needs to be restored
+// manually by the StyleContext.
+// Based on LexRuby.cxx.
+static int exitInnerExpression(int *p_inner_string_types,
+ int *p_inner_expn_brace_counts,
+ int& inner_string_count,
+ int& brace_counts
+ ) {
+ --inner_string_count;
+ brace_counts = p_inner_expn_brace_counts[inner_string_count];
+ return p_inner_string_types[inner_string_count];
+}
+
// Preconditions: sc.currentPos points to a character after '+' or '-'.
// The test for pos reaching 0 should be redundant,
// and is in only for safety measures.
@@ -88,6 +118,27 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length
int chPrevNonWhite = ' ';
int visibleChars = 0;
+ // String/Regex interpolation variables, based on LexRuby.cxx.
+ // In most cases a value of 2 should be ample for the code the user is
+ // likely to enter. For example,
+ // "Filling the #{container} with #{liquid}..."
+ // from the CoffeeScript homepage nests to a level of 2
+ // If the user actually hits a 6th occurrence of '#{' in a double-quoted
+ // string (including regexes), it will stay as a string. The problem with
+ // this is that quotes might flip, a 7th '#{' will look like a comment,
+ // and code-folding might be wrong.
+#define INNER_STRINGS_MAX_COUNT 5
+ // These vars track our instances of "...#{,,,'..#{,,,}...',,,}..."
+ int inner_string_types[INNER_STRINGS_MAX_COUNT];
+ // Track # braces when we push a new #{ thing
+ int inner_expn_brace_counts[INNER_STRINGS_MAX_COUNT];
+ int inner_string_count = 0;
+ int brace_counts = 0; // Number of #{ ... } things within an expression
+ for (int i = 0; i < INNER_STRINGS_MAX_COUNT; i++) {
+ inner_string_types[i] = 0;
+ inner_expn_brace_counts[i] = 0;
+ }
+
// look back to set chPrevNonWhite properly for better regex colouring
Sci_Position endPos = startPos + length;
if (startPos > 0 && IsSpaceEquiv(initStyle)) {
@@ -109,7 +160,7 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length
StyleContext sc(startPos, endPos - startPos, initStyle, styler);
- for (; sc.More(); sc.Forward()) {
+ for (; sc.More();) {
if (sc.atLineStart) {
// Reset states to beginning of colourise so no surprises
@@ -164,6 +215,15 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length
}
} else if (sc.ch == '\"') {
sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);
+ } else if (sc.ch == '#' && sc.chNext == '{' && inner_string_count < INNER_STRINGS_MAX_COUNT) {
+ // process interpolated code #{ ... }
+ enterInnerExpression(inner_string_types,
+ inner_expn_brace_counts,
+ inner_string_count,
+ sc.state,
+ brace_counts);
+ sc.SetState(SCE_COFFEESCRIPT_OPERATOR);
+ sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);
}
break;
case SCE_COFFEESCRIPT_CHARACTER:
@@ -255,6 +315,15 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length
// Handle '..' and '...' operators correctly.
if (sc.ch == '.') {
for (int i = 0; i < 2 && sc.chNext == '.'; i++, sc.Forward()) ;
+ } else if (sc.ch == '{') {
+ ++brace_counts;
+ } else if (sc.ch == '}' && --brace_counts <= 0 && inner_string_count > 0) {
+ // Return to previous state before #{ ... }
+ sc.ForwardSetState(exitInnerExpression(inner_string_types,
+ inner_expn_brace_counts,
+ inner_string_count,
+ brace_counts));
+ continue; // skip sc.Forward() at loop end
}
}
}
@@ -263,6 +332,7 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length
chPrevNonWhite = sc.ch;
visibleChars++;
}
+ sc.Forward();
}
sc.Complete();
}
diff --git a/scintilla/lexers/LexErrorList.cxx b/scintilla/lexers/LexErrorList.cxx
index 142b7b5..6dc6b02 100644
--- a/scintilla/lexers/LexErrorList.cxx
+++ b/scintilla/lexers/LexErrorList.cxx
@@ -320,12 +320,12 @@ static void ColouriseErrorListLine(
int portionStyle = style;
while (const char *startSeq = strstr(linePortion, CSI)) {
if (startSeq > linePortion) {
- styler.ColourTo(startPortion + (startSeq - linePortion), portionStyle);
+ styler.ColourTo(startPortion + static_cast<int>(startSeq - linePortion), portionStyle);
}
const char *endSeq = startSeq + 2;
while (!SequenceEnd(*endSeq))
endSeq++;
- const int endSeqPosition = startPortion + (endSeq - linePortion) + 1;
+ const int endSeqPosition = startPortion + static_cast<int>(endSeq - linePortion) + 1;
switch (*endSeq) {
case 0:
styler.ColourTo(endPos, SCE_ERR_ESCSEQ_UNKNOWN);
diff --git a/scintilla/lexers/LexJSON.cxx b/scintilla/lexers/LexJSON.cxx
index 9c044e5..6c06061 100644
--- a/scintilla/lexers/LexJSON.cxx
+++ b/scintilla/lexers/LexJSON.cxx
@@ -457,7 +457,9 @@ void SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos,
LexAccessor styler(pAccess);
Sci_PositionU currLine = styler.GetLine(startPos);
Sci_PositionU endPos = startPos + length;
- int currLevel = styler.LevelAt(currLine) & SC_FOLDLEVELNUMBERMASK;
+ int currLevel = SC_FOLDLEVELBASE;
+ if (currLine > 0)
+ currLevel = styler.LevelAt(currLine - 1) >> 16;
int nextLevel = currLevel;
int visibleChars = 0;
for (Sci_PositionU i = startPos; i < endPos; i++) {
@@ -472,7 +474,7 @@ void SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos,
}
}
if (atEOL || i == (endPos-1)) {
- int level = currLevel;
+ int level = currLevel | nextLevel << 16;
if (!visibleChars && options.foldCompact) {
level |= SC_FOLDLEVELWHITEFLAG;
} else if (nextLevel > currLevel) {
diff --git a/scintilla/lexers/LexPowerShell.cxx b/scintilla/lexers/LexPowerShell.cxx
index 0f386c8..1136ed3 100644
--- a/scintilla/lexers/LexPowerShell.cxx
+++ b/scintilla/lexers/LexPowerShell.cxx
@@ -149,6 +149,8 @@ static void ColourisePowerShellDoc(Sci_PositionU startPos, Sci_Position length,
sc.SetState(SCE_POWERSHELL_OPERATOR);
} else if (IsAWordChar(sc.ch)) {
sc.SetState(SCE_POWERSHELL_IDENTIFIER);
+ } else if (sc.ch == '`') {
+ sc.Forward(); // skip next escaped character
}
}
}
diff --git a/scintilla/lexers/LexProgress.cxx b/scintilla/lexers/LexProgress.cxx
index 94a8a14..f9ec45c 100644
--- a/scintilla/lexers/LexProgress.cxx
+++ b/scintilla/lexers/LexProgress.cxx
@@ -3,13 +3,18 @@
** Lexer for Progress 4GL.
** Based on LexCPP.cxx of Neil Hodgson <neilh@scintilla.org>
**/
-// Copyright 2006-2007 by Yuval Papish <Yuval@YuvCom.com>
+// Copyright 2006-2016 by Yuval Papish <Yuval@YuvCom.com>
// The License.txt file describes the conditions under which this software may be distributed.
/** TODO:
-WebSpeed support in html lexer
-Support "end triggers" expression of the triggers phrase
+
+SpeedScript support in html lexer
+Differentiate between labels and variables
+ Option 1: By symbols table
+ Option 2: As a single unidentified symbol in a sytactical line
+
**/
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -17,300 +22,538 @@ Support "end triggers" expression of the triggers phrase
#include <assert.h>
#include <ctype.h>
+#include <string>
+#include <vector>
+#include <map>
+
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "WordList.h"
#include "LexAccessor.h"
-#include "Accessor.h"
#include "StyleContext.h"
#include "CharacterSet.h"
#include "LexerModule.h"
+#include "OptionSet.h"
+#include "SparseState.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
-static inline bool IsAWordChar(int ch) {
- return (ch < 0x80) && (isalnum(ch) || ch == '_');
+namespace {
+ // Use an unnamed namespace to protect the functions and classes from name conflicts
+
+ bool IsSpaceEquiv(int state) {
+ return (state == SCE_ABL_COMMENT ||
+ state == SCE_ABL_LINECOMMENT ||
+ state == SCE_ABL_DEFAULT);
+ }
+
+ void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, WordList &markerList){
+ if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) {
+ const int lengthMarker = 50;
+ char marker[lengthMarker+1];
+ Sci_Position currPos = (Sci_Position) sc.currentPos;
+ Sci_Position i = 0;
+ while (i < lengthMarker) {
+ char ch = styler.SafeGetCharAt(currPos + i);
+ if (IsASpace(ch) || isoperator(ch)) {
+ break;
+ }
+ marker[i] = ch;
+ i++;
+ }
+ marker[i] = '\0';
+ if (markerList.InListAbbreviated (marker,'(')) {
+ sc.SetState(SCE_ABL_TASKMARKER);
+ }
+ }
+ }
+
+ bool IsStreamCommentStyle(int style) {
+ return style == SCE_ABL_COMMENT;
+ // style == SCE_ABL_LINECOMMENT; Only block comments are used for folding
+ }
+
+ // Options used for LexerABL
+ struct OptionsABL {
+ bool fold;
+ bool foldSyntaxBased;
+ bool foldComment;
+ bool foldCommentMultiline;
+ bool foldCompact;
+ OptionsABL() {
+ fold = false;
+ foldSyntaxBased = true;
+ foldComment = true;
+ foldCommentMultiline = true;
+ foldCompact = false;
+ }
+ };
+
+ const char *const ablWordLists[] = {
+ "Primary keywords and identifiers",
+ "Keywords that opens a block, only when used to begin a syntactic line",
+ "Keywords that opens a block anywhere in a syntactic line",
+ "Task Marker", /* "END MODIFY START TODO" */
+ 0,
+ };
+
+ struct OptionSetABL : public OptionSet<OptionsABL> {
+ OptionSetABL() {
+ DefineProperty("fold", &OptionsABL::fold);
+
+ DefineProperty("fold.abl.syntax.based", &OptionsABL::foldSyntaxBased,
+ "Set this property to 0 to disable syntax based folding.");
+
+ DefineProperty("fold.comment", &OptionsABL::foldComment,
+ "This option enables folding multi-line comments and explicit fold points when using the ABL lexer. ");
+
+ DefineProperty("fold.abl.comment.multiline", &OptionsABL::foldCommentMultiline,
+ "Set this property to 0 to disable folding multi-line comments when fold.comment=1.");
+
+ DefineProperty("fold.compact", &OptionsABL::foldCompact);
+
+ DefineWordListSets(ablWordLists);
+ }
+ };
}
-static inline bool IsAWordStart(int ch) {
- return (ch < 0x80) && (isalpha(ch) || ch == '_');
+class LexerABL : public ILexer {
+ CharacterSet setWord;
+ CharacterSet setNegationOp;
+ CharacterSet setArithmethicOp;
+ CharacterSet setRelOp;
+ CharacterSet setLogicalOp;
+ CharacterSet setWordStart;
+ WordList keywords1; // regular keywords
+ WordList keywords2; // block opening keywords, only when isSentenceStart
+ WordList keywords3; // block opening keywords
+ WordList keywords4; // Task Marker
+ OptionsABL options;
+ OptionSetABL osABL;
+public:
+ LexerABL() :
+ setWord(CharacterSet::setAlphaNum, "_", 0x80, true),
+ setNegationOp(CharacterSet::setNone, "!"),
+ setArithmethicOp(CharacterSet::setNone, "+-/*%"),
+ setRelOp(CharacterSet::setNone, "=!<>"),
+ setLogicalOp(CharacterSet::setNone, "|&"){
+ }
+ virtual ~LexerABL() {
+ }
+ void SCI_METHOD Release() {
+ delete this;
+ }
+ int SCI_METHOD Version() const {
+ return lvOriginal;
+ }
+ const char * SCI_METHOD PropertyNames() {
+ return osABL.PropertyNames();
+ }
+ int SCI_METHOD PropertyType(const char *name) {
+ return osABL.PropertyType(name);
+ }
+ const char * SCI_METHOD DescribeProperty(const char *name) {
+ return osABL.DescribeProperty(name);
+ }
+ Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) ;
+
+ const char * SCI_METHOD DescribeWordListSets() {
+ return osABL.DescribeWordListSets();
+ }
+ Sci_Position SCI_METHOD WordListSet(int n, const char *wl);
+ void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess);
+ void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess);
+
+ void * SCI_METHOD PrivateCall(int, void *) {
+ return 0;
+ }
+ int SCI_METHOD LineEndTypesSupported() {
+ return SC_LINE_END_TYPE_DEFAULT;
+ }
+ static ILexer *LexerFactoryABL() {
+ return new LexerABL();
+ }
+};
+
+Sci_Position SCI_METHOD LexerABL::PropertySet(const char *key, const char *val) {
+ if (osABL.PropertySet(&options, key, val)) {
+ return 0;
+ }
+ return -1;
}
-enum SentenceStart { SetSentenceStart = 0xf, ResetSentenceStart = 0x10}; // true -> bit = 0
-
-static void Colourise4glDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],
- Accessor &styler) {
-
- WordList &keywords1 = *keywordlists[0]; // regular keywords
- WordList &keywords2 = *keywordlists[1]; // block opening keywords, only when SentenceStart
- WordList &keywords3 = *keywordlists[2]; // block opening keywords
- //WordList &keywords4 = *keywordlists[3]; // preprocessor keywords. Not implemented
-
- Sci_Position currentLine = styler.GetLine(startPos);
- // Initialize the block comment /* */ nesting level, if we are inside such a comment.
- int blockCommentLevel = 0;
- if (initStyle == SCE_4GL_COMMENT1 ||
- initStyle == SCE_4GL_COMMENT1_) {
- blockCommentLevel = styler.GetLineState(currentLine - 1);
- }
-
- // Do not leak single-line comments onto next line
- if (initStyle == SCE_4GL_COMMENT2 ||
- initStyle == SCE_4GL_COMMENT2_) {
- initStyle = SCE_4GL_DEFAULT;
- }
-
- int visibleChars = 0;
- int mask;
-
- StyleContext sc(startPos, length, initStyle, styler);
-
- for (; sc.More(); sc.Forward()) {
-
- if (sc.atLineStart) {
- // Reset states to begining of colourise so no surprises
- // if different sets of lines lexed.
- visibleChars = 0;
- }
-
- if (sc.atLineEnd) {
- // Update the line state, so it can be seen by next line
- currentLine = styler.GetLine(sc.currentPos);
- if (sc.state == SCE_4GL_COMMENT1 ||
- sc.state == SCE_4GL_COMMENT1_) {
- // Inside a block comment, we set the line state
- styler.SetLineState(currentLine, blockCommentLevel);
- } else {
- // Reset the line state
- styler.SetLineState(currentLine, 0);
- }
- }
-
- // Handle line continuation generically.
- if ((sc.state & 0xf) < SCE_4GL_COMMENT1) {
- if (sc.ch == '~') {
- if (sc.chNext > ' ') {
- // skip special char after ~
- sc.Forward();
- continue;
- }
- else {
- // Skip whitespace between ~ and EOL
- while (sc.More() && (sc.chNext == ' ' || sc.chNext == '\t') ) {
- sc.Forward();
- }
- if (sc.chNext == '\n' || sc.chNext == '\r') {
- sc.Forward();
- if (sc.ch == '\r' && sc.chNext == '\n') {
- sc.Forward();
- }
- sc.Forward();
- continue;
- }
- }
- }
- }
- // Determine if a new state should be terminated.
- mask = sc.state & 0x10;
- switch (sc.state & 0xf) {
- case SCE_4GL_OPERATOR:
- sc.SetState(SCE_4GL_DEFAULT | mask);
- break;
- case SCE_4GL_NUMBER:
- // Hex numbers (0xnnnn) are supported so accept any
- // alphanumeric character if it follows a leading digit.
- if (!(IsAlphaNumeric(sc.ch))) {
- sc.SetState(SCE_4GL_DEFAULT | mask);
- }
- break;
- case SCE_4GL_IDENTIFIER:
- if (!IsAWordChar(sc.ch) && sc.ch != '-') {
- char s[1000];
- sc.GetCurrentLowered(s, sizeof(s));
- if ((((sc.state & 0x10) == 0) && keywords2.InListAbbreviated(s, '(')) || keywords3.InListAbbreviated(s, '(')) {
- sc.ChangeState(SCE_4GL_BLOCK | ResetSentenceStart);
- }
- else if (keywords1.InListAbbreviated(s, '(')) {
- if ((s[0] == 'e' && s[1] =='n' && s[2] == 'd' && !isalnum(s[3]) && s[3] != '-') ||
- (s[0] == 'f' && s[1] =='o' && s[2] == 'r' && s[3] == 'w' && s[4] =='a' && s[5] == 'r' && s[6] == 'd'&& !isalnum(s[7]))) {
- sc.ChangeState(SCE_4GL_END | ResetSentenceStart);
- }
- else if ((s[0] == 'e' && s[1] =='l' && s[2] == 's' && s[3] == 'e') ||
- (s[0] == 't' && s[1] =='h' && s[2] == 'e' && s[3] == 'n')) {
- sc.ChangeState(SCE_4GL_WORD & SetSentenceStart);
- }
- else {
- sc.ChangeState(SCE_4GL_WORD | ResetSentenceStart);
- }
- }
- sc.SetState(SCE_4GL_DEFAULT | (sc.state & 0x10));
- }
- break;
- case SCE_4GL_PREPROCESSOR:
- if (sc.atLineStart) {
- sc.SetState(SCE_4GL_DEFAULT & SetSentenceStart);
- }
- /* code removed to allow comments inside preprocessor
- else if (sc.ch == '*' && sc.chNext == '/') {
- sc.ForwardSetState(SCE_4GL_DEFAULT | sentenceStartState); } */
- break;
- case SCE_4GL_STRING:
- if (sc.ch == '\"') {
- sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
- }
- break;
- case SCE_4GL_CHARACTER:
- if (sc.ch == '\'') {
- sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
- }
- break;
- case SCE_4GL_COMMENT1:
- if (sc.Match('/', '*')) {
- blockCommentLevel++;
- sc.Forward();
- } else if (sc.Match('*', '/') && blockCommentLevel > 0) {
- blockCommentLevel--;
- sc.Forward();
- if (blockCommentLevel == 0) {
- sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
- }
- }
- break;
- case SCE_4GL_COMMENT2:
- if (sc.atLineEnd) {
- sc.ForwardSetState(SCE_4GL_DEFAULT | mask);
- }
- break;
- }
-
- // Determine if a new state should be entered.
- mask = sc.state & 0x10;
- if ((sc.state & 0xf) == SCE_4GL_DEFAULT) {
- if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
- sc.SetState(SCE_4GL_NUMBER | ResetSentenceStart);
- } else if (IsAWordStart(sc.ch) || (sc.ch == '@')) {
- sc.SetState(SCE_4GL_IDENTIFIER | mask);
- } else if (sc.Match('/', '*')) {
- blockCommentLevel = 1;
- sc.SetState(SCE_4GL_COMMENT1 | mask);
- sc.Forward();
- } else if (sc.Match('/', '/') &&
- (sc.atLineStart || sc.chPrev == ' ' || sc.chPrev == '\t')) {
- sc.SetState(SCE_4GL_COMMENT2 | mask);
- } else if (sc.ch == '\"') {
- sc.SetState(SCE_4GL_STRING | ResetSentenceStart);
- } else if (sc.ch == '\'') {
- sc.SetState(SCE_4GL_CHARACTER | ResetSentenceStart);
- } else if (sc.ch == '&' && visibleChars == 0 && ((sc.state & 0x10) == 0)) {
- sc.SetState(SCE_4GL_PREPROCESSOR | ResetSentenceStart);
- // Skip whitespace between & and preprocessor word
- do {
- sc.Forward();
- } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More());
- // Handle syntactical line termination
- } else if ((sc.ch == '.' || sc.ch == ':' || sc.ch == '}') && (sc.chNext == ' ' || sc.chNext == '\t' || sc.chNext == '\n' || sc.chNext == '\r')) {
- sc.SetState(sc.state & SetSentenceStart);
- } else if (isoperator(static_cast<char>(sc.ch))) {
- /* This code allows highlight of handles. Alas, it would cause the phrase "last-event:function"
- to be recognized as a BlockBegin */
-
- if (sc.ch == ':')
- sc.SetState(SCE_4GL_OPERATOR & SetSentenceStart);
- /* else */
- sc.SetState(SCE_4GL_OPERATOR | ResetSentenceStart);
- }
- }
-
- if (!IsASpace(sc.ch)) {
- visibleChars++;
- }
- }
- sc.Complete();
+Sci_Position SCI_METHOD LexerABL::WordListSet(int n, const char *wl) {
+ WordList *wordListN = 0;
+ switch (n) {
+ case 0:
+ wordListN = &keywords1;
+ break;
+ case 1:
+ wordListN = &keywords2;
+ break;
+ case 2:
+ wordListN = &keywords3;
+ break;
+ case 3:
+ wordListN = &keywords4;
+ break;
+ }
+ Sci_Position firstModification = -1;
+ if (wordListN) {
+ WordList wlNew;
+ wlNew.Set(wl);
+ if (*wordListN != wlNew) {
+ wordListN->Set(wl);
+ firstModification = 0;
+ }
+ }
+ return firstModification;
}
-static bool IsStreamCommentStyle(int style) {
- return (style & 0xf) == SCE_4GL_COMMENT1 ;
+void SCI_METHOD LexerABL::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
+ LexAccessor styler(pAccess);
+
+ setWordStart = CharacterSet(CharacterSet::setAlpha, "_", 0x80, true);
+
+ int visibleChars = 0;
+ int visibleChars1 = 0;
+ int styleBeforeTaskMarker = SCE_ABL_DEFAULT;
+ bool continuationLine = false;
+ int commentNestingLevel = 0;
+ bool isSentenceStart = true;
+ bool possibleOOLChange = false;
+
+ Sci_Position lineCurrent = styler.GetLine(startPos);
+ if (initStyle == SCE_ABL_PREPROCESSOR) {
+ // Set continuationLine if last character of previous line is '~'
+ if (lineCurrent > 0) {
+ Sci_Position endLinePrevious = styler.LineEnd(lineCurrent-1);
+ if (endLinePrevious > 0) {
+ continuationLine = styler.SafeGetCharAt(endLinePrevious-1) == '~';
+ }
+ }
+ }
+
+ // Look back to set variables that are actually invisible secondary states. The reason to avoid formal states is to cut down on state's bits
+ if (startPos > 0) {
+ Sci_Position back = startPos;
+ bool checkCommentNestingLevel = (initStyle == SCE_ABL_COMMENT);
+ bool checkIsSentenceStart = (initStyle == SCE_ABL_DEFAULT || initStyle == SCE_ABL_IDENTIFIER);
+ char ch;
+ char st;
+ char chPrev;
+ char chPrev_1;
+ char chPrev_2;
+ char chPrev_3;
+
+ while (back >= 0 && (checkCommentNestingLevel || checkIsSentenceStart)) {
+ ch = styler.SafeGetCharAt(back);
+ styler.Flush(); // looking at styles so need to flush
+ st = styler.StyleAt(back);
+
+ chPrev = styler.SafeGetCharAt(back-1);
+ // isSentenceStart is a non-visible state, used to identify where statements and preprocessor declerations can start
+ if (checkIsSentenceStart && st != SCE_ABL_COMMENT && st != SCE_ABL_LINECOMMENT && st != SCE_ABL_CHARACTER && st != SCE_ABL_STRING ) {
+ chPrev_1 = styler.SafeGetCharAt(back-2);
+ chPrev_2 = styler.SafeGetCharAt(back-3);
+ chPrev_3 = styler.SafeGetCharAt(back-4);
+ if ((chPrev == '.' || chPrev == ':' || chPrev == '}' ||
+ (chPrev_3 == 'e' && chPrev_2 == 'l' && chPrev_1 == 's' && chPrev == 'e') ||
+ (chPrev_3 == 't' && chPrev_2 == 'h' && chPrev_1 == 'e' && chPrev == 'n')) &&
+ (IsASpace(ch) || (ch == '/' && styler.SafeGetCharAt(back+1) == '*'))
+ ) {
+ checkIsSentenceStart = false;
+ isSentenceStart = true;
+ }
+ else if (IsASpace(chPrev) && ch == '{') {
+ checkIsSentenceStart = false;
+ isSentenceStart = false;
+ }
+ }
+
+ // commentNestingLevel is a non-visible state, used to identify the nesting level of a comment
+ if (checkCommentNestingLevel) {
+ if (chPrev == '/' && ch == '*')
+ commentNestingLevel++;
+ if (chPrev == '*' && ch == '/') {
+ commentNestingLevel--;
+ }
+ }
+ --back;
+ }
+ }
+
+ StyleContext sc(startPos, length, initStyle, styler, static_cast<unsigned char>(0xff));
+ Sci_Position lineEndNext = styler.LineEnd(lineCurrent);
+
+ for (; sc.More();) {
+ if (sc.atLineStart) {
+ visibleChars = 0;
+ visibleChars1 = 0;
+ }
+ if (sc.atLineEnd) {
+ lineCurrent++;
+ lineEndNext = styler.LineEnd(lineCurrent);
+ }
+ // Handle line continuation generically.
+ if (sc.ch == '~') {
+ if (static_cast<Sci_Position>((sc.currentPos+1)) >= lineEndNext) {
+ lineCurrent++;
+ lineEndNext = styler.LineEnd(lineCurrent);
+ sc.Forward();
+ if (sc.ch == '\r' && sc.chNext == '\n') {
+ sc.Forward();
+ }
+ continuationLine = true;
+ sc.Forward();
+ continue;
+ }
+ }
+
+ const bool atLineEndBeforeSwitch = sc.atLineEnd;
+ // Determine if the current state should terminate.
+ switch (sc.state) {
+ case SCE_ABL_OPERATOR:
+ sc.SetState(SCE_ABL_DEFAULT);
+ break;
+ case SCE_ABL_NUMBER:
+ // We accept almost anything because of hex. and maybe number suffixes and scientific notations in the future
+ if (!(setWord.Contains(sc.ch)
+ || ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E' ||
+ sc.chPrev == 'p' || sc.chPrev == 'P')))) {
+ sc.SetState(SCE_ABL_DEFAULT);
+ }
+ break;
+ case SCE_ABL_IDENTIFIER:
+ if (sc.atLineStart || sc.atLineEnd || (!setWord.Contains(sc.ch) && sc.ch != '-')) {
+ char s[1000];
+ sc.GetCurrentLowered(s, sizeof(s));
+ bool isLastWordEnd = (s[0] == 'e' && s[1] =='n' && s[2] == 'd' && !IsAlphaNumeric(s[3]) && s[3] != '-'); // helps to identify "end trigger" phrase
+ if ((isSentenceStart && keywords2.InListAbbreviated (s,'(')) || (!isLastWordEnd && keywords3.InListAbbreviated (s,'('))) {
+ sc.ChangeState(SCE_ABL_BLOCK);
+ isSentenceStart = false;
+ }
+ else if (keywords1.InListAbbreviated (s,'(')) {
+ if (isLastWordEnd ||
+ (s[0] == 'f' && s[1] =='o' && s[2] == 'r' && s[3] == 'w' && s[4] =='a' && s[5] == 'r' && s[6] == 'd'&& !IsAlphaNumeric(s[7]))) {
+ sc.ChangeState(SCE_ABL_END);
+ isSentenceStart = false;
+ }
+ else if ((s[0] == 'e' && s[1] =='l' && s[2] == 's' && s[3] == 'e') ||
+ (s[0] == 't' && s[1] =='h' && s[2] == 'e' && s[3] == 'n')) {
+ sc.ChangeState(SCE_ABL_WORD);
+ isSentenceStart = true;
+ }
+ else {
+ sc.ChangeState(SCE_ABL_WORD);
+ isSentenceStart = false;
+ }
+ }
+ sc.SetState(SCE_ABL_DEFAULT);
+ }
+ break;
+ case SCE_ABL_PREPROCESSOR:
+ if (sc.atLineStart && !continuationLine) {
+ sc.SetState(SCE_ABL_DEFAULT);
+ // Force Scintilla to acknowledge changed stated even though this change might happen outside of the current line
+ possibleOOLChange = true;
+ isSentenceStart = true;
+ }
+ break;
+ case SCE_ABL_LINECOMMENT:
+ if (sc.atLineStart && !continuationLine) {
+ sc.SetState(SCE_ABL_DEFAULT);
+ isSentenceStart = true;
+ } else {
+ styleBeforeTaskMarker = SCE_ABL_LINECOMMENT;
+ highlightTaskMarker(sc, styler, keywords4);
+ }
+ break;
+ case SCE_ABL_TASKMARKER:
+ if (isoperator(sc.ch) || IsASpace(sc.ch)) {
+ sc.SetState(styleBeforeTaskMarker);
+ styleBeforeTaskMarker = SCE_ABL_DEFAULT;
+ }
+ // fall through
+ case SCE_ABL_COMMENT:
+ if (sc.Match('*', '/')) {
+ sc.Forward();
+ commentNestingLevel--;
+ if (commentNestingLevel == 0) {
+ sc.ForwardSetState(SCE_ABL_DEFAULT);
+ possibleOOLChange = true;
+ }
+ } else if (sc.Match('/', '*')) {
+ commentNestingLevel++;
+ sc.Forward();
+ }
+ if (commentNestingLevel > 0) {
+ styleBeforeTaskMarker = SCE_ABL_COMMENT;
+ possibleOOLChange = true;
+ highlightTaskMarker(sc, styler, keywords4);
+ }
+ break;
+ case SCE_ABL_STRING:
+ if (sc.ch == '~') {
+ sc.Forward(); // Skip a character after a tilde
+ } else if (sc.ch == '\"') {
+ sc.ForwardSetState(SCE_ABL_DEFAULT);
+ }
+ break;
+ case SCE_ABL_CHARACTER:
+ if (sc.ch == '~') {
+ sc.Forward(); // Skip a character after a tilde
+ } else if (sc.ch == '\'') {
+ sc.ForwardSetState(SCE_ABL_DEFAULT);
+ }
+ break;
+ }
+
+ if (sc.atLineEnd && !atLineEndBeforeSwitch) {
+ // State exit processing consumed characters up to end of line.
+ lineCurrent++;
+ lineEndNext = styler.LineEnd(lineCurrent);
+ }
+
+ // Determine if a new state should be entered.
+ if (sc.state == SCE_ABL_DEFAULT) {
+ if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
+ sc.SetState(SCE_ABL_NUMBER);
+ isSentenceStart = false;
+ } else if (!sc.atLineEnd && (setWordStart.Contains(sc.ch)) && sc.chPrev != '&') {
+ sc.SetState(SCE_ABL_IDENTIFIER);
+ } else if (sc.Match('/', '*')) {
+ if (sc.chPrev == '.' || sc.chPrev == ':' || sc.chPrev == '}') {
+ isSentenceStart = true;
+ }
+ sc.SetState(SCE_ABL_COMMENT);
+ possibleOOLChange = true;
+ commentNestingLevel++;
+ sc.Forward(); // Eat the * so it isn't used for the end of the comment
+ } else if (sc.ch == '\"') {
+ sc.SetState(SCE_ABL_STRING);
+ isSentenceStart = false;
+ } else if (sc.ch == '\'') {
+ sc.SetState(SCE_ABL_CHARACTER);
+ isSentenceStart = false;
+ } else if (sc.ch == '&' && visibleChars1 == 0 && isSentenceStart) {
+ // Preprocessor commands are alone on their line
+ sc.SetState(SCE_ABL_PREPROCESSOR);
+ // Force Scintilla to acknowledge changed stated even though this change might happen outside of the current line
+ possibleOOLChange = true;
+ // Skip whitespace between & and preprocessor word
+ do {
+ sc.Forward();
+ } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More());
+ if (sc.atLineEnd) {
+ sc.SetState(SCE_ABL_DEFAULT);
+ }
+ } else if (sc.Match('/','/') && (IsASpace(sc.chPrev) || isSentenceStart)) {
+ // Line comments are valid after a white space or EOL
+ sc.SetState(SCE_ABL_LINECOMMENT);
+ // Skip whitespace between // and preprocessor word
+ do {
+ sc.Forward();
+ } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More());
+ if (sc.atLineEnd) {
+ sc.SetState(SCE_ABL_DEFAULT);
+ }
+ } else if (isoperator(sc.ch)) {
+ sc.SetState(SCE_ABL_OPERATOR);
+ /* This code allows highlight of handles. Alas, it would cause the phrase "last-event:function"
+ to be recognized as a BlockBegin */
+ isSentenceStart = false;
+ }
+ else if ((sc.chPrev == '.' || sc.chPrev == ':' || sc.chPrev == '}') && (IsASpace(sc.ch))) {
+ isSentenceStart = true;
+ }
+ }
+ if (!IsASpace(sc.ch)) {
+ visibleChars1++;
+ }
+ if (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) {
+ visibleChars++;
+ }
+ continuationLine = false;
+ sc.Forward();
+ }
+ if (possibleOOLChange)
+ styler.ChangeLexerState(startPos, startPos + length);
+ sc.Complete();
}
+
// Store both the current line's fold level and the next lines in the
// level store to make it easy to pick up with each increment
// and to make it possible to fiddle the current level for "} else {".
-static void FoldNoBox4glDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,
- Accessor &styler) {
- bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
- bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
- bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0;
- Sci_PositionU endPos = startPos + length;
- int visibleChars = 0;
- Sci_Position lineCurrent = styler.GetLine(startPos);
- int levelCurrent = SC_FOLDLEVELBASE;
- if (lineCurrent > 0)
- levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
- int levelMinCurrent = levelCurrent;
- int levelNext = levelCurrent;
- char chNext = static_cast<char>(tolower(styler[startPos]));
- int styleNext = styler.StyleAt(startPos);
- int style = initStyle;
- for (Sci_PositionU i = startPos; i < endPos; i++) {
- char ch = chNext;
- chNext = static_cast<char>(tolower(styler.SafeGetCharAt(i + 1)));
- int stylePrev = style;
- style = styleNext;
- styleNext = styler.StyleAt(i + 1);
- bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
- if (foldComment && IsStreamCommentStyle(style)) {
- if (!IsStreamCommentStyle(stylePrev)) {
- levelNext++;
- } else if (!IsStreamCommentStyle(styleNext)) { // && !atEOL) {
- // Comments don't end at end of line and the next character may be unstyled.
- levelNext--;
- }
- }
- else if ((style & 0xf) == SCE_4GL_BLOCK && !isalnum(chNext)) {
- levelNext++;
- }
- else if ((style & 0xf) == SCE_4GL_END && (ch == 'e' || ch == 'f')) {
- levelNext--;
- }
- if (atEOL) {
- int levelUse = levelCurrent;
- if (foldAtElse) {
- levelUse = levelMinCurrent;
- }
- int lev = levelUse | levelNext << 16;
- if (visibleChars == 0 && foldCompact)
- lev |= SC_FOLDLEVELWHITEFLAG;
- if (levelUse < levelNext)
- lev |= SC_FOLDLEVELHEADERFLAG;
- if (lev != styler.LevelAt(lineCurrent)) {
- styler.SetLevel(lineCurrent, lev);
- }
- lineCurrent++;
- levelCurrent = levelNext;
- levelMinCurrent = levelCurrent;
- visibleChars = 0;
- }
- if (!isspacechar(ch))
- visibleChars++;
- }
-}
-static void Fold4glDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],
- Accessor &styler) {
- FoldNoBox4glDoc(startPos, length, initStyle, styler);
-}
+void SCI_METHOD LexerABL::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
+
+ if (!options.fold)
+ return;
-static const char * const FglWordLists[] = {
- "Primary keywords and identifiers",
- "Secondary keywords and identifiers",
- "Documentation comment keywords",
- "Unused",
- "Global classes and typedefs",
- 0,
- };
+ LexAccessor styler(pAccess);
+
+ Sci_PositionU endPos = startPos + length;
+ int visibleChars = 0;
+ Sci_Position lineCurrent = styler.GetLine(startPos);
+ int levelCurrent = SC_FOLDLEVELBASE;
+ if (lineCurrent > 0)
+ levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
+ Sci_PositionU lineStartNext = styler.LineStart(lineCurrent+1);
+ int levelNext = levelCurrent;
+ char chNext = styler[startPos];
+ int styleNext = styler.StyleAt(startPos);
+ int style = initStyle;
+ for (Sci_PositionU i = startPos; i < endPos; i++) {
+ chNext = static_cast<char>(tolower(chNext)); // check tolower
+ char ch = chNext;
+ chNext = styler.SafeGetCharAt(i+1);
+ int stylePrev = style;
+ style = styleNext;
+ styleNext = styler.StyleAt(i+1);
+ bool atEOL = i == (lineStartNext-1);
+ if (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style)) {
+ if (!IsStreamCommentStyle(stylePrev)) {
+ levelNext++;
+ } else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
+ // Comments don't end at end of line and the next character may be unstyled.
+ levelNext--;
+ }
+ }
+ if (options.foldSyntaxBased) {
+ if (style == SCE_ABL_BLOCK && !IsAlphaNumeric(chNext)) {
+ levelNext++;
+ }
+ else if (style == SCE_ABL_END && (ch == 'e' || ch == 'f')) {
+ levelNext--;
+ }
+ }
+ if (!IsASpace(ch))
+ visibleChars++;
+ if (atEOL || (i == endPos-1)) {
+ int lev = levelCurrent | levelNext << 16;
+ if (visibleChars == 0 && options.foldCompact)
+ lev |= SC_FOLDLEVELWHITEFLAG;
+ if (levelCurrent < levelNext)
+ lev |= SC_FOLDLEVELHEADERFLAG;
+ if (lev != styler.LevelAt(lineCurrent)) {
+ styler.SetLevel(lineCurrent, lev);
+ }
+ lineCurrent++;
+ lineStartNext = styler.LineStart(lineCurrent+1);
+ levelCurrent = levelNext;
+ if (atEOL && (i == static_cast<Sci_PositionU>(styler.Length()-1))) {
+ // There is an empty line at end of file so give it same level and empty
+ styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);
+ }
+ visibleChars = 0;
+ }
+ }
+}
-LexerModule lmProgress(SCLEX_PROGRESS, Colourise4glDoc, "progress", Fold4glDoc, FglWordLists);
+LexerModule lmProgress(SCLEX_PROGRESS, LexerABL::LexerFactoryABL, "abl", ablWordLists);
diff --git a/scintilla/lexers/LexYAML.cxx b/scintilla/lexers/LexYAML.cxx
index 71cb4e9..7a948f7 100644
--- a/scintilla/lexers/LexYAML.cxx
+++ b/scintilla/lexers/LexYAML.cxx
@@ -46,13 +46,28 @@ static unsigned int SpaceCount(char* lineBuffer) {
while (*headBuffer == ' ')
headBuffer++;
- return headBuffer - lineBuffer;
+ return static_cast<unsigned int>(headBuffer - lineBuffer);
}
-#define YAML_STATE_BITSIZE 16
+static bool KeywordAtChar(char* lineBuffer, char* startComment, const WordList &keywords) {
+ if (lineBuffer == NULL || startComment <= lineBuffer)
+ return false;
+ char* endValue = startComment - 1;
+ while (endValue >= lineBuffer && *endValue == ' ')
+ endValue--;
+ Sci_PositionU len = endValue - lineBuffer + 1;
+ char s[100];
+ if (len > (sizeof(s) / sizeof(s[0]) - 1))
+ return false;
+ strncpy(s, lineBuffer, len);
+ s[len] = '\0';
+ return (keywords.InList(s));
+}
+
+#define YAML_STATE_BITSIZE 16
#define YAML_STATE_MASK (0xFFFF0000)
#define YAML_STATE_DOCUMENT (1 << YAML_STATE_BITSIZE)
-#define YAML_STATE_VALUE (2 << YAML_STATE_BITSIZE)
+#define YAML_STATE_VALUE (2 << YAML_STATE_BITSIZE)
#define YAML_STATE_COMMENT (3 << YAML_STATE_BITSIZE)
#define YAML_STATE_TEXT_PARENT (4 << YAML_STATE_BITSIZE)
#define YAML_STATE_TEXT (5 << YAML_STATE_BITSIZE)
@@ -139,27 +154,44 @@ static void ColouriseYAMLLine(
styler.ColourTo(endPos, SCE_YAML_COMMENT);
return;
}
+ Sci_PositionU startComment = i;
+ bInQuotes = false;
+ while (startComment < lengthLine) { // Comment must be space padded
+ if (lineBuffer[startComment] == '\'' || lineBuffer[startComment] == '\"')
+ bInQuotes = !bInQuotes;
+ if (lineBuffer[startComment] == '#' && isspacechar(lineBuffer[startComment - 1]) && !bInQuotes)
+ break;
+ startComment++;
+ }
styler.SetLineState(currentLine, YAML_STATE_VALUE);
if (lineBuffer[i] == '&' || lineBuffer[i] == '*') {
- styler.ColourTo(endPos, SCE_YAML_REFERENCE);
+ styler.ColourTo(startLine + startComment - 1, SCE_YAML_REFERENCE);
+ if (startComment < lengthLine)
+ styler.ColourTo(endPos, SCE_YAML_COMMENT);
return;
}
- if (keywords.InList(&lineBuffer[i])) { // Convertible value (true/false, etc.)
- styler.ColourTo(endPos, SCE_YAML_KEYWORD);
+ if (KeywordAtChar(&lineBuffer[i], &lineBuffer[startComment], keywords)) { // Convertible value (true/false, etc.)
+ styler.ColourTo(startLine + startComment - 1, SCE_YAML_KEYWORD);
+ if (startComment < lengthLine)
+ styler.ColourTo(endPos, SCE_YAML_COMMENT);
return;
- } else {
- Sci_PositionU i2 = i;
- while ((i < lengthLine) && lineBuffer[i]) {
- if (!(IsASCII(lineBuffer[i]) && isdigit(lineBuffer[i])) && lineBuffer[i] != '-' && lineBuffer[i] != '.' && lineBuffer[i] != ',') {
- styler.ColourTo(endPos, SCE_YAML_DEFAULT);
- return;
- }
- i++;
- }
- if (i > i2) {
- styler.ColourTo(endPos, SCE_YAML_NUMBER);
+ }
+ Sci_PositionU i2 = i;
+ while ((i < startComment) && lineBuffer[i]) {
+ if (!(IsASCII(lineBuffer[i]) && isdigit(lineBuffer[i])) && lineBuffer[i] != '-'
+ && lineBuffer[i] != '.' && lineBuffer[i] != ',' && lineBuffer[i] != ' ') {
+ styler.ColourTo(startLine + startComment - 1, SCE_YAML_DEFAULT);
+ if (startComment < lengthLine)
+ styler.ColourTo(endPos, SCE_YAML_COMMENT);
return;
}
+ i++;
+ }
+ if (i > i2) {
+ styler.ColourTo(startLine + startComment - 1, SCE_YAML_NUMBER);
+ if (startComment < lengthLine)
+ styler.ColourTo(endPos, SCE_YAML_COMMENT);
+ return;
}
break; // shouldn't get here, but just in case, the rest of the line is coloured the default
}
@@ -241,7 +273,7 @@ static void FoldYAMLDoc(Sci_PositionU startPos, Sci_Position length, int /*initS
if (lineNext <= docLines) {
// Information about next line is only available if not at end of document
indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
- }
+ }
const int comment = foldComment && IsCommentLine(lineCurrent, styler);
const int comment_start = (comment && !prevComment && (lineNext <= docLines) &&
IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE));
diff --git a/scintilla/lexlib/CharacterSet.cxx b/scintilla/lexlib/CharacterSet.cxx
index 43a7be4..2aaf677 100644
--- a/scintilla/lexlib/CharacterSet.cxx
+++ b/scintilla/lexlib/CharacterSet.cxx
@@ -25,8 +25,8 @@ namespace Scintilla {
int CompareCaseInsensitive(const char *a, const char *b) {
while (*a && *b) {
if (*a != *b) {
- char upperA = MakeUpperCase(*a);
- char upperB = MakeUpperCase(*b);
+ char upperA = static_cast<char>(MakeUpperCase(*a));
+ char upperB = static_cast<char>(MakeUpperCase(*b));
if (upperA != upperB)
return upperA - upperB;
}
@@ -40,8 +40,8 @@ int CompareCaseInsensitive(const char *a, const char *b) {
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) {
while (*a && *b && len) {
if (*a != *b) {
- char upperA = MakeUpperCase(*a);
- char upperB = MakeUpperCase(*b);
+ char upperA = static_cast<char>(MakeUpperCase(*a));
+ char upperB = static_cast<char>(MakeUpperCase(*b));
if (upperA != upperB)
return upperA - upperB;
}
diff --git a/scintilla/lexlib/CharacterSet.h b/scintilla/lexlib/CharacterSet.h
index 9c3c252..df389a2 100644
--- a/scintilla/lexlib/CharacterSet.h
+++ b/scintilla/lexlib/CharacterSet.h
@@ -160,13 +160,20 @@ inline bool isoperator(int ch) {
// Simple case functions for ASCII.
-inline char MakeUpperCase(char ch) {
+inline int MakeUpperCase(int ch) {
if (ch < 'a' || ch > 'z')
return ch;
else
return static_cast<char>(ch - 'a' + 'A');
}
+inline int MakeLowerCase(int ch) {
+ if (ch < 'A' || ch > 'Z')
+ return ch;
+ else
+ return ch - 'A' + 'a';
+}
+
int CompareCaseInsensitive(const char *a, const char *b);
int CompareNCaseInsensitive(const char *a, const char *b, size_t len);
diff --git a/scintilla/lexlib/StyleContext.cxx b/scintilla/lexlib/StyleContext.cxx
index 9fc443c..59a146e 100644
--- a/scintilla/lexlib/StyleContext.cxx
+++ b/scintilla/lexlib/StyleContext.cxx
@@ -16,11 +16,28 @@
#include "LexAccessor.h"
#include "Accessor.h"
#include "StyleContext.h"
+#include "CharacterSet.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
+bool StyleContext::MatchIgnoreCase(const char *s) {
+ if (MakeLowerCase(ch) != static_cast<unsigned char>(*s))
+ return false;
+ s++;
+ if (MakeLowerCase(chNext) != static_cast<unsigned char>(*s))
+ return false;
+ s++;
+ for (int n = 2; *s; n++) {
+ if (static_cast<unsigned char>(*s) !=
+ MakeLowerCase(static_cast<unsigned char>(styler.SafeGetCharAt(currentPos + n, 0))))
+ return false;
+ s++;
+ }
+ return true;
+}
+
static void getRange(Sci_PositionU start,
Sci_PositionU end,
LexAccessor &styler,
diff --git a/scintilla/lexlib/StyleContext.h b/scintilla/lexlib/StyleContext.h
index 0b55289..c036c85 100644
--- a/scintilla/lexlib/StyleContext.h
+++ b/scintilla/lexlib/StyleContext.h
@@ -12,13 +12,6 @@
namespace Scintilla {
#endif
-static inline int MakeLowerCase(int ch) {
- if (ch < 'A' || ch > 'Z')
- return ch;
- else
- return ch - 'A' + 'a';
-}
-
// All languages handled so far can treat all characters >= 0x80 as one class
// which just continues the current token or starts an identifier if in default.
// DBCS treated specially as the second character can be < 0x80 and hence
@@ -204,22 +197,8 @@ public:
}
return true;
}
- bool MatchIgnoreCase(const char *s) {
- if (MakeLowerCase(ch) != static_cast<unsigned char>(*s))
- return false;
- s++;
- if (MakeLowerCase(chNext) != static_cast<unsigned char>(*s))
- return false;
- s++;
- for (int n=2; *s; n++) {
- if (static_cast<unsigned char>(*s) !=
- MakeLowerCase(static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n, 0))))
- return false;
- s++;
- }
- return true;
- }
// Non-inline
+ bool MatchIgnoreCase(const char *s);
void GetCurrent(char *s, Sci_PositionU len);
void GetCurrentLowered(char *s, Sci_PositionU len);
};
diff --git a/scintilla/lexlib/WordList.cxx b/scintilla/lexlib/WordList.cxx
index 2acabaf..7493a02 100644
--- a/scintilla/lexlib/WordList.cxx
+++ b/scintilla/lexlib/WordList.cxx
@@ -236,6 +236,66 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const {
return false;
}
+/** similar to InListAbbreviated, but word s can be a abridged version of a keyword.
+* eg. the keyword is defined as "after.~:". This means the word must have a prefix (begins with) of
+* "after." and suffix (ends with) of ":" to be a keyword, Hence "after.field:" , "after.form.item:" are valid.
+* Similarly "~.is.valid" keyword is suffix only... hence "field.is.valid" , "form.is.valid" are valid.
+* The marker is ~ in this case.
+* No multiple markers check is done and wont work.
+*/
+bool WordList::InListAbridged(const char *s, const char marker) const {
+ if (0 == words)
+ return false;
+ unsigned char firstChar = s[0];
+ int j = starts[firstChar];
+ if (j >= 0) {
+ while (static_cast<unsigned char>(words[j][0]) == firstChar) {
+ const char *a = words[j];
+ const char *b = s;
+ while (*a && *a == *b) {
+ a++;
+ if (*a == marker) {
+ a++;
+ const size_t suffixLengthA = strlen(a);
+ const size_t suffixLengthB = strlen(b);
+ if (suffixLengthA >= suffixLengthB)
+ break;
+ b = b + suffixLengthB - suffixLengthA - 1;
+ }
+ b++;
+ }
+ if (!*a && !*b)
+ return true;
+ j++;
+ }
+ }
+
+ j = starts[static_cast<unsigned int>(marker)];
+ if (j >= 0) {
+ while (words[j][0] == marker) {
+ const char *a = words[j] + 1;
+ const char *b = s;
+ const size_t suffixLengthA = strlen(a);
+ const size_t suffixLengthB = strlen(b);
+ if (suffixLengthA > suffixLengthB) {
+ j++;
+ continue;
+ }
+ b = b + suffixLengthB - suffixLengthA;
+
+ while (*a && *a == *b) {
+ a++;
+ b++;
+ }
+ if (!*a && !*b)
+ return true;
+ j++;
+ }
+ }
+
+ return false;
+}
+
const char *WordList::WordAt(int n) const {
return words[n];
}
diff --git a/scintilla/lexlib/WordList.h b/scintilla/lexlib/WordList.h
index 3b9421b..ebe4444 100644
--- a/scintilla/lexlib/WordList.h
+++ b/scintilla/lexlib/WordList.h
@@ -31,6 +31,7 @@ public:
void Set(const char *s);
bool InList(const char *s) const;
bool InListAbbreviated(const char *s, const char marker) const;
+ bool InListAbridged(const char *s, const char marker) const;
const char *WordAt(int n) const;
};
diff --git a/scintilla/scripts/Face.py b/scintilla/scripts/Face.py
index 3724c8f..0fbae30 100644
--- a/scintilla/scripts/Face.py
+++ b/scintilla/scripts/Face.py
@@ -82,6 +82,7 @@ class Face:
raise Exception("Duplicate value " + value + " " + name)
self.values[value] = 1
self.order.append(name)
+ currentComment = []
elif featureType == "evt":
retType, name, value = decodeEvent(featureVal)
self.features[name] = {
@@ -115,4 +116,5 @@ class Face:
"Value": value,
"Comment": currentComment }
self.order.append(name)
+ currentComment = []
diff --git a/scintilla/scripts/HeaderCheck.py b/scintilla/scripts/HeaderCheck.py
new file mode 100644
index 0000000..6916fe3
--- /dev/null
+++ b/scintilla/scripts/HeaderCheck.py
@@ -0,0 +1,92 @@
+# Script to check that headers are in a consistent order
+# Requires Python 2.6 or later
+
+from __future__ import print_function
+import codecs, glob, os, platform, sys, unicodedata
+
+def ciCompare(a,b):
+ return cmp(a.lower(), b.lower())
+
+def ciKey(a):
+ return a.lower()
+
+def SortListInsensitive(l):
+ try: # Try key function
+ l.sort(key=ciKey)
+ except TypeError: # Earlier version of Python, so use comparison function
+ l.sort(ciCompare)
+
+def IsHeader(x):
+ return x.strip().startswith("#") and ("include" in x or "import" in x)
+
+def ExtractHeaders(filename):
+ with codecs.open(filename, "r", "UTF-8") as infile:
+ includeLines = [x.strip()[1:].strip()[7:].strip() for x in infile.readlines() if \
+ IsHeader(x)]
+ if '.' not in filename:
+ print(filename)
+ for n in includeLines:
+ print(n)
+ print()
+ return includeLines
+
+def CheckFiles(root):
+ # Find all the lexer source code files
+ filePaths = glob.glob(root + "/src/*.cxx")
+ SortListInsensitive(filePaths)
+ filePaths += glob.glob(root + "/lexlib/*.cxx")
+ filePaths += glob.glob(root + "/lexers/*.cxx")
+ filePaths += glob.glob(root + "/win32/*.cxx")
+ filePaths += glob.glob(root + "/gtk/*.cxx")
+ filePaths += glob.glob(root + "/cocoa/*.mm")
+ filePaths += glob.glob(root + "/cocoa/*.h")
+ filePaths += glob.glob(root + "/test/unit/*.cxx")
+ # The Qt platform code interleaves system and Scintilla headers
+ #~ filePaths += glob.glob(root + "/qt/ScintillaEditBase/*.cpp")
+ #~ filePaths += glob.glob(root + "/qt/ScintillaEdit/*.cpp")
+ #~ print(filePaths)
+ masterHeaderList = ExtractHeaders(root + "/scripts/HeaderOrder.txt")
+ for f in filePaths:
+ if "LexCaml" in f:
+ continue
+ print(" File ", f)
+ try:
+ incs = ExtractHeaders(f)
+ except UnicodeDecodeError:
+ #~ print("UnicodeDecodeError\n")
+ continue
+ #~ print("\n".join(incs))
+ news = set(incs) - set(masterHeaderList)
+ #~ print("")
+ #~ print("\n".join(incs))
+ #~ print("")
+ ended = False
+ m = 0
+ i = 0
+ while i < len(incs):
+ if m == len(masterHeaderList):
+ print("**** extend", incs[i:])
+ masterHeaderList.extend(incs[i:])
+ break
+ if masterHeaderList[m] == incs[i]:
+ #~ print("equal", masterHeaderList[m])
+ i += 1
+ m += 1
+ else:
+ if masterHeaderList[m] not in incs:
+ #~ print("skip", masterHeaderList[m])
+ m += 1
+ elif incs[i] not in masterHeaderList:
+ print(f + ":1: Add master", incs[i])
+ masterHeaderList.insert(m, incs[i])
+ i += 1
+ m += 1
+ else:
+ print(f + ":1: Header out of order", incs[i], masterHeaderList[m])
+ print("incs", " ".join(incs))
+ i += 1
+ #~ return
+ #print("Master header list", " ".join(masterHeaderList))
+
+
+CheckFiles("..")
diff --git a/scintilla/scripts/HeaderOrder.txt b/scintilla/scripts/HeaderOrder.txt
index df4f0f4..fdbb3a1 100644
--- a/scintilla/scripts/HeaderOrder.txt
+++ b/scintilla/scripts/HeaderOrder.txt
@@ -21,6 +21,7 @@
#include <cstring>
#include <cctype>
#include <cstdio>
+#include <cstdarg>
#include <cmath>
// C++ standard library
@@ -43,6 +44,7 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk-a11y.h>
// Windows headers
#include <windows.h>
@@ -98,6 +100,7 @@
#include "SplitVector.h"
#include "Partitioning.h"
#include "RunStyles.h"
+#include "SparseVector.h"
#include "ContractionState.h"
#include "CellBuffer.h"
#include "PerLine.h"
@@ -136,7 +139,9 @@
#include "HanjaDic.h"
// gtk
+#include "ScintillaGTK.h"
#include "scintilla-marshal.h"
+#include "ScintillaGTKAccessible.h"
#include "Converter.h"
// cocoa
@@ -148,3 +153,7 @@
#import "ScintillaView.h"
#import "ScintillaCocoa.h"
#import "PlatCocoa.h"
+
+// Catch testing framework
+#include "catch.hpp"
+
diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx
index c21ae8c..babf37b 100644
--- a/scintilla/src/Document.cxx
+++ b/scintilla/src/Document.cxx
@@ -26,6 +26,7 @@
#include "Scintilla.h"
#include "CharacterSet.h"
+#include "CharacterCategory.h"
#include "Position.h"
#include "SplitVector.h"
#include "Partitioning.h"
@@ -44,10 +45,6 @@
using namespace Scintilla;
#endif
-static inline bool IsPunctuation(char ch) {
- return IsASCII(ch) && ispunct(ch);
-}
-
void LexInterface::Colourise(int start, int end) {
if (pdoc && instance && !performingStyle) {
// Protect against reentrance, which may occur, for example, when
@@ -771,6 +768,77 @@ bool Document::NextCharacter(int &pos, int moveDir) const {
}
}
+Document::CharacterExtracted Document::CharacterAfter(int position) const {
+ if (position >= Length()) {
+ return CharacterExtracted(unicodeReplacementChar, 0);
+ }
+ const unsigned char leadByte = static_cast<unsigned char>(cb.CharAt(position));
+ if (!dbcsCodePage || UTF8IsAscii(leadByte)) {
+ // Common case: ASCII character
+ return CharacterExtracted(leadByte, 1);
+ }
+ if (SC_CP_UTF8 == dbcsCodePage) {
+ const int widthCharBytes = UTF8BytesOfLead[leadByte];
+ unsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 };
+ for (int b = 1; b<widthCharBytes; b++)
+ charBytes[b] = static_cast<unsigned char>(cb.CharAt(position + b));
+ int utf8status = UTF8Classify(charBytes, widthCharBytes);
+ if (utf8status & UTF8MaskInvalid) {
+ // Treat as invalid and use up just one byte
+ return CharacterExtracted(unicodeReplacementChar, 1);
+ } else {
+ return CharacterExtracted(UnicodeFromUTF8(charBytes), utf8status & UTF8MaskWidth);
+ }
+ } else {
+ if (IsDBCSLeadByte(leadByte) && ((position + 1) < Length())) {
+ return CharacterExtracted::DBCS(leadByte, static_cast<unsigned char>(cb.CharAt(position + 1)));
+ } else {
+ return CharacterExtracted(leadByte, 1);
+ }
+ }
+}
+
+Document::CharacterExtracted Document::CharacterBefore(int position) const {
+ if (position <= 0) {
+ return CharacterExtracted(unicodeReplacementChar, 0);
+ }
+ const unsigned char previousByte = static_cast<unsigned char>(cb.CharAt(position - 1));
+ if (0 == dbcsCodePage) {
+ return CharacterExtracted(previousByte, 1);
+ }
+ if (SC_CP_UTF8 == dbcsCodePage) {
+ if (UTF8IsAscii(previousByte)) {
+ return CharacterExtracted(previousByte, 1);
+ }
+ position--;
+ // If previousByte is not a trail byte then its invalid
+ if (UTF8IsTrailByte(previousByte)) {
+ // If previousByte is a trail byte in a valid UTF-8 character then find start of character
+ int startUTF = position;
+ int endUTF = position;
+ if (InGoodUTF8(position, startUTF, endUTF)) {
+ const int widthCharBytes = endUTF - startUTF;
+ unsigned char charBytes[UTF8MaxBytes] = { 0, 0, 0, 0 };
+ for (int b = 0; b<widthCharBytes; b++)
+ charBytes[b] = static_cast<unsigned char>(cb.CharAt(startUTF + b));
+ int utf8status = UTF8Classify(charBytes, widthCharBytes);
+ if (utf8status & UTF8MaskInvalid) {
+ // Treat as invalid and use up just one byte
+ return CharacterExtracted(unicodeReplacementChar, 1);
+ } else {
+ return CharacterExtracted(UnicodeFromUTF8(charBytes), utf8status & UTF8MaskWidth);
+ }
+ }
+ // Else invalid UTF-8 so return position of isolated trail byte
+ }
+ return CharacterExtracted(unicodeReplacementChar, 1);
+ } else {
+ // Moving backwards in DBCS is complex so use NextPosition
+ const int posStartCharacter = NextPosition(position, -1);
+ return CharacterAfter(posStartCharacter);
+ }
+}
+
// Return -1 on out-of-bounds
Sci_Position SCI_METHOD Document::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const {
int pos = positionStart;
@@ -1485,28 +1553,104 @@ int Document::ParaDown(int pos) const {
return LineEnd(line-1);
}
-CharClassify::cc Document::WordCharClass(unsigned char ch) const {
- if ((SC_CP_UTF8 == dbcsCodePage) && (!UTF8IsAscii(ch)))
- return CharClassify::ccWord;
- return charClass.GetClass(ch);
+bool Document::IsASCIIWordByte(unsigned char ch) const {
+ if (IsASCII(ch)) {
+ return charClass.GetClass(ch) == CharClassify::ccWord;
+ } else {
+ return false;
+ }
+}
+
+CharClassify::cc Document::WordCharacterClass(unsigned int ch) const {
+ if (dbcsCodePage && (!UTF8IsAscii(ch))) {
+ if (SC_CP_UTF8 == dbcsCodePage) {
+ // Use hard coded Unicode class
+ const CharacterCategory cc = CategoriseCharacter(ch);
+ switch (cc) {
+
+ // Separator, Line/Paragraph
+ case ccZl:
+ case ccZp:
+ return CharClassify::ccNewLine;
+
+ // Separator, Space
+ case ccZs:
+ // Other
+ case ccCc:
+ case ccCf:
+ case ccCs:
+ case ccCo:
+ case ccCn:
+ return CharClassify::ccSpace;
+
+ // Letter
+ case ccLu:
+ case ccLl:
+ case ccLt:
+ case ccLm:
+ case ccLo:
+ // Number
+ case ccNd:
+ case ccNl:
+ case ccNo:
+ // Mark - includes combining diacritics
+ case ccMn:
+ case ccMc:
+ case ccMe:
+ return CharClassify::ccWord;
+
+ // Punctuation
+ case ccPc:
+ case ccPd:
+ case ccPs:
+ case ccPe:
+ case ccPi:
+ case ccPf:
+ case ccPo:
+ // Symbol
+ case ccSm:
+ case ccSc:
+ case ccSk:
+ case ccSo:
+ return CharClassify::ccPunctuation;
+
+ }
+ } else {
+ // Asian DBCS
+ return CharClassify::ccWord;
+ }
+ }
+ return charClass.GetClass(static_cast<unsigned char>(ch));
}
/**
* Used by commmands that want to select whole words.
* Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0.
*/
-int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) {
+int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) const {
CharClassify::cc ccStart = CharClassify::ccWord;
if (delta < 0) {
- if (!onlyWordCharacters)
- ccStart = WordCharClass(cb.CharAt(pos-1));
- while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart))
- pos--;
+ if (!onlyWordCharacters) {
+ const CharacterExtracted ce = CharacterBefore(pos);
+ ccStart = WordCharacterClass(ce.character);
+ }
+ while (pos > 0) {
+ const CharacterExtracted ce = CharacterBefore(pos);
+ if (WordCharacterClass(ce.character) != ccStart)
+ break;
+ pos -= ce.widthBytes;
+ }
} else {
- if (!onlyWordCharacters && pos < Length())
- ccStart = WordCharClass(cb.CharAt(pos));
- while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart))
- pos++;
+ if (!onlyWordCharacters && pos < Length()) {
+ const CharacterExtracted ce = CharacterAfter(pos);
+ ccStart = WordCharacterClass(ce.character);
+ }
+ while (pos < Length()) {
+ const CharacterExtracted ce = CharacterAfter(pos);
+ if (WordCharacterClass(ce.character) != ccStart)
+ break;
+ pos += ce.widthBytes;
+ }
}
return MovePositionOutsideChar(pos, delta, true);
}
@@ -1518,22 +1662,39 @@ int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) {
* additional movement to transit white space.
* Used by cursor movement by word commands.
*/
-int Document::NextWordStart(int pos, int delta) {
+int Document::NextWordStart(int pos, int delta) const {
if (delta < 0) {
- while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace))
- pos--;
+ while (pos > 0) {
+ const CharacterExtracted ce = CharacterBefore(pos);
+ if (WordCharacterClass(ce.character) != CharClassify::ccSpace)
+ break;
+ pos -= ce.widthBytes;
+ }
if (pos > 0) {
- CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1));
- while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) {
- pos--;
+ CharacterExtracted ce = CharacterBefore(pos);
+ const CharClassify::cc ccStart = WordCharacterClass(ce.character);
+ while (pos > 0) {
+ ce = CharacterBefore(pos);
+ if (WordCharacterClass(ce.character) != ccStart)
+ break;
+ pos -= ce.widthBytes;
}
}
} else {
- CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos));
- while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart))
- pos++;
- while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace))
- pos++;
+ CharacterExtracted ce = CharacterAfter(pos);
+ const CharClassify::cc ccStart = WordCharacterClass(ce.character);
+ while (pos < Length()) {
+ ce = CharacterAfter(pos);
+ if (WordCharacterClass(ce.character) != ccStart)
+ break;
+ pos += ce.widthBytes;
+ }
+ while (pos < Length()) {
+ ce = CharacterAfter(pos);
+ if (WordCharacterClass(ce.character) != CharClassify::ccSpace)
+ break;
+ pos += ce.widthBytes;
+ }
}
return pos;
}
@@ -1545,27 +1706,41 @@ int Document::NextWordStart(int pos, int delta) {
* additional movement to transit white space.
* Used by cursor movement by word commands.
*/
-int Document::NextWordEnd(int pos, int delta) {
+int Document::NextWordEnd(int pos, int delta) const {
if (delta < 0) {
if (pos > 0) {
- CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1));
+ CharacterExtracted ce = CharacterBefore(pos);
+ CharClassify::cc ccStart = WordCharacterClass(ce.character);
if (ccStart != CharClassify::ccSpace) {
- while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == ccStart) {
- pos--;
+ while (pos > 0) {
+ ce = CharacterBefore(pos);
+ if (WordCharacterClass(ce.character) != ccStart)
+ break;
+ pos -= ce.widthBytes;
}
}
- while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace) {
- pos--;
+ while (pos > 0) {
+ ce = CharacterBefore(pos);
+ if (WordCharacterClass(ce.character) != CharClassify::ccSpace)
+ break;
+ pos -= ce.widthBytes;
}
}
} else {
- while (pos < Length() && WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace) {
- pos++;
+ while (pos < Length()) {
+ CharacterExtracted ce = CharacterAfter(pos);
+ if (WordCharacterClass(ce.character) != CharClassify::ccSpace)
+ break;
+ pos += ce.widthBytes;
}
if (pos < Length()) {
- CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos));
- while (pos < Length() && WordCharClass(cb.CharAt(pos)) == ccStart) {
- pos++;
+ CharacterExtracted ce = CharacterAfter(pos);
+ CharClassify::cc ccStart = WordCharacterClass(ce.character);
+ while (pos < Length()) {
+ ce = CharacterAfter(pos);
+ if (WordCharacterClass(ce.character) != ccStart)
+ break;
+ pos += ce.widthBytes;
}
}
}
@@ -1577,10 +1752,15 @@ int Document::NextWordEnd(int pos, int delta) {
* the previous character is of a different character class.
*/
bool Document::IsWordStartAt(int pos) const {
+ if (pos >= Length())
+ return false;
if (pos > 0) {
- CharClassify::cc ccPos = WordCharClass(CharAt(pos));
+ const CharacterExtracted cePos = CharacterAfter(pos);
+ const CharClassify::cc ccPos = WordCharacterClass(cePos.character);
+ const CharacterExtracted cePrev = CharacterBefore(pos);
+ const CharClassify::cc ccPrev = WordCharacterClass(cePrev.character);
return (ccPos == CharClassify::ccWord || ccPos == CharClassify::ccPunctuation) &&
- (ccPos != WordCharClass(CharAt(pos - 1)));
+ (ccPos != ccPrev);
}
return true;
}
@@ -1590,10 +1770,15 @@ bool Document::IsWordStartAt(int pos) const {
* the next character is of a different character class.
*/
bool Document::IsWordEndAt(int pos) const {
+ if (pos <= 0)
+ return false;
if (pos < Length()) {
- CharClassify::cc ccPrev = WordCharClass(CharAt(pos-1));
+ const CharacterExtracted cePos = CharacterAfter(pos);
+ const CharClassify::cc ccPos = WordCharacterClass(cePos.character);
+ const CharacterExtracted cePrev = CharacterBefore(pos);
+ const CharClassify::cc ccPrev = WordCharacterClass(cePrev.character);
return (ccPrev == CharClassify::ccWord || ccPrev == CharClassify::ccPunctuation) &&
- (ccPrev != WordCharClass(CharAt(pos)));
+ (ccPrev != ccPos);
}
return true;
}
@@ -2075,96 +2260,137 @@ void Document::NotifyModified(DocModification mh) {
}
}
-bool Document::IsWordPartSeparator(char ch) const {
- return (WordCharClass(ch) == CharClassify::ccWord) && IsPunctuation(ch);
+// Used for word part navigation.
+static bool IsASCIIPunctuationCharacter(unsigned int ch) {
+ switch (ch) {
+ case '!':
+ case '"':
+ case '#':
+ case '$':
+ case '%':
+ case '&':
+ case '\'':
+ case '(':
+ case ')':
+ case '*':
+ case '+':
+ case ',':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case '`':
+ case '{':
+ case '|':
+ case '}':
+ case '~':
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool Document::IsWordPartSeparator(unsigned int ch) const {
+ return (WordCharacterClass(ch) == CharClassify::ccWord) && IsASCIIPunctuationCharacter(ch);
}
-int Document::WordPartLeft(int pos) {
+int Document::WordPartLeft(int pos) const {
if (pos > 0) {
- --pos;
- char startChar = cb.CharAt(pos);
- if (IsWordPartSeparator(startChar)) {
- while (pos > 0 && IsWordPartSeparator(cb.CharAt(pos))) {
- --pos;
+ pos -= CharacterBefore(pos).widthBytes;
+ CharacterExtracted ceStart = CharacterAfter(pos);
+ if (IsWordPartSeparator(ceStart.character)) {
+ while (pos > 0 && IsWordPartSeparator(CharacterAfter(pos).character)) {
+ pos -= CharacterBefore(pos).widthBytes;
}
}
if (pos > 0) {
- startChar = cb.CharAt(pos);
- --pos;
- if (IsLowerCase(startChar)) {
- while (pos > 0 && IsLowerCase(cb.CharAt(pos)))
- --pos;
- if (!IsUpperCase(cb.CharAt(pos)) && !IsLowerCase(cb.CharAt(pos)))
- ++pos;
- } else if (IsUpperCase(startChar)) {
- while (pos > 0 && IsUpperCase(cb.CharAt(pos)))
- --pos;
- if (!IsUpperCase(cb.CharAt(pos)))
- ++pos;
- } else if (IsADigit(startChar)) {
- while (pos > 0 && IsADigit(cb.CharAt(pos)))
- --pos;
- if (!IsADigit(cb.CharAt(pos)))
- ++pos;
- } else if (IsPunctuation(startChar)) {
- while (pos > 0 && IsPunctuation(cb.CharAt(pos)))
- --pos;
- if (!IsPunctuation(cb.CharAt(pos)))
- ++pos;
- } else if (isspacechar(startChar)) {
- while (pos > 0 && isspacechar(cb.CharAt(pos)))
- --pos;
- if (!isspacechar(cb.CharAt(pos)))
- ++pos;
- } else if (!IsASCII(startChar)) {
- while (pos > 0 && !IsASCII(cb.CharAt(pos)))
- --pos;
- if (IsASCII(cb.CharAt(pos)))
- ++pos;
+ ceStart = CharacterAfter(pos);
+ pos -= CharacterBefore(pos).widthBytes;
+ if (IsLowerCase(ceStart.character)) {
+ while (pos > 0 && IsLowerCase(CharacterAfter(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ if (!IsUpperCase(CharacterAfter(pos).character) && !IsLowerCase(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (IsUpperCase(ceStart.character)) {
+ while (pos > 0 && IsUpperCase(CharacterAfter(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ if (!IsUpperCase(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (IsADigit(ceStart.character)) {
+ while (pos > 0 && IsADigit(CharacterAfter(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ if (!IsADigit(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (IsASCIIPunctuationCharacter(ceStart.character)) {
+ while (pos > 0 && IsASCIIPunctuationCharacter(CharacterAfter(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ if (!IsASCIIPunctuationCharacter(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (isspacechar(ceStart.character)) {
+ while (pos > 0 && isspacechar(CharacterAfter(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ if (!isspacechar(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (!IsASCII(ceStart.character)) {
+ while (pos > 0 && !IsASCII(CharacterAfter(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ if (IsASCII(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
} else {
- ++pos;
+ pos += CharacterAfter(pos).widthBytes;
}
}
}
return pos;
}
-int Document::WordPartRight(int pos) {
- char startChar = cb.CharAt(pos);
- int length = Length();
- if (IsWordPartSeparator(startChar)) {
- while (pos < length && IsWordPartSeparator(cb.CharAt(pos)))
- ++pos;
- startChar = cb.CharAt(pos);
- }
- if (!IsASCII(startChar)) {
- while (pos < length && !IsASCII(cb.CharAt(pos)))
- ++pos;
- } else if (IsLowerCase(startChar)) {
- while (pos < length && IsLowerCase(cb.CharAt(pos)))
- ++pos;
- } else if (IsUpperCase(startChar)) {
- if (IsLowerCase(cb.CharAt(pos + 1))) {
- ++pos;
- while (pos < length && IsLowerCase(cb.CharAt(pos)))
- ++pos;
+int Document::WordPartRight(int pos) const {
+ CharacterExtracted ceStart = CharacterAfter(pos);
+ const int length = Length();
+ if (IsWordPartSeparator(ceStart.character)) {
+ while (pos < length && IsWordPartSeparator(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ ceStart = CharacterAfter(pos);
+ }
+ if (!IsASCII(ceStart.character)) {
+ while (pos < length && !IsASCII(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (IsLowerCase(ceStart.character)) {
+ while (pos < length && IsLowerCase(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (IsUpperCase(ceStart.character)) {
+ if (IsLowerCase(CharacterAfter(pos + ceStart.widthBytes).character)) {
+ pos += CharacterAfter(pos).widthBytes;
+ while (pos < length && IsLowerCase(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
} else {
- while (pos < length && IsUpperCase(cb.CharAt(pos)))
- ++pos;
- }
- if (IsLowerCase(cb.CharAt(pos)) && IsUpperCase(cb.CharAt(pos - 1)))
- --pos;
- } else if (IsADigit(startChar)) {
- while (pos < length && IsADigit(cb.CharAt(pos)))
- ++pos;
- } else if (IsPunctuation(startChar)) {
- while (pos < length && IsPunctuation(cb.CharAt(pos)))
- ++pos;
- } else if (isspacechar(startChar)) {
- while (pos < length && isspacechar(cb.CharAt(pos)))
- ++pos;
+ while (pos < length && IsUpperCase(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ }
+ if (IsLowerCase(CharacterAfter(pos).character) && IsUpperCase(CharacterBefore(pos).character))
+ pos -= CharacterBefore(pos).widthBytes;
+ } else if (IsADigit(ceStart.character)) {
+ while (pos < length && IsADigit(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (IsASCIIPunctuationCharacter(ceStart.character)) {
+ while (pos < length && IsASCIIPunctuationCharacter(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
+ } else if (isspacechar(ceStart.character)) {
+ while (pos < length && isspacechar(CharacterAfter(pos).character))
+ pos += CharacterAfter(pos).widthBytes;
} else {
- ++pos;
+ pos += CharacterAfter(pos).widthBytes;
}
return pos;
}
diff --git a/scintilla/src/Document.h b/scintilla/src/Document.h
index 6b24f2c..562c290 100644
--- a/scintilla/src/Document.h
+++ b/scintilla/src/Document.h
@@ -238,6 +238,18 @@ private:
public:
+ struct CharacterExtracted {
+ unsigned int character;
+ unsigned int widthBytes;
+ CharacterExtracted(unsigned int character_, unsigned int widthBytes_) :
+ character(character_), widthBytes(widthBytes_) {
+ }
+ // For DBCS characters turn 2 bytes into an int
+ static CharacterExtracted DBCS(unsigned char lead, unsigned char trail) {
+ return CharacterExtracted((lead << 8) | trail, 2);
+ }
+ };
+
LexInterface *pli;
int eolMode;
@@ -284,6 +296,8 @@ public:
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const;
int NextPosition(int pos, int moveDir) const;
bool NextCharacter(int &pos, int moveDir) const; // Returns true if pos changed
+ Document::CharacterExtracted CharacterAfter(int position) const;
+ Document::CharacterExtracted CharacterBefore(int position) const;
Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const;
int GetRelativePositionUTF16(int positionStart, int characterOffset) const;
int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const;
@@ -373,19 +387,12 @@ public:
void GetHighlightDelimiters(HighlightDelimiter &hDelimiter, int line, int lastLine);
void Indent(bool forwards);
- int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false);
- int NextWordStart(int pos, int delta);
- int NextWordEnd(int pos, int delta);
+ int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false) const;
+ int NextWordStart(int pos, int delta) const;
+ int NextWordEnd(int pos, int delta) const;
Sci_Position SCI_METHOD Length() const { return cb.Length(); }
void Allocate(int newSize) { cb.Allocate(newSize); }
- struct CharacterExtracted {
- unsigned int character;
- unsigned int widthBytes;
- CharacterExtracted(unsigned int character_, unsigned int widthBytes_) :
- character(character_), widthBytes(widthBytes_) {
- }
- };
CharacterExtracted ExtractCharacter(int position) const;
bool IsWordStartAt(int pos) const;
@@ -437,10 +444,11 @@ public:
bool AddWatcher(DocWatcher *watcher, void *userData);
bool RemoveWatcher(DocWatcher *watcher, void *userData);
- CharClassify::cc WordCharClass(unsigned char ch) const;
- bool IsWordPartSeparator(char ch) const;
- int WordPartLeft(int pos);
- int WordPartRight(int pos);
+ bool IsASCIIWordByte(unsigned char ch) const;
+ CharClassify::cc WordCharacterClass(unsigned int ch) const;
+ bool IsWordPartSeparator(unsigned int ch) const;
+ int WordPartLeft(int pos) const;
+ int WordPartRight(int pos) const;
int ExtendStyleRange(int pos, int delta, bool singleLine = false);
bool IsWhiteLine(int line) const;
int ParaUp(int pos) const;
diff --git a/scintilla/src/EditView.cxx b/scintilla/src/EditView.cxx
index 9ca6e95..e6cd8fc 100644
--- a/scintilla/src/EditView.cxx
+++ b/scintilla/src/EditView.cxx
@@ -25,6 +25,7 @@
#include "Scintilla.h"
#include "StringCopy.h"
+#include "CharacterSet.h"
#include "Position.h"
#include "SplitVector.h"
#include "Partitioning.h"
@@ -389,16 +390,16 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co
(ll->chars[numCharsInLine] == chDoc);
else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower)
allSame = allSame &&
- (ll->chars[numCharsInLine] == static_cast<char>(tolower(chDoc)));
+ (ll->chars[numCharsInLine] == MakeLowerCase(chDoc));
else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper)
allSame = allSame &&
- (ll->chars[numCharsInLine] == static_cast<char>(toupper(chDoc)));
+ (ll->chars[numCharsInLine] == MakeUpperCase(chDoc));
else { // Style::caseCamel
- if ((model.pdoc->WordCharClass(ll->chars[numCharsInLine]) == CharClassify::ccWord) &&
- ((numCharsInLine == 0) || (model.pdoc->WordCharClass(ll->chars[numCharsInLine - 1]) != CharClassify::ccWord))) {
- allSame = allSame && (ll->chars[numCharsInLine] == static_cast<char>(toupper(chDoc)));
+ if ((model.pdoc->IsASCIIWordByte(ll->chars[numCharsInLine])) &&
+ ((numCharsInLine == 0) || (!model.pdoc->IsASCIIWordByte(ll->chars[numCharsInLine - 1])))) {
+ allSame = allSame && (ll->chars[numCharsInLine] == MakeUpperCase(chDoc));
} else {
- allSame = allSame && (ll->chars[numCharsInLine] == static_cast<char>(tolower(chDoc)));
+ allSame = allSame && (ll->chars[numCharsInLine] == MakeLowerCase(chDoc));
}
}
numCharsInLine++;
@@ -417,7 +418,7 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co
ll->widthLine = LineLayout::wrapWidthInfinite;
ll->lines = 1;
if (vstyle.edgeState == EDGE_BACKGROUND) {
- ll->edgeColumn = model.pdoc->FindColumn(line, vstyle.theEdge);
+ ll->edgeColumn = model.pdoc->FindColumn(line, vstyle.theEdge.column);
if (ll->edgeColumn >= posLineStart) {
ll->edgeColumn -= posLineStart;
}
@@ -440,15 +441,15 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co
for (int charInLine = 0; charInLine<lineLength; charInLine++) {
char chDoc = ll->chars[charInLine];
if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseUpper)
- ll->chars[charInLine] = static_cast<char>(toupper(chDoc));
+ ll->chars[charInLine] = static_cast<char>(MakeUpperCase(chDoc));
else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseLower)
- ll->chars[charInLine] = static_cast<char>(tolower(chDoc));
+ ll->chars[charInLine] = static_cast<char>(MakeLowerCase(chDoc));
else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseCamel) {
- if ((model.pdoc->WordCharClass(ll->chars[charInLine]) == CharClassify::ccWord) &&
- ((charInLine == 0) || (model.pdoc->WordCharClass(ll->chars[charInLine - 1]) != CharClassify::ccWord))) {
- ll->chars[charInLine] = static_cast<char>(toupper(chDoc));
+ if ((model.pdoc->IsASCIIWordByte(ll->chars[charInLine])) &&
+ ((charInLine == 0) || (!model.pdoc->IsASCIIWordByte(ll->chars[charInLine - 1])))) {
+ ll->chars[charInLine] = static_cast<char>(MakeUpperCase(chDoc));
} else {
- ll->chars[charInLine] = static_cast<char>(tolower(chDoc));
+ ll->chars[charInLine] = static_cast<char>(MakeLowerCase(chDoc));
}
}
}
@@ -749,7 +750,7 @@ static ColourDesired TextBackground(const EditModel &model, const ViewStyle &vsD
if ((vsDraw.edgeState == EDGE_BACKGROUND) &&
(i >= ll->edgeColumn) &&
(i < ll->numCharsBeforeEOL))
- return vsDraw.edgecolour;
+ return vsDraw.theEdge.colour;
if (inHotspot && vsDraw.hotspotColours.back.isSet)
return vsDraw.hotspotColours.back;
}
@@ -1339,12 +1340,24 @@ static void DrawEdgeLine(Surface *surface, const ViewStyle &vsDraw, const LineLa
Range lineRange, int xStart) {
if (vsDraw.edgeState == EDGE_LINE) {
PRectangle rcSegment = rcLine;
- int edgeX = static_cast<int>(vsDraw.theEdge * vsDraw.spaceWidth);
+ int edgeX = static_cast<int>(vsDraw.theEdge.column * vsDraw.spaceWidth);
rcSegment.left = static_cast<XYPOSITION>(edgeX + xStart);
if ((ll->wrapIndent != 0) && (lineRange.start != 0))
rcSegment.left -= ll->wrapIndent;
rcSegment.right = rcSegment.left + 1;
- surface->FillRectangle(rcSegment, vsDraw.edgecolour);
+ surface->FillRectangle(rcSegment, vsDraw.theEdge.colour);
+ } else if (vsDraw.edgeState == EDGE_MULTILINE) {
+ for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) {
+ if (vsDraw.theMultiEdge[edge].column >= 0) {
+ PRectangle rcSegment = rcLine;
+ int edgeX = static_cast<int>(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth);
+ rcSegment.left = static_cast<XYPOSITION>(edgeX + xStart);
+ if ((ll->wrapIndent != 0) && (lineRange.start != 0))
+ rcSegment.left -= ll->wrapIndent;
+ rcSegment.right = rcSegment.left + 1;
+ surface->FillRectangle(rcSegment, vsDraw.theMultiEdge[edge].colour);
+ }
+ }
}
}
@@ -1919,10 +1932,19 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan
if (rcBeyondEOF.top < rcBeyondEOF.bottom) {
surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.styles[STYLE_DEFAULT].back);
if (vsDraw.edgeState == EDGE_LINE) {
- int edgeX = static_cast<int>(vsDraw.theEdge * vsDraw.spaceWidth);
+ int edgeX = static_cast<int>(vsDraw.theEdge.column * vsDraw.spaceWidth);
rcBeyondEOF.left = static_cast<XYPOSITION>(edgeX + xStart);
rcBeyondEOF.right = rcBeyondEOF.left + 1;
- surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.edgecolour);
+ surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.theEdge.colour);
+ } else if (vsDraw.edgeState == EDGE_MULTILINE) {
+ for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) {
+ if (vsDraw.theMultiEdge[edge].column >= 0) {
+ int edgeX = static_cast<int>(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth);
+ rcBeyondEOF.left = static_cast<XYPOSITION>(edgeX + xStart);
+ rcBeyondEOF.right = rcBeyondEOF.left + 1;
+ surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.theMultiEdge[edge].colour);
+ }
+ }
}
}
//Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset);
@@ -1961,9 +1983,9 @@ long EditView::FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface,
// Modify the view style for printing as do not normally want any of the transient features to be printed
// Printing supports only the line number margin.
int lineNumberIndex = -1;
- for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
+ for (size_t margin = 0; margin < vs.ms.size(); margin++) {
if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) {
- lineNumberIndex = margin;
+ lineNumberIndex = static_cast<int>(margin);
} else {
vsPrint.ms[margin].width = 0;
}
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx
index 5c2f531..a19feba 100644
--- a/scintilla/src/Editor.cxx
+++ b/scintilla/src/Editor.cxx
@@ -112,6 +112,7 @@ Editor::Editor() {
hasFocus = false;
errorStatus = 0;
mouseDownCaptures = true;
+ mouseWheelCaptures = true;
lastClickTime = 0;
doubleClickCloseThreshold = Point(3, 3);
@@ -739,8 +740,8 @@ void Editor::MultipleSelectAdd(AddNumber addNumber) {
const int searchEnd = it->end;
for (;;) {
int lengthFound = static_cast<int>(selectedText.length());
- int pos = pdoc->FindText(searchStart, searchEnd, selectedText.c_str(),
- searchFlags, &lengthFound);
+ int pos = static_cast<int>(pdoc->FindText(searchStart, searchEnd,
+ selectedText.c_str(), searchFlags, &lengthFound));
if (pos >= 0) {
sel.AddSelection(SelectionRange(pos + lengthFound, pos));
ScrollRange(sel.RangeMain());
@@ -2425,9 +2426,9 @@ void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctr
bool Editor::NotifyMarginClick(Point pt, int modifiers) {
int marginClicked = -1;
int x = vs.textStart - vs.fixedColumnWidth;
- for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
+ for (size_t margin = 0; margin < vs.ms.size(); margin++) {
if ((pt.x >= x) && (pt.x < x + vs.ms[margin].width))
- marginClicked = margin;
+ marginClicked = static_cast<int>(margin);
x += vs.ms[margin].width;
}
if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) {
@@ -3319,13 +3320,13 @@ int Editor::HorizontalMove(unsigned int iMessage) {
sel.selType = Selection::selRectangle;
sel.Rectangular() = SelectionRange(spCaret, rangeBase.anchor);
SetRectangularRange();
+ } else if (sel.IsRectangular()) {
+ // Not a rectangular extension so switch to stream.
+ const SelectionPosition selAtLimit =
+ (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start;
+ sel.selType = Selection::selStream;
+ sel.SetSelection(SelectionRange(selAtLimit));
} else {
- if (sel.IsRectangular()) {
- // Not a rectangular extension so switch to stream.
- SelectionPosition selAtLimit = (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start;
- sel.selType = Selection::selStream;
- sel.SetSelection(SelectionRange(selAtLimit));
- }
if (!additionalSelectionTyping) {
InvalidateWholeSelection();
sel.DropAdditionalRanges();
@@ -3421,7 +3422,7 @@ int Editor::HorizontalMove(unsigned int iMessage) {
const int directionMove = (spCaret < spCaretNow) ? -1 : 1;
spCaret = MovePositionSoVisible(spCaret, directionMove);
- // Handle move versus extend, and special behaviour for non-emoty left/right
+ // Handle move versus extend, and special behaviour for non-empty left/right
switch (iMessage) {
case SCI_CHARLEFT:
case SCI_CHARRIGHT:
@@ -4304,7 +4305,7 @@ bool Editor::PointInSelMargin(Point pt) const {
Window::Cursor Editor::GetMarginCursor(Point pt) const {
int x = 0;
- for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
+ for (size_t margin = 0; margin < vs.ms.size(); margin++) {
if ((pt.x >= x) && (pt.x < x + vs.ms[margin].width))
return static_cast<Window::Cursor>(vs.ms[margin].cursor);
x += vs.ms[margin].width;
@@ -4513,6 +4514,10 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie
}
} else { // Single click
if (inSelMargin) {
+ if (sel.IsRectangular() || (sel.Count() > 1)) {
+ InvalidateWholeSelection();
+ sel.Clear();
+ }
sel.selType = Selection::selStream;
if (!shift) {
// Single click in margin: select whole line or only subline if word wrap is enabled
@@ -5584,8 +5589,8 @@ void Editor::AddStyledText(char *buffer, int appendLength) {
SetEmptySelection(sel.MainCaret() + lengthInserted);
}
-static bool ValidMargin(uptr_t wParam) {
- return wParam <= SC_MAX_MARGIN;
+bool Editor::ValidMargin(uptr_t wParam) {
+ return wParam < vs.ms.size();
}
static char *CharPtrFromSPtr(sptr_t lParam) {
@@ -6899,6 +6904,27 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
else
return 0;
+ case SCI_SETMARGINBACKN:
+ if (ValidMargin(wParam)) {
+ vs.ms[wParam].back = ColourDesired(static_cast<long>(lParam));
+ InvalidateStyleRedraw();
+ }
+ break;
+
+ case SCI_GETMARGINBACKN:
+ if (ValidMargin(wParam))
+ return vs.ms[wParam].back.AsLong();
+ else
+ return 0;
+
+ case SCI_SETMARGINS:
+ if (wParam < 1000)
+ vs.ms.resize(wParam);
+ break;
+
+ case SCI_GETMARGINS:
+ return vs.ms.size();
+
case SCI_STYLECLEARALL:
vs.ClearStyles();
InvalidateStyleRedraw();
@@ -7449,10 +7475,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return vs.zoomLevel;
case SCI_GETEDGECOLUMN:
- return vs.theEdge;
+ return vs.theEdge.column;
case SCI_SETEDGECOLUMN:
- vs.theEdge = static_cast<int>(wParam);
+ vs.theEdge.column = static_cast<int>(wParam);
InvalidateStyleRedraw();
break;
@@ -7465,10 +7491,20 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
break;
case SCI_GETEDGECOLOUR:
- return vs.edgecolour.AsLong();
+ return vs.theEdge.colour.AsLong();
case SCI_SETEDGECOLOUR:
- vs.edgecolour = ColourDesired(static_cast<long>(wParam));
+ vs.theEdge.colour = ColourDesired(static_cast<long>(wParam));
+ InvalidateStyleRedraw();
+ break;
+
+ case SCI_MULTIEDGEADDLINE:
+ vs.theMultiEdge.push_back(EdgeProperties(wParam, lParam));
+ InvalidateStyleRedraw();
+ break;
+
+ case SCI_MULTIEDGECLEARALL:
+ std::vector<EdgeProperties>().swap(vs.theMultiEdge); // Free vector and memory, C++03 compatible
InvalidateStyleRedraw();
break;
@@ -7600,6 +7636,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETMOUSEDOWNCAPTURES:
return mouseDownCaptures;
+ case SCI_SETMOUSEWHEELCAPTURES:
+ mouseWheelCaptures = wParam != 0;
+ break;
+
+ case SCI_GETMOUSEWHEELCAPTURES:
+ return mouseWheelCaptures;
+
case SCI_SETCURSOR:
cursorMode = static_cast<int>(wParam);
DisplayCursor(Window::cursorText);
diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h
index a779a84..74fc46f 100644
--- a/scintilla/src/Editor.h
+++ b/scintilla/src/Editor.h
@@ -176,6 +176,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool hasFocus;
bool mouseDownCaptures;
+ bool mouseWheelCaptures;
int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret
bool horizontalScrollBarVisible;
@@ -570,6 +571,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void AddStyledText(char *buffer, int appendLength);
virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0;
+ bool ValidMargin(uptr_t wParam);
void StyleSetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
sptr_t StyleGetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
diff --git a/scintilla/src/MarginView.cxx b/scintilla/src/MarginView.cxx
index 52a2cb2..3ec70f0 100644
--- a/scintilla/src/MarginView.cxx
+++ b/scintilla/src/MarginView.cxx
@@ -193,7 +193,7 @@ void MarginView::PaintMargin(Surface *surface, int topLine, PRectangle rc, PRect
Point ptOrigin = model.GetVisibleOriginInMain();
FontAlias fontLineNumber = vs.styles[STYLE_LINENUMBER].font;
- for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
+ for (size_t margin = 0; margin < vs.ms.size(); margin++) {
if (vs.ms[margin].width > 0) {
rcSelMargin.left = rcSelMargin.right;
@@ -216,6 +216,9 @@ void MarginView::PaintMargin(Surface *surface, int topLine, PRectangle rc, PRect
case SC_MARGIN_FORE:
colour = vs.styles[STYLE_DEFAULT].fore;
break;
+ case SC_MARGIN_COLOUR:
+ colour = vs.ms[margin].back;
+ break;
default:
colour = vs.styles[STYLE_LINENUMBER].back;
break;
diff --git a/scintilla/src/SplitVector.h b/scintilla/src/SplitVector.h
index cd75e35..b0fdddd 100644
--- a/scintilla/src/SplitVector.h
+++ b/scintilla/src/SplitVector.h
@@ -29,15 +29,17 @@ protected:
void GapTo(int position) {
if (position != part1Length) {
if (position < part1Length) {
- memmove(
- body + position + gapLength,
+ // Moving the gap towards start so moving elements towards end
+ std::copy_backward(
body + position,
- sizeof(T) * (part1Length - position));
- } else { // position > part1Length
- memmove(
body + part1Length,
+ body + gapLength + part1Length);
+ } else { // position > part1Length
+ // Moving the gap towards end so moving elements towards start
+ std::copy(
body + part1Length + gapLength,
- sizeof(T) * (position - part1Length));
+ body + gapLength + position,
+ body + part1Length);
}
part1Length = position;
}
@@ -93,7 +95,7 @@ public:
GapTo(lengthBody);
T *newBody = new T[newSize];
if ((size != 0) && (body != 0)) {
- memmove(newBody, body, sizeof(T) * lengthBody);
+ std::copy(body, body + lengthBody, newBody);
delete []body;
}
body = newBody;
@@ -205,7 +207,7 @@ public:
}
RoomFor(insertLength);
GapTo(positionToInsert);
- memmove(body + part1Length, s + positionFrom, sizeof(T) * insertLength);
+ std::copy(s + positionFrom, s + positionFrom + insertLength, body + part1Length);
lengthBody += insertLength;
part1Length += insertLength;
gapLength -= insertLength;
@@ -254,11 +256,11 @@ public:
if (range1Length > part1AfterPosition)
range1Length = part1AfterPosition;
}
- memcpy(buffer, body + position, range1Length * sizeof(T));
+ std::copy(body + position, body + position + range1Length, buffer);
buffer += range1Length;
position = position + range1Length + gapLength;
int range2Length = retrieveLength - range1Length;
- memcpy(buffer, body + position, range2Length * sizeof(T));
+ std::copy(body + position, body + position + range2Length, buffer);
}
T *BufferPointer() {
diff --git a/scintilla/src/ViewStyle.cxx b/scintilla/src/ViewStyle.cxx
index e288464..0f026c4 100644
--- a/scintilla/src/ViewStyle.cxx
+++ b/scintilla/src/ViewStyle.cxx
@@ -139,17 +139,13 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
alwaysShowCaretLineBackground = source.alwaysShowCaretLineBackground;
caretLineBackground = source.caretLineBackground;
caretLineAlpha = source.caretLineAlpha;
- edgecolour = source.edgecolour;
- edgeState = source.edgeState;
caretStyle = source.caretStyle;
caretWidth = source.caretWidth;
someStylesProtected = false;
someStylesForceCase = false;
leftMarginWidth = source.leftMarginWidth;
rightMarginWidth = source.rightMarginWidth;
- for (int margin=0; margin <= SC_MAX_MARGIN; margin++) {
- ms[margin] = source.ms[margin];
- }
+ ms = source.ms;
maskInLine = source.maskInLine;
maskDrawInText = source.maskDrawInText;
fixedColumnWidth = source.fixedColumnWidth;
@@ -171,7 +167,9 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
braceBadLightIndicatorSet = source.braceBadLightIndicatorSet;
braceBadLightIndicator = source.braceBadLightIndicator;
+ edgeState = source.edgeState;
theEdge = source.theEdge;
+ theMultiEdge = source.theMultiEdge;
marginNumberPadding = source.marginNumberPadding;
ctrlCharPadding = source.ctrlCharPadding;
@@ -196,7 +194,7 @@ void ViewStyle::CalculateMarginWidthAndMask() {
fixedColumnWidth = marginInside ? leftMarginWidth : 0;
maskInLine = 0xffffffff;
int maskDefinedMarkers = 0;
- for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
+ for (size_t margin = 0; margin < ms.size(); margin++) {
fixedColumnWidth += ms[margin].width;
if (ms[margin].width > 0)
maskInLine &= ~ms[margin].mask;
@@ -268,8 +266,6 @@ void ViewStyle::Init(size_t stylesSize_) {
alwaysShowCaretLineBackground = false;
caretLineBackground = ColourDesired(0xff, 0xff, 0);
caretLineAlpha = SC_ALPHA_NOALPHA;
- edgecolour = ColourDesired(0xc0, 0xc0, 0xc0);
- edgeState = EDGE_NONE;
caretStyle = CARETSTYLE_LINE;
caretWidth = 1;
someStylesProtected = false;
@@ -282,6 +278,7 @@ void ViewStyle::Init(size_t stylesSize_) {
leftMarginWidth = 1;
rightMarginWidth = 1;
+ ms.resize(SC_MAX_MARGIN + 1);
ms[0].style = SC_MARGIN_NUMBER;
ms[0].width = 0;
ms[0].mask = 0;
@@ -310,7 +307,8 @@ void ViewStyle::Init(size_t stylesSize_) {
braceBadLightIndicatorSet = false;
braceBadLightIndicator = 0;
- theEdge = 0;
+ edgeState = EDGE_NONE;
+ theEdge = EdgeProperties(0, ColourDesired(0xc0, 0xc0, 0xc0));
marginNumberPadding = 3;
ctrlCharPadding = 3; // +3 For a blank on front and rounded edge each side
diff --git a/scintilla/src/ViewStyle.h b/scintilla/src/ViewStyle.h
index 8244844..381ef79 100644
--- a/scintilla/src/ViewStyle.h
+++ b/scintilla/src/ViewStyle.h
@@ -17,6 +17,7 @@ namespace Scintilla {
class MarginStyle {
public:
int style;
+ ColourDesired back;
int width;
int mask;
bool sensitive;
@@ -72,6 +73,17 @@ struct ForeBackColours {
ColourOptional back;
};
+struct EdgeProperties {
+ int column;
+ ColourDesired colour;
+ EdgeProperties(int column_ = 0, ColourDesired colour_ = ColourDesired(0)) :
+ column(column_), colour(colour_) {
+ }
+ EdgeProperties(uptr_t wParam, sptr_t lParam) :
+ column(static_cast<int>(wParam)), colour(static_cast<long>(lParam)) {
+ }
+};
+
/**
*/
class ViewStyle {
@@ -115,7 +127,7 @@ public:
int rightMarginWidth; ///< Spacing margin on right of text
int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
int maskDrawInText; ///< Mask for markers that always draw in text
- MarginStyle ms[SC_MAX_MARGIN+1];
+ std::vector<MarginStyle> ms;
int fixedColumnWidth; ///< Total width of margins
bool marginInside; ///< true: margin included in text view, false: separate views
int textStart; ///< Starting x position of text within the view
@@ -130,8 +142,6 @@ public:
bool alwaysShowCaretLineBackground;
ColourDesired caretLineBackground;
int caretLineAlpha;
- ColourDesired edgecolour;
- int edgeState;
int caretStyle;
int caretWidth;
bool someStylesProtected;
@@ -146,7 +156,9 @@ public:
int braceHighlightIndicator;
bool braceBadLightIndicatorSet;
int braceBadLightIndicator;
- int theEdge;
+ int edgeState;
+ EdgeProperties theEdge;
+ std::vector<EdgeProperties> theMultiEdge;
int marginNumberPadding; // the right-side padding of the number margin
int ctrlCharPadding; // the padding around control character text blobs
int lastSegItalicsOffset; // the offset so as not to clip italic characters at EOLs
diff --git a/scintilla/version.txt b/scintilla/version.txt
index 32dd0d7..93bb739 100644
--- a/scintilla/version.txt
+++ b/scintilla/version.txt
@@ -1 +1 @@
-367
+370
diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx
index 1d498eb..d4da2f8 100644
--- a/scintilla/win32/ScintillaWin.cxx
+++ b/scintilla/win32/ScintillaWin.cxx
@@ -1272,6 +1272,18 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
break;
case WM_MOUSEWHEEL:
+ if (!mouseWheelCaptures) {
+ // if the mouse wheel is not captured, test if the mouse
+ // pointer is over the editor window and if not, don't
+ // handle the message but pass it on.
+ RECT rc;
+ GetWindowRect(MainHWND(), &rc);
+ POINT pt;
+ pt.x = GET_X_LPARAM(lParam);
+ pt.y = GET_Y_LPARAM(lParam);
+ if (!PtInRect(&rc, pt))
+ return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);
+ }
// if autocomplete list active then send mousewheel message to it
if (ac.Active()) {
HWND hWnd = static_cast<HWND>(ac.lb->GetID());