2009-04-24 23:35:41 +00:00
|
|
|
// Scintilla source code edit control
|
|
|
|
/** @file LineMarker.h
|
|
|
|
** Defines the look of a line marker in the margin .
|
|
|
|
**/
|
2011-07-17 22:30:49 +00:00
|
|
|
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
|
2009-04-24 23:35:41 +00:00
|
|
|
// The License.txt file describes the conditions under which this software may be distributed.
|
|
|
|
|
|
|
|
#ifndef LINEMARKER_H
|
|
|
|
#define LINEMARKER_H
|
|
|
|
|
|
|
|
#ifdef SCI_NAMESPACE
|
|
|
|
namespace Scintilla {
|
|
|
|
#endif
|
|
|
|
|
2011-07-17 22:30:49 +00:00
|
|
|
|
2009-04-24 23:35:41 +00:00
|
|
|
/**
|
|
|
|
*/
|
|
|
|
class LineMarker {
|
|
|
|
public:
|
2013-08-28 00:44:27 +00:00
|
|
|
enum typeOfFold { undefined, head, body, tail, headWithTail };
|
2011-07-17 22:30:49 +00:00
|
|
|
|
2009-04-24 23:35:41 +00:00
|
|
|
int markType;
|
2013-08-28 00:44:27 +00:00
|
|
|
ColourDesired fore;
|
|
|
|
ColourDesired back;
|
|
|
|
ColourDesired backSelected;
|
2009-04-24 23:35:41 +00:00
|
|
|
int alpha;
|
|
|
|
XPM *pxpm;
|
2013-08-28 00:44:27 +00:00
|
|
|
RGBAImage *image;
|
2009-04-24 23:35:41 +00:00
|
|
|
LineMarker() {
|
|
|
|
markType = SC_MARK_CIRCLE;
|
|
|
|
fore = ColourDesired(0,0,0);
|
|
|
|
back = ColourDesired(0xff,0xff,0xff);
|
2011-07-17 22:30:49 +00:00
|
|
|
backSelected = ColourDesired(0xff,0x00,0x00);
|
2009-04-24 23:35:41 +00:00
|
|
|
alpha = SC_ALPHA_NOALPHA;
|
|
|
|
pxpm = NULL;
|
2013-08-28 00:44:27 +00:00
|
|
|
image = NULL;
|
2009-04-24 23:35:41 +00:00
|
|
|
}
|
|
|
|
LineMarker(const LineMarker &) {
|
2013-08-28 00:44:27 +00:00
|
|
|
// Defined to avoid pxpm being blindly copied, not as a complete copy constructor
|
2009-04-24 23:35:41 +00:00
|
|
|
markType = SC_MARK_CIRCLE;
|
|
|
|
fore = ColourDesired(0,0,0);
|
|
|
|
back = ColourDesired(0xff,0xff,0xff);
|
2011-07-17 22:30:49 +00:00
|
|
|
backSelected = ColourDesired(0xff,0x00,0x00);
|
2009-04-24 23:35:41 +00:00
|
|
|
alpha = SC_ALPHA_NOALPHA;
|
|
|
|
pxpm = NULL;
|
2013-08-28 00:44:27 +00:00
|
|
|
image = NULL;
|
2009-04-24 23:35:41 +00:00
|
|
|
}
|
|
|
|
~LineMarker() {
|
|
|
|
delete pxpm;
|
2013-08-28 00:44:27 +00:00
|
|
|
delete image;
|
2009-04-24 23:35:41 +00:00
|
|
|
}
|
2013-08-28 00:44:27 +00:00
|
|
|
LineMarker &operator=(const LineMarker &other) {
|
|
|
|
// Defined to avoid pxpm 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;
|
|
|
|
delete pxpm;
|
|
|
|
pxpm = NULL;
|
|
|
|
delete image;
|
|
|
|
image = NULL;
|
|
|
|
}
|
2009-04-24 23:35:41 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
void SetXPM(const char *textForm);
|
2010-07-12 22:19:51 +00:00
|
|
|
void SetXPM(const char *const *linesForm);
|
2013-08-28 00:44:27 +00:00
|
|
|
void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
|
|
|
|
void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle);
|
2009-04-24 23:35:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef SCI_NAMESPACE
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|