aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Indicator.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-24 19:31:06 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-24 19:31:06 +1000
commit92290868cf9753d2df0d494cb44e2ff62a570b58 (patch)
tree001e6cfce84372a03997de3138d630751ee8d38a /src/Indicator.h
parentee1886079d0a5cd350ee8e3379be347943ba93ae (diff)
downloadscintilla-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/Indicator.h')
-rw-r--r--src/Indicator.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Indicator.h b/src/Indicator.h
index 11851476e..fc17a82c2 100644
--- a/src/Indicator.h
+++ b/src/Indicator.h
@@ -8,14 +8,14 @@
#ifndef INDICATOR_H
#define INDICATOR_H
-namespace Scintilla {
+namespace Scintilla::Internal {
struct StyleAndColour {
- int style;
+ Scintilla::IndicatorStyle style;
ColourRGBA fore;
- StyleAndColour() noexcept : style(INDIC_PLAIN), fore(0, 0, 0) {
+ StyleAndColour() noexcept : style(Scintilla::IndicatorStyle::Plain), fore(0, 0, 0) {
}
- StyleAndColour(int style_, ColourRGBA fore_ = ColourRGBA(0, 0, 0)) noexcept : style(style_), fore(fore_) {
+ StyleAndColour(Scintilla::IndicatorStyle style_, ColourRGBA fore_ = ColourRGBA(0, 0, 0)) noexcept : style(style_), fore(fore_) {
}
bool operator==(const StyleAndColour &other) const noexcept {
return (style == other.style) && (fore == other.fore);
@@ -32,24 +32,24 @@ public:
bool under;
int fillAlpha;
int outlineAlpha;
- int attributes;
+ Scintilla::IndicFlag attributes;
XYPOSITION strokeWidth = 1.0f;
- Indicator() noexcept : under(false), fillAlpha(30), outlineAlpha(50), attributes(0) {
+ Indicator() noexcept : under(false), fillAlpha(30), outlineAlpha(50), attributes(Scintilla::IndicFlag::None) {
}
- Indicator(int style_, ColourRGBA fore_= ColourRGBA(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept :
- sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(0) {
+ Indicator(Scintilla::IndicatorStyle style_, ColourRGBA fore_= ColourRGBA(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept :
+ sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(Scintilla::IndicFlag::None) {
}
void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State drawState, int value) const;
bool IsDynamic() const noexcept {
return !(sacNormal == sacHover);
}
bool OverridesTextFore() const noexcept {
- return sacNormal.style == INDIC_TEXTFORE || sacHover.style == INDIC_TEXTFORE;
+ return sacNormal.style == Scintilla::IndicatorStyle::TextFore || sacHover.style == Scintilla::IndicatorStyle::TextFore;
}
- int Flags() const noexcept {
+ Scintilla::IndicFlag Flags() const noexcept {
return attributes;
}
- void SetFlags(int attributes_) noexcept;
+ void SetFlags(Scintilla::IndicFlag attributes_) noexcept;
};
}