From ff97c84526a6105c8371cc75333053640b4b4ccb Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 17 Jul 2017 14:21:40 +1000 Subject: Backport: Documentation for style metadata. Backport based on changeset 6348:329af61d687c. --- doc/ScintillaDoc.html | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index f41018471..2c2d5b3ae 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -6859,6 +6859,12 @@ Before release 3.6.0 the types int and unsigned int we In a future release, 64-bit builds will define these as 64-bit types to allow documents larger than 2 GB.

+

+Methods that return strings as const char * are not required to maintain separate allocations indefinitely: +lexer implementations may own a single buffer that is reused for each call. +Callers should make an immediate copy of returned strings. +

+

The return values from PropertySet and WordListSet are used to indicate whether the change requires performing lexing or folding over any of the document. It is the position at which to restart lexing and folding or -1 @@ -6868,7 +6874,8 @@ 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 and lvSubStyles for ILexerWithSubStyles.

+lvOriginal for ILexer, lvSubStyles for ILexerWithSubStyles, +and lvMetaData for ILexerWithMetaData.

Release is called to destroy the lexer object.

@@ -6909,6 +6916,27 @@ To allow lexers to report which line ends they support, and to support substyles };
+

ILexerWithMetaData

+ +

NamedStyles, NameOfStyle, +TagsOfStyle, and DescriptionOfStyle +are used to provide information on the set of styles used by this lexer. +NameOfStyle is the C-language identifier like "SCE_LUA_COMMENT". +TagsOfStyle is a set of tags describing the style in a standardized way like "literal string multiline raw". +A set of common tags and conventions for combining them is described here. +DescriptionOfStyle is an English description of the style like "Function or method name definition". +

+ +
+class ILexerWithMetaData : public ILexerWithSubStyles {
+public:
+        virtual int SCI_METHOD NamedStyles() = 0;
+        virtual const char * SCI_METHOD NameOfStyle(int style) = 0;
+        virtual const char * SCI_METHOD TagsOfStyle(int style) = 0;
+        virtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0;
+};
+
+

IDocument

-- cgit v1.2.3