From 33ca7ad72f783b2b9a9eef0b5d0dc8cd0629be69 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 7 Apr 2019 10:03:38 +1000 Subject: Feature [feature-requests:#1276]. Add SC_MARK_VERTICALBOOKMARK. --- doc/Markers.png | Bin 8399 -> 22999 bytes doc/ScintillaDoc.html | 3 ++- doc/ScintillaHistory.html | 6 +++++- include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/LineMarker.cxx | 10 ++++++++++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/Markers.png b/doc/Markers.png index 2ad37b102..b1d0120c0 100644 Binary files a/doc/Markers.png and b/doc/Markers.png differ diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index a87294d6e..3f3b4aa9a 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -4071,7 +4071,8 @@ struct Sci_TextToFind { SC_MARK_BACKGROUND, SC_MARK_LEFTRECT, SC_MARK_FULLRECT, - SC_MARK_BOOKMARK, and + SC_MARK_BOOKMARK, + SC_MARK_VERTICALBOOKMARK, and SC_MARK_UNDERLINE.

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 7d7ef53d5..984b88cf7 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -576,7 +576,11 @@ at the expense of memory. Feature #1259. -
  • +
  • + Add vertical bookmark symbol SC_MARK_VERTICALBOOKMARK. + Feature #1276. +
  • +
  • Improve performance of accessibility on GTK. Bug #2094.
  • diff --git a/include/Scintilla.h b/include/Scintilla.h index 386d372ee..2fe83bf00 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -135,6 +135,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_MARK_UNDERLINE 29 #define SC_MARK_RGBAIMAGE 30 #define SC_MARK_BOOKMARK 31 +#define SC_MARK_VERTICALBOOKMARK 32 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 7960bdbc6..b19ebd0b3 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -304,6 +304,7 @@ val SC_MARK_AVAILABLE=28 val SC_MARK_UNDERLINE=29 val SC_MARK_RGBAIMAGE=30 val SC_MARK_BOOKMARK=31 +val SC_MARK_VERTICALBOOKMARK=32 val SC_MARK_CHARACTER=10000 diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 53231d778..92dd775ca 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -430,6 +430,16 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(ircWhole.left, centreY + halfHeight), }; surface->Polygon(pts, std::size(pts), fore, back); + } else if (markType == SC_MARK_VERTICALBOOKMARK) { + const int halfWidth = minDim / 3; + Point pts[] = { + Point::FromInts(centreX - halfWidth, centreY - dimOn2), + Point::FromInts(centreX + halfWidth, centreY - dimOn2), + Point::FromInts(centreX + halfWidth, centreY + dimOn2), + Point::FromInts(centreX, centreY + dimOn2 - halfWidth), + Point::FromInts(centreX - halfWidth, centreY + dimOn2), + }; + surface->Polygon(pts, std::size(pts), fore, back); } else { // SC_MARK_FULLRECT surface->FillRectangle(rcWhole, back); } -- cgit v1.2.3