aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.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/LineMarker.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/LineMarker.h')
-rw-r--r--src/LineMarker.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/LineMarker.h b/src/LineMarker.h
index e0c4100a5..0a60da962 100644
--- a/src/LineMarker.h
+++ b/src/LineMarker.h
@@ -8,14 +8,12 @@
#ifndef LINEMARKER_H
#define LINEMARKER_H
-namespace Scintilla {
+namespace Scintilla::Internal {
class XPM;
class RGBAImage;
-typedef void (*DrawLineMarkerFn)(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, int tFold, int marginStyle, const void *lineMarker);
-
-enum class Layer { base = 0, under = 1, over = 2 };
+typedef void (*DrawLineMarkerFn)(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, int tFold, Scintilla::MarginType marginStyle, const void *lineMarker);
/**
*/
@@ -23,12 +21,12 @@ class LineMarker {
public:
enum class FoldPart { undefined, head, body, tail, headWithTail };
- int markType = SC_MARK_CIRCLE;
+ Scintilla::MarkerSymbol markType = Scintilla::MarkerSymbol::Circle;
ColourRGBA fore = ColourRGBA(0, 0, 0);
ColourRGBA back = ColourRGBA(0xff, 0xff, 0xff);
ColourRGBA backSelected = ColourRGBA(0xff, 0x00, 0x00);
- Layer layer = Layer::base;
- int alpha = SC_ALPHA_NOALPHA;
+ Scintilla::Layer layer = Scintilla::Layer::Base;
+ Scintilla::Alpha alpha = Scintilla::Alpha::NoAlpha;
XYPOSITION strokeWidth = 1.0f;
std::unique_ptr<XPM> pxpm;
std::unique_ptr<RGBAImage> image;
@@ -51,7 +49,7 @@ public:
void SetXPM(const char *const *linesForm);
void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
void AlignedPolygon(Surface *surface, const Point *pts, size_t npts) const;
- void Draw(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, FoldPart part, int marginStyle) const;
+ void Draw(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, FoldPart part, Scintilla::MarginType marginStyle) const;
void DrawFoldingMark(Surface *surface, const PRectangle &rcWhole, FoldPart part) const;
};