From 92290868cf9753d2df0d494cb44e2ff62a570b58 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 24 May 2021 19:31:06 +1000 Subject: Define C++ version of the Scintilla API in ScintillaTypes.h, ScintillaMessages.h and ScintillaStructures.h using scoped enumerations. Use these headers instead of Scintilla.h internally. External definitions go in the Scintilla namespace and internal definitio0ns in Scintilla::Internal. --- src/CellBuffer.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/CellBuffer.h') diff --git a/src/CellBuffer.h b/src/CellBuffer.h index 43ee0d884..361c285ad 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -8,7 +8,7 @@ #ifndef CELLBUFFER_H #define CELLBUFFER_H -namespace Scintilla { +namespace Scintilla::Internal { // Interface to per-line data that wants to see each line insertion and deletion class PerLine { @@ -115,7 +115,7 @@ private: SplitVector style; bool readOnly; bool utf8Substance; - int utf8LineEnds; + Scintilla::LineEndType utf8LineEnds; bool collectingUndo; UndoHistory uh; @@ -154,18 +154,18 @@ public: Sci::Position Length() const noexcept; void Allocate(Sci::Position newSize); void SetUTF8Substance(bool utf8Substance_) noexcept; - int GetLineEndTypes() const noexcept { return utf8LineEnds; } - void SetLineEndTypes(int utf8LineEnds_); + Scintilla::LineEndType GetLineEndTypes() const noexcept { return utf8LineEnds; } + void SetLineEndTypes(Scintilla::LineEndType utf8LineEnds_); bool ContainsLineEnd(const char *s, Sci::Position length) const noexcept; void SetPerLine(PerLine *pl) noexcept; - int LineCharacterIndex() const noexcept; - void AllocateLineCharacterIndex(int lineCharacterIndex); - void ReleaseLineCharacterIndex(int lineCharacterIndex); + Scintilla::LineCharacterIndexType LineCharacterIndex() const noexcept; + void AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); + void ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); Sci::Line Lines() const noexcept; Sci::Position LineStart(Sci::Line line) const noexcept; - Sci::Position IndexLineStart(Sci::Line line, int lineCharacterIndex) const noexcept; + Sci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; Sci::Line LineFromPosition(Sci::Position pos) const noexcept; - Sci::Line LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const noexcept; + Sci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; void InsertLine(Sci::Line line, Sci::Position position, bool lineStart); void RemoveLine(Sci::Line line); const char *InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence); -- cgit v1.2.3