From 2feaeaf738851055a79ffcfb9027a3637610faca Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 12 May 2021 09:13:07 +1000 Subject: Switch caret line background colour to SC_ELEMENT_CARET_LINE_BACK element and add SetCaretLineLayer. Older caret line APIs SCI_SETCARETLINEVISIBLE, SCI_SETCARETLINEBACK, SCI_SETCARETLINEBACKALPHA now discouraged. --- doc/ScintillaDoc.html | 68 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 10 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index fcce51dd0..2ba53c837 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3408,6 +3408,13 @@ struct Sci_TextToFind { All Colour of carets when another window has focus + + SC_ELEMENT_CARET_LINE_BACK + 50 + Translucent + All + Colour of caret line background + @@ -3454,12 +3461,15 @@ struct Sci_TextToFind { SC_ELEMENT_SELECTION_NO_FOCUS_TEXT : colouralpha
SC_ELEMENT_SELECTION_NO_FOCUS_BACK : colouralpha

- SCI_SETCARETLINEVISIBLE(bool show)
- SCI_GETCARETLINEVISIBLE → bool
- SCI_SETCARETLINEBACK(colour back)
- SCI_GETCARETLINEBACK → colour
- SCI_SETCARETLINEBACKALPHA(alpha alpha)
- SCI_GETCARETLINEBACKALPHA → int
+ SC_ELEMENT_CARET_LINE_BACK : colouralpha
+ SCI_SETCARETLINELAYER(int layer)
+ SCI_GETCARETLINELAYER → int
+ SCI_SETCARETLINEVISIBLE(bool show)
+ SCI_GETCARETLINEVISIBLE → bool
+ SCI_SETCARETLINEBACK(colour back)
+ SCI_GETCARETLINEBACK → colour
+ SCI_SETCARETLINEBACKALPHA(alpha alpha)
+ SCI_GETCARETLINEBACKALPHA → int
SCI_SETCARETLINEFRAME(int width)
SCI_GETCARETLINEFRAME → int
SCI_SETCARETLINEVISIBLEALWAYS(bool alwaysVisible)
@@ -3565,14 +3575,47 @@ struct Sci_TextToFind { These elements define the colours to be used for selections without focus.

+

+ SC_ELEMENT_CARET_LINE_BACK : colouralpha
+ SCI_SETCARETLINELAYER(int layer)
+ SCI_GETCARETLINELAYER → int
+ You can choose to make the background colour of the line containing the caret different by setting the + SC_ELEMENT_CARET_LINE_BACK element with + SCI_SETELEMENTCOLOUR(SC_ELEMENT_CARET_LINE_BACK). + This effect may be drawn translucently over the text or opaquely on the base layer with SCI_SETCARETLINELAYER. + Background colouring has highest priority when a line has markers that would otherwise change + the background colour. When drawn translucently other background colours can show through. + The layer argument can be one of:

+ + + + + + + + + + + + + + + + + + + + +
SC_LAYER_BASE0Draw the caret line background opaquely on the base layer
SC_LAYER_OVER_TEXT10Draw the caret line background translucently over the text
+

SCI_SETCARETLINEVISIBLE(bool show)
SCI_GETCARETLINEVISIBLE → bool
SCI_SETCARETLINEBACK(colour back)
SCI_GETCARETLINEBACK → colour
SCI_SETCARETLINEBACKALPHA(alpha alpha)
SCI_GETCARETLINEBACKALPHA → int
- SCI_SETCARETLINEFRAME(int width)
- SCI_GETCARETLINEFRAME → int
+ These APIs are discouraged. It is better to use the SC_ELEMENT_CARET_LINE_BACK + element mentioned in the previous section.
You can choose to make the background colour of the line containing the caret different with these messages. To do this, set the desired background colour with SCI_SETCARETLINEBACK, then use SCI_SETCARETLINEVISIBLE(true) to @@ -3584,10 +3627,15 @@ struct Sci_TextToFind { through. This is done by setting the alpha (translucency) value by calling SCI_SETCARETLINEBACKALPHA. When the alpha is not SC_ALPHA_NOALPHA, the caret line is drawn after all other features so will affect the colour of all other features. - Alternatively SCI_SETCARETLINEFRAME can be used to display the caret line framed - instead of filling the whole background. Set width != 0 to enable this option and width = 0 to disable it.

+

+ SCI_SETCARETLINEFRAME(int width)
+ SCI_GETCARETLINEFRAME → int
+ SCI_SETCARETLINEFRAME can be used to display the caret line framed + instead of filling the whole background. Set width != 0 to enable this option and width = 0 to disable it. +

+

SCI_SETCARETLINEVISIBLEALWAYS(bool alwaysVisible)
SCI_GETCARETLINEVISIBLEALWAYS → bool
Choose to make the caret line always visible even when the window is not in focus. -- cgit v1.2.3