From ac2efa07cf1b1a9f48b7d92c78732fd17590195f Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Sat, 1 Oct 2022 16:11:02 +0200 Subject: [PATCH] - update to N++ interfaces for 8.4.6 with scintilla 5.3.0 and lexilla 5.1.9 - still open issue: handling of colouralpha and related calls, currently just handled like colour, so alpha info is missing --- NppPlugin/include/Notepad_plus_msgs.h | 2 +- NppPlugin/include/NppDarkMode.h | 4 +- NppPlugin/include/Scintilla.h | 26 ++++++++++- NppPlugin/include/menuCmdID.h | 11 ++++- PythonScript/src/CreateWrapper.py | 1 + PythonScript/src/Enums.h | 28 +++++++++++- PythonScript/src/EnumsWrapper.cpp | 26 ++++++++++- PythonScript/src/HFacer.py | 39 +++++++--------- PythonScript/src/NotepadPlusWrapper.h | 7 ++- PythonScript/src/NotepadPython.cpp | 10 ++++- PythonScript/src/Scintilla.h | 26 ++++++++++- PythonScript/src/Scintilla.iface | 34 +++++++++++++- PythonScript/src/ScintillaPython.cpp | 3 ++ PythonScript/src/ScintillaWrapper.h | 12 +++++ .../src/ScintillaWrapperGenerated.cpp | 24 ++++++++++ PythonScript/src/Utf8.h | 15 +++---- docs/source/enums.rst | 44 +++++++++++++++++++ docs/source/scintilla.rst | 18 ++++++++ 18 files changed, 285 insertions(+), 45 deletions(-) diff --git a/NppPlugin/include/Notepad_plus_msgs.h b/NppPlugin/include/Notepad_plus_msgs.h index 16210c18..7cbbc92e 100644 --- a/NppPlugin/include/Notepad_plus_msgs.h +++ b/NppPlugin/include/Notepad_plus_msgs.h @@ -39,7 +39,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\ enum class ExternalLexerAutoIndentMode { Standard, C_Like, Custom }; enum class MacroStatus { Idle, RecordInProgress, RecordingStopped, PlayingBack }; -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 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, WV_WIN11 }; enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 }; diff --git a/NppPlugin/include/NppDarkMode.h b/NppPlugin/include/NppDarkMode.h index 4189ba5d..b95d09b7 100644 --- a/NppPlugin/include/NppDarkMode.h +++ b/NppPlugin/include/NppDarkMode.h @@ -16,7 +16,7 @@ #pragma once -#include +#include constexpr COLORREF HEXRGB(DWORD rrggbb) { // from 0xRRGGBB like natural #RRGGBB @@ -133,6 +133,8 @@ namespace NppDarkMode HPEN getHotEdgePen(); HPEN getDisabledEdgePen(); + COLORREF getIndividualTabColour(int colourIndex, bool themeDependant, bool saturated); + void setBackgroundColor(COLORREF c); void setSofterBackgroundColor(COLORREF c); void setHotBackgroundColor(COLORREF c); diff --git a/NppPlugin/include/Scintilla.h b/NppPlugin/include/Scintilla.h index f1520457..77c6995a 100644 --- a/NppPlugin/include/Scintilla.h +++ b/NppPlugin/include/Scintilla.h @@ -152,7 +152,12 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_MARK_RGBAIMAGE 30 #define SC_MARK_BOOKMARK 31 #define SC_MARK_VERTICALBOOKMARK 32 +#define SC_MARK_BAR 33 #define SC_MARK_CHARACTER 10000 +#define SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN 21 +#define SC_MARKNUM_HISTORY_SAVED 22 +#define SC_MARKNUM_HISTORY_MODIFIED 23 +#define SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED 24 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 #define SC_MARKNUM_FOLDERMIDTAIL 27 @@ -353,7 +358,8 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define INDIC_POINTCHARACTER 19 #define INDIC_GRADIENT 20 #define INDIC_GRADIENTCENTRE 21 -#define INDIC_EXPLORERLINK 22 +#define INDIC_POINT_TOP 22 +#define INDIC_EXPLORERLINK 23 #define INDIC_CONTAINER 8 #define INDIC_IME 32 #define INDIC_IME_MAX 35 @@ -361,7 +367,15 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define INDICATOR_CONTAINER 8 #define INDICATOR_IME 32 #define INDICATOR_IME_MAX 35 -#define INDICATOR_MAX 35 +#define INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION 36 +#define INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION 37 +#define INDICATOR_HISTORY_SAVED_INSERTION 38 +#define INDICATOR_HISTORY_SAVED_DELETION 39 +#define INDICATOR_HISTORY_MODIFIED_INSERTION 40 +#define INDICATOR_HISTORY_MODIFIED_DELETION 41 +#define INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION 42 +#define INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION 43 +#define INDICATOR_MAX 43 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 @@ -478,6 +492,12 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_FINDTEXTFULL 2196 #define SCI_FORMATRANGE 2151 #define SCI_FORMATRANGEFULL 2777 +#define SC_CHANGE_HISTORY_DISABLED 0 +#define SC_CHANGE_HISTORY_ENABLED 1 +#define SC_CHANGE_HISTORY_MARKERS 2 +#define SC_CHANGE_HISTORY_INDICATORS 4 +#define SCI_SETCHANGEHISTORY 2780 +#define SCI_GETCHANGEHISTORY 2781 #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 @@ -492,6 +512,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_GETTEXTRANGE 2162 #define SCI_GETTEXTRANGEFULL 2039 #define SCI_HIDESELECTION 2163 +#define SCI_GETSELECTIONHIDDEN 2088 #define SCI_POINTXFROMPOSITION 2164 #define SCI_POINTYFROMPOSITION 2165 #define SCI_LINEFROMPOSITION 2166 @@ -578,6 +599,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_FOLDACTION_CONTRACT 0 #define SC_FOLDACTION_EXPAND 1 #define SC_FOLDACTION_TOGGLE 2 +#define SC_FOLDACTION_CONTRACT_EVERY_LEVEL 4 #define SCI_FOLDLINE 2237 #define SCI_FOLDCHILDREN 2238 #define SCI_EXPANDCHILDREN 2239 diff --git a/NppPlugin/include/menuCmdID.h b/NppPlugin/include/menuCmdID.h index e3fc5104..a7c44560 100644 --- a/NppPlugin/include/menuCmdID.h +++ b/NppPlugin/include/menuCmdID.h @@ -68,7 +68,7 @@ //10 Rename... //11 Close //12 Close All -//13 Close More +//13 Close Multiple Documents //14 Move to Recycle Bin //15 -------- //16 Load Session... @@ -302,7 +302,7 @@ #define IDM_VIEW_HIDELINES (IDM_VIEW + 42) #define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43) #define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44) - #define IDM_VIEW_DOCCHANGEMARGIN (IDM_VIEW + 45) + //#define IDM_VIEW_DOCCHANGEMARGIN (IDM_VIEW + 45) #define IDM_VIEW_LWDEF (IDM_VIEW + 46) #define IDM_VIEW_LWALIGN (IDM_VIEW + 47) #define IDM_VIEW_LWINDENT (IDM_VIEW + 48) @@ -367,6 +367,13 @@ #define IDM_VIEW_SWITCHTO_FUNC_LIST (IDM_VIEW + 108) #define IDM_VIEW_SWITCHTO_DOCLIST (IDM_VIEW + 109) + #define IDM_VIEW_TAB_COLOUR_NONE (IDM_VIEW + 110) + #define IDM_VIEW_TAB_COLOUR_1 (IDM_VIEW + 111) + #define IDM_VIEW_TAB_COLOUR_2 (IDM_VIEW + 112) + #define IDM_VIEW_TAB_COLOUR_3 (IDM_VIEW + 113) + #define IDM_VIEW_TAB_COLOUR_4 (IDM_VIEW + 114) + #define IDM_VIEW_TAB_COLOUR_5 (IDM_VIEW + 115) + #define IDM_VIEW_GOTO_ANOTHER_VIEW 10001 #define IDM_VIEW_CLONE_TO_ANOTHER_VIEW 10002 #define IDM_VIEW_GOTO_NEW_INSTANCE 10003 diff --git a/PythonScript/src/CreateWrapper.py b/PythonScript/src/CreateWrapper.py index 03624b61..01e82b91 100644 --- a/PythonScript/src/CreateWrapper.py +++ b/PythonScript/src/CreateWrapper.py @@ -106,6 +106,7 @@ 'RepresentationAppearance' : 'int', 'Supports' : 'int', 'Element' : 'int', + 'ChangeHistoryOption' : 'int', } castsL = { diff --git a/PythonScript/src/Enums.h b/PythonScript/src/Enums.h index 508be484..a3f746d6 100644 --- a/PythonScript/src/Enums.h +++ b/PythonScript/src/Enums.h @@ -286,11 +286,16 @@ enum MarkerSymbol PYSCR_SC_MARK_RGBAIMAGE = SC_MARK_RGBAIMAGE, PYSCR_SC_MARK_BOOKMARK = SC_MARK_BOOKMARK, PYSCR_SC_MARK_VERTICALBOOKMARK = SC_MARK_VERTICALBOOKMARK, + PYSCR_SC_MARK_BAR = SC_MARK_BAR, PYSCR_SC_MARK_CHARACTER = SC_MARK_CHARACTER }; enum MarkerOutline { + PYSCR_SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN = SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN, + PYSCR_SC_MARKNUM_HISTORY_SAVED = SC_MARKNUM_HISTORY_SAVED, + PYSCR_SC_MARKNUM_HISTORY_MODIFIED = SC_MARKNUM_HISTORY_MODIFIED, + PYSCR_SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED = SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED, PYSCR_SC_MARKNUM_FOLDEREND = SC_MARKNUM_FOLDEREND, PYSCR_SC_MARKNUM_FOLDEROPENMID = SC_MARKNUM_FOLDEROPENMID, PYSCR_SC_MARKNUM_FOLDERMIDTAIL = SC_MARKNUM_FOLDERMIDTAIL, @@ -422,6 +427,7 @@ enum IndicatorStyle PYSCR_INDIC_POINTCHARACTER = INDIC_POINTCHARACTER, PYSCR_INDIC_GRADIENT = INDIC_GRADIENT, PYSCR_INDIC_GRADIENTCENTRE = INDIC_GRADIENTCENTRE, + PYSCR_INDIC_POINT_TOP = INDIC_POINT_TOP, PYSCR_INDIC_CONTAINER = INDIC_CONTAINER, PYSCR_INDIC_IME = INDIC_IME, PYSCR_INDIC_IME_MAX = INDIC_IME_MAX, @@ -433,6 +439,14 @@ enum IndicatorNumbers PYSCR_INDICATOR_CONTAINER = INDICATOR_CONTAINER, PYSCR_INDICATOR_IME = INDICATOR_IME, PYSCR_INDICATOR_IME_MAX = INDICATOR_IME_MAX, + PYSCR_INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION = INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION, + PYSCR_INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION = INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION, + PYSCR_INDICATOR_HISTORY_SAVED_INSERTION = INDICATOR_HISTORY_SAVED_INSERTION, + PYSCR_INDICATOR_HISTORY_SAVED_DELETION = INDICATOR_HISTORY_SAVED_DELETION, + PYSCR_INDICATOR_HISTORY_MODIFIED_INSERTION = INDICATOR_HISTORY_MODIFIED_INSERTION, + PYSCR_INDICATOR_HISTORY_MODIFIED_DELETION = INDICATOR_HISTORY_MODIFIED_DELETION, + PYSCR_INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION = INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION, + PYSCR_INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION = INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION, PYSCR_INDICATOR_MAX = INDICATOR_MAX }; @@ -483,6 +497,14 @@ enum FindOption PYSCR_SCFIND_CXX11REGEX = SCFIND_CXX11REGEX }; +enum ChangeHistoryOption +{ + PYSCR_SC_CHANGE_HISTORY_DISABLED = SC_CHANGE_HISTORY_DISABLED, + PYSCR_SC_CHANGE_HISTORY_ENABLED = SC_CHANGE_HISTORY_ENABLED, + PYSCR_SC_CHANGE_HISTORY_MARKERS = SC_CHANGE_HISTORY_MARKERS, + PYSCR_SC_CHANGE_HISTORY_INDICATORS = SC_CHANGE_HISTORY_INDICATORS +}; + enum FoldLevel { PYSCR_SC_FOLDLEVELNONE = SC_FOLDLEVELNONE, @@ -503,7 +525,8 @@ enum FoldAction { PYSCR_SC_FOLDACTION_CONTRACT = SC_FOLDACTION_CONTRACT, PYSCR_SC_FOLDACTION_EXPAND = SC_FOLDACTION_EXPAND, - PYSCR_SC_FOLDACTION_TOGGLE = SC_FOLDACTION_TOGGLE + PYSCR_SC_FOLDACTION_TOGGLE = SC_FOLDACTION_TOGGLE, + PYSCR_SC_FOLDACTION_CONTRACT_EVERY_LEVEL = SC_FOLDACTION_CONTRACT_EVERY_LEVEL }; enum AutomaticFold @@ -1275,6 +1298,8 @@ enum ScintillaMessage PYSCR_SCI_FINDTEXTFULL = SCI_FINDTEXTFULL, PYSCR_SCI_FORMATRANGE = SCI_FORMATRANGE, PYSCR_SCI_FORMATRANGEFULL = SCI_FORMATRANGEFULL, + PYSCR_SCI_SETCHANGEHISTORY = SCI_SETCHANGEHISTORY, + PYSCR_SCI_GETCHANGEHISTORY = SCI_GETCHANGEHISTORY, PYSCR_SCI_GETFIRSTVISIBLELINE = SCI_GETFIRSTVISIBLELINE, PYSCR_SCI_GETLINE = SCI_GETLINE, PYSCR_SCI_GETLINECOUNT = SCI_GETLINECOUNT, @@ -1289,6 +1314,7 @@ enum ScintillaMessage PYSCR_SCI_GETTEXTRANGE = SCI_GETTEXTRANGE, PYSCR_SCI_GETTEXTRANGEFULL = SCI_GETTEXTRANGEFULL, PYSCR_SCI_HIDESELECTION = SCI_HIDESELECTION, + PYSCR_SCI_GETSELECTIONHIDDEN = SCI_GETSELECTIONHIDDEN, PYSCR_SCI_POINTXFROMPOSITION = SCI_POINTXFROMPOSITION, PYSCR_SCI_POINTYFROMPOSITION = SCI_POINTYFROMPOSITION, PYSCR_SCI_LINEFROMPOSITION = SCI_LINEFROMPOSITION, diff --git a/PythonScript/src/EnumsWrapper.cpp b/PythonScript/src/EnumsWrapper.cpp index e54b8479..f5b69d8e 100644 --- a/PythonScript/src/EnumsWrapper.cpp +++ b/PythonScript/src/EnumsWrapper.cpp @@ -269,9 +269,14 @@ void export_enums() .value("RGBAIMAGE", PYSCR_SC_MARK_RGBAIMAGE) .value("BOOKMARK", PYSCR_SC_MARK_BOOKMARK) .value("VERTICALBOOKMARK", PYSCR_SC_MARK_VERTICALBOOKMARK) + .value("BAR", PYSCR_SC_MARK_BAR) .value("CHARACTER", PYSCR_SC_MARK_CHARACTER); boost::python::enum_("MARKEROUTLINE") + .value("HISTORY_REVERTED_TO_ORIGIN", PYSCR_SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN) + .value("HISTORY_SAVED", PYSCR_SC_MARKNUM_HISTORY_SAVED) + .value("HISTORY_MODIFIED", PYSCR_SC_MARKNUM_HISTORY_MODIFIED) + .value("HISTORY_REVERTED_TO_MODIFIED", PYSCR_SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED) .value("FOLDEREND", PYSCR_SC_MARKNUM_FOLDEREND) .value("FOLDEROPENMID", PYSCR_SC_MARKNUM_FOLDEROPENMID) .value("FOLDERMIDTAIL", PYSCR_SC_MARKNUM_FOLDERMIDTAIL) @@ -387,6 +392,7 @@ void export_enums() .value("POINTCHARACTER", PYSCR_INDIC_POINTCHARACTER) .value("GRADIENT", PYSCR_INDIC_GRADIENT) .value("GRADIENTCENTRE", PYSCR_INDIC_GRADIENTCENTRE) + .value("POINT_TOP", PYSCR_INDIC_POINT_TOP) .value("CONTAINER", PYSCR_INDIC_CONTAINER) .value("IME", PYSCR_INDIC_IME) .value("IME_MAX", PYSCR_INDIC_IME_MAX) @@ -396,6 +402,14 @@ void export_enums() .value("CONTAINER", PYSCR_INDICATOR_CONTAINER) .value("IME", PYSCR_INDICATOR_IME) .value("IME_MAX", PYSCR_INDICATOR_IME_MAX) + .value("HISTORY_REVERTED_TO_ORIGIN_INSERTION", PYSCR_INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION) + .value("HISTORY_REVERTED_TO_ORIGIN_DELETION", PYSCR_INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION) + .value("HISTORY_SAVED_INSERTION", PYSCR_INDICATOR_HISTORY_SAVED_INSERTION) + .value("HISTORY_SAVED_DELETION", PYSCR_INDICATOR_HISTORY_SAVED_DELETION) + .value("HISTORY_MODIFIED_INSERTION", PYSCR_INDICATOR_HISTORY_MODIFIED_INSERTION) + .value("HISTORY_MODIFIED_DELETION", PYSCR_INDICATOR_HISTORY_MODIFIED_DELETION) + .value("HISTORY_REVERTED_TO_MODIFIED_INSERTION", PYSCR_INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION) + .value("HISTORY_REVERTED_TO_MODIFIED_DELETION", PYSCR_INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION) .value("MAX", PYSCR_INDICATOR_MAX); boost::python::enum_("INDICVALUE") @@ -433,6 +447,12 @@ void export_enums() .value("POSIX", PYSCR_SCFIND_POSIX) .value("CXX11REGEX", PYSCR_SCFIND_CXX11REGEX); + boost::python::enum_("CHANGEHISTORYOPTION") + .value("DISABLED", PYSCR_SC_CHANGE_HISTORY_DISABLED) + .value("ENABLED", PYSCR_SC_CHANGE_HISTORY_ENABLED) + .value("MARKERS", PYSCR_SC_CHANGE_HISTORY_MARKERS) + .value("INDICATORS", PYSCR_SC_CHANGE_HISTORY_INDICATORS); + boost::python::enum_("FOLDLEVEL") .value("NONE", PYSCR_SC_FOLDLEVELNONE) .value("BASE", PYSCR_SC_FOLDLEVELBASE) @@ -448,7 +468,8 @@ void export_enums() boost::python::enum_("FOLDACTION") .value("CONTRACT", PYSCR_SC_FOLDACTION_CONTRACT) .value("EXPAND", PYSCR_SC_FOLDACTION_EXPAND) - .value("TOGGLE", PYSCR_SC_FOLDACTION_TOGGLE); + .value("TOGGLE", PYSCR_SC_FOLDACTION_TOGGLE) + .value("CONTRACT_EVERY_LEVEL", PYSCR_SC_FOLDACTION_CONTRACT_EVERY_LEVEL); boost::python::enum_("AUTOMATICFOLD") .value("NONE", PYSCR_SC_AUTOMATICFOLD_NONE) @@ -1157,6 +1178,8 @@ void export_enums() .value("SCI_FINDTEXTFULL", PYSCR_SCI_FINDTEXTFULL) .value("SCI_FORMATRANGE", PYSCR_SCI_FORMATRANGE) .value("SCI_FORMATRANGEFULL", PYSCR_SCI_FORMATRANGEFULL) + .value("SCI_SETCHANGEHISTORY", PYSCR_SCI_SETCHANGEHISTORY) + .value("SCI_GETCHANGEHISTORY", PYSCR_SCI_GETCHANGEHISTORY) .value("SCI_GETFIRSTVISIBLELINE", PYSCR_SCI_GETFIRSTVISIBLELINE) .value("SCI_GETLINE", PYSCR_SCI_GETLINE) .value("SCI_GETLINECOUNT", PYSCR_SCI_GETLINECOUNT) @@ -1171,6 +1194,7 @@ void export_enums() .value("SCI_GETTEXTRANGE", PYSCR_SCI_GETTEXTRANGE) .value("SCI_GETTEXTRANGEFULL", PYSCR_SCI_GETTEXTRANGEFULL) .value("SCI_HIDESELECTION", PYSCR_SCI_HIDESELECTION) + .value("SCI_GETSELECTIONHIDDEN", PYSCR_SCI_GETSELECTIONHIDDEN) .value("SCI_POINTXFROMPOSITION", PYSCR_SCI_POINTXFROMPOSITION) .value("SCI_POINTYFROMPOSITION", PYSCR_SCI_POINTYFROMPOSITION) .value("SCI_LINEFROMPOSITION", PYSCR_SCI_LINEFROMPOSITION) diff --git a/PythonScript/src/HFacer.py b/PythonScript/src/HFacer.py index 0cb4b1f2..920fb46c 100644 --- a/PythonScript/src/HFacer.py +++ b/PythonScript/src/HFacer.py @@ -1,23 +1,12 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface # definition file. # Implemented 2000 by Neil Hodgson neilh@scintilla.org -# Requires Python 2.5 or later +# Requires Python 3.6 or later -import sys -import os +import pathlib import Face - -from FileGenerator import UpdateFile, Generate, Regenerate, UpdateLineInFile, lineEnd - -def printLexHFile(f): - out = [] - for name in f.order: - v = f.features[name] - if v["FeatureType"] in ["val"]: - if "SCE_" in name or "SCLEX_" in name: - out.append("#define " + name + " " + v["Value"]) - return out +import FileGenerator def printHFile(f): out = [] @@ -37,25 +26,31 @@ def printHFile(f): featureDefineName = "SCN_" + name.upper() out.append("#define " + featureDefineName + " " + v["Value"]) elif v["FeatureType"] in ["val"]: - if not ("SCE_" in name or "SCLEX_" in name): - out.append("#define " + name + " " + v["Value"]) + out.append("#define " + name + " " + v["Value"]) if anyProvisional: out.append("#endif") return out def RegenerateAll(root, showMaxID): f = Face.Face() - f.ReadFromFile(root + "include/Scintilla.iface") - Regenerate(root + "include/Scintilla.h", "/* ", printHFile(f)) - Regenerate(root + "include/SciLexer.h", "/* ", printLexHFile(f)) + f.ReadFromFile(root / "include/Scintilla.iface") + FileGenerator.Regenerate(root / "include/Scintilla.h", "/* ", printHFile(f)) if showMaxID: valueSet = set(int(x) for x in f.values if int(x) < 3000) maximumID = max(valueSet) print("Maximum ID is %d" % maximumID) #~ valuesUnused = sorted(x for x in range(2001,maximumID) if x not in valueSet) #~ print("\nUnused values") + #~ valueToName = {} + #~ for name, feature in f.features.items(): + #~ try: + #~ value = int(feature["Value"]) + #~ valueToName[value] = name + #~ except ValueError: + #~ pass #~ for v in valuesUnused: - #~ print(v) + #~ prev = valueToName.get(v-1, "") + #~ print(v, prev) if __name__ == "__main__": - RegenerateAll("../", True) + RegenerateAll(pathlib.Path(__file__).resolve().parent.parent, True) diff --git a/PythonScript/src/NotepadPlusWrapper.h b/PythonScript/src/NotepadPlusWrapper.h index b1dbd8bd..1e311345 100644 --- a/PythonScript/src/NotepadPlusWrapper.h +++ b/PythonScript/src/NotepadPlusWrapper.h @@ -355,7 +355,6 @@ enum MenuCommands NPPIDM_VIEW_HIDELINES = IDM_VIEW_HIDELINES, NPPIDM_VIEW_DRAWTABBAR_VERTICAL = IDM_VIEW_DRAWTABBAR_VERTICAL, NPPIDM_VIEW_DRAWTABBAR_MULTILINE = IDM_VIEW_DRAWTABBAR_MULTILINE, - NPPIDM_VIEW_DOCCHANGEMARGIN = IDM_VIEW_DOCCHANGEMARGIN, NPPIDM_VIEW_LWDEF = IDM_VIEW_LWDEF, NPPIDM_VIEW_LWALIGN = IDM_VIEW_LWALIGN, NPPIDM_VIEW_LWINDENT = IDM_VIEW_LWINDENT, @@ -411,6 +410,12 @@ enum MenuCommands NPPIDM_VIEW_SWITCHTO_FILEBROWSER = IDM_VIEW_SWITCHTO_FILEBROWSER, NPPIDM_VIEW_SWITCHTO_FUNC_LIST = IDM_VIEW_SWITCHTO_FUNC_LIST, NPPIDM_VIEW_SWITCHTO_DOCLIST = IDM_VIEW_SWITCHTO_DOCLIST, + NPPIDM_VIEW_TAB_COLOUR_NONE = IDM_VIEW_TAB_COLOUR_NONE, + NPPIDM_VIEW_TAB_COLOUR_1 = IDM_VIEW_TAB_COLOUR_1, + NPPIDM_VIEW_TAB_COLOUR_2 = IDM_VIEW_TAB_COLOUR_2, + NPPIDM_VIEW_TAB_COLOUR_3 = IDM_VIEW_TAB_COLOUR_3, + NPPIDM_VIEW_TAB_COLOUR_4 = IDM_VIEW_TAB_COLOUR_4, + NPPIDM_VIEW_TAB_COLOUR_5 = IDM_VIEW_TAB_COLOUR_5, NPPIDM_VIEW_GOTO_ANOTHER_VIEW = IDM_VIEW_GOTO_ANOTHER_VIEW, NPPIDM_VIEW_CLONE_TO_ANOTHER_VIEW = IDM_VIEW_CLONE_TO_ANOTHER_VIEW, NPPIDM_VIEW_GOTO_NEW_INSTANCE = IDM_VIEW_GOTO_NEW_INSTANCE, diff --git a/PythonScript/src/NotepadPython.cpp b/PythonScript/src/NotepadPython.cpp index 16f08867..3108a8d0 100644 --- a/PythonScript/src/NotepadPython.cpp +++ b/PythonScript/src/NotepadPython.cpp @@ -226,7 +226,8 @@ void export_notepad() .value("WIN7", WV_WIN7) .value("WIN8", WV_WIN8) .value("WIN81", WV_WIN81) - .value("WIN10", WV_WIN10); + .value("WIN10", WV_WIN10) + .value("WIN11", WV_WIN11); boost::python::enum_("PLATFORM") .value("UNKNOWN", PF_UNKNOWN) @@ -553,7 +554,6 @@ void export_notepad() .value("VIEW_HIDELINES", NPPIDM_VIEW_HIDELINES) .value("VIEW_DRAWTABBAR_VERTICAL", NPPIDM_VIEW_DRAWTABBAR_VERTICAL) .value("VIEW_DRAWTABBAR_MULTILINE", NPPIDM_VIEW_DRAWTABBAR_MULTILINE) - .value("VIEW_DOCCHANGEMARGIN", NPPIDM_VIEW_DOCCHANGEMARGIN) .value("VIEW_LWDEF", NPPIDM_VIEW_LWDEF) .value("VIEW_LWALIGN", NPPIDM_VIEW_LWALIGN) .value("VIEW_LWINDENT", NPPIDM_VIEW_LWINDENT) @@ -609,6 +609,12 @@ void export_notepad() .value("VIEW_SWITCHTO_FILEBROWSER", NPPIDM_VIEW_SWITCHTO_FILEBROWSER) .value("VIEW_SWITCHTO_FUNC_LIST", NPPIDM_VIEW_SWITCHTO_FUNC_LIST) .value("VIEW_SWITCHTO_DOCLIST", NPPIDM_VIEW_SWITCHTO_DOCLIST) + .value("VIEW_TAB_COLOUR_NONE", NPPIDM_VIEW_TAB_COLOUR_NONE) + .value("VIEW_TAB_COLOUR_1", NPPIDM_VIEW_TAB_COLOUR_1) + .value("VIEW_TAB_COLOUR_2", NPPIDM_VIEW_TAB_COLOUR_2) + .value("VIEW_TAB_COLOUR_3", NPPIDM_VIEW_TAB_COLOUR_3) + .value("VIEW_TAB_COLOUR_4", NPPIDM_VIEW_TAB_COLOUR_4) + .value("VIEW_TAB_COLOUR_5", NPPIDM_VIEW_TAB_COLOUR_5) .value("VIEW_GOTO_ANOTHER_VIEW", NPPIDM_VIEW_GOTO_ANOTHER_VIEW) .value("VIEW_CLONE_TO_ANOTHER_VIEW", NPPIDM_VIEW_CLONE_TO_ANOTHER_VIEW) .value("VIEW_GOTO_NEW_INSTANCE", NPPIDM_VIEW_GOTO_NEW_INSTANCE) diff --git a/PythonScript/src/Scintilla.h b/PythonScript/src/Scintilla.h index 96776226..0c559397 100644 --- a/PythonScript/src/Scintilla.h +++ b/PythonScript/src/Scintilla.h @@ -152,7 +152,12 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_MARK_RGBAIMAGE 30 #define SC_MARK_BOOKMARK 31 #define SC_MARK_VERTICALBOOKMARK 32 +#define SC_MARK_BAR 33 #define SC_MARK_CHARACTER 10000 +#define SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN 21 +#define SC_MARKNUM_HISTORY_SAVED 22 +#define SC_MARKNUM_HISTORY_MODIFIED 23 +#define SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED 24 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 #define SC_MARKNUM_FOLDERMIDTAIL 27 @@ -353,7 +358,8 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define INDIC_POINTCHARACTER 19 #define INDIC_GRADIENT 20 #define INDIC_GRADIENTCENTRE 21 -#define INDIC_EXPLORERLINK 22 +#define INDIC_POINT_TOP 22 +#define INDIC_EXPLORERLINK 23 #define INDIC_CONTAINER 8 #define INDIC_IME 32 #define INDIC_IME_MAX 35 @@ -361,7 +367,15 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define INDICATOR_CONTAINER 8 #define INDICATOR_IME 32 #define INDICATOR_IME_MAX 35 -#define INDICATOR_MAX 35 +#define INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION 36 +#define INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION 37 +#define INDICATOR_HISTORY_SAVED_INSERTION 38 +#define INDICATOR_HISTORY_SAVED_DELETION 39 +#define INDICATOR_HISTORY_MODIFIED_INSERTION 40 +#define INDICATOR_HISTORY_MODIFIED_DELETION 41 +#define INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION 42 +#define INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION 43 +#define INDICATOR_MAX 43 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 @@ -478,6 +492,12 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_FINDTEXTFULL 2196 #define SCI_FORMATRANGE 2151 #define SCI_FORMATRANGEFULL 2777 +#define SC_CHANGE_HISTORY_DISABLED 0 +#define SC_CHANGE_HISTORY_ENABLED 1 +#define SC_CHANGE_HISTORY_MARKERS 2 +#define SC_CHANGE_HISTORY_INDICATORS 4 +#define SCI_SETCHANGEHISTORY 2780 +#define SCI_GETCHANGEHISTORY 2781 #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 @@ -492,6 +512,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_GETTEXTRANGE 2162 #define SCI_GETTEXTRANGEFULL 2039 #define SCI_HIDESELECTION 2163 +#define SCI_GETSELECTIONHIDDEN 2088 #define SCI_POINTXFROMPOSITION 2164 #define SCI_POINTYFROMPOSITION 2165 #define SCI_LINEFROMPOSITION 2166 @@ -578,6 +599,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_FOLDACTION_CONTRACT 0 #define SC_FOLDACTION_EXPAND 1 #define SC_FOLDACTION_TOGGLE 2 +#define SC_FOLDACTION_CONTRACT_EVERY_LEVEL 4 #define SCI_FOLDLINE 2237 #define SCI_FOLDCHILDREN 2238 #define SCI_EXPANDCHILDREN 2239 diff --git a/PythonScript/src/Scintilla.iface b/PythonScript/src/Scintilla.iface index d78410f1..61f32e67 100644 --- a/PythonScript/src/Scintilla.iface +++ b/PythonScript/src/Scintilla.iface @@ -358,6 +358,7 @@ val SC_MARK_UNDERLINE=29 val SC_MARK_RGBAIMAGE=30 val SC_MARK_BOOKMARK=31 val SC_MARK_VERTICALBOOKMARK=32 +val SC_MARK_BAR=33 val SC_MARK_CHARACTER=10000 @@ -385,7 +386,11 @@ ali SC_MARK_RGBAIMAGE=RGBA_IMAGE ali SC_MARK_VERTICALBOOKMARK=VERTICAL_BOOKMARK enu MarkerOutline=SC_MARKNUM_ -# Markers used for outlining column. +# Markers used for outlining and change history columns. +val SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN=21 +val SC_MARKNUM_HISTORY_SAVED=22 +val SC_MARKNUM_HISTORY_MODIFIED=23 +val SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED=24 val SC_MARKNUM_FOLDEREND=25 val SC_MARKNUM_FOLDEROPENMID=26 val SC_MARKNUM_FOLDERMIDTAIL=27 @@ -842,6 +847,7 @@ val INDIC_POINT=18 val INDIC_POINTCHARACTER=19 val INDIC_GRADIENT=20 val INDIC_GRADIENTCENTRE=21 +val INDIC_POINT_TOP=22 # INDIC_CONTAINER, INDIC_IME, INDIC_IME_MAX, and INDIC_MAX are indicator numbers, # not IndicatorStyles so should not really be in the INDIC_ enumeration. @@ -855,7 +861,15 @@ enu IndicatorNumbers=INDICATOR_ val INDICATOR_CONTAINER=8 val INDICATOR_IME=32 val INDICATOR_IME_MAX=35 -val INDICATOR_MAX=35 +val INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION=36 +val INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION=37 +val INDICATOR_HISTORY_SAVED_INSERTION=38 +val INDICATOR_HISTORY_SAVED_DELETION=39 +val INDICATOR_HISTORY_MODIFIED_INSERTION=40 +val INDICATOR_HISTORY_MODIFIED_DELETION=41 +val INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION=42 +val INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION=43 +val INDICATOR_MAX=43 ali INDIC_TT=T_T ali INDIC_ROUNDBOX=ROUND_BOX @@ -1224,6 +1238,18 @@ fun position FormatRange=2151(bool draw, formatrange fr) # Draw the document into a display context such as a printer. fun position FormatRangeFull=2777(bool draw, formatrangefull fr) +enu ChangeHistoryOption=SC_CHANGE_HISTORY_ +val SC_CHANGE_HISTORY_DISABLED=0 +val SC_CHANGE_HISTORY_ENABLED=1 +val SC_CHANGE_HISTORY_MARKERS=2 +val SC_CHANGE_HISTORY_INDICATORS=4 + +# Enable or disable change history. +set void SetChangeHistory=2780(ChangeHistoryOption changeHistory,) + +# Report change history status. +get ChangeHistoryOption GetChangeHistory=2781(,) + # Retrieve the display line at the top of the display. get line GetFirstVisibleLine=2152(,) @@ -1271,6 +1297,9 @@ fun position GetTextRangeFull=2039(, textrangefull tr) # Draw the selection either highlighted or in normal (non-highlighted) style. fun void HideSelection=2163(bool hide,) +#Is the selection visible or hidden? +get bool GetSelectionHidden=2088(,) + # Retrieve the x value of the point in the window where a position is displayed. fun int PointXFromPosition=2164(, position pos) @@ -1534,6 +1563,7 @@ enu FoldAction=SC_FOLDACTION_ val SC_FOLDACTION_CONTRACT=0 val SC_FOLDACTION_EXPAND=1 val SC_FOLDACTION_TOGGLE=2 +val SC_FOLDACTION_CONTRACT_EVERY_LEVEL=4 # Expand or contract a fold header. fun void FoldLine=2237(line line, FoldAction action) diff --git a/PythonScript/src/ScintillaPython.cpp b/PythonScript/src/ScintillaPython.cpp index 7c5c8fde..69b1d8ae 100644 --- a/PythonScript/src/ScintillaPython.cpp +++ b/PythonScript/src/ScintillaPython.cpp @@ -352,6 +352,8 @@ BOOST_PYTHON_MODULE(Npp) .def("getPrintColourMode", &ScintillaWrapper::GetPrintColourMode, "Returns the print colour mode.") .def("findText", &ScintillaWrapper::FindText, boost::python::args("searchFlags", "start", "end", "ft"), "Find some text in the document.") .def("findTextFull", &ScintillaWrapper::FindTextFull, boost::python::args("searchFlags", "start", "end", "ft"), "Find some text in the document.") + .def("setChangeHistory", &ScintillaWrapper::SetChangeHistory, boost::python::args("changeHistory"), "Enable or disable change history.") + .def("getChangeHistory", &ScintillaWrapper::GetChangeHistory, "Report change history status.") .def("getFirstVisibleLine", &ScintillaWrapper::GetFirstVisibleLine, "Retrieve the display line at the top of the display.") .def("getLine", &ScintillaWrapper::GetLine, boost::python::args("line"), "Retrieve the contents of a line.\nReturns the length of the line.") .def("getLineCount", &ScintillaWrapper::GetLineCount, "Returns the number of lines in the document. There is always at least one.") @@ -366,6 +368,7 @@ BOOST_PYTHON_MODULE(Npp) .def("getTextRange", &ScintillaWrapper::GetTextRange, boost::python::args("start", "end"), "Retrieve a range of text.\nReturn the length of the text.") .def("getTextRangeFull", &ScintillaWrapper::GetTextRangeFull, boost::python::args("start", "end"), "Retrieve a range of text that can be past 2GB.\nReturn the length of the text.") .def("hideSelection", &ScintillaWrapper::HideSelection, boost::python::args("hide"), "Draw the selection either highlighted or in normal (non-highlighted) style.") + .def("getSelectionHidden", &ScintillaWrapper::GetSelectionHidden, "") .def("pointXFromPosition", &ScintillaWrapper::PointXFromPosition, boost::python::args("pos"), "Retrieve the x value of the point in the window where a position is displayed.") .def("pointYFromPosition", &ScintillaWrapper::PointYFromPosition, boost::python::args("pos"), "Retrieve the y value of the point in the window where a position is displayed.") .def("lineFromPosition", &ScintillaWrapper::LineFromPosition, boost::python::args("pos"), "Retrieve the line containing a position.") diff --git a/PythonScript/src/ScintillaWrapper.h b/PythonScript/src/ScintillaWrapper.h index 34fb3af2..424d3d19 100644 --- a/PythonScript/src/ScintillaWrapper.h +++ b/PythonScript/src/ScintillaWrapper.h @@ -1142,6 +1142,14 @@ class ScintillaWrapper : public PyProducerConsumer */ boost::python::object FindTextFull(int searchFlags, Sci_Position start, Sci_Position end, boost::python::object ft); + /** Enable or disable change history. + */ + void SetChangeHistory(int changeHistory); + + /** Report change history status. + */ + int GetChangeHistory(); + /** Retrieve the display line at the top of the display. */ intptr_t GetFirstVisibleLine(); @@ -1203,6 +1211,10 @@ class ScintillaWrapper : public PyProducerConsumer */ void HideSelection(bool hide); + /** + */ + bool GetSelectionHidden(); + /** Retrieve the x value of the point in the window where a position is displayed. */ intptr_t PointXFromPosition(Sci_Position pos); diff --git a/PythonScript/src/ScintillaWrapperGenerated.cpp b/PythonScript/src/ScintillaWrapperGenerated.cpp index fe80039a..fc81cbdc 100644 --- a/PythonScript/src/ScintillaWrapperGenerated.cpp +++ b/PythonScript/src/ScintillaWrapperGenerated.cpp @@ -2120,6 +2120,22 @@ boost::python::object ScintillaWrapper::FindTextFull(int searchFlags, Sci_Positi } } +/** Enable or disable change history. + */ +void ScintillaWrapper::SetChangeHistory(int changeHistory) +{ + DEBUG_TRACE(L"ScintillaWrapper::SetChangeHistory\n"); + callScintilla(SCI_SETCHANGEHISTORY, changeHistory); +} + +/** Report change history status. + */ +int ScintillaWrapper::GetChangeHistory() +{ + DEBUG_TRACE(L"ScintillaWrapper::GetChangeHistory\n"); + return callScintilla(SCI_GETCHANGEHISTORY); +} + /** Retrieve the display line at the top of the display. */ intptr_t ScintillaWrapper::GetFirstVisibleLine() @@ -2283,6 +2299,14 @@ void ScintillaWrapper::HideSelection(bool hide) callScintilla(SCI_HIDESELECTION, hide); } +/** + */ +bool ScintillaWrapper::GetSelectionHidden() +{ + DEBUG_TRACE(L"ScintillaWrapper::GetSelectionHidden\n"); + return 0 != (callScintilla(SCI_GETSELECTIONHIDDEN)); +} + /** Retrieve the x value of the point in the window where a position is displayed. */ intptr_t ScintillaWrapper::PointXFromPosition(Sci_Position pos) diff --git a/PythonScript/src/Utf8.h b/PythonScript/src/Utf8.h index 178ef0a6..83e070d0 100644 --- a/PythonScript/src/Utf8.h +++ b/PythonScript/src/Utf8.h @@ -2,20 +2,19 @@ // Copyright (C)2010 Francois-R.Boyer@PolyMtl.ca // First version 2010-08 // -// Written for notepad++, and distributed under same license: +// Written for Notepad++, and distributed under same license: // 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. - +// 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 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 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 . namespace Utf8 { // could be a static class, instead of a namespace, if it needs private members // basic classification of UTF-8 bytes @@ -52,4 +51,4 @@ namespace Utf8 { // could be a static class, instead of a namespace, if it needs ++charContinuationBytes; return startingIndex-charContinuationBytes; } -}; +} diff --git a/docs/source/enums.rst b/docs/source/enums.rst index e57f5e19..2046f4a2 100644 --- a/docs/source/enums.rst +++ b/docs/source/enums.rst @@ -1499,6 +1499,20 @@ CASEVISIBLE .. attribute:: CASEVISIBLE.CAMEL +CHANGEHISTORYOPTION +------------------- + +.. _CHANGEHISTORYOPTION: +.. class:: CHANGEHISTORYOPTION + +.. attribute:: CHANGEHISTORYOPTION.DISABLED + +.. attribute:: CHANGEHISTORYOPTION.ENABLED + +.. attribute:: CHANGEHISTORYOPTION.MARKERS + +.. attribute:: CHANGEHISTORYOPTION.INDICATORS + CHARACTERSET ------------ @@ -1751,6 +1765,8 @@ FOLDACTION .. attribute:: FOLDACTION.TOGGLE +.. attribute:: FOLDACTION.CONTRACT_EVERY_LEVEL + FOLDDISPLAYTEXTSTYLE -------------------- @@ -1897,6 +1913,22 @@ INDICATORNUMBERS .. attribute:: INDICATORNUMBERS.IME_MAX +.. attribute:: INDICATORNUMBERS.HISTORY_REVERTED_TO_ORIGIN_INSERTION + +.. attribute:: INDICATORNUMBERS.HISTORY_REVERTED_TO_ORIGIN_DELETION + +.. attribute:: INDICATORNUMBERS.HISTORY_SAVED_INSERTION + +.. attribute:: INDICATORNUMBERS.HISTORY_SAVED_DELETION + +.. attribute:: INDICATORNUMBERS.HISTORY_MODIFIED_INSERTION + +.. attribute:: INDICATORNUMBERS.HISTORY_MODIFIED_DELETION + +.. attribute:: INDICATORNUMBERS.HISTORY_REVERTED_TO_MODIFIED_INSERTION + +.. attribute:: INDICATORNUMBERS.HISTORY_REVERTED_TO_MODIFIED_DELETION + .. attribute:: INDICATORNUMBERS.MAX INDICATORSTYLE @@ -1949,6 +1981,8 @@ INDICATORSTYLE .. attribute:: INDICATORSTYLE.GRADIENTCENTRE +.. attribute:: INDICATORSTYLE.POINT_TOP + .. attribute:: INDICATORSTYLE.CONTAINER .. attribute:: INDICATORSTYLE.IME @@ -2381,6 +2415,14 @@ MARKEROUTLINE .. _MARKEROUTLINE: .. class:: MARKEROUTLINE +.. attribute:: MARKEROUTLINE.HISTORY_REVERTED_TO_ORIGIN + +.. attribute:: MARKEROUTLINE.HISTORY_SAVED + +.. attribute:: MARKEROUTLINE.HISTORY_MODIFIED + +.. attribute:: MARKEROUTLINE.HISTORY_REVERTED_TO_MODIFIED + .. attribute:: MARKEROUTLINE.FOLDEREND .. attribute:: MARKEROUTLINE.FOLDEROPENMID @@ -2467,6 +2509,8 @@ MARKERSYMBOL .. attribute:: MARKERSYMBOL.VERTICALBOOKMARK +.. attribute:: MARKERSYMBOL.BAR + .. attribute:: MARKERSYMBOL.CHARACTER MODIFICATIONFLAGS diff --git a/docs/source/scintilla.rst b/docs/source/scintilla.rst index 636cf10e..528389f4 100644 --- a/docs/source/scintilla.rst +++ b/docs/source/scintilla.rst @@ -1553,6 +1553,18 @@ Scintilla Methods See Scintilla documentation for `SCI_FINDTEXTFULL `_ +.. method:: editor.setChangeHistory(changeHistory) + + Enable or disable change history. + + See Scintilla documentation for `SCI_SETCHANGEHISTORY `_ + +.. method:: editor.getChangeHistory() -> int + + Report change history status. + + See Scintilla documentation for `SCI_GETCHANGEHISTORY `_ + .. method:: editor.getFirstVisibleLine() -> int Retrieve the display line at the top of the display. @@ -1642,6 +1654,12 @@ Scintilla Methods See Scintilla documentation for `SCI_HIDESELECTION `_ +.. method:: editor.getSelectionHidden() -> bool + + + + See Scintilla documentation for `SCI_GETSELECTIONHIDDEN `_ + .. method:: editor.pointXFromPosition(pos) -> int Retrieve the x value of the point in the window where a position is displayed.