diff --git a/PowerEditor/scintilla.original.forUpdating/scintilla.original.forUpdating.7z b/PowerEditor/scintilla.original.forUpdating/scintilla.original.forUpdating.7z index a3be6ffa..6dc96a27 100644 Binary files a/PowerEditor/scintilla.original.forUpdating/scintilla.original.forUpdating.7z and b/PowerEditor/scintilla.original.forUpdating/scintilla.original.forUpdating.7z differ diff --git a/scintilla/boostregex/BoostRegExSearch.cxx b/scintilla/boostregex/BoostRegExSearch.cxx index fc86c4ea..d4c9641b 100644 --- a/scintilla/boostregex/BoostRegExSearch.cxx +++ b/scintilla/boostregex/BoostRegExSearch.cxx @@ -29,6 +29,7 @@ #include "Decoration.h" #include "ILexer.h" #include "CaseFolder.h" +#include "CharacterCategory.h" #include "Document.h" #include "UniConversion.h" #include "UTF8DocumentIterator.h" diff --git a/scintilla/cocoa/InfoBar.mm b/scintilla/cocoa/InfoBar.mm index 4619e952..ec052c17 100644 --- a/scintilla/cocoa/InfoBar.mm +++ b/scintilla/cocoa/InfoBar.mm @@ -10,6 +10,8 @@ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). */ +#include + #import "InfoBar.h" //-------------------------------------------------------------------------------------------------- @@ -33,7 +35,7 @@ CGFloat heightDelta = newRect.size.height - textSize.height; if (heightDelta > 0) { newRect.size.height -= heightDelta; - newRect.origin.y += ceil(heightDelta / 2); + newRect.origin.y += std::ceil(heightDelta / 2); } } @@ -349,7 +351,7 @@ static float BarFontSize = 10.0; // We only work with some preset zoom values. If the given value does not correspond // to one then show no selection. - while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07)) + while (count < numberOfDefaultItems && (std::abs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07)) count++; if (count == numberOfDefaultItems) [mZoomPopup selectItemAtIndex: -1]; diff --git a/scintilla/cocoa/PlatCocoa.h b/scintilla/cocoa/PlatCocoa.h index 00a871a7..c943f0b6 100644 --- a/scintilla/cocoa/PlatCocoa.h +++ b/scintilla/cocoa/PlatCocoa.h @@ -80,7 +80,7 @@ public: void PenColour(ColourDesired fore) override; /** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */ - CGImageRef GetImage(); + CGImageRef CreateImage(); void CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect); int LogPixelsY() override; diff --git a/scintilla/cocoa/PlatCocoa.mm b/scintilla/cocoa/PlatCocoa.mm index 737c5ba0..8f5d4adc 100644 --- a/scintilla/cocoa/PlatCocoa.mm +++ b/scintilla/cocoa/PlatCocoa.mm @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -251,7 +252,7 @@ void AddToIntervalVector(std::vector &vi, XYPOSITION left, XYPOSITION vi.push_back(interval); } else { Interval &last = vi.back(); - if (fabs(last.right-interval.left) < 0.01) { + if (std::abs(last.right-interval.left) < 0.01) { // If new left is very close to previous right then extend last item last.right = interval.right; } else { @@ -482,8 +483,8 @@ void SurfaceImpl::FillColour(const ColourDesired &back) { //-------------------------------------------------------------------------------------------------- -CGImageRef SurfaceImpl::GetImage() { - // For now, assume that GetImage can only be called on PixMap surfaces. +CGImageRef SurfaceImpl::CreateImage() { + // For now, assume that CreateImage can only be called on PixMap surfaces. if (!bitmapData) return NULL; @@ -628,8 +629,8 @@ void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) { if (gc) { FillColour(back); // Snap rectangle boundaries to nearest int - rc.left = lround(rc.left); - rc.right = lround(rc.right); + rc.left = std::round(rc.left); + rc.right = std::round(rc.right); CGRect rect = PRectangleToCGRect(rc); CGContextFillRect(gc, rect); } @@ -654,7 +655,7 @@ void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { SurfaceImpl &patternSurface = static_cast(surfacePattern); // For now, assume that copy can only be called on PixMap surfaces. Shows up black. - CGImageRef image = patternSurface.GetImage(); + CGImageRef image = patternSurface.CreateImage(); if (image == NULL) { FillRectangle(rc, ColourDesired(0)); return; @@ -805,8 +806,8 @@ void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, Colou ColourDesired outline, int alphaOutline, int /*flags*/) { if (gc) { // Snap rectangle boundaries to nearest int - rc.left = lround(rc.left); - rc.right = lround(rc.right); + rc.left = std::round(rc.left); + rc.right = std::round(rc.right); // Set the Fill color to match CGContextSetRGBFillColor(gc, fill.GetRed() / 255.0, fill.GetGreen() / 255.0, fill.GetBlue() / 255.0, alphaFill / 255.0); CGContextSetRGBStrokeColor(gc, outline.GetRed() / 255.0, outline.GetGreen() / 255.0, outline.GetBlue() / 255.0, alphaOutline / 255.0); @@ -969,7 +970,7 @@ void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect) { SurfaceImpl &source = static_cast(surfaceSource); - CGImageRef image = source.GetImage(); + CGImageRef image = source.CreateImage(); CGRect src = PRectangleToCGRect(srcRect); CGRect dst = PRectangleToCGRect(dstRect); @@ -1001,7 +1002,7 @@ void SurfaceImpl::Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSou SurfaceImpl &source = static_cast(surfaceSource); // Get the CGImageRef - CGImageRef image = source.GetImage(); + CGImageRef image = source.CreateImage(); // If we could not get an image reference, fill the rectangle black if (image == NULL) { FillRectangle(rc, ColourDesired(0)); @@ -1115,7 +1116,7 @@ void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION yba CGColorRef color = CGColorCreateGenericRGB(colour.GetRed()/255.0, colour.GetGreen()/255.0, colour.GetBlue()/255.0, 1.0); QuartzTextStyle *style = TextStyleFromFont(font_); - style->setCTStyleColor(color); + style->setCTStyleColour(color); CGColorRelease(color); @@ -1232,7 +1233,7 @@ XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) { XYPOSITION width = WidthText(font_, sizeString); - return round(width / strlen(sizeString)); + return std::round(width / strlen(sizeString)); } void SurfaceImpl::SetClip(PRectangle rc) { @@ -1470,7 +1471,7 @@ static NSImage *ImageFromXPM(XPM *pxpm) { SurfaceImpl *surfaceIXPM = static_cast(surfaceXPM.get()); CGContextClearRect(surfaceIXPM->GetContext(), CGRectMake(0, 0, width, height)); pxpm->Draw(surfaceXPM.get(), rcxpm); - CGImageRef imageRef = surfaceIXPM->GetImage(); + CGImageRef imageRef = surfaceIXPM->CreateImage(); img = [[NSImage alloc] initWithCGImage: imageRef size: NSZeroSize]; CGImageRelease(imageRef); } @@ -1750,7 +1751,7 @@ void ListBoxImpl::SetFont(Font &font_) { font.SetID(new QuartzTextStyle(*style)); NSFont *pfont = (__bridge NSFont *)style->getFontRef(); [colText.dataCell setFont: pfont]; - CGFloat itemHeight = ceil(pfont.boundingRectForFont.size.height); + CGFloat itemHeight = std::ceil(pfont.boundingRectForFont.size.height); table.rowHeight = itemHeight; } diff --git a/scintilla/cocoa/QuartzTextStyle.h b/scintilla/cocoa/QuartzTextStyle.h index 97ff3dab..4d217cb0 100644 --- a/scintilla/cocoa/QuartzTextStyle.h +++ b/scintilla/cocoa/QuartzTextStyle.h @@ -47,8 +47,8 @@ public: return styleDict; } - void setCTStyleColor(CGColor *inColor) { - CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, inColor); + void setCTStyleColour(CGColor *inColour) { + CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, inColour); } float getAscent() const { diff --git a/scintilla/cocoa/ScintillaCocoa.h b/scintilla/cocoa/ScintillaCocoa.h index cdabea59..3a64921c 100644 --- a/scintilla/cocoa/ScintillaCocoa.h +++ b/scintilla/cocoa/ScintillaCocoa.h @@ -32,6 +32,7 @@ #include "PropSetSimple.h" #endif +#include "CharacterCategory.h" #include "Position.h" #include "UniqueString.h" #include "SplitVector.h" @@ -196,7 +197,7 @@ public: void ObserverRemove(); void IdleWork() override; void QueueIdleWork(WorkNeeded::workItems items, Sci::Position upTo) override; - ptrdiff_t InsertText(NSString *input); + ptrdiff_t InsertText(NSString *input, CharacterSource charSource); NSRange PositionsFromCharacters(NSRange rangeCharacters) const; NSRange CharactersFromPositions(NSRange rangePositions) const; NSString *RangeTextAsString(NSRange rangePositions) const; diff --git a/scintilla/cocoa/ScintillaCocoa.mm b/scintilla/cocoa/ScintillaCocoa.mm index e0a6b078..b2f4a922 100644 --- a/scintilla/cocoa/ScintillaCocoa.mm +++ b/scintilla/cocoa/ScintillaCocoa.mm @@ -14,6 +14,8 @@ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). */ +#include + #include #include @@ -316,7 +318,7 @@ const CGFloat paddingHighlightY = 2; // main thread). We need that later for idle event processing. NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center]; - [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil]; + [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: self]; } return self; } @@ -818,7 +820,7 @@ namespace { */ bool SupportAnimatedFind() { - return floor(NSAppKitVersionNumber) < NSAppKitVersionNumber10_12; + return std::floor(NSAppKitVersionNumber) < NSAppKitVersionNumber10_12; } } @@ -1407,7 +1409,7 @@ void ScintillaCocoa::StartDrag() { // the full rectangle which may include non-selected text. NSBitmapImageRep *bitmap = NULL; - CGImageRef imagePixmap = pixmap.GetImage(); + CGImageRef imagePixmap = pixmap.CreateImage(); if (imagePixmap) bitmap = [[NSBitmapImageRep alloc] initWithCGImage: imagePixmap]; CGImageRelease(imagePixmap); @@ -2173,26 +2175,39 @@ bool ScintillaCocoa::KeyboardInput(NSEvent *event) { /** * Used to insert already processed text provided by the Cocoa text input system. */ -ptrdiff_t ScintillaCocoa::InsertText(NSString *input) { - CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), - vs.styles[STYLE_DEFAULT].characterSet); - std::string encoded = EncodedBytesString((__bridge CFStringRef)input, encoding); - - if (encoded.length() > 0) { - if (encoding == kCFStringEncodingUTF8) { - // There may be multiple characters in input so loop over them - std::string_view sv = encoded; - while (sv.length()) { - const unsigned char leadByte = sv[0]; - const unsigned int bytesInCharacter = UTF8BytesOfLead[leadByte]; - AddCharUTF(sv.data(), bytesInCharacter, false); - sv.remove_prefix(bytesInCharacter); - } - } else { - AddCharUTF(encoded.c_str(), static_cast(encoded.length()), false); - } +ptrdiff_t ScintillaCocoa::InsertText(NSString *input, CharacterSource charSource) { + if ([input length] == 0) { + return 0; + } + + // There may be multiple characters in input so loop over them + if (IsUnicodeMode()) { + // There may be non-BMP characters as 2 elements in NSString so + // convert to UTF-8 and use UTF8BytesOfLead. + std::string encoded = EncodedBytesString((__bridge CFStringRef)input, + kCFStringEncodingUTF8); + std::string_view sv = encoded; + while (sv.length()) { + const unsigned char leadByte = sv[0]; + const unsigned int bytesInCharacter = UTF8BytesOfLead[leadByte]; + InsertCharacter(sv.substr(0, bytesInCharacter), charSource); + sv.remove_prefix(bytesInCharacter); + } + return encoded.length(); + } else { + const CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), + vs.styles[STYLE_DEFAULT].characterSet); + ptrdiff_t lengthInserted = 0; + for (NSInteger i = 0; i < [input length]; i++) { + NSString *character = [input substringWithRange:NSMakeRange(i, 1)]; + std::string encoded = EncodedBytesString((__bridge CFStringRef)character, + encoding); + lengthInserted += encoded.length(); + InsertCharacter(encoded, charSource); + } + + return lengthInserted; } - return encoded.length(); } //-------------------------------------------------------------------------------------------------- @@ -2272,7 +2287,7 @@ void ScintillaCocoa::CompositionStart() { */ void ScintillaCocoa::CompositionCommit() { pdoc->TentativeCommit(); - pdoc->DecorationSetCurrentIndicator(INDIC_IME); + pdoc->DecorationSetCurrentIndicator(INDICATOR_IME); pdoc->DecorationFillRange(0, 0, pdoc->Length()); } @@ -2486,7 +2501,7 @@ void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining layerFindIndicator = [[FindHighlightLayer alloc] init]; [content setWantsLayer: YES]; layerFindIndicator.geometryFlipped = content.layer.geometryFlipped; - if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) { + if (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) { // Content layer is unflipped on 10.9, but the indicator shows wrong unless flipped layerFindIndicator.geometryFlipped = YES; } diff --git a/scintilla/cocoa/ScintillaFramework/Info.plist b/scintilla/cocoa/ScintillaFramework/Info.plist index cd679f5d..5d376541 100644 --- a/scintilla/cocoa/ScintillaFramework/Info.plist +++ b/scintilla/cocoa/ScintillaFramework/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.1.4 + 4.2.0 CFBundleSignature ???? CFBundleVersion - 4.1.4 + 4.2.0 NSPrincipalClass diff --git a/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj b/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj index f71b1525..9a19e706 100644 --- a/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj +++ b/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 577F46B88F633198B56D088D /* LexCIL.cxx */; }; + 0ED84236A703D57578EBFD2F /* LexNim.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 47814937A6B72D2B0F065B61 /* LexNim.cxx */; }; 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E6178E393200105727 /* CaseConvert.cxx */; }; 1100F1EC178E393200105727 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E7178E393200105727 /* CaseConvert.h */; }; 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E8178E393200105727 /* CaseFolder.cxx */; }; @@ -198,6 +200,7 @@ 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F9188DDD2C00F200AE /* StringCopy.h */; }; 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056FA188DDD2C00F200AE /* SubStyles.h */; }; 28064A05190F12E100E6E47F /* LexDMIS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28064A04190F12E100E6E47F /* LexDMIS.cxx */; }; + 281225362256DD2D00AFE50C /* UniqueString.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 281225352256DD2D00AFE50C /* UniqueString.cxx */; }; 282D4A961F53FE270082E4D3 /* ILoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 282D4A951F53FE270082E4D3 /* ILoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 28804B2C1EEE232E00C0D154 /* DBCS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28804B2B1EEE232E00C0D154 /* DBCS.cxx */; }; 28A067111A36B42600B4966A /* LexHex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28A067101A36B42600B4966A /* LexHex.cxx */; }; @@ -224,19 +227,18 @@ 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */; }; 28FDA42119B6967B00BE27D7 /* LexBibTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28FDA42019B6967B00BE27D7 /* LexBibTeX.cxx */; }; 3D994BD7A5EAC4FA5B3CFBDF /* LexMaxima.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 29B042978C1F93EF42F9E4AB /* LexMaxima.cxx */; }; + 5F804AA6B60FE695863A39FE /* LexStata.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7623427695416AB1270EE023 /* LexStata.cxx */; }; 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; F437405F9F32C7DEFCA38C11 /* LexIndent.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */; }; FDC7442CAD70B9A67EF1639D /* LexSAS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */; }; - 5F804AA6B60FE695863A39FE /* LexStata.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7623427695416AB1270EE023 /* LexStata.cxx */; }; - 0ED84236A703D57578EBFD2F /* LexNim.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 47814937A6B72D2B0F065B61 /* LexNim.cxx */; }; - 00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 577F46B88F633198B56D088D /* LexCIL.cxx */; }; + AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */ = {isa = PBXBuildFile; fileRef = ADA64364A443F3E3F02D294E /* LexX12.cxx */; }; + 902B40FE926FE48538B168F1 /* LexDataflex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 362E48F5A7F79598CB0B037D /* LexDataflex.cxx */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 1100F1E6178E393200105727 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = ""; }; 1100F1E7178E393200105727 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = ""; }; @@ -429,6 +431,7 @@ 280056F9188DDD2C00F200AE /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = ""; }; 280056FA188DDD2C00F200AE /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = ""; }; 28064A04190F12E100E6E47F /* LexDMIS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMIS.cxx; path = ../../lexers/LexDMIS.cxx; sourceTree = ""; }; + 281225352256DD2D00AFE50C /* UniqueString.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniqueString.cxx; path = ../../src/UniqueString.cxx; sourceTree = ""; }; 282D4A951F53FE270082E4D3 /* ILoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILoader.h; path = ../../include/ILoader.h; sourceTree = ""; }; 282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexIndent.cxx; path = ../../lexers/LexIndent.cxx; sourceTree = SOURCE_ROOT; }; 28804B2B1EEE232E00C0D154 /* DBCS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DBCS.cxx; path = ../../src/DBCS.cxx; sourceTree = ""; }; @@ -455,16 +458,19 @@ 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info_bar_bg@2x.png"; sourceTree = ""; }; 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_busy@2x.png"; sourceTree = ""; }; 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_flipped@2x.png"; sourceTree = ""; }; + 28F2653B224C30D7000CF4A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 28FDA42019B6967B00BE27D7 /* LexBibTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBibTeX.cxx; path = ../../lexers/LexBibTeX.cxx; sourceTree = ""; }; 29B042978C1F93EF42F9E4AB /* LexMaxima.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMaxima.cxx; path = ../../lexers/LexMaxima.cxx; sourceTree = SOURCE_ROOT; }; 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = ""; }; - 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSAS.cxx; path = ../../lexers/LexSAS.cxx; sourceTree = SOURCE_ROOT; }; - 7623427695416AB1270EE023 /* LexStata.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexStata.cxx; path = ../../lexers/LexStata.cxx; sourceTree = SOURCE_ROOT; }; 47814937A6B72D2B0F065B61 /* LexNim.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNim.cxx; path = ../../lexers/LexNim.cxx; sourceTree = SOURCE_ROOT; }; 577F46B88F633198B56D088D /* LexCIL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCIL.cxx; path = ../../lexers/LexCIL.cxx; sourceTree = SOURCE_ROOT; }; + 7623427695416AB1270EE023 /* LexStata.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexStata.cxx; path = ../../lexers/LexStata.cxx; sourceTree = SOURCE_ROOT; }; + 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSAS.cxx; path = ../../lexers/LexSAS.cxx; sourceTree = SOURCE_ROOT; }; + D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + ADA64364A443F3E3F02D294E /* LexX12.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexX12.cxx; path = ../../lexers/LexX12.cxx; sourceTree = SOURCE_ROOT; }; + 362E48F5A7F79598CB0B037D /* LexDataflex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDataflex.cxx; path = ../../lexers/LexDataflex.cxx; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -590,6 +596,7 @@ 114B6ED111FA7526004FB6AB /* LexCsound.cxx */, 114B6ED211FA7526004FB6AB /* LexCSS.cxx */, 114B6ED311FA7526004FB6AB /* LexD.cxx */, + 362E48F5A7F79598CB0B037D /* LexDataflex.cxx */, 28B647071B54C0720009DC49 /* LexDiff.cxx */, 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */, 28064A04190F12E100E6E47F /* LexDMIS.cxx */, @@ -671,6 +678,7 @@ 114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */, 114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */, 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */, + ADA64364A443F3E3F02D294E /* LexX12.cxx */, 114B6F0C11FA7526004FB6AB /* LexYAML.cxx */, ); name = Lexers; @@ -772,6 +780,7 @@ 114B6F7311FA7598004FB6AB /* Style.cxx */, 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */, 114B6F7411FA7598004FB6AB /* UniConversion.cxx */, + 281225352256DD2D00AFE50C /* UniqueString.cxx */, 114B6F7511FA7598004FB6AB /* ViewStyle.cxx */, 114B6F9611FA75BE004FB6AB /* WordList.cxx */, 114B6F7611FA7598004FB6AB /* XPM.cxx */, @@ -934,13 +943,11 @@ }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + Base, + en, ); mainGroup = 0867D691FE84028FC02AAC07 /* Scintilla */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -980,6 +987,7 @@ 2744E5B60FC168C500E85C33 /* ScintillaView.mm in Sources */, 28D191A21DEA72C800159938 /* LexEDIFACT.cxx in Sources */, 28BDA1221EFB8F7C00EBD3F3 /* DefaultLexer.cxx in Sources */, + 281225362256DD2D00AFE50C /* UniqueString.cxx in Sources */, 114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */, 114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */, 28B6470C1B54C0720009DC49 /* LexBatch.cxx in Sources */, @@ -1128,6 +1136,8 @@ 5F804AA6B60FE695863A39FE /* LexStata.cxx in Sources */, 0ED84236A703D57578EBFD2F /* LexNim.cxx in Sources */, 00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */, + AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */, + 902B40FE926FE48538B168F1 /* LexDataflex.cxx in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1137,7 +1147,7 @@ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 089C1667FE841158C02AAC07 /* English */, + 28F2653B224C30D7000CF4A3 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings b/scintilla/cocoa/ScintillaFramework/en.lproj/InfoPlist.strings similarity index 100% rename from scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings rename to scintilla/cocoa/ScintillaFramework/en.lproj/InfoPlist.strings diff --git a/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj b/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj index 6934a5a5..92490849 100644 --- a/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj +++ b/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj @@ -48,14 +48,14 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; 271FA52A0F850BE20033D021 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; 271FA52B0F850BE20033D021 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; wrapsLines = 0; }; 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ScintillaFramework.xcodeproj; path = ../ScintillaFramework/ScintillaFramework.xcodeproj; sourceTree = SOURCE_ROOT; }; 2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = ""; }; + 28E78A40224C33FE00456881 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 28E78A41224C33FE00456881 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; @@ -195,13 +195,11 @@ }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + Base, + en, ); mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */; projectDirPath = ""; @@ -265,7 +263,7 @@ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 089C165DFE840E0CC02AAC07 /* English */, + 28E78A40224C33FE00456881 /* en */, ); name = InfoPlist.strings; sourceTree = ""; @@ -273,7 +271,7 @@ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( - 1DDD58150DA1D0A300B32029 /* English */, + 28E78A41224C33FE00456881 /* en */, ); name = MainMenu.xib; sourceTree = ""; diff --git a/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings b/scintilla/cocoa/ScintillaTest/en.lproj/InfoPlist.strings similarity index 100% rename from scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings rename to scintilla/cocoa/ScintillaTest/en.lproj/InfoPlist.strings diff --git a/scintilla/cocoa/ScintillaTest/English.lproj/MainMenu.xib b/scintilla/cocoa/ScintillaTest/en.lproj/MainMenu.xib similarity index 100% rename from scintilla/cocoa/ScintillaTest/English.lproj/MainMenu.xib rename to scintilla/cocoa/ScintillaTest/en.lproj/MainMenu.xib diff --git a/scintilla/cocoa/ScintillaView.mm b/scintilla/cocoa/ScintillaView.mm index 07fccc2b..084cb2fc 100644 --- a/scintilla/cocoa/ScintillaView.mm +++ b/scintilla/cocoa/ScintillaView.mm @@ -9,6 +9,8 @@ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). */ +#include + #include #include @@ -58,7 +60,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { [super tile]; #if defined(MAC_OS_X_VERSION_10_14) - if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_13) { + if (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_13) { NSRect frame = self.contentView.frame; frame.origin.x = self.verticalRulerView.requiredThickness; frame.size.width -= frame.origin.x; @@ -413,7 +415,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { } [mOwner message: SCI_SETTARGETRANGE wParam: posRange.location lParam: NSMaxRange(posRange)]; - std::string text([mOwner message: SCI_TARGETASUTF8] + 1, 0); + std::string text([mOwner message: SCI_TARGETASUTF8], 0); [mOwner message: SCI_TARGETASUTF8 wParam: 0 lParam: reinterpret_cast(&text[0])]; text = FixInvalidUTF8(text); NSString *result = @(text.c_str()); @@ -423,12 +425,14 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { // SCI_GETSTYLEAT reports a signed byte but want an unsigned to index into styles const char styleByte = static_cast([mOwner message: SCI_GETSTYLEAT wParam: posRange.location]); const long style = static_cast(styleByte); - std::string fontName([mOwner message: SCI_STYLEGETFONT wParam: style lParam: 0] + 1, 0); + std::string fontName([mOwner message: SCI_STYLEGETFONT wParam: style lParam: 0], 0); [mOwner message: SCI_STYLEGETFONT wParam: style lParam: (sptr_t)&fontName[0]]; const CGFloat fontSize = [mOwner message: SCI_STYLEGETSIZEFRACTIONAL wParam: style] / 100.0f; NSString *sFontName = @(fontName.c_str()); NSFont *font = [NSFont fontWithName: sFontName size: fontSize]; - [asResult addAttribute: NSFontAttributeName value: font range: rangeAS]; + if (font) { + [asResult addAttribute: NSFontAttributeName value: font range: rangeAS]; + } return asResult; } @@ -525,7 +529,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { else if ([aString isKindOfClass: [NSAttributedString class]]) newText = (NSString *) [aString string]; - mOwner.backend->InsertText(newText); + mOwner.backend->InsertText(newText, EditModel::CharacterSource::directInput); } //-------------------------------------------------------------------------------------------------- @@ -618,11 +622,11 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { NSRange posRangeCurrent = mOwner.backend->PositionsFromCharacters(NSMakeRange(replacementRange.location, 0)); // Note: Scintilla internally works almost always with bytes instead chars, so we need to take // this into account when determining selection ranges and such. - ptrdiff_t lengthInserted = mOwner.backend->InsertText(newText); + ptrdiff_t lengthInserted = mOwner.backend->InsertText(newText, EditModel::CharacterSource::tentativeInput); posRangeCurrent.length = lengthInserted; mMarkedTextRange = mOwner.backend->CharactersFromPositions(posRangeCurrent); // Mark the just inserted text. Keep the marked range for later reset. - [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INDIC_IME]; + [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INDICATOR_IME]; [mOwner setGeneralProperty: SCI_INDICATORFILLRANGE parameter: posRangeCurrent.location value: posRangeCurrent.length]; @@ -744,14 +748,14 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { // Only snap for positions inside the document - allow outside // for overshoot. long lineHeight = mOwner.backend->WndProc(SCI_TEXTHEIGHT, 0, 0); - rc.origin.y = roundf(static_cast(rc.origin.y) / lineHeight) * lineHeight; + rc.origin.y = std::round(static_cast(rc.origin.y) / lineHeight) * lineHeight; } // Snap to whole points - on retina displays this avoids visual debris // when scrolling horizontally. if ((rc.origin.x > 0) && (NSMaxX(rc) < contentRect.size.width)) { // Only snap for positions inside the document - allow outside // for overshoot. - rc.origin.x = roundf(static_cast(rc.origin.x)); + rc.origin.x = std::round(static_cast(rc.origin.x)); } return rc; } @@ -1233,7 +1237,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 zoomDelta += event.magnification * 10.0; - if (fabs(zoomDelta)>=1.0) { + if (std::abs(zoomDelta)>=1.0) { long zoomFactor = static_cast([self getGeneralProperty: SCI_GETZOOM] + zoomDelta); [self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value: 0]; zoomDelta = 0.0; @@ -1372,11 +1376,11 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { * input composition, depending on language, keyboard etc. */ - (void) updateIndicatorIME { - [self setColorProperty: SCI_INDICSETFORE parameter: INDIC_IME fromHTML: @"#FF0000"]; + [self setColorProperty: SCI_INDICSETFORE parameter: INDICATOR_IME fromHTML: @"#FF0000"]; const bool drawInBackground = [self message: SCI_GETPHASESDRAW] != 0; - [self setGeneralProperty: SCI_INDICSETUNDER parameter: INDIC_IME value: drawInBackground]; - [self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDIC_IME value: INDIC_PLAIN]; - [self setGeneralProperty: SCI_INDICSETALPHA parameter: INDIC_IME value: 100]; + [self setGeneralProperty: SCI_INDICSETUNDER parameter: INDICATOR_IME value: drawInBackground]; + [self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDICATOR_IME value: INDIC_PLAIN]; + [self setGeneralProperty: SCI_INDICSETALPHA parameter: INDICATOR_IME value: 100]; } //-------------------------------------------------------------------------------------------------- @@ -1398,7 +1402,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { #if defined(MAC_OS_X_VERSION_10_14) // Let SCIScrollView account for other subviews such as vertical ruler by turning off // automaticallyAdjustsContentInsets. - if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_13) { + if (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_13) { scrollView.contentView.automaticallyAdjustsContentInsets = NO; scrollView.contentView.contentInsets = NSEdgeInsetsMake(0., 0., 0., 0.); } @@ -1961,9 +1965,9 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { - (void) insertText: (id) aString { if ([aString isKindOfClass: [NSString class]]) - mBackend->InsertText(aString); + mBackend->InsertText(aString, EditModel::CharacterSource::directInput); else if ([aString isKindOfClass: [NSAttributedString class]]) - mBackend->InsertText([aString string]); + mBackend->InsertText([aString string], EditModel::CharacterSource::directInput); } //-------------------------------------------------------------------------------------------------- diff --git a/scintilla/doc/AddSource.txt b/scintilla/doc/AddSource.txt new file mode 100644 index 00000000..777f6f2c --- /dev/null +++ b/scintilla/doc/AddSource.txt @@ -0,0 +1,30 @@ +Some of the build files adapt to adding and removing source code files but most +must be modified by hand. Here is a list of directories and the build files that +must be modified or possibly need to be modified. +The Cocoa project.pbxproj file is complex and should be modified with Xcode. +The other build files can be edited manually. + +src: + cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj + gtk/makefile + qt/ScintillaEdit/ScintillaEdit.pro + qt/ScintillaEditBase/ScintillaEditBase.pro + win32/makefile + win32/scintilla.mak + -- possibly: + test/unit/makefile + test/unit/test.mak + +cocoa: + cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj + +gtk: + gtk/makefile + +qt: + qt/ScintillaEdit/ScintillaEdit.pro + qt/ScintillaEditBase/ScintillaEditBase.pro + +win32: + win32/makefile + win32/scintilla.mak diff --git a/scintilla/doc/Design.html b/scintilla/doc/Design.html index 7c408e87..931be34c 100644 --- a/scintilla/doc/Design.html +++ b/scintilla/doc/Design.html @@ -49,12 +49,12 @@ library and with limited use of templates.

