1 // Scintilla source code edit control
3 ** Defines the look of a line marker in the margin .
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.
13 typedef void (*DrawLineMarkerFn
)(Surface
*surface
, PRectangle
&rcWhole
, Font
&fontForCharacter
, int tFold
, int marginStyle
, const void *lineMarker
);
19 enum typeOfFold
{ undefined
, head
, body
, tail
, headWithTail
};
24 ColourDesired backSelected
;
26 std::unique_ptr
<XPM
> pxpm
;
27 std::unique_ptr
<RGBAImage
> image
;
28 /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native
29 * Draw function for drawing line markers. Allow those platforms to override
30 * it instead of creating a new method(s) in the Surface class that existing
31 * platforms must implement as empty. */
32 DrawLineMarkerFn customDraw
;
34 markType
= SC_MARK_CIRCLE
;
35 fore
= ColourDesired(0,0,0);
36 back
= ColourDesired(0xff,0xff,0xff);
37 backSelected
= ColourDesired(0xff,0x00,0x00);
38 alpha
= SC_ALPHA_NOALPHA
;
41 LineMarker(const LineMarker
&) {
42 // Defined to avoid pxpm and image being blindly copied, not as a complete copy constructor.
43 markType
= SC_MARK_CIRCLE
;
44 fore
= ColourDesired(0,0,0);
45 back
= ColourDesired(0xff,0xff,0xff);
46 backSelected
= ColourDesired(0xff,0x00,0x00);
47 alpha
= SC_ALPHA_NOALPHA
;
54 LineMarker
&operator=(const LineMarker
&other
) {
55 // Defined to avoid pxpm and image being blindly copied, not as a complete assignment operator.
57 markType
= SC_MARK_CIRCLE
;
58 fore
= ColourDesired(0,0,0);
59 back
= ColourDesired(0xff,0xff,0xff);
60 backSelected
= ColourDesired(0xff,0x00,0x00);
61 alpha
= SC_ALPHA_NOALPHA
;
68 void SetXPM(const char *textForm
);
69 void SetXPM(const char *const *linesForm
);
70 void SetRGBAImage(Point sizeRGBAImage
, float scale
, const unsigned char *pixelsRGBAImage
);
71 void Draw(Surface
*surface
, PRectangle
&rcWhole
, Font
&fontForCharacter
, typeOfFold tFold
, int marginStyle
) const;