Upgraded to scintilla 3.2.3
[TortoiseGit.git] / ext / scintilla / src / LineMarker.h
blobac3e7e6371c4ee46a2223fe9b6c33c3e9385b42c
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
16 /**
18 class LineMarker {
19 public:
20 enum typeOfFold { undefined, head, body, tail, headWithTail };
22 int markType;
23 ColourDesired fore;
24 ColourDesired back;
25 ColourDesired backSelected;
26 int alpha;
27 XPM *pxpm;
28 RGBAImage *image;
29 LineMarker() {
30 markType = SC_MARK_CIRCLE;
31 fore = ColourDesired(0,0,0);
32 back = ColourDesired(0xff,0xff,0xff);
33 backSelected = ColourDesired(0xff,0x00,0x00);
34 alpha = SC_ALPHA_NOALPHA;
35 pxpm = NULL;
36 image = NULL;
38 LineMarker(const LineMarker &) {
39 // Defined to avoid pxpm being blindly copied, not as a complete copy constructor
40 markType = SC_MARK_CIRCLE;
41 fore = ColourDesired(0,0,0);
42 back = ColourDesired(0xff,0xff,0xff);
43 backSelected = ColourDesired(0xff,0x00,0x00);
44 alpha = SC_ALPHA_NOALPHA;
45 pxpm = NULL;
46 image = NULL;
48 ~LineMarker() {
49 delete pxpm;
50 delete image;
52 LineMarker &operator=(const LineMarker &other) {
53 // Defined to avoid pxpm being blindly copied, not as a complete assignment operator
54 if (this != &other) {
55 markType = SC_MARK_CIRCLE;
56 fore = ColourDesired(0,0,0);
57 back = ColourDesired(0xff,0xff,0xff);
58 backSelected = ColourDesired(0xff,0x00,0x00);
59 alpha = SC_ALPHA_NOALPHA;
60 delete pxpm;
61 pxpm = NULL;
62 delete image;
63 image = NULL;
65 return *this;
67 void SetXPM(const char *textForm);
68 void SetXPM(const char *const *linesForm);
69 void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
70 void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle);
73 #ifdef SCI_NAMESPACE
75 #endif
77 #endif