- The currently supported platforms, Windows, GTK+/Linux, Cocoa and wxWidgets are fairly similar in + The currently supported platforms, Windows, GTK/Linux, Cocoa and wxWidgets are fairly similar in many ways. Each has windows, menus and bitmaps. These features generally work in similar ways so each has a way to move a window or draw a red line. Sometimes one platform requires a sequence of calls rather than a single call. At other times, the differences are more profound. Reading - the Windows clipboard occurs synchronously but reading the GTK+ clipboard requires a request + the Windows clipboard occurs synchronously but reading the GTK clipboard requires a request call that will be asynchronously answered with a message containing the clipboard data. The wxWidgets platform is available from the wxWidgets site

@@ -67,7 +67,7 @@

The portability library is defined in Platform.h and is implemented once for each platform. - PlatWin.cxx defines the Windows variants of the methods and PlatGTK.cxx the GTK+ variants. + PlatWin.cxx defines the Windows variants of the methods and PlatGTK.cxx the GTK variants.

Several of the classes here hold platform specific object identifiers and act as proxies to @@ -83,7 +83,7 @@

These are simple classes provided to hold the commonly used geometric primitives. A PRectangle follows the Mac / Windows convention of not including its bottom and right sides - instead of including all its sides as is normal in GTK+. It is not called Rectangle as this may be + instead of including all its sides as is normal in GTK. It is not called Rectangle as this may be the name of a macro on Windows.

@@ -101,7 +101,7 @@ Font

- Font holds a platform specific font identifier - HFONT for Windows, PangoFontDescription* for GTK+. It + Font holds a platform specific font identifier - HFONT for Windows, PangoFontDescription* for GTK. It does not own the identifier and so will not delete the platform font object in its destructor. Client code should call Destroy at appropriate times.

@@ -112,7 +112,7 @@ Surface is an abstraction over each platform's concept of somewhere that graphical drawing operations can be done. It may wrap an already created drawing place such as a window or be used to create a bitmap that can be drawn into and later copied onto another surface. On - Windows it wraps a HDC and possibly a HBITMAP. On GTK+ it wraps a cairo_surface_t*. + Windows it wraps a HDC and possibly a HBITMAP. On GTK it wraps a cairo_surface_t*. Other platform specific objects are created (and correctly destroyed) whenever required to perform drawing actions.

@@ -129,7 +129,7 @@

Window acts as a proxy to a platform window allowing operations such as showing, moving, redrawing, and destroying to be performed. It contains a platform specific window identifier - - HWND for Windows, GtkWidget* for GTK+. + - HWND for Windows, GtkWidget* for GTK.

ListBox @@ -143,7 +143,7 @@

Menu is a small helper class for constructing popup menus. It contains the platform specific - menu identifier - HMENU for Windows, GtkMenu* for GTK+. Most of the work in + menu identifier - HMENU for Windows, GtkMenu* for GTK. Most of the work in constructing menus requires access to platform events and so is done in the Platform Events and API layer.

@@ -224,20 +224,20 @@

Each platform uses different mechanisms for receiving events. On Windows, events are - received through messages and COM. On GTK+, callback functions are used. + received through messages and COM. On GTK, callback functions are used.

For each platform, a class is derived from ScintillaBase (and thus from Editor). This is - ScintillaWin on Windows and ScintillaGTK on GTK+. These classes are responsible for + ScintillaWin on Windows and ScintillaGTK on GTK. These classes are responsible for connecting to the platforms event mechanism and also to implement some virtual methods in Editor and ScintillaBase which are different on the platforms. For example, this layer has to - support this difference between the synchronous Windows clipboard and the asynchronous GTK+ + support this difference between the synchronous Windows clipboard and the asynchronous GTK clipboard.

The external API is defined in this layer as each platform has different preferred styles of - API - messages on Windows and function calls on GTK+. This also allows multiple APIs to be - defined on a platform. The currently available API on GTK+ is similar to the Windows API and + API - messages on Windows and function calls on GTK. This also allows multiple APIs to be + defined on a platform. The currently available API on GTK is similar to the Windows API and does not follow platform conventions well. A second API could be implemented here that did follow platform conventions.

diff --git a/scintilla/doc/Markers.png b/scintilla/doc/Markers.png index 2ad37b10..b1d0120c 100644 Binary files a/scintilla/doc/Markers.png and b/scintilla/doc/Markers.png differ diff --git a/scintilla/doc/ScintillaDoc.html b/scintilla/doc/ScintillaDoc.html index 36a1af69..e11e4226 100644 --- a/scintilla/doc/ScintillaDoc.html +++ b/scintilla/doc/ScintillaDoc.html @@ -119,7 +119,7 @@

Scintilla Documentation

-

Last edited 6 June 2018 NH

+

Last edited 22 June 2019 NH

