aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/EditModel.cxx1
-rw-r--r--src/EditView.cxx1
-rw-r--r--src/Editor.cxx1
-rw-r--r--src/LineMarker.cxx39
-rw-r--r--src/LineMarker.h42
-rw-r--r--src/MarginView.cxx1
-rw-r--r--src/PositionCache.cxx1
-rw-r--r--src/ScintillaBase.cxx1
8 files changed, 46 insertions, 41 deletions
diff --git a/src/EditModel.cxx b/src/EditModel.cxx
index 08888ba38..2f4a6a6af 100644
--- a/src/EditModel.cxx
+++ b/src/EditModel.cxx
@@ -34,7 +34,6 @@
#include "CellBuffer.h"
#include "KeyMap.h"
#include "Indicator.h"
-#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 97d8a718c..35d1ee777 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -39,7 +39,6 @@
#include "PerLine.h"
#include "KeyMap.h"
#include "Indicator.h"
-#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 04138e844..277a53c19 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -38,7 +38,6 @@
#include "PerLine.h"
#include "KeyMap.h"
#include "Indicator.h"
-#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index 261916e11..820ab9fae 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 = std::make_unique<XPM>(textForm);
markType = SC_MARK_PIXMAP;
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);
diff --git a/src/MarginView.cxx b/src/MarginView.cxx
index ff19840c4..5a56b28ad 100644
--- a/src/MarginView.cxx
+++ b/src/MarginView.cxx
@@ -36,7 +36,6 @@
#include "CellBuffer.h"
#include "KeyMap.h"
#include "Indicator.h"
-#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index 3d0888c68..3bb0f7e28 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -32,7 +32,6 @@
#include "CellBuffer.h"
#include "KeyMap.h"
#include "Indicator.h"
-#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index b1d9fd081..febc4f11f 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -44,7 +44,6 @@
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
-#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"