diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-11-19 13:48:37 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-11-19 13:48:37 +1100 |
| commit | 3abacf188f611b460ad08818e2339c77f3ad85a5 (patch) | |
| tree | 94deae5111f5c098781cde15ce415888f48ff0aa /src/LineMarker.h | |
| parent | e9852dc1ceb2756b10ec6ab6b2238346e883e115 (diff) | |
| download | scintilla-mirror-3abacf188f611b460ad08818e2339c77f3ad85a5.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.h | 10 |
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; } |
