forked from bruderstein/PythonScript
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from bruderstein:master #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's GuideThis PR systematically migrates legacy Scintilla APIs to the newer “FULL” interfaces, enriches the Notepad++ plugin and PythonScript bindings with toolbar icon‐set and language/menu enhancements, refines dark mode and docking support, and applies wide‐ranging cleanup and deprecation of obsolete messages and functions. Sequence Diagram for Scintilla API Usage Change in ScintillaWrapper::getWordsequenceDiagram
participant C as ClientCode
participant SW as ScintillaWrapper
participant SCN as ScintillaNativeAPI
Note over C, SCN: Change in ScintillaWrapper::getWord internal implementation
C->>SW: getWord(position, wordChars)
SW->>SCN: Call SCI_WORDSTARTPOSITION(position, wordChars)
SCN-->>SW: startPos
SW->>SCN: Call SCI_WORDENDPOSITION(position, wordChars)
SCN-->>SW: endPos
Note right of SW: Previously might have used SCI_GETTEXTRANGE.
SW->>SCN: Call SCI_GETTEXTRANGEFULL(0, &Sci_TextRangeFull)
SCN-->>SW: Fill Sci_TextRangeFull with text between startPos and endPos
SW-->>C: word string (from Sci_TextRangeFull)
Class Diagram for Scintilla API Struct ChangesclassDiagram
class Sci_CharacterRange {
<<deprecated>>
Sci_PositionCR cpMin
Sci_PositionCR cpMax
}
class Sci_CharacterRangeFull {
Sci_Position cpMin
Sci_Position cpMax
}
Sci_CharacterRange --|> Sci_CharacterRangeFull : Replaced by
class Sci_TextRange {
<<deprecated>>
Sci_CharacterRange chrg
char* lpstrText
}
class Sci_TextRangeFull {
Sci_CharacterRangeFull chrg
char* lpstrText
}
Sci_TextRange --|> Sci_TextRangeFull : Replaced by
class Sci_TextToFind {
<<deprecated>>
Sci_CharacterRange chrg
const char* lpstrText
Sci_CharacterRange chrgText
}
class Sci_TextToFindFull {
Sci_CharacterRangeFull chrg
const char* lpstrText
Sci_CharacterRangeFull chrgText
}
Sci_TextToFind --|> Sci_TextToFindFull : Replaced by
class Sci_RangeToFormat {
<<deprecated>>
Sci_SurfaceID hdc
Sci_SurfaceID hdcTarget
Sci_Rectangle rc
Sci_Rectangle rcPage
Sci_CharacterRange chrg
}
class Sci_RangeToFormatFull {
Sci_SurfaceID hdc
Sci_SurfaceID hdcTarget
Sci_Rectangle rc
Sci_Rectangle rcPage
Sci_CharacterRangeFull chrg
}
Sci_RangeToFormat --|> Sci_RangeToFormatFull : Replaced by
Class Diagram for PythonScript ScintillaWrapper Method ChangesclassDiagram
class ScintillaWrapper {
<<PythonScript>>
-- Removed Methods --
-GetStyledText(Sci_PositionCR start, Sci_PositionCR end) tuple
-FindText(int searchFlags, Sci_PositionCR start, Sci_PositionCR end, object ft) object
-GetTextRange(Sci_PositionCR start, Sci_PositionCR end) str
-- Modified Methods --
+MarkerSymbolDefined(int markerNumber) int // Return type changed from intptr_t
}
Class Diagram for NppDarkMode Struct ChangesclassDiagram
namespace NppDarkMode {
class Colors {
COLORREF background
COLORREF softerBackground // Comment updated: ctrl background color
COLORREF hotBackground
COLORREF pureBackground // Comment updated: dlg background color
COLORREF errorBackground
COLORREF text
COLORREF darkerText
COLORREF hotText
COLORREF disabledText
COLORREF edge
COLORREF hotEdge
COLORREF disabledEdge
}
class AdvOptDefaults {
<<Removed>>
#std::wstring _xmlFileName
#int _toolBarIconSet
#int _tabIconSet
#bool _tabUseTheme
}
class AdvancedOptions {
<<Removed>>
#bool _enableWindowsMode
#NppDarkMode::AdvOptDefaults _darkDefaults
#NppDarkMode::AdvOptDefaults _lightDefaults
}
}
Class Diagram for NppDarkMode Function Additions and RenamesclassDiagram
namespace NppDarkMode {
class NppDarkModeFunctions {
<<New and Renamed Functions>>
+getToolbarIconInfo(bool useDark) TbIconInfo
+getToolbarIconInfo() TbIconInfo
+setToolbarIconSet(int state2Set, bool useDark) void
+setToolbarIconSet(int state2Set) void
+setToolbarFluentColor(FluentColor color2Set, bool useDark) void
+setToolbarFluentColor(FluentColor color2Set) void
+setToolbarFluentMonochrome(bool setMonochrome, bool useDark) void
+setToolbarFluentMonochrome(bool setMonochrome) void
+setToolbarFluentCustomColor(COLORREF color, bool useDark) void
+setToolbarFluentCustomColor(COLORREF color) void
+getAccentColor(bool useDark) COLORREF
+getAccentColor() COLORREF
+getCtrlBackgroundColor() COLORREF // Renamed from getSofterBackgroundColor
+getDlgBackgroundColor() COLORREF // Renamed from getDarkerBackgroundColor
+getCtrlBackgroundBrush() HBRUSH // Renamed from getSofterBackgroundBrush
+getDlgBackgroundBrush() HBRUSH // Renamed from getDarkerBackgroundBrush
+paintRoundRect(HDC hdc, RECT rect, HPEN hpen, HBRUSH hBrush, int width, int height) void
+autoSubclassCtlColor(HWND hWnd) void
+onCtlColorCtrl(HDC hdc) LRESULT // Renamed from onCtlColorSofter
+onCtlColorDlg(HDC hdc) LRESULT // Renamed from onCtlColorDarker
+onCtlColorDlgStaticText(HDC hdc, bool isTextEnabled) LRESULT // Renamed from onCtlColorDarkerBGStaticText
+onCtlColorDlgLinkText(HDC hdc, bool isTextEnabled) LRESULT
}
}
Class Diagram for WcharMbcsConvertor and StringBuffer ChangesclassDiagram
class WcharMbcsConvertor {
+char2wchar(const char* mbcs2Convert, size_t codepage, intptr_t* mstart, intptr_t* mend, int len) const wchar_t* // Added 'len' param
+wchar2char(const wchar_t* wcStr, size_t codepage, intptr_t* mstart, intptr_t* mend, int lenIn, int* lenOut) const char* // Added 'lenIn', 'lenOut' params
+getSizeW() size_t // New method
+getSizeA() size_t // New method
#StringBuffer~wchar_t~ _wideCharStr
#StringBuffer~char~ _multiByteStr
}
class StringBuffer~T~ {
+sizeTo(size_t size) void // Modified logic
+empty() void // Modified logic
+size() size_t // New method
#size_t _dataLen // New member
}
WcharMbcsConvertor *-- "1" StringBuffer~wchar_t~ : uses
WcharMbcsConvertor *-- "1" StringBuffer~char~ : uses
Class Diagram for DockingDlgInterface ChangesclassDiagram
class DockingDlgInterface {
+create(tTbData* data, std::array<int, 3> iconIDs, bool isRTL) void // New overload
+getIconIDs() const std::array<int,3>& // New method
#std::array<int,3> _iconIDs // New member
#run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) intptr_t // Modified FillRect to use NppDarkMode::getDlgBackgroundBrush()
}
Class Diagram for PythonScript NotepadPlusWrapper ChangesclassDiagram
class NotepadPlusWrapper {
<<PythonScript>>
+getToolBarIconSetChoice() int // New method
+getFiles() list // Internally uses _DEPRECATED NPPM messages
+activateBufferID(intptr_t bufferID) void // Internal logic change for NPPM_GETPOSFROMBUFFERID call
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Deprecate obsolete Scintilla and Notepad++ plugin interfaces in favor of 2GB+ safe or newer APIs; extend PythonScript and plugin functionality for toolbar icon choice, sorting commands, dark mode, and docking dialogs; clean up generated stubs and correct typos across headers.
New Features:
Enhancements:
Chores: