Skip to content

Commit 3a8ee2b

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 ebd37a9 commit 3a8ee2b

12 files changed

Lines changed: 42 additions & 7 deletions

IntelliFile.rc

0 Bytes
Binary file not shown.

ReleaseNotes.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ <h2>History</h2>
201201
<li>Updated PJ Naughter's <code>CScintillaCtrl</code> library to the latest version available. <blockquote>Updated class to work with Scintilla v5.5.5. New messages wrapped include: <code>SCI_SETUNDOSELECTIONHISTORY</code>, <code>SCI_GETUNDOSELECTIONHISTORY</code>, <code>SCI_GETSELECTIONSERIALIZED</code> and <code>SCI_SETSELECTIONSERIALIZED</code>.</blockquote></li>
202202
</ul>
203203
</li>
204+
<li>Version 1.39 (April 12<sup>th</sup>, 2025):
205+
<ul>
206+
<li>Updated PJ Naughter's <code>CScintillaCtrl</code> library to the latest version available. <blockquote>Updated <code>CScintillaCtrl:: MarkerSymbolDefined</code> method to return <code>MarkerSymbol</code>.</blockquote></li>
207+
</ul>
208+
</li>
204209
</ul>
205210
</div>
206211
</div>

ScintillaCtrl.cpp

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ History: PJN / 19-03-2004 1. Initial implementation synchronized to the v1.59 re
329329
PJN / 21-12-2024 1. Verified the code against Scintilla v5.5.4.
330330
PJN / 16-03-2025 1. Updated class to work with Scintilla v5.5.5. New messages wrapped include: SCI_SETUNDOSELECTIONHISTORY,
331331
SCI_GETUNDOSELECTIONHISTORY, SCI_GETSELECTIONSERIALIZED and SCI_SETSELECTIONSERIALIZED.
332+
PJN / 11-04-2025 1. Updated CScintillaCtrl::MarkerSymbolDefined method to return MarkerSymbol.
333+
2. Verified the code against Scintilla v5.5.6.
332334
333335
Copyright (c) 2004 - 2025 by PJ Naughter (Web: www.naughter.com, Email: pjna@naughter.com)
334336
@@ -657,6 +659,20 @@ CScintillaCtrl::StringW CScintillaCtrl::GetLine(_In_ Line line)
657659
return UTF82W(sUTF8, -1);
658660
}
659661

662+
CScintillaCtrl::StringW CScintillaCtrl::GetSelectionSerialized()
663+
{
664+
//Work out the length of string to allocate
665+
const Position nUTF8Length{ GetSelectionSerialized(nullptr) };
666+
667+
//Call the function which does the work
668+
StringA sUTF8;
669+
#pragma warning(suppress: 26472)
670+
GetSelectionSerialized(sUTF8.GetBufferSetLength(static_cast<int>(nUTF8Length)));
671+
sUTF8.ReleaseBuffer();
672+
673+
return UTF82W(sUTF8, -1);
674+
}
675+
660676
void CScintillaCtrl::ReplaceSel(_In_z_ const wchar_t* text)
661677
{
662678
//Convert the unicode text to UTF8
@@ -1332,6 +1348,18 @@ CScintillaCtrl::StringA CScintillaCtrl::GetLine(_In_ Line line)
13321348
return sLine;
13331349
}
13341350

1351+
CScintillaCtrl::StringA CScintillaCtrl::GetSelectionSerialized()
1352+
{
1353+
//Call the function which does the work
1354+
StringA sSelectionSerialized;
1355+
const Position nLength{ GetSelectionSerialized(nullptr) };
1356+
#pragma warning(suppress: 26472)
1357+
char* pszSelectionSerialized{ sSelectionSerialized.GetBufferSetLength(static_cast<int>(nLength)) };
1358+
GetSelectionSerialized(pszSelectionSerialized);
1359+
sSelectionSerialized.ReleaseBuffer();
1360+
return sSelectionSerialized;
1361+
}
1362+
13351363
CScintillaCtrl::StringA CScintillaCtrl::GetSCIProperty(_In_z_ const char* key)
13361364
{
13371365
//Validate our parameters
@@ -4931,9 +4959,9 @@ int CScintillaCtrl::GetExtraDescent()
49314959
return static_cast<int>(Call(static_cast<UINT>(Message::GetExtraDescent), 0, 0));
49324960
}
49334961

4934-
int CScintillaCtrl::MarkerSymbolDefined(_In_ int markerNumber)
4962+
MarkerSymbol CScintillaCtrl::MarkerSymbolDefined(_In_ int markerNumber)
49354963
{
4936-
return static_cast<int>(Call(static_cast<UINT>(Message::MarkerSymbolDefined), static_cast<WPARAM>(markerNumber), 0));
4964+
return static_cast<MarkerSymbol>(Call(static_cast<UINT>(Message::MarkerSymbolDefined), static_cast<WPARAM>(markerNumber), 0));
49374965
}
49384966

