diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-04-07 12:20:58 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-04-07 12:20:58 +1000 | 
| commit | d2bb3203067343b51bf3c543b331741f6fa4ad21 (patch) | |
| tree | 84ca5bf493addc9912999858ce778562d20eb105 /src/LineMarker.h | |
| parent | 33ca7ad72f783b2b9a9eef0b5d0dc8cd0629be69 (diff) | |
| download | scintilla-mirror-d2bb3203067343b51bf3c543b331741f6fa4ad21.tar.gz | |
Make XPM, RGBAImage, and LineMarker copyable and noexcept moveable.
This simplifies and optimizes their use in other classes and containers.
Diffstat (limited to 'src/LineMarker.h')
| -rw-r--r-- | src/LineMarker.h | 24 | 
1 files changed, 14 insertions, 10 deletions
| diff --git a/src/LineMarker.h b/src/LineMarker.h index 28a63cd3b..8a15327d2 100644 --- a/src/LineMarker.h +++ b/src/LineMarker.h @@ -21,22 +21,26 @@ class LineMarker {  public:  	enum typeOfFold { undefined, head, body, tail, headWithTail }; -	int markType; -	ColourDesired fore; -	ColourDesired back; -	ColourDesired backSelected; -	int alpha; +	int markType = SC_MARK_CIRCLE; +	ColourDesired fore = ColourDesired(0, 0, 0); +	ColourDesired back = ColourDesired(0xff, 0xff, 0xff); +	ColourDesired backSelected = ColourDesired(0xff, 0x00, 0x00); +	int alpha = SC_ALPHA_NOALPHA;  	std::unique_ptr<XPM> pxpm;  	std::unique_ptr<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(); -	LineMarker(const LineMarker &); -	virtual ~LineMarker(); -	LineMarker &operator=(const LineMarker &other); +	DrawLineMarkerFn customDraw = nullptr; + +	LineMarker() noexcept = default; +	LineMarker(const LineMarker &other); +	LineMarker(LineMarker &&) noexcept = default; +	LineMarker &operator=(const LineMarker& other); +	LineMarker &operator=(LineMarker&&) noexcept = default; +	virtual ~LineMarker() = default; +  	void SetXPM(const char *textForm);  	void SetXPM(const char *const *linesForm);  	void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage); | 
