From bef1c8b54c13f9ee17e0aea5390ff1c2da2b24b5 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 31 Jul 2015 14:27:02 +1000 Subject: Updated lexer interfaces for Sci_Position. --- doc/ScintillaDoc.html | 221 ++++++++++---------------------------------------- 1 file changed, 44 insertions(+), 177 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 7538dd57f..4b9857404 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -82,7 +82,7 @@

Scintilla Documentation

-

Last edited 11 June 2015 NH

+

Last edited 31 July 2015 NH

There is an overview of the internal design of Scintilla.
@@ -6336,61 +6336,33 @@ SCI_METHOD PropertyNames()     virtual const char * SCI_METHOD DescribeProperty(const char *name) = 0;
    virtual - int SCI_METHOD - PropertySet(const - char - *key, - const -char *val) - = - 0;
-    virtual -const char -* SCI_METHOD DescribeWordListSets() - = -0;
+ Sci_Position SCI_METHOD + PropertySet(const char *key, const char *val) = 0;
    virtual - int SCI_METHOD - WordListSet(int - n, - const -char *wl) - = - 0;
+ const char * SCI_METHOD + DescribeWordListSets() = 0;
+    virtual + Sci_Position SCI_METHOD + WordListSet(int n, const char *wl) = 0;
    virtual void SCI_METHOD - Lex(unsigned - int - startPos, - int - lengthDoc, -int initStyle, - IDocument -*pAccess) - = -0;
+ Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;
    virtual void SCI_METHOD - Fold(unsigned - int startPos, - int - lengthDoc, -int initStyle, - IDocument -*pAccess) - = -0;
+ Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;
    virtual - void -* SCI_METHOD -PrivateCall(int - operation, -void -*pointer) -= 0;
+ void * SCI_METHOD + PrivateCall(int operation, void *pointer) = 0;
};
+

+The types Sci_Position and Sci_PositionU are used for positions and line numbers in the document. +Before release 3.6.0 the types int and unsigned int were used instead and, for 3.6.0, +Sci_Position is defined as int and Sci_PositionU is defined as unsigned int. +In a future release, 64-bit builds will define these as 64-bit types to allow documents larger than 2 GB. +

+

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 @@ -6444,134 +6416,29 @@ To allow lexers to report which line ends they support, and to support substyles

IDocument

-class IDocument - {
+class IDocument {
public:
-    virtual - int SCI_METHOD - Version() -const = - 0;
-    virtual - void SCI_METHOD - SetErrorStatus(int - status) - = -0;
-    virtual - int SCI_METHOD - Length() -const = - 0;
-    virtual - void SCI_METHOD - GetCharRange(char - *buffer, - int -position, -int lengthRetrieve) - const - = -0;
-    virtual - char SCI_METHOD - StyleAt(int - position) -const = - 0;
-    virtual - int SCI_METHOD - LineFromPosition(int position) - const = - 0;
-    virtual -int SCI_METHOD - LineStart(int line) - const = - 0;
-    virtual -int SCI_METHOD - GetLevel(int line) - -const = -0;
-    virtual -int SCI_METHOD - SetLevel(int - line, -int level) - = -0;
-    virtual - int SCI_METHOD - GetLineState(int - line) - const -= 0 -;
-    virtual - int SCI_METHOD - SetLineState(int - line, - int state) - = - 0;
-    virtual - void SCI_METHOD - StartStyling(int - position, - char mask) - = - 0;
-    virtual bool - SCI_METHOD - SetStyleFor(int - length, - char style) - = 0 -;
-     virtual - bool SCI_METHOD - SetStyles(int - length, -const char - *styles) - = -0;
-    virtual void - SCI_METHOD - DecorationSetCurrentIndicator(int - indicator) - = - 0;
-    virtual - void SCI_METHOD - DecorationFillRange(int - position, - int value, - int fillLength) - - = -0;
-    virtual - void SCI_METHOD - ChangeLexerState(int - start, - int end) - = - 0;
-    virtual - int SCI_METHOD - CodePage() - const -= 0 -;
-    virtual bool - SCI_METHOD - IsDBCSLeadByte(char - ch) - const = - 0;
+        virtual int SCI_METHOD Version() const = 0;
+        virtual void SCI_METHOD SetErrorStatus(int status) = 0;
+        virtual Sci_Position SCI_METHOD Length() const = 0;
+        virtual void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const = 0;
+        virtual char SCI_METHOD StyleAt(Sci_Position position) const = 0;
+        virtual Sci_Position SCI_METHOD LineFromPosition(Sci_Position position) const = 0;
+        virtual Sci_Position SCI_METHOD LineStart(Sci_Position line) const = 0;
+        virtual int SCI_METHOD GetLevel(Sci_Position line) const = 0;
+        virtual int SCI_METHOD SetLevel(Sci_Position line, int level) = 0;
+        virtual int SCI_METHOD GetLineState(Sci_Position line) const = 0;
+        virtual int SCI_METHOD SetLineState(Sci_Position line, int state) = 0;
+        virtual void SCI_METHOD StartStyling(Sci_Position position, char mask) = 0;
+        virtual bool SCI_METHOD SetStyleFor(Sci_Position length, char style) = 0;
+        virtual bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) = 0;
+        virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0;
+        virtual void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) = 0;
+        virtual void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) = 0;
+        virtual int SCI_METHOD CodePage() const = 0;
+        virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0;
+        virtual const char * SCI_METHOD BufferPointer() = 0;
+        virtual int SCI_METHOD GetLineIndentation(Sci_Position line) = 0;
};
@@ -6609,9 +6476,9 @@ bytes in the character.
class IDocumentWithLineEnd : public IDocument {
public:
-        virtual int SCI_METHOD LineEnd(int line) const = 0;
-        virtual int SCI_METHOD GetRelativePosition(int positionStart, int characterOffset) const = 0;
-        virtual int SCI_METHOD GetCharacterAndWidth(int position, int *pWidth) const = 0;
+        virtual Sci_Position SCI_METHOD LineEnd(Sci_Position line) const = 0;
+        virtual Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const = 0;
+        virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0;
};
-- cgit v1.2.3