mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-11-25 07:53:03 +01:00
Sintilla Release 5.5.0 (https://www.scintilla.org/scintilla550.zip) Released 23 April 2024. Add elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK. When not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK. Bug #2417. On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store. Fix Win32 IME crash in windowed mode. Bug #2433. Scale reverse arrow cursor for margins to match other cursors when user changes pointer size. Bug #2321. Lexilla Release 5.3.2 (https://www.scintilla.org/lexilla532.zip) Released 23 April 2024. COBOL: Stop string literal continuing over line end. Issue #229. COBOL: Stop doc comment assigning different styles to \r and \n at line end. Issue #229. COBOL: Recognize keywords that start with 'V'. Issue #230. COBOL: Recognize comments after tag or that start with '/'. Issue #231. HTML: Implement substyles for tags, attributes, and identifiers SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD. HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag". HTML: Match standard handling of comments. Issue #232. Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER. Ruby: Allow non-ASCII here-doc delimiters. Issue #234. Ruby: Allow modifier if, unless, while and until after heredoc delimiter. Issue #236. Rust: Recognize raw identifiers. Issue #239, Pull request #240. Close #15042
59 lines
2.2 KiB
C++
59 lines
2.2 KiB
C++
// Scintilla source code edit control
|
|
/** @file LineMarker.h
|
|
** Defines the look of a line marker in the margin .
|
|
**/
|
|
// Copyright 1998-2011 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
|
|
|
|
namespace Scintilla::Internal {
|
|
|
|
class XPM;
|
|
class RGBAImage;
|
|
|
|
typedef void (*DrawLineMarkerFn)(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, int tFold, Scintilla::MarginType marginStyle, const void *lineMarker);
|
|
|
|
/**
|
|
*/
|
|
class LineMarker {
|
|
public:
|
|
enum class FoldPart { undefined, head, body, tail, headWithTail };
|
|
|
|
Scintilla::MarkerSymbol markType = Scintilla::MarkerSymbol::Circle;
|
|
ColourRGBA fore = black;
|
|
ColourRGBA back = white;
|
|
ColourRGBA backSelected = ColourRGBA(maximumByte, 0, 0); // Red default
|
|
Scintilla::Layer layer = Scintilla::Layer::Base;
|
|
Scintilla::Alpha alpha = Scintilla::Alpha::NoAlpha;
|
|
XYPOSITION strokeWidth = 1.0f;
|
|
std::unique_ptr<XPM> pxpm;
|
|
std::unique_ptr<RGBAImage> image;
|
|
/** 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 = nullptr;
|
|
|
|
LineMarker() noexcept = default;
|
|
LineMarker(const LineMarker &other);
|
|
LineMarker(LineMarker &&) noexcept = default;
|
|
LineMarker &operator=(const LineMarker& other);
|
|
LineMarker &operator=(LineMarker&&) noexcept = default;
|
|
virtual ~LineMarker() = default;
|
|
|
|
ColourRGBA BackWithAlpha() const noexcept;
|
|
|
|
void SetXPM(const char *textForm);
|
|
void SetXPM(const char *const *linesForm);
|
|
void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
|
|
void AlignedPolygon(Surface *surface, const Point *pts, size_t npts) const;
|
|
void Draw(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, FoldPart part, Scintilla::MarginType marginStyle) const;
|
|
void DrawFoldingMark(Surface *surface, const PRectangle &rcWhole, FoldPart part) const;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|