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/Style.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/Style.cxx')
-rw-r--r-- | src/Style.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Style.cxx b/src/Style.cxx index 5d926bf92..d71b62d97 100644 --- a/src/Style.cxx +++ b/src/Style.cxx @@ -11,14 +11,16 @@ #include <optional> #include <memory> +#include "ScintillaTypes.h" + #include "Debugging.h" #include "Geometry.h" #include "Platform.h" -#include "Scintilla.h" #include "Style.h" using namespace Scintilla; +using namespace Scintilla::Internal; bool FontSpecification::operator==(const FontSpecification &other) const noexcept { return fontName == other.fontName && @@ -60,14 +62,14 @@ void FontMeasurements::ClearMeasurements() noexcept { Style::Style() : FontSpecification() { Clear(ColourRGBA(0, 0, 0), ColourRGBA(0xff, 0xff, 0xff), - Platform::DefaultFontSize() * SC_FONT_SIZE_MULTIPLIER, nullptr, SC_CHARSET_DEFAULT, - SC_WEIGHT_NORMAL, false, false, false, CaseForce::mixed, true, true, false); + Platform::DefaultFontSize() * FontSizeMultiplier, nullptr, CharacterSet::Default, + FontWeight::Normal, false, false, false, CaseForce::mixed, true, true, false); } Style::Style(const Style &source) noexcept : FontSpecification(), FontMeasurements() { Clear(ColourRGBA(0, 0, 0), ColourRGBA(0xff, 0xff, 0xff), - 0, nullptr, 0, - SC_WEIGHT_NORMAL, false, false, false, CaseForce::mixed, true, true, false); + 0, nullptr, CharacterSet::Ansi, + FontWeight::Normal, false, false, false, CaseForce::mixed, true, true, false); fore = source.fore; back = source.back; characterSet = source.characterSet; @@ -89,8 +91,8 @@ Style &Style::operator=(const Style &source) noexcept { if (this == &source) return * this; Clear(ColourRGBA(0, 0, 0), ColourRGBA(0xff, 0xff, 0xff), - 0, nullptr, SC_CHARSET_DEFAULT, - SC_WEIGHT_NORMAL, false, false, false, CaseForce::mixed, true, true, false); + 0, nullptr, CharacterSet::Default, + FontWeight::Normal, false, false, false, CaseForce::mixed, true, true, false); fore = source.fore; back = source.back; characterSet = source.characterSet; @@ -107,8 +109,8 @@ Style &Style::operator=(const Style &source) noexcept { } void Style::Clear(ColourRGBA fore_, ColourRGBA back_, int size_, - const char *fontName_, int characterSet_, - int weight_, bool italic_, bool eolFilled_, + const char *fontName_, CharacterSet characterSet_, + FontWeight weight_, bool italic_, bool eolFilled_, bool underline_, CaseForce caseForce_, bool visible_, bool changeable_, bool hotspot_) noexcept { fore = fore_; |