diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-24 19:31:06 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-24 19:31:06 +1000 |
commit | 92290868cf9753d2df0d494cb44e2ff62a570b58 (patch) | |
tree | 001e6cfce84372a03997de3138d630751ee8d38a /src/CellBuffer.h | |
parent | ee1886079d0a5cd350ee8e3379be347943ba93ae (diff) | |
download | scintilla-mirror-92290868cf9753d2df0d494cb44e2ff62a570b58.tar.gz |
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.
Diffstat (limited to 'src/CellBuffer.h')
-rw-r--r-- | src/CellBuffer.h | 18 |
1 files changed, 9 insertions, 9 deletions
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<char> 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); |