aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-07-16 09:16:44 +1000
committerNeil <nyamatongwe@gmail.com>2020-07-16 09:16:44 +1000
commit86fc59c515f92eb9407e5f981eab1f4d04a6d97e (patch)
tree70c0f28422712d87cf21449071674145b761a471 /src/LineMarker.cxx
parent79a9cd4d05fcc71fcdb01eda70e53abc7195213d (diff)
downloadscintilla-mirror-86fc59c515f92eb9407e5f981eab1f4d04a6d97e.tar.gz
Backport: Rename typeOfFold to FoldPart and make an enum class.
Backport of changeset 8411:606b39f5e1f4.
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r--src/LineMarker.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index cfe67c1ce..c7ab08966 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -108,9 +108,9 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C
surface->FillRectangle(rcH, fore);
}
-void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const {
+void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, FoldPart part, int marginStyle) const {
if (customDraw) {
- customDraw(surface, rcWhole, fontForCharacter, tFold, marginStyle, this);
+ customDraw(surface, rcWhole, fontForCharacter, static_cast<int>(part), marginStyle, this);
return;
}
@@ -118,22 +118,22 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
ColourDesired colourBody = back;
ColourDesired colourTail = back;
- switch (tFold) {
- case LineMarker::head:
- case LineMarker::headWithTail:
+ switch (part) {
+ case FoldPart::head:
+ case FoldPart::headWithTail:
colourHead = backSelected;
colourTail = backSelected;
break;
- case LineMarker::body:
+ case FoldPart::body:
colourHead = backSelected;
colourBody = backSelected;
break;
- case LineMarker::tail:
+ case FoldPart::tail:
colourBody = backSelected;
colourTail = backSelected;
break;
default:
- // LineMarker::undefined
+ // FoldPart::undefined
break;
}
@@ -314,7 +314,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
break;
case SC_MARK_BOXPLUSCONNECTED: {
- if (tFold == LineMarker::headWithTail)
+ if (part == FoldPart::headWithTail)
surface->PenColour(colourTail);
else
surface->PenColour(colourBody);
@@ -328,7 +328,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
DrawBox(surface, centreX, centreY, blobSize, fore, colourHead);
DrawPlus(surface, centreX, centreY, blobSize, colourTail);
- if (tFold == LineMarker::body) {
+ if (part == FoldPart::body) {
surface->PenColour(colourTail);
surface->MoveTo(centreX + 1, centreY + blobSize);
surface->LineTo(centreX + blobSize + 1, centreY + blobSize);
@@ -364,7 +364,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
surface->MoveTo(centreX, ircWhole.top);
surface->LineTo(centreX, centreY - blobSize);
- if (tFold == LineMarker::body) {
+ if (part == FoldPart::body) {
surface->PenColour(colourTail);
surface->MoveTo(centreX + 1, centreY + blobSize);
surface->LineTo(centreX + blobSize + 1, centreY + blobSize);
@@ -385,7 +385,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
break;
case SC_MARK_CIRCLEPLUSCONNECTED: {
- if (tFold == LineMarker::headWithTail)
+ if (part == FoldPart::headWithTail)
surface->PenColour(colourTail);
else
surface->PenColour(colourBody);