2009-04-24 23:35:41 +00:00
|
|
|
// Scintilla source code edit control
|
|
|
|
/** @file LineMarker.h
|
|
|
|
** Defines the look of a line marker in the margin .
|
|
|
|
**/
|
2011-07-17 22:30:49 +00:00
|
|
|
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
|
2009-04-24 23:35:41 +00:00
|
|
|
// The License.txt file describes the conditions under which this software may be distributed.
|
|
|
|
|
|
|
|
#ifndef LINEMARKER_H
|
|
|
|
#define LINEMARKER_H
|
|
|
|
|
|
|
|
namespace Scintilla {
|
2019-05-04 18:14:48 +00:00
|
|
|
|
|
|
|
class XPM;
|
|
|
|
class RGBAImage;
|
2009-04-24 23:35:41 +00:00
|
|
|
|
2015-06-07 21:19:26 +00:00
|
|
|
typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker);
|
2011-07-17 22:30:49 +00:00
|
|
|
|
2009-04-24 23:35:41 +00:00
|
|
|
/**
|
|
|
|
*/
|
|
|
|
class LineMarker {
|
|
|
|
public:
|
2013-08-28 00:44:27 +00:00
|
|
|
enum typeOfFold { undefined, head, body, tail, headWithTail };
|
2011-07-17 22:30:49 +00:00
|
|
|
|
2009-04-24 23:35:41 +00:00
|
|
|
int markType;
|
2013-08-28 00:44:27 +00:00
|
|
|
ColourDesired fore;
|
|
|
|
ColourDesired back;
|
|
|
|
ColourDesired backSelected;
|
2009-04-24 23:35:41 +00:00
|
|
|
int alpha;
|
2019-05-04 18:14:48 +00:00
|
|
|
std::unique_ptr<XPM> pxpm;
|
|
|
|
std::unique_ptr<RGBAImage> image;
|
2015-06-07 21:19:26 +00:00
|
|
|
/** Some platforms, notably PLAT_CURSES, do not support Scintilla's native
|
|
|
|
* Draw function for drawing line markers. Allow those platforms to override
|
|
|
|
* it instead of creating a new method(s) in the Surface class that existing
|
|
|
|
* platforms must implement as empty. */
|
|
|
|
DrawLineMarkerFn customDraw;
|
2019-05-04 18:14:48 +00:00
|
|
|
LineMarker();
|
|
|
|
LineMarker(const LineMarker &);
|
|
|
|
virtual ~LineMarker();
|
|
|
|
LineMarker &operator=(const LineMarker &other);
|
2009-04-24 23:35:41 +00:00
|
|
|
void SetXPM(const char *textForm);
|
2010-07-12 22:19:51 +00:00
|
|
|
void SetXPM(const char *const *linesForm);
|
2013-08-28 00:44:27 +00:00
|
|
|
void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
|
2019-05-04 18:14:48 +00:00
|
|
|
void Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const;
|
2009-04-24 23:35:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|