From 199f9e16684c48d639c280b7f445c13dd0efb3a9 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 12 Mar 2021 09:21:30 +1100 Subject: Remove SetLexer, SetLexerLanguage, and LoadLexerLibrary methods. These have been superceded by Lexilla and the SetILexer API. --- doc/ScintillaDoc.html | 50 +++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 458b5efeb..146ca9ee1 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -284,8 +284,7 @@ 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.

@@ -2723,8 +2722,8 @@ struct Sci_TextToFind {

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 SCI_SETLEXER command to select - SCLEX_CONTAINER, in which case the container is sent a SCI_SETILEXER command to select + NULL, in which case the container is sent a SCN_STYLENEEDED 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.

@@ -7055,14 +7054,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ or .so modules (on GTK/Linux) that export three functions: GetLexerCount, GetLexerName, and GetLexerFactory. See ExternalLexer.cxx for more information.

- SCI_SETLEXER(int lexer)
SCI_GETLEXER → int
- SCI_SETLEXERLANGUAGE(<unused>, const char - *language)
SCI_GETLEXERLANGUAGE(<unused>, char *language) → int
SCI_SETILEXER(<unused>, pointer ilexer)
- SCI_LOADLEXERLIBRARY(<unused>, const char - *path)
SCI_COLOURISE(position start, position end)
SCI_CHANGELEXERSTATE(position start, position end) → int
SCI_PROPERTYNAMES(<unused>, char *names) → int
@@ -7091,24 +7085,14 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_TAGSOFSTYLE(int style, char *tags) → int
SCI_DESCRIPTIONOFSTYLE(int style, char *description) → int
-

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 SCN_STYLENEEDED 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 SCI_SETLEXER(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 -- cgit v1.2.3