diff options
author | Neil <nyamatongwe@gmail.com> | 2018-03-15 10:15:10 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-03-15 10:15:10 +1100 |
commit | 2851eb18ecccf35ca6be1c583dfa23c54b5d732c (patch) | |
tree | 09704b5522ac11d3cf71bb059c68d66d2f18d24b /src/LineMarker.h | |
parent | fb035f079455cfb227ad3d9e6a6560cf5d69b1c1 (diff) | |
download | scintilla-mirror-2851eb18ecccf35ca6be1c583dfa23c54b5d732c.tar.gz |
Backport: Use forward class definitions of XPM and RGBAImage so only code that uses them needs to #include "XPM.h".
Move definition of standard methods on LineMarker from header to implementation
to reduce included text and further isolate use of XPM and RGBAImage.
Backport of changeset 6624:32adac0930bb.
Diffstat (limited to 'src/LineMarker.h')
-rw-r--r-- | src/LineMarker.h | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/src/LineMarker.h b/src/LineMarker.h index 6b66e03e8..28a63cd3b 100644 --- a/src/LineMarker.h +++ b/src/LineMarker.h @@ -10,6 +10,9 @@ namespace Scintilla { +class XPM; +class RGBAImage; + typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker); /** @@ -30,41 +33,10 @@ public: * 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); - back = ColourDesired(0xff,0xff,0xff); - backSelected = ColourDesired(0xff,0x00,0x00); - alpha = SC_ALPHA_NOALPHA; - customDraw = nullptr; - } - LineMarker(const LineMarker &) { - // Defined to avoid pxpm and image being blindly copied, not as a complete copy constructor. - markType = SC_MARK_CIRCLE; - fore = ColourDesired(0,0,0); - back = ColourDesired(0xff,0xff,0xff); - backSelected = ColourDesired(0xff,0x00,0x00); - alpha = SC_ALPHA_NOALPHA; - pxpm.reset(); - image.reset(); - customDraw = nullptr; - } - ~LineMarker() { - } - LineMarker &operator=(const LineMarker &other) { - // Defined to avoid pxpm and image being blindly copied, not as a complete assignment operator. - if (this != &other) { - markType = SC_MARK_CIRCLE; - fore = ColourDesired(0,0,0); - back = ColourDesired(0xff,0xff,0xff); - backSelected = ColourDesired(0xff,0x00,0x00); - alpha = SC_ALPHA_NOALPHA; - pxpm.reset(); - image.reset(); - customDraw = nullptr; - } - return *this; - } + LineMarker(); + LineMarker(const LineMarker &); + virtual ~LineMarker(); + LineMarker &operator=(const LineMarker &other); void SetXPM(const char *textForm); void SetXPM(const char *const *linesForm); void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage); |