Update Scintilla to version 3.4.4
[TortoiseGit.git] / ext / scintilla / src / LineMarker.h
blob3363fc7100027d8fac7538b7d79f8395326b1e17
1 // Scintilla source code edit control
2 /** @file LineMarker.h
3 ** Defines the look of a line marker in the margin .
4 **/
5 // Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef LINEMARKER_H
9 #define LINEMARKER_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 /**
17 class LineMarker {
18 public:
19 enum typeOfFold { undefined, head, body, tail, headWithTail };
21 int markType;
22 ColourDesired fore;
23 ColourDesired back;
24 ColourDesired backSelected;
25 int alpha;
26 XPM *pxpm;
27 RGBAImage *image;
28 LineMarker() {
29 markType = SC_MARK_CIRCLE;
30 fore = ColourDesired(0,0,0);
31 back = ColourDesired(0xff,0xff,0xff);
32 backSelected = ColourDesired(0xff,0x00,0x00);
33 alpha = SC_ALPHA_NOALPHA;
34 pxpm = NULL;
35 image = NULL;
37 LineMarker(const LineMarker &) {
38 // Defined to avoid pxpm being blindly copied, not as a complete copy constructor
39 markType = SC_MARK_CIRCLE;
40 fore = ColourDesired(0,0,0);
41 back = ColourDesired(0xff,0xff,0xff);
42 backSelected = ColourDesired(0xff,0x00,0x00);
43 alpha = SC_ALPHA_NOALPHA;
44 pxpm = NULL;
45 image = NULL;
47 ~LineMarker() {
48 delete pxpm;
49 delete image;
51 LineMarker &operator=(const LineMarker &other) {
52 // Defined to avoid pxpm being blindly copied, not as a complete assignment operator
53 if (this != &other) {
54 markType = SC_MARK_CIRCLE;
55 fore = ColourDesired(0,0,0);
56 back = ColourDesired(0xff,0xff,0xff);
57 backSelected = ColourDesired(0xff,0x00,0x00);
58 alpha = SC_ALPHA_NOALPHA;
59 delete pxpm;
60 pxpm = NULL;
61 delete image;
62 image = NULL;
64 return *this;
66 void SetXPM(const char *textForm);
67 void SetXPM(const char *const *linesForm);
68 void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
69 void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const;
72 #ifdef SCI_NAMESPACE
74 #endif
76 #endif