aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Indicator.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-06-10 10:51:46 +1000
committerNeil <nyamatongwe@gmail.com>2020-06-10 10:51:46 +1000
commitc6f1f1c7c7f486fd19c394a7e33df9f0980b55c8 (patch)
tree7e9ef4edb5853eccbcb2665a47657ec23584a2c5 /src/Indicator.h
parent4b4de8537bdc20fc858e8a6258e80181ac417fe8 (diff)
downloadscintilla-mirror-c6f1f1c7c7f486fd19c394a7e33df9f0980b55c8.tar.gz
Backport: Convert enum to enum class. Add noexcept and const.
Backport of changeset 8296:d8dc184c713c.
Diffstat (limited to 'src/Indicator.h')
-rw-r--r--src/Indicator.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Indicator.h b/src/Indicator.h
index 24319df99..669d9a2d8 100644
--- a/src/Indicator.h
+++ b/src/Indicator.h
@@ -26,7 +26,7 @@ struct StyleAndColour {
*/
class Indicator {
public:
- enum DrawState { drawNormal, drawHover };
+ enum class State { normal, hover };
StyleAndColour sacNormal;
StyleAndColour sacHover;
bool under;
@@ -38,7 +38,7 @@ public:
Indicator(int style_, ColourDesired fore_=ColourDesired(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) {
}
- void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const;
+ 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);
}
@@ -48,7 +48,7 @@ public:
int Flags() const noexcept {
return attributes;
}
- void SetFlags(int attributes_);
+ void SetFlags(int attributes_) noexcept;
};
}