From 0152ded3fff592721f5fe2b45701c643c4e3a53c Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 22 Mar 2011 00:16:49 +0000 Subject: [PATCH] [UPDATE] Scintilla update from 2.21 to 2.25 git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@742 f5eea248-9336-0410-98b8-ebc06183d4e3 --- scintilla/README | 8 +- scintilla/cocoa/Framework.mk | 19 +- scintilla/cocoa/PlatCocoa.mm | 2 +- scintilla/cocoa/ScintillaCocoa.mm | 27 +- .../project.pbxproj | 16 + .../cocoa/ScintillaTest/AppController.mm | 2 +- .../ScintillaTest.xcodeproj/project.pbxproj | 7 + scintilla/cocoa/ScintillaView.h | 7 + scintilla/cocoa/ScintillaView.mm | 87 +- scintilla/doc/ScintillaDoc.html | 240 +- scintilla/doc/ScintillaDownload.html | 10 +- scintilla/doc/ScintillaHistory.html | 348 +++ scintilla/doc/ScintillaRelated.html | 4 + scintilla/doc/ScintillaToDo.html | 3 +- scintilla/doc/index.html | 20 +- scintilla/gtk/PlatGTK.cxx | 309 +- scintilla/gtk/ScintillaGTK.cxx | 45 +- scintilla/gtk/makefile | 10 +- scintilla/include/HFacer.py | 1 + scintilla/include/Platform.h | 8 +- scintilla/include/SciLexer.h | 42 + scintilla/include/Scintilla.h | 13 + scintilla/include/Scintilla.iface | 73 +- scintilla/lexers/LexA68k.cxx | 318 ++ scintilla/lexers/LexAPDL.cxx | 1 - scintilla/lexers/LexASY.cxx | 1 - scintilla/lexers/LexAU3.cxx | 1 - scintilla/lexers/LexAVE.cxx | 1 - scintilla/lexers/LexAbaqus.cxx | 1 - scintilla/lexers/LexAda.cxx | 1 - scintilla/lexers/LexAsm.cxx | 326 +- scintilla/lexers/LexAsn1.cxx | 1 - scintilla/lexers/LexBaan.cxx | 1 - scintilla/lexers/LexBash.cxx | 13 +- scintilla/lexers/LexBasic.cxx | 372 ++- scintilla/lexers/LexBullant.cxx | 1 - scintilla/lexers/LexCLW.cxx | 1 - scintilla/lexers/LexCOBOL.cxx | 1 - scintilla/lexers/LexCPP.cxx | 163 +- scintilla/lexers/LexCSS.cxx | 1 - scintilla/lexers/LexCmake.cxx | 1 - scintilla/lexers/LexConf.cxx | 1 - scintilla/lexers/LexCrontab.cxx | 1 - scintilla/lexers/LexCsound.cxx | 1 - scintilla/lexers/LexD.cxx | 275 +- scintilla/lexers/LexEScript.cxx | 1 - scintilla/lexers/LexEiffel.cxx | 1 - scintilla/lexers/LexErlang.cxx | 1 - scintilla/lexers/LexFlagship.cxx | 1 - scintilla/lexers/LexForth.cxx | 1 - scintilla/lexers/LexFortran.cxx | 3 +- scintilla/lexers/LexGAP.cxx | 1 - scintilla/lexers/LexGui4Cli.cxx | 1 - scintilla/lexers/LexHTML.cxx | 17 +- scintilla/lexers/LexInno.cxx | 1 - scintilla/lexers/LexKix.cxx | 1 - scintilla/lexers/LexLisp.cxx | 1 - scintilla/lexers/LexLout.cxx | 1 - scintilla/lexers/LexLua.cxx | 1 - scintilla/lexers/LexMMIXAL.cxx | 1 - scintilla/lexers/LexMPT.cxx | 1 - scintilla/lexers/LexMSSQL.cxx | 1 - scintilla/lexers/LexMagik.cxx | 1 - scintilla/lexers/LexMarkdown.cxx | 1 - scintilla/lexers/LexMatlab.cxx | 1 - scintilla/lexers/LexMetapost.cxx | 1 - scintilla/lexers/LexModula.cxx | 743 +++++ scintilla/lexers/LexMySQL.cxx | 1 - scintilla/lexers/LexNimrod.cxx | 1 - scintilla/lexers/LexNsis.cxx | 1 - scintilla/lexers/LexOpal.cxx | 1 - scintilla/lexers/LexOthers.cxx | 9 +- scintilla/lexers/LexPB.cxx | 1 - scintilla/lexers/LexPLM.cxx | 1 - scintilla/lexers/LexPOV.cxx | 1 - scintilla/lexers/LexPS.cxx | 1 - scintilla/lexers/LexPascal.cxx | 1 - scintilla/lexers/LexPerl.cxx | 7 +- scintilla/lexers/LexPowerShell.cxx | 1 - scintilla/lexers/LexProgress.cxx | 1 - scintilla/lexers/LexPython.cxx | 1 - scintilla/lexers/LexR.cxx | 1 - scintilla/lexers/LexRebol.cxx | 1 - scintilla/lexers/LexRuby.cxx | 65 +- scintilla/lexers/LexSML.cxx | 1 - scintilla/lexers/LexSQL.cxx | 516 +++- scintilla/lexers/LexScriptol.cxx | 1 - scintilla/lexers/LexSmalltalk.cxx | 1 - scintilla/lexers/LexSorcus.cxx | 1 - scintilla/lexers/LexSpecman.cxx | 1 - scintilla/lexers/LexSpice.cxx | 1 - scintilla/lexers/LexTACL.cxx | 1 - scintilla/lexers/LexTADS3.cxx | 1 - scintilla/lexers/LexTAL.cxx | 1 - scintilla/lexers/LexTCL.cxx | 1 - scintilla/lexers/LexTeX.cxx | 1 - scintilla/lexers/LexTxt2tags.cxx | 1 - scintilla/lexers/LexVB.cxx | 1 - scintilla/lexers/LexVHDL.cxx | 1 - scintilla/lexers/LexVerilog.cxx | 1 - scintilla/lexers/LexYAML.cxx | 1 - scintilla/lexlib/CharacterSet.h | 4 +- scintilla/lexlib/LexerBase.h | 2 +- scintilla/lexlib/OptionSet.h | 2 + scintilla/lexlib/SparseState.h | 110 + scintilla/lexlib/WordList.cxx | 5 + .../SciTest/SciTest.xcode/project.pbxproj | 7 + scintilla/macosx/SciTest/main.cpp | 4 +- scintilla/macosx/ScintillaMacOSX.cxx | 2 +- scintilla/macosx/ScintillaMacOSX.h | 3 + scintilla/src/AutoComplete.cxx | 2 +- scintilla/src/CallTip.cxx | 3 + scintilla/src/Catalogue.cxx | 2 + scintilla/src/CellBuffer.cxx | 18 +- scintilla/src/CellBuffer.h | 9 +- scintilla/src/ContractionState.cxx | 17 + scintilla/src/ContractionState.h | 1 + scintilla/src/Document.cxx | 31 +- scintilla/src/Document.h | 9 +- scintilla/src/Editor.cxx | 297 +- scintilla/src/Editor.h | 16 +- scintilla/src/ExternalLexer.cxx | 1 - scintilla/src/ExternalLexer.h | 5 +- scintilla/src/LexGen.py | 9 +- scintilla/src/Partitioning.h | 5 + scintilla/src/PositionCache.cxx | 2 + scintilla/src/RESearch.cxx | 93 +- scintilla/src/RunStyles.cxx | 4 +- scintilla/src/ScintillaBase.cxx | 1 + scintilla/src/Selection.cxx | 9 + scintilla/src/Selection.h | 5 +- scintilla/src/SplitVector.h | 17 + scintilla/src/ViewStyle.cxx | 8 +- scintilla/src/ViewStyle.h | 2 + scintilla/vcbuild/SciLexer.dsp | 581 ---- scintilla/vcbuild/SciLexer.dsw | 29 - scintilla/vcbuild/SciLexer.vcproj | 2742 ----------------- scintilla/version.txt | 2 +- scintilla/win32/Margin.cur | Bin 326 -> 0 bytes scintilla/win32/PlatWin.cxx | 69 +- scintilla/win32/PlatformRes.h | 8 - scintilla/win32/ScintRes.rc | 16 +- scintilla/win32/ScintillaWin.cxx | 24 +- scintilla/win32/deps.mak | 2 +- scintilla/win32/makefile | 2 +- scintilla/win32/scintilla.mak | 93 +- scintilla/win32/scintilla_vc6.mak | 64 +- 147 files changed, 4281 insertions(+), 4249 deletions(-) create mode 100644 scintilla/lexers/LexA68k.cxx create mode 100644 scintilla/lexers/LexModula.cxx create mode 100644 scintilla/lexlib/SparseState.h delete mode 100644 scintilla/vcbuild/SciLexer.dsp delete mode 100644 scintilla/vcbuild/SciLexer.dsw delete mode 100644 scintilla/vcbuild/SciLexer.vcproj delete mode 100644 scintilla/win32/Margin.cur delete mode 100644 scintilla/win32/PlatformRes.h diff --git a/scintilla/README b/scintilla/README index 7ab21463..cada051b 100644 --- a/scintilla/README +++ b/scintilla/README @@ -40,27 +40,23 @@ The current make file only supports static linking between SciTE and Scintilla. *** Windows version *** -A C++ compiler is required. Visual Studio .NET 2008 is the development system +A C++ compiler is required. Visual Studio .NET 2010 is the development system used for most development although TDM Mingw32 4.4.1 is also supported. -For older versions of Borland C++ such as version 5.02, add the -l option. To build Scintilla, make in the scintilla/win32 directory cd scintilla\win32 GCC: mingw32-make VS .NET: nmake -f scintilla.mak -VC++ 6: nmake -f scintilla_vc6.mak -Borland: make -fscintilla.mak cd ..\.. To build SciTE, use the makefiles located in the scite/win32 directory cd scite\win32 GCC: mingw32-make VS .NET: nmake -f scite.mak -Borland: make -fscite.mak An executable SciTE will now be in scite\bin. -The Visual C++ 6.0 project (.dsp) files are no longer supported but are left +The Visual C++ 6.0 project (.dsp) and make files are no longer supported but are left in the download for people that are prepared to update them. *** GTK+/Windows version *** diff --git a/scintilla/cocoa/Framework.mk b/scintilla/cocoa/Framework.mk index 261134e0..d18ee813 100644 --- a/scintilla/cocoa/Framework.mk +++ b/scintilla/cocoa/Framework.mk @@ -6,19 +6,10 @@ INST_NAME=-install_name \ LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME) -SCI_LEXERS=LexAPDL.o LexASY.o LexAU3.o LexAVE.o LexAbaqus.o LexAda.o \ - LexAsm.o LexAsn1.o LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCLW.o \ - LexCOBOL.o LexCPP.o LexCSS.o LexCaml.o LexCmake.o LexConf.o LexCrontab.o \ - LexCsound.o LexD.o LexEScript.o LexEiffel.o LexErlang.o LexFlagship.o \ - LexForth.o LexFortran.o LexGAP.o LexGui4Cli.o LexHTML.o LexHaskell.o \ - LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMMIXAL.o LexMPT.o \ - LexMSSQL.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o LexMySQL.o \ - LexNimrod.o LexNsis.o LexOpal.o LexOthers.o LexPB.o LexPLM.o LexPOV.o \ - LexPS.o LexPascal.o LexPerl.o LexPowerPro.o LexPowerShell.o LexProgress.o \ - LexPython.o LexR.o LexRebol.o LexRuby.o LexSML.o LexSQL.o LexScriptol.o \ - LexSmalltalk.o LexSorcus.o LexSpecman.o LexSpice.o LexTACL.o LexTADS3.o \ - LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVHDL.o LexVerilog.o LexYAML.o \ - LexTxt2tags.o LexerBase.o LexerModule.o LexerSimple.o Accessor.o +LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx)))) + +SCI_LEXERS=$(LEXOBJS) \ + LexerBase.o LexerModule.o LexerSimple.o Accessor.o SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o \ ContractionState.o Decoration.o Document.o Editor.o \ @@ -77,4 +68,4 @@ $(FRM_BLD): #$(FRM_BLD)/CallTip.o : ../src/CallTip.cxx ../src/CallTip.h \ # ../include/Platform.h -### end targets ### \ No newline at end of file +### end targets ### diff --git a/scintilla/cocoa/PlatCocoa.mm b/scintilla/cocoa/PlatCocoa.mm index 09591c20..ffaa48fe 100644 --- a/scintilla/cocoa/PlatCocoa.mm +++ b/scintilla/cocoa/PlatCocoa.mm @@ -626,7 +626,7 @@ void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, C ColourDesired colour( fill.AsLong() ); // Set the Fill color to match - CGContextSetRGBFillColor( gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, colour.GetBlue() / 255.0, alphaFill / 100.0 ); + CGContextSetRGBFillColor( gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, colour.GetBlue() / 255.0, alphaFill / 255.0 ); CGRect rect = PRectangleToCGRect( rc ); CGContextFillRect( gc, rect ); } diff --git a/scintilla/cocoa/ScintillaCocoa.mm b/scintilla/cocoa/ScintillaCocoa.mm index d593dad3..6302641b 100644 --- a/scintilla/cocoa/ScintillaCocoa.mm +++ b/scintilla/cocoa/ScintillaCocoa.mm @@ -220,7 +220,8 @@ ScintillaCocoa::~ScintillaCocoa() void ScintillaCocoa::Initialise() { static bool initedLexers = false; - if (!initedLexers) { + if (!initedLexers) + { initedLexers = true; Scintilla_LinkLexers(); } @@ -525,7 +526,7 @@ void ScintillaCocoa::Paste(bool forceRectangular) return; pdoc->BeginUndoAction(); - ClearSelection(); + ClearSelection(false); int length = selectedText.len - 1; // One less to avoid inserting the terminating 0 character. if (selectedText.rectangular) { @@ -1105,25 +1106,29 @@ void ScintillaCocoa::DoScroll(float position, NSScrollerPart part, bool horizont } else { - // VerticalScrolling is by line. - int topLine = (int) (position * MaxScrollPos()); - int page = LinesOnScreen(); + // VerticalScrolling is by line. If the user is scrolling using the knob we can directly + // set the new scroll position. Otherwise we have to compute it first. + if (part == NSScrollerKnob) + ScrollTo(position * MaxScrollPos(), false); + else + { switch (part) { case NSScrollerDecrementLine: - topLine--; + ScrollTo(topLine - 1, true); break; case NSScrollerDecrementPage: - topLine -= page; + ScrollTo(topLine - LinesOnScreen(), true); break; case NSScrollerIncrementLine: - topLine++; + ScrollTo(topLine + 1, true); break; case NSScrollerIncrementPage: - topLine += page; + ScrollTo(topLine + LinesOnScreen(), true); break; }; - ScrollTo(topLine, true); + + } } } @@ -1232,7 +1237,7 @@ void ScintillaCocoa::IdleTimerFired() /** * Main entry point for drawing the control. * - * @param rect The area to paint, given in the sender's coordinate. + * @param rect The area to paint, given in the sender's coordinate system. * @param gc The context we can use to paint. */ void ScintillaCocoa::Draw(NSRect rect, CGContextRef gc) diff --git a/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj b/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj index cace9e7c..4cbedf8e 100644 --- a/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj +++ b/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj @@ -157,6 +157,8 @@ 114B6FEB11FA7645004FB6AB /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE011FA7645004FB6AB /* PropSetSimple.h */; }; 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE111FA7645004FB6AB /* StyleContext.h */; }; 114B6FED11FA7645004FB6AB /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE211FA7645004FB6AB /* WordList.h */; }; + 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */; }; + 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; }; 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -334,6 +336,8 @@ 114B6FE011FA7645004FB6AB /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = SOURCE_ROOT; }; 114B6FE111FA7645004FB6AB /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = SOURCE_ROOT; }; 114B6FE211FA7645004FB6AB /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = SOURCE_ROOT; }; + 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = SOURCE_ROOT; }; + 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; }; 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; }; 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; }; 2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; }; @@ -450,6 +454,8 @@ 2744E47D0FC1674E00E85C33 /* Lexers */ = { isa = PBXGroup; children = ( + 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */, + 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */, 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */, 114B6EBF11FA7526004FB6AB /* LexAda.cxx */, 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */, @@ -755,7 +761,14 @@ isa = PBXProject; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 0867D691FE84028FC02AAC07 /* Scintilla */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; projectDirPath = ""; @@ -900,6 +913,8 @@ 114B6F9D11FA75BE004FB6AB /* PropSetSimple.cxx in Sources */, 114B6F9E11FA75BE004FB6AB /* StyleContext.cxx in Sources */, 114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */, + 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */, + 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -924,6 +939,7 @@ COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; + EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = ".bzr *.nib *.lproj *.framework *.gch (*) CVS .svn *.xcodeproj *.xcode *.pbproj *.pbxproj"; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; diff --git a/scintilla/cocoa/ScintillaTest/AppController.mm b/scintilla/cocoa/ScintillaTest/AppController.mm index 4869dcb9..a42c8162 100644 --- a/scintilla/cocoa/ScintillaTest/AppController.mm +++ b/scintilla/cocoa/ScintillaTest/AppController.mm @@ -100,7 +100,7 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL. // alternatively: [mEditor setEditorProperty: SCI_SETLEXERLANGUAGE parameter: nil value: (sptr_t) "mysql"]; // Number of styles we use with this lexer. - [mEditor setGeneralProperty: SCI_SETSTYLEBITS parameter: 5 value: 0]; + [mEditor setGeneralProperty: SCI_SETSTYLEBITS value: [mEditor getGeneralProperty: SCI_GETSTYLEBITSNEEDED]]; // Keywords to highlight. Indices are: // 0 - Major keywords (reserved keywords) diff --git a/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj b/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj index d630e1da..39962fb3 100644 --- a/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj +++ b/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj @@ -192,7 +192,14 @@ isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */; projectDirPath = ""; projectReferences = ( diff --git a/scintilla/cocoa/ScintillaView.h b/scintilla/cocoa/ScintillaView.h index b423fa6d..6cbfbfff 100644 --- a/scintilla/cocoa/ScintillaView.h +++ b/scintilla/cocoa/ScintillaView.h @@ -43,6 +43,9 @@ extern NSString *SCIUpdateUINotification; - (void) removeMarkedText; - (void) setCursor: (Scintilla::Window::Cursor) cursor; +- (BOOL) canUndo; +- (BOOL) canRedo; + @property (retain) ScintillaView* owner; @end @@ -76,6 +79,8 @@ extern NSString *SCIUpdateUINotification; value: (float) value; - (void) setCallback: (id ) callback; +- (void) suspendDrawing: (BOOL) suspend; + // Scroller handling - (BOOL) setVerticalScrollRange: (int) range page: (int) page; - (void) setVerticalScrollPosition: (float) position; @@ -106,6 +111,8 @@ extern NSString *SCIUpdateUINotification; // Back end properties getters and setters. - (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value; +- (void) setGeneralProperty: (int) property value: (long) value; + - (long) getGeneralProperty: (int) property; - (long) getGeneralProperty: (int) property parameter: (long) parameter; - (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra; diff --git a/scintilla/cocoa/ScintillaView.mm b/scintilla/cocoa/ScintillaView.mm index 7c164242..a1406a5f 100644 --- a/scintilla/cocoa/ScintillaView.mm +++ b/scintilla/cocoa/ScintillaView.mm @@ -179,7 +179,10 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; */ - (NSMenu*) menuForEvent: (NSEvent*) theEvent { - return mOwner.backend->CreateContextMenu(theEvent); + if (![mOwner respondsToSelector: @selector(menuForEvent:)]) + return mOwner.backend->CreateContextMenu(theEvent); + else + return [mOwner menuForEvent: theEvent]; } //-------------------------------------------------------------------------------------------------- @@ -279,11 +282,9 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; { // We have already marked text. Replace that. [mOwner setGeneralProperty: SCI_SETSELECTIONSTART - parameter: mMarkedTextRange.location - value: 0]; + value: mMarkedTextRange.location]; [mOwner setGeneralProperty: SCI_SETSELECTIONEND - parameter: mMarkedTextRange.location + mMarkedTextRange.length - value: 0]; + value: mMarkedTextRange.location + mMarkedTextRange.length]; currentPosition = mMarkedTextRange.location; } @@ -296,7 +297,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; mMarkedTextRange.length = raw_text.size(); // Mark the just inserted text. Keep the marked range for later reset. - [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT parameter: INPUT_INDICATOR value: 0]; + [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INPUT_INDICATOR]; [mOwner setGeneralProperty: SCI_INDICATORFILLRANGE parameter: mMarkedTextRange.location value: mMarkedTextRange.length]; @@ -305,11 +306,9 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; if (range.length > 0) { [mOwner setGeneralProperty: SCI_SETSELECTIONSTART - parameter: currentPosition + range.location - value: 0]; + value: currentPosition + range.location]; [mOwner setGeneralProperty: SCI_SETSELECTIONEND - parameter: currentPosition + range.location + range.length - value: 0]; + value: currentPosition + range.location + range.length]; } } @@ -319,7 +318,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; { if (mMarkedTextRange.length > 0) { - [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT parameter: INPUT_INDICATOR value: 0]; + [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INPUT_INDICATOR]; [mOwner setGeneralProperty: SCI_INDICATORCLEARRANGE parameter: mMarkedTextRange.location value: mMarkedTextRange.length]; @@ -338,11 +337,9 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; { // We have already marked text. Replace that. [mOwner setGeneralProperty: SCI_SETSELECTIONSTART - parameter: mMarkedTextRange.location - value: 0]; + value: mMarkedTextRange.location]; [mOwner setGeneralProperty: SCI_SETSELECTIONEND - parameter: mMarkedTextRange.location + mMarkedTextRange.length - value: 0]; + value: mMarkedTextRange.location + mMarkedTextRange.length]; mOwner.backend->InsertText(@""); mMarkedTextRange = NSMakeRange(NSNotFound, 0); } @@ -546,6 +543,22 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; mOwner.backend->Redo(); } +- (BOOL) canUndo +{ + return mOwner.backend->CanUndo(); +} + +- (BOOL) canRedo +{ + return mOwner.backend->CanRedo(); +} + + +- (BOOL) isEditable +{ + return mOwner.backend->WndProc(SCI_GETREADONLY, 0, 0) == 0; +} + //-------------------------------------------------------------------------------------------------- - (void) dealloc @@ -621,7 +634,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; // Compute point increase/decrease based on default font size. int fontSize = [self getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT]; int zoom = (int) (fontSize * (value - 1)); - [self setGeneralProperty: SCI_SETZOOM parameter: zoom value: 0]; + [self setGeneralProperty: SCI_SETZOOM value: zoom]; break; } }; @@ -636,6 +649,20 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; //-------------------------------------------------------------------------------------------------- +/** + * Prevents drawing of the inner view to avoid flickering when doing many visual updates + * (like clearing all marks and setting new ones etc.). + */ +- (void) suspendDrawing: (BOOL) suspend +{ + if (suspend) + [[self window] disableFlushWindow]; + else + [[self window] enableFlushWindow]; +} + +//-------------------------------------------------------------------------------------------------- + /** * Notification function used by Scintilla to call us back (e.g. for handling clicks on the * folder margin or changes in the editor). @@ -660,7 +687,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa { // Click on the folder margin. Toggle the current line if possible. int line = [editor getGeneralProperty: SCI_LINEFROMPOSITION parameter: scn->position]; - [editor setGeneralProperty: SCI_TOGGLEFOLD parameter: line value: 0]; + [editor setGeneralProperty: SCI_TOGGLEFOLD value: line]; } break; }; @@ -688,6 +715,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa NSPoint caretPosition = editor->mBackend->GetCaretPosition(); [editor->mInfoBar notify: IBNCaretChanged message: nil location: caretPosition value: 0]; [editor sendNotification: SCIUpdateUINotification]; + [editor sendNotification: NSTextViewDidChangeSelectionNotification]; break; } } @@ -984,7 +1012,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa */ - (void) scrollerAction: (id) sender { - float position = [sender floatValue]; + float position = [sender doubleValue]; mBackend->DoScroll(position, [sender hitPart], sender == mHorizontalScroller); } @@ -1095,7 +1123,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa - (BOOL) isEditable { - return mBackend->WndProc(SCI_GETREADONLY, 0, 0) != 0; + return mBackend->WndProc(SCI_GETREADONLY, 0, 0) == 0; } //-------------------------------------------------------------------------------------------------- @@ -1134,6 +1162,19 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa //-------------------------------------------------------------------------------------------------- +/** + * A simplified version for setting properties which only require one parameter. + * + * @param property Main property like SCI_STYLESETFORE for which a value is to be set. + * @param value The actual value. It depends on the property what this parameter means. + */ +- (void) setGeneralProperty: (int) property value: (long) value +{ + mBackend->WndProc(property, value, 0); +} + +//-------------------------------------------------------------------------------------------------- + /** * This is a helper method to get a property in the backend, with native parameters. * @@ -1417,14 +1458,12 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa { // Highlight the found text. [self setGeneralProperty: SCI_SETSELECTIONSTART - parameter: position - value: 0]; + value: position]; [self setGeneralProperty: SCI_SETSELECTIONEND - parameter: position + [searchText length] - value: 0]; + value: position + [searchText length]]; if (scrollTo) - [self setGeneralProperty: SCI_SCROLLCARET parameter: 0 value: 0]; + [self setGeneralProperty: SCI_SCROLLCARET value: 0]; } } diff --git a/scintilla/doc/ScintillaDoc.html b/scintilla/doc/ScintillaDoc.html index b2237891..3072572c 100644 --- a/scintilla/doc/ScintillaDoc.html +++ b/scintilla/doc/ScintillaDoc.html @@ -79,7 +79,7 @@