49394967
void CScintillaCtrl::MarginSetText(_In_ Line line, _In_z_ const char* text)

ScintillaCtrl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ namespace Scintilla
156156
void AutoCSetFillUps(_In_z_ const wchar_t* characterSet);
157157
void UserListShow(_In_ int listType, _In_z_ const wchar_t* itemList);
158158
[[nodiscard]] StringW GetLine(_In_ Line line);
159+
[[nodiscard]] StringW GetSelectionSerialized();
159160
void ReplaceSel(_In_z_ const wchar_t* text);
160161
void SetText(_In_z_ const wchar_t* text);
161162
[[nodiscard]] StringW GetText(_In_ int length);
@@ -214,6 +215,7 @@ namespace Scintilla
214215
[[nodiscard]] StringA GetSelText();
215216
[[nodiscard]] StringA GetCurLine();
216217
[[nodiscard]] StringA GetLine(_In_ Line line);
218+
[[nodiscard]] StringA GetSelectionSerialized();
217219
[[nodiscard]] StringA GetSCIProperty(_In_z_ const char* key);
218220
[[nodiscard]] StringA GetText(_In_ int length);
219221
[[nodiscard]] StringA GetPropertyExpanded(_In_z_ const char* key);
@@ -889,7 +891,7 @@ namespace Scintilla
889891
[[nodiscard]] int GetExtraAscent();
890892
void SetExtraDescent(_In_ int extraDescent);
891893
[[nodiscard]] int GetExtraDescent();
892-
[[nodiscard]] int MarkerSymbolDefined(_In_ int markerNumber);
894+
[[nodiscard]] MarkerSymbol MarkerSymbolDefined(_In_ int markerNumber);
893895
void MarginSetText(_In_ Line line, _In_z_ const char* text);
894896
int MarginGetText(_In_ Line line, _Inout_opt_z_ char* text);
895897
void MarginSetStyle(_In_ Line line, _In_ int style);

Setup/Setup.vdproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,15 +964,15 @@
964964
{
965965
"Name" = "8:Microsoft Visual Studio"
966966
"ProductName" = "8:IntelliFile"
967-
"ProductCode" = "8:{4FC4CC87-EF0B-43B3-939E-725553566F0F}"
968-
"PackageCode" = "8:{7EC88866-EA16-4069-A662-C76D789EFECD}"
967+
"ProductCode" = "8:{0751DB02-AE21-4651-AD0C-F69EDCEC5231}"
968+
"PackageCode" = "8:{3F07DDDF-3271-408A-BA9C-F6B3B2A9313E}"
969969
"UpgradeCode" = "8:{C73D3F5F-8D57-4947-AD1B-57B770138A7D}"
970970
"AspNetVersion" = "8:2.0.50727.0"
971971
"RestartWWWService" = "11:FALSE"
972972
"RemovePreviousVersions" = "11:FALSE"
973973
"DetectNewerInstalledVersion" = "11:TRUE"
974974
"InstallAllUsers" = "11:TRUE"
975-
"ProductVersion" = "8:1.38"
975+
"ProductVersion" = "8:1.39"
976976
"Manufacturer" = "8:Stefan-Mihai MOGA"
977977
"ARPHELPTELEPHONE" = "8:+40745497982"
978978
"ARPHELPLINK" = "8:https://www.moga.doctor/"

SoftwareContextRegister.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ <h1>Software Content Register</h1>
9494

9595
<p><strong>CScintillaCtrl, CScintillaDoc, CScintillaView</strong><br>
9696
Description: <em>These classes provides a MFC and ATL/WTL wrapping for the Scintilla edit control (<a href="http://www.scintilla.org" target="_blank">http://www.scintilla.org</a>). This control provides an open source cross platform edit control. Some of the features it provides include syntax colouring, call tips, brace highlighting, Styles, margins and markers to name but a few. The provided wrapper classes make it easier to include the control in MFC / WTL projects on Windows.</em><br>
97-
Version: 1.92<br>
97+
Version: 1.93<br>
9898
Home Page: <a href="https://www.naughter.com/scintilla.html" target="_blank">https://www.naughter.com/scintilla.html</a><br>
9999
License: Custom (PJ Naughter's license)<br>
100100
Format: source code, binary</p>

hlp/IntelliFile.chm

2 Bytes
Binary file not shown.

x64/Release/IntelliFile.chm

2 Bytes
Binary file not shown.

x64/Release/IntelliFile.exe

0 Bytes
Binary file not shown.

x64/Release/Lexilla.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)