From 5654caa0a87f9ae6fe8131859e6429be37f50514 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 12 Mar 2019 09:47:21 +1100 Subject: Feature [feature-requests:#1217]. Add CARETSTYLE_INS_MASK definition. --- doc/ScintillaDoc.html | 4 ++-- include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/ViewStyle.cxx | 2 -- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 3c6da6772..47d057ff4 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3213,8 +3213,8 @@ struct Sci_TextToFind {

SCI_SETCARETSTYLE(int caretStyle)
SCI_GETCARETSTYLE → int
The style of the caret can be set with SCI_SETCARETSTYLE to be a line caret - (CARETSTYLE_LINE=1) or a block caret (CARETSTYLE_BLOCK=2) for insert mode combined with - a bar caret (CARETSTYLE_OVERSTRIKE_BAR=0) or a block caret (CARETSTYLE_OVERSTRIKE_BLOCK=16) for overtype mode, + (CARETSTYLE_LINE=1) or a block caret (CARETSTYLE_BLOCK=2) for insert mode (lower 4-bits, CARETSTYLE_INS_MASK) combined with + a bar caret (CARETSTYLE_OVERSTRIKE_BAR=0) or a block caret (CARETSTYLE_OVERSTRIKE_BLOCK=16) for overtype mode (bit 4), or to not draw at all (CARETSTYLE_INVISIBLE=0). The default value for insert mode is the line caret (CARETSTYLE_LINE=1), for overtype mode is the bar caret (CARETSTYLE_OVERSTRIKE_BAR=0). You can determine the current caret style setting using SCI_GETCARETSTYLE.

diff --git a/include/Scintilla.h b/include/Scintilla.h index ef4f12b9f..dc0a73b7e 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -829,6 +829,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define CARETSTYLE_BLOCK 2 #define CARETSTYLE_OVERSTRIKE_BAR 0 #define CARETSTYLE_OVERSTRIKE_BLOCK 16 +#define CARETSTYLE_INS_MASK 0xF #define SCI_SETCARETSTYLE 2512 #define SCI_GETCARETSTYLE 2513 #define SCI_SETINDICATORCURRENT 2500 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index ca936ab31..aed70e7f3 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -2173,6 +2173,7 @@ val CARETSTYLE_LINE=1 val CARETSTYLE_BLOCK=2 val CARETSTYLE_OVERSTRIKE_BAR=0 val CARETSTYLE_OVERSTRIKE_BLOCK=16 +val CARETSTYLE_INS_MASK=0xF # Set the style of the caret to be drawn. set void SetCaretStyle=2512(int caretStyle,) diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 2da3a2a52..148163bec 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -27,8 +27,6 @@ #include "Style.h" #include "ViewStyle.h" -#define CARETSTYLE_INS_MASK 0xF - using namespace Scintilla; MarginStyle::MarginStyle(int style_, int width_, int mask_) : -- cgit v1.2.3