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/Decoration.cxx | |
| 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/Decoration.cxx')
| -rw-r--r-- | src/Decoration.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 2574854b2..77b2894b2 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -17,16 +17,17 @@ #include <algorithm> #include <memory> +#include "ScintillaTypes.h" + #include "Debugging.h" -#include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "Decoration.h" -using namespace Scintilla; +using namespace Scintilla::Internal; namespace { @@ -230,7 +231,7 @@ template <typename POS> void DecorationList<POS>::DeleteLexerDecorations() { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), [](const std::unique_ptr<Decoration<POS>> &deco) noexcept { - return deco->Indicator() < INDICATOR_CONTAINER ; + return deco->Indicator() < static_cast<int>(Scintilla::IndicatorNumbers::Container); }), decorationList.end()); current = nullptr; SetView(); @@ -261,7 +262,7 @@ int DecorationList<POS>::AllOnFor(Sci::Position position) const noexcept { int mask = 0; for (const std::unique_ptr<Decoration<POS>> &deco : decorationList) { if (deco->rs.ValueAt(static_cast<POS>(position))) { - if (deco->Indicator() < INDICATOR_IME) { + if (deco->Indicator() < static_cast<int>(Scintilla::IndicatorNumbers::Ime)) { mask |= 1 << deco->Indicator(); } } @@ -298,7 +299,7 @@ Sci::Position DecorationList<POS>::End(int indicator, Sci::Position position) no } -namespace Scintilla { +namespace Scintilla::Internal { std::unique_ptr<IDecoration> DecorationCreate(bool largeDocument, int indicator) { if (largeDocument) |
