aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-10 17:40:27 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-10 17:40:27 +1000
commit8497317864816c0f7a4b5baf3229c7a3336f55d8 (patch)
treee0ddd75f8457358ed89d73d86fb00e770eaf9d05 /include
parente44364e1f30eb482cbf1502d6345a8d146c9be42 (diff)
downloadscintilla-mirror-8497317864816c0f7a4b5baf3229c7a3336f55d8.tar.gz
Change the way that selections and carets are drawn to use the element APIs.
Diffstat (limited to 'include')
-rw-r--r--include/Scintilla.h15
-rw-r--r--include/Scintilla.iface21
2 files changed, 36 insertions, 0 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 3f16dffc5..1a352ae85 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -273,6 +273,17 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_ELEMENT_LIST_BACK 1
#define SC_ELEMENT_LIST_SELECTED 2
#define SC_ELEMENT_LIST_SELECTED_BACK 3
+#define SC_ELEMENT_SELECTION_TEXT 10
+#define SC_ELEMENT_SELECTION_BACK 11
+#define SC_ELEMENT_SELECTION_ADDITIONAL_TEXT 12
+#define SC_ELEMENT_SELECTION_ADDITIONAL_BACK 13
+#define SC_ELEMENT_SELECTION_SECONDARY_TEXT 14
+#define SC_ELEMENT_SELECTION_SECONDARY_BACK 15
+#define SC_ELEMENT_SELECTION_NO_FOCUS_TEXT 16
+#define SC_ELEMENT_SELECTION_NO_FOCUS_BACK 17
+#define SC_ELEMENT_CARET 40
+#define SC_ELEMENT_CARET_ADDITIONAL 41
+#define SC_ELEMENT_CARET_SECONDARY 42
#define SCI_SETELEMENTCOLOUR 2753
#define SCI_GETELEMENTCOLOUR 2754
#define SCI_RESETELEMENTCOLOUR 2755
@@ -284,6 +295,10 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETSELALPHA 2478
#define SCI_GETSELEOLFILLED 2479
#define SCI_SETSELEOLFILLED 2480
+#define SC_LAYER_BASE 0
+#define SC_LAYER_OVER_TEXT 10
+#define SCI_GETSELECTIONLAYER 2762
+#define SCI_SETSELECTIONLAYER 2763
#define SCI_SETCARETFORE 2069
#define SCI_ASSIGNCMDKEY 2070
#define SCI_CLEARCMDKEY 2071
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index faf846dc8..ac5a72346 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -676,6 +676,17 @@ val SC_ELEMENT_LIST=0
val SC_ELEMENT_LIST_BACK=1
val SC_ELEMENT_LIST_SELECTED=2
val SC_ELEMENT_LIST_SELECTED_BACK=3
+val SC_ELEMENT_SELECTION_TEXT=10
+val SC_ELEMENT_SELECTION_BACK=11
+val SC_ELEMENT_SELECTION_ADDITIONAL_TEXT=12
+val SC_ELEMENT_SELECTION_ADDITIONAL_BACK=13
+val SC_ELEMENT_SELECTION_SECONDARY_TEXT=14
+val SC_ELEMENT_SELECTION_SECONDARY_BACK=15
+val SC_ELEMENT_SELECTION_NO_FOCUS_TEXT=16
+val SC_ELEMENT_SELECTION_NO_FOCUS_BACK=17
+val SC_ELEMENT_CARET=40
+val SC_ELEMENT_CARET_ADDITIONAL=41
+val SC_ELEMENT_CARET_SECONDARY=42
# Set the colour of an element. Translucency (alpha) may or may not be significant
# and this may depend on the platform. The alpha byte should commonly be 0xff for opaque.
@@ -712,6 +723,16 @@ get bool GetSelEOLFilled=2479(,)
# Set the selection to have its end of line filled or not.
set void SetSelEOLFilled=2480(bool filled,)
+enu Layer=SC_LAYER_
+val SC_LAYER_BASE=0
+val SC_LAYER_OVER_TEXT=10
+
+# Get the layer for drawing selections
+get Layer GetSelectionLayer=2762(,)
+
+# Set the layer for drawing selections: either opaquely on base layer or translucently over text
+set void SetSelectionLayer=2763(Layer layer,)
+
# Set the foreground colour of the caret.
set void SetCaretFore=2069(colour fore,)