From cb81cd27cd1b162c381db4106cb29c4c397146a8 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 5 Apr 2019 08:32:58 +1100 Subject: Backport: Feature [feature-requests:#1272]. Add API to set default fold display text. Backport of changeset 7400:9fcb52fdb307. --- doc/ScintillaDoc.html | 7 +++++++ doc/ScintillaHistory.html | 5 +++++ include/Scintilla.h | 2 ++ include/Scintilla.iface | 6 ++++++ src/ContractionState.cxx | 8 +------- src/ContractionState.h | 1 - src/EditModel.cxx | 18 ++++++++++++++++++ src/EditModel.h | 4 ++++ src/EditView.cxx | 7 ++++--- src/Editor.cxx | 8 ++++++++ src/UniqueString.h | 4 ++++ test/simpleTests.py | 5 +++++ 12 files changed, 64 insertions(+), 11 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 127d33694..5d441ff0e 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -5986,6 +5986,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_TOGGLEFOLDSHOWTEXT(int line, const char *text)
SCI_FOLDDISPLAYTEXTSETSTYLE(int style)
SCI_FOLDDISPLAYTEXTGETSTYLE → int
+ SCI_SETDEFAULTFOLDDISPLAYTEXT(const char *text)
+ SCI_GETDEFAULTFOLDDISPLAYTEXT(<unused>, char *text)
SCI_FOLDLINE(int line, int action)
SCI_FOLDCHILDREN(int line, int action)
SCI_FOLDALL(int action)
@@ -6145,6 +6147,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

An optional text tag may be shown to the right of the folded text with the text argument to SCI_TOGGLEFOLDSHOWTEXT. + The default text for all header lines can be set with SCI_SETDEFAULTFOLDDISPLAYTEXT. The text is drawn with the STYLE_FOLDDISPLAYTEXT style.

@@ -6182,6 +6185,10 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ +

SCI_SETDEFAULTFOLDDISPLAYTEXT(const char *text)
+ SCI_GETDEFAULTFOLDDISPLAYTEXT(<unused>, char *text) → int
+ These messages set and get the default text displayed at the right of the folded text.

+

SCI_SETFOLDEXPANDED(int line, bool expanded)
SCI_GETFOLDEXPANDED(int line) → bool
These messages set and get the expanded state of a single line. The set message has no effect diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 1a6b34f49..cce4dbdd5 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -572,6 +572,11 @@

  • Avoid potential long hangs with idle styling for huge documents on Cocoa and GTK.
  • +
  • + Set default fold display text SCI_SETDEFAULTFOLDDISPLAYTEXT(text). + Feature #1272. +
  • +