From 664e37abfe5c796c1279b8295fb030f126b0a7d8 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 30 Nov 2011 11:36:13 -0600 Subject: Initial import of qscintilla from 2007 --- src/LineMarker.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 src/LineMarker.h (limited to 'src/LineMarker.h') diff --git a/src/LineMarker.h b/src/LineMarker.h new file mode 100755 index 0000000..8ebdce4 --- /dev/null +++ b/src/LineMarker.h @@ -0,0 +1,54 @@ +// Scintilla source code edit control +/** @file LineMarker.h + ** Defines the look of a line marker in the margin . + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef LINEMARKER_H +#define LINEMARKER_H + +/** + */ +class LineMarker { +public: + int markType; + ColourPair fore; + ColourPair back; + int alpha; + XPM *pxpm; + LineMarker() { + markType = SC_MARK_CIRCLE; + fore = ColourDesired(0,0,0); + back = ColourDesired(0xff,0xff,0xff); + alpha = SC_ALPHA_NOALPHA; + pxpm = NULL; + } + LineMarker(const LineMarker &) { + // Defined to avoid pxpm being blindly copied, not as real copy constructor + markType = SC_MARK_CIRCLE; + fore = ColourDesired(0,0,0); + back = ColourDesired(0xff,0xff,0xff); + alpha = SC_ALPHA_NOALPHA; + pxpm = NULL; + } + ~LineMarker() { + delete pxpm; + } + LineMarker &operator=(const LineMarker &) { + // Defined to avoid pxpm being blindly copied, not as real assignment operator + markType = SC_MARK_CIRCLE; + fore = ColourDesired(0,0,0); + back = ColourDesired(0xff,0xff,0xff); + alpha = SC_ALPHA_NOALPHA; + delete pxpm; + pxpm = NULL; + return *this; + } + void RefreshColourPalette(Palette &pal, bool want); + void SetXPM(const char *textForm); + void SetXPM(const char * const *linesForm); + void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter); +}; + +#endif -- cgit v1.2.3