aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-11-19 13:48:37 +1100
committerNeil <nyamatongwe@gmail.com>2014-11-19 13:48:37 +1100
commitc1ce889ce992cf7006120c01c336fc51b44de9d1 (patch)
tree2995c377e0b35b1d389bd3c8875824dd65104650 /src/LineMarker.h
parent5007acf288a92f58c3d4a039a69b9baf50bed08b (diff)
downloadscintilla-mirror-c1ce889ce992cf7006120c01c336fc51b44de9d1.tar.gz
Platform overrides for some drawing and behaviour to benefit PLAT_CURSES.
From Mitchell Foral.
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;
}