There is an overview of the internal design of Scintilla.
@@ -130,7 +130,7 @@ A simple sample using Scintilla from Visual Basic.
Bait is a tiny sample using Scintilla - on GTK+.
+ on GTK.
A detailed description of how to write a lexer, including a discussion of folding.
@@ -151,8 +151,8 @@ of a normal Edit control, Scintilla allows control of syntax styling, folding, markers, autocompletion and call tips.

-

The GTK+ version also uses messages in a similar way to the Windows version. This is - different to normal GTK+ practice but made it easier to implement rapidly.

+

The GTK version also uses messages in a similar way to the Windows version. This is + different to normal GTK practice but made it easier to implement rapidly.

Scintilla also builds with Cocoa on OS X and with Qt, and follows the conventions of those platforms.

@@ -194,6 +194,20 @@ Equivalent to intptr_t. + + position + + Positions and lengths in document. + Equivalent to intptr_t. + + + + line + + A line number in the document. + Equivalent to intptr_t. + + const char * @@ -213,6 +227,14 @@ not: to generically handle both types, allocate one more byte than indicated and set it to NUL. + + pointer + + A memory address. + In some cases this is a pointer to a sequence of char inside Scintilla that will only be available for a limited period. + Equivalent to void *. + + colour @@ -273,12 +295,11 @@ ○
By character or UTF-16 code unitMultiple Selection and Virtual Space - scrolling - ○ Scrolling and automatic + ○ Scrolling and automatic scrollingWhite space @@ -389,7 +410,7 @@ ○ Images - ○ GTK+ + ○ GTKProvisional messages @@ -440,37 +461,38 @@ largest font in any current style. This restriction is for performance; if lines differed in height then calculations involving positioning of text would require the text to be styled first.

- SCI_GETTEXT(int length, char *text) → int
+ SCI_GETTEXT(position length, char *text) → position
SCI_SETTEXT(<unused>, const char *text)
SCI_SETSAVEPOINT
- SCI_GETLINE(int line, char *text) → int
+ SCI_GETLINE(line line, char *text) → position
SCI_REPLACESEL(<unused>, const char *text)
SCI_SETREADONLY(bool readOnly)
SCI_GETREADONLY → bool
- SCI_GETTEXTRANGE(<unused>, Sci_TextRange *tr) → int
- SCI_ALLOCATE(int bytes)
- SCI_ADDTEXT(int length, const char *text)
- SCI_ADDSTYLEDTEXT(int length, cell *c)
- SCI_APPENDTEXT(int length, const char *text)
- SCI_INSERTTEXT(int pos, const char *text)
- SCI_CHANGEINSERTION(int length, const char *text)
+ SCI_GETTEXTRANGE(<unused>, Sci_TextRange *tr) → position
+ SCI_ALLOCATE(position bytes)
+ SCI_ADDTEXT(position length, const char *text)
+ SCI_ADDSTYLEDTEXT(position length, cell *c)
+ SCI_APPENDTEXT(position length, const char *text)
+ SCI_INSERTTEXT(position pos, const char *text)
+ SCI_CHANGEINSERTION(position length, const char *text)
SCI_CLEARALL
- SCI_DELETERANGE(int start, int lengthDelete)
+ SCI_DELETERANGE(position start, position lengthDelete)
SCI_CLEARDOCUMENTSTYLE
- SCI_GETCHARAT(int pos) → int
- SCI_GETSTYLEAT(int pos) → int
- SCI_GETSTYLEDTEXT(<unused>, Sci_TextRange *tr) → int
+ SCI_GETCHARAT(position pos) → int
+ SCI_GETSTYLEAT(position pos) → int
+ SCI_GETSTYLEDTEXT(<unused>, Sci_TextRange *tr) → position
SCI_RELEASEALLEXTENDEDSTYLES
SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles) → int
- SCI_TARGETASUTF8(<unused>, char *s) → int
- SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) → int
- SCI_SETLENGTHFORENCODE(int bytes)
+ SCI_TARGETASUTF8(<unused>, char *s) → position
+ SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) → position
+ SCI_SETLENGTHFORENCODE(position bytes)
-

SCI_GETTEXT(int length, char *text NUL-terminated) → int
- This returns length-1 characters of text from the start of the document plus one - terminating 0 character. To collect all the text in a document, use SCI_GETLENGTH +

SCI_GETTEXT(position length, char *text NUL-terminated) → position
+ This returns at most length-1 characters of text from the start of the document plus one + terminating 0 character. When length-1 is beyond document length, it returns document length. + To collect all the text in a document, use SCI_GETLENGTH to get the number of characters in the document (nLen), allocate a character buffer of length nLen+1 bytes, then call SCI_GETTEXT(nLen+1, char *text). If the text argument is 0 then the length that should be allocated to store the @@ -501,11 +523,11 @@

See also: SCI_EMPTYUNDOBUFFER, SCI_GETMODIFY

-

SCI_GETLINE(int line, char *text) → int
+

SCI_GETLINE(line line, char *text) → position
This fills the buffer defined by text with the contents of the nominated line (lines start at 0). The buffer is not terminated by a 0 character. It is up to you to make sure that the buffer is long enough for the text, use SCI_LINELENGTH(int line). The returned value is the + href="#SCI_LINELENGTH">SCI_LINELENGTH(line line). The returned value is the number of characters copied to the buffer. The returned text includes any end of line characters. If you ask for a line number outside the range of lines in the document, 0 characters are copied. If the text argument is 0 then the length that should be allocated @@ -529,7 +551,7 @@ only, attempts to modify the text cause the SCN_MODIFYATTEMPTRO notification.

-

SCI_GETTEXTRANGE(<unused>, Sci_TextRange *tr) → int
+

SCI_GETTEXTRANGE(<unused>, Sci_TextRange *tr) → position
This collects the text between the positions cpMin and cpMax and copies it to lpstrText (see struct Sci_TextRange in Scintilla.h). If cpMax is -1, text is returned to the end of the @@ -543,7 +565,7 @@ SCI_GETSTYLEDTEXT, SCI_GETTEXT

-

SCI_GETSTYLEDTEXT(<unused>, Sci_TextRange *tr) → int
+

SCI_GETSTYLEDTEXT(<unused>, Sci_TextRange *tr) → position
This collects styled text into a buffer using two bytes for each cell, with the character at the lower address of each pair and the style byte at the upper address. Characters between the positions cpMin and cpMax are copied to lpstrText (see @@ -559,40 +581,40 @@ SCI_GETTEXTRANGE, SCI_GETTEXT

-

SCI_ALLOCATE(int bytes)
+

SCI_ALLOCATE(position bytes)
Allocate a document buffer large enough to store a given number of bytes. The document will not be made smaller than its current contents.

-

SCI_ADDTEXT(int length, const char *text)
+

SCI_ADDTEXT(position length, const char *text)
This inserts the first length characters from the string text at the current position. This will include any 0's in the string that you might have expected to stop the insert operation. The current position is set at the end of the inserted text, but it is not scrolled into view.

-

SCI_ADDSTYLEDTEXT(int length, cell *c)
+

SCI_ADDSTYLEDTEXT(position length, cell *c)
This behaves just like SCI_ADDTEXT, but inserts styled text.

-

SCI_APPENDTEXT(int length, const char *text)
+

SCI_APPENDTEXT(position length, const char *text)
This adds the first length characters from the string text to the end of the document. This will include any 0's in the string that you might have expected to stop the operation. The current selection is not changed and the new text is not scrolled into view.

-

SCI_INSERTTEXT(int pos, const char *text)
+

SCI_INSERTTEXT(position pos, const char *text)
This inserts the zero terminated text string at position pos or at the current position if pos is -1. If the current position is after the insertion point then it is moved along with its surrounding text but no scrolling is performed.

-

SCI_CHANGEINSERTION(int length, const char *text)
+

SCI_CHANGEINSERTION(position length, const char *text)
This may only be called from a SC_MOD_INSERTCHECK notification handler and will change the text being inserted to that provided.

SCI_CLEARALL
Unless the document is read-only, this deletes all the text.

-

SCI_DELETERANGE(int start, int lengthDelete)
+

SCI_DELETERANGE(position start, position lengthDelete)
Deletes a range of text in the document.

SCI_CLEARDOCUMENTSTYLE
@@ -600,11 +622,11 @@ SCI_CLEARDOCUMENTSTYLE can be used to clear all styling information and reset the folding state.

-

SCI_GETCHARAT(int pos) → int
+

SCI_GETCHARAT(position pos) → int
This returns the character at pos in the document or 0 if pos is negative or past the end of the document.

-

SCI_GETSTYLEAT(int pos) → int
+

SCI_GETSTYLEAT(position pos) → int
This returns the style at pos in the document, or 0 if pos is negative or past the end of the document.

@@ -640,18 +662,18 @@ struct Sci_TextRange { }; -

Specific to GTK+, Cocoa and Windows only: Access to encoded text

+

Specific to GTK, Cocoa and Windows only: Access to encoded text

-

SCI_TARGETASUTF8(<unused>, char *s) → int
+

SCI_TARGETASUTF8(<unused>, char *s) → position
This method retrieves the value of the target encoded as UTF-8 which is the default - encoding of GTK+ so is useful for retrieving text for use in other parts of the user interface, + encoding of GTK so is useful for retrieving text for use in other parts of the user interface, such as find and replace dialogs. The length of the encoded text in bytes is returned. Cocoa uses UTF-16 which is easily converted from UTF-8 so this method can be used to perform the more complex work of transcoding from the various encodings supported.

-

SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) → int
- SCI_SETLENGTHFORENCODE(int bytes)
+

SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) → position
+ SCI_SETLENGTHFORENCODE(position bytes)
SCI_ENCODEDFROMUTF8 converts a UTF-8 string into the document's encoding which is useful for taking the results of a find dialog, for example, and receiving a string of bytes that can be searched for in the document. Since the text can contain nul bytes, @@ -689,27 +711,27 @@ struct Sci_TextRange { SCI_SEARCHINTARGET such as SCFIND_MATCHCASE, SCFIND_WHOLEWORD, SCFIND_WORDSTART, and SCFIND_REGEXP can be set with SCI_SETSEARCHFLAGS.

- SCI_SETTARGETSTART(int start)
+ SCI_SETTARGETSTART(position start)
SCI_GETTARGETSTART → position
- SCI_SETTARGETEND(int end)
+ SCI_SETTARGETEND(position end)
SCI_GETTARGETEND → position
- SCI_SETTARGETRANGE(int start, int end)
+ SCI_SETTARGETRANGE(position start, position end)
SCI_TARGETFROMSELECTION
SCI_TARGETWHOLEDOCUMENT
SCI_SETSEARCHFLAGS(int searchFlags)
SCI_GETSEARCHFLAGS → int
- SCI_SEARCHINTARGET(int length, const char *text) → int
- SCI_GETTARGETTEXT(<unused>, char *text) → int
- SCI_REPLACETARGET(int length, const char *text) → int
- SCI_REPLACETARGETRE(int length, const char *text) → int
+ SCI_SEARCHINTARGET(position length, const char *text) → position
+ SCI_GETTARGETTEXT(<unused>, char *text) → position
+ SCI_REPLACETARGET(position length, const char *text) → position
+ SCI_REPLACETARGETRE(position length, const char *text) → position
SCI_GETTAG(int tagNumber, char *tagValue) → int
-

SCI_SETTARGETSTART(int start)
+

