aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/LineMarker.h')
-rw-r--r--src/LineMarker.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/LineMarker.h b/src/LineMarker.h
index 4004a8a42..6a5fe7492 100644
--- a/src/LineMarker.h
+++ b/src/LineMarker.h
@@ -12,6 +12,8 @@
namespace Scintilla {
#endif
+typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker);
+
/**
*/
class LineMarker {
@@ -25,6 +27,11 @@ public:
int alpha;
XPM *pxpm;
RGBAImage *image;
+ /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native
+ * Draw function for drawing line markers. Allow those platforms to override
+ * it instead of creating a new method(s) in the Surface class that existing
+ * platforms must implement as empty. */
+ DrawLineMarkerFn customDraw;
LineMarker() {
markType = SC_MARK_CIRCLE;
fore = ColourDesired(0,0,0);
@@ -33,6 +40,7 @@ public:
alpha = SC_ALPHA_NOALPHA;
pxpm = NULL;
image = NULL;
+ customDraw = NULL;
}
LineMarker(const LineMarker &) {
// Defined to avoid pxpm being blindly copied, not as a complete copy constructor
@@ -43,6 +51,7 @@ public:
alpha = SC_ALPHA_NOALPHA;
pxpm = NULL;
image = NULL;
+ customDraw = NULL;
}
~LineMarker() {
delete pxpm;
@@ -60,6 +69,7 @@ public:
pxpm = NULL;
delete image;
image = NULL;
+ customDraw = NULL;
}
return *this;
}