aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-15 10:15:10 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-15 10:15:10 +1100
commit2851eb18ecccf35ca6be1c583dfa23c54b5d732c (patch)
tree09704b5522ac11d3cf71bb059c68d66d2f18d24b /src/LineMarker.cxx
parentfb035f079455cfb227ad3d9e6a6560cf5d69b1c1 (diff)
downloadscintilla-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.cxx')
-rw-r--r--src/LineMarker.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index 152b1c010..851f7b620 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -24,6 +24,45 @@
using namespace Scintilla;
+LineMarker::~LineMarker() {
+}
+
+LineMarker::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::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;
+}
+
void LineMarker::SetXPM(const char *textForm) {
pxpm.reset(new XPM(textForm));
markType = SC_MARK_PIXMAP;