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/PositionCache.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/PositionCache.h')
-rw-r--r-- | src/PositionCache.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h index 4c62900e8..16ac42ef8 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -8,7 +8,7 @@ #ifndef POSITIONCACHE_H #define POSITIONCACHE_H -namespace Scintilla { +namespace Scintilla::Internal { inline constexpr bool IsEOLChar(int ch) noexcept { return (ch == '\r') || (ch == '\n'); @@ -151,14 +151,8 @@ struct ScreenLine : public IScreenLine { */ class LineLayoutCache { public: - enum class Cache { - none = SC_CACHE_NONE, - caret = SC_CACHE_CARET, - page = SC_CACHE_PAGE, - document = SC_CACHE_DOCUMENT - }; private: - Cache level; + Scintilla::LineCache level; std::vector<std::shared_ptr<LineLayout>>cache; bool allInvalidated; int styleClock; @@ -174,8 +168,8 @@ public: virtual ~LineLayoutCache(); void Deallocate() noexcept; void Invalidate(LineLayout::ValidLevel validity_) noexcept; - void SetLevel(Cache level_) noexcept; - Cache GetLevel() const noexcept { return level; } + void SetLevel(Scintilla::LineCache level_) noexcept; + Scintilla::LineCache GetLevel() const noexcept { return level; } std::shared_ptr<LineLayout> Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, int maxChars, int styleClock_, Sci::Line linesOnScreen, Sci::Line linesInDoc); }; |