]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/LineMarker.h
wxRTC: save and load the 'shown' status in case there's a situation where layout...
[wxWidgets.git] / src / stc / scintilla / src / LineMarker.h
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.
7
8 #ifndef LINEMARKER_H
9 #define LINEMARKER_H
10
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
14
15
16 /**
17 */
18 class LineMarker {
19 public:
20 enum typeOfFold { undefined, head, body, tail, headWithTail };
21
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;
37 }
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;
47 }
48 ~LineMarker() {
49 delete pxpm;
50 delete image;
51 }
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;
64 }
65 return *this;
66 }
67 void SetXPM(const char *textForm);
68 void SetXPM(const char *const *linesForm);
69 void SetRGBAImage(Point sizeRGBAImage, const unsigned char *pixelsRGBAImage);
70 void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle);
71 };
72
73 #ifdef SCI_NAMESPACE
74 }
75 #endif
76
77 #endif