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. --- include/ILexer.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ILexer.h b/include/ILexer.h index 42f980f89..f7f188972 100644 --- a/include/ILexer.h +++ b/include/ILexer.h @@ -46,7 +46,7 @@ public: virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0; }; -enum { lvOriginal=0, lvSubStyles=1, lvMetaData=2 }; +enum { lvOriginal=0, lvSubStyles=1, lvMetaData=2, lvIdentity=3 }; class ILexer { public: @@ -85,6 +85,13 @@ public: virtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0; }; +class ILexerWithIdentity : public ILexerWithMetaData { +public: + virtual const char * SCI_METHOD GetName() = 0; + virtual int SCI_METHOD GetIdentifier() = 0; + virtual const char * SCI_METHOD PropertyGet(const char *key) = 0; +}; + } #endif -- cgit v1.2.3