SCI_SETTARGETSTART(position start)
SCI_GETTARGETSTART → position
- SCI_SETTARGETEND(int end)
+ SCI_SETTARGETEND(position end)
SCI_GETTARGETEND → position
- SCI_SETTARGETRANGE(int start, int end)
+ SCI_SETTARGETRANGE(position start, position end)
These functions set and return the start and end of the target. When searching you can set start greater than end to find the last matching text in the target rather than the first matching text. The target is also set by a successful @@ -727,7 +749,7 @@ struct Sci_TextRange { SCI_SEARCHINTARGET. There are several option flags including a simple regular expression search.

-

SCI_SEARCHINTARGET(int length, const char *text) → int
+

SCI_SEARCHINTARGET(position length, const char *text) → position
This searches for the first occurrence of a text string in the target defined by SCI_SETTARGETSTART and SCI_SETTARGETEND. The text string is not zero terminated; the size is set by length. The search is modified by the search flags @@ -735,10 +757,10 @@ struct Sci_TextRange { text and the return value is the position of the start of the matching text. If the search fails, the result is -1.

-

SCI_GETTARGETTEXT(<unused>, char *text) → int
+

SCI_GETTARGETTEXT(<unused>, char *text) → position
Retrieve the value in the target.

-

SCI_REPLACETARGET(int length, const char *text) → int
+

SCI_REPLACETARGET(position length, const char *text) → position
If length is -1, text is a zero terminated string, otherwise length sets the number of character to replace the target with. After replacement, the target range refers to the replacement text. @@ -747,7 +769,7 @@ struct Sci_TextRange { Note that the recommended way to delete text in the document is to set the target to the text to be removed, and to perform a replace target with an empty string.

-

SCI_REPLACETARGETRE(int length, const char *text) → int
+

SCI_REPLACETARGETRE(position length, const char *text) → position
This replaces the target using regular expressions. If length is -1, text is a zero terminated string, otherwise length is the number of characters to use. The replacement string is formed from the text string with any sequences of @@ -768,6 +790,12 @@ struct Sci_TextRange { + + + + + + @@ -917,8 +945,8 @@ struct Sci_TextRange { SCI_FINDTEXT(int searchFlags, Sci_TextToFind *ft) → position
SCI_SEARCHANCHOR
- SCI_SEARCHNEXT(int searchFlags, const char *text) → int
- SCI_SEARCHPREV(int searchFlags, const char *text) → int
+ SCI_SEARCHNEXT(int searchFlags, const char *text) → position
+ SCI_SEARCHPREV(int searchFlags, const char *text) → position

SCI_FINDTEXT(int searchFlags, Sci_TextToFind *ft) → position
@@ -957,8 +985,8 @@ struct Sci_TextToFind {

SCI_SEARCHANCHOR
- SCI_SEARCHNEXT(int searchFlags, const char *text) → int
- SCI_SEARCHPREV(int searchFlags, const char *text) → int
+ SCI_SEARCHNEXT(int searchFlags, const char *text) → position
+ SCI_SEARCHPREV(int searchFlags, const char *text) → position
These messages provide relocatable search support. This allows multiple incremental interactive searches to be macro recorded while still setting the selection to found text so the find/select operation is self-contained. These three messages send SCI_PASTE
SCI_CLEAR
SCI_CANPASTE → bool
- SCI_COPYRANGE(int start, int end)
- SCI_COPYTEXT(int length, const char *text)
+ SCI_COPYRANGE(position start, position end)
+ SCI_COPYTEXT(position length, const char *text)
SCI_COPYALLOWLINE
SCI_SETPASTECONVERTENDINGS(bool convert)
SCI_GETPASTECONVERTENDINGS → bool
@@ -1023,7 +1051,7 @@ struct Sci_TextToFind { SCI_GETSELECTIONEMPTY(), which will be zero if there are any non-empty selection ranges implying that a copy or cut to the clipboard should work.

-

GTK+ does not really support SCI_CANPASTE and always returns true +

GTK does not really support SCI_CANPASTE and always returns true unless the document is read-only.

On X, the clipboard is asynchronous and may require several messages between @@ -1035,8 +1063,8 @@ struct Sci_TextToFind { is added to the clipboard which is then used in SCI_PASTE to paste the whole line before the current line.

- SCI_COPYRANGE(int start, int end)
- SCI_COPYTEXT(int length, const char *text)
+ SCI_COPYRANGE(position start, position end)
+ SCI_COPYTEXT(position length, const char *text)

SCI_COPYRANGE copies a range of text from the document to the system clipboard and SCI_COPYTEXT copies a supplied piece of text to the system clipboard.

@@ -1179,7 +1207,8 @@ struct Sci_TextToFind { and SCI_ENDUNDOACTION.

The flags argument can be UNDO_MAY_COALESCE (1) if the container action may be - coalesced along with any insertion and deletion actions into a single compound action, otherwise 0. + coalesced along with any insertion and deletion actions into a single compound action, otherwise + UNDO_NONE (0). Coalescing treats coalescible container actions as transparent so will still only group together insertions that look like typing or deletions that look like multiple uses of the Backspace or Delete keys.

@@ -1191,50 +1220,50 @@ struct Sci_TextToFind { (after the last character). If you use messages, there is nothing to stop you setting a position that is in the middle of a CRLF pair, or in the middle of a 2 byte character. However, keyboard commands will not move the caret into such positions.

- SCI_GETTEXTLENGTH → int
- SCI_GETLENGTH → int
- SCI_GETLINECOUNT → int
- SCI_LINESONSCREEN → int
+ SCI_GETTEXTLENGTH → position
+ SCI_GETLENGTH → position
+ SCI_GETLINECOUNT → line
+ SCI_LINESONSCREEN → line
SCI_GETMODIFY → bool
- SCI_SETSEL(int anchor, int caret)
- SCI_GOTOPOS(int caret)
- SCI_GOTOLINE(int line)
- SCI_SETCURRENTPOS(int caret)
+ SCI_SETSEL(position anchor, position caret)
+ SCI_GOTOPOS(position caret)
+ SCI_GOTOLINE(line line)
+ SCI_SETCURRENTPOS(position caret)
SCI_GETCURRENTPOS → position
- SCI_SETANCHOR(int anchor)
+ SCI_SETANCHOR(position anchor)
SCI_GETANCHOR → position
- SCI_SETSELECTIONSTART(int anchor)
+ SCI_SETSELECTIONSTART(position anchor)
SCI_GETSELECTIONSTART → position
- SCI_SETSELECTIONEND(int caret)
+ SCI_SETSELECTIONEND(position caret)
SCI_GETSELECTIONEND → position
- SCI_SETEMPTYSELECTION(int caret)
+ SCI_SETEMPTYSELECTION(position caret)
SCI_SELECTALL
- SCI_LINEFROMPOSITION(int pos) → int
- SCI_POSITIONFROMLINE(int line) → position
- SCI_GETLINEENDPOSITION(int line) → position
- SCI_LINELENGTH(int line) → int
- SCI_GETCOLUMN(int pos) → int
- SCI_FINDCOLUMN(int line, int column) → int
+ SCI_LINEFROMPOSITION(position pos) → line
+ SCI_POSITIONFROMLINE(line line) → position
+ SCI_GETLINEENDPOSITION(line line) → position
+ SCI_LINELENGTH(line line) → position
+ SCI_GETCOLUMN(position pos) → position
+ SCI_FINDCOLUMN(line line, position column) → position
SCI_POSITIONFROMPOINT(int x, int y) → position
SCI_POSITIONFROMPOINTCLOSE(int x, int y) → position
SCI_CHARPOSITIONFROMPOINT(int x, int y) → position
SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y) → position
- SCI_POINTXFROMPOSITION(<unused>, int pos) → int
- SCI_POINTYFROMPOSITION(<unused>, int pos) → int
+ SCI_POINTXFROMPOSITION(<unused>, position pos) → int
+ SCI_POINTYFROMPOSITION(<unused>, position pos) → int
SCI_HIDESELECTION(bool hide)
- SCI_GETSELTEXT(<unused>, char *text) → int
- SCI_GETCURLINE(int length, char *text) → int
+ SCI_GETSELTEXT(<unused>, char *text) → position
+ SCI_GETCURLINE(position length, char *text) → position
SCI_SELECTIONISRECTANGLE → bool
SCI_SETSELECTIONMODE(int selectionMode)
SCI_GETSELECTIONMODE → int
SCI_GETMOVEEXTENDSSELECTION → bool
- SCI_GETLINESELSTARTPOSITION(int line) → position
- SCI_GETLINESELENDPOSITION(int line) → position
+ SCI_GETLINESELSTARTPOSITION(line line) → position
+ SCI_GETLINESELENDPOSITION(line line) → position
SCI_MOVECARETINSIDEVIEW
- SCI_POSITIONBEFORE(int pos) → position
- SCI_POSITIONAFTER(int pos) → position
+ SCI_POSITIONBEFORE(position pos) → position
+ SCI_POSITIONAFTER(position pos) → position
SCI_TEXTWIDTH(int style, const char *text) → int
- SCI_TEXTHEIGHT(int line) → int
+ SCI_TEXTHEIGHT(line line) → int
SCI_CHOOSECARETX
SCI_MOVESELECTEDLINESUP
SCI_MOVESELECTEDLINESDOWN
@@ -1242,15 +1271,15 @@ struct Sci_TextToFind { SCI_GETMOUSESELECTIONRECTANGULARSWITCH → bool
-

SCI_GETTEXTLENGTH → int
- SCI_GETLENGTH → int
+

SCI_GETTEXTLENGTH → position
+ SCI_GETLENGTH → position
Both these messages return the length of the document in bytes.

-

SCI_GETLINECOUNT → int
+

SCI_GETLINECOUNT → line
This returns the number of lines in the document. An empty document contains 1 line. A document holding only an end of line sequence has 2 lines.

-

SCI_LINESONSCREEN → int
+

SCI_LINESONSCREEN → line
This returns the number of complete lines visible on the screen. With a constant line height, this is the vertical space available divided by the line separation. Unless you arrange to size your window to an integral number of lines, there may be a partial line visible at the bottom @@ -1268,25 +1297,25 @@ struct Sci_TextToFind { href="#SCN_SAVEPOINTLEFT">SCN_SAVEPOINTLEFT notification messages.

-

SCI_SETSEL(int anchor, int caret)
+

SCI_SETSEL(position anchor, position caret)
This message sets both the anchor and the current position. If caret is negative, it means the end of the document. If anchor is negative, it means remove any selection (i.e. set the anchor to the same position as caret). The caret is scrolled into view after this operation.

-

SCI_GOTOPOS(int caret)
+

SCI_GOTOPOS(position caret)
This removes any selection, sets the caret at caret and scrolls the view to make the caret visible, if necessary. It is equivalent to SCI_SETSEL(caret, caret). The anchor position is set the same as the current position.

-

SCI_GOTOLINE(int line)
+

SCI_GOTOLINE(line line)
This removes any selection and sets the caret at the start of line number line and scrolls the view (if needed) to make it visible. The anchor position is set the same as the current position. If line is outside the lines in the document (first line is 0), the line set is the first or last.

-

SCI_SETCURRENTPOS(int caret)
+

SCI_SETCURRENTPOS(position caret)
This sets the current position and creates a selection between the anchor and the current position. The caret is not scrolled into view.

@@ -1295,7 +1324,7 @@ struct Sci_TextToFind {

SCI_GETCURRENTPOS → position
This returns the current position.

-

SCI_SETANCHOR(int anchor)
+

SCI_SETANCHOR(position anchor)
This sets the anchor position and creates a selection between the anchor position and the current position. The caret is not scrolled into view.

@@ -1304,8 +1333,8 @@ struct Sci_TextToFind {

SCI_GETANCHOR → position
This returns the current anchor position.

-

SCI_SETSELECTIONSTART(int anchor)
- SCI_SETSELECTIONEND(int caret)
+

SCI_SETSELECTIONSTART(position anchor)
+ SCI_SETSELECTIONEND(position caret)
These set the selection based on the assumption that the anchor position is less than the current position. They do not make the caret visible. The table shows the positions of the anchor and the current position after using these messages.

@@ -1351,38 +1380,38 @@ struct Sci_TextToFind { current position or the anchor position. SCI_GETSELECTIONEND returns the larger of the two values.

-

SCI_SETEMPTYSELECTION(int caret)
+

SCI_SETEMPTYSELECTION(position caret)
This removes any selection and sets the caret at caret. The caret is not scrolled into view.

SCI_SELECTALL
This selects all the text in the document. The current position is not scrolled into view.

-

SCI_LINEFROMPOSITION(int pos) → int
+

SCI_LINEFROMPOSITION(position pos) → line
This message returns the line that contains the position pos in the document. The return value is 0 if pos <= 0. The return value is the last line if pos is beyond the end of the document.

-

SCI_POSITIONFROMLINE(int line) → position
+

SCI_POSITIONFROMLINE(line line) → position
This returns the document position that corresponds with the start of the line. If line is negative, the position of the line holding the start of the selection is returned. If line is greater than the lines in the document, the return value is -1. If line is equal to the number of lines in the document (i.e. 1 line past the last line), the return value is the end of the document.

-

SCI_GETLINEENDPOSITION(int line) → position
+

SCI_GETLINEENDPOSITION(line line) → position
This returns the position at the end of the line, before any line end characters. If line is the last line in the document (which does not have any end of line characters) or greater, the result is the size of the document. If line is negative the result is undefined.

-

SCI_LINELENGTH(int line) → int
+

SCI_LINELENGTH(line line) → position
This returns the length of the line, including any line end characters. If line is negative or beyond the last line in the document, the result is 0. If you want the length of the line not including any end of line characters, use SCI_GETLINEENDPOSITION(line) - SCI_POSITIONFROMLINE(line).

-

SCI_GETSELTEXT(<unused>, char *text NUL-terminated) → int
+

SCI_GETSELTEXT(<unused>, char *text NUL-terminated) → position
This copies the currently selected text and a terminating 0 byte to the text buffer. The buffer size should be determined by calling with a NULL pointer for the text argument SCI_GETSELTEXT(0,0). @@ -1397,7 +1426,7 @@ struct Sci_TextToFind { SCI_GETTEXTRANGE

-

SCI_GETCURLINE(int length, char *text NUL-terminated) → int
+

SCI_GETCURLINE(position length, char *text NUL-terminated) → position
This retrieves the text of the line containing the caret and returns the position within the line of the caret. Pass in char* text pointing at a buffer large enough to hold the text you wish to retrieve and a terminating 0 character. @@ -1433,8 +1462,8 @@ struct Sci_TextToFind { This returns 1 if regular caret moves will extend or reduce the selection, 0 if not. SCI_SETSELECTIONMODE toggles this setting between on and off.

-

SCI_GETLINESELSTARTPOSITION(int line) → position
- SCI_GETLINESELENDPOSITION(int line) → position
+

SCI_GETLINESELSTARTPOSITION(line line) → position
+ SCI_GETLINESELENDPOSITION(line line) → position
Retrieve the position of the start and end of the selection at the given line with INVALID_POSITION returned if no selection on this line.

@@ -1442,8 +1471,8 @@ struct Sci_TextToFind { If the caret is off the top or bottom of the view, it is moved to the nearest line that is visible to its current position. Any selection is lost.

-

SCI_POSITIONBEFORE(int pos) → position
- SCI_POSITIONAFTER(int pos) → position
+

SCI_POSITIONBEFORE(position pos) → position
+ SCI_POSITIONAFTER(position pos) → position
These messages return the position before and after another position in the document taking into account the current code page. The minimum position returned is 0 and the maximum is the last position in the document. @@ -1455,11 +1484,11 @@ struct Sci_TextToFind { be used, for example, to decide how wide to make the line number margin in order to display a given number of numerals.

-

SCI_TEXTHEIGHT(int line) → int
+

SCI_TEXTHEIGHT(line line) → int
This returns the height in pixels of a particular line. Currently all lines are the same height.

-

SCI_GETCOLUMN(int pos) → int
+

SCI_GETCOLUMN(position pos) → position
This message returns the column number of a position pos within the document taking the width of tabs into account. This returns the column number of the last tab on the line before pos, plus the number of characters between the last tab and @@ -1467,7 +1496,7 @@ struct Sci_TextToFind { characters up to the position on the line. In both cases, double byte characters count as a single character. This is probably only useful with monospaced fonts.

-

SCI_FINDCOLUMN(int line, int column) → int
+

SCI_FINDCOLUMN(line line, position column) → position
This message returns the position of a column on a line taking the width of tabs into account. It treats a multi-byte character as a single column. Column numbers, like lines start at 0.

@@ -1485,8 +1514,8 @@ struct Sci_TextToFind { window or not close to any characters. This is similar to the previous methods but finds characters rather than inter-character positions.

-

SCI_POINTXFROMPOSITION(<unused>, int pos) → int
- SCI_POINTYFROMPOSITION(<unused>, int pos) → int
+

SCI_POINTXFROMPOSITION(<unused>, position pos) → int
+ SCI_POINTYFROMPOSITION(<unused>, position pos) → int
These messages return the x and y display pixel location of text at position pos in the document.

@@ -1529,28 +1558,28 @@ struct Sci_TextToFind { but this may be sped up in some cases by indexing the line starts by character or code unit.

- SCI_POSITIONRELATIVE(int pos, int relative) → position
- SCI_POSITIONRELATIVECODEUNITS(int pos, int relative) → position
- SCI_COUNTCHARACTERS(int start, int end) → int
- SCI_COUNTCODEUNITS(int start, int end) → int
+ SCI_POSITIONRELATIVE(position pos, position relative) → position
+ SCI_POSITIONRELATIVECODEUNITS(position pos, position relative) → position
+ SCI_COUNTCHARACTERS(position start, position end) → position
+ SCI_COUNTCODEUNITS(position start, position end) → position
SCI_GETLINECHARACTERINDEX → int
SCI_ALLOCATELINECHARACTERINDEX(int lineCharacterIndex)
SCI_RELEASELINECHARACTERINDEX(int lineCharacterIndex)
- SCI_LINEFROMINDEXPOSITION(int pos, int lineCharacterIndex) → int
- SCI_INDEXPOSITIONFROMLINE(int line, int lineCharacterIndex) → position
+ SCI_LINEFROMINDEXPOSITION(position pos, int lineCharacterIndex) → line
+ SCI_INDEXPOSITIONFROMLINE(line line, int lineCharacterIndex) → position
-

SCI_POSITIONRELATIVE(int pos, int relative) → position
+

SCI_POSITIONRELATIVE(position pos, position relative) → position
Count a number of whole characters before or after the argument position and return that position. The minimum position returned is 0 and the maximum is the last position in the document. If the position goes past the document end then 0 is returned.

-

SCI_COUNTCHARACTERS(int start, int end) → int
+

SCI_COUNTCHARACTERS(position start, position end) → position
Returns the number of whole characters between two positions.

-

SCI_POSITIONRELATIVECODEUNITS(int pos, int relative) → position
- SCI_COUNTCODEUNITS(int start, int end) → int
+

SCI_POSITIONRELATIVECODEUNITS(position pos, position relative) → position
+ SCI_COUNTCODEUNITS(position start, position end) → position
These are the UTF-16 versions of SCI_POSITIONRELATIVE and SCI_COUNTCHARACTERS working in terms of UTF-16 code units.

@@ -1568,8 +1597,8 @@ struct Sci_TextToFind { Scintilla may also allocate indexes to support features like accessibility or input method editors. Only one index of each type is created for a document at a time.

-

SCI_LINEFROMINDEXPOSITION(int pos, int lineCharacterIndex) → int
- SCI_INDEXPOSITIONFROMLINE(int line, int lineCharacterIndex) → position
+

SCI_LINEFROMINDEXPOSITION(position pos, int lineCharacterIndex) → line
+ SCI_INDEXPOSITIONFROMLINE(line line, int lineCharacterIndex) → position
The document line of a particular character or code unit may be found by calling SCI_LINEFROMINDEXPOSITION with one of SC_LINECHARACTERINDEX_UTF32(1) or SC_LINECHARACTERINDEX_UTF16(2). The inverse action, finds the starting position of a document line either in characters or code units from the document start by calling @@ -1593,35 +1622,35 @@ struct Sci_TextToFind { SCI_GETSELECTIONS → int
SCI_GETSELECTIONEMPTY → bool
SCI_CLEARSELECTIONS
- SCI_SETSELECTION(int caret, int anchor)
- SCI_ADDSELECTION(int caret, int anchor)
+ SCI_SETSELECTION(position caret, position anchor)
+ SCI_ADDSELECTION(position caret, position anchor)
SCI_DROPSELECTIONN(int selection)
SCI_SETMAINSELECTION(int selection)
SCI_GETMAINSELECTION → int

- SCI_SETSELECTIONNCARET(int selection, int caret)
+ SCI_SETSELECTIONNCARET(int selection, position caret)
SCI_GETSELECTIONNCARET(int selection) → position
- SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, int space)
- SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) → int
- SCI_SETSELECTIONNANCHOR(int selection, int anchor)
+ SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, position space)
+ SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) → position
+ SCI_SETSELECTIONNANCHOR(int selection, position anchor)
SCI_GETSELECTIONNANCHOR(int selection) → position
- SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, int space)
- SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) → int
- SCI_SETSELECTIONNSTART(int selection, int anchor)
+ SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, position space)
+ SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) → position
+ SCI_SETSELECTIONNSTART(int selection, position anchor)
SCI_GETSELECTIONNSTART(int selection) → position
- SCI_SETSELECTIONNEND(int selection, int caret)
+ SCI_SETSELECTIONNEND(int selection, position caret)
SCI_GETSELECTIONNEND(int selection) → position

- SCI_SETRECTANGULARSELECTIONCARET(int caret)
+ SCI_SETRECTANGULARSELECTIONCARET(position caret)
SCI_GETRECTANGULARSELECTIONCARET → position
- SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(int space)
- SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE → int
- SCI_SETRECTANGULARSELECTIONANCHOR(int anchor)
+ SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(position space)
+ SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE → position
+ SCI_SETRECTANGULARSELECTIONANCHOR(position anchor)
SCI_GETRECTANGULARSELECTIONANCHOR → position
- SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(int space)
- SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE → int
+ SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(position space)
+ SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE → position

SCI_SETADDITIONALSELALPHA(alpha alpha)
@@ -1705,7 +1734,7 @@ struct Sci_TextToFind {

SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)
SCI_GETRECTANGULARSELECTIONMODIFIER → int
- On GTK+ and Qt, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set. + On GTK and Qt, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set. The three possible values are SCMOD_CTRL=2, SCMOD_ALT=4 (default) or SCMOD_SUPER=8. Since SCMOD_ALT may already be used by a window manager, the window manager may need configuring to allow this choice. SCMOD_SUPER is often a system dependent modifier key such as the Left Windows key on a Windows keyboard or the @@ -1724,11 +1753,11 @@ struct Sci_TextToFind { Set a single empty selection at 0 as the only selection.

- SCI_SETSELECTION(int caret, int anchor)
+ SCI_SETSELECTION(position caret, position anchor)
Set a single selection from anchor to caret as the only selection.

- SCI_ADDSELECTION(int caret, int anchor)
+ SCI_ADDSELECTION(position caret, position anchor)
Add a new selection from anchor to caret as the main selection retaining all other selections as additional selections. Since there is always at least one selection, to set a list of selections, the first selection should be @@ -1748,33 +1777,33 @@ struct Sci_TextToFind { Only an already existing selection can be made main.

- SCI_SETSELECTIONNCARET(int selection, int caret)
+ SCI_SETSELECTIONNCARET(int selection, position caret)
SCI_GETSELECTIONNCARET(int selection) → position
- SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, int space)
- SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) → int
- SCI_SETSELECTIONNANCHOR(int selection, int anchor)
+ SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, position space)
+ SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) → position
+ SCI_SETSELECTIONNANCHOR(int selection, position anchor)
SCI_GETSELECTIONNANCHOR(int selection) → position
- SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, int space)
- SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) → int
+ SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, position space)
+ SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) → position
Set or query the position and amount of virtual space for the caret and anchor of each already existing selection.

- SCI_SETSELECTIONNSTART(int selection, int anchor)
+ SCI_SETSELECTIONNSTART(int selection, position anchor)
SCI_GETSELECTIONNSTART(int selection) → position
- SCI_SETSELECTIONNEND(int selection, int caret)
+ SCI_SETSELECTIONNEND(int selection, position caret)
SCI_GETSELECTIONNEND(int selection) → position
Set or query the start and end position of each already existing selection. Mostly of use to query each range for its text. The selection parameter is zero-based.

- SCI_SETRECTANGULARSELECTIONCARET(int caret)
+ SCI_SETRECTANGULARSELECTIONCARET(position caret)
SCI_GETRECTANGULARSELECTIONCARET → position
- SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(int space)
- SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE → int
- SCI_SETRECTANGULARSELECTIONANCHOR(int anchor)
+ SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(position space)
+ SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE → position
+ SCI_SETRECTANGULARSELECTIONANCHOR(position anchor)
SCI_GETRECTANGULARSELECTIONANCHOR → position
- SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(int space)
- SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE → int
+ SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(position space)
+ SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE → position
Set or query the position and amount of virtual space for the caret and anchor of the rectangular selection. After setting the rectangular selection, this is broken down into multiple selections, one for each line.

@@ -1830,13 +1859,13 @@ struct Sci_TextToFind {

Scrolling and automatic scrolling

- SCI_SETFIRSTVISIBLELINE(int displayLine)
- SCI_GETFIRSTVISIBLELINE → int
+ SCI_SETFIRSTVISIBLELINE(line displayLine)
+ SCI_GETFIRSTVISIBLELINE → line
SCI_SETXOFFSET(int xOffset)
SCI_GETXOFFSET → int
- SCI_LINESCROLL(int columns, int lines)
+ SCI_LINESCROLL(position columns, line lines)
SCI_SCROLLCARET
- SCI_SCROLLRANGE(int secondary, int primary)
+ SCI_SCROLLRANGE(position secondary, position primary)
SCI_SETXCARETPOLICY(int caretPolicy, int caretSlop)
SCI_SETYCARETPOLICY(int caretPolicy, int @@ -1856,8 +1885,8 @@ struct Sci_TextToFind { SCI_GETENDATLASTLINE → bool
-

SCI_SETFIRSTVISIBLELINE(int displayLine)
- SCI_GETFIRSTVISIBLELINE → int
+

SCI_SETFIRSTVISIBLELINE(line displayLine)
+ SCI_GETFIRSTVISIBLELINE → line
These messages retrieve and set the line number of the first visible line in the Scintilla view. The first line in the document is numbered 0. The value is a visible line rather than a document line.

@@ -1867,7 +1896,7 @@ struct Sci_TextToFind { view. A value of 0 is the normal position with the first text column visible at the left of the view.

-

SCI_LINESCROLL(int columns, int lines)
+

SCI_LINESCROLL(position columns, line lines)
This will attempt to scroll the display by the number of columns and lines that you specify. Positive line values increase the line number at the top of the screen (i.e. they move the text upwards as far as the user is concerned), Negative line values do the reverse.

@@ -1882,7 +1911,7 @@ struct Sci_TextToFind { If the current position (this is the caret if there is no selection) is not visible, the view is scrolled to make it visible according to the current caret policy.

-

SCI_SCROLLRANGE(int secondary, int primary)
+

SCI_SCROLLRANGE(position secondary, position primary)
Scroll the argument positions and the range between them into view giving priority to the primary position then the secondary position. The behaviour is similar to SCI_SCROLLCARET @@ -2459,9 +2488,9 @@ struct Sci_TextToFind { SCI_WORDPARTRIGHTEXTEND.

- SCI_WORDENDPOSITION(int pos, bool onlyWordCharacters) → int
- SCI_WORDSTARTPOSITION(int pos, bool onlyWordCharacters) → int
- SCI_ISRANGEWORD(int start, int end) → bool
+ SCI_WORDENDPOSITION(position pos, bool onlyWordCharacters) → position
+ SCI_WORDSTARTPOSITION(position pos, bool onlyWordCharacters) → position
+ SCI_ISRANGEWORD(position start, position end) → bool
SCI_SETWORDCHARS(<unused>, const char *characters)
SCI_GETWORDCHARS(<unused>, char *characters) → int
@@ -2470,20 +2499,22 @@ struct Sci_TextToFind { SCI_SETPUNCTUATIONCHARS(<unused>, const char *characters)
SCI_GETPUNCTUATIONCHARS(<unused>, char *characters) → int
SCI_SETCHARSDEFAULT
+ SCI_SETCHARACTERCATEGORYOPTIMIZATION(int countCharacters)
+ SCI_GETCHARACTERCATEGORYOPTIMIZATION → int
-

SCI_WORDENDPOSITION(int pos, bool onlyWordCharacters) → int
- SCI_WORDSTARTPOSITION(int pos, bool onlyWordCharacters) → int
+

SCI_WORDENDPOSITION(position pos, bool onlyWordCharacters) → position
+ SCI_WORDSTARTPOSITION(position pos, bool onlyWordCharacters) → position
These messages return the start and end of words using the same definition of words as used internally within Scintilla. You can set your own list of characters that count as words with SCI_SETWORDCHARS. The position sets the start or the search, which is forwards when searching for the end and backwards when searching for the start.

-

SCI_ISRANGEWORD(int start, int end) → bool
+

SCI_ISRANGEWORD(position start, position end) → bool
Is the range start..end a word or set of words? This message checks that start is at a word start transition and that end is at a word end transition. It does not check whether there are any spaces inside the range.

- SCI_ISRANGEWORD(int start, int end) → bool
+ SCI_ISRANGEWORD(position start, position end) → bool

Set onlyWordCharacters to true (1) to stop searching at the first non-word character in the search direction. If onlyWordCharacters is @@ -2597,6 +2628,15 @@ struct Sci_TextToFind { characters with codes less than 0x20, with word characters set to alphanumeric and '_'.

+

SCI_SETCHARACTERCATEGORYOPTIMIZATION(int countCharacters)
+ SCI_GETCHARACTERCATEGORYOPTIMIZATION → int
+ Optimize speed of character category features like determining whether a character is a space or number at the expense of memory. + Mostly used for Unicode documents. + The countCharacters parameter determines how many character starting from 0 are added to a look-up table with one byte used for each character. + It is reasonable to cover the set of characters likely to be used in a document so 0x100 for simple Roman text, + 0x1000 to cover most simple alphabets, 0x10000 to cover most of East Asian languages, and 0x110000 to cover all possible characters. +

+

Word keyboard commands are:

  • SCI_WORDLEFT
  • @@ -2629,14 +2669,14 @@ struct Sci_TextToFind { use the styling commands to mark errors detected by a compiler. The following commands can be used.

    SCI_GETENDSTYLED → position
    - SCI_STARTSTYLING(int start, int unused)
    - SCI_SETSTYLING(int length, int style)
    - SCI_SETSTYLINGEX(int length, const char + SCI_STARTSTYLING(position start, int unused)
    + SCI_SETSTYLING(position length, int style)
    + SCI_SETSTYLINGEX(position length, const char *styles)
    SCI_SETIDLESTYLING(int idleStyling)
    SCI_GETIDLESTYLING → int
    - SCI_SETLINESTATE(int line, int state)
    - SCI_GETLINESTATE(int line) → int
    + SCI_SETLINESTATE(line line, int state)
    + SCI_GETLINESTATE(line line) → int
    SCI_GETMAXLINESTATE → int
    @@ -2649,20 +2689,20 @@ struct Sci_TextToFind { container. The container can send SCI_GETENDSTYLED to work out where it needs to start styling. Scintilla will always ask to style whole lines.

    -

    SCI_STARTSTYLING(int start, int unused)
    +

    SCI_STARTSTYLING(position start, int unused)
    This prepares for styling by setting the styling position start to start at. The unused argument was used in earlier versions but is now ignored. After SCI_STARTSTYLING, send multiple SCI_SETSTYLING messages for each lexical entity to style or send SCI_SETSTYLINGEX to style in blocks.

    -

    SCI_SETSTYLING(int length, int style)
    +

    SCI_SETSTYLING(position length, int style)
    This message sets the style of length characters starting at the styling position and then increases the styling position by length, ready for the next call. SCI_STARTSTYLING should be called before the first call to this.

    -

    SCI_SETSTYLINGEX(int length, const char *styles)
    +

    SCI_SETSTYLINGEX(position length, const char *styles)
    As an alternative to SCI_SETSTYLING, which applies the same style to each byte, you can use this message which specifies the styles for each of length bytes from the styling position and then increases the styling position by length, ready for @@ -2687,8 +2727,8 @@ struct Sci_TextToFind { the document is displayed wrapped.

    -

    SCI_SETLINESTATE(int line, int state)
    - SCI_GETLINESTATE(int line) → int
    +

    SCI_SETLINESTATE(line line, int state)
    + SCI_GETLINESTATE(line line) → int
    As well as the 8 bits of lexical state stored for each character there is also an integer stored for each line. This can be used for longer lived parse states such as what the current scripting language is in an ASP page. Use SCI_SETLINESTATE to set the integer @@ -2900,7 +2940,7 @@ struct Sci_TextToFind { only the first 32 characters of the name are used, the name is decoded as UTF-8, and the name is not case sensitive. For internal caching, Scintilla tracks fonts by name and does care about the casing of font names, so please be consistent. - On GTK+, Pango is used to display text and the name is sent directly to Pango without transformation. + On GTK, Pango is used to display text and the name is sent directly to Pango without transformation. On Qt, the name is decoded as UTF-8. On Cocoa, the name is decoded as MacRoman.

    Sizes can be set to a whole number of points with SCI_STYLESETSIZE @@ -2952,7 +2992,7 @@ struct Sci_TextToFind { SCI_STYLESETCHARACTERSET(SCE_C_STRING, SC_CHARSET_RUSSIAN) would ensure that strings in Russian would display correctly in C and C++ (SCE_C_STRING is the style number used by the C and C++ lexer to display literal strings; it has the value 6). This - feature works differently on Windows and GTK+.
    + feature works differently on Windows and GTK.
    The default character set is SC_CHARSET_DEFAULT.

    SC_CHARSET_ANSI and SC_CHARSET_DEFAULT specify European Windows code page 1252 unless the code page is set.

    @@ -2960,7 +3000,7 @@ struct Sci_TextToFind {
- + @@ -3213,12 +3253,16 @@ struct Sci_TextToFind {

SCI_SETCARETSTYLE(int caretStyle)
SCI_GETCARETSTYLE → int
The style of the caret can be set with SCI_SETCARETSTYLE to be a line caret - (CARETSTYLE_LINE=1) or a block caret (CARETSTYLE_BLOCK=2) for insert mode combined with - a bar caret (CARETSTYLE_OVERSTRIKE_BAR=0) or a block caret (CARETSTYLE_OVERSTRIKE_BLOCK=16) for overtype mode, + (CARETSTYLE_LINE=1) or a block caret (CARETSTYLE_BLOCK=2) for insert mode (lower 4-bits, CARETSTYLE_INS_MASK) combined with + a bar caret (CARETSTYLE_OVERSTRIKE_BAR=0) or a block caret (CARETSTYLE_OVERSTRIKE_BLOCK=16) for overtype mode (bit 4), or to not draw at all (CARETSTYLE_INVISIBLE=0). The default value for insert mode is the line caret (CARETSTYLE_LINE=1), for overtype mode is the bar caret (CARETSTYLE_OVERSTRIKE_BAR=0). You can determine the current caret style setting using SCI_GETCARETSTYLE.

+

When the caret end of a range is at the end and a block caret style is chosen, the block is + drawn just inside the selection instead of after. + This can be switched with an option (CARETSTYLE_BLOCK_AFTER=256).

+

The block caret draws most combining and multibyte character sequences successfully, though some fonts like Thai Fonts (and possibly others) can sometimes appear strange when the cursor is positioned at these characters, which may result in only drawing a part of the @@ -3374,12 +3418,12 @@ struct Sci_TextToFind { SCI_GETMARGINRIGHT → int
SCI_SETFOLDMARGINCOLOUR(bool useSetting, colour back)
SCI_SETFOLDMARGINHICOLOUR(bool useSetting, colour fore)
- SCI_MARGINSETTEXT(int line, const char *text)
- SCI_MARGINGETTEXT(int line, char *text) → int
- SCI_MARGINSETSTYLE(int line, int style)
- SCI_MARGINGETSTYLE(int line) → int
- SCI_MARGINSETSTYLES(int line, const char *styles)
- SCI_MARGINGETSTYLES(int line, char *styles) → int
+ SCI_MARGINSETTEXT(line line, const char *text)
+ SCI_MARGINGETTEXT(line line, char *text) → int
+ SCI_MARGINSETSTYLE(line line, int style)
+ SCI_MARGINGETSTYLE(line line) → int
+ SCI_MARGINSETSTYLES(line line, const char *styles)
+ SCI_MARGINGETSTYLES(line line, char *styles) → int
SCI_MARGINTEXTCLEARALL
SCI_MARGINSETSTYLEOFFSET(int style)
SCI_MARGINGETSTYLEOFFSET → int
@@ -3477,12 +3521,12 @@ struct Sci_TextToFind { colour to ::GetSysColor(COLOR_3DHIGHLIGHT).

- SCI_MARGINSETTEXT(int line, const char *text)
- SCI_MARGINGETTEXT(int line, char *text) → int
- SCI_MARGINSETSTYLE(int line, int style)
- SCI_MARGINGETSTYLE(int line) → int
- SCI_MARGINSETSTYLES(int line, const char *styles)
- SCI_MARGINGETSTYLES(int line, char *styles) → int
+ SCI_MARGINSETTEXT(line line, const char *text)
+ SCI_MARGINGETTEXT(line line, char *text) → int
+ SCI_MARGINSETSTYLE(line line, int style)
+ SCI_MARGINGETSTYLE(line line) → int
+ SCI_MARGINSETSTYLES(line line, const char *styles)
+ SCI_MARGINGETSTYLES(line line, char *styles) → int
SCI_MARGINTEXTCLEARALL
Text margins are created with the type SC_MARGIN_TEXT or SC_MARGIN_RTEXT. A different string may be set for each line with SCI_MARGINSETTEXT. @@ -3532,13 +3576,13 @@ struct Sci_TextToFind {

Annotations used for inline diagnostics

- SCI_ANNOTATIONSETTEXT(int line, const char *text)
- SCI_ANNOTATIONGETTEXT(int line, char *text) → int
- SCI_ANNOTATIONSETSTYLE(int line, int style)
- SCI_ANNOTATIONGETSTYLE(int line) → int
- SCI_ANNOTATIONSETSTYLES(int line, const char *styles)
- SCI_ANNOTATIONGETSTYLES(int line, char *styles) → int
- SCI_ANNOTATIONGETLINES(int line) → int
+ SCI_ANNOTATIONSETTEXT(line line, const char *text)
+ SCI_ANNOTATIONGETTEXT(line line, char *text) → int
+ SCI_ANNOTATIONSETSTYLE(line line, int style)
+ SCI_ANNOTATIONGETSTYLE(line line) → int
+ SCI_ANNOTATIONSETSTYLES(line line, const char *styles)
+ SCI_ANNOTATIONGETSTYLES(line line, char *styles) → int
+ SCI_ANNOTATIONGETLINES(line line) → int
SCI_ANNOTATIONCLEARALL
SCI_ANNOTATIONSETVISIBLE(int visible)
SCI_ANNOTATIONGETVISIBLE → int
@@ -3547,13 +3591,13 @@ struct Sci_TextToFind {

- SCI_ANNOTATIONSETTEXT(int line, const char *text)
- SCI_ANNOTATIONGETTEXT(int line, char *text) → int
- SCI_ANNOTATIONSETSTYLE(int line, int style)
- SCI_ANNOTATIONGETSTYLE(int line) → int
- SCI_ANNOTATIONSETSTYLES(int line, const char *styles)
- SCI_ANNOTATIONGETSTYLES(int line, char *styles) → int
- SCI_ANNOTATIONGETLINES(int line) → int
+ SCI_ANNOTATIONSETTEXT(line line, const char *text)
+ SCI_ANNOTATIONGETTEXT(line line, char *text) → int
+ SCI_ANNOTATIONSETSTYLE(line line, int style)
+ SCI_ANNOTATIONGETSTYLE(line line) → int
+ SCI_ANNOTATIONSETSTYLES(line line, const char *styles)
+ SCI_ANNOTATIONGETSTYLES(line line, char *styles) → int
+ SCI_ANNOTATIONGETLINES(line line) → int
SCI_ANNOTATIONCLEARALL
A different string may be set for each line with SCI_ANNOTATIONSETTEXT. To clear annotations call SCI_ANNOTATIONSETTEXT with a NULL pointer. @@ -3668,12 +3712,12 @@ struct Sci_TextToFind { These messages turn buffered drawing on or off and report the buffered drawing state. Buffered drawing draws each line into a bitmap rather than directly to the screen and then copies the bitmap to the screen. This avoids flickering although it does take longer. The default is for - drawing to be buffered on Win32 and GTK+ and to not be buffered on Cocoa and Qt. + drawing to be buffered on Win32 and GTK and to not be buffered on Cocoa and Qt. Buffered drawing is not supported on Cocoa.

Current platforms perform window buffering so it is almost always better for this option to be turned off. - For Win32 and GTK+, client code should turn off buffering at initialisation. + For Win32 and GTK, client code should turn off buffering at initialisation. There are some older platforms and unusual modes where buffering may still be useful.

@@ -3774,7 +3818,7 @@ struct Sci_TextToFind { Scintilla may ignore this call in some cases. For example, the inline behaviour might only be supported for some languages.

When the inline IME mode is active, characters are added tentatively before being finalised and an SCN_CHARADDED - notification is sent for each character.

+ notification (with characterSource set to SC_CHARACTERSOURCE_TENTATIVE_INPUT) is sent for each character.

These bidirectional features are experimental and incomplete.
@@ -3803,23 +3847,23 @@ struct Sci_TextToFind {

SCI_GRABFOCUS
SCI_SETFOCUS(bool focus)
SCI_GETFOCUS → bool
- Scintilla can be told to grab the focus with this message. This is needed more on GTK+ where - focus handling is more complicated than on Windows.

+ Scintilla can be told to grab the focus with SCI_GRABFOCUS. + This is needed more on GTK where focus handling is more complicated than on Windows.

The internal focus flag can be set with SCI_SETFOCUS. This is used by clients that have complex focus requirements such as having their own window that gets the real focus but with the need to indicate that Scintilla has the logical focus.

Brace highlighting

- SCI_BRACEHIGHLIGHT(int posA, int + SCI_BRACEHIGHLIGHT(position posA, position posB)
- SCI_BRACEBADLIGHT(int pos)
+ SCI_BRACEBADLIGHT(position pos)
SCI_BRACEHIGHLIGHTINDICATOR(bool useSetting, int indicator)
SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)
- SCI_BRACEMATCH(int pos, int maxReStyle) → position
+ SCI_BRACEMATCH(position pos, int maxReStyle) → position
-

SCI_BRACEHIGHLIGHT(int posA, int posB)
+

SCI_BRACEHIGHLIGHT(position posA, position posB)
Up to two characters can be highlighted in a 'brace highlighting style', which is defined as style number STYLE_BRACELIGHT (34). If you have enabled indent guides, you may also wish to highlight the indent that corresponds @@ -3827,7 +3871,7 @@ struct Sci_TextToFind { href="#SCI_GETCOLUMN">SCI_GETCOLUMN and highlight the indent with SCI_SETHIGHLIGHTGUIDE.

-

SCI_BRACEBADLIGHT(int pos)
+

SCI_BRACEBADLIGHT(position pos)
If there is no matching brace then the brace badlighting style, style STYLE_BRACEBAD (35), can be used to show the brace that is unmatched. Using a position of INVALID_POSITION (-1) removes the @@ -3839,7 +3883,7 @@ struct Sci_TextToFind {

SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)
Use specified indicator to highlight non matching brace instead of changing its style.

-

SCI_BRACEMATCH(int pos, int maxReStyle) → position
+

SCI_BRACEMATCH(position pos, int maxReStyle) → position
The SCI_BRACEMATCH message finds a corresponding matching brace given pos, the position of one brace. The brace characters handled are '(', ')', '[', ']', '{', '}', '<', and '>'. The search is forwards from an opening brace and backwards @@ -3870,9 +3914,9 @@ struct Sci_TextToFind { you to generate code.

SCI_SETTABWIDTH(int tabWidth)
SCI_GETTABWIDTH → int
- SCI_CLEARTABSTOPS(int line)
- SCI_ADDTABSTOP(int line, int x)
- SCI_GETNEXTTABSTOP(int line, int x) → int
+ SCI_CLEARTABSTOPS(line line)
+ SCI_ADDTABSTOP(line line, int x)
+ SCI_GETNEXTTABSTOP(line line, int x) → int
SCI_SETUSETABS(bool useTabs)
SCI_GETUSETABS → bool
SCI_SETINDENT(int indentSize)
@@ -3882,14 +3926,14 @@ struct Sci_TextToFind { SCI_SETBACKSPACEUNINDENTS(bool bsUnIndents)
SCI_GETBACKSPACEUNINDENTS → bool
- SCI_SETLINEINDENTATION(int line, int + SCI_SETLINEINDENTATION(line line, int indentation)
- SCI_GETLINEINDENTATION(int line) → int
- SCI_GETLINEINDENTPOSITION(int line) → position
+ SCI_GETLINEINDENTATION(line line) → int
+ SCI_GETLINEINDENTPOSITION(line line) → position
SCI_SETINDENTATIONGUIDES(int indentView)
SCI_GETINDENTATIONGUIDES → int
- SCI_SETHIGHLIGHTGUIDE(int column)
- SCI_GETHIGHLIGHTGUIDE → int
+ SCI_SETHIGHLIGHTGUIDE(position column)
+ SCI_GETHIGHLIGHTGUIDE → position

SCI_SETTABWIDTH(int tabWidth)
@@ -3898,9 +3942,9 @@ struct Sci_TextToFind { character in STYLE_DEFAULT. The default tab width is 8 characters. There are no limits on tab sizes, but values less than 1 or large values may have undesirable effects.

-

SCI_CLEARTABSTOPS(int line)
- SCI_ADDTABSTOP(int line, int x)
- SCI_GETNEXTTABSTOP(int line, int x) → int
+

SCI_CLEARTABSTOPS(line line)
+ SCI_ADDTABSTOP(line line, int x)
+ SCI_GETNEXTTABSTOP(line line, int x) → int
SCI_CLEARTABSTOPS clears explicit tabstops on a line. SCI_ADDTABSTOP adds an explicit tabstop at the specified distance from the left (in pixels), and SCI_GETNEXTTABSTOP gets the next explicit tabstop position set after the given x position, @@ -3933,13 +3977,13 @@ struct Sci_TextToFind { unindent rather than insert a tab character or delete a character with the SCI_SETTABINDENTS and SCI_SETBACKSPACEUNINDENTS functions.

-

SCI_SETLINEINDENTATION(int line, int indentation)
- SCI_GETLINEINDENTATION(int line) → int
+

SCI_SETLINEINDENTATION(line line, int indentation)
+ SCI_GETLINEINDENTATION(line line) → int
The amount of indentation on a line can be discovered and set with SCI_GETLINEINDENTATION and SCI_SETLINEINDENTATION. The indentation is measured in character columns, which correspond to the width of space characters.

-

SCI_GETLINEINDENTPOSITION(int line) → position
+

SCI_GETLINEINDENTPOSITION(line line) → position
This returns the position at the end of indentation of a line.

SCI_SETINDENTATIONGUIDES(int indentView)
@@ -3983,8 +4027,8 @@ struct Sci_TextToFind {

SCFIND_NONEDefault setting is case-insensitive literal match.
SCFIND_MATCHCASE
Character Set WindowsGTK+GTK Cocoa
-

SCI_SETHIGHLIGHTGUIDE(int column)
- SCI_GETHIGHLIGHTGUIDE → int
+

SCI_SETHIGHLIGHTGUIDE(position column)
+ SCI_GETHIGHLIGHTGUIDE → position
When brace highlighting occurs, the indentation guide corresponding to the braces may be highlighted with the brace highlighting style, STYLE_BRACELIGHT (34). Set column to 0 to @@ -4031,14 +4075,14 @@ struct Sci_TextToFind { back)
SCI_MARKERENABLEHIGHLIGHT(bool enabled)
SCI_MARKERSETALPHA(int markerNumber, alpha alpha)
- SCI_MARKERADD(int line, int markerNumber) → int
- SCI_MARKERADDSET(int line, int markerSet)
- SCI_MARKERDELETE(int line, int + SCI_MARKERADD(line line, int markerNumber) → int
+ SCI_MARKERADDSET(line line, int markerSet)
+ SCI_MARKERDELETE(line line, int markerNumber)
SCI_MARKERDELETEALL(int markerNumber)
- SCI_MARKERGET(int line) → int
- SCI_MARKERNEXT(int lineStart, int markerMask) → int
- SCI_MARKERPREVIOUS(int lineStart, int markerMask) → int
+ SCI_MARKERGET(line line) → int
+ SCI_MARKERNEXT(line lineStart, int markerMask) → line
+ SCI_MARKERPREVIOUS(line lineStart, int markerMask) → line
SCI_MARKERLINEFROMHANDLE(int markerHandle) → int
SCI_MARKERDELETEHANDLE(int markerHandle)
@@ -4060,7 +4104,8 @@ struct Sci_TextToFind { SC_MARK_BACKGROUND, SC_MARK_LEFTRECT, SC_MARK_FULLRECT, - SC_MARK_BOOKMARK, and + SC_MARK_BOOKMARK, + SC_MARK_VERTICALBOOKMARK, and SC_MARK_UNDERLINE.

@@ -4252,7 +4297,7 @@ struct Sci_TextToFind { they are of SC_MARK_BACKGROUND or SC_MARK_UNDERLINE types, they may be drawn translucently by setting an alpha value.

-

SCI_MARKERADD(int line, int markerNumber) → int
+

SCI_MARKERADD(line line, int markerNumber) → int
This message adds marker number markerNumber to a line. The message returns -1 if this fails (illegal line number, out of memory) or it returns a marker handle number that identifies the added marker. You can use this returned handle with -

SCI_MARKERADDSET(int line, int markerSet)
+

SCI_MARKERADDSET(line line, int markerSet)
This message can add one or more markers to a line with a single call, specified in the same "one-bit-per-marker" 32-bit integer format returned by
SCI_MARKERGET (and used by the mask-based marker search functions @@ -4272,7 +4317,7 @@ struct Sci_TextToFind { SCI_MARKERADD, no check is made to see if any of the markers are already present on the targeted line.

-

SCI_MARKERDELETE(int line, int markerNumber)
+

SCI_MARKERDELETE(line line, int markerNumber)
This searches the given line number for the given marker number and deletes it if it is present. If you added the same marker more than once to the line, this will delete one copy each time it is used. If you pass in a marker number of -1, all markers are deleted from the @@ -4282,12 +4327,12 @@ struct Sci_TextToFind { This removes markers of the given number from all lines. If markerNumber is -1, it deletes all markers from all lines.

-

SCI_MARKERGET(int line) → int
+

SCI_MARKERGET(line line) → int
This returns a 32-bit integer that indicates which markers were present on the line. Bit 0 is set if marker 0 is present, bit 1 for marker 1 and so on.

-

SCI_MARKERNEXT(int lineStart, int markerMask) → int
- SCI_MARKERPREVIOUS(int lineStart, int markerMask) → int
+

SCI_MARKERNEXT(line lineStart, int markerMask) → line
+ SCI_MARKERPREVIOUS(line lineStart, int markerMask) → line
These messages search efficiently for lines that include a given set of markers. The search starts at line number lineStart and continues forwards to the end of the file (SCI_MARKERNEXT) or backwards to the start of the file @@ -4321,11 +4366,16 @@ struct Sci_TextToFind { They may also be invisible when used to track pieces of content for the application as INDIC_HIDDEN.

The SCI_INDIC* messages allow you to get and set the visual appearance of the - indicators. They all use an indicator argument in the range 0 to INDIC_MAX(35) + indicators. They all use an indicator argument in the range 0 to INDICATOR_MAX(35) to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use by lexers (0..7) a range for use by containers - (8=INDIC_CONTAINER .. 31=INDIC_IME-1) - and a range for IME indicators (32=INDIC_IME .. 35=INDIC_IME_MAX).

+ (8=INDICATOR_CONTAINER .. 31=INDICATOR_IME-1) + and a range for IME indicators (32=INDICATOR_IME .. 35=INDICATOR_IME_MAX).

+ +

The INDICATOR_* values used for dividing up indicators + were previously INDIC_CONTAINER, INDIC_IME, + INDIC_IME_MAX, and INDIC_MAX + but these were confused with indicator styles so the new names should be used.

Indicators are stored in a format similar to run length encoding which is efficient in both speed and storage for sparse information.

@@ -4365,15 +4415,15 @@ struct Sci_TextToFind { SCI_GETINDICATORCURRENT → int
SCI_SETINDICATORVALUE(int value)
SCI_GETINDICATORVALUE → int
- SCI_INDICATORFILLRANGE(int start, int lengthFill)
- SCI_INDICATORCLEARRANGE(int start, int lengthClear)
- SCI_INDICATORALLONFOR(int pos) → int
- SCI_INDICATORVALUEAT(int indicator, int pos) → int
- SCI_INDICATORSTART(int indicator, int pos) → int
- SCI_INDICATOREND(int indicator, int pos) → int
+ SCI_INDICATORFILLRANGE(position start, position lengthFill)
+ SCI_INDICATORCLEARRANGE(position start, position lengthClear)
+ SCI_INDICATORALLONFOR(position pos) → int
+ SCI_INDICATORVALUEAT(int indicator, position pos) → int
+ SCI_INDICATORSTART(int indicator, position pos) → int
+ SCI_INDICATOREND(int indicator, position pos) → int
- SCI_FINDINDICATORSHOW(int start, int end)
- SCI_FINDINDICATORFLASH(int start, int end)
+ SCI_FINDINDICATORSHOW(position start, position end)
+ SCI_FINDINDICATORFLASH(position start, position end)
SCI_FINDINDICATORHIDE
@@ -4550,7 +4600,7 @@ struct Sci_TextToFind { A version of INDIC_SQUIGGLE that draws using a pixmap instead of as a series of line segments for performance. - Measured to be between 3 and 6 times faster than INDIC_SQUIGGLE on GTK+. + Measured to be between 3 and 6 times faster than INDIC_SQUIGGLE on GTK. Appearance will not be as good as INDIC_SQUIGGLE on OS X in HiDPI mode. @@ -4661,8 +4711,8 @@ struct Sci_TextToFind { SCI_SETINDICATORCURRENT(int indicator)
SCI_GETINDICATORCURRENT → int
These two messages set and get the indicator that will be affected by calls to - SCI_INDICATORFILLRANGE(int start, int lengthFill) and - SCI_INDICATORCLEARRANGE(int start, int lengthClear). + SCI_INDICATORFILLRANGE(position start, position lengthFill) and + SCI_INDICATORCLEARRANGE(position start, position lengthClear).

@@ -4673,27 +4723,27 @@ struct Sci_TextToFind {

- SCI_INDICATORFILLRANGE(int start, int lengthFill)
- SCI_INDICATORCLEARRANGE(int start, int lengthClear)
+ SCI_INDICATORFILLRANGE(position start, position lengthFill)
+ SCI_INDICATORCLEARRANGE(position start, position lengthClear)
These two messages fill or clear a range for the current indicator. SCI_INDICATORFILLRANGE fills with the the current value.

- SCI_INDICATORALLONFOR(int pos) → int
+ SCI_INDICATORALLONFOR(position pos) → int
Retrieve a bitmap value representing which indicators are non-zero at a position. Only the first 32 indicators are represented in the result so no IME indicators are included.

- SCI_INDICATORVALUEAT(int indicator, int pos) → int
+ SCI_INDICATORVALUEAT(int indicator, position pos) → int
Retrieve the value of a particular indicator at a position.

- SCI_INDICATORSTART(int indicator, int pos) → int
- SCI_INDICATOREND(int indicator, int pos) → int
+ SCI_INDICATORSTART(int indicator, position pos) → int
+ SCI_INDICATOREND(int indicator, position pos) → int
Find the start or end of a range with one value from a position within the range. Can be used to iterate through the document to discover all the indicator positions.

@@ -4705,8 +4755,8 @@ struct Sci_TextToFind { While this feature is currently only implemented on OS X, it may be implemented on other platforms in the future.

-

SCI_FINDINDICATORSHOW(int start, int end)
- SCI_FINDINDICATORFLASH(int start, int end)
+

SCI_FINDINDICATORSHOW(position start, position end)
+ SCI_FINDINDICATORFLASH(position start, position end)
These two messages show and animate the find indicator. The indicator remains visible with SCI_FINDINDICATORSHOW and fades out after showing for half a second with SCI_FINDINDICATORFLASH. @@ -4747,7 +4797,7 @@ struct Sci_TextToFind {

To make use of autocompletion you must monitor each character added to the document. See SciTEBase::CharAdded() in SciTEBase.cxx for an example of autocompletion.

- SCI_AUTOCSHOW(int lengthEntered, const char + SCI_AUTOCSHOW(position lengthEntered, const char *itemList)
SCI_AUTOCCANCEL
SCI_AUTOCACTIVE → bool
@@ -4795,7 +4845,7 @@ struct Sci_TextToFind { SCI_AUTOCGETMAXWIDTH → int
-

SCI_AUTOCSHOW(int lengthEntered, const char *itemList)
+

SCI_AUTOCSHOW(position lengthEntered, const char *itemList)
This message causes a list to be displayed. lengthEntered is the number of characters of the word already entered and itemList is the list of words separated by separator characters. The initial separator character is a space but this can be set or got @@ -5023,12 +5073,12 @@ struct Sci_TextToFind { href="#SCN_DWELLEND">SCN_DWELLEND
. This method could be used in a debugger to give the value of a variable, or during editing to give information about the word under the pointer.

- SCI_CALLTIPSHOW(int pos, const char + SCI_CALLTIPSHOW(position pos, const char *definition)
SCI_CALLTIPCANCEL
SCI_CALLTIPACTIVE → bool
SCI_CALLTIPPOSSTART → position
- SCI_CALLTIPSETPOSSTART(int posStart)
+ SCI_CALLTIPSETPOSSTART(position posStart)
SCI_CALLTIPSETHLT(int highlightStart, int highlightEnd)
SCI_CALLTIPSETBACK(colour back)
@@ -5038,7 +5088,7 @@ struct Sci_TextToFind { SCI_CALLTIPSETPOSITION(bool above)
-

SCI_CALLTIPSHOW(int pos, const char *definition)
+

SCI_CALLTIPSHOW(position pos, const char *definition)
This message starts the process by displaying the call tip window. If a call tip is already active, this has no effect.
pos is the position in the document at which to align the call tip. The call @@ -5064,7 +5114,7 @@ struct Sci_TextToFind { This returns 1 if a call tip is active and 0 if it is not active.

SCI_CALLTIPPOSSTART → position
- SCI_CALLTIPSETPOSSTART(int posStart)
+ SCI_CALLTIPSETPOSSTART(position posStart)
This message returns or sets the value of the current position when SCI_CALLTIPSHOW started to display the tip.

@@ -5435,7 +5485,7 @@ struct Sci_TextToFind { SCMOD_META, and SCMOD_SUPER. On OS X, the Command key is mapped to SCMOD_CTRL and the Control key to SCMOD_META. - SCMOD_SUPER is only available on GTK+ which is commonly the Windows key. + SCMOD_SUPER is only available on GTK which is commonly the Windows key. If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers.

@@ -5535,7 +5585,7 @@ struct Sci_TextToFind { removed and the selection and caret are hidden.

Different platforms use different display surface ID types to print on. On Windows, these are - HDCs., on GTK+ 3.x cairo_t *, + HDCs., on GTK 3.x cairo_t *, and on Cocoa CGContextRef is used.

SCI_FORMATRANGE(bool draw, Sci_RangeToFormat *fr) → position
@@ -5586,7 +5636,7 @@ struct Sci_RangeToFormat { The Surface IDs are not really used for measurement (draw=0) but can be set to a bitmap context (created with CGBitmapContextCreate) to avoid runtime warnings.

-

On GTK+, the surface IDs to use can be found from the printing context with +

On GTK, the surface IDs to use can be found from the printing context with gtk_print_context_get_cairo_context(context).

chrg.cpMin and chrg.cpMax define the start position and maximum @@ -5695,10 +5745,10 @@ struct Sci_RangeToFormat { between words.

Direct access

- SCI_GETDIRECTFUNCTION → int
- SCI_GETDIRECTPOINTER → int
- SCI_GETCHARACTERPOINTER → int
- SCI_GETRANGEPOINTER(int start, int lengthRange) → int
+ SCI_GETDIRECTFUNCTION → pointer
+ SCI_GETDIRECTPOINTER → pointer
+ SCI_GETCHARACTERPOINTER → pointer
+ SCI_GETRANGEPOINTER(position start, position lengthRange) → pointer
SCI_GETGAPPOSITION → position
@@ -5726,7 +5776,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ to the native thread of the Scintilla window in which case SendMessage(hSciWnd, SCI_*, wParam, lParam) should be used to synchronize with the window's thread.

-

This feature also works on GTK+ but has no significant impact on speed.

+

This feature also works on GTK but has no significant impact on speed.

From version 1.47 on Windows, Scintilla exports a function called Scintilla_DirectFunction that can be used the same as the function returned by @@ -5734,18 +5784,18 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETDIRECTFUNCTION and the need to call Scintilla indirectly via the function pointer.

-

SCI_GETDIRECTFUNCTION → int
+

SCI_GETDIRECTFUNCTION → pointer
This message returns the address of the function to call to handle Scintilla messages without the overhead of passing through the Windows messaging system. You need only call this once, regardless of the number of Scintilla windows you create.

-

SCI_GETDIRECTPOINTER → int
+

SCI_GETDIRECTPOINTER → pointer
This returns a pointer to data that identifies which Scintilla window is in use. You must call this once for each Scintilla window you create. When you call the direct function, you must pass in the direct pointer associated with the target window.

-

SCI_GETCHARACTERPOINTER → int
- SCI_GETRANGEPOINTER(int start, int lengthRange) → int
+

SCI_GETCHARACTERPOINTER → pointer
+ SCI_GETRANGEPOINTER(position start, position lengthRange) → pointer
SCI_GETGAPPOSITION → position
Grant temporary direct read-only access to the memory used by Scintilla to store the document.

@@ -5787,26 +5837,23 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ documents in a single Scintilla window and so you can display a single document in multiple windows (for use with splitter windows).

-

Although these messages use document *doc, to ensure compatibility with future - releases of Scintilla you should treat doc as an opaque void*. That +

These messages use pointer returns and arguments to refer to documents. + They point to internal objects inside Scintilla and should be treated as an opaque void*. That is, you can use and store the pointer as described in this section but you should not dereference it.

- SCI_GETDOCPOINTER → document *
- SCI_SETDOCPOINTER(<unused>, document - *doc)
- SCI_CREATEDOCUMENT(int bytes, int documentOptions) → document *
- SCI_ADDREFDOCUMENT(<unused>, document - *doc)
- SCI_RELEASEDOCUMENT(<unused>, document - *doc)
+ SCI_GETDOCPOINTER → pointer
+ SCI_SETDOCPOINTER(<unused>, pointer doc)
+ SCI_CREATEDOCUMENT(position bytes, int documentOptions) → pointer
+ SCI_ADDREFDOCUMENT(<unused>, pointer doc)
+ SCI_RELEASEDOCUMENT(<unused>, pointer doc)
SCI_GETDOCUMENTOPTIONS → int
-

SCI_GETDOCPOINTER → document *
+

SCI_GETDOCPOINTER → pointer
This returns a pointer to the document currently in use by the window. It has no other effect.

-

SCI_SETDOCPOINTER(<unused>, document *doc)
+

SCI_SETDOCPOINTER(<unused>, pointer doc)
This message does the following:
1. It removes the current window from the list held by the current document.
2. It reduces the reference count of the current document by 1.
@@ -5816,7 +5863,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ window.
6. If doc was not 0, its reference count is increased by 1.

-

SCI_CREATEDOCUMENT(int bytes, int documentOptions) → document *
+

SCI_CREATEDOCUMENT(position bytes, int documentOptions) → pointer
This message creates a new, empty document and returns a pointer to it. This document is not selected into the editor and starts with a reference count of 1. This means that you have ownership of it and must either reduce its reference count by 1 after using @@ -5883,7 +5930,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -

SCI_ADDREFDOCUMENT(<unused>, document *doc)
+

SCI_ADDREFDOCUMENT(<unused>, pointer doc)
This increases the reference count of a document by 1. If you want to replace the current document in the Scintilla window and take ownership of the current document, for example if you are editing many documents in one window, do the following:
@@ -5893,7 +5940,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ 3. Use SCI_SETDOCPOINTER(0, docNew) to set a different document or SCI_SETDOCPOINTER(0, 0) to set a new, empty document.

-

SCI_RELEASEDOCUMENT(<unused>, document *doc)
+

SCI_RELEASEDOCUMENT(<unused>, pointer doc)
This message reduces the reference count of the document identified by doc. doc must be the result of SCI_GETDOCPOINTER or SCI_CREATEDOCUMENT and must point at a document that still exists. If you call this on a document with a reference @@ -5911,7 +5958,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

Loading in the background

- SCI_CREATELOADER(int bytes, int documentOptions) → int
+ SCI_CREATELOADER(position bytes, int documentOptions) → pointer

An application can load all of a file into a buffer it allocates on a background thread and then add the data in that buffer @@ -5920,7 +5967,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

To avoid these issues, a loader object may be created and used to load the file. The loader object supports the ILoader interface.

-

SCI_CREATELOADER(int bytes, int documentOptions) → int
+

SCI_CREATELOADER(position bytes, int documentOptions) → pointer
Create an object that supports the ILoader interface which can be used to load data and then be turned into a Scintilla document object for attachment to a view object. The bytes argument determines the initial memory allocation for the document as it is more efficient @@ -5981,36 +6028,39 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ markers and a folding margin to complete your folding implementation. The "fold" property should be set to "1" with SCI_SETPROPERTY("fold", "1") to enable folding.

- SCI_VISIBLEFROMDOCLINE(int docLine) → int
- SCI_DOCLINEFROMVISIBLE(int displayLine) → int
- SCI_SHOWLINES(int lineStart, int lineEnd)
- SCI_HIDELINES(int lineStart, int lineEnd)
- SCI_GETLINEVISIBLE(int line) → bool
+ SCI_VISIBLEFROMDOCLINE(line docLine) → line
+ SCI_DOCLINEFROMVISIBLE(line displayLine) → line
+ SCI_SHOWLINES(line lineStart, line lineEnd)
+ SCI_HIDELINES(line lineStart, line lineEnd)
+ SCI_GETLINEVISIBLE(line line) → bool
SCI_GETALLLINESVISIBLE → bool
- SCI_SETFOLDLEVEL(int line, int level)
- SCI_GETFOLDLEVEL(int line) → int
+ SCI_SETFOLDLEVEL(line line, int level)
+ SCI_GETFOLDLEVEL(line line) → int
SCI_SETAUTOMATICFOLD(int automaticFold)
SCI_GETAUTOMATICFOLD → int
SCI_SETFOLDFLAGS(int flags)
- SCI_GETLASTCHILD(int line, int level) → int
- SCI_GETFOLDPARENT(int line) → int
- SCI_SETFOLDEXPANDED(int line, bool + SCI_GETLASTCHILD(line line, int level) → line
+ SCI_GETFOLDPARENT(line line) → line
+ SCI_SETFOLDEXPANDED(line line, bool expanded)
- SCI_GETFOLDEXPANDED(int line) → bool
- SCI_CONTRACTEDFOLDNEXT(int lineStart) → int
- SCI_TOGGLEFOLD(int line)
- SCI_TOGGLEFOLDSHOWTEXT(int line, const char *text)
+ SCI_GETFOLDEXPANDED(line line) → bool
+ SCI_CONTRACTEDFOLDNEXT(line lineStart) → line
+ SCI_TOGGLEFOLD(line line)
+ SCI_TOGGLEFOLDSHOWTEXT(line line, const char *text)
SCI_FOLDDISPLAYTEXTSETSTYLE(int style)
- SCI_FOLDLINE(int line, int action)
- SCI_FOLDCHILDREN(int line, int action)
+ SCI_FOLDDISPLAYTEXTGETSTYLE → int
+ SCI_SETDEFAULTFOLDDISPLAYTEXT(<unused>, const char *text)
+ SCI_GETDEFAULTFOLDDISPLAYTEXT(<unused>, char *text) → int
+ SCI_FOLDLINE(line line, int action)
+ SCI_FOLDCHILDREN(line line, int action)
SCI_FOLDALL(int action)
- SCI_EXPANDCHILDREN(int line, int level)
- SCI_ENSUREVISIBLE(int line)
- SCI_ENSUREVISIBLEENFORCEPOLICY(int + SCI_EXPANDCHILDREN(line line, int level)
+ SCI_ENSUREVISIBLE(line line)
+ SCI_ENSUREVISIBLEENFORCEPOLICY(line line)
-

SCI_VISIBLEFROMDOCLINE(int docLine) → int
+

SCI_VISIBLEFROMDOCLINE(line docLine) → line
When some lines are hidden and/or annotations are displayed, then a particular line in the document may be displayed at a different position to its document position. If no lines are hidden and there are no annotations, @@ -6021,7 +6071,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ docLine is outside the range of lines in the document, the return value is -1. Lines can occupy more than one display line if they wrap.

-

SCI_DOCLINEFROMVISIBLE(int displayLine) → int
+

SCI_DOCLINEFROMVISIBLE(line displayLine) → line
When some lines are hidden and/or annotations are displayed, then a particular line in the document may be displayed at a different position to its document position. This message returns the document line number that @@ -6030,9 +6080,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ displayLine is greater than or equal to the number of displayed lines, the result is the number of lines in the document.

-

SCI_SHOWLINES(int lineStart, int lineEnd)
- SCI_HIDELINES(int lineStart, int lineEnd)
- SCI_GETLINEVISIBLE(int line) → bool
+

SCI_SHOWLINES(line lineStart, line lineEnd)
+ SCI_HIDELINES(line lineStart, line lineEnd)
+ SCI_GETLINEVISIBLE(line line) → bool
SCI_GETALLLINESVISIBLE → bool
The first two messages mark a range of lines as visible or invisible and then redraw the display. @@ -6043,8 +6093,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ These messages have no effect on fold levels or fold flags. The first line can not be hidden.

-

SCI_SETFOLDLEVEL(int line, int level)
- SCI_GETFOLDLEVEL(int line) → int
+

SCI_SETFOLDLEVEL(line line, int level)
+ SCI_GETFOLDLEVEL(line line) → int
These two messages set and get a 32-bit value that contains the fold level of a line and some flags associated with folding. The fold level is a number in the range 0 to SC_FOLDLEVELNUMBERMASK (0x0FFF). However, the initial fold level is set to @@ -6137,7 +6187,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

This message causes the display to redraw.

-

SCI_GETLASTCHILD(int line, int level) → int
+

SCI_GETLASTCHILD(line line, int level) → line
This message searches for the next line after line, that has a folding level that is less than or equal to level and then returns the previous line number. If you set level to -1, level is set to the folding level of line @@ -6145,14 +6195,14 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -1)
returns the last line that would be in made visible or hidden by toggling the fold state.

-

SCI_GETFOLDPARENT(int line) → int
+

SCI_GETFOLDPARENT(line line) → line
This message returns the line number of the first line before line that is marked as a fold point with SC_FOLDLEVELHEADERFLAG and has a fold level less than the line. If no line is found, or if the header flags and fold levels are inconsistent, the return value is -1.

-

SCI_TOGGLEFOLD(int line)
- SCI_TOGGLEFOLDSHOWTEXT(int line, const char *text)
+

SCI_TOGGLEFOLD(line line)
+ SCI_TOGGLEFOLDSHOWTEXT(line line, const char *text)
Each fold point may be either expanded, displaying all its child lines, or contracted, hiding all the child lines. These messages toggle the folding state of the given line as long as it has the SC_FOLDLEVELHEADERFLAG set. These messages take care of folding or expanding @@ -6160,11 +6210,13 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

An optional text tag may be shown to the right of the folded text with the text argument to SCI_TOGGLEFOLDSHOWTEXT. + The default text for all header lines can be set with SCI_SETDEFAULTFOLDDISPLAYTEXT. The text is drawn with the STYLE_FOLDDISPLAYTEXT style.

SCI_FOLDDISPLAYTEXTSETSTYLE(int style)
- This message changes the appearance of fold text tags.

+ SCI_FOLDDISPLAYTEXTGETSTYLE → int
+ These message changes the appearance of fold text tags.

@@ -6196,8 +6248,12 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
-

SCI_SETFOLDEXPANDED(int line, bool expanded)
- SCI_GETFOLDEXPANDED(int line) → bool
+

SCI_SETDEFAULTFOLDDISPLAYTEXT(<unused>, const char *text)
+ SCI_GETDEFAULTFOLDDISPLAYTEXT(<unused>, char *text) → int
+ These messages set and get the default text displayed at the right of the folded text.

+ +

SCI_SETFOLDEXPANDED(line line, bool expanded)
+ SCI_GETFOLDEXPANDED(line line) → bool
These messages set and get the expanded state of a single line. The set message has no effect on the visible state of the line or any lines that depend on it. It does change the markers in the folding margin. If you ask for the expansion state of a line that is outside the document, @@ -6209,8 +6265,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ until you had finished. See SciTEBase::FoldAll() and SciTEBase::Expand() for examples of the use of these messages.

-

SCI_FOLDLINE(int line, int action)
- SCI_FOLDCHILDREN(int line, int action)
+

SCI_FOLDLINE(line line, int action)
+ SCI_FOLDCHILDREN(line line, int action)
SCI_FOLDALL(int action)
These messages provide a higher-level approach to folding instead of setting expanded flags and showing or hiding individual lines.

@@ -6250,7 +6306,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -

SCI_EXPANDCHILDREN(int line, int level)
+

SCI_EXPANDCHILDREN(line line, int level)
This is used to respond to a change to a line causing its fold level or whether it is a header to change, perhaps when adding or removing a '{'.

By the time the container has received the notification that the line has changed, @@ -6304,15 +6360,15 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -

SCI_CONTRACTEDFOLDNEXT(int lineStart) → int
+

SCI_CONTRACTEDFOLDNEXT(line lineStart) → line
Search efficiently for lines that are contracted fold headers. This is useful when saving the user's folding when switching documents or saving folding with a file. The search starts at line number lineStart and continues forwards to the end of the file. lineStart is returned if it is a contracted fold header otherwise the next contracted fold header is returned. If there are no more contracted fold headers then -1 is returned.

-

SCI_ENSUREVISIBLE(int line)
- SCI_ENSUREVISIBLEENFORCEPOLICY(int line)
+

SCI_ENSUREVISIBLE(line line)
+ SCI_ENSUREVISIBLEENFORCEPOLICY(line line)
A line may be hidden because more than one of its parent lines is contracted. Both these message travels up the fold hierarchy, expanding any contracted folds until they reach the top level. The line will then be visible. If you use SCI_ENSUREVISIBLEENFORCEPOLICY, @@ -6337,7 +6393,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETPOSITIONCACHE → int
SCI_LINESSPLIT(int pixelWidth)
SCI_LINESJOIN
- SCI_WRAPCOUNT(int docLine) → int
+ SCI_WRAPCOUNT(line docLine) → line

By default, Scintilla does not wrap lines of text. If you enable line wrapping, lines wider @@ -6585,7 +6641,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ Where this would lead to no space between words, an extra space is inserted.

-

SCI_WRAPCOUNT(int docLine) → int
+

SCI_WRAPCOUNT(line docLine) → line
Document lines can occupy more than one display line if they wrap and this returns the number of display lines needed to wrap a document line.

@@ -6618,12 +6674,12 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ colouring the background of characters that exceed the set length.

SCI_SETEDGEMODE(int edgeMode)
SCI_GETEDGEMODE → int
- SCI_SETEDGECOLUMN(int column)
- SCI_GETEDGECOLUMN → int
+ SCI_SETEDGECOLUMN(position column)
+ SCI_GETEDGECOLUMN → position
SCI_SETEDGECOLOUR(colour edgeColour)
SCI_GETEDGECOLOUR → colour

- SCI_MULTIEDGEADDLINE(int column, colour edgeColour)
+ SCI_MULTIEDGEADDLINE(position column, colour edgeColour)
SCI_MULTIEDGECLEARALL
@@ -6687,8 +6743,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -

SCI_SETEDGECOLUMN(int column)
- SCI_GETEDGECOLUMN → int
+

SCI_SETEDGECOLUMN(position column)
+ SCI_GETEDGECOLUMN → position
These messages set and get the column number at which to display the long line marker. When drawing lines, the column sets a position in units of the width of a space character in STYLE_DEFAULT. When setting the background colour, the column is a character count @@ -6699,7 +6755,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ These messages set and get the colour of the marker used to show that a line has exceeded the length set by SCI_SETEDGECOLUMN.

-

SCI_MULTIEDGEADDLINE(int column, +

SCI_MULTIEDGEADDLINE(position column, colour edgeColour)
SCI_MULTIEDGECLEARALL
SCI_MULTIEDGEADDLINE adds a new vertical edge to the view. The edge will be @@ -6711,7 +6767,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

Scintilla supports some platform accessibility features. This support differs between platforms. - On GTK+ and Cocoa the platform accessibility APIs are implemented sufficiently to + On GTK and Cocoa the platform accessibility APIs are implemented sufficiently to make screen readers work. On Win32, the system caret is manipulated to help screen readers.

@@ -6727,7 +6783,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

On most platforms, accessibility is either implemented or not implemented and this can be discovered with SCI_GETACCESSIBILITY with SCI_SETACCESSIBILITY performing no action. - On GTK+, there are storage and performance costs to accessibility, so it can be disabled + On GTK, there are storage and performance costs to accessibility, so it can be disabled by calling SCI_SETACCESSIBILITY.

@@ -6769,7 +6825,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ styling and fold points for an unsupported language you can either do this in the container or better still, write your own lexer following the pattern of one of the existing ones.

-

Scintilla also supports external lexers. These are DLLs (on Windows) or .so modules (on GTK+/Linux) that export three +

Scintilla also supports external lexers. These are DLLs (on Windows) or .so modules (on GTK/Linux) that export three functions: GetLexerCount, GetLexerName, and GetLexerFactory. See externalLexer.cxx for more.

SCI_SETLEXER(int lexer)
@@ -6779,8 +6835,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETLEXERLANGUAGE(<unused>, char *language) → int
SCI_LOADLEXERLIBRARY(<unused>, const char *path)
- SCI_COLOURISE(int start, int end)
- SCI_CHANGELEXERSTATE(int start, int end) → int
+ SCI_COLOURISE(position start, position end)
+ SCI_CHANGELEXERSTATE(position start, position end) → int
SCI_PROPERTYNAMES(<unused>, char *names) → int
SCI_PROPERTYTYPE(const char *name) → int
SCI_DESCRIBEPROPERTY(const char *name, char *description) → int
@@ -6801,7 +6857,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETSTYLEFROMSUBSTYLE(int subStyle) → int
SCI_GETPRIMARYSTYLEFROMSTYLE(int style) → int
SCI_SETIDENTIFIERS(int style, const char *identifiers)
- SCI_PRIVATELEXERCALL(int operation, int pointer) → int
+ SCI_PRIVATELEXERCALL(int operation, pointer pointer) → pointer
SCI_GETNAMEDSTYLES → int
SCI_NAMEOFSTYLE(int style, char *name) → int
SCI_TAGSOFSTYLE(int style, char *tags) → int
@@ -6834,10 +6890,10 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

SCI_GETLEXERLANGUAGE retrieves the name of the lexer.

SCI_LOADLEXERLIBRARY(<unused>, const char *path)
- Load a lexer implemented in a shared library. This is a .so file on GTK+/Linux or a .DLL file on Windows. + Load a lexer implemented in a shared library. This is a .so file on GTK/Linux or a .DLL file on Windows.

-

SCI_COLOURISE(int start, int end)
+

SCI_COLOURISE(position start, position end)
This requests the current lexer or the container (if the lexer is set to SCLEX_CONTAINER) to style the document between start and end. If end is -1, the document is styled from @@ -6845,7 +6901,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ "1" and your lexer or container supports folding, fold levels are also set. This message causes a redraw.

-

SCI_CHANGELEXERSTATE(int start, int end) → int
+

SCI_CHANGELEXERSTATE(position start, position end) → int
Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw.

@@ -6980,7 +7036,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ Similar to SCI_SETKEYWORDS but for substyles. The prefix feature available with SCI_SETKEYWORDS is not implemented for SCI_SETIDENTIFIERS.

-

SCI_PRIVATELEXERCALL(int operation, int pointer) → int
+

SCI_PRIVATELEXERCALL(int operation, pointer pointer) → pointer
Call into a lexer in a way not understood by Scintilla.

Style Metadata

@@ -7167,7 +7223,7 @@ removing the mask parameter to StartStyling.

occurred that may interest the container.

Notifications are sent using the WM_NOTIFY message on Windows.

-

On GTK+, the "sci-notify" signal is sent and the signal handler should have the signature +

On GTK, the "sci-notify" signal is sent and the signal handler should have the signature handler(GtkWidget *, gint, SCNotification *notification, gpointer userData).

On Cocoa, a delegate implementing the ScintillaNotificationProtocol may be set to receive notifications or the ScintillaView class may be subclassed and the @@ -7220,7 +7276,7 @@ struct SCNotification { int updated; /* SCN_UPDATEUI */ int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */ - + int characterSource; /* SCN_CHARADDED */ }; @@ -7277,7 +7333,7 @@ struct SCNotification { The WM_COMMAND message is used on Windows. This emulates the Windows Edit control. Only the lower 16 bits of the control's ID is passed in these notifications.

-

On GTK+, the "command" signal is sent and the signal handler should have the signature +

On GTK, the "command" signal is sent and the signal handler should have the signature handler(GtkWidget *, gint wParam, gpointer lParam, gpointer userData).

SCEN_CHANGE
SCEN_SETFOCUS
@@ -7316,9 +7372,50 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); This is sent when the user types an ordinary text character (as opposed to a command character) that is entered into the text. The container can use this to decide to display a call tip or an auto - completion list. The character is in SCNotification.ch. + completion list. The character is in SCNotification::ch. + For single byte character sets, this is the byte value of the character; + for UTF-8, it is the Unicode code point; + for DBCS, it is (first byte * 256 + second byte) for 2 byte characters and the byte value for 1 byte characters. This notification is sent before the character has been styled so processing that depends on styling should instead be performed in the SCN_UPDATEUI notification.

+

The SCNotification::characterSource field is the source of the character.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueMeaning
SC_CHARACTERSOURCE_DIRECT_INPUT0Direct input characters, including characters generated by calling keyboard commands like SCI_NEWLINE.
SC_CHARACTERSOURCE_TENTATIVE_INPUT1Tentative input characters. They are used by IME (inline mode, see SCI_SETIMEINTERACTION) + to composite final string, normally different from final composited string (which is the string that has been truly added into current document), + and may be withdrawn when the user cancels typing (e.g. by pressing Esc key). + Some system (at least Cocoa) also use tentative input for non-IME features like using dead key to composite diacritical marks (grave accent, etc.). + These characters are not added to macro recording. Most applications can simply ignore the notification when this value is set. +
SC_CHARACTERSOURCE_IME_RESULT2IME (either inline or windowed mode) full composited string. Modern IME is able to composite English word or sentence, + when this value is set, current character may not a Chinese, Japanese or Korean character. + Currently, this is only set on Windows.

SCN_SAVEPOINTREACHED
SCN_SAVEPOINTLEFT
@@ -7334,8 +7431,8 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); href="#SCI_SETREADONLY">SCI_SETREADONLY
.

SCN_KEY
- Reports all keys pressed but not consumed by Scintilla. Used on GTK+ because of - some problems with keyboard focus and is not sent by the Windows version. SCNotification.ch holds the key code and + Reports all keys pressed but not consumed by Scintilla. Used on GTK because of + some problems with keyboard focus and is not sent by the Windows version. SCNotification::ch holds the key code and SCNotification.modifiers holds the modifiers. This notification is sent if the modifiers include SCMOD_ALT or SCMOD_CTRL and the key code is less than 256.

@@ -7499,6 +7596,16 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); + + SC_MOD_NONE + + 0x00 + + Base value with no fields valid. Will not occur but is useful in tests. + + + + SC_MOD_INSERTTEXT @@ -7746,7 +7853,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber);

SCEN_CHANGE
SCEN_CHANGE (768) is fired when the text (not the style) of the document changes. This notification is sent using the WM_COMMAND message on Windows and the - "command" signal on GTK+ as this is the behaviour of the standard Edit control + "command" signal on GTK as this is the behaviour of the standard Edit control (SCEN_CHANGE has the same value as the Windows Edit control EN_CHANGE). No other information is sent. If you need more detailed information use SCN_MODIFIED. You can filter the @@ -7785,7 +7892,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); SCEN_KILLFOCUS
SCEN_SETFOCUS (512) is fired when Scintilla receives focus and SCEN_KILLFOCUS (256) when it loses focus. These notifications are sent using the - WM_COMMAND message on Windows and the "command" signal on GTK+ as this is the + WM_COMMAND message on Windows and the "command" signal on GTK as this is the behaviour of the standard Edit control. Unfortunately, these codes do not match the Windows Edit notification codes EN_SETFOCUS (256) and EN_KILLFOCUS (512). It is now too late to change the Scintilla codes as clients depend on the current values.

@@ -7944,7 +8051,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next See the SCN_AUTOCCOMPLETED notification for the possible values for listCompletionMethod.

SCN_URIDROPPED
- Only on the GTK+ version. Indicates that the user has dragged a URI such as a file name or Web + Only on the GTK version. Indicates that the user has dragged a URI such as a file name or Web address onto Scintilla. The container could interpret this as a request to open the file. The text field of SCNotification points at the URI text.

@@ -8218,7 +8325,7 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next If there is no suitable platform support, the LodePNG and picoPNG libraries are small libraries for loading and decoding PNG files available under a BSD-style license.

-

RGBA format is supported on Windows, GTK+ and OS X Cocoa.

+

RGBA format is supported on Windows, GTK and OS X Cocoa.

XPM

@@ -8238,8 +8345,8 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next

XPM format is supported on on all platforms.

-

GTK+

-

On GTK+, the following functions create a Scintilla widget, communicate with it and allow +

GTK

+

On GTK, the following functions create a Scintilla widget, communicate with it and allow resources to be released after all Scintilla widgets have been destroyed.

GtkWidget *scintilla_new()
void scintilla_set_id(ScintillaObject *sci, uptr_t id)
@@ -8401,7 +8508,7 @@ EM_SETTARGETDEVICE

These features have now been removed completely.

SC_CP_DBCS Removed in 2016 with release 3.7.1
- This was used to set a DBCS (Double Byte Character Set) mode on GTK+. + This was used to set a DBCS (Double Byte Character Set) mode on GTK. An explicit DBCS code page should be used when calling SCI_SETCODEPAGE

SCI_SETUSEPALETTE(bool usePalette) Removed in 2016 with release 3.7.1
@@ -8419,11 +8526,14 @@ EM_SETTARGETDEVICE directories. The compiler must support C++17. For Windows, GCC 7.1 or Microsoft Visual C++ 2017.5 can be used - for building. For GTK+, GCC 7.1 or newer should be used. GTK+ 2.24 and 3.x are - supported with glib 2.22+. The version of GTK+ installed should be detected automatically. - When both GTK+ 2 and GTK+ 3 are present, building for GTK+ 3.x requires defining GTK3 + for building. For GTK, GCC 7.1 or newer should be used. GTK 2.24 and 3.x are + supported with glib 2.22+. The version of GTK installed should be detected automatically. + When both GTK 2 and GTK 3 are present, building for GTK 3.x requires defining GTK3 on the command line.

+

Adding and removing source files from Scintilla may require modifying build files. + This is addressed in AddSource.txt.

+

Static linking

On Windows, Scintilla is normally used as a dynamic library as a .DLL file. If you want to diff --git a/scintilla/doc/ScintillaDownload.html b/scintilla/doc/ScintillaDownload.html index c144792e..ca4126a2 100644 --- a/scintilla/doc/ScintillaDownload.html +++ b/scintilla/doc/ScintillaDownload.html @@ -26,10 +26,10 @@ @@ -42,7 +42,7 @@ containing very few restrictions.

- Release 4.1.4 + Release 4.2.0

Source Code @@ -50,8 +50,8 @@ The source code package contains all of the source code for Scintilla but no binary executable code and is available in
    -
  • zip format (1700K) commonly used on Windows
  • -
  • tgz format (1500K) commonly used on Linux and compatible operating systems
  • +
  • zip format (1.7M) commonly used on Windows
  • +
  • tgz format (1.4M) commonly used on Linux and compatible operating systems
Instructions for building on both Windows and Linux are included in the readme file.

diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html index 7e7190bc..c994db92 100644 --- a/scintilla/doc/ScintillaHistory.html +++ b/scintilla/doc/ScintillaHistory.html @@ -541,10 +541,14 @@

+ + + +
- + Windows   - - GTK+/Linux   + + GTK/Linux  
Jad Altahan Andrea RicchiJuarez RudsatzWil van Antwerpen
Hodong Kim

- Images used in GTK+ version + Images used in GTK version

  • @@ -552,6 +556,173 @@ Icons Copyright(C) 1998 by Dean S. Jones
+

+ Release 4.2.0 +

+
    +
  • + Released 5 July 2019. +
  • +
  • + Scintilla.iface adds line and pointer types, increases use of the position type, uses enumeration + types in methods and properties, and adds enumeration aliases to produce better CamelCase + identifiers. + Feature #1297. +
  • +
  • + Source of input (direct / IME composition / IME result) reported in SCN_CHARADDED so applications + can treat temporary IME composition input differently. + Bug #2038. +
  • +
  • + Lexer added for DataFlex. + Feature #1295. +
  • +
  • + Matlab lexer now treats keywords as case-sensitive. + Bug #2112. +
  • +
  • + SQL lexer fixes single quoted strings where '" (quote, double quote) was seen as continuing the string. + Bug #2098. +
  • +
  • + Platform layers should use InsertCharacter method to perform keyboard and IME input, replacing + AddCharUTF method. + Feature #1293. +
  • +
  • + Add CARETSTYLE_BLOCK_AFTER option to always display block caret after selection. + Bug #1924. +
  • +
  • + On Win32, limit text returned from WM_GETTEXT to the length specified in wParam. + This could cause failures when using assistive technologies like NVDA. + Bug #2110, + Bug #2114. +
  • +
  • + Fix deletion of isolated invalid bytes. + Bug #2116. +
  • +
  • + Fix position of line caret when overstrike caret set to block. + Bug #2106. +
  • +
+

+ Release 4.1.7 +

+
    +
  • + Released 13 June 2019. +
  • +
  • + Fixes an incorrect default setting in SciTE which caused multiple visual features to fail to display. +
  • +
+

+ Release 4.1.6 +

+
    +
  • + Released 10 June 2019. +
  • +
  • + For Visual C++ 2019, /std:c++latest now includes some C++20 features so switch to /std:c++17. +
  • +
  • + SciTE supports editing files larger than 2 gigabytes when built as a 64-bit application. +
  • +
  • + Lexer added for X12. + Feature #1280. +
  • +
  • + CMake folder folds function - endfunction. + Feature #1289. +
  • +
  • + VB lexer adds support for VB2017 binary literal &B and digit separators 123_456. + Feature #1288. +
  • +
  • + Improved performance of line folding code on large files when no folds are contracted. + This improves the time taken to open or close large files. +
  • +
  • + Fix bug where changing identifier sets in lexers preserved previous identifiers. +
  • +
  • + Fixed bug where changing to Unicode would rediscover line end positions even if still + sticking to ASCII (not Unicode NEL, LS, PS) line ends. + Only noticeable on huge files with over 100,000 lines. +
  • +
  • + Changed behaviour of SCI_STYLESETCASE(*,SC_CASE_CAMEL) so that it only treats 'a-zA-Z' + as word characters because this covers the feature's intended use (viewing case-insensitive ASCII-only + keywords in a specified casing style) and simplifies the behaviour and code. + Feature #1238. +
  • +
  • + In SciTE added Camel case option "case:c" for styles to show keywords with initial capital. +
  • +
+

+ Release 4.1.5 +

+
    +
  • + Released 17 April 2019. +
  • +
  • + On Win32, removed special handling of non-0 wParam to WM_PAINT. +
  • +
  • + Implement high-priority idle on Win32 to make redraw smoother and more efficient. +
  • +
  • + Add vertical bookmark symbol SC_MARK_VERTICALBOOKMARK. + Feature #1276. +
  • +
  • + Set default fold display text SCI_SETDEFAULTFOLDDISPLAYTEXT(text). + Feature #1272. +
  • +
  • + Add SCI_SETCHARACTERCATEGORYOPTIMIZATION API to optimize speed + of character category features like determining whether a character is a space or number + at the expense of memory. + Feature #1259. +
  • +
  • + Improve the styling of numbers in Nim. + Feature #1268. +
  • +
  • + Fix exception when inserting DBCS text. + Bug #2093. +
  • +
  • + Improve performance of accessibility on GTK. + Bug #2094. +
  • +
  • + Fix text reported for deletion with accessibility on GTK. + Bug #2095. +
  • +
  • + Fix flicker when inserting primary selection on GTK. + Bug #2087. +
  • +
  • + Support coloured text in Windows 8.1+. + Feature #1277. +
  • +
  • + Avoid potential long hangs with idle styling for huge documents on Cocoa and GTK. +
  • +

Release 4.1.4

@@ -1217,7 +1388,7 @@
  • This is the first release of the - long term branch + long term branch which avoids using features from C++14 or later in order to support older systems.
  • diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html index ec0858dc..86b240aa 100644 --- a/scintilla/doc/index.html +++ b/scintilla/doc/index.html @@ -9,7 +9,7 @@ - +