From 32b1fbcb9a22ee59492a9e74521721ae4ad5d665 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Fri, 16 Dec 2022 13:53:53 +0100 Subject: [PATCH 1/6] +add: Paragraph navigation (Alt+PageUp, Alt+PageDown) --- language/common_res.h | 2 ++ src/Notepad3.c | 18 ++++++++++++++++++ src/Notepad3.rc | 2 ++ src/SciCall.h | 4 ++++ 4 files changed, 26 insertions(+) diff --git a/language/common_res.h b/language/common_res.h index 2f1d33073..049fa066e 100644 --- a/language/common_res.h +++ b/language/common_res.h @@ -540,6 +540,8 @@ #define CMD_ARROW_UP 20060 #define CMD_ARROW_DOWN 20061 #define CMD_ENTER_RETURN 20062 +#define CMD_PARAGRAPH_UP 20063 +#define CMD_PARAGRAPH_DOWN 20064 #define IDS_MUI_MENU_LANGUAGE 34500 #define IDS_MUI_LANG_EN_US 34501 diff --git a/src/Notepad3.c b/src/Notepad3.c index 5752d9ba1..9e7241a78 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -6619,6 +6619,24 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) break; + case CMD_PARAGRAPH_UP: + if (!SciCall_IsSelectionEmpty() && Sci_IsStreamSelection()) { + SciCall_ParaUpExtend(); + } else { + SciCall_ParaUp(); + } + break; + + + case CMD_PARAGRAPH_DOWN: + if (!SciCall_IsSelectionEmpty() && Sci_IsStreamSelection()) { + SciCall_ParaDownExtend(); + } else { + SciCall_ParaDown(); + } + break; + + case CMD_CTRLBACK: { DocPos const iPos = SciCall_GetCurrentPos(); DocPos const iAnchor = SciCall_GetAnchor(); diff --git a/src/Notepad3.rc b/src/Notepad3.rc index b156874eb..0f5a6c0e8 100644 --- a/src/Notepad3.rc +++ b/src/Notepad3.rc @@ -439,6 +439,8 @@ BEGIN VK_RETURN, IDM_EDIT_COMPLETEWORD, VIRTKEY, CONTROL, ALT, NOINVERT VK_SPACE, IDM_EDIT_SELECTWORD, VIRTKEY, CONTROL, NOINVERT VK_SPACE, IDM_EDIT_SELECTALLMATCHES, VIRTKEY, SHIFT, CONTROL, NOINVERT + VK_PRIOR, CMD_PARAGRAPH_UP, VIRTKEY, ALT, NOINVERT + VK_NEXT, CMD_PARAGRAPH_DOWN, VIRTKEY, ALT, NOINVERT VK_SUBTRACT, IDM_VIEW_ZOOMOUT, VIRTKEY, CONTROL, NOINVERT //~VK_SUBTRACT, CMD_DECLINELIMIT, VIRTKEY, ALT, NOINVERT VK_SUBTRACT, CMD_DECREASENUM, VIRTKEY, CONTROL, ALT, NOINVERT diff --git a/src/SciCall.h b/src/SciCall.h index 8786e7bfe..c12c3402f 100644 --- a/src/SciCall.h +++ b/src/SciCall.h @@ -311,6 +311,10 @@ DeclareSciCallV0(CharRight, CHARRIGHT); DeclareSciCallV0(CharRightExtend, CHARRIGHTEXTEND); DeclareSciCallV0(WordLeft, WORDLEFT); DeclareSciCallV0(WordRight, WORDRIGHT); +DeclareSciCallV0(ParaUp, PARAUP); +DeclareSciCallV0(ParaUpExtend, PARAUPEXTEND); +DeclareSciCallV0(ParaDown, PARADOWN); +DeclareSciCallV0(ParaDownExtend, PARADOWNEXTEND); DeclareSciCallV0(DeleteBack, DELETEBACK); DeclareSciCallV0(DelWordLeft, DELWORDLEFT); DeclareSciCallV0(DelWordRight, DELWORDRIGHT); From ba0c25647626131a0ebec07683336c6cc717115f Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Mon, 2 Jan 2023 11:57:29 +0100 Subject: [PATCH 2/6] missing change --- src/Styles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Styles.c b/src/Styles.c index 63bc50b6a..6732d0391 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -9,7 +9,7 @@ * Based on code from Notepad2, (c) Florian Balmer 1996-2011 * * Mostly taken from SciTE, (c) Neil Hodgson * * * -* (c) Rizonesoft 2008-2023 * +* (c) Rizonesoft 2008-2022 * * http://www.rizonesoft.com * * * * * From 3e27626cf1063df262118724eeb9ab2986d613b8 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Mon, 2 Jan 2023 13:15:29 +0100 Subject: [PATCH 3/6] +add: allow Line Number color to be alpha blended (e.g. DarkMode) --- res/StdDarkModeScheme.ini | 4 ++-- src/Styles.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/res/StdDarkModeScheme.ini b/res/StdDarkModeScheme.ini index b28183170..4767d9875 100644 --- a/res/StdDarkModeScheme.ini +++ b/res/StdDarkModeScheme.ini @@ -20,7 +20,7 @@ 16=#BE944E [Common Base] Default Style=font:$Code -Margins and Line Numbers=size:-2; fore:#A5FAFA; back:#454545 +Margins and Line Numbers=size:-2; fore:#A5FAFA; back:#454545; alpha:180 Matching Braces (Indicator)=fore:#0DF145; alpha:80; alpha2:80; indic_roundbox Matching Braces Error (Indicator)=fore:#F20C80; alpha:140; alpha2:140; indic_roundbox Control Characters (Font)=size:-1 @@ -42,7 +42,7 @@ Change History Marker Reverted to Origin=fore:#40A0BF; back:#40A0BF Inline-IME Color=fore:#4EF64D [2nd Common Base] 2nd Default Style=font:Consolas -2nd Margins and Line Numbers=size:-1; fore:#A5FAFA; back:#454545 +2nd Margins and Line Numbers=size:-1; fore:#A5FAFA; back:#454545; alpha:180 2nd Matching Braces (Indicator)=fore:#0DF145; alpha:80; alpha2:220; indic_roundbox 2nd Matching Braces Error (Indicator)=fore:#F20C80; alpha:140; alpha2:220; indic_roundbox 2nd Control Characters (Font)=size:-1 diff --git a/src/Styles.c b/src/Styles.c index 6732d0391..a930fa26e 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -2115,23 +2115,23 @@ void Style_SetMargin(HWND hwnd, LPCWSTR lpszStyle) /// iStyle == STYLE_LINENUMBE int alpha; COLORREF colorRead; - // foreground - if (!Style_StrGetColor(lpszStyle, FOREGROUND_LAYER, &colorRead, NULL, false)) { - colorRead = GetModeTextColor(UseDarkMode()); - } - COLORREF const clrLineNumFore = colorRead; - SciCall_StyleSetFore(STYLE_LINENUMBER, clrLineNumFore); - // background if (!Style_StrGetColor(lpszStyle, BACKGROUND_LAYER, &colorRead, NULL, false)) { colorRead = GetModeBtnfaceColor(UseDarkMode()); } - COLORREF const clrMarginBack = colorRead; + COLORREF const clrMarginBack = colorRead; // (=clrLineNumBack) + + // foreground + if (!Style_StrGetColor(lpszStyle, FOREGROUND_LAYER, &colorRead, NULL, false)) { + colorRead = GetModeTextColor(UseDarkMode()); + } + Style_StrGetAlpha(lpszStyle, &alpha, SC_ALPHA_OPAQUE, true); + COLORREF const clrLineNumFore = Style_RgbAlpha(colorRead, clrMarginBack, alpha); // --- Line Numbers --- + SciCall_StyleSetFore(STYLE_LINENUMBER, clrLineNumFore); SciCall_StyleSetBack(STYLE_LINENUMBER, clrMarginBack); SciCall_SetMarginBackN(MARGIN_SCI_LINENUM, clrMarginBack); - //~SciCall_SetMarginBackN(MARGIN_SCI_LINENUM, clrLineNumBack); SciCall_SetMarginSensitiveN(MARGIN_SCI_LINENUM, false); /// (!) false: allow selection drag From 747eee83ca1eaa28a7283ca8ff19b17ce4d9c86b Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Mon, 2 Jan 2023 15:40:55 +0100 Subject: [PATCH 4/6] +chg: allow coloralpharef read from scheme properties --- src/Styles.c | 78 ++++++++++++++++++++++++++------------------------ src/Styles.h | 2 +- src/TypeDefs.h | 31 ++++++++++++-------- 3 files changed, 61 insertions(+), 50 deletions(-) diff --git a/src/Styles.c b/src/Styles.c index a930fa26e..5fd48eb1d 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -1487,8 +1487,8 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) Style_SetStyles(hwnd, pCurrentStandard->Styles[STY_INDENT_GUIDE].iStyle, pCurrentStandard->Styles[STY_INDENT_GUIDE].szValue, fBaseFontSize); // indent guide if (Style_StrGetColor(pCurrentStandard->Styles[STY_SEL_TXT].szValue, FOREGROUND_LAYER, &rgb, NULL, false)) { // selection fore - SciCall_SetElementColour(SC_ELEMENT_SELECTION_TEXT, RGBxA(rgb, SC_ALPHA_OPAQUE)); - SciCall_SetElementColour(SC_ELEMENT_SELECTION_ADDITIONAL_TEXT, RGBxA(rgb, SC_ALPHA_OPAQUE)); + SciCall_SetElementColour(SC_ELEMENT_SELECTION_TEXT, RGB2RGBAREF(rgb)); + SciCall_SetElementColour(SC_ELEMENT_SELECTION_ADDITIONAL_TEXT, RGB2RGBAREF(rgb)); } else { SciCall_ResetElementColour(SC_ELEMENT_SELECTION_TEXT); @@ -1499,8 +1499,8 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) SciCall_SetSelectionLayer(SC_LAYER_UNDER_TEXT); // selection back if (Style_StrGetColor(pCurrentStandard->Styles[STY_SEL_TXT].szValue, BACKGROUND_LAYER, &rgb, NULL, true)) { Style_StrGetAlpha(pCurrentStandard->Styles[STY_SEL_TXT].szValue, &iValue, SC_ALPHA_OPAQUE, true); - SciCall_SetElementColour(SC_ELEMENT_SELECTION_BACK, RGBxA(rgb, iValue)); - SciCall_SetElementColour(SC_ELEMENT_SELECTION_ADDITIONAL_BACK, RGBxA(rgb, iValue * 2 / 3)); + SciCall_SetElementColour(SC_ELEMENT_SELECTION_BACK, AxRGB(iValue, rgb)); + SciCall_SetElementColour(SC_ELEMENT_SELECTION_ADDITIONAL_BACK, AxRGB(iValue * 2 / 3, rgb)); } else { SciCall_ResetElementColour(SC_ELEMENT_SELECTION_BACK); @@ -1508,8 +1508,8 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) } // AutoCompletion List - SciCall_SetElementColour(SC_ELEMENT_LIST, RGBxA(GetModeTextColor(UseDarkMode()), SC_ALPHA_OPAQUE)); - SciCall_SetElementColour(SC_ELEMENT_LIST_BACK, RGBxA(GetModeBkColor(UseDarkMode()), SC_ALPHA_OPAQUE)); + SciCall_SetElementColour(SC_ELEMENT_LIST, RGB2RGBAREF(GetModeTextColor(UseDarkMode()))); + SciCall_SetElementColour(SC_ELEMENT_LIST_BACK, RGB2RGBAREF(GetModeBkColor(UseDarkMode()))); //SciCall_SetElementColour(SC_ELEMENT_LIST_SELECTED, SciCall_GetElementBaseColour(SC_ELEMENT_LIST_SELECTED)); //SciCall_SetElementColour(SC_ELEMENT_LIST_SELECTED_BACK, SciCall_GetElementBaseColour(SC_ELEMENT_LIST_SELECTED_BACK)); @@ -1540,10 +1540,10 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) StringCchPrintf(wch, COUNTOF(wch), L"; alpha:%i", iValue); StringCchCat(wchSpecificStyle, COUNTOF(wchSpecificStyle), wch); } - SciCall_SetElementColour(SC_ELEMENT_WHITE_SPACE, RGBxA(rgb, iValue)); - SciCall_SetRepresentationColour("\r", RGBxA(rgb, iValue)); - SciCall_SetRepresentationColour("\n", RGBxA(rgb, iValue)); - SciCall_SetRepresentationColour("\r\n", RGBxA(rgb, iValue)); + SciCall_SetElementColour(SC_ELEMENT_WHITE_SPACE, AxRGB(iValue, rgb)); + SciCall_SetRepresentationColour("\r", AxRGB(iValue, rgb)); + SciCall_SetRepresentationColour("\n", AxRGB(iValue, rgb)); + SciCall_SetRepresentationColour("\r\n", AxRGB(iValue, rgb)); } else { SciCall_ResetElementColour(SC_ELEMENT_WHITE_SPACE); @@ -1563,7 +1563,7 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) //~ StringCchPrintf(wch, COUNTOF(wch), L"; alpha2:%i", iValue); //~ StringCchCat(wchSpecificStyle, COUNTOF(wchSpecificStyle), wch); //~} - SciCall_SetElementColour(SC_ELEMENT_WHITE_SPACE_BACK, RGBxA(rgb, SC_ALPHA_OPAQUE)); + SciCall_SetElementColour(SC_ELEMENT_WHITE_SPACE_BACK, RGB2RGBAREF(rgb)); } else { SciCall_ResetElementColour(SC_ELEMENT_WHITE_SPACE_BACK); @@ -1631,8 +1631,8 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) StringCchPrintf(wch, COUNTOF(wch), L"; alpha:%i", iValue); StringCchCat(wchSpecificStyle, COUNTOF(wchSpecificStyle), wch); } - SciCall_SetElementColour(SC_ELEMENT_CARET, RGBxA(rgb, iValue)); - SciCall_SetElementColour(SC_ELEMENT_CARET_ADDITIONAL, RGBxA(RGB(220, 0, 0), iValue)); + SciCall_SetElementColour(SC_ELEMENT_CARET, AxRGB(iValue, rgb)); + SciCall_SetElementColour(SC_ELEMENT_CARET_ADDITIONAL, AxRGB(iValue, RGB(220, 0, 0))); StrTrim(wchSpecificStyle, L" ;"); StringCchCopy(pCurrentStandard->Styles[STY_CARET].szValue, @@ -2003,7 +2003,7 @@ void Style_HighlightCurrentLine(HWND hwnd, int iHiLitCurLn) } SciCall_SetCaretLineLayer(SC_LAYER_UNDER_TEXT); - SciCall_SetElementColour(SC_ELEMENT_CARET_LINE_BACK, RGBxA(rgb, alpha)); + SciCall_SetElementColour(SC_ELEMENT_CARET_LINE_BACK, AxRGB(alpha, rgb)); SciCall_SetCaretLineVisibleAlways(iHiLitCurLn > 0); } @@ -2167,17 +2167,17 @@ void Style_SetMargin(HWND hwnd, LPCWSTR lpszStyle) /// iStyle == STYLE_LINENUMBE SciCall_MarkerDefine(MARKER_NP3_BOOKMARK, SC_MARK_VERTICALBOOKMARK); // SC_MARK_BOOKMARK/SC_MARK_SHORTARROW SciCall_MarkerSetStrokeWidth(MARKER_NP3_BOOKMARK, strokeWidth); SciCall_MarkerSetAlpha(MARKER_NP3_BOOKMARK, bookmarkAlpha); // if drawn in content area - SciCall_MarkerSetForeTranslucent(MARKER_NP3_BOOKMARK, RGBxA(clrLineNumFore, bookmarkAlpha)); //~clrBookMarkFore + SciCall_MarkerSetForeTranslucent(MARKER_NP3_BOOKMARK, AxRGB(bookmarkAlpha, clrLineNumFore)); //~clrBookMarkFore //~SciCall_MarkerSetBack(MARKER_NP3_BOOKMARK, Style_RgbAlpha(clrBookMarkFore, clrMarginBack, bookmarkAlpha)); - SciCall_MarkerSetBackTranslucent(MARKER_NP3_BOOKMARK, RGBxA(clrBookMarkFore, bookmarkAlpha)); + SciCall_MarkerSetBackTranslucent(MARKER_NP3_BOOKMARK, AxRGB(bookmarkAlpha, clrBookMarkFore)); // occurrence bookmarker bool const visible = Settings.MarkOccurrencesBookmark; //SciCall_MarkerDefine(MARKER_NP3_OCCURRENCE, visible ? SC_MARK_ARROWS : SC_MARK_BACKGROUND); SciCall_MarkerDefine(MARKER_NP3_OCCURRENCE, visible ? SC_MARK_ARROWS : SC_MARK_EMPTY); SciCall_MarkerSetStrokeWidth(MARKER_NP3_OCCURRENCE, strokeWidth); - SciCall_MarkerSetForeTranslucent(MARKER_NP3_OCCURRENCE, RGBxA(CalcContrastColor(clrMarginBack, 100), SC_ALPHA_OPAQUE)); - SciCall_MarkerSetBackTranslucent(MARKER_NP3_OCCURRENCE, RGBxA(clrMarginBack, SC_ALPHA_TRANSPARENT)); + SciCall_MarkerSetForeTranslucent(MARKER_NP3_OCCURRENCE, RGB2RGBAREF(CalcContrastColor(clrMarginBack, 100))); + SciCall_MarkerSetBackTranslucent(MARKER_NP3_OCCURRENCE, AxRGB(SC_ALPHA_TRANSPARENT, clrMarginBack)); //~SciCall_MarkerSetForeSelected(MARKER_NP3_OCCURRENCE, RGB(0,0,220)); // --- WordBookMarks --- @@ -2186,8 +2186,8 @@ void Style_SetMargin(HWND hwnd, LPCWSTR lpszStyle) /// iStyle == STYLE_LINENUMBE SciCall_MarkerDefine(m, (Settings.FocusViewMarkerMode & FVMM_LN_BACKGR) ? SC_MARK_BACKGROUND : SC_MARK_BOOKMARK); Style_StrGetColor(WordBookMarks[m], BACKGROUND_LAYER, &color, NULL, true); SciCall_MarkerSetAlpha(m, bookmarkAlpha); // if drawn in content area - SciCall_MarkerSetForeTranslucent(m, RGBxA(color, SC_ALPHA_OPAQUE)); - SciCall_MarkerSetBackTranslucent(m, RGBxA(color, bookmarkAlpha)); // 'alpha' no meaning for SC_MARK_BACKGROUND + SciCall_MarkerSetForeTranslucent(m, RGB2RGBAREF(color)); + SciCall_MarkerSetBackTranslucent(m, AxRGB(bookmarkAlpha, color)); // 'alpha' no meaning for SC_MARK_BACKGROUND } SciCall_SetMarginBackN(MARGIN_SCI_BOOKMRK, clrMarginBack); @@ -2286,8 +2286,8 @@ void Style_SetMargin(HWND hwnd, LPCWSTR lpszStyle) /// iStyle == STYLE_LINENUMBE COLORREF const fldHiLight = colorRead; for (int i = 0; i < COUNTOF(FoldMarkerID); ++i) { - SciCall_MarkerSetForeTranslucent(FoldMarkerID[i], RGBxA(clrFoldMarginBack, SC_ALPHA_OPAQUE)); // (!) - SciCall_MarkerSetBackTranslucent(FoldMarkerID[i], RGBxA(clrLineNumFore, SC_ALPHA_OPAQUE)); // (!) //~clrBookMarkForeAlpha + SciCall_MarkerSetForeTranslucent(FoldMarkerID[i], RGB2RGBAREF(clrFoldMarginBack)); // (!) + SciCall_MarkerSetBackTranslucent(FoldMarkerID[i], RGB2RGBAREF(clrLineNumFore)); // (!) //~clrBookMarkForeAlpha SciCall_MarkerSetBackSelected(FoldMarkerID[i], fldHiLight); SciCall_MarkerSetStrokeWidth(FoldMarkerID[i], strokeWidth); } @@ -3267,18 +3267,19 @@ void Style_AppendWeightAttribute(LPWSTR lpszWeight, int cchSize, int fontWeight) // // Style_StrGetColor() // -bool Style_StrGetColor(LPCWSTR lpszStyle, COLOR_LAYER layer, COLORREF* rgb, COLORREF* rgbOrig, bool useDefault) +bool Style_StrGetColor(LPCWSTR lpszStyle, COLOR_LAYER layer, COLORALPHAREF* rgba, COLORALPHAREF* rgbaOrig, bool useDefault) { - bool const bFGLayer = (layer == FOREGROUND_LAYER); + bool const bFGLayer = (layer == FOREGROUND_LAYER); //~COLORREF const colorDefault = bFGLayer ? GetModeTextColor(UseDarkMode()) : GetModeBkColor(UseDarkMode()); - COLORREF const colorDefault = bFGLayer ? SciCall_StyleGetFore(STYLE_DEFAULT) : SciCall_StyleGetBack(STYLE_DEFAULT); //~ SCI maybe not initialized - COLORREF color = rgbOrig ? *rgbOrig : (rgb ? *rgb : colorDefault); - bool bIsDefined = false; - const WCHAR* const pItem = bFGLayer ? L"fore:" : L"back:"; - WCHAR *p = StrStr(lpszStyle, pItem); + COLORALPHAREF const colorDefault = bFGLayer ? RGB2RGBAREF(SciCall_StyleGetFore(STYLE_DEFAULT)) : + RGB2RGBAREF(SciCall_StyleGetBack(STYLE_DEFAULT)); //~ SCI maybe not initialized + COLORALPHAREF color = rgbaOrig ? *rgbaOrig : (rgba ? *rgba : colorDefault); + bool bIsDefined = false; + const WCHAR* const pItem = bFGLayer ? L"fore:" : L"back:"; + WCHAR* p = StrStr(lpszStyle, pItem); if (p) { WCHAR tch[BUFSIZE_STYLE_VALUE] = { L'\0' }; - StringCchCopy(tch, COUNTOF(tch), p + StringCchLenW(pItem,0)); + StringCchCopy(tch, COUNTOF(tch), p + StringCchLenW(pItem, 0)); if (tch[0] == L'#') { tch[0] = L' '; } @@ -3288,9 +3289,12 @@ bool Style_StrGetColor(LPCWSTR lpszStyle, COLOR_LAYER layer, COLORREF* rgb, COLO } TrimSpcW(tch); - unsigned int iValue = 0; + unsigned __int32 iValue = 0; if (swscanf_s(tch, L"%x", &iValue) == 1) { - color = RGB((iValue & 0xFF0000) >> 16, (iValue & 0xFF00) >> 8, iValue & 0xFF); + color = ARGB((iValue & 0xFF000000) >> 24, (iValue & 0xFF0000) >> 16, (iValue & 0xFF00) >> 8, iValue & 0xFF); + if (GetAValue(color) == 0) { + color = RGB2RGBAREF(color); // alpha not defined: assuming opaque + } bIsDefined = true; } } @@ -3300,14 +3304,14 @@ bool Style_StrGetColor(LPCWSTR lpszStyle, COLOR_LAYER layer, COLORREF* rgb, COLO //~ don't: bIsDefined = true; } - if (rgbOrig) { - *rgbOrig = color; + if (rgbaOrig) { + *rgbaOrig = color; } if (bFGLayer && UseDarkMode()) { - color = ContrastColor(color, Settings2.DarkModeHiglightContrast); + color = AxRGB(GetAValue(color), ContrastColor(ARGB_TO_COLREF(color), Settings2.DarkModeHiglightContrast)); } - if (rgb) { - *rgb = color; + if (rgba) { + *rgba = color; } return bIsDefined; diff --git a/src/Styles.h b/src/Styles.h index 7ea099899..6f16a522e 100644 --- a/src/Styles.h +++ b/src/Styles.h @@ -94,7 +94,7 @@ bool Style_StrGetSizeStr(LPCWSTR lpszStyle,LPWSTR lpszSize,int cchSize); void Style_AppendSizeAttribute(LPWSTR lpszSize, int cchSize, const float fFontSize, const float fBaseFontSize); bool Style_StrGetWeightValue(LPCWSTR lpszWeight, int *weight); void Style_AppendWeightAttribute(LPWSTR lpszWeight, int cchSize, int fontWeight); -bool Style_StrGetColor(LPCWSTR lpszStyle, COLOR_LAYER layer, COLORREF *rgb, COLORREF *rgbOrig, bool useDefault); +bool Style_StrGetColor(LPCWSTR lpszStyle, COLOR_LAYER layer, COLORALPHAREF* rgba, COLORALPHAREF* rgbaOrig, bool useDefault); bool Style_StrGetStrokeWidth(HWND hwnd, int indicID, LPCWSTR lpszStyle, int *piStrokeWidth); bool Style_StrGetCase(LPCWSTR lpszStyle, int *i); bool Style_StrGetAlpha(LPCWSTR lpszStyle, int* iOutValue, const int defAlpha, const bool bAlpha1st); diff --git a/src/TypeDefs.h b/src/TypeDefs.h index 4594cf4c1..b8de31131 100644 --- a/src/TypeDefs.h +++ b/src/TypeDefs.h @@ -145,20 +145,27 @@ extern WININFO g_DefWinInfo; // ---------------------------------------------------------------------------- // see windef.h and wingdi.h -//-typedef DWORD COLORREF; -typedef int COLORALPHAREF; -//-#define RGB(r, g, b) ((COLORREF)(((BYTE)(r) | ((WORD)((BYTE)(g)) << 8)) | (((DWORD)(BYTE)(b)) << 16))) -#define RGBA(r, g, b, a) ((COLORALPHAREF)(((BYTE)(((r)&0xff)) | ((WORD)((BYTE)((g)&0xff)) << 8)) | (((DWORD)(BYTE)((b)&0xff)) << 16) | (((DWORD)(BYTE)((a)&0xff)) << 24))) -#define RGBxA(rgb, a) ((COLORALPHAREF)(((DWORD)((rgb)&0xffffff)) | (((DWORD)(BYTE)((a)&0xff)) << 24))) -//-#define GetRValue(rgba) (LOBYTE(rgba)) -//-#define GetGValue(rgba) (LOBYTE(((WORD)(rgba)) >> 8)) -//-#define GetBValue(rgba) (LOBYTE((rgba) >> 16)) +//::typedef DWORD COLORREF; +typedef COLORREF COLORALPHAREF; +// typedef unsigned __int32 COLORALPHAREF; //: warning(C4057) different base types +//::#define RGB(r, g, b) ((COLORREF)(((BYTE)(r) | ((WORD)((BYTE)(g)) << 8)) | (((DWORD)(BYTE)(b)) << 16))) +#define ARGB(a, r, g, b) ((COLORALPHAREF)(((BYTE)(((r)&0xff)) | ((WORD)((BYTE)((g)&0xff)) << 8)) | (((DWORD)(BYTE)((b)&0xff)) << 16) | (((DWORD)(BYTE)((a)&0xff)) << 24))) +#define AxRGB(a, rgb) ((COLORALPHAREF)(((COLORREF)((rgb)&0xffffff)) | (((COLORALPHAREF)(BYTE)((a)&0xff)) << 24))) +#define RGB2RGBAREF(rgb) AxRGB(SC_ALPHA_OPAQUE, (COLORREF)((rgb)&0xffffff)) +//::#define GetRValue(rgba) (LOBYTE(rgba)) +//::#define GetGValue(rgba) (LOBYTE(((WORD)(rgba)) >> 8)) +//::#define GetBValue(rgba) (LOBYTE((rgba) >> 16)) #define GetAValue(rgba) (LOBYTE((rgba) >> 24)) -#define ARGB_TO_COLREF(X) (RGB(((X) >> 16) & 0xff, ((X) >> 8) & 0xff, (X)&0xff)) -#define RGBA_TO_COLREF(X) (RGB(((X) >> 24) & 0xff, ((X) >> 16) & 0xff, ((X) >> 8) & 0xff)) -#define BGRA_TO_COLREF(X) (RGB(((X) >> 8) & 0xff, ((X) >> 16) & 0xff, ((X) >> 24) & 0xff)) -#define ARGB_GET_ALPHA(A) (((A) >> 24) & 0xff) +#define ARGB_TO_COLREF(X) ((X) & 0xffffff) +#define RGBA_TO_COLREF(X) RGB(((X) >> 24)&0xff, ((X) >> 16)&0xff, ((X) >> 8)&0xff) +#define BGRA_TO_COLREF(X) RGB(((X) >> 8)&0xff, ((X) >> 16)&0xff, ((X) >> 24)&0xff) + +//#define ARGB_TO_COLORALPHAREF(X) (X) +#define RGBA_TO_COLORALPHAREF(X) AxRGB((X)&0xff, RGBA_TO_COLREF(X)) +#define BGRA_TO_COLORALPHAREF(X) AxRGB((X)&0xff, BGRA_TO_COLREF(X)) + +#define ARGB_GET_ALPHA(A) (((A) >> 24)&0xff) #define RGBA_GET_ALPHA(A) ((A)&0xff) #define BGRA_GET_ALPHA(A) RGBA_GET_ALPHA(A) From d5ae772ea5693caba02617069c243c35ac8f2f5b Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Tue, 3 Jan 2023 19:27:49 +0100 Subject: [PATCH 5/6] +chg: move DefaultWindowPosition to Window section (deprecated: Settings2 section) --- src/Config/Config.cpp | 54 +++++++++++++++++++++---------------------- src/Notepad3.c | 29 +++++++++++++++++------ src/TypeDefs.h | 4 ++-- 3 files changed, 51 insertions(+), 36 deletions(-) diff --git a/src/Config/Config.cpp b/src/Config/Config.cpp index c58dfb83c..7c57bbf5c 100644 --- a/src/Config/Config.cpp +++ b/src/Config/Config.cpp @@ -1140,6 +1140,8 @@ extern "C" bool CreateIniFile(const HPATHL hini_pth, DWORD* pdwFileSize_out) // void LoadSettings() { + WCHAR tchKeyName[MIDSZ_BUFFER] = { L'\0' }; + CFG_VERSION const _ver = Path_IsEmpty(Paths.IniFile) ? CFG_VER_CURRENT : CFG_VER_NONE; auto* const pPathBuffer = (wchar_t*)AllocMem(PATHLONG_MAX_CCH * sizeof(wchar_t), HEAP_ZERO_MEMORY); @@ -1364,12 +1366,11 @@ void LoadSettings() StrgReset(Settings2.HyperlinkShellExURLCmdLnArgs, pPathBuffer); const static WCHAR *const allowedVerbs[7] = { L"edit", L"explore", L"find", L"open", L"print", L"properties", L"runas" }; - WCHAR cfgVerb[MICRO_BUFFER] = { L'\0' }; Settings2.HyperlinkFileProtocolVerb[0] = L'\0'; - IniSectionGetStringNoQuotes(IniSecSettings2, L"HyperlinkFileProtocolVerb", L"", cfgVerb, COUNTOF(cfgVerb)); + IniSectionGetStringNoQuotes(IniSecSettings2, L"HyperlinkFileProtocolVerb", L"", tchKeyName, COUNTOF(tchKeyName)); for (auto allowedVerb : allowedVerbs) { - if (StrStr(cfgVerb, allowedVerb)) { - StringCchCopy(Settings2.HyperlinkFileProtocolVerb, COUNTOF(Settings2.HyperlinkFileProtocolVerb), cfgVerb); + if (StrStr(tchKeyName, allowedVerb)) { + StringCchCopy(Settings2.HyperlinkFileProtocolVerb, COUNTOF(Settings2.HyperlinkFileProtocolVerb), tchKeyName); break; } } @@ -1378,11 +1379,10 @@ void LoadSettings() unsigned int iValue = 0; WCHAR color[32] = { L'\0' }; - WCHAR wchBuffer[MIDSZ_BUFFER] = { L'\0' }; StringCchPrintf(color, COUNTOF(color), L"%#08x", rgbDarkBkgColorRef); - IniSectionGetStringNoQuotes(IniSecSettings2, L"DarkModeBkgColor", color, wchBuffer, COUNTOF(wchBuffer)); - if (swscanf_s(wchBuffer, L"%x", &iValue) == 1) { + IniSectionGetStringNoQuotes(IniSecSettings2, L"DarkModeBkgColor", color, tchKeyName, COUNTOF(tchKeyName)); + if (swscanf_s(tchKeyName, L"%x", &iValue) == 1) { Settings2.DarkModeBkgColor = RGB((iValue & 0xFF0000) >> 16, (iValue & 0xFF00) >> 8, iValue & 0xFF); } else { Settings2.DarkModeBkgColor = rgbDarkBkgColorRef; @@ -1397,8 +1397,8 @@ void LoadSettings() Globals.hbrDarkModeBkgBrush = CreateSolidBrush(Settings2.DarkModeBkgColor); StringCchPrintf(color, COUNTOF(color), L"%#08x", rgbDarkBtnFcColorRef); - IniSectionGetStringNoQuotes(IniSecSettings2, L"DarkModeBtnFaceColor", color, wchBuffer, COUNTOF(wchBuffer)); - if (swscanf_s(wchBuffer, L"%x", &iValue) == 1) { + IniSectionGetStringNoQuotes(IniSecSettings2, L"DarkModeBtnFaceColor", color, tchKeyName, COUNTOF(tchKeyName)); + if (swscanf_s(tchKeyName, L"%x", &iValue) == 1) { Settings2.DarkModeBtnFaceColor = RGB((iValue & 0xFF0000) >> 16, (iValue & 0xFF00) >> 8, iValue & 0xFF); } else { Settings2.DarkModeBtnFaceColor = rgbDarkBtnFcColorRef; @@ -1406,8 +1406,8 @@ void LoadSettings() Globals.hbrDarkModeBtnFcBrush = CreateSolidBrush(Settings2.DarkModeBtnFaceColor); StringCchPrintf(color, COUNTOF(color), L"%#08x", rgbDarkTxtColorRef); - IniSectionGetStringNoQuotes(IniSecSettings2, L"DarkModeTxtColor", color, wchBuffer, COUNTOF(wchBuffer)); - if (swscanf_s(wchBuffer, L"%x", &iValue) == 1) { + IniSectionGetStringNoQuotes(IniSecSettings2, L"DarkModeTxtColor", color, tchKeyName, COUNTOF(tchKeyName)); + if (swscanf_s(tchKeyName, L"%x", &iValue) == 1) { Settings2.DarkModeTxtColor = RGB((iValue & 0xFF0000) >> 16, (iValue & 0xFF00) >> 8, iValue & 0xFF); } else { Settings2.DarkModeTxtColor = rgbDarkTxtColorRef; @@ -1590,9 +1590,8 @@ void LoadSettings() } Settings.PrintZoom = clampi(iPrintZoom, SC_MIN_ZOOM_LEVEL, SC_MAX_ZOOM_LEVEL); - WCHAR localeInfo[SMALL_BUFFER]; - GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_IMEASURE, localeInfo, COUNTOF(localeInfo)); - LONG const _margin = (localeInfo[0] == L'0') ? 2000L : 1000L; // Metric system. L'1' is US System + GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_IMEASURE, tchKeyName, COUNTOF(tchKeyName)); + LONG const _margin = (tchKeyName[0] == L'0') ? 2000L : 1000L; // Metric system. L'1' is US System Defaults.PrintMargin.left = _margin; Settings.PrintMargin.left = clampi(IniSectionGetInt(IniSecSettings, L"PrintMarginLeft", Defaults.PrintMargin.left), 0, 40000); Defaults.PrintMargin.top = _margin; @@ -1674,9 +1673,8 @@ void LoadSettings() const WCHAR *const StatusBar_Section = L"Statusbar Settings"; // -------------------------------------------------------------------------- - WCHAR tchStatusBar[MIDSZ_BUFFER] = { L'\0' }; - IniSectionGetStringNoQuotes(StatusBar_Section, L"VisibleSections", STATUSBAR_DEFAULT_IDS, tchStatusBar, COUNTOF(tchStatusBar)); - ReadVectorFromString(tchStatusBar, s_iStatusbarSections, STATUS_SECTOR_COUNT, 0, (STATUS_SECTOR_COUNT - 1), -1, false); + IniSectionGetStringNoQuotes(StatusBar_Section, L"VisibleSections", STATUSBAR_DEFAULT_IDS, tchKeyName, COUNTOF(tchKeyName)); + ReadVectorFromString(tchKeyName, s_iStatusbarSections, STATUS_SECTOR_COUNT, 0, (STATUS_SECTOR_COUNT - 1), -1, false); // cppcheck-suppress useStlAlgorithm for (bool &sbv : g_iStatusbarVisible) { @@ -1692,8 +1690,8 @@ void LoadSettings() } } - IniSectionGetStringNoQuotes(StatusBar_Section, L"SectionWidthSpecs", STATUSBAR_SECTION_WIDTH_SPECS, tchStatusBar, COUNTOF(tchStatusBar)); - ReadVectorFromString(tchStatusBar, g_iStatusbarWidthSpec, STATUS_SECTOR_COUNT, -4096, 4096, 0, false); + IniSectionGetStringNoQuotes(StatusBar_Section, L"SectionWidthSpecs", STATUSBAR_SECTION_WIDTH_SPECS, tchKeyName, COUNTOF(tchKeyName)); + ReadVectorFromString(tchKeyName, g_iStatusbarWidthSpec, STATUS_SECTOR_COUNT, -4096, 4096, 0, false); Globals.bZeroBasedColumnIndex = IniSectionGetBool(StatusBar_Section, L"ZeroBasedColumnIndex", false); Globals.bZeroBasedCharacterCount = IniSectionGetBool(StatusBar_Section, L"ZeroBasedCharacterCount", false); @@ -1731,8 +1729,12 @@ void LoadSettings() // startup window (ignore window position if /p was specified) // -------------------------------------------------------------- - IniSectionGetString(IniSecSettings2, Constants.DefaultWindowPosition, L"", - Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition)); + StringCchPrintf(tchKeyName, COUNTOF(tchKeyName), L"%ix%i " DEF_WIN_POSITION_STRG, ResX, ResY); + if (!IniSectionGetString(IniSecWindow, tchKeyName, L"", + Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition))) { + IniSectionGetString(IniSecSettings2, DEF_WIN_POSITION_STRG, L"", + Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition)); + } if (!Globals.CmdLnFlag_PosParam /*|| g_bStickyWinPos*/) { @@ -1775,13 +1777,11 @@ void LoadSettings() // ------------------------------------------------------------------------ // --- override by resolution specific settings --- - WCHAR tchSciDirectWriteTech[64]; - StringCchPrintf(tchSciDirectWriteTech, COUNTOF(tchSciDirectWriteTech), L"%ix%i RenderingTechnology", ResX, ResY); - Settings.RenderingTechnology = clampi(IniSectionGetInt(IniSecWindow, tchSciDirectWriteTech, Settings.RenderingTechnology), 0, 3); + StringCchPrintf(tchKeyName, COUNTOF(tchKeyName), L"%ix%i RenderingTechnology", ResX, ResY); + Settings.RenderingTechnology = clampi(IniSectionGetInt(IniSecWindow, tchKeyName, Settings.RenderingTechnology), 0, 3); - WCHAR tchSciFontQuality[64]; - StringCchPrintf(tchSciFontQuality, COUNTOF(tchSciFontQuality), L"%ix%i SciFontQuality", ResX, ResY); - Settings2.SciFontQuality = clampi(IniSectionGetInt(IniSecWindow, tchSciFontQuality, Settings2.SciFontQuality), SC_EFF_QUALITY_DEFAULT, SC_EFF_QUALITY_LCD_OPTIMIZED); + StringCchPrintf(tchKeyName, COUNTOF(tchKeyName), L"%ix%i SciFontQuality", ResX, ResY); + Settings2.SciFontQuality = clampi(IniSectionGetInt(IniSecWindow, tchKeyName, Settings2.SciFontQuality), SC_EFF_QUALITY_DEFAULT, SC_EFF_QUALITY_LCD_OPTIMIZED); // ------------------------------------------------------------------------ diff --git a/src/Notepad3.c b/src/Notepad3.c index 9890febed..52eb9ee39 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -88,7 +88,6 @@ CONSTANTS_T const Constants = { , L"Window" // Inifile Section "Window" , L"Styles" // Inifile Section "Styles" , L"Suppressed Messages" // Inifile Section "SuppressedMessages" - , L"DefaultWindowPosition" // Strg DefaultWindowPosition }; @@ -1381,9 +1380,13 @@ static WININFO _GetDefaultWinInfoByStrg(HWND hwnd, LPCWSTR strDefaultWinPos) else { wi = wiDef; // overwrite bad defined default position + WCHAR tchScrnDim[64] = { L'\0' }; + StringCchPrintf(tchScrnDim, COUNTOF(tchScrnDim), L"%ix%i " DEF_WIN_POSITION_STRG, + GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); StringCchPrintf(Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition), - WINDOWPOS_STRGFORMAT, wi.x, wi.y, wi.cx, wi.cy, wi.dpi, wi.max); - IniSectionSetString(Constants.Settings2_Section, Constants.DefaultWindowPosition, Settings2.DefaultWindowPosition); + WINDOWPOS_STRGFORMAT, wi.x, wi.y, wi.cx, wi.cy, wi.dpi, wi.max); + IniFileSetString(Paths.IniFile, Constants.Window_Section, tchScrnDim, Settings2.DefaultWindowPosition); + IniFileDelete(Paths.IniFile, Constants.Settings2_Section, DEF_WIN_POSITION_STRG, true); } return wi; } @@ -7104,10 +7107,17 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) case CMD_SAVEASDEFWINPOS: { WININFO const wi = GetMyWindowPlacement(hwnd, NULL, 0); - WCHAR tchDefWinPos[80]; - StringCchPrintf(tchDefWinPos, COUNTOF(tchDefWinPos), WINDOWPOS_STRGFORMAT, wi.x, wi.y, wi.cx, wi.cy, wi.dpi, (int)wi.max); + StringCchPrintf(Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition), + WINDOWPOS_STRGFORMAT, wi.x, wi.y, wi.cx, wi.cy, wi.dpi, (int)wi.max); if (Globals.bCanSaveIniFile) { - IniFileSetString(Paths.IniFile, Constants.Settings2_Section, Constants.DefaultWindowPosition, tchDefWinPos); + // overwrite bad defined default position + WCHAR tchScrnDim[64] = { L'\0' }; + StringCchPrintf(tchScrnDim, COUNTOF(tchScrnDim), L"%ix%i " DEF_WIN_POSITION_STRG, + GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); + StringCchPrintf(Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition), + WINDOWPOS_STRGFORMAT, wi.x, wi.y, wi.cx, wi.cy, wi.dpi, wi.max); + IniFileSetString(Paths.IniFile, Constants.Window_Section, tchScrnDim, Settings2.DefaultWindowPosition); + IniFileDelete(Paths.IniFile, Constants.Settings2_Section, DEF_WIN_POSITION_STRG, true); } g_DefWinInfo = wi; //~GetWinInfoByFlag(-1); // use current win pos as new default } @@ -7115,7 +7125,12 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) case CMD_CLEARSAVEDWINPOS: g_DefWinInfo = GetFactoryDefaultWndPos(hwnd, 2); - IniFileDelete(Paths.IniFile, Constants.Settings2_Section, Constants.DefaultWindowPosition, false); + StringCchCopy(Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition), L""); + WCHAR tchScrnDim[64] = { L'\0' }; + StringCchPrintf(tchScrnDim, COUNTOF(tchScrnDim), L"%ix%i " DEF_WIN_POSITION_STRG, + GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); + IniFileDelete(Paths.IniFile, Constants.Window_Section, tchScrnDim, true); + IniFileDelete(Paths.IniFile, Constants.Settings2_Section, DEF_WIN_POSITION_STRG, true); break; case CMD_OPENINIFILE: diff --git a/src/TypeDefs.h b/src/TypeDefs.h index b8de31131..364ce42d2 100644 --- a/src/TypeDefs.h +++ b/src/TypeDefs.h @@ -457,13 +457,13 @@ typedef struct CONSTANTS_T { const WCHAR* const Window_Section; const WCHAR* const Styles_Section; const WCHAR* const SectionSuppressedMessages; - const WCHAR* const DefaultWindowPosition; } CONSTANTS_T, *PCONSTANTS_T; extern CONSTANTS_T const Constants; -#define WINDOWPOS_STRGFORMAT L"%i,%i,%i,%i,%i,%i" +#define DEF_WIN_POSITION_STRG L"DefaultWindowPosition" +#define WINDOWPOS_STRGFORMAT L"%i,%i,%i,%i,%i,%i" // ------------------------------------ From cce29646f364c3ae7d93dde71c966ed766b7fa0c Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Mon, 9 Jan 2023 16:02:05 +0100 Subject: [PATCH 6/6] +add: allow "dotbox" instead of "horiz. line" for folded text --- src/Styles.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Styles.c b/src/Styles.c index 393273161..470832890 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -2298,15 +2298,12 @@ void Style_SetMargin(HWND hwnd, LPCWSTR lpszStyle) /// iStyle == STYLE_LINENUMBE SciCall_SetFoldMarginColour(true, clrFoldMarginBack); // background SciCall_SetFoldMarginHiColour(true, clrFoldMarginBack); // (!) - //SciCall_FoldDisplayTextSetStyle(SC_FOLDDISPLAYTEXT_BOXED); - //SciCall_SetDefaultFoldDisplayText("..."); - - int fldStyleLn = 0; - Style_StrGetCharSet(wchBookMarkStyleStrg, &fldStyleLn); int const _debug_flags = 0; //int const _debug_flags = (SC_FOLDFLAG_LEVELNUMBERS | SC_FOLDFLAG_LINESTATE); // !extend margin width + int fldStyleLn = 0; + Style_StrGetCharSet(wchBookMarkStyleStrg, &fldStyleLn); switch (fldStyleLn) { case 1: SciCall_SetFoldFlags(SC_FOLDFLAG_LINEBEFORE_CONTRACTED | _debug_flags); @@ -2314,6 +2311,11 @@ void Style_SetMargin(HWND hwnd, LPCWSTR lpszStyle) /// iStyle == STYLE_LINENUMBE case 2: SciCall_SetFoldFlags(SC_FOLDFLAG_LINEBEFORE_CONTRACTED | SC_FOLDFLAG_LINEAFTER_CONTRACTED | _debug_flags); break; + case 3: + SciCall_SetFoldFlags(SC_FOLDFLAG_NONE | _debug_flags); + SciCall_SetDefaultFoldDisplayText(" \xE2\x80\xA6 "); + SciCall_FoldDisplayTextSetStyle(SC_FOLDDISPLAYTEXT_BOXED); + break; default: SciCall_SetFoldFlags(SC_FOLDFLAG_LINEAFTER_CONTRACTED | _debug_flags); break;