Skip to content

Commit e35dd46

Browse files
committed
Updated PJ Naughter's CScintillaCtrl library to the latest version available.
Signed-off-by: Stefan-Mihai MOGA <stefan-mihai@moga.doctor>
1 parent 9345cc9 commit e35dd46

11 files changed

Lines changed: 293 additions & 94 deletions

ReleaseNotes.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ <h2>History</h2>
206206
<li>Version 1.41 (June 29<sup>th</sup>, 2025):
207207
<ul>
208208
<li>Updated <code>LEXILLA</code> library to version 5.4.5 and <code>SCINTILLA</code> library to version 5.5.7.</li>
209+
<li>Updated PJ Naughter's <code>CScintillaCtrl</code> library to the latest version available. <blockquote>Updated class to work with Scintilla v5.5.7. New messages wrapped include: <code>SCI_AUTOCSETIMAGESCALE</code>, <code>SCI_AUTOCGETIMAGESCALE</code> and <code>SCI_SCROLLVERTICAL</code>.</blockquote></li>
209210
</ul>
210211
</li>
211212
</ul>

ScintillaCtrl.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ History: PJN / 19-03-2004 1. Initial implementation synchronized to the v1.59 re
331331
SCI_GETUNDOSELECTIONHISTORY, SCI_GETSELECTIONSERIALIZED and SCI_SETSELECTIONSERIALIZED.
332332
PJN / 11-04-2025 1. Updated CScintillaCtrl::MarkerSymbolDefined method to return MarkerSymbol.
333333
2. Verified the code against Scintilla v5.5.6.
334+
PJN / 16-03-2025 1. Updated class to work with Scintilla v5.5.7. New messages wrapped include: SCI_AUTOCSETIMAGESCALE,
335+
SCI_AUTOCGETIMAGESCALE and SCI_SCROLLVERTICAL.
334336
335337
Copyright (c) 2004 - 2025 by PJ Naughter (Web: www.naughter.com, Email: pjna@naughter.com)
336338
@@ -2905,6 +2907,16 @@ int CScintillaCtrl::AutoCGetStyle()
29052907
return static_cast<int>(Call(static_cast<UINT>(Message::AutoCGetStyle), 0, 0));
29062908
}
29072909

2910+
void CScintillaCtrl::AutoCSetImageScale(_In_ int scalePercent)
2911+
{
2912+
Call(static_cast<UINT>(Scintilla::Message::AutoCSetImageScale), static_cast<WPARAM>(scalePercent), 0);
2913+
}
2914+
2915+
int CScintillaCtrl::AutoCGetImageScale()
2916+
{
2917+
return static_cast<int>(Call(static_cast<UINT>(Scintilla::Message::AutoCGetImageScale), 0, 0));
2918+
}
2919+
29082920
void CScintillaCtrl::SetIndent(_In_ int indentSize)
29092921
{
29102922
Call(static_cast<UINT>(Message::SetIndent), static_cast<WPARAM>(indentSize), 0);
@@ -3205,6 +3217,11 @@ void CScintillaCtrl::LineScroll(_In_ Position columns, _In_ Line lines)
32053217
Call(static_cast<UINT>(Message::LineScroll), static_cast<WPARAM>(columns), static_cast<LPARAM>(lines));
32063218
}
32073219

3220+
void CScintillaCtrl::ScrollVertical(_In_ Line docLine, _In_ Line subLine)
3221+
{
3222+
Call(static_cast<UINT>(Scintilla::Message::ScrollVertical), static_cast<WPARAM>(docLine), static_cast<LPARAM>(subLine));
3223+
}
3224+
32083225
void CScintillaCtrl::ScrollCaret()
32093226
{
32103227
Call(static_cast<UINT>(Message::ScrollCaret), 0, 0);

ScintillaCtrl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ namespace Scintilla
481481
[[nodiscard]] int AutoCGetMaxHeight();
482482
void AutoCSetStyle(_In_ int style);
483483
[[nodiscard]] int AutoCGetStyle();
484+
void AutoCSetImageScale(_In_ int scalePercent);
485+
[[nodiscard]] int AutoCGetImageScale();
484486
void SetIndent(_In_ int indentSize);
485487
[[nodiscard]] int GetIndent();
486488
void SetUseTabs(_In_ BOOL useTabs);
@@ -541,6 +543,7 @@ namespace Scintilla
541543
[[nodiscard]] Line LineFromPosition(_In_ Position pos);
542544
[[nodiscard]] Position PositionFromLine(_In_ Line line);
543545
void LineScroll(_In_ Position columns, _In_ Line lines);
546+
void ScrollVertical(_In_ Line docLine, _In_ Line subLine);
544547
void ScrollCaret();
545548
void ScrollRange(_In_ Position secondary, _In_ Position primary);
546549
void ReplaceSel(_In_z_ const char* text);

0 commit comments

Comments
 (0)