Scintilla Documentation

-

Last edited 16/July/2010 NH

+

Last edited 19/January/2011 NH

There is an overview of the internal design of Scintilla.
@@ -937,6 +937,7 @@ struct Sci_TextToFind { SCI_GETSTATUS. To clear the error status call SCI_SETSTATUS(0). The currently defined statuses are: +

@@ -961,8 +962,6 @@ struct Sci_TextToFind {
-

-

Undo and Redo

Scintilla has multiple level undo and redo. It will continue to collect undoable actions @@ -1257,7 +1256,8 @@ struct Sci_TextToFind { the line not including any end of line characters, use SCI_GETLINEENDPOSITION(line) - SCI_POSITIONFROMLINE(line).

- SCI_GETSELTEXT(<unused>, char *text)
+ +

SCI_GETSELTEXT(<unused>, char *text)
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). @@ -1507,9 +1507,9 @@ struct Sci_TextToFind { SCI_SETADDITIONALSELALPHA(int alpha)
SCI_GETADDITIONALSELALPHA
- SCI_SETADDITIONALSELFORE(int colour)
- SCI_SETADDITIONALSELBACK(int colour)
- SCI_SETADDITIONALCARETFORE(int colour)
+ SCI_SETADDITIONALSELFORE(int colour)
+ SCI_SETADDITIONALSELBACK(int colour)
+ SCI_SETADDITIONALCARETFORE(int colour)
SCI_GETADDITIONALCARETFORE
SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)
SCI_GETADDITIONALCARETSBLINK
@@ -1661,7 +1661,7 @@ struct Sci_TextToFind {

SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)
SCI_GETADDITIONALCARETSVISIBLE
- Determine whether to show additional carets (defaults to true). + Determine whether to show additional carets (defaults to true).

SCI_SWAPMAINANCHORCARET
@@ -2076,11 +2076,11 @@ struct Sci_TextToFind { the lexer's colours with SCI_SETWHITESPACEFORE and SCI_SETWHITESPACEBACK.

- SCI_SETWHITESPACESIZE(int size)
+

SCI_SETWHITESPACESIZE(int size)
SCI_GETWHITESPACESIZE
SCI_SETWHITESPACESIZE sets the size of the dots used for mark space characters. The SCI_GETWHITESPACESIZE message retrieves the current size. -

+

SCI_SETEXTRAASCENT(int extraAscent)
@@ -2093,7 +2093,7 @@ struct Sci_TextToFind { Space may be added to the maximum ascent (SCI_SETEXTRAASCENT) and the maximum descent (SCI_SETEXTRADESCENT) to allow for more space between lines. This may done to make the text easier to read or to accomodate underlines or highlights. -

+

Cursor

@@ -2531,18 +2531,15 @@ struct Sci_TextToFind { it was not selected. When there is no selection, the current insertion point is marked by the text caret. This is a vertical line that is normally blinking on and off to attract the users attention.

- SCI_SETSELFORE(bool useSelectionForeColour, - int colour)
- SCI_SETSELBACK(bool useSelectionBackColour, - int colour)
+ SCI_SETSELFORE(bool useSelectionForeColour, int colour)
+ SCI_SETSELBACK(bool useSelectionBackColour, int colour)
SCI_SETSELALPHA(int alpha)
SCI_GETSELALPHA
SCI_SETSELEOLFILLED(bool filled)
SCI_GETSELEOLFILLED
SCI_SETCARETFORE(int colour)
SCI_GETCARETFORE
- SCI_SETCARETLINEVISIBLE(bool - show)
+ SCI_SETCARETLINEVISIBLE(bool show)
SCI_GETCARETLINEVISIBLE
SCI_SETCARETLINEBACK(int colour)
SCI_GETCARETLINEBACK
@@ -2554,18 +2551,15 @@ struct Sci_TextToFind { SCI_GETCARETSTYLE
SCI_SETCARETWIDTH(int pixels)
SCI_GETCARETWIDTH
- SCI_SETHOTSPOTACTIVEFORE(bool useSetting, - int colour)
+ SCI_SETHOTSPOTACTIVEFORE(bool useSetting, int colour)
SCI_GETHOTSPOTACTIVEFORE
- SCI_SETHOTSPOTACTIVEBACK(bool useSetting, - int colour)
+ SCI_SETHOTSPOTACTIVEBACK(bool useSetting, int colour)
SCI_GETHOTSPOTACTIVEBACK
SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)
SCI_GETHOTSPOTACTIVEUNDERLINE
SCI_SETHOTSPOTSINGLELINE(bool singleLine)
SCI_GETHOTSPOTSINGLELINE
- SCI_SETCONTROLCHARSYMBOL(int - symbol)
+ SCI_SETCONTROLCHARSYMBOL(int symbol)
SCI_GETCONTROLCHARSYMBOL
SCI_SETCARETSTICKY(int useCaretStickyBehaviour)
SCI_GETCARETSTICKY
@@ -2726,6 +2720,10 @@ struct Sci_TextToFind { SCI_SETMARGINSENSITIVEN(int margin, bool sensitive)
SCI_GETMARGINSENSITIVEN(int + margin)
+ SCI_SETMARGINCURSORN(int margin, int + cursor)
+ SCI_GETMARGINCURSORN(int margin)
SCI_SETMARGINLEFT(<unused>, int pixels)
@@ -2804,6 +2802,14 @@ struct Sci_TextToFind { selection margins which make it easy to select ranges of lines. By default, all margins are insensitive.

+

SCI_SETMARGINCURSORN(int margin, int + cursor)
+ SCI_GETMARGINCURSORN(int margin)
+ A reversed arrow cursor is normally shown over all margins. This may be changed to a normal arrow with + SCI_SETMARGINCURSORN(margin, SC_CURSORARROW) or restored to a + reversed arrow with + SCI_SETMARGINCURSORN(margin, SC_CURSORREVERSEARROW).

+

SCI_SETMARGINLEFT(<unused>, int pixels)
SCI_GETMARGINLEFT
SCI_SETMARGINRIGHT(<unused>, int pixels)
@@ -2928,7 +2934,6 @@ struct Sci_TextToFind { -

SCI_ANNOTATIONSETSTYLEOFFSET(int style)
SCI_ANNOTATIONGETSTYLEOFFSET
@@ -3199,7 +3204,7 @@ struct Sci_TextToFind {

There are 4 indentation guide views. SC_IV_NONE turns the feature off but the other 3 states determine how far the guides appear on - empty lines. + empty lines.

@@ -3227,8 +3232,8 @@ struct Sci_TextToFind { This setting is good for most languages. +
-

SCI_SETHIGHLIGHTGUIDE(int column)
SCI_GETHIGHLIGHTGUIDE
@@ -3445,8 +3450,8 @@ struct Sci_TextToFind { is limited to pixmaps that use one character per pixel with no named colours. The transparent colour may be named 'None'. The data should be null terminated. - Pixmaps use the SC_MARK_PIXMAP marker symbol. You can find the full description of - the XPM format here.

+ Pixmaps use the SC_MARK_PIXMAP marker symbol. You can find descriptions of + the XPM format from here.

SCI_MARKERSYMBOLDEFINED(int markerNumber)
Returns the symbol defined for a markerNumber with SCI_MARKERDEFINE @@ -3631,6 +3636,7 @@ struct Sci_TextToFind { interior more transparent than the border. You can use SCI_INDICSETALPHA to control the alpha transparency value. The default alpha value is 30. + @@ -3640,8 +3646,7 @@ struct Sci_TextToFind { SCI_INDICSETSTYLE(1, INDIC_TT);
SCI_INDICSETSTYLE(2, INDIC_PLAIN);

-

SCI_INDICSETFORE(int indicatorNumber, int colour)
+

SCI_INDICSETFORE(int indicatorNumber, int colour)
SCI_INDICGETFORE(int indicatorNumber)
These two messages set and get the colour used to draw an indicator. The default indicator colours are equivalent to:
@@ -3662,7 +3667,7 @@ struct Sci_TextToFind { Drawing under text works only for modern indicators when two phase drawing is enabled.

-

Modern Indicators

+

Modern Indicators

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

@@ -3708,7 +3713,7 @@ struct Sci_TextToFind { Can be used to iterate through the document to discover all the indicator positions.

-

Style Byte Indicators (deprecated)

+

Style Byte Indicators (deprecated)

By default, Scintilla organizes the style byte associated with each text byte as 5 bits of style information (for 32 styles) and 3 bits of indicator information for 3 independent indicators so that, for example, syntax errors, deprecated names and bad indentation could all @@ -3806,8 +3811,7 @@ struct Sci_TextToFind { and SCI_AUTOCGETSEPARATOR.

-

The list of words should be in sorted order. If set to ignore case mode with SCI_AUTOCSETIGNORECASE, then +

The list of words should be in sorted order. If set to ignore case mode with SCI_AUTOCSETIGNORECASE, then strings are matched after being converted to upper case. One result of this is that the list should be sorted with the punctuation characters '[', '\', ']', '^', '_', and '`' sorted after letters.

@@ -3858,7 +3862,7 @@ struct Sci_TextToFind { SCN_AUTOCSELECTION notification is used instead.

-

The value is copied to the text buffer, returning the length (not including the +

The value is copied to the text buffer, returning the length (not including the terminating 0). If not found, an empty string is copied to the buffer and 0 is returned.

If the value argument is 0 then the length that should be allocated to store the value is @@ -3866,7 +3870,7 @@ struct Sci_TextToFind {

SCI_AUTOCSETCANCELATSTART(bool cancel)
SCI_AUTOCGETCANCELATSTART
- The default behavior is for the list to be cancelled if the caret moves before the location it + The default behavior is for the list to be cancelled if the caret moves to the location it was at when the list was displayed. By calling this message with a false argument, the list is not cancelled until the caret moves before the first character of the word being completed.

@@ -4295,6 +4299,8 @@ struct Sci_TextToFind { SCI_SELECTIONDUPLICATE + SCI_VERTICALCENTRECARET + @@ -4699,6 +4705,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_SETFOLDEXPANDED(int line, bool expanded)
SCI_GETFOLDEXPANDED(int line)
+ SCI_CONTRACTEDFOLDNEXT(int lineStart)
SCI_TOGGLEFOLD(int line)
SCI_ENSUREVISIBLE(int line)
SCI_ENSUREVISIBLEENFORCEPOLICY(int @@ -4849,6 +4856,13 @@ 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_CONTRACTEDFOLDNEXT(int lineStart)
+ 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)
A line may be hidden because more than one of its parent lines is contracted. Both these @@ -4922,7 +4936,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETWRAPVISUALFLAGS
You can enable the drawing of visual flags to indicate a line is wrapped. Bits set in wrapVisualFlags determine which visual flags are drawn. - +

@@ -4959,6 +4973,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETWRAPVISUALFLAGSLOCATION
You can set whether the visual flags to indicate a line is wrapped are drawn near the border or near the text. Bits set in wrapVisualFlagsLocation set the location to near the text for the corresponding visual flag. +

@@ -4989,13 +5004,13 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
-

SCI_SETWRAPINDENTMODE(int indentMode)
SCI_GETWRAPINDENTMODE
Wrapped sublines can be indented to the position of their first subline or one more indent level. The default is SC_WRAPINDENT_FIXED. The modes are: +

@@ -5027,7 +5042,6 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
-

SCI_SETWRAPSTARTINDENT(int indent)
SCI_GETWRAPSTARTINDENT
@@ -5089,7 +5103,6 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -

SCI_SETPOSITIONCACHE(int size)
SCI_GETPOSITIONCACHE
@@ -5401,17 +5414,17 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){

ILexer

-class ILexer {
-public:
+class ILexer {
+public:
    virtual int SCI_METHOD Version() const = - 0;
+ 0;
    virtual void SCI_METHOD Release() -= 0;
+= 0;
    virtual const char @@ -5430,7 +5443,7 @@ SCI_METHOD PropertyNames() const char *val) = - 0;
+ 0;
    virtual const char * SCI_METHOD DescribeWordListSets() @@ -5443,7 +5456,7 @@ SCI_METHOD PropertyNames() const char *wl) = - 0;
+ 0;
    virtual void SCI_METHOD Lex(unsigned @@ -5455,7 +5468,7 @@ SCI_METHOD PropertyNames() IDocument *pAccess) = -0;
+0;
    virtual void SCI_METHOD Fold(unsigned @@ -5466,7 +5479,7 @@ SCI_METHOD PropertyNames() IDocument *pAccess) = -0;
+0;
    virtual void * SCI_METHOD @@ -5474,8 +5487,8 @@ SCI_METHOD PropertyNames() operation, void *pointer) -= 0;
-};
+= 0;
+};

@@ -5501,24 +5514,24 @@ invoked with the SCI_PRIVATELEXERCALL API.

class IDocument - {
-public:
+ {
+public:
    virtual int SCI_METHOD Version() const = - 0;
+ 0;
    virtual void SCI_METHOD SetErrorStatus(int status) = -0;
+0;
    virtual int SCI_METHOD Length() const = - 0;
+ 0;
    virtual void SCI_METHOD GetCharRange(char @@ -5528,64 +5541,64 @@ position, int lengthRetrieve) const = -0;
+0;
    virtual char SCI_METHOD StyleAt(int position) const = - 0;
+ 0;
    virtual int SCI_METHOD LineFromPosition(int position) const = - 0;
+ 0;
    virtual int SCI_METHOD LineStart(int line) const = - 0;
+ 0;
    virtual int SCI_METHOD GetLevel(int line) const = -0;
+0;
    virtual int SCI_METHOD SetLevel(int line, int level) = -0;
+0;
    virtual int SCI_METHOD GetLineState(int line) const = 0 -;
+;
    virtual int SCI_METHOD SetLineState(int line, int state) = - 0;
+ 0;
    virtual void SCI_METHOD StartStyling(int position, char mask) = - 0;
+ 0;
    virtual bool SCI_METHOD SetStyleFor(int length, char style) = 0 -;
+;
    virtual bool SCI_METHOD SetStyles(int @@ -5593,13 +5606,13 @@ position, const char *styles) = -0;
+0;
    virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = - 0;
+ 0;
    virtual void SCI_METHOD DecorationFillRange(int @@ -5608,27 +5621,27 @@ position, int fillLength) = -0;
+0;
    virtual void SCI_METHOD ChangeLexerState(int start, int end) = - 0;
+ 0;
    virtual int SCI_METHOD CodePage() const = 0 -;
+;
    virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = - 0;
-};
+ 0;
+};

Scintilla tries to minimize the consequences of modifying text to @@ -5668,9 +5681,10 @@ struct SCNotification { int position; // SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_DWELLSTART, // SCN_DWELLEND, SCN_CALLTIPCLICK, - // SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK + // SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK int ch; // SCN_CHARADDED, SCN_KEY - int modifiers; // SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK + int modifiers; + // SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK int modificationType; // SCN_MODIFIED const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION int length; // SCN_MODIFIED @@ -5685,6 +5699,9 @@ struct SCNotification { int listType; // SCN_USERLISTSELECTION, SCN_AUTOCSELECTION int x; // SCN_DWELLSTART, SCN_DWELLEND int y; // SCN_DWELLSTART, SCN_DWELLEND + int token; // SCN_MODIFIED with SC_MOD_CONTAINER + int annotationLinesAdded; // SC_MOD_CHANGEANNOTATION + int updated; // SCN_UPDATEUI }; @@ -5710,6 +5727,7 @@ struct SCNotification { SCN_ZOOM
SCN_HOTSPOTCLICK
SCN_HOTSPOTDOUBLECLICK
+ SCN_HOTSPOTRELEASECLICK
SCN_INDICATORCLICK
SCN_INDICATORRELEASE
SCN_CALLTIPCLICK
@@ -5784,13 +5802,59 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); double click and the line field is set to the line of the double click.

SCN_UPDATEUI
- Either the text or styling of the document has changed or the selection range has changed. Now - would be a good time to update any container UI elements that depend on document or view state. - This was previously called SCN_CHECKBRACE because a common use is to check whether the - caret is next to a brace and set highlights on this brace and its corresponding matching brace. - This also replaces SCN_POSCHANGED, - which is now deprecated.

+ Either the text or styling of the document has changed or the selection range or scroll position has changed. + Now would be a good time to update any container UI elements that depend on document or view state. + The updated field is set to the bit set of things changed since the previous notiication.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueMeaning
SC_UPDATE_CONTENT0x01Contents, styling or markers have been changed.
SC_UPDATE_SELECTION0x02Selection has been changed.
SC_UPDATE_V_SCROLL0x04Scrolled vertically.
SC_UPDATE_H_SCROLL0x08Scrolled horizontally.

SCN_MODIFIED
This notification is sent when the text or styling of the document changes or is about to @@ -6341,12 +6405,14 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next

SCN_HOTSPOTCLICK
SCN_HOTSPOTDOUBLECLICK
+ SCN_HOTSPOTRELEASECLICK
These notifications are generated when the user clicks or double clicks on text that is in a style with the hotspot attribute set. This notification can be used to link to variable definitions or web pages. The position field is set the text position of the click or double click and the modifiers field set to the key modifiers - held down in a similar manner to SCN_KEY.

+ held down in a similar manner to SCN_KEY. + Only the state of the Ctrl key is reported for SCN_HOTSPOTRELEASECLICK.

SCN_INDICATORCLICK
@@ -6410,11 +6476,11 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next void scintilla_release_resources()
-

GtkWidget *scintilla_new()
+

GtkWidget *scintilla_new()
Create a new Scintilla widget. The returned pointer can be added to a container and displayed in the same way as other widgets.

-

void scintilla_set_id(ScintillaObject *sci, uptr_t id)
+

void scintilla_set_id(ScintillaObject *sci, uptr_t id)
Set the control ID which will be used in the idFrom field of the NotifyHeader structure of all notifications for this instance. When an application creates multiple Scintilla widgets, this allows the source of each notification to be found. The value should be small, preferrably less than 16 bits, @@ -6542,11 +6608,7 @@ EM_SETTARGETDEVICE Scintilla_RegisterClasses called. STATIC_BUILD prevents compiling the DllMain function which will conflict with any DllMain defined in your code. Scintilla_RegisterClasses takes the HINSTANCE of your - application and ensures that the "Scintilla" window class is registered. To make sure that the - right pointing arrow cursor used in the margin is displayed by Scintilla add the - scintilla/win32/Margin.cur file to your application's resources with the ID - IDC_MARGIN which is defined in scintilla/win32/platfromRes.h as - 400.

+ application and ensures that the "Scintilla" window class is registered.

Ensuring lexers are linked into Scintilla

diff --git a/scintilla/doc/ScintillaDownload.html b/scintilla/doc/ScintillaDownload.html index 7e2cc595..0ccb913e 100644 --- a/scintilla/doc/ScintillaDownload.html +++ b/scintilla/doc/ScintillaDownload.html @@ -25,9 +25,9 @@ @@ -41,7 +41,7 @@ containing very few restrictions.

- Release 2.21 + Release 2.25

Source Code @@ -49,8 +49,8 @@ The source code package contains all of the source code for Scintilla but no binary executable code and is available in
    -
  • zip format (1160K) commonly used on Windows
  • -
  • tgz format (1080K) commonly used on Linux and compatible operating systems
  • +
  • zip format (1200K) commonly used on Windows
  • +
  • tgz format (1080K) 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 036375c9..821393df 100644 --- a/scintilla/doc/ScintillaHistory.html +++ b/scintilla/doc/ScintillaHistory.html @@ -350,6 +350,24 @@

+ + + + + + + + + + + + + + + + + +
- + Windows   - + GTK+/Linux   Toby Inkster Eric Forgeot Colomban Wendling
NeoJordan RussellFarshid LashkariSam Rawlins
Michael MullinCarlos SSvimMartial Demolins
Tino WeinkaufJérôme LaforgeUdo LechnerMarco Falda
Dariusz KnocińskiBen Fisher

@@ -361,6 +379,336 @@ Icons Copyright(C) 1998 by Dean S. Jones
+

+ Release 2.25 +

+
    +
  • + Released 21 March 2011. +
  • +
  • + SparseState class makes it easier to write lexers which have to remember complex state between lines. +
  • +
  • + Visual Studio project (.dsp) files removed. The make files should be used instead as described in the README. +
  • +
  • + Modula 3 lexer added along with SciTE support. + Feature #3173374. +
  • +
  • + Asm, Basic, and D lexers add extra folding properties. +
  • +
  • + Raw string literals for C++0x supported in C++ lexer. +
  • +
  • + Triple-quoted strings used in Vala language supported in C++ lexer. + Feature #3177601. +
  • +
  • + The errorlist lexer used in SciTE's output pane colours lines that start with '<' as diff deletions. + Feature #3172878. +
  • +
  • + The Fortran lexer correctly folds type-bound procedures from Fortran 2003. +
  • +
  • + LPeg lexer support‎ improved in SciTE. +
  • +
  • + SciTE on Windows-64 fixes for menu localisation and Lua scripts. + Bug #3204502. +
  • +
  • + SciTE on Windows avoids locking folders when using the open or save dialogs. + Bug #1795484. +
  • +
  • + Diff lexer fixes problem where diffs of diffs producing lines that start with "----". + Bug #3197952. +
  • +
  • + Bug fixed when searching upwards in Chinese code page 936. + Bug #3176271. +
  • +
  • + On Cocoa, translucent drawing performed as on other platforms instead of 2.5 times less translucent. +
  • +
  • + Performance issue and potential bug fixed on GTK+ with caret line for long lines. +
  • +
+

+ Release 2.24 +

+
    +
  • + Released 3 February 2011. +
  • +
  • + Fixed memory leak in GTK+ Cairo code. + Feature #3157655. +
  • +
  • + Insert Abbreviation dialog added to SciTE on GTK+. +
  • +
  • + SCN_UPDATEUI notifications received when window scrolled. An 'updated' bit mask indicates which + types of update have occurred from SC_UPDATE_SELECTION, SC_UPDATE_CONTENT, SC_UPDATE_H_SCROLL + or SC_UPDATE_V_SCROLL. + Feature #3125977. +
  • +
  • + On Windows, to ensure reverse arrow cursor matches platform default, it is now generated by + reflecting the platform arrow cursor. + Feature #3143968. +
  • +
  • + Can choose mouse cursor used in margins. + Feature #3161326. +
  • +
  • + On GTK+, SciTE sets a mime type of text/plain in its .desktop file so that it will appear in the shell context menu. + Feature #3137126. +
  • +
  • + Bash folder handles here docs. + Feature #3118223. +
  • +
  • + C++ folder adds fold.cpp.syntax.based, fold.cpp.comment.multiline, fold.cpp.explicit.start, fold.cpp.explicit.end, + and fold.cpp.explicit.anywhere properties to allow more control over folding and choice of explicit fold markers. +
  • +
  • + C++ lexer fixed to always handle single quote strings continued past a line end. + Bug #3150522. +
  • +
  • + Ruby folder handles here docs. + Feature #3118224. +
  • +
  • + SQL lexer allows '.' to be part of words. + Feature #3103129. +
  • +
  • + SQL folder handles case statements in more situations. + Feature #3135027. +
  • +
  • + SQL folder adds fold points inside expressions based on bracket structure. + Feature #3165488. +
  • +
  • + SQL folder drops fold.sql.exists property as 'exists' is handled automatically. + Bug #3164194. +
  • +
  • + SciTE only forwards properties to lexers when they have been explicitly set so the defaults set by lexers are used + rather than 0. +
  • +
  • + Mouse double click word selection chooses the word around the character under the mouse rather than + the inter-character position under the mouse. This makes double clicking select what the user is pointing + at and avoids selecting adjacent non-word characters. + Bug #3111174. +
  • +
  • + Fixed mouse double click to always perform word select, not line select. + Bug #3143635. +
  • +
  • + Right click cancels autocompletion. + Bug #3144531. +
  • +
  • + Fixed multiPaste to work when additionalSelectionTyping off. + Bug #3126221. +
  • +
  • + Fixed virtual space problems when text modified at caret. + Bug #3154986. +
  • +
  • + Fixed memory leak in lexer object code. + Bug #3133672. +
  • +
  • + Fixed SciTE on GTK+ search failure when using regular expression. + Bug #3156217. +
  • +
  • + Avoid unnecessary full window redraw for SCI_GOTOPOS. + Feature #3146650. +
  • +
  • + Avoid unnecessary redraw when indicator fill range makes no real change. +
  • +
+

+ Release 2.23 +

+
    +
  • + Released 7 December 2010. +
  • +
  • + On GTK+ version 2.22 and later, drawing is performed with Cairo rather than GDK. + This is in preparation for GTK+ 3.0 which will no longer support GDK drawing. + The appearance of some elements will be different with Cairo as it is anti-aliased and uses sub-pixel positioning. + Cairo may be turned on for GTK+ versions before 2.22 by defining USE_CAIRO although this has not + been extensively tested. +
  • +
  • + New lexer a68k for Motorola 68000 assembler. + Feature #3101598. +
  • +
  • + Borland C++ is no longer supported for building Scintilla or SciTE on Windows. +
  • +
  • + Performance improved when creating large rectangular selections. +
  • +
  • + PHP folder recognizes #region and #endregion comments. + Feature #3101624. +
  • +
  • + SQL lexer has a lexer.sql.numbersign.comment option to turn off use of '#' comments + as these are a non-standard feature only available in some implementations. + Feature #3098071. +
  • +
  • + SQL folder recognizes case statements and understands the fold.at.else property. + Bug #3104091. + Bug #3107362. +
  • +
  • + SQL folder fixes bugs with end statements when fold.sql.only.begin=1. + Bug #3104091. +
  • +
  • + SciTE on Windows bug fixed with multi-line tab bar not adjusting correctly when maximizing and demaximizing. + Bug #3097517. +
  • +
  • + Crash fixed on GTK+ when Scintilla widget destroyed while it still has an outstanding style idle pending. +
  • +
  • + Bug fixed where searching backwards in DBCS text (code page 936 or similar) failed to find occurrences at the start of the line. + Bug #3103936. +
  • +
  • + SciTE on Windows supports Unicode file names when executing help applications with winhelp and htmlhelp subsystems. +
  • +
+

+ Release 2.22 +

+
    +
  • + Released 27 October 2010. +
  • +
  • + SciTE includes support for integrating with Scintillua which allows lexers to be implemented in Lua as a + Parsing Expression Grammar (PEG). +
  • +
  • + Regular expressions allow use of '?' for non-greedy matches or to match 0 or 1 instances of an item. +
  • +
  • + SCI_CONTRACTEDFOLDNEXT added to allow rapid retrieval of folding state. +
  • +
  • + SCN_HOTSPOTRELEASECLICK notification added which is similar to SCN_HOTSPOTCLICK but occurs + when the mouse is released. + Feature #3082409. +
  • +
  • + Command added for centring current line in window. + Feature #3064696. +
  • +
  • + SciTE performance improved by not examining document for line ends when switching buffers and not + storing folds when folding turned off. +
  • +
  • + Bug fixed where scrolling to ensure the caret is visible did not take into account all pixels of the line. + Bug #3081721. +
  • +
  • + Bug fixed for autocompletion list overlapping text when WS_EX_CLIENTEDGE used. + Bug #3079778. +
  • +
  • + After autocompletion, the caret's X is updated. + Bug #3079114. +
  • +
  • + On Windows, default to the system caret blink time. + Feature #3079784. +
  • +
  • + PgUp/PgDn fixed to allow virtual space. + Bug #3077452. +
  • +
  • + Crash fixed when AddMark and AddMarkSet called with negative argument. + Bug #3075074. +
  • +
  • + Dwell notifications fixed so that they do not occur when the mouse is outside Scintilla. + Bug #3073481. +
  • +
  • + Bash lexer bug fixed for here docs starting with <<-. + Bug #3063822. +
  • +
  • + C++ lexer bug fixed for // comments that are continued onto a second line by a \. + Bug #3066031. +
  • +
  • + C++ lexer fixes wrong highlighting for float literals containing +/-. + Bug #3058924. +
  • +
  • + JavaScript lexer recognize regexes following return keyword.‎ + Bug #3062287. +
  • +
  • + Ruby lexer handles % quoting better and treats range dots as operators in 1..2 and 1...2. + Ruby folder handles "if" keyword used as a modifier even when it is separated from the modified statement by an escaped new line. + Bug #2093767. + Bug #3058496. +
  • +
  • + Bug fixed where upwards search failed with DBCS code pages. + Bug #3065912. +
  • +
  • + SciTE has a default Lua startup script name distributed in SciTEGlobal.properties. + No error message is displayed if this file does not exist. +
  • +
  • + SciTE on Windows tab control height is calculated better. + Bug #2635702. +
  • +
  • + SciTE on Windows uses better themed check buttons in find and replace strips. +
  • +
  • + SciTE on Windows fixes bug with Find strip appearing along with Incremental Find strip. +
  • +
  • + SciTE setting find.close.on.find added to allow preventing the Find dialog from closing. +
  • +
  • + SciTE on Windows attempts to rerun commands that fail by prepending them with "cmd.exe /c". + This allows commands built in to the command processor like "dir" to run. +
  • +

Release 2.21

diff --git a/scintilla/doc/ScintillaRelated.html b/scintilla/doc/ScintillaRelated.html index 10d114db..fd9a4880 100644 --- a/scintilla/doc/ScintillaRelated.html +++ b/scintilla/doc/ScintillaRelated.html @@ -111,6 +111,10 @@

Projects using Scintilla

+

+ Coder's Studio + is an IDE for Assembly programming similar to Visual Studio 6.0. +

Enterprise Architect is a UML 2.1 analysis and design tool. diff --git a/scintilla/doc/ScintillaToDo.html b/scintilla/doc/ScintillaToDo.html index 13c5ee9f..972d95c4 100644 --- a/scintilla/doc/ScintillaToDo.html +++ b/scintilla/doc/ScintillaToDo.html @@ -87,8 +87,7 @@

Flow diagrams inside editor similar to - - GRASP. + GRASP.

A VCL component wrapper around Scintilla so it can be used with Delphi or diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html index 49cd42cc..6fb23236 100644 --- a/scintilla/doc/index.html +++ b/scintilla/doc/index.html @@ -9,7 +9,7 @@ - +