From 215e051e588219ec41341a27bb87793732cccd88 Mon Sep 17 00:00:00 2001
From: mitchell
Date: Sat, 4 Jan 2020 13:50:52 -0500
Subject: Backport: Define ILexerWithIdentity with methods for retrieving name,
ID, and property values. Implement ILexerWithIdentity on object lexers.
Implement ILexerWithIdentity on LexerSimple wrapper for function lexers.
Backport of changeset 7870:6ffcbd42288c, but with a new interface compatible
with ILexer, not ILexer5.
---
doc/ScintillaDoc.html | 25 +++++++++++++++++++++++--
doc/ScintillaHistory.html | 4 ++++
2 files changed, 27 insertions(+), 2 deletions(-)
(limited to 'doc')
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index d6d98b578..ef9e3e81b 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -1808,7 +1808,7 @@ struct Sci_TextToFind {
SCI_GETSELECTIONNEND(int selection) → position
SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) → position
Set or query the start and end position of each already existing selection.
- Query the virtual space at start and end of each selection.
+ Query the virtual space at start and end of each selection.
Mostly of use to query each range for its text. The selection parameter is zero-based.
@@ -7143,7 +7143,7 @@ optimisation could be to remember where a setting first affects the document and
Version returns an enumerated value specifying which version of the interface is implemented:
lvOriginal for ILexer, lvSubStyles for ILexerWithSubStyles,
-and lvMetaData for ILexerWithMetaData.
+lvMetaData for ILexerWithMetaData, and lvIdentity for ILexerWithIdentity>.
Release is called to destroy the lexer object.
@@ -7205,6 +7205,27 @@ A set of common tags and conventions for combining them is };
+ILexerWithIdentity
+
+
+class ILexerWithIdentity : public ILexer {
+public:
+ virtual const char * SCI_METHOD GetName() = 0;
+ virtual int SCI_METHOD GetIdentifier() = 0;
+ virtual const char * SCI_METHOD PropertyGet(const char *key) = 0;
+};
+
+
+
+GetName and GetIdentifier may be called
+to discover the identity of a lexer and be used to implement
+SCI_GETLEXERLANGUAGE and
+SCI_GETLEXER.
+
+PropertyGet may be called
+to discover the value of a property stored by a lexer and be used to implement
+SCI_GETPROPERTY.
+
IDocument
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 308c1d40c..fe08f84a4 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -561,6 +561,10 @@
Released 07 December 2019.
+ ILexerWithIdentity interface defined provisionally to support use of Lexilla.
+ The details of this interface may change before being stabilised in Scintilla 5.0.
+
+
SCI_LOADLEXERLIBRARY implemented on Cocoa.
--
cgit v1.2.3