From 83986cc620b990964fd62816c8216c92ab9c7d51 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 14 May 2021 14:29:20 +1000 Subject: Implement SC_LAYER_UNDER_TEXT so that selections, caret lines, and content area markers can be drawn translucently under text. --- doc/ScintillaDoc.html | 64 ++++++++++++++++++++++++++++++++++++++++++----- doc/ScintillaHistory.html | 4 +-- 2 files changed, 60 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 789e06c84..d28b8f859 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3585,12 +3585,22 @@ struct Sci_TextToFind { Draw the selection background opaquely on the base layer + + SC_LAYER_UNDER_TEXT. + + 1 + + Draw the selection background translucently under the text.
+ This will not work in single phase drawing mode (SC_PHASES_ONE) + as there is no under-text phase. + + SC_LAYER_OVER_TEXT - 10 + 2 - Draw the selection background translucently over the text + Draw the selection background translucently over the text. @@ -3654,15 +3664,25 @@ struct Sci_TextToFind { 0 - Draw the caret line background opaquely on the base layer + Draw the selection background opaquely on the base layer + + + + SC_LAYER_UNDER_TEXT. + + 1 + + Draw the selection background translucently under the text.
+ This will not work in single phase drawing mode (SC_PHASES_ONE) + as there is no under-text phase. SC_LAYER_OVER_TEXT - 10 + 2 - Draw the caret line background translucently over the text + Draw the selection background translucently over the text. @@ -5050,7 +5070,39 @@ struct Sci_TextToFind { The layer to draw on is defined by SCI_MARKERSETLAYER. The degree of translucency can be chosen by setting an alpha value. This is only for the content area - in margins, translucency is achieved through the SCI_MARKERSET…TRANSLUCENT - methods.

+ methods. + The layer argument can be one of:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SC_LAYER_BASE0Draw the selection background opaquely on the base layer
SC_LAYER_UNDER_TEXT.1Draw the selection background translucently under the text.
+ This will not work in single phase drawing mode (SC_PHASES_ONE) + as there is no under-text phase.
SC_LAYER_OVER_TEXT2Draw the selection background translucently over the text.

SCI_MARKERADD(line line, int markerNumber) → int
This message adds marker number markerNumber to a line. The message returns -1 if diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 6d64439c7..d9154f97c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -584,7 +584,7 @@ The selection background colour may default to use platform APIs to discover global or user settings and may change in response to those settings changing. The SCI_SETSELECTIONLAYER method defines whether the selection background is drawn - translucently over text or opaquely underneath other drawing. + translucently over or under text or opaquely underneath other drawing.

  • Change caret line drawing to use SC_ELEMENT_CARET_LINE_BACK element and @@ -593,7 +593,7 @@ SCI_SETCARETLINEBACKALPHA now discouraged.
  • - Add SCI_MARKERSETLAYER to define layer on which to draw conetent area markers. + Add SCI_MARKERSETLAYER to define layer on which to draw content area markers. This replaces the use of SC_ALPHA_NOALPHA for markers.
  • -- cgit v1.2.3