From 199f9e16684c48d639c280b7f445c13dd0efb3a9 Mon Sep 17 00:00:00 2001
From: Neil nmake -f lexilla.mak
Lexilla follows the external lexer protocol - so can be loaded by applications that support this. +
Lexilla follows the external lexer protocol so can be loaded by applications that support this.
As the protocol only supports object lexers, an additional function CreateLexer(const char *name)
is exposed which will create a lexer object (ILexer5 *) for any object lexer or function lexer.
The styling messages allow you to assign styles to text. If your styling needs can be met by
one of the standard lexers, or if you can write your own, then a lexer is probably the easiest
way to style your document. If you choose to use the container to do the styling you can use
- the command to select
- SCLEX_CONTAINER, in which case the container is sent a command to select
+ NULL, in which case the container is sent a notification each time text needs styling for display. As another
alternative, you might use idle time to style the document. Even if you use a lexer, you might
@@ -6104,7 +6103,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
With SC_DOCUMENTOPTION_STYLES_NONE, lexers are still active and may display
indicators. Some may produce folding information althoough most require lexical styles to correctly determine folding.
- Its often more efficient to set the null lexer SCLEX_NULL so no lexer is run.
+ Its often more efficient to set the null lexer NULL so no lexer is run.
The SC_DOCUMENTOPTION_TEXT_LARGE option is experimental and has not been
@@ -6112,7 +6111,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
Applications using this option should be tested to ensure the option works in their circumstances and each lexer
included should also be tested with documents larger than 4GB.
For many applications lexing documents larger than 4GB will be too sluggish so SC_DOCUMENTOPTION_STYLES_NONE
- and the null lexer SCLEX_NULL can be used. Another approach is to turn on idle styling with
+ and the null lexer NULL can be used. Another approach is to turn on idle styling with
SCI_SETIDLESTYLING.
GetLexerCount, GetLexerName, and
GetLexerFactory. See ExternalLexer.cxx for more information.
- SCI_SETLEXER(int lexer)SCI_SETLEXER(int lexer)
- SCI_GETLEXER → int
- You can select the lexer to use with an integer code from the SCLEX_* enumeration
- in Scintilla.h. There are two codes in this sequence that do not use lexers:
- SCLEX_NULL to select no lexing action and SCLEX_CONTAINER which sends
- the notification to
- the container whenever a range of text needs to be styled. You cannot use the
- SCLEX_AUTOMATIC value; this identifies additional external lexers that Scintilla
- assigns unused lexer numbers to.
SCI_SETLEXERLANGUAGE(<unused>, const char *language)
- SCI_GETLEXERLANGUAGE(<unused>, char *language NUL-terminated) → int
- SCI_SETLEXERLANGUAGE 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 language 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
- Lex*.cxx file and search for LexerModule. The third argument in the
+
SCI_GETLEXER → int
+ You can retrieve an integer lexer ID for the current lexer from the SCLEX_* enumeration
+ in SciLexer.h. Some lexers may not have a lexer ID, just a lexer name in which case 0 is returned.
SCI_GETLEXERLANGUAGE(<unused>, char *language NUL-terminated) → int
+ SCI_GETLEXERLANGUAGEreturns the name of the current lexer which must be set with SCI_SETILEXER.
+ To locate the name for a lexer, open the relevant
+ lexilla/lexers/Lex*.cxx file and search for LexerModule. The third argument in the
LexerModule constructor is the name to use.
SCI_SETILEXER(<unused>, pointer ilexer)
@@ -7121,13 +7105,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
SCI_GETLEXERLANGUAGE retrieves the name of the lexer.
SCI_LOADLEXERLIBRARY(<unused>, const char *path)
- Load a lexer implemented in a shared library. This is a .so file on GTK/Linux, a .dylib file on macOS, or a .DLL file on Windows.
-
SCI_COLOURISE(position start, position end)
This requests the current lexer or the container (if the lexer is set to
- SCLEX_CONTAINER) to style the document between start and
+ NULL) to style the document between start and
end. If end is -1, the document is styled from
start to the end. If the "fold" property is set to
"1" and your lexer or container supports folding, fold levels are also set. This
@@ -7608,7 +7588,7 @@ struct SCNotification {
SCN_STYLENEEDED
If you used (SCLEX_CONTAINER) to make the container act as the
+ href="#SCI_SETILEXER">SCI_SETILEXER(NULL) 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 SCI_GETENDSTYLED up to
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 16d3bb42b..a8de50362 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -573,6 +573,18 @@