blob: 0ac4d31550b910894e2084f9cd9a2151e691854c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Scintilla source code edit control
/** @file LineMarker.h
** Defines the look of a line marker in the margin .
**/
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef LINEMARKER_H
#define LINEMARKER_H
class XPM {
int height;
int width;
int nColours;
char *data;
char codeTransparent;
char *codes;
ColourPair *colours;
void Init(const char * const *linesForm);
ColourAllocated ColourFromCode(int ch);
void FillRun(Surface *surface, int code, int startX, int y, int x);
public:
XPM(const char *textForm);
XPM(const char * const *linesForm);
~XPM();
// Similar to same named method in ViewStyle:
void RefreshColourPalette(Palette &pal, bool want);
// Decompose image into runs and use FillRectangle for each run:
void Draw(Surface *surface, PRectangle &rc);
};
/**
*/
class LineMarker {
public:
int markType;
ColourPair fore;
ColourPair back;
XPM *pxpm;
LineMarker() {
markType = SC_MARK_CIRCLE;
fore = ColourDesired(0,0,0);
back = ColourDesired(0xff,0xff,0xff);
pxpm = NULL;
}
~LineMarker() {
delete pxpm;
}
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
|