Skip to content

Commit

Permalink
Finish update.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 13, 2024
1 parent b0f2173 commit caec92a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
23 changes: 21 additions & 2 deletions Components/ScintInt.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
unit ScintInt;

{
Delphi translation of Scintilla.h from Scintilla 5.1.0
Delphi translation of Scintilla.h from Scintilla 5.2.4
created by Jordan Russell and updated by Martijn Laan
}

Expand All @@ -27,6 +27,7 @@ interface
SCI_GETCURRENTPOS = 2008;
SCI_GETANCHOR = 2009;
SCI_GETSTYLEAT = 2010;
SCI_GETSTYLEINDEXAT = 2038;
SCI_REDO = 2011;
SCI_SETUNDOCOLLECTION = 2012;
SCI_SELECTALL = 2013;
Expand Down Expand Up @@ -242,6 +243,8 @@ interface
SCI_STYLEGETWEIGHT = 2064;
SCI_STYLESETCHARACTERSET = 2066;
SCI_STYLESETHOTSPOT = 2409;
SCI_STYLESETCHECKMONOSPACED = 2254;
SCI_STYLEGETCHECKMONOSPACED = 2255;
SC_ELEMENT_LIST = 0;
SC_ELEMENT_LIST_BACK = 1;
SC_ELEMENT_LIST_SELECTED = 2;
Expand All @@ -261,6 +264,8 @@ interface
SC_ELEMENT_WHITE_SPACE_BACK = 61;
SC_ELEMENT_HOT_SPOT_ACTIVE = 70;
SC_ELEMENT_HOT_SPOT_ACTIVE_BACK = 71;
SC_ELEMENT_FOLD_LINE = 80;
SC_ELEMENT_HIDDEN_LINE = 81;
SCI_SETELEMENTCOLOUR = 2753;
SCI_GETELEMENTCOLOUR = 2754;
SCI_RESETELEMENTCOLOUR = 2755;
Expand All @@ -280,6 +285,8 @@ interface
SCI_SETSELECTIONLAYER = 2763;
SCI_GETCARETLINELAYER = 2764;
SCI_SETCARETLINELAYER = 2765;
SCI_GETCARETLINEHIGHLIGHTSUBLINE = 2773;
SCI_SETCARETLINEHIGHLIGHTSUBLINE = 2774;
SCI_SETCARETFORE = 2069;
SCI_ASSIGNCMDKEY = 2070;
SCI_CLEARCMDKEY = 2071;
Expand Down Expand Up @@ -375,6 +382,10 @@ interface
SCI_USERLISTSHOW = 2117;
SCI_AUTOCSETAUTOHIDE = 2118;
SCI_AUTOCGETAUTOHIDE = 2119;
SC_AUTOCOMPLETE_NORMAL = 0;
SC_AUTOCOMPLETE_FIXED_SIZE = 1;
SCI_AUTOCSETOPTIONS = 2638;
SCI_AUTOCGETOPTIONS = 2639;
SCI_AUTOCSETDROPRESTOFWORD = 2270;
SCI_AUTOCGETDROPRESTOFWORD = 2271;
SCI_REGISTERIMAGE = 2405;
Expand Down Expand Up @@ -434,10 +445,13 @@ interface
SCFIND_POSIX = $00400000;
SCFIND_CXX11REGEX = $00800000;
SCI_FINDTEXT = 2150;
SCI_FINDTEXTFULL = 2196;
SCI_FORMATRANGE = 2151;
SCI_FORMATRANGEFULL = 2777;
SCI_GETFIRSTVISIBLELINE = 2152;
SCI_GETLINE = 2153;
SCI_GETLINECOUNT = 2154;
SCI_ALLOCATELINES = 2089;
SCI_SETMARGINLEFT = 2155;
SCI_GETMARGINLEFT = 2156;
SCI_SETMARGINRIGHT = 2157;
Expand All @@ -446,6 +460,7 @@ interface
SCI_SETSEL = 2160;
SCI_GETSELTEXT = 2161;
SCI_GETTEXTRANGE = 2162;
SCI_GETTEXTRANGEFULL = 2039;
SCI_HIDESELECTION = 2163;
SCI_POINTXFROMPOSITION = 2164;
SCI_POINTYFROMPOSITION = 2165;
Expand Down Expand Up @@ -867,6 +882,7 @@ interface
CARETSTYLE_BLOCK = 2;
CARETSTYLE_OVERSTRIKE_BAR = 0;
CARETSTYLE_OVERSTRIKE_BLOCK = $10;
CARETSTYLE_CURSES = $20;
CARETSTYLE_INS_MASK = $F;
CARETSTYLE_BLOCK_AFTER = $100;
SCI_SETCARETSTYLE = 2512;
Expand All @@ -883,6 +899,8 @@ interface
SCI_INDICATOREND = 2509;
SCI_SETPOSITIONCACHE = 2514;
SCI_GETPOSITIONCACHE = 2515;
SCI_SETLAYOUTTHREADS = 2775;
SCI_GETLAYOUTTHREADS = 2776;
SCI_COPYALLOWLINE = 2519;
SCI_GETCHARACTERPOINTER = 2520;
SCI_GETRANGEPOINTER = 2643;
Expand Down Expand Up @@ -1060,6 +1078,7 @@ interface
SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH = 2;
SC_SUPPORTS_TRANSLUCENT_STROKE = 3;
SC_SUPPORTS_PIXEL_MODIFICATION = 4;
SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS = 5;
SCI_SUPPORTSFEATURE = 2750;
SC_LINECHARACTERINDEX_NONE = 0;
SC_LINECHARACTERINDEX_UTF32 = 1;
Expand Down Expand Up @@ -1218,7 +1237,7 @@ TSci_CharacterRange = record
cpMin: TSci_PositionCR;
cpMax: TSci_PositionCR;
end;

TSci_TextRange = record
chrg: TSci_CharacterRange;
lpstrText: PAnsiChar;
Expand Down
Binary file modified Files/isscint.dll
Binary file not shown.
6 changes: 6 additions & 0 deletions Projects/Src/CompScintEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ procedure TCompScintEdit.CreateWnd;
properties."
-5.0.1: Review using SCI_INDICSETSTROKEWIDTH for high DPI support on
INDIC_SQUIGGLE.
-5.2.3: "Applications should move to SCI_GETTEXTRANGEFULL, SCI_FINDTEXTFULL,
and SCI_FORMATRANGEFULL from their predecessors as they will be
deprecated." So our use of SCI_GETTEXTRANGE and SCI_FORMATRANGE needs
to be updated but that also means we should do many more changes to
replace all the Integer positions with NativeInt positions. Does not
actually change anything until there's a 64-bit build...

This comment has been minimized.

Copy link
@jordanrussell

jordanrussell Jun 14, 2024

Member

I'd prefer to see a dedicated type like TScintPosition = type NativeInt. That would make it clearer which variables/parameters/return values are intended to be positions.

(I know there's a TSci_Position already, but that's in ScintInt. And the TSci_ prefix would be inconsistent with everything else in ScintEdit.)

This comment has been minimized.

Copy link
@martijnlaan

martijnlaan Jun 14, 2024

Author Member

Yeah sorry I didn't literally mean using NativeInt directly everywhere. Actually did add a TScintPosition like that and started changing things but it was too much for now and I backed out.

I will clarify the comment.

-5.3.0: "Stop including STYLE_CALLTIP when calculating line height. Allows a
large font to be used for calltips without affecting text display."
Allows cleanup of our STYLE_AUTOCOMPLETION patch.
Expand Down

0 comments on commit caec92a

Please sign in to comment.