From daa48b1c69bc85f5e8df11e129896267cdb1ac63 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Fri, 12 Jun 2020 21:27:16 +0200 Subject: [PATCH] + versin info update --- Versions/day.txt | 2 +- res/Notepad3.exe.manifest.conf | 2 +- scintilla/include/Platform.h | 6 +++--- scintilla/src/Editor.cxx | 20 ++++++++++---------- scintilla/win32/PlatWin.cxx | 18 +++++++++--------- scintilla/win32/PlatWin.h | 4 ---- scintilla/win32/ScintillaWin.cxx | 10 +++++----- src/Dialogs.c | 14 +++++++------- src/VersionEx.h | 2 +- 9 files changed, 37 insertions(+), 41 deletions(-) diff --git a/Versions/day.txt b/Versions/day.txt index 5b484d908..282d20871 100644 --- a/Versions/day.txt +++ b/Versions/day.txt @@ -1 +1 @@ -611 +612 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index 2f0215c31..895d50ae9 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 BETA diff --git a/scintilla/include/Platform.h b/scintilla/include/Platform.h index 73a709bfc..b44e2eea9 100644 --- a/scintilla/include/Platform.h +++ b/scintilla/include/Platform.h @@ -481,12 +481,12 @@ protected: WindowID wid; public: - Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) {} + Window() noexcept : wid(nullptr), cursorLast(Cursor::cursorInvalid) {} Window(const Window &source) = delete; Window(Window &&) = delete; Window &operator=(WindowID wid_) noexcept { wid = wid_; - cursorLast = cursorInvalid; + cursorLast = Cursor::cursorInvalid; return *this; } Window &operator=(const Window &) = delete; @@ -507,7 +507,7 @@ public: void InvalidateAll() noexcept; void SCICALL InvalidateRectangle(PRectangle rc) noexcept; virtual void SetFont(const Font &font) noexcept; - enum Cursor { + enum class Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; void SetCursor(Cursor curs) noexcept; diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index 396fa2624..5c236aed2 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -3949,7 +3949,7 @@ int Editor::KeyDownWithModifiers(int key, int modifiers, bool *consumed) { DwellEnd(false); // >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>> if (hoverIndicatorPos != Sci::invalidPosition) - if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::cursorHand); } + if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::Cursor::cursorHand); } // <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<< const int msg = kmap.Find(key, modifiers); if (msg) { @@ -4432,7 +4432,7 @@ Window::Cursor Editor::GetMarginCursor(Point pt) const noexcept { return static_cast(m.cursor); x += m.width; } - return Window::cursorReverseArrow; + return Window::Cursor::cursorReverseArrow; } void Editor::TrimAndSetSelection(Sci::Position currentPos_, Sci::Position anchor_) { @@ -4526,7 +4526,7 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie SetHoverIndicatorPoint(pt); // >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>> if (hoverIndicatorPos != Sci::invalidPosition) - if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::cursorHand); } + if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::Cursor::cursorHand); } // <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<< //Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop); ptMouseLast = pt; @@ -4873,7 +4873,7 @@ void Editor::ButtonMoveWithModifiers(Point pt, unsigned int, int modifiers) { if (hotSpotClickPos != INVALID_POSITION && PositionFromLocation(pt, true, true) != hotSpotClickPos) { if (inDragDrop == ddNone) { - DisplayCursor(Window::cursorText); + DisplayCursor(Window::Cursor::cursorText); } hotSpotClickPos = INVALID_POSITION; } @@ -4888,18 +4888,18 @@ void Editor::ButtonMoveWithModifiers(Point pt, unsigned int, int modifiers) { } // Display regular (drag) cursor over selection if (PointInSelection(pt) && !SelectionEmpty()) { - DisplayCursor(Window::cursorArrow); + DisplayCursor(Window::Cursor::cursorArrow); } else { SetHoverIndicatorPoint(pt); if (PointIsHotspot(pt)) { - DisplayCursor(Window::cursorHand); + DisplayCursor(Window::Cursor::cursorHand); SetHotSpotRange(&pt); } else { // >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>> if (hoverIndicatorPos != Sci::invalidPosition) - if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::cursorHand); } + if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::Cursor::cursorHand); } else - DisplayCursor(Window::cursorText); + DisplayCursor(Window::Cursor::cursorText); // <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<< SetHotSpotRange(nullptr); } @@ -4930,7 +4930,7 @@ void Editor::ButtonUpWithModifiers(Point pt, unsigned int curTime, int modifiers if (PointInSelMargin(pt)) { DisplayCursor(GetMarginCursor(pt)); } else { - DisplayCursor(Window::cursorText); + DisplayCursor(Window::Cursor::cursorText); SetHotSpotRange(nullptr); } ptMouseLast = pt; @@ -7919,7 +7919,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_SETCURSOR: cursorMode = static_cast(wParam); - DisplayCursor(Window::cursorText); + DisplayCursor(Window::Cursor::cursorText); break; case SCI_GETCURSOR: diff --git a/scintilla/win32/PlatWin.cxx b/scintilla/win32/PlatWin.cxx index 3f9b638cb..8630fa1e8 100644 --- a/scintilla/win32/PlatWin.cxx +++ b/scintilla/win32/PlatWin.cxx @@ -2477,27 +2477,27 @@ HCURSOR LoadReverseArrowCursor(DPI_T dpi) noexcept { void Window::SetCursor(Cursor curs) noexcept { switch (curs) { - case cursorText: + case Cursor::cursorText: ::SetCursor(::LoadCursor({}, IDC_IBEAM)); break; - case cursorUp: + case Cursor::cursorUp: ::SetCursor(::LoadCursor({}, IDC_UPARROW)); break; - case cursorWait: + case Cursor::cursorWait: ::SetCursor(::LoadCursor({}, IDC_WAIT)); break; - case cursorHoriz: + case Cursor::cursorHoriz: ::SetCursor(::LoadCursor({}, IDC_SIZEWE)); break; - case cursorVert: + case Cursor::cursorVert: ::SetCursor(::LoadCursor({}, IDC_SIZENS)); break; - case cursorHand: + case Cursor::cursorHand: ::SetCursor(::LoadCursor({}, IDC_HAND)); break; - case cursorReverseArrow: - case cursorArrow: - case cursorInvalid: // Should not occur, but just in case. + case Cursor::cursorReverseArrow: + case Cursor::cursorArrow: + case Cursor::cursorInvalid: // Should not occur, but just in case. ::SetCursor(::LoadCursor({}, IDC_ARROW)); break; } diff --git a/scintilla/win32/PlatWin.h b/scintilla/win32/PlatWin.h index b99a34cd3..56a3d71b8 100644 --- a/scintilla/win32/PlatWin.h +++ b/scintilla/win32/PlatWin.h @@ -57,10 +57,6 @@ BOOL DpiAdjustWindowRect(LPRECT lpRect, DWORD dwStyle, DWORD dwExStyle, unsigned namespace Scintilla { -#ifndef USER_DEFAULT_SCREEN_DPI -#define USER_DEFAULT_SCREEN_DPI 96 -#endif - extern void Platform_Initialise(void *hInstance) noexcept; extern void Platform_Finalise(bool fromDllMain) noexcept; diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index e681317e7..f324e93b4 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -865,7 +865,7 @@ void ScintillaWin::DisplayCursor(Window::Cursor c) noexcept { if (cursorMode != SC_CURSORNORMAL) { c = static_cast(cursorMode); } - if (c == Window::cursorReverseArrow) { + if (c == Window::Cursor::cursorReverseArrow) { ::SetCursor(reverseArrowCursor.Load(dpi)); } else { wMain.SetCursor(c); @@ -1562,7 +1562,7 @@ sptr_t ScintillaWin::GetText(uptr_t wParam, sptr_t lParam) const { Window::Cursor ScintillaWin::ContextCursor() { if (inDragDrop == ddDragging) { - return Window::cursorUp; + return Window::Cursor::cursorUp; } else { // Display regular (drag) cursor over selection POINT pt; @@ -1571,13 +1571,13 @@ Window::Cursor ScintillaWin::ContextCursor() { if (PointInSelMargin(PointFromPOINT(pt))) { return GetMarginCursor(PointFromPOINT(pt)); } else if (PointInSelection(PointFromPOINT(pt)) && !SelectionEmpty()) { - return Window::cursorArrow; + return Window::Cursor::cursorArrow; } else if (PointIsHotspot(PointFromPOINT(pt))) { - return Window::cursorHand; + return Window::Cursor::cursorHand; } } } - return Window::cursorText; + return Window::Cursor::cursorText; } #if SCI_EnablePopupMenu diff --git a/src/Dialogs.c b/src/Dialogs.c index 1f790f611..635e1f58d 100644 --- a/src/Dialogs.c +++ b/src/Dialogs.c @@ -852,24 +852,24 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam break; } } - StringCchPrintf(wchBuf2, ARRAYSIZE(wchBuf2), L"\n- Locale: %s (CP:'%s')", + StringCchPrintf(wchBuf2, ARRAYSIZE(wchBuf2), L"\n- Locale -> %s (CP:'%s')", wchBuf, g_Encodings[CPI_ANSI_DEFAULT].wchLabel); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf2); - StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Current Encoding = '%s'", Encoding_GetLabel(Encoding_Current(CPI_GET))); + StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Current Encoding -> '%s'", Encoding_GetLabel(Encoding_Current(CPI_GET))); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf); - StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Screen-Resolution = %i x %i [pix]", ResX, ResY); + StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Screen-Resolution -> %i x %i [pix]", ResX, ResY); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf); DPI_T dpi = Scintilla_GetCurrentDPI(hwnd); - StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Display-DPI = %i x %i (Scale: %i%%).", dpi.x, dpi.y, ScaleIntToDPI_X(hwnd, 100)); + StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Display-DPI -> %i x %i (Scale: %i%%).", dpi.x, dpi.y, ScaleIntToDPI_X(hwnd, 100)); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf); - StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Rendering-Technology = '%s'", Settings.RenderingTechnology ? L"DIRECT-WRITE" : L"GDI"); + StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Rendering-Technology -> '%s'", Settings.RenderingTechnology ? L"DIRECT-WRITE" : L"GDI"); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf); - StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Zoom = %i%%.", SciCall_GetZoom()); + StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\n- Zoom -> %i%%.", SciCall_GetZoom()); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), (IsProcessElevated() ? @@ -880,7 +880,7 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam L"\n- User is not in Admin-Group")); Style_GetLexerDisplayName(Style_GetCurrentLexerPtr(), wchBuf, COUNTOF(wchBuf)); - StringCchPrintf(wchBuf2, ARRAYSIZE(wchBuf2), L"\n- Current Lexer: '%s'", wchBuf); + StringCchPrintf(wchBuf2, ARRAYSIZE(wchBuf2), L"\n- Current Lexer -> '%s'", wchBuf); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf2); StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n"); diff --git a/src/VersionEx.h b/src/VersionEx.h index 048e62a7a..7de742c7b 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -8,7 +8,7 @@ #define SAPPNAME "Notepad3" #define VERSION_MAJOR 5 #define VERSION_MINOR 20 -#define VERSION_REV 611 +#define VERSION_REV 612 #define VERSION_BUILD 1 #define SCINTILLA_VER 443 #define ONIGURUMA_REGEX_VER 6.9.5