From 28cbc32a67667fb0b3eb2c6a369685ebb69668e8 Mon Sep 17 00:00:00 2001 From: Pavel Nedev Date: Wed, 2 Feb 2022 19:29:26 +0200 Subject: [PATCH] Release v4.5.0 --- NppGTags.vcxproj | 116 ----------------- ReleaseNotes.txt | 6 + appveyor.yml | 27 ++-- src/INpp.h | 6 +- src/{ => NppAPI}/Docking.h | 28 ++-- src/{ => NppAPI}/Notepad_plus_msgs.h | 128 +++++++++++-------- src/{ => NppAPI}/PluginInterface.h | 59 +++------ src/{ => NppAPI}/Sci_Position.h | 4 +- src/{ => NppAPI}/Scintilla.h | 93 +++++++++++--- src/{ => NppAPI}/dockingResource.h | 30 ++--- src/{ => NppAPI}/menuCmdID.h | 184 ++++++++++++++------------- src/PluginInterface.cpp | 6 +- src/ResultWin.cpp | 2 +- src/ResultWin.h | 2 +- src/resource.h | 6 +- 15 files changed, 313 insertions(+), 384 deletions(-) delete mode 100644 NppGTags.vcxproj rename src/{ => NppAPI}/Docking.h (67%) rename src/{ => NppAPI}/Notepad_plus_msgs.h (83%) rename src/{ => NppAPI}/PluginInterface.h (54%) rename src/{ => NppAPI}/Sci_Position.h (89%) rename src/{ => NppAPI}/Scintilla.h (92%) rename src/{ => NppAPI}/dockingResource.h (64%) rename src/{ => NppAPI}/menuCmdID.h (79%) diff --git a/NppGTags.vcxproj b/NppGTags.vcxproj deleted file mode 100644 index 344ede2..0000000 --- a/NppGTags.vcxproj +++ /dev/null @@ -1,116 +0,0 @@ - - - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Win32Proj - NppGTags - {B5AB4294-4F41-4522-DA98-CEEC2F759C4D} - - - - DynamicLibrary - false - Unicode - false - false - v120 - - - - - - - - - - false - false - - - - WIN32;_WIN32_WINNT=0x0501;_WINDOWS;_USRDLL;WIN32_LEAN_AND_MEAN;NOCOMM;NDEBUG;NPPGTAGS_EXPORTS;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ProgramDatabase - true - true - false - - - MachineX86 - false - Windows - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) - NoErrorReport - - - false - - - true - - - - - true - - - - - - - - \ No newline at end of file diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index c050035..bed3601 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,9 @@ +What's new in v4.5.0 +======================= +- Add summary of the hits count in every search header +- Update Notepad++ API to match header changes after v8.2.2 + + What's new in v4.4.3 ======================= - No functional changes, just link statically to MSVC run-time library diff --git a/appveyor.yml b/appveyor.yml index 96d806e..425a07f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,6 @@ matrix: environment: matrix: - PlatformToolset: v141 - - PlatformToolset: v140 platform: - x64 @@ -25,7 +24,6 @@ install: - if "%platform%"=="x86" set platform_input=x86 - if "%PlatformToolset%"=="v141" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi% - - if "%PlatformToolset%"=="v140" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi% before_build: - ps: | @@ -34,7 +32,6 @@ before_build: $generator = switch ($env:PLATFORMTOOLSET) { "v141" {"Visual Studio 15 2017"} - "v140" {"Visual Studio 14 2015"} } # not applicable with MinGW Makefiles generator if ($env:PLATFORM_INPUT -eq "x64") @@ -86,15 +83,15 @@ artifacts: - path: NppGTags_*.zip name: releases -deploy: - provider: GitHub - auth_token: - secure: 7/ifzsk2Tk/V63jr6/WyA4HdmukWhg2PD7pCgJma7f/QYuZCsyE6RZ5M3RIr6JVc - artifact: releases - draft: false - prerelease: false - force_update: true - on: - appveyor_repo_tag: true - PlatformToolset: v141 - configuration: Release +# deploy: + # provider: GitHub + # auth_token: + # secure: + # artifact: releases + # draft: false + # prerelease: false + # force_update: true + # on: + # appveyor_repo_tag: true + # PlatformToolset: v141 + # configuration: Release diff --git a/src/INpp.h b/src/INpp.h index b75b918..f195d96 100644 --- a/src/INpp.h +++ b/src/INpp.h @@ -29,9 +29,9 @@ #include #include #include "Common.h" -#include "Notepad_plus_msgs.h" -#include "Docking.h" -#include "PluginInterface.h" +#include "NppAPI/Notepad_plus_msgs.h" +#include "NppAPI/Docking.h" +#include "NppAPI/PluginInterface.h" /** diff --git a/src/Docking.h b/src/NppAPI/Docking.h similarity index 67% rename from src/Docking.h rename to src/NppAPI/Docking.h index 3d3f93d..0ca6c27 100644 --- a/src/Docking.h +++ b/src/NppAPI/Docking.h @@ -1,20 +1,10 @@ -// this file is part of Notepad++ -// Copyright (C)2005 Jens Lorenz -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// // Note that the GPL places important restrictions on "derived works", yet -// it does not provide a detailed definition of that term. To avoid -// misunderstandings, we consider an application to constitute a -// "derivative work" for the purpose of this license if it does any of the -// following: -// 1. Integrates source code from Notepad++. -// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable -// installer, such as those produced by InstallShield. -// 3. Links to a library or executes a program that does any of the above. +// This file is part of Notepad++ project +// Copyright (C)2021 Don HO + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,8 +12,7 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . #pragma once @@ -82,3 +71,4 @@ typedef struct { #define HIT_TEST_THICKNESS 20 #define SPLITTER_WIDTH 4 + diff --git a/src/Notepad_plus_msgs.h b/src/NppAPI/Notepad_plus_msgs.h similarity index 83% rename from src/Notepad_plus_msgs.h rename to src/NppAPI/Notepad_plus_msgs.h index 306c109..f408e7c 100644 --- a/src/Notepad_plus_msgs.h +++ b/src/NppAPI/Notepad_plus_msgs.h @@ -1,20 +1,10 @@ // This file is part of Notepad++ project -// Copyright (C)2003 Don HO -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// Note that the GPL places important restrictions on "derived works", yet -// it does not provide a detailed definition of that term. To avoid -// misunderstandings, we consider an application to constitute a -// "derivative work" for the purpose of this license if it does any of the -// following: -// 1. Integrates source code from Notepad++. -// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable -// installer, such as those produced by InstallShield. -// 3. Links to a library or executes a program that does any of the above. +// Copyright (C)2021 Don HO + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,12 +12,10 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . -#ifndef NOTEPAD_PLUS_MSGS_H -#define NOTEPAD_PLUS_MSGS_H +#pragma once #include #include @@ -43,18 +31,17 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\ L_IHEX, L_TEHEX, L_SWIFT,\ L_ASN1, L_AVS, L_BLITZBASIC, L_PUREBASIC, L_FREEBASIC, \ L_CSOUND, L_ERLANG, L_ESCRIPT, L_FORTH, L_LATEX, \ - L_MMIXAL, L_NIMROD, L_NNCRONTAB, L_OSCRIPT, L_REBOL, \ - L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG,\ + L_MMIXAL, L_NIM, L_NNCRONTAB, L_OSCRIPT, L_REBOL, \ + L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG, L_TYPESCRIPT,\ // Don't use L_JS, use L_JAVASCRIPT instead // The end of enumated language type, so it should be always at the end L_EXTERNAL}; enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8, WV_WIN81, WV_WIN10}; -enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; +enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 }; -//Here you can find how to use these messages : http://docs.notepad-plus-plus.org/index.php/Messages_And_Notifications #define NPPMSG (WM_USER + 1000) #define NPPM_GETCURRENTSCINTILLA (NPPMSG + 4) @@ -158,8 +145,10 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; #define NPPM_SETMENUITEMCHECK (NPPMSG + 40) //void WM_PIMENU_CHECK(UINT funcItem[X]._cmdID, TRUE/FALSE) - #define NPPM_ADDTOOLBARICON (NPPMSG + 41) - //void WM_ADDTOOLBARICON(UINT funcItem[X]._cmdID, toolbarIcons icon) + #define NPPM_ADDTOOLBARICON_DEPRECATED (NPPMSG + 41) + //void NPPM_ADDTOOLBARICON(UINT funcItem[X]._cmdID, toolbarIcons iconHandles) -- DEPRECATED : use NPPM_ADDTOOLBARICON_FORDARKMODE instead + //2 formats of icon are needed: .ico & .bmp + //Both handles below should be set so the icon will be displayed correctly if toolbar icon sets are changed by users struct toolbarIcons { HBITMAP hToolbarBmp; HICON hToolbarIcon; @@ -255,7 +244,6 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; // wParam: Buffer to reload // lParam: 0 if no alert, else alert - #define NPPM_GETBUFFERLANGTYPE (NPPMSG + 64) // INT NPPM_GETBUFFERLANGTYPE(UINT_PTR bufferID, 0) // wParam: BufferID to get LangType from @@ -358,7 +346,8 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; #define NPPM_ALLOCATEMARKER (NPPMSG + 82) // BOOL NPPM_ALLOCATEMARKER(int numberRequested, int* startNumber) // sets startNumber to the initial command ID if successful - // Allocates a marker number to a plugin + // Allocates a marker number to a plugin: if a plugin need to add a marker on Notepad++'s Scintilla marker margin, + // it has to use this message to get marker number, in order to prevent from the conflict with the other plugins. // Returns: TRUE if successful, FALSE otherwise. startNumber will also be set to 0 if unsuccessful #define NPPM_GETLANGUAGENAME (NPPMSG + 83) @@ -377,14 +366,14 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; // You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGEDESC function the 2nd time // by passing allocated buffer as argument langDesc - #define NPPM_SHOWDOCSWITCHER (NPPMSG + 85) - // VOID NPPM_ISDOCSWITCHERSHOWN(0, BOOL toShowOrNot) - // Send this message to show or hide doc switcher. - // if toShowOrNot is TRUE then show doc switcher, otherwise hide it. + #define NPPM_SHOWDOCLIST (NPPMSG + 85) + // VOID NPPM_SHOWDOCLIST(0, BOOL toShowOrNot) + // Send this message to show or hide Document List. + // if toShowOrNot is TRUE then show Document List, otherwise hide it. - #define NPPM_ISDOCSWITCHERSHOWN (NPPMSG + 86) - // BOOL NPPM_ISDOCSWITCHERSHOWN(0, 0) - // Check to see if doc switcher is shown. + #define NPPM_ISDOCLISTSHOWN (NPPMSG + 86) + // BOOL NPPM_ISDOCLISTSHOWN(0, 0) + // Check to see if Document List is shown. #define NPPM_GETAPPDATAPLUGINSALLOWED (NPPMSG + 87) // BOOL NPPM_GETAPPDATAPLUGINSALLOWED(0, 0) @@ -394,9 +383,13 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; // INT NPPM_GETCURRENTVIEW(0, 0) // Return: current edit view of Notepad++. Only 2 possible values: 0 = Main, 1 = Secondary - #define NPPM_DOCSWITCHERDISABLECOLUMN (NPPMSG + 89) - // VOID NPPM_DOCSWITCHERDISABLECOLUMN(0, BOOL disableOrNot) - // Disable or enable extension column of doc switcher + #define NPPM_DOCLISTDISABLEEXTCOLUMN (NPPMSG + 89) + // VOID NPPM_DOCLISTDISABLEEXTCOLUMN(0, BOOL disableOrNot) + // Disable or enable extension column of Document List + + #define NPPM_DOCLISTDISABLEPATHCOLUMN (NPPMSG + 102) + // VOID NPPM_DOCLISTDISABLEPATHCOLUMN(0, BOOL disableOrNot) + // Disable or enable path column of Document List #define NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR (NPPMSG + 90) // INT NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR(0, 0) @@ -431,6 +424,49 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; // Users should call it with pluginRootPath be NULL to get the required number of TCHAR (not including the terminating nul character), // allocate pluginRootPath buffer with the return value + 1, then call it again to get the path. + #define NPPM_GETSETTINGSONCLOUDPATH (NPPMSG + 98) + // INT NPPM_GETSETTINGSCLOUDPATH(size_t strLen, TCHAR *settingsOnCloudPath) + // Get settings on cloud path. It's useful if plugins want to store its settings on Cloud, if this path is set. + // Returns the number of TCHAR copied/to copy. If the return value is 0, then this path is not set, or the "strLen" is not enough to copy the path. + // Users should call it with settingsCloudPath be NULL to get the required number of TCHAR (not including the terminating nul character), + // allocate settingsCloudPath buffer with the return value + 1, then call it again to get the path. + + #define NPPM_SETLINENUMBERWIDTHMODE (NPPMSG + 99) + #define LINENUMWIDTH_DYNAMIC 0 + #define LINENUMWIDTH_CONSTANT 1 + // BOOL NPPM_SETLINENUMBERWIDTHMODE(0, INT widthMode) + // Set line number margin width in dynamic width mode (LINENUMWIDTH_DYNAMIC) or constant width mode (LINENUMWIDTH_CONSTANT) + // It may help some plugins to disable non-dynamic line number margins width to have a smoothly visual effect while vertical scrolling the content in Notepad++ + // If calling is successful return TRUE, otherwise return FALSE. + + #define NPPM_GETLINENUMBERWIDTHMODE (NPPMSG + 100) + // INT NPPM_GETLINENUMBERWIDTHMODE(0, 0) + // Get line number margin width in dynamic width mode (LINENUMWIDTH_DYNAMIC) or constant width mode (LINENUMWIDTH_CONSTANT) + + #define NPPM_ADDTOOLBARICON_FORDARKMODE (NPPMSG + 101) + // VOID NPPM_ADDTOOLBARICON_FORDARKMODE(UINT funcItem[X]._cmdID, toolbarIconsWithDarkMode iconHandles) + // Use NPPM_ADDTOOLBARICON_FORDARKMODE instead obsolete NPPM_ADDTOOLBARICON which doesn't support the dark mode + // 2 formats / 3 icons are needed: 1 * BMP + 2 * ICO + // All 3 handles below should be set so the icon will be displayed correctly if toolbar icon sets are changed by users, also in dark mode + struct toolbarIconsWithDarkMode { + HBITMAP hToolbarBmp; + HICON hToolbarIcon; + HICON hToolbarIconDarkMode; + }; + +#define VAR_NOT_RECOGNIZED 0 +#define FULL_CURRENT_PATH 1 +#define CURRENT_DIRECTORY 2 +#define FILE_NAME 3 +#define NAME_PART 4 +#define EXT_PART 5 +#define CURRENT_WORD 6 +#define NPP_DIRECTORY 7 +#define CURRENT_LINE 8 +#define CURRENT_COLUMN 9 +#define NPP_FULL_FILE_PATH 10 +#define GETFILENAMEATCURSOR 11 + #define RUNCOMMAND_USER (WM_USER + 3000) #define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH) #define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY) @@ -455,18 +491,6 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; #define NPPM_GETNPPFULLFILEPATH (RUNCOMMAND_USER + NPP_FULL_FILE_PATH) - #define VAR_NOT_RECOGNIZED 0 - #define FULL_CURRENT_PATH 1 - #define CURRENT_DIRECTORY 2 - #define FILE_NAME 3 - #define NAME_PART 4 - #define EXT_PART 5 - #define CURRENT_WORD 6 - #define NPP_DIRECTORY 7 - #define CURRENT_LINE 8 - #define CURRENT_COLUMN 9 - #define NPP_FULL_FILE_PATH 10 - #define GETFILENAMEATCURSOR 11 // Notification code @@ -477,7 +501,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; //scnNotification->nmhdr.idFrom = 0; #define NPPN_TBMODIFICATION (NPPN_FIRST + 2) // To notify plugins that toolbar icons can be registered - //scnNotification->nmhdr.code = NPPN_TB_MODIFICATION; + //scnNotification->nmhdr.code = NPPN_TBMODIFICATION; //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = 0; @@ -612,5 +636,3 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; //scnNotification->nmhdr.code = NPPN_FILEDELETED; //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = BufferID; - -#endif //NOTEPAD_PLUS_MSGS_H diff --git a/src/PluginInterface.h b/src/NppAPI/PluginInterface.h similarity index 54% rename from src/PluginInterface.h rename to src/NppAPI/PluginInterface.h index bcf1df6..4cc7261 100644 --- a/src/PluginInterface.h +++ b/src/NppAPI/PluginInterface.h @@ -1,20 +1,10 @@ // This file is part of Notepad++ project -// Copyright (C)2003 Don HO -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// Note that the GPL places important restrictions on "derived works", yet -// it does not provide a detailed definition of that term. To avoid -// misunderstandings, we consider an application to constitute a -// "derivative work" for the purpose of this license if it does any of the -// following: -// 1. Integrates source code from Notepad++. -// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable -// installer, such as those produced by InstallShield. -// 3. Links to a library or executes a program that does any of the above. +// Copyright (C)2021 Don HO + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,20 +12,13 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . -#ifndef PLUGININTERFACE_H -#define PLUGININTERFACE_H +#pragma once -#ifndef SCINTILLA_H #include "Scintilla.h" -#endif //SCINTILLA_H - -#ifndef NOTEPAD_PLUS_MSGS_H #include "Notepad_plus_msgs.h" -#endif //NOTEPAD_PLUS_MSGS_H const int nbChar = 64; @@ -43,9 +26,9 @@ typedef const TCHAR * (__cdecl * PFUNCGETNAME)(); struct NppData { - HWND _nppHandle; - HWND _scintillaMainHandle; - HWND _scintillaSecondHandle; + HWND _nppHandle = nullptr; + HWND _scintillaMainHandle = nullptr; + HWND _scintillaSecondHandle = nullptr; }; typedef void (__cdecl * PFUNCSETINFO)(NppData); @@ -56,10 +39,10 @@ typedef LRESULT (__cdecl * PMESSAGEPROC)(UINT Message, WPARAM wParam, LPARAM lPa struct ShortcutKey { - bool _isCtrl; - bool _isAlt; - bool _isShift; - UCHAR _key; + bool _isCtrl = false; + bool _isAlt = false; + bool _isShift = false; + UCHAR _key = 0; }; struct FuncItem @@ -74,11 +57,11 @@ struct FuncItem _itemName[0] = 0; } - TCHAR _itemName[nbChar]; - PFUNCPLUGINCMD _pFunc; - int _cmdID; - bool _init2Check; - ShortcutKey *_pShKey; + TCHAR _itemName[nbChar] = { '\0' }; + PFUNCPLUGINCMD _pFunc = nullptr; + int _cmdID = 0; + bool _init2Check = false; + ShortcutKey *_pShKey = nullptr; }; typedef FuncItem * (__cdecl * PFUNCGETFUNCSARRAY)(int *); @@ -93,5 +76,3 @@ extern "C" __declspec(dllexport) LRESULT messageProc(UINT Message, WPARAM wParam // This API return always true now, since Notepad++ isn't compiled in ANSI mode anymore extern "C" __declspec(dllexport) BOOL isUnicode(); - -#endif //PLUGININTERFACE_H diff --git a/src/Sci_Position.h b/src/NppAPI/Sci_Position.h similarity index 89% rename from src/Sci_Position.h rename to src/NppAPI/Sci_Position.h index a0596b4..69a8c45 100644 --- a/src/Sci_Position.h +++ b/src/NppAPI/Sci_Position.h @@ -15,10 +15,12 @@ typedef ptrdiff_t Sci_Position; // Unsigned variant used for ILexer::Lex and ILexer::Fold +// Definitions of common types typedef size_t Sci_PositionU; + // For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE -typedef long Sci_PositionCR; +typedef intptr_t Sci_PositionCR; #ifdef _WIN32 #define SCI_METHOD __stdcall diff --git a/src/Scintilla.h b/src/NppAPI/Scintilla.h similarity index 92% rename from src/Scintilla.h rename to src/NppAPI/Scintilla.h index f2fa87e..201d49e 100644 --- a/src/Scintilla.h +++ b/src/NppAPI/Scintilla.h @@ -38,6 +38,8 @@ typedef intptr_t sptr_t; typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); +#ifndef SCI_DISABLE_AUTOGENERATED + /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ #define INVALID_POSITION -1 #define SCI_START 2000 @@ -63,6 +65,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_CANREDO 2016 #define SCI_MARKERLINEFROMHANDLE 2017 #define SCI_MARKERDELETEHANDLE 2018 +#define SCI_MARKERHANDLEFROMLINE 2732 +#define SCI_MARKERNUMBERFROMLINE 2733 #define SCI_GETUNDOCOLLECTION 2019 #define SCWS_INVISIBLE 0 #define SCWS_VISIBLEALWAYS 1 @@ -93,6 +97,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETBUFFEREDDRAW 2035 #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 +#define SCI_SETTABMINIMUMWIDTH 2724 +#define SCI_GETTABMINIMUMWIDTH 2725 #define SCI_CLEARTABSTOPS 2675 #define SCI_ADDTABSTOP 2676 #define SCI_GETNEXTTABSTOP 2677 @@ -102,6 +108,13 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_IME_INLINE 1 #define SCI_GETIMEINTERACTION 2678 #define SCI_SETIMEINTERACTION 2679 +#define SC_ALPHA_TRANSPARENT 0 +#define SC_ALPHA_OPAQUE 255 +#define SC_ALPHA_NOALPHA 256 +#define SC_CURSORNORMAL -1 +#define SC_CURSORARROW 2 +#define SC_CURSORWAIT 4 +#define SC_CURSORREVERSEARROW 7 #define MARKER_MAX 31 #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 @@ -135,6 +148,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_MARK_UNDERLINE 29 #define SC_MARK_RGBAIMAGE 30 #define SC_MARK_BOOKMARK 31 +#define SC_MARK_VERTICALBOOKMARK 32 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 @@ -266,6 +280,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETCARETPERIOD 2076 #define SCI_SETWORDCHARS 2077 #define SCI_GETWORDCHARS 2646 +#define SCI_SETCHARACTERCATEGORYOPTIMIZATION 2720 +#define SCI_GETCHARACTERCATEGORYOPTIMIZATION 2721 #define SCI_BEGINUNDOACTION 2078 #define SCI_ENDUNDOACTION 2079 #define INDIC_PLAIN 0 @@ -290,14 +306,15 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define INDIC_POINTCHARACTER 19 #define INDIC_GRADIENT 20 #define INDIC_GRADIENTCENTRE 21 +#define INDIC_EXPLORERLINK 22 +#define INDIC_CONTAINER 8 #define INDIC_IME 32 #define INDIC_IME_MAX 35 #define INDIC_MAX 35 -#define INDIC_CONTAINER 8 -#define INDIC0_MASK 0x20 -#define INDIC1_MASK 0x40 -#define INDIC2_MASK 0x80 -#define INDICS_MASK 0xE0 +#define INDICATOR_CONTAINER 8 +#define INDICATOR_IME 32 +#define INDICATOR_IME_MAX 35 +#define INDICATOR_MAX 35 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 @@ -396,6 +413,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_PRINT_SCREENCOLOURS 5 #define SCI_SETPRINTCOLOURMODE 2148 #define SCI_GETPRINTCOLOURMODE 2149 +#define SCFIND_NONE 0x0 #define SCFIND_WHOLEWORD 0x2 #define SCFIND_MATCHCASE 0x4 #define SCFIND_WORDSTART 0x00100000 @@ -445,8 +463,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETCARETWIDTH 2189 #define SCI_SETTARGETSTART 2190 #define SCI_GETTARGETSTART 2191 +#define SCI_SETTARGETSTARTVIRTUALSPACE 2728 +#define SCI_GETTARGETSTARTVIRTUALSPACE 2729 #define SCI_SETTARGETEND 2192 #define SCI_GETTARGETEND 2193 +#define SCI_SETTARGETENDVIRTUALSPACE 2730 +#define SCI_GETTARGETENDVIRTUALSPACE 2731 #define SCI_SETTARGETRANGE 2686 #define SCI_GETTARGETTEXT 2687 #define SCI_TARGETFROMSELECTION 2287 @@ -490,6 +512,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_FOLDDISPLAYTEXT_STANDARD 1 #define SC_FOLDDISPLAYTEXT_BOXED 2 #define SCI_FOLDDISPLAYTEXTSETSTYLE 2701 +#define SCI_FOLDDISPLAYTEXTGETSTYLE 2707 +#define SCI_SETDEFAULTFOLDDISPLAYTEXT 2722 +#define SCI_GETDEFAULTFOLDDISPLAYTEXT 2723 #define SC_FOLDACTION_CONTRACT 0 #define SC_FOLDACTION_EXPAND 1 #define SC_FOLDACTION_TOGGLE 2 @@ -661,6 +686,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_BRACEBADLIGHT 2352 #define SCI_BRACEBADLIGHTINDICATOR 2499 #define SCI_BRACEMATCH 2353 +#define SCI_BRACEMATCHNEXT 2369 #define SCI_GETVIEWEOL 2355 #define SCI_SETVIEWEOL 2356 #define SCI_GETDOCPOINTER 2357 @@ -678,6 +704,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETEDGECOLOUR 2365 #define SCI_MULTIEDGEADDLINE 2694 #define SCI_MULTIEDGECLEARALL 2695 +#define SCI_GETMULTIEDGECOLUMN 2749 #define SCI_SEARCHANCHOR 2366 #define SCI_SEARCHNEXT 2367 #define SCI_SEARCHPREV 2368 @@ -712,10 +739,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETMOUSEDOWNCAPTURES 2385 #define SCI_SETMOUSEWHEELCAPTURES 2696 #define SCI_GETMOUSEWHEELCAPTURES 2697 -#define SC_CURSORNORMAL -1 -#define SC_CURSORARROW 2 -#define SC_CURSORWAIT 4 -#define SC_CURSORREVERSEARROW 7 #define SCI_SETCURSOR 2386 #define SCI_GETCURSOR 2387 #define SCI_SETCONTROLCHARSYMBOL 2388 @@ -810,25 +833,24 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETLENGTHFORENCODE 2448 #define SCI_ENCODEDFROMUTF8 2449 #define SCI_FINDCOLUMN 2456 -#define SCI_GETCARETSTICKY 2457 -#define SCI_SETCARETSTICKY 2458 #define SC_CARETSTICKY_OFF 0 #define SC_CARETSTICKY_ON 1 #define SC_CARETSTICKY_WHITESPACE 2 +#define SCI_GETCARETSTICKY 2457 +#define SCI_SETCARETSTICKY 2458 #define SCI_TOGGLECARETSTICKY 2459 #define SCI_SETPASTECONVERTENDINGS 2467 #define SCI_GETPASTECONVERTENDINGS 2468 #define SCI_SELECTIONDUPLICATE 2469 -#define SC_ALPHA_TRANSPARENT 0 -#define SC_ALPHA_OPAQUE 255 -#define SC_ALPHA_NOALPHA 256 #define SCI_SETCARETLINEBACKALPHA 2470 #define SCI_GETCARETLINEBACKALPHA 2471 #define CARETSTYLE_INVISIBLE 0 #define CARETSTYLE_LINE 1 #define CARETSTYLE_BLOCK 2 #define CARETSTYLE_OVERSTRIKE_BAR 0 -#define CARETSTYLE_OVERSTRIKE_BLOCK 16 +#define CARETSTYLE_OVERSTRIKE_BLOCK 0x10 +#define CARETSTYLE_INS_MASK 0xF +#define CARETSTYLE_BLOCK_AFTER 0x100 #define SCI_SETCARETSTYLE 2512 #define SCI_GETCARETSTYLE 2513 #define SCI_SETINDICATORCURRENT 2500 @@ -887,6 +909,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_ANNOTATIONGETSTYLEOFFSET 2551 #define SCI_RELEASEALLEXTENDEDSTYLES 2552 #define SCI_ALLOCATEEXTENDEDSTYLES 2553 +#define UNDO_NONE 0 #define UNDO_MAY_COALESCE 1 #define SCI_ADDUNDOACTION 2560 #define SCI_CHARPOSITIONFROMPOINT 2561 @@ -919,7 +942,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583 #define SCI_SETSELECTIONNSTART 2584 #define SCI_GETSELECTIONNSTART 2585 +#define SCI_GETSELECTIONNSTARTVIRTUALSPACE 2726 #define SCI_SETSELECTIONNEND 2586 +#define SCI_GETSELECTIONNENDVIRTUALSPACE 2727 #define SCI_GETSELECTIONNEND 2587 #define SCI_SETRECTANGULARSELECTIONCARET 2588 #define SCI_GETRECTANGULARSELECTIONCARET 2589 @@ -983,6 +1008,18 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETREPRESENTATION 2665 #define SCI_GETREPRESENTATION 2666 #define SCI_CLEARREPRESENTATION 2667 +#define SCI_EOLANNOTATIONSETTEXT 2740 +#define SCI_EOLANNOTATIONGETTEXT 2741 +#define SCI_EOLANNOTATIONSETSTYLE 2742 +#define SCI_EOLANNOTATIONGETSTYLE 2743 +#define SCI_EOLANNOTATIONCLEARALL 2744 +#define EOLANNOTATION_HIDDEN 0 +#define EOLANNOTATION_STANDARD 1 +#define EOLANNOTATION_BOXED 2 +#define SCI_EOLANNOTATIONSETVISIBLE 2745 +#define SCI_EOLANNOTATIONGETVISIBLE 2746 +#define SCI_EOLANNOTATIONSETSTYLEOFFSET 2747 +#define SCI_EOLANNOTATIONGETSTYLEOFFSET 2748 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 @@ -1020,6 +1057,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_NAMEOFSTYLE 4030 #define SCI_TAGSOFSTYLE 4031 #define SCI_DESCRIPTIONOFSTYLE 4032 +#define SCI_SETILEXER 4033 +#define SC_MOD_NONE 0x0 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 #define SC_MOD_CHANGESTYLE 0x4 @@ -1042,8 +1081,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_MOD_LEXERSTATE 0x80000 #define SC_MOD_INSERTCHECK 0x100000 #define SC_MOD_CHANGETABSTOPS 0x200000 -#define SC_MODEVENTMASKALL 0x3FFFFF -#define SC_SEARCHRESULT_LINEBUFFERMAXLENGTH 1024 +#define SC_MOD_CHANGEEOLANNOTATION 0x400000 +#define SC_MODEVENTMASKALL 0x7FFFFF +#define SC_SEARCHRESULT_LINEBUFFERMAXLENGTH 2048 #define SC_UPDATE_CONTENT 0x1 #define SC_UPDATE_SELECTION 0x2 #define SC_UPDATE_V_SCROLL 0x4 @@ -1082,6 +1122,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_AC_TAB 3 #define SC_AC_NEWLINE 4 #define SC_AC_COMMAND 5 +#define SC_CHARACTERSOURCE_DIRECT_INPUT 0 +#define SC_CHARACTERSOURCE_TENTATIVE_INPUT 1 +#define SC_CHARACTERSOURCE_IME_RESULT 2 #define SCN_STYLENEEDED 2000 #define SCN_CHARADDED 2001 #define SCN_SAVEPOINTREACHED 2002 @@ -1130,11 +1173,15 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_INDEXPOSITIONFROMLINE 2714 #endif +#define SCI_GETBOOSTREGEXERRMSG 5000 + #define SCN_SCROLLED 2080 #define SCN_FOLDINGSTATECHANGED 2081 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ +#endif + /* These structures are defined to be exactly the same shape as the Win32 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. * So older code that treats Scintilla as a RichEdit will work. */ @@ -1228,15 +1275,16 @@ struct SCNotification { int updated; /* SCN_UPDATEUI */ int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */ + int characterSource; /* SCN_CHARADDED */ }; struct SearchResultMarking { - long _start; - long _end; + intptr_t _start; + intptr_t _end; }; struct SearchResultMarkings { - long _length; + intptr_t _length; SearchResultMarking *_markings; }; @@ -1258,6 +1306,11 @@ struct SearchResultMarkings { #define SCI_GETSTYLEBITS 2091 #define SCI_GETSTYLEBITSNEEDED 4011 +#define INDIC0_MASK 0x20 +#define INDIC1_MASK 0x40 +#define INDIC2_MASK 0x80 +#define INDICS_MASK 0xE0 + #endif #endif diff --git a/src/dockingResource.h b/src/NppAPI/dockingResource.h similarity index 64% rename from src/dockingResource.h rename to src/NppAPI/dockingResource.h index cb0769d..4166492 100644 --- a/src/dockingResource.h +++ b/src/NppAPI/dockingResource.h @@ -1,20 +1,10 @@ -// this file is part of docking functionality for Notepad++ +// This file is part of Notepad++ project // Copyright (C)2006 Jens Lorenz -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// Note that the GPL places important restrictions on "derived works", yet -// it does not provide a detailed definition of that term. To avoid -// misunderstandings, we consider an application to constitute a -// "derivative work" for the purpose of this license if it does any of the -// following: -// 1. Integrates source code from Notepad++. -// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable -// installer, such as those produced by InstallShield. -// 3. Links to a library or executes a program that does any of the above. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,12 +12,10 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . -#ifndef DOCKING_RESOURCE_H -#define DOCKING_RESOURCE_H +#pragma once #define DM_NOFOCUSWHILECLICKINGCAPTION TEXT("NOFOCUSWHILECLICKINGCAPTION") @@ -77,5 +65,3 @@ //nmhdr.hwndFrom = DockingCont::_hself; //nmhdr.idFrom = 0; -#endif //DOCKING_RESOURCE_H - diff --git a/src/menuCmdID.h b/src/NppAPI/menuCmdID.h similarity index 79% rename from src/menuCmdID.h rename to src/NppAPI/menuCmdID.h index 7720cf1..46dee01 100644 --- a/src/menuCmdID.h +++ b/src/NppAPI/menuCmdID.h @@ -1,20 +1,10 @@ // This file is part of Notepad++ project -// Copyright (C)2003 Don HO -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// Note that the GPL places important restrictions on "derived works", yet -// it does not provide a detailed definition of that term. To avoid -// misunderstandings, we consider an application to constitute a -// "derivative work" for the purpose of this license if it does any of the -// following: -// 1. Integrates source code from Notepad++. -// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable -// installer, such as those produced by InstallShield. -// 3. Links to a library or executes a program that does any of the above. +// Copyright (C)2021 Don HO + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,12 +12,10 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . -#ifndef MENUCMDID_H -#define MENUCMDID_H +#pragma once #define IDM 40000 @@ -58,10 +46,11 @@ #define IDM_FILE_OPENFOLDERASWORSPACE (IDM_FILE + 22) #define IDM_FILE_OPEN_DEFAULT_VIEWER (IDM_FILE + 23) #define IDM_FILE_CLOSEALL_UNCHANGED (IDM_FILE + 24) + #define IDM_FILE_CONTAININGFOLDERASWORKSPACE (IDM_FILE + 25) // IMPORTANT: If list above is modified, you have to change the following values: // To be updated if new menu item(s) is (are) added in menu "File" - #define IDM_FILEMENU_LASTONE IDM_FILE_CLOSEALL_UNCHANGED + #define IDM_FILEMENU_LASTONE IDM_FILE_CONTAININGFOLDERASWORKSPACE // 0 based position of command "Exit" including the bars in the file menu // and without counting "Recent files history" items @@ -100,12 +89,9 @@ #define IDM_EDIT_PASTE (IDM_EDIT + 5) #define IDM_EDIT_DELETE (IDM_EDIT + 6) #define IDM_EDIT_SELECTALL (IDM_EDIT + 7) - #define IDM_EDIT_BEGINENDSELECT (IDM_EDIT + 20) - #define IDM_EDIT_INS_TAB (IDM_EDIT + 8) #define IDM_EDIT_RMV_TAB (IDM_EDIT + 9) #define IDM_EDIT_DUP_LINE (IDM_EDIT + 10) - #define IDM_EDIT_REMOVE_DUP_LINES (IDM_EDIT + 77) #define IDM_EDIT_TRANSPOSE_LINE (IDM_EDIT + 11) #define IDM_EDIT_SPLIT_LINES (IDM_EDIT + 12) #define IDM_EDIT_JOIN_LINES (IDM_EDIT + 13) @@ -113,63 +99,21 @@ #define IDM_EDIT_LINE_DOWN (IDM_EDIT + 15) #define IDM_EDIT_UPPERCASE (IDM_EDIT + 16) #define IDM_EDIT_LOWERCASE (IDM_EDIT + 17) - #define IDM_EDIT_PROPERCASE_FORCE (IDM_EDIT + 67) - #define IDM_EDIT_PROPERCASE_BLEND (IDM_EDIT + 68) - #define IDM_EDIT_SENTENCECASE_FORCE (IDM_EDIT + 69) - #define IDM_EDIT_SENTENCECASE_BLEND (IDM_EDIT + 70) - #define IDM_EDIT_INVERTCASE (IDM_EDIT + 71) - #define IDM_EDIT_RANDOMCASE (IDM_EDIT + 72) - #define IDM_EDIT_REMOVEEMPTYLINES (IDM_EDIT + 55) - #define IDM_EDIT_REMOVEEMPTYLINESWITHBLANK (IDM_EDIT + 56) - #define IDM_EDIT_BLANKLINEABOVECURRENT (IDM_EDIT + 57) - #define IDM_EDIT_BLANKLINEBELOWCURRENT (IDM_EDIT + 58) - #define IDM_EDIT_SORTLINES_LEXICOGRAPHIC_ASCENDING (IDM_EDIT + 59) - #define IDM_EDIT_SORTLINES_LEXICOGRAPHIC_DESCENDING (IDM_EDIT + 60) - #define IDM_EDIT_SORTLINES_INTEGER_ASCENDING (IDM_EDIT + 61) - #define IDM_EDIT_SORTLINES_INTEGER_DESCENDING (IDM_EDIT + 62) - #define IDM_EDIT_SORTLINES_DECIMALCOMMA_ASCENDING (IDM_EDIT + 63) - #define IDM_EDIT_SORTLINES_DECIMALCOMMA_DESCENDING (IDM_EDIT + 64) - #define IDM_EDIT_SORTLINES_DECIMALDOT_ASCENDING (IDM_EDIT + 65) - #define IDM_EDIT_SORTLINES_DECIMALDOT_DESCENDING (IDM_EDIT + 66) - - #define IDM_EDIT_OPENASFILE (IDM_EDIT + 73) - #define IDM_EDIT_OPENINFOLDER (IDM_EDIT + 74) - #define IDM_EDIT_SEARCHONINTERNET (IDM_EDIT + 75) - #define IDM_EDIT_CHANGESEARCHENGINE (IDM_EDIT + 76) - -// Menu macro #define IDM_MACRO_STARTRECORDINGMACRO (IDM_EDIT + 18) #define IDM_MACRO_STOPRECORDINGMACRO (IDM_EDIT + 19) + #define IDM_EDIT_BEGINENDSELECT (IDM_EDIT + 20) #define IDM_MACRO_PLAYBACKRECORDEDMACRO (IDM_EDIT + 21) -//----------- - #define IDM_EDIT_BLOCK_COMMENT (IDM_EDIT + 22) #define IDM_EDIT_STREAM_COMMENT (IDM_EDIT + 23) #define IDM_EDIT_TRIMTRAILING (IDM_EDIT + 24) - #define IDM_EDIT_TRIMLINEHEAD (IDM_EDIT + 42) - #define IDM_EDIT_TRIM_BOTH (IDM_EDIT + 43) - #define IDM_EDIT_EOL2WS (IDM_EDIT + 44) - #define IDM_EDIT_TRIMALL (IDM_EDIT + 45) - #define IDM_EDIT_TAB2SW (IDM_EDIT + 46) - #define IDM_EDIT_SW2TAB_LEADING (IDM_EDIT + 53) - #define IDM_EDIT_SW2TAB_ALL (IDM_EDIT + 54) - #define IDM_EDIT_STREAM_UNCOMMENT (IDM_EDIT + 47) - -// Menu macro #define IDM_MACRO_SAVECURRENTMACRO (IDM_EDIT + 25) -//----------- - #define IDM_EDIT_RTL (IDM_EDIT + 26) #define IDM_EDIT_LTR (IDM_EDIT + 27) #define IDM_EDIT_SETREADONLY (IDM_EDIT + 28) #define IDM_EDIT_FULLPATHTOCLIP (IDM_EDIT + 29) #define IDM_EDIT_FILENAMETOCLIP (IDM_EDIT + 30) #define IDM_EDIT_CURRENTDIRTOCLIP (IDM_EDIT + 31) - -// Menu macro #define IDM_MACRO_RUNMULTIMACRODLG (IDM_EDIT + 32) -//----------- - #define IDM_EDIT_CLEARREADONLY (IDM_EDIT + 33) #define IDM_EDIT_COLUMNMODE (IDM_EDIT + 34) #define IDM_EDIT_BLOCK_COMMENT_SET (IDM_EDIT + 35) @@ -177,20 +121,61 @@ #define IDM_EDIT_COLUMNMODETIP (IDM_EDIT + 37) #define IDM_EDIT_PASTE_AS_HTML (IDM_EDIT + 38) #define IDM_EDIT_PASTE_AS_RTF (IDM_EDIT + 39) + #define IDM_OPEN_ALL_RECENT_FILE (IDM_EDIT + 40) + #define IDM_CLEAN_RECENT_FILE_LIST (IDM_EDIT + 41) + #define IDM_EDIT_TRIMLINEHEAD (IDM_EDIT + 42) + #define IDM_EDIT_TRIM_BOTH (IDM_EDIT + 43) + #define IDM_EDIT_EOL2WS (IDM_EDIT + 44) + #define IDM_EDIT_TRIMALL (IDM_EDIT + 45) + #define IDM_EDIT_TAB2SW (IDM_EDIT + 46) + #define IDM_EDIT_STREAM_UNCOMMENT (IDM_EDIT + 47) #define IDM_EDIT_COPY_BINARY (IDM_EDIT + 48) #define IDM_EDIT_CUT_BINARY (IDM_EDIT + 49) #define IDM_EDIT_PASTE_BINARY (IDM_EDIT + 50) #define IDM_EDIT_CHAR_PANEL (IDM_EDIT + 51) #define IDM_EDIT_CLIPBOARDHISTORY_PANEL (IDM_EDIT + 52) + #define IDM_EDIT_SW2TAB_LEADING (IDM_EDIT + 53) + #define IDM_EDIT_SW2TAB_ALL (IDM_EDIT + 54) + #define IDM_EDIT_REMOVEEMPTYLINES (IDM_EDIT + 55) + #define IDM_EDIT_REMOVEEMPTYLINESWITHBLANK (IDM_EDIT + 56) + #define IDM_EDIT_BLANKLINEABOVECURRENT (IDM_EDIT + 57) + #define IDM_EDIT_BLANKLINEBELOWCURRENT (IDM_EDIT + 58) + #define IDM_EDIT_SORTLINES_LEXICOGRAPHIC_ASCENDING (IDM_EDIT + 59) + #define IDM_EDIT_SORTLINES_LEXICOGRAPHIC_DESCENDING (IDM_EDIT + 60) + #define IDM_EDIT_SORTLINES_INTEGER_ASCENDING (IDM_EDIT + 61) + #define IDM_EDIT_SORTLINES_INTEGER_DESCENDING (IDM_EDIT + 62) + #define IDM_EDIT_SORTLINES_DECIMALCOMMA_ASCENDING (IDM_EDIT + 63) + #define IDM_EDIT_SORTLINES_DECIMALCOMMA_DESCENDING (IDM_EDIT + 64) + #define IDM_EDIT_SORTLINES_DECIMALDOT_ASCENDING (IDM_EDIT + 65) + #define IDM_EDIT_SORTLINES_DECIMALDOT_DESCENDING (IDM_EDIT + 66) + #define IDM_EDIT_PROPERCASE_FORCE (IDM_EDIT + 67) + #define IDM_EDIT_PROPERCASE_BLEND (IDM_EDIT + 68) + #define IDM_EDIT_SENTENCECASE_FORCE (IDM_EDIT + 69) + #define IDM_EDIT_SENTENCECASE_BLEND (IDM_EDIT + 70) + #define IDM_EDIT_INVERTCASE (IDM_EDIT + 71) + #define IDM_EDIT_RANDOMCASE (IDM_EDIT + 72) + #define IDM_EDIT_OPENASFILE (IDM_EDIT + 73) + #define IDM_EDIT_OPENINFOLDER (IDM_EDIT + 74) + #define IDM_EDIT_SEARCHONINTERNET (IDM_EDIT + 75) + #define IDM_EDIT_CHANGESEARCHENGINE (IDM_EDIT + 76) + #define IDM_EDIT_REMOVE_CONSECUTIVE_DUP_LINES (IDM_EDIT + 77) + #define IDM_EDIT_SORTLINES_RANDOMLY (IDM_EDIT + 78) + #define IDM_EDIT_REMOVE_ANY_DUP_LINES (IDM_EDIT + 79) + #define IDM_EDIT_SORTLINES_LEXICO_CASE_INSENS_ASCENDING (IDM_EDIT + 80) + #define IDM_EDIT_SORTLINES_LEXICO_CASE_INSENS_DESCENDING (IDM_EDIT + 81) + #define IDM_EDIT_COPY_LINK (IDM_EDIT + 82) + #define IDM_EDIT_SORTLINES_REVERSE_ORDER (IDM_EDIT + 83) + #define IDM_EDIT_INSERT_DATETIME_SHORT (IDM_EDIT + 84) + #define IDM_EDIT_INSERT_DATETIME_LONG (IDM_EDIT + 85) + #define IDM_EDIT_INSERT_DATETIME_CUSTOMIZED (IDM_EDIT + 86) + #define IDM_EDIT_COPY_ALL_NAMES (IDM_EDIT + 87) + #define IDM_EDIT_COPY_ALL_PATHS (IDM_EDIT + 88) #define IDM_EDIT_AUTOCOMPLETE (50000 + 0) #define IDM_EDIT_AUTOCOMPLETE_CURRENTFILE (50000 + 1) #define IDM_EDIT_FUNCCALLTIP (50000 + 2) #define IDM_EDIT_AUTOCOMPLETE_PATH (50000 + 6) - //Belong to MENU FILE - #define IDM_OPEN_ALL_RECENT_FILE (IDM_EDIT + 40) - #define IDM_CLEAN_RECENT_FILE_LIST (IDM_EDIT + 41) #define IDM_SEARCH (IDM + 3000) #define IDM_SEARCH_FIND (IDM_SEARCH + 1) @@ -249,9 +234,25 @@ #define IDM_SEARCH_SELECTMATCHINGBRACES (IDM_SEARCH + 53) #define IDM_SEARCH_MARK (IDM_SEARCH + 54) + #define IDM_SEARCH_STYLE1TOCLIP (IDM_SEARCH + 55) + #define IDM_SEARCH_STYLE2TOCLIP (IDM_SEARCH + 56) + #define IDM_SEARCH_STYLE3TOCLIP (IDM_SEARCH + 57) + #define IDM_SEARCH_STYLE4TOCLIP (IDM_SEARCH + 58) + #define IDM_SEARCH_STYLE5TOCLIP (IDM_SEARCH + 59) + #define IDM_SEARCH_ALLSTYLESTOCLIP (IDM_SEARCH + 60) + #define IDM_SEARCH_MARKEDTOCLIP (IDM_SEARCH + 61) + + #define IDM_SEARCH_MARKONEEXT1 (IDM_SEARCH + 62) + #define IDM_SEARCH_MARKONEEXT2 (IDM_SEARCH + 63) + #define IDM_SEARCH_MARKONEEXT3 (IDM_SEARCH + 64) + #define IDM_SEARCH_MARKONEEXT4 (IDM_SEARCH + 65) + #define IDM_SEARCH_MARKONEEXT5 (IDM_SEARCH + 66) + #define IDM_MISC (IDM + 3500) - #define IDM_FILESWITCHER_FILESCLOSE (IDM_MISC + 1) - #define IDM_FILESWITCHER_FILESCLOSEOTHERS (IDM_MISC + 2) + #define IDM_DOCLIST_FILESCLOSE (IDM_MISC + 1) + #define IDM_DOCLIST_FILESCLOSEOTHERS (IDM_MISC + 2) + #define IDM_DOCLIST_COPYNAMES (IDM_MISC + 3) + #define IDM_DOCLIST_COPYPATHS (IDM_MISC + 4) #define IDM_VIEW (IDM + 4000) @@ -265,7 +266,7 @@ #define IDM_VIEW_DRAWTABBAR_INACIVETAB (IDM_VIEW + 8) #define IDM_VIEW_POSTIT (IDM_VIEW + 9) #define IDM_VIEW_TOGGLE_FOLDALL (IDM_VIEW + 10) - //#define IDM_VIEW_USER_DLG (IDM_VIEW + 11) + #define IDM_VIEW_DISTRACTIONFREE (IDM_VIEW + 11) #define IDM_VIEW_LINENUMBER (IDM_VIEW + 12) #define IDM_VIEW_SYMBOLMARGIN (IDM_VIEW + 13) #define IDM_VIEW_FOLDERMAGIN (IDM_VIEW + 14) @@ -281,8 +282,8 @@ #define IDM_VIEW_ZOOMOUT (IDM_VIEW + 24) #define IDM_VIEW_TAB_SPACE (IDM_VIEW + 25) #define IDM_VIEW_EOL (IDM_VIEW + 26) - #define IDM_VIEW_EDGELINE (IDM_VIEW + 27) - #define IDM_VIEW_EDGEBACKGROUND (IDM_VIEW + 28) + #define IDM_VIEW_TOOLBAR_REDUCE_SET2 (IDM_VIEW + 27) + #define IDM_VIEW_TOOLBAR_ENLARGE_SET2 (IDM_VIEW + 28) #define IDM_VIEW_TOGGLE_UNFOLDALL (IDM_VIEW + 29) #define IDM_VIEW_FOLD_CURRENT (IDM_VIEW + 30) #define IDM_VIEW_UNFOLD_CURRENT (IDM_VIEW + 31) @@ -291,7 +292,7 @@ #define IDM_VIEW_ALWAYSONTOP (IDM_VIEW + 34) #define IDM_VIEW_SYNSCROLLV (IDM_VIEW + 35) #define IDM_VIEW_SYNSCROLLH (IDM_VIEW + 36) - #define IDM_VIEW_EDGENONE (IDM_VIEW + 37) + //#define IDM_VIEW_EDGENONE (IDM_VIEW + 37) #define IDM_VIEW_DRAWTABBAR_CLOSEBOTTUN (IDM_VIEW + 38) #define IDM_VIEW_DRAWTABBAR_DBCLK2CLOSE (IDM_VIEW + 39) #define IDM_VIEW_REFRESHTABAR (IDM_VIEW + 40) @@ -325,7 +326,7 @@ #define IDM_VIEW_UNFOLD_7 (IDM_VIEW_UNFOLD + 7) #define IDM_VIEW_UNFOLD_8 (IDM_VIEW_UNFOLD + 8) - #define IDM_VIEW_FILESWITCHER_PANEL (IDM_VIEW + 70) + #define IDM_VIEW_DOCLIST (IDM_VIEW + 70) #define IDM_VIEW_SWITCHTO_OTHER_VIEW (IDM_VIEW + 72) #define IDM_EXPORT_FUNC_LIST_AND_QUIT (IDM_VIEW + 73) @@ -357,6 +358,13 @@ #define IDM_VIEW_IN_EDGE (IDM_VIEW + 102) #define IDM_VIEW_IN_IE (IDM_VIEW + 103) + #define IDM_VIEW_SWITCHTO_PROJECT_PANEL_1 (IDM_VIEW + 104) + #define IDM_VIEW_SWITCHTO_PROJECT_PANEL_2 (IDM_VIEW + 105) + #define IDM_VIEW_SWITCHTO_PROJECT_PANEL_3 (IDM_VIEW + 106) + #define IDM_VIEW_SWITCHTO_FILEBROWSER (IDM_VIEW + 107) + #define IDM_VIEW_SWITCHTO_FUNC_LIST (IDM_VIEW + 108) + #define IDM_VIEW_SWITCHTO_DOCLIST (IDM_VIEW + 109) + #define IDM_VIEW_GOTO_ANOTHER_VIEW 10001 #define IDM_VIEW_CLONE_TO_ANOTHER_VIEW 10002 #define IDM_VIEW_GOTO_NEW_INSTANCE 10003 @@ -369,14 +377,14 @@ #define IDM_FORMAT_TOMAC (IDM_FORMAT + 3) #define IDM_FORMAT_ANSI (IDM_FORMAT + 4) #define IDM_FORMAT_UTF_8 (IDM_FORMAT + 5) - #define IDM_FORMAT_UCS_2BE (IDM_FORMAT + 6) - #define IDM_FORMAT_UCS_2LE (IDM_FORMAT + 7) + #define IDM_FORMAT_UTF_16BE (IDM_FORMAT + 6) + #define IDM_FORMAT_UTF_16LE (IDM_FORMAT + 7) #define IDM_FORMAT_AS_UTF_8 (IDM_FORMAT + 8) #define IDM_FORMAT_CONV2_ANSI (IDM_FORMAT + 9) #define IDM_FORMAT_CONV2_AS_UTF_8 (IDM_FORMAT + 10) #define IDM_FORMAT_CONV2_UTF_8 (IDM_FORMAT + 11) - #define IDM_FORMAT_CONV2_UCS_2BE (IDM_FORMAT + 12) - #define IDM_FORMAT_CONV2_UCS_2LE (IDM_FORMAT + 13) + #define IDM_FORMAT_CONV2_UTF_16BE (IDM_FORMAT + 12) + #define IDM_FORMAT_CONV2_UTF_16LE (IDM_FORMAT + 13) #define IDM_FORMAT_ENCODE (IDM_FORMAT + 20) #define IDM_FORMAT_WIN_1250 (IDM_FORMAT_ENCODE + 0) @@ -507,7 +515,7 @@ #define IDM_LANG_FORTH (IDM_LANG + 72) #define IDM_LANG_LATEX (IDM_LANG + 73) #define IDM_LANG_MMIXAL (IDM_LANG + 74) - #define IDM_LANG_NIMROD (IDM_LANG + 75) + #define IDM_LANG_NIM (IDM_LANG + 75) #define IDM_LANG_NNCRONTAB (IDM_LANG + 76) #define IDM_LANG_OSCRIPT (IDM_LANG + 77) #define IDM_LANG_REBOL (IDM_LANG + 78) @@ -516,6 +524,7 @@ #define IDM_LANG_SPICE (IDM_LANG + 81) #define IDM_LANG_TXT2TAGS (IDM_LANG + 82) #define IDM_LANG_VISUALPROLOG (IDM_LANG + 83) + #define IDM_LANG_TYPESCRIPT (IDM_LANG + 84) #define IDM_LANG_EXTERNAL (IDM_LANG + 165) #define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 179) @@ -523,22 +532,23 @@ #define IDM_LANG_USER (IDM_LANG + 180) //46180: Used for translation #define IDM_LANG_USER_LIMIT (IDM_LANG + 210) //46210: Ajust with IDM_LANG_USER #define IDM_LANG_USER_DLG (IDM_LANG + 250) //46250: Used for translation - + #define IDM_LANG_OPENUDLDIR (IDM_LANG + 300) + #define IDM_LANG_UDLCOLLECTION_PROJECT_SITE (IDM_LANG + 301) #define IDM_ABOUT (IDM + 7000) #define IDM_HOMESWEETHOME (IDM_ABOUT + 1) #define IDM_PROJECTPAGE (IDM_ABOUT + 2) - #define IDM_ONLINEHELP (IDM_ABOUT + 3) + #define IDM_ONLINEDOCUMENT (IDM_ABOUT + 3) #define IDM_FORUM (IDM_ABOUT + 4) //#define IDM_PLUGINSHOME (IDM_ABOUT + 5) #define IDM_UPDATE_NPP (IDM_ABOUT + 6) #define IDM_WIKIFAQ (IDM_ABOUT + 7) - #define IDM_HELP (IDM_ABOUT + 8) + //#define IDM_HELP (IDM_ABOUT + 8) #define IDM_CONFUPDATERPROXY (IDM_ABOUT + 9) #define IDM_CMDLINEARGUMENTS (IDM_ABOUT + 10) - #define IDM_ONLINESUPPORT (IDM_ABOUT + 11) + //#define IDM_ONLINESUPPORT (IDM_ABOUT + 11) #define IDM_DEBUGINFO (IDM_ABOUT + 12) @@ -575,5 +585,3 @@ #define IDM_SYSTRAYPOPUP_NEW_AND_PASTE (IDM_SYSTRAYPOPUP + 3) #define IDM_SYSTRAYPOPUP_OPENFILE (IDM_SYSTRAYPOPUP + 4) #define IDM_SYSTRAYPOPUP_CLOSE (IDM_SYSTRAYPOPUP + 5) - -#endif //MENUCMDID_H diff --git a/src/PluginInterface.cpp b/src/PluginInterface.cpp index e95adfb..b4031b7 100644 --- a/src/PluginInterface.cpp +++ b/src/PluginInterface.cpp @@ -18,9 +18,9 @@ #include #include -#include "PluginInterface.h" -#include "Notepad_plus_msgs.h" -#include "menuCmdID.h" +#include "NppAPI/PluginInterface.h" +#include "NppAPI/Notepad_plus_msgs.h" +#include "NppAPI/menuCmdID.h" #include "Common.h" #include "INpp.h" #include "ResultWin.h" diff --git a/src/ResultWin.cpp b/src/ResultWin.cpp index 2adf99e..3a2018d 100644 --- a/src/ResultWin.cpp +++ b/src/ResultWin.cpp @@ -38,7 +38,7 @@ #include #include "Common.h" #include "GTags.h" -#include "dockingResource.h" +#include "NppAPI/dockingResource.h" #include "StrUniquenessChecker.h" diff --git a/src/ResultWin.h b/src/ResultWin.h index ad82ef5..415fdf8 100644 --- a/src/ResultWin.h +++ b/src/ResultWin.h @@ -28,7 +28,7 @@ #include #include #include -#include "Scintilla.h" +#include "NppAPI/Scintilla.h" #include "Common.h" #include "Cmd.h" diff --git a/src/resource.h b/src/resource.h index b81e9f4..d8fcf0a 100644 --- a/src/resource.h +++ b/src/resource.h @@ -6,13 +6,13 @@ #define PLUGIN_NAME _T("NppGTags") -#define VER_VERSION 4,4,3,0 -#define VER_VERSION_STR _T("4.4.3\0") +#define VER_VERSION 4,5,0,0 +#define VER_VERSION_STR _T("4.5.0\0") #define VER_DESCRIPTION _T("GTags plugin for Notepad++\0") #define VER_AUTHOR _T("Pavel Nedev\0") -#define VER_COPYRIGHT _T("Copyright (C) 2014-2019 Pavel Nedev\0") +#define VER_COPYRIGHT _T("Copyright (C) 2014-2022 Pavel Nedev\0") #define VER_URL _T("https://github.com/pnedev/nppgtags\0") #define VER_USER_GUIDE _T("https://github.com/pnedev/nppgtags/blob/master/README.md\0")