Merge lp:~masmullin/scintilla-cocoa/updates into lp:scintilla-cocoa
- updates
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~masmullin/scintilla-cocoa/updates |
Merge into: | lp:scintilla-cocoa |
Diff against target: |
64766 lines (+43006/-6001) (has conflicts) 242 files modified
.bzrignore (+0/-10) .hgeol (+42/-0) .hgignore (+59/-0) .hgtags (+95/-0) README (+3/-6) bin/.cvsignore (+2/-0) bin/__init__.py (+1/-0) bin/empty.txt (+1/-0) cocoa/Framework.mk (+5/-8) cocoa/InfoBar.h (+3/-3) cocoa/InfoBar.mm (+42/-36) cocoa/PlatCocoa.h (+19/-2) cocoa/PlatCocoa.mm (+287/-159) cocoa/QuartzTextLayout.h (+14/-14) cocoa/ScintillaCocoa.h (+55/-37) cocoa/ScintillaCocoa.mm (+799/-276) cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj (+172/-25) cocoa/ScintillaTest/AppController.mm (+14/-0) cocoa/ScintillaTest/English.lproj/MainMenu.xib (+124/-0) cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj (+16/-0) cocoa/ScintillaView.h (+102/-17) cocoa/ScintillaView.mm (+634/-245) cocoa/checkbuildosx.sh (+66/-0) cocoa/common.mk (+28/-5) cppcheck.suppress (+45/-0) delbin.bat (+4/-0) doc/Lexer.txt (+228/-0) doc/ScintillaDoc.html (+803/-148) doc/ScintillaDownload.html (+17/-0) doc/ScintillaHistory.html (+1989/-43) doc/ScintillaRelated.html (+59/-26) doc/ScintillaToDo.html (+2/-2) doc/index.html (+23/-4) gtk/Converter.h (+15/-2) gtk/PlatGTK.cxx (+184/-60) gtk/ScintillaGTK.cxx (+241/-240) gtk/deps.mak (+420/-19) gtk/makefile (+35/-4) include/.cvsignore (+2/-0) include/ILexer.h (+62/-26) include/Platform.h (+41/-23) include/SciLexer.h (+220/-8) include/Scintilla.h (+117/-35) include/Scintilla.iface (+491/-60) lexers/LexA68k.cxx (+111/-82) lexers/LexAU3.cxx (+2/-2) lexers/LexAVE.cxx (+2/-2) lexers/LexAVS.cxx (+293/-0) lexers/LexAbaqus.cxx (+0/-15) lexers/LexAda.cxx (+1/-16) lexers/LexAsm.cxx (+1/-1) lexers/LexAsn1.cxx (+1/-1) lexers/LexBash.cxx (+24/-2) lexers/LexBasic.cxx (+74/-18) lexers/LexBullant.cxx (+1/-1) lexers/LexCOBOL.cxx (+5/-3) lexers/LexCPP.cxx (+175/-27) lexers/LexCmake.cxx (+5/-9) lexers/LexCoffeeScript.cxx (+563/-0) lexers/LexConf.cxx (+7/-7) lexers/LexCrontab.cxx (+5/-5) lexers/LexCsound.cxx (+1/-1) lexers/LexD.cxx (+4/-4) lexers/LexDMAP.cxx (+228/-0) lexers/LexECL.cxx (+521/-0) lexers/LexForth.cxx (+8/-17) lexers/LexFortran.cxx (+153/-41) lexers/LexGAP.cxx (+1/-1) lexers/LexGui4Cli.cxx (+2/-6) lexers/LexHTML.cxx (+33/-33) lexers/LexHaskell.cxx (+1009/-266) lexers/LexInno.cxx (+5/-5) lexers/LexKVIrc.cxx (+473/-0) lexers/LexLaTeX.cxx (+539/-0) lexers/LexLisp.cxx (+3/-3) lexers/LexLout.cxx (+1/-1) lexers/LexLua.cxx (+10/-27) lexers/LexMMIXAL.cxx (+1/-1) lexers/LexMPT.cxx (+1/-1) lexers/LexMSSQL.cxx (+2/-15) lexers/LexMatlab.cxx (+87/-15) lexers/LexModula.cxx (+7/-7) lexers/LexMySQL.cxx (+0/-7) lexers/LexNsis.cxx (+2/-0) lexers/LexOScript.cxx (+548/-0) lexers/LexOpal.cxx (+4/-4) lexers/LexOthers.cxx (+22/-9) lexers/LexPO.cxx (+213/-0) lexers/LexPascal.cxx (+11/-10) lexers/LexPerl.cxx (+284/-31) lexers/LexPowerShell.cxx (+49/-2) lexers/LexPython.cxx (+1/-1) lexers/LexR.cxx (+1/-1) lexers/LexRuby.cxx (+2/-2) lexers/LexRust.cxx (+781/-0) lexers/LexSQL.cxx (+229/-31) lexers/LexSTTXT.cxx (+406/-0) lexers/LexScriptol.cxx (+1/-1) lexers/LexSpice.cxx (+0/-25) lexers/LexTCMD.cxx (+506/-0) lexers/LexVHDL.cxx (+1/-1) lexers/LexVisualProlog.cxx (+504/-0) lexers/LexYAML.cxx (+1/-1) lexlib/Accessor.cxx (+2/-2) lexlib/Accessor.h (+38/-0) lexlib/CharacterCategory.cxx (+3304/-0) lexlib/CharacterCategory.h (+31/-0) lexlib/CharacterSet.cxx (+1/-1) lexlib/LexAccessor.h (+51/-7) lexlib/LexerBase.cxx (+1/-1) lexlib/LexerModule.cxx (+4/-6) lexlib/LexerNoExceptions.cxx (+1/-1) lexlib/LexerNoExceptions.h (+2/-2) lexlib/LexerSimple.cxx (+1/-1) lexlib/LexerSimple.h (+1/-1) lexlib/OptionSet.h (+3/-3) lexlib/PropSetSimple.cxx (+9/-18) lexlib/PropSetSimple.h (+0/-1) lexlib/SparseState.h (+1/-1) lexlib/StringCopy.h (+36/-0) lexlib/StyleContext.cxx (+1/-1) lexlib/StyleContext.h (+110/-11) lexlib/SubStyles.h (+177/-0) lexlib/WordList.cxx (+41/-20) lexlib/WordList.h (+6/-6) qt/README (+36/-0) qt/ScintillaEdit/ScintillaDocument.cpp (+295/-0) qt/ScintillaEdit/ScintillaDocument.h (+99/-0) qt/ScintillaEdit/ScintillaEdit.cpp.template (+84/-0) qt/ScintillaEdit/ScintillaEdit.h.template (+74/-0) qt/ScintillaEdit/ScintillaEdit.pro (+76/-0) qt/ScintillaEdit/WidgetGen.py (+259/-0) qt/ScintillaEditBase/Notes.txt (+18/-0) qt/ScintillaEditBase/PlatQt.cpp (+1283/-0) qt/ScintillaEditBase/PlatQt.h (+127/-0) qt/ScintillaEditBase/ScintillaEditBase.cpp (+659/-0) qt/ScintillaEditBase/ScintillaEditBase.h (+152/-0) qt/ScintillaEditBase/ScintillaEditBase.pro (+118/-0) qt/ScintillaEditBase/ScintillaQt.cpp (+750/-0) qt/ScintillaEditBase/ScintillaQt.h (+160/-0) qt/ScintillaEditPy/README (+86/-0) qt/ScintillaEditPy/ScintillaConstants.py.template (+6/-0) qt/ScintillaEditPy/ScintillaEditPy.pro (+118/-0) qt/ScintillaEditPy/global.h (+4/-0) qt/ScintillaEditPy/sepbuild.py (+340/-0) qt/ScintillaEditPy/testsepq.py (+157/-0) qt/ScintillaEditPy/typesystem_ScintillaEdit.xml.template (+65/-0) scripts/Face.py (+117/-0) scripts/FileGenerator.py (+158/-0) scripts/GenerateCaseConvert.py (+126/-0) scripts/GenerateCharacterCategory.py (+36/-0) scripts/HFacer.py (+58/-0) scripts/LexGen.py (+54/-0) scripts/ScintillaData.py (+193/-0) src/AutoComplete.cxx (+138/-18) src/AutoComplete.h (+28/-6) src/CallTip.cxx (+25/-12) src/CallTip.h (+2/-2) src/CaseConvert.cxx (+634/-0) src/CaseConvert.h (+47/-0) src/CaseFolder.cxx (+68/-0) src/CaseFolder.h (+45/-0) src/Catalogue.cxx (+14/-10) src/CellBuffer.cxx (+75/-20) src/CellBuffer.h (+7/-7) src/ContractionState.cxx (+3/-1) src/Decoration.cxx (+10/-3) src/Decoration.h (+3/-3) src/Document.cxx (+224/-139) src/Document.h (+62/-70) src/Editor.cxx (+1700/-554) src/Editor.h (+197/-44) src/ExternalLexer.cxx (+4/-6) src/ExternalLexer.h (+2/-5) src/FontQuality.h (+25/-3) src/Indicator.cxx (+3/-0) src/KeyMap.cxx (+11/-32) src/KeyMap.h (+20/-6) src/LineMarker.cxx (+61/-8) src/LineMarker.h (+0/-1) src/Partitioning.h (+11/-2) src/PerLine.cxx (+14/-21) src/PerLine.h (+3/-5) src/PositionCache.cxx (+148/-136) src/PositionCache.h (+44/-14) src/RESearch.cxx (+31/-80) src/RESearch.h (+77/-0) src/RunStyles.cxx (+42/-5) src/RunStyles.h (+5/-3) src/ScintillaBase.cxx (+281/-114) src/ScintillaBase.h (+9/-2) src/Selection.cxx (+25/-5) src/Selection.h (+3/-2) src/SplitVector.h (+30/-2) src/Style.cxx (+26/-2) src/Style.h (+3/-2) src/UniConversion.cxx (+137/-0) src/UniConversion.h (+79/-28) src/UnicodeFromUTF8.h (+32/-0) src/ViewStyle.cxx (+306/-77) src/ViewStyle.h (+91/-14) src/XPM.cxx (+59/-29) src/XPM.h (+24/-38) test/README (+10/-4) test/ScintillaCallable.py (+159/-0) test/XiteQt.py (+65/-0) test/XiteWin.py (+38/-161) test/examples/x.lua (+7/-0) test/examples/x.lua.styled (+7/-0) test/examples/x.pl (+5/-0) test/examples/x.pl.styled (+5/-0) test/examples/x.rb (+6/-0) test/examples/x.rb.styled (+6/-0) test/lexTests.py (+25/-12) test/performanceTests.py (+45/-4) test/simpleTests.py (+998/-296) test/unit/LICENSE_1_0.txt (+23/-0) test/unit/README (+13/-12) test/unit/SciTE.properties (+2/-1) test/unit/catch.hpp (+7832/-0) test/unit/makefile (+44/-44) test/unit/test.mak (+32/-0) test/unit/testCellBuffer.cxx (+140/-0) test/unit/testCharClassify.cxx (+122/-0) test/unit/testContractionState.cxx (+125/-131) test/unit/testDecoration.cxx (+89/-0) test/unit/testPartitioning.cxx (+161/-187) test/unit/testRunStyles.cxx (+311/-1) test/unit/testSparseState.cxx (+214/-230) test/unit/testSplitVector.cxx (+199/-205) test/unit/unitTest.cxx (+15/-8) version.txt (+4/-0) win32/.cvsignore (+3/-0) win32/CheckD2D.cxx (+3/-0) win32/PlatWin.cxx (+1302/-124) win32/PlatWin.h (+29/-0) win32/SciLexer.vcxproj (+129/-0) win32/ScintRes.rc (+6/-0) win32/ScintillaWin.cxx (+437/-295) win32/deps.mak (+299/-286) win32/makefile (+24/-5) win32/scintilla.mak (+149/-77) Conflict adding file .hgeol. Moved existing file to .hgeol.moved. Conflict adding file .hgignore. Moved existing file to .hgignore.moved. Conflict adding file .hgtags. Moved existing file to .hgtags.moved. Text conflict in cocoa/InfoBar.mm Text conflict in cocoa/PlatCocoa.h Text conflict in cocoa/PlatCocoa.mm Text conflict in cocoa/ScintillaCocoa.h Text conflict in cocoa/ScintillaCocoa.mm Text conflict in cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj Text conflict in cocoa/ScintillaTest/AppController.mm Text conflict in cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj Text conflict in cocoa/ScintillaView.h Text conflict in cocoa/ScintillaView.mm Conflict adding file cocoa/checkbuildosx.sh. Moved existing file to cocoa/checkbuildosx.sh.moved. Text conflict in delbin.bat Text conflict in doc/Lexer.txt Text conflict in doc/ScintillaDoc.html Text conflict in doc/ScintillaDownload.html Text conflict in doc/ScintillaHistory.html Text conflict in doc/ScintillaRelated.html Text conflict in doc/index.html Text conflict in gtk/PlatGTK.cxx Text conflict in gtk/ScintillaGTK.cxx Text conflict in gtk/makefile Conflict adding file include/.cvsignore. Moved existing file to include/.cvsignore.moved. Contents conflict in include/Face.py Contents conflict in include/HFacer.py Text conflict in include/ILexer.h Text conflict in include/Platform.h Text conflict in include/SciLexer.h Text conflict in include/Scintilla.h Text conflict in include/Scintilla.iface Conflict adding file lexers/LexAVS.cxx. Moved existing file to lexers/LexAVS.cxx.moved. Text conflict in lexers/LexBash.cxx Text conflict in lexers/LexCPP.cxx Conflict adding file lexers/LexCoffeeScript.cxx. Moved existing file to lexers/LexCoffeeScript.cxx.moved. Conflict adding file lexers/LexECL.cxx. Moved existing file to lexers/LexECL.cxx.moved. Text conflict in lexers/LexFortran.cxx Text conflict in lexers/LexHTML.cxx Conflict adding file lexers/LexLaTeX.cxx. Moved existing file to lexers/LexLaTeX.cxx.moved. Conflict adding file lexers/LexOScript.cxx. Moved existing file to lexers/LexOScript.cxx.moved. Conflict adding file lexers/LexPO.cxx. Moved existing file to lexers/LexPO.cxx.moved. Text conflict in lexers/LexPerl.cxx Text conflict in lexers/LexSQL.cxx Conflict adding file lexers/LexTCMD.cxx. Moved existing file to lexers/LexTCMD.cxx.moved. Conflict adding file lexers/LexVisualProlog.cxx. Moved existing file to lexers/LexVisualProlog.cxx.moved. Text conflict in lexlib/Accessor.h Text conflict in lexlib/LexAccessor.h Text conflict in lexlib/StyleContext.h Conflict adding file lexlib/SubStyles.h. Moved existing file to lexlib/SubStyles.h.moved. Conflict adding file qt. Moved existing file to qt.moved. Text conflict in src/AutoComplete.cxx Text conflict in src/AutoComplete.h Text conflict in src/CallTip.cxx Text conflict in src/Catalogue.cxx Text conflict in src/CellBuffer.cxx Text conflict in src/Decoration.cxx Text conflict in src/Document.cxx Text conflict in src/Document.h Text conflict in src/Editor.cxx Text conflict in src/Editor.h Text conflict in src/FontQuality.h Contents conflict in src/LexGen.py Text conflict in src/LineMarker.cxx Text conflict in src/PerLine.cxx Text conflict in src/PositionCache.cxx Text conflict in src/RESearch.h Contents conflict in src/SVector.h Text conflict in src/ScintillaBase.cxx Text conflict in src/ScintillaBase.h Text conflict in src/SplitVector.h Text conflict in src/Style.cxx Text conflict in src/UniConversion.cxx Text conflict in src/UniConversion.h Text conflict in src/ViewStyle.cxx Text conflict in src/ViewStyle.h Text conflict in src/XPM.cxx Text conflict in src/XPM.h Text conflict in test/README Text conflict in test/simpleTests.py Text conflict in test/unit/makefile Conflict adding file test/unit/testCharClassify.cxx. Moved existing file to test/unit/testCharClassify.cxx.moved. Text conflict in test/unit/testRunStyles.cxx Conflict: can't delete vcbuild because it is not empty. Not deleting. Conflict because vcbuild is not versioned, but has versioned children. Versioned directory. Contents conflict in vcbuild/Scintilla.vcxproj Contents conflict in vcbuild/Scintilla.vcxproj.filters Text conflict in version.txt Conflict adding file win32/.cvsignore. Moved existing file to win32/.cvsignore.moved. Conflict adding file win32/CheckD2D.cxx. Moved existing file to win32/CheckD2D.cxx.moved. Text conflict in win32/PlatWin.cxx Conflict adding file win32/PlatWin.h. Moved existing file to win32/PlatWin.h.moved. Text conflict in win32/ScintRes.rc Text conflict in win32/ScintillaWin.cxx Text conflict in win32/makefile Text conflict in win32/scintilla.mak Contents conflict in win32/scintilla_vc6.mak |
To merge this branch: | bzr merge lp:~masmullin/scintilla-cocoa/updates |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Lischke | Needs Resubmitting | ||
Review via email: mp+32724@code.launchpad.net |
Commit message
Description of the change
Updates from http://
+ a build fix when SCI_LEXER is defined on cocoa
Notes:
Updating will require TDM 4.5 when doing a windows build. This code breaks 4.4.1
- 50. By masmullin
-
update to changeset 3396
- 51. By masmullin
-
update to 3400 from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla - 52. By masmullin
-
Pull changes from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla changeset 3406 - 53. By masmullin
-
pull from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla changeset 3409 - 54. By masmullin
-
pulled from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla @ cs:3413 - 55. By masmullin
-
oops, forgot this one, goes with previous submit.
- 56. By masmullin
-
pull all new changes from the official trunk of scintilla-cocoa (lp:scintilla-cocoa). This rebases us with lp:scintilla-cocoa
- 57. By masmullin
-
pull from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla cs3425
Mike Lischke (mike-lischke) wrote : | # |
I'm sorry for the long period since this patch could be reviewed.
Regarding this patch: please resubmit only the build fix. Updates from the main Scintilla repository will be done by me and merged to the LP (and other) repositories.
Thank you.
masmullin (masmullin) wrote : | # |
No worries Mike. Since I'm going to be grabbing changes from main scintilla more often than your main LP I thought the least I could do to "give back" is start up a code review for the merges I've done, and hopefully save you a few hours of merging tedium.
I'll start up a code review for the build fix shortly.
- 58. By masmullin
-
pull from sourceforge scintilla @ changeset 3481
- 59. By masmullin
-
pull from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla @ CS 3528 - 60. By masmullin
-
pull from head @ CS 3583
- 61. By masmullin
-
synced to CS 3648
- 62. By masmullin
-
sync to http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla @ CS 3676 - 63. By masmullin
-
pull from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla @ CS 3810 - 64. By masmullin
-
http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla @ 3810... forgot the main.xib - 65. By masmullin
-
update to cs 3814 from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla - 66. By Michael Mullin <email address hidden>
-
I needed this change to compile clang-2.9 on ubuntu 11.04
- 67. By masmullin
-
manual merge from lp:scintilla-cocoa
- 68. By masmullin
-
more manual merging from lp:scintilla-cocoa
- 69. By masmullin
-
automated merge
- 70. By masmullin
-
Grabbed from the scintilla trunk @ http://
hg.code. sf.net/ p/scintilla/ code - 71. By masmullin
-
Pull from hg clone http://
hg.code. sf.net/ p/scintilla/ code scintilla-code on Jan 23 9:43pm (parent: 4968:7cb4eedf5a84 tip) - 72. By masmullin
-
goes with previous commit
- 73. By masmullin
-
make it easier to merge next time
Unmerged revisions
- 73. By masmullin
-
make it easier to merge next time
- 72. By masmullin
-
goes with previous commit
- 71. By masmullin
-
Pull from hg clone http://
hg.code. sf.net/ p/scintilla/ code scintilla-code on Jan 23 9:43pm (parent: 4968:7cb4eedf5a84 tip) - 70. By masmullin
-
Grabbed from the scintilla trunk @ http://
hg.code. sf.net/ p/scintilla/ code - 69. By masmullin
-
automated merge
- 68. By masmullin
-
more manual merging from lp:scintilla-cocoa
- 67. By masmullin
-
manual merge from lp:scintilla-cocoa
- 66. By Michael Mullin <email address hidden>
-
I needed this change to compile clang-2.9 on ubuntu 11.04
- 65. By masmullin
-
update to cs 3814 from http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla - 64. By masmullin
-
http://
scintilla. hg.sourceforge. net:8000/ hgroot/ scintilla/ scintilla @ 3810... forgot the main.xib
Preview Diff
1 | === removed file '.bzrignore' | |||
2 | --- .bzrignore 2009-05-20 12:52:54 +0000 | |||
3 | +++ .bzrignore 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,10 +0,0 @@ | |||
5 | 1 | cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.mode2v3 | ||
6 | 2 | cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.pbxuser | ||
7 | 3 | *.mode2v3 | ||
8 | 4 | *.pbxuser | ||
9 | 5 | .DS_Store | ||
10 | 6 | cocoa/ScintillaTest/build | ||
11 | 7 | bin | ||
12 | 8 | bin | ||
13 | 9 | *.perspectivev3 | ||
14 | 10 | cocoa/ScintillaFramework/build | ||
15 | 11 | 0 | ||
16 | === added file '.hgeol' | |||
17 | --- .hgeol 1970-01-01 00:00:00 +0000 | |||
18 | +++ .hgeol 2014-01-24 04:00:28 +0000 | |||
19 | @@ -0,0 +1,42 @@ | |||
20 | 1 | [patterns] | ||
21 | 2 | **.cxx = native | ||
22 | 3 | **.cpp = native | ||
23 | 4 | **.c = native | ||
24 | 5 | **.h = native | ||
25 | 6 | **.m = native | ||
26 | 7 | **.mm = native | ||
27 | 8 | **.iface = native | ||
28 | 9 | **.template = native | ||
29 | 10 | **.mk = native | ||
30 | 11 | **.py = native | ||
31 | 12 | **.rc = native | ||
32 | 13 | **.html = native | ||
33 | 14 | **.bat = native | ||
34 | 15 | **.mak = native | ||
35 | 16 | **.def = native | ||
36 | 17 | **.manifest = native | ||
37 | 18 | **.properties = native | ||
38 | 19 | **.styled = native | ||
39 | 20 | **.asp = native | ||
40 | 21 | **.php = native | ||
41 | 22 | **.vb = native | ||
42 | 23 | **.d = native | ||
43 | 24 | **.lua = native | ||
44 | 25 | **.rb = native | ||
45 | 26 | **.pl = native | ||
46 | 27 | **.txt = native | ||
47 | 28 | **.pch = native | ||
48 | 29 | **.hgeol = native | ||
49 | 30 | **.dsp = native | ||
50 | 31 | **.sln = native | ||
51 | 32 | **.vcproj = native | ||
52 | 33 | **.pro = native | ||
53 | 34 | **.gen = native | ||
54 | 35 | **makefile = native | ||
55 | 36 | README = native | ||
56 | 37 | **.bmp = BIN | ||
57 | 38 | **.cur = BIN | ||
58 | 39 | **.ico = BIN | ||
59 | 40 | **.jpg = BIN | ||
60 | 41 | **.png = BIN | ||
61 | 42 | tgzsrc = LF | ||
62 | 0 | 43 | ||
63 | === renamed file '.hgeol' => '.hgeol.moved' | |||
64 | === added file '.hgignore' | |||
65 | --- .hgignore 1970-01-01 00:00:00 +0000 | |||
66 | +++ .hgignore 2014-01-24 04:00:28 +0000 | |||
67 | @@ -0,0 +1,59 @@ | |||
68 | 1 | syntax: glob | ||
69 | 2 | *.o | ||
70 | 3 | *.a | ||
71 | 4 | *.lib | ||
72 | 5 | *.obj | ||
73 | 6 | *.pyc | ||
74 | 7 | *.dll | ||
75 | 8 | *.dylib | ||
76 | 9 | *.framework | ||
77 | 10 | *.pyd | ||
78 | 11 | *.exp | ||
79 | 12 | *.lib | ||
80 | 13 | *.pdb | ||
81 | 14 | *.res | ||
82 | 15 | *.bak | ||
83 | 16 | *.sbr | ||
84 | 17 | *.suo | ||
85 | 18 | *.idb | ||
86 | 19 | *.bsc | ||
87 | 20 | *.intermediate.manifest | ||
88 | 21 | *.lastbuildstate | ||
89 | 22 | *.cache | ||
90 | 23 | *.ilk | ||
91 | 24 | *.ncb | ||
92 | 25 | *.tlog | ||
93 | 26 | *.sdf | ||
94 | 27 | gtk/*.plist | ||
95 | 28 | win32/*.plist | ||
96 | 29 | *.opt | ||
97 | 30 | *.plg | ||
98 | 31 | *.pbxbtree | ||
99 | 32 | *.mode1v3 | ||
100 | 33 | *.pbxuser | ||
101 | 34 | *.pbproj | ||
102 | 35 | *.log | ||
103 | 36 | *.xcbkptlist | ||
104 | 37 | *.xcscheme | ||
105 | 38 | *.xcworkspacedata | ||
106 | 39 | *.xcuserstate | ||
107 | 40 | *.xcsettings | ||
108 | 41 | xcschememanagement.plist | ||
109 | 42 | .DS_Store | ||
110 | 43 | cocoa/build | ||
111 | 44 | cocoa/ScintillaFramework/build | ||
112 | 45 | cocoa/ScintillaTest/build | ||
113 | 46 | macosx/SciTest/build | ||
114 | 47 | *.cppcheck | ||
115 | 48 | Makefile.Debug | ||
116 | 49 | Makefile.Release | ||
117 | 50 | *_resource.rc | ||
118 | 51 | moc_* | ||
119 | 52 | *.pro.user | ||
120 | 53 | ScintillaEdit.cpp | ||
121 | 54 | ScintillaEdit.h | ||
122 | 55 | ScintillaConstants.py | ||
123 | 56 | ScintillaEditBase.intermediate.manifest | ||
124 | 57 | ScintillaEdit.intermediate.manifest | ||
125 | 58 | qt/*/Makefile | ||
126 | 59 | cov-int | ||
127 | 0 | 60 | ||
128 | === renamed file '.hgignore' => '.hgignore.moved' | |||
129 | === added file '.hgtags' | |||
130 | --- .hgtags 1970-01-01 00:00:00 +0000 | |||
131 | +++ .hgtags 2014-01-24 04:00:28 +0000 | |||
132 | @@ -0,0 +1,95 @@ | |||
133 | 1 | 01f406ccdce315e9870c44036e18ebf0fa74df22 rel-1-64 | ||
134 | 2 | 038d4e745187fddd764fda49b12b878ece14c0bd rel-1-63 | ||
135 | 3 | 03dff61592cf2abbabd9e383f1c8417af3e9d87b rel-1-34 | ||
136 | 4 | 11a62bd24819d0044dcf4b8621f79924cab781bd rel-1-56 | ||
137 | 5 | 1804bf43c2443fb8db7468a36e8022891dfc32c5 rel-1-73 | ||
138 | 6 | 1c4055eaf77fb0e2730adcba2b04a9c40318bdf1 rel-1-74 | ||
139 | 7 | 2abff14b87854b56df577a96d6d87e06bbb44251 rel-1-27 | ||
140 | 8 | 3a80173ef6320433ac4ab05ff97774f186d878ba rel-1-75 | ||
141 | 9 | 4107ec8a3a14b68b832dd12ce568d6517da063f1 rel-2-03 | ||
142 | 10 | 4479fb32e7238069d4ed81d7e586b6bcbc2a94ce rel-1-39 | ||
143 | 11 | 4af05ea4430505d34c9832313c1e5aaac7a54237 rel-1-61 | ||
144 | 12 | 4b0ff01c39b7b9c7aa65d1965bd49daaffe05ea8 rel-1-40 | ||
145 | 13 | 4ec090359e447b59d24c3e970fc9faede13ec187 rel-1-45 | ||
146 | 14 | 4f3e52891003743da45d4464020f59849240d278 rel-1-37 | ||
147 | 15 | 4f77dabcfbab1de33dc2ef89029a4536a1c6c697 rel-1-25 | ||
148 | 16 | 4ff6778c456258929c6f9074bdc03d90c28968bf rel-2-00 | ||
149 | 17 | 58c51367e4127167fe7be54681b788618732d65b rel-1-51 | ||
150 | 18 | 668816d0fd5d75dee228bca98b183969c4b1de53 rel-1-52 | ||
151 | 19 | 67a79ce06212780dc0592bbcf3a3172244cf18c8 rel-1-76 | ||
152 | 20 | 67aaa980e972a75e9aa11e1fbfe66b4b9c1d78fe rel-1-48 | ||
153 | 21 | 6a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66 | ||
154 | 22 | 6a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66-carbon | ||
155 | 23 | 6aa816d746280a68821eb90efad0fb5f2d3b751e rel-1-35 | ||
156 | 24 | 6b44857e410f45ad5c9e9b48a481fb902c20a2dc rel-1-26 | ||
157 | 25 | 6b9c7f104c6160507212e5412ba79ecffc6f9057 initial | ||
158 | 26 | 7681410bf25abb8fa8f51552fd61ec83bdf1a8b0 rel-1-65 | ||
159 | 27 | 7c87fe602c2c1fd973eb89675813192723f7f368 rel-1-30 | ||
160 | 28 | 85fbbc9b421bdc97a34bead08cdd34cf4c6271f3 rel-1-58 | ||
161 | 29 | 86d8875ed69c96026e9ec4b77fff3f9d369bfcb6 rel-1-60 | ||
162 | 30 | 87f60a6fb558871ef85a781e5d03321f77e1d11a rel-1-38 | ||
163 | 31 | 89b230d9f013855747841b3b3bc8b229259e0c81 rel-1-79 | ||
164 | 32 | 8af30946bc0ad1196ddf51b51545929cab3fa2e6 rel-1-69 | ||
165 | 33 | 8c2d64c399e5d823e2b2ef547a260357be0428c0 rel-1-54 | ||
166 | 34 | 8d11fc4c543f6228d73fa385ec9fca5723f8c832 rel-2-11 | ||
167 | 35 | 94801bf860900c9dde428db66c5e01a63e521c05 rel-1-44 | ||
168 | 36 | 988c66dff88ed44913d8d6303f7e136c19f5d6ea rel-2-02 | ||
169 | 37 | 9d268dfb34560f2aeb817148ca746814fd85115d rel-1-46 | ||
170 | 38 | 9e813ff6f15778dd6c6d2f6ab20f9aa8e91b2e47 rel-1-47 | ||
171 | 39 | 9eda4d6efdd657f2ce8ad1034bdd20998f573a40 rel-1-49 | ||
172 | 40 | a313740fe8b8ee9df5cfc6f4bae7c665d160f4dd rel-1-78 | ||
173 | 41 | a5905b21afdbee56912e039eeb2e2f7fdcf155df rel-1-42 | ||
174 | 42 | ade751c9a7e7945e48428e32cdf41d6f7d189f08 rel-1-62 | ||
175 | 43 | ae7bd57a9dcedb67467a4b43a27bdf802479bc9e rel-1-33 | ||
176 | 44 | af2def618260df6bde2fdb3fd1f22ad532b18270 rel-1-77 | ||
177 | 45 | b618c255982d76d4d554c456888cd705b1a52d33 rel-1-68 | ||
178 | 46 | b6b5e68dd21fa2f5015e1b45f5b1880aa1c9ecef rel-1-55 | ||
179 | 47 | bd0f312842328a1118c43ebd54899916f1009b86 rel-1-57 | ||
180 | 48 | c019d05d7131f21ccf7abedb979ca29f2ff5fe32 rel-1-71 | ||
181 | 49 | c2c0575d28f000d925d4c0ec689df9b1e572af2d rel-1-43 | ||
182 | 50 | c6733869c489c4e39aeb84ffe5d28378e9fb121d rel-1-31 | ||
183 | 51 | cc4d999c38f16be78e8ba54749bd4e3711b66882 rel-1-41 | ||
184 | 52 | d125f70deea4580ead7cb72814bdb17ad9c16258 rel-1-36 | ||
185 | 53 | d2316766e67ea2a10effe85e6e27ea7b520df409 rel-1-70 | ||
186 | 54 | d940969f5c6f78c252ac110884aa89014c7d1349 rel-2-10 | ||
187 | 55 | ed67316cd7395abf840d8c9d10eb6a23f693d4fc rel-1-28 | ||
188 | 56 | ee4e67b4a9fe76e85230216340dc7eff3978fbf8 rel-1-59 | ||
189 | 57 | f04248111a542b559402f0e08253b613d7dec849 rel-1-32 | ||
190 | 58 | f394f7465aa354dfdea57599f8c7d0e424313144 rel-1-53 | ||
191 | 59 | f4d4bb4d5fd70e9affe63460161cf2779f9dfdb3 rel-1-24 | ||
192 | 60 | f6af29ca9c6e9ffd457d9f6b9477d03f2d944f64 rel-1-67 | ||
193 | 61 | f99c7dfc2bffb16cd478633526b4cba883e266ab rel-2-12 | ||
194 | 62 | fd3e6bb269b1c38e003202dc5856cf120667ed88 rel-1-72 | ||
195 | 63 | fdf95390299493c05c0e11c3c2ef98293c552908 rel-1-50 | ||
196 | 64 | fe112bae056a00c5e0b7218dd3903b16e3d43d24 rel-1-23 | ||
197 | 65 | ffde119d297ecdce968737c68f0e21410a0c36c4 rel-2-20 | ||
198 | 66 | bae0795bc8950108a5265dd3a1b231dbb1c0a92f rel-2-21 | ||
199 | 67 | 91d53a344450102a73387dd591cecc4294574891 rel-2-22 | ||
200 | 68 | 338e9c43eb8339b293aa5cb069aa84c60bbac6ba rel-2-23 | ||
201 | 69 | 3a0d1edb7ae5478426346dab2219e10606238bd0 rel-2-24 | ||
202 | 70 | 930e2f7d36165066fffd5cef6225c7774a2d7996 rel-2-25 | ||
203 | 71 | 221dae018a0dd86d4adc91370dfc507ca078b452 rel-2-26 | ||
204 | 72 | 02d0b25c22c3a4d672aca5fa37b3e5bffc30fa32 rel-2-27 | ||
205 | 73 | 265b4ffceb4a356fd7917ce938051e8a206bac3e rel-2-28 | ||
206 | 74 | 6f590a14726334be3256c55e8bab9119c71f3160 rel-2-29 | ||
207 | 75 | 7a59b936e02452b66dff32264e5bc72c038ade19 rel-3-0-0 | ||
208 | 76 | ad485b918c5a81dbf591eab1916afa3d600b0639 rel-3-0-1 | ||
209 | 77 | 16f620503ab2e3ae463e39c36f897385fd73b9d1 rel-3-0-2 | ||
210 | 78 | d147d5b894708a5c7d3e7b81513fe02f0075e62c rel-3-0-3 | ||
211 | 79 | 2faf55888eeb76e40d5b286cd45f4f40c331b1c2 rel-3-0-4 | ||
212 | 80 | a9219577729080874f5f46e0a634d5d117cc2eed rel-3-1-0 | ||
213 | 81 | ae4d2f897a8fd92294f61d4d56e90e7700a912df rel-3-2-0 | ||
214 | 82 | 41bdec833d4a9bb108bd3e4890371b22d1132f1a rel-3-2-1 | ||
215 | 83 | 183c117293e78c4264dca7afac9f66cb5d585ddc rel-3-2-2 | ||
216 | 84 | 7d54d6d61ace06828cb0850b53a8008672d67f33 rel-3-2-3 | ||
217 | 85 | 1092d3d2495955cfe1a227e360e14d5358b5136f rel-3-2-4 | ||
218 | 86 | 74f6ed8c5737db179f791d6fe6cab2dc119f65fb rel-3-2-5 | ||
219 | 87 | 04c9afc26342f4c1b9492c4b27efb33585d6a56d rel-3-3-0 | ||
220 | 88 | 5f9c0934513bf8d9dfe64127ad19cb95800415e9 scitex-3-3-0 | ||
221 | 89 | d2022a5e4948379ab0aa89b510b850209d6cbb01 rel-3-3-1 | ||
222 | 90 | d887fce163757c50ec95ed204d50b02675db830c rel-3-3-2 | ||
223 | 91 | 1cd0ebd585926933259e776ac380ef17a20e2d5d rel-3-3-3 | ||
224 | 92 | e1c3afb1c5d42c664558839b1d68ed4dcc50e5d1 rel-3-3-4 | ||
225 | 93 | c343e43079c4458fae69f82ff3b6569b7bba0821 rel-3-3-5 | ||
226 | 94 | da3cbb774e02f626fd9ee5446608f0f63665042a rel-3-3-6 | ||
227 | 95 | 5693714a8b0b30e481ba4f089f2ecc93fc80c80d rel-3-3-7 | ||
228 | 0 | 96 | ||
229 | === renamed file '.hgtags' => '.hgtags.moved' | |||
230 | === modified file 'README' | |||
231 | --- README 2011-08-19 07:30:58 +0000 | |||
232 | +++ README 2014-01-24 04:00:28 +0000 | |||
233 | @@ -40,8 +40,8 @@ | |||
234 | 40 | 40 | ||
235 | 41 | *** Windows version *** | 41 | *** Windows version *** |
236 | 42 | 42 | ||
239 | 43 | A C++ compiler is required. Visual Studio .NET 2010 is the development system | 43 | A C++ compiler is required. Visual Studio 2010 is the development system |
240 | 44 | used for most development although TDM Mingw32 4.4.1 is also supported. | 44 | used for most development although TDM Mingw32 4.7.1 is also supported. |
241 | 45 | 45 | ||
242 | 46 | To build Scintilla, make in the scintilla/win32 directory | 46 | To build Scintilla, make in the scintilla/win32 directory |
243 | 47 | cd scintilla\win32 | 47 | cd scintilla\win32 |
244 | @@ -54,10 +54,7 @@ | |||
245 | 54 | GCC: mingw32-make | 54 | GCC: mingw32-make |
246 | 55 | VS .NET: nmake -f scite.mak | 55 | VS .NET: nmake -f scite.mak |
247 | 56 | 56 | ||
252 | 57 | An executable SciTE will now be in scite\bin. | 57 | An executable SciTE will now be in scite/bin. |
249 | 58 | |||
250 | 59 | The Visual C++ 6.0 project (.dsp) and make files are no longer supported but are left | ||
251 | 60 | in the download for people that are prepared to update them. | ||
253 | 61 | 58 | ||
254 | 62 | *** GTK+/Windows version *** | 59 | *** GTK+/Windows version *** |
255 | 63 | 60 | ||
256 | 64 | 61 | ||
257 | === added directory 'bin' | |||
258 | === added file 'bin/.cvsignore' | |||
259 | --- bin/.cvsignore 1970-01-01 00:00:00 +0000 | |||
260 | +++ bin/.cvsignore 2014-01-24 04:00:28 +0000 | |||
261 | @@ -0,0 +1,2 @@ | |||
262 | 1 | .cvsignore | ||
263 | 2 | *.dll | ||
264 | 0 | 3 | ||
265 | === added file 'bin/__init__.py' | |||
266 | --- bin/__init__.py 1970-01-01 00:00:00 +0000 | |||
267 | +++ bin/__init__.py 2014-01-24 04:00:28 +0000 | |||
268 | @@ -0,0 +1,1 @@ | |||
269 | 1 | |||
270 | 0 | 2 | ||
271 | === added file 'bin/empty.txt' | |||
272 | --- bin/empty.txt 1970-01-01 00:00:00 +0000 | |||
273 | +++ bin/empty.txt 2014-01-24 04:00:28 +0000 | |||
274 | @@ -0,0 +1,1 @@ | |||
275 | 1 | This empty files ensures that the directory is created. | ||
276 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
277 | 1 | 3 | ||
278 | === modified file 'cocoa/Framework.mk' | |||
279 | --- cocoa/Framework.mk 2011-08-19 07:30:58 +0000 | |||
280 | +++ cocoa/Framework.mk 2014-01-24 04:00:28 +0000 | |||
281 | @@ -4,19 +4,16 @@ | |||
282 | 4 | INST_NAME=-install_name \ | 4 | INST_NAME=-install_name \ |
283 | 5 | @executable_path/../Frameworks/Sci.framework/Versions/A/Sci | 5 | @executable_path/../Frameworks/Sci.framework/Versions/A/Sci |
284 | 6 | 6 | ||
286 | 7 | LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME) | 7 | LD=$(COMPILER) $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME) -framework QuartzCore |
287 | 8 | 8 | ||
288 | 9 | LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx)))) | 9 | LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx)))) |
289 | 10 | 10 | ||
290 | 11 | SCI_LEXERS=$(LEXOBJS) \ | 11 | SCI_LEXERS=$(LEXOBJS) \ |
292 | 12 | LexerBase.o LexerModule.o LexerSimple.o Accessor.o | 12 | $(addsuffix .o, $(basename $(notdir $(wildcard ../lexlib/*.cxx)))) |
293 | 13 | 13 | ||
300 | 14 | SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o \ | 14 | SCI_FILES = $(notdir $(wildcard $(SCI_DIR)/*.cxx)) |
301 | 15 | ContractionState.o Decoration.o Document.o Editor.o \ | 15 | SCI_OBJ = $(addsuffix .o,$(basename $(SCI_FILES))) |
302 | 16 | ExternalLexer.o Indicator.o KeyMap.o LineMarker.o PerLine.o \ | 16 | SCI_OBJ += $(SCI_LEXERS) |
297 | 17 | PositionCache.o PropSetSimple.o RESearch.o RunStyles.o ScintillaBase.o Style.o \ | ||
298 | 18 | StyleContext.o UniConversion.o ViewStyle.o XPM.o WordList.o \ | ||
299 | 19 | Selection.o CharacterSet.o Catalogue.o $(SCI_LEXERS) | ||
303 | 20 | 17 | ||
304 | 21 | WAH_OBJ=DocumentAccessor.o KeyWords.o WindowAccessor.o | 18 | WAH_OBJ=DocumentAccessor.o KeyWords.o WindowAccessor.o |
305 | 22 | 19 | ||
306 | 23 | 20 | ||
307 | === modified file 'cocoa/InfoBar.h' | |||
308 | --- cocoa/InfoBar.h 2012-10-26 08:56:06 +0000 | |||
309 | +++ cocoa/InfoBar.h 2014-01-24 04:00:28 +0000 | |||
310 | @@ -28,15 +28,15 @@ | |||
311 | 28 | @private | 28 | @private |
312 | 29 | NSImage* mBackground; | 29 | NSImage* mBackground; |
313 | 30 | IBDisplay mDisplayMask; | 30 | IBDisplay mDisplayMask; |
315 | 31 | 31 | ||
316 | 32 | float mScaleFactor; | 32 | float mScaleFactor; |
317 | 33 | NSPopUpButton* mZoomPopup; | 33 | NSPopUpButton* mZoomPopup; |
319 | 34 | 34 | ||
320 | 35 | int mCurrentCaretX; | 35 | int mCurrentCaretX; |
321 | 36 | int mCurrentCaretY; | 36 | int mCurrentCaretY; |
322 | 37 | NSTextField* mCaretPositionLabel; | 37 | NSTextField* mCaretPositionLabel; |
323 | 38 | NSTextField* mStatusTextLabel; | 38 | NSTextField* mStatusTextLabel; |
325 | 39 | 39 | ||
326 | 40 | id <InfoBarCommunicator> mCallback; | 40 | id <InfoBarCommunicator> mCallback; |
327 | 41 | } | 41 | } |
328 | 42 | 42 | ||
329 | 43 | 43 | ||
330 | === modified file 'cocoa/InfoBar.mm' | |||
331 | --- cocoa/InfoBar.mm 2013-01-09 10:52:16 +0000 | |||
332 | +++ cocoa/InfoBar.mm 2014-01-24 04:00:28 +0000 | |||
333 | @@ -22,7 +22,7 @@ | |||
334 | 22 | { | 22 | { |
335 | 23 | // Get the parent's idea of where we should draw | 23 | // Get the parent's idea of where we should draw |
336 | 24 | NSRect newRect = [super drawingRectForBounds: theRect]; | 24 | NSRect newRect = [super drawingRectForBounds: theRect]; |
338 | 25 | 25 | ||
339 | 26 | // When the text field is being edited or selected, we have to turn off the magic because it | 26 | // When the text field is being edited or selected, we have to turn off the magic because it |
340 | 27 | // screws up the configuration of the field editor. We sneak around this by intercepting | 27 | // screws up the configuration of the field editor. We sneak around this by intercepting |
341 | 28 | // selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute. | 28 | // selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute. |
342 | @@ -30,26 +30,26 @@ | |||
343 | 30 | { | 30 | { |
344 | 31 | // Get our ideal size for current text | 31 | // Get our ideal size for current text |
345 | 32 | NSSize textSize = [self cellSizeForBounds: theRect]; | 32 | NSSize textSize = [self cellSizeForBounds: theRect]; |
347 | 33 | 33 | ||
348 | 34 | // Center that in the proposed rect | 34 | // Center that in the proposed rect |
350 | 35 | float heightDelta = newRect.size.height - textSize.height; | 35 | float heightDelta = newRect.size.height - textSize.height; |
351 | 36 | if (heightDelta > 0) | 36 | if (heightDelta > 0) |
352 | 37 | { | 37 | { |
353 | 38 | newRect.size.height -= heightDelta; | 38 | newRect.size.height -= heightDelta; |
354 | 39 | newRect.origin.y += ceil(heightDelta / 2); | 39 | newRect.origin.y += ceil(heightDelta / 2); |
355 | 40 | } | 40 | } |
356 | 41 | } | 41 | } |
358 | 42 | 42 | ||
359 | 43 | return newRect; | 43 | return newRect; |
360 | 44 | } | 44 | } |
361 | 45 | 45 | ||
362 | 46 | //-------------------------------------------------------------------------------------------------- | 46 | //-------------------------------------------------------------------------------------------------- |
363 | 47 | 47 | ||
365 | 48 | - (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj | 48 | - (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj |
366 | 49 | delegate:(id) anObject start: (NSInteger) selStart length: (NSInteger) selLength | 49 | delegate:(id) anObject start: (NSInteger) selStart length: (NSInteger) selLength |
367 | 50 | { | 50 | { |
368 | 51 | aRect = [self drawingRectForBounds: aRect]; | 51 | aRect = [self drawingRectForBounds: aRect]; |
370 | 52 | mIsEditingOrSelecting = YES; | 52 | mIsEditingOrSelecting = YES; |
371 | 53 | [super selectWithFrame: aRect | 53 | [super selectWithFrame: aRect |
372 | 54 | inView: controlView | 54 | inView: controlView |
373 | 55 | editor: textObj | 55 | editor: textObj |
374 | @@ -63,7 +63,7 @@ | |||
375 | 63 | 63 | ||
376 | 64 | - (void) editWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj | 64 | - (void) editWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj |
377 | 65 | delegate: (id) anObject event: (NSEvent*) theEvent | 65 | delegate: (id) anObject event: (NSEvent*) theEvent |
379 | 66 | { | 66 | { |
380 | 67 | aRect = [self drawingRectForBounds: aRect]; | 67 | aRect = [self drawingRectForBounds: aRect]; |
381 | 68 | mIsEditingOrSelecting = YES; | 68 | mIsEditingOrSelecting = YES; |
382 | 69 | [super editWithFrame: aRect | 69 | [super editWithFrame: aRect |
383 | @@ -86,9 +86,15 @@ | |||
384 | 86 | if (self) | 86 | if (self) |
385 | 87 | { | 87 | { |
386 | 88 | NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]]; | 88 | NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]]; |
387 | 89 | <<<<<<< TREE | ||
388 | 89 | 90 | ||
389 | 90 | NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"png" inDirectory: nil]; | 91 | NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"png" inDirectory: nil]; |
390 | 91 | mBackground = [[NSImage alloc] initWithContentsOfFile: path]; | 92 | mBackground = [[NSImage alloc] initWithContentsOfFile: path]; |
391 | 93 | ======= | ||
392 | 94 | |||
393 | 95 | NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"tiff" inDirectory: nil]; | ||
394 | 96 | mBackground = [[NSImage alloc] initWithContentsOfFile: path]; | ||
395 | 97 | >>>>>>> MERGE-SOURCE | ||
396 | 92 | if (![mBackground isValid]) | 98 | if (![mBackground isValid]) |
397 | 93 | NSLog(@"Background image for info bar is invalid."); | 99 | NSLog(@"Background image for info bar is invalid."); |
398 | 94 | 100 | ||
399 | @@ -103,7 +109,7 @@ | |||
400 | 103 | //-------------------------------------------------------------------------------------------------- | 109 | //-------------------------------------------------------------------------------------------------- |
401 | 104 | 110 | ||
402 | 105 | /** | 111 | /** |
404 | 106 | * Called by a connected compontent (usually the info bar) if something changed there. | 112 | * Called by a connected component (usually the info bar) if something changed there. |
405 | 107 | * | 113 | * |
406 | 108 | * @param type The type of the notification. | 114 | * @param type The type of the notification. |
407 | 109 | * @param message Carries the new status message if the type is a status message change. | 115 | * @param message Carries the new status message if the type is a status message change. |
408 | @@ -152,14 +158,14 @@ | |||
409 | 152 | { | 158 | { |
410 | 153 | // 1) The zoom popup. | 159 | // 1) The zoom popup. |
411 | 154 | unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *); | 160 | unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *); |
413 | 155 | 161 | ||
414 | 156 | // Create the popup button. | 162 | // Create the popup button. |
415 | 157 | mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO]; | 163 | mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO]; |
417 | 158 | 164 | ||
418 | 159 | // No border or background please. | 165 | // No border or background please. |
419 | 160 | [[mZoomPopup cell] setBordered: NO]; | 166 | [[mZoomPopup cell] setBordered: NO]; |
420 | 161 | [[mZoomPopup cell] setArrowPosition: NSPopUpArrowAtBottom]; | 167 | [[mZoomPopup cell] setArrowPosition: NSPopUpArrowAtBottom]; |
422 | 162 | 168 | ||
423 | 163 | // Fill it. | 169 | // Fill it. |
424 | 164 | for (unsigned count = 0; count < numberOfDefaultItems; count++) | 170 | for (unsigned count = 0; count < numberOfDefaultItems; count++) |
425 | 165 | { | 171 | { |
426 | @@ -169,28 +175,28 @@ | |||
427 | 169 | [currentItem setRepresentedObject: [NSNumber numberWithFloat: DefaultScaleMenuFactors[count]]]; | 175 | [currentItem setRepresentedObject: [NSNumber numberWithFloat: DefaultScaleMenuFactors[count]]]; |
428 | 170 | } | 176 | } |
429 | 171 | [mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex]; | 177 | [mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex]; |
431 | 172 | 178 | ||
432 | 173 | // Hook it up. | 179 | // Hook it up. |
433 | 174 | [mZoomPopup setTarget: self]; | 180 | [mZoomPopup setTarget: self]; |
434 | 175 | [mZoomPopup setAction: @selector(zoomItemAction:)]; | 181 | [mZoomPopup setAction: @selector(zoomItemAction:)]; |
436 | 176 | 182 | ||
437 | 177 | // Set a suitable font. | 183 | // Set a suitable font. |
438 | 178 | [mZoomPopup setFont: [NSFont menuBarFontOfSize: BarFontSize]]; | 184 | [mZoomPopup setFont: [NSFont menuBarFontOfSize: BarFontSize]]; |
440 | 179 | 185 | ||
441 | 180 | // Make sure the popup is big enough to fit the cells. | 186 | // Make sure the popup is big enough to fit the cells. |
442 | 181 | [mZoomPopup sizeToFit]; | 187 | [mZoomPopup sizeToFit]; |
444 | 182 | 188 | ||
445 | 183 | // Don't let it become first responder | 189 | // Don't let it become first responder |
446 | 184 | [mZoomPopup setRefusesFirstResponder: YES]; | 190 | [mZoomPopup setRefusesFirstResponder: YES]; |
448 | 185 | 191 | ||
449 | 186 | // put it in the scrollview. | 192 | // put it in the scrollview. |
450 | 187 | [self addSubview: mZoomPopup]; | 193 | [self addSubview: mZoomPopup]; |
451 | 188 | [mZoomPopup release]; | 194 | [mZoomPopup release]; |
453 | 189 | 195 | ||
454 | 190 | // 2) The caret position label. | 196 | // 2) The caret position label. |
455 | 191 | Class oldCellClass = [NSTextField cellClass]; | 197 | Class oldCellClass = [NSTextField cellClass]; |
456 | 192 | [NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]]; | 198 | [NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]]; |
458 | 193 | 199 | ||
459 | 194 | mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)]; | 200 | mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)]; |
460 | 195 | [mCaretPositionLabel setBezeled: NO]; | 201 | [mCaretPositionLabel setBezeled: NO]; |
461 | 196 | [mCaretPositionLabel setBordered: NO]; | 202 | [mCaretPositionLabel setBordered: NO]; |
462 | @@ -205,7 +211,7 @@ | |||
463 | 205 | 211 | ||
464 | 206 | [self addSubview: mCaretPositionLabel]; | 212 | [self addSubview: mCaretPositionLabel]; |
465 | 207 | [mCaretPositionLabel release]; | 213 | [mCaretPositionLabel release]; |
467 | 208 | 214 | ||
468 | 209 | // 3) The status text. | 215 | // 3) The status text. |
469 | 210 | mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)]; | 216 | mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)]; |
470 | 211 | [mStatusTextLabel setBezeled: NO]; | 217 | [mStatusTextLabel setBezeled: NO]; |
471 | @@ -220,7 +226,7 @@ | |||
472 | 220 | 226 | ||
473 | 221 | [self addSubview: mStatusTextLabel]; | 227 | [self addSubview: mStatusTextLabel]; |
474 | 222 | [mStatusTextLabel release]; | 228 | [mStatusTextLabel release]; |
476 | 223 | 229 | ||
477 | 224 | // Restore original cell class so that everything else doesn't get broken | 230 | // Restore original cell class so that everything else doesn't get broken |
478 | 225 | [NSTextField setCellClass: oldCellClass]; | 231 | [NSTextField setCellClass: oldCellClass]; |
479 | 226 | } | 232 | } |
480 | @@ -248,12 +254,12 @@ | |||
481 | 248 | [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1]; | 254 | [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1]; |
482 | 249 | target.x += mBackground.size.width; | 255 | target.x += mBackground.size.width; |
483 | 250 | } | 256 | } |
485 | 251 | 257 | ||
486 | 252 | // Draw separator lines between items. | 258 | // Draw separator lines between items. |
487 | 253 | NSRect verticalLineRect; | 259 | NSRect verticalLineRect; |
488 | 254 | float component = 190.0 / 255.0; | 260 | float component = 190.0 / 255.0; |
489 | 255 | NSColor* lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1]; | 261 | NSColor* lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1]; |
491 | 256 | 262 | ||
492 | 257 | if (mDisplayMask & IBShowZoom) | 263 | if (mDisplayMask & IBShowZoom) |
493 | 258 | { | 264 | { |
494 | 259 | verticalLineRect = [mZoomPopup frame]; | 265 | verticalLineRect = [mZoomPopup frame]; |
495 | @@ -265,7 +271,7 @@ | |||
496 | 265 | NSRectFill(verticalLineRect); | 271 | NSRectFill(verticalLineRect); |
497 | 266 | } | 272 | } |
498 | 267 | } | 273 | } |
500 | 268 | 274 | ||
501 | 269 | if (mDisplayMask & IBShowCaretPosition) | 275 | if (mDisplayMask & IBShowCaretPosition) |
502 | 270 | { | 276 | { |
503 | 271 | verticalLineRect = [mCaretPositionLabel frame]; | 277 | verticalLineRect = [mCaretPositionLabel frame]; |
504 | @@ -347,7 +353,7 @@ | |||
505 | 347 | mDisplayMask = display; | 353 | mDisplayMask = display; |
506 | 348 | [self positionSubViews]; | 354 | [self positionSubViews]; |
507 | 349 | [self needsDisplay]; | 355 | [self needsDisplay]; |
509 | 350 | } | 356 | } |
510 | 351 | } | 357 | } |
511 | 352 | 358 | ||
512 | 353 | //-------------------------------------------------------------------------------------------------- | 359 | //-------------------------------------------------------------------------------------------------- |
513 | @@ -358,7 +364,7 @@ | |||
514 | 358 | - (void) zoomItemAction: (id) sender | 364 | - (void) zoomItemAction: (id) sender |
515 | 359 | { | 365 | { |
516 | 360 | NSNumber* selectedFactorObject = [[sender selectedCell] representedObject]; | 366 | NSNumber* selectedFactorObject = [[sender selectedCell] representedObject]; |
518 | 361 | 367 | ||
519 | 362 | if (selectedFactorObject == nil) | 368 | if (selectedFactorObject == nil) |
520 | 363 | { | 369 | { |
521 | 364 | NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported."); | 370 | NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported."); |
522 | @@ -369,9 +375,9 @@ | |||
523 | 369 | [self setScaleFactor: [selectedFactorObject floatValue] adjustPopup: NO]; | 375 | [self setScaleFactor: [selectedFactorObject floatValue] adjustPopup: NO]; |
524 | 370 | } | 376 | } |
525 | 371 | } | 377 | } |
527 | 372 | 378 | ||
528 | 373 | //-------------------------------------------------------------------------------------------------- | 379 | //-------------------------------------------------------------------------------------------------- |
530 | 374 | 380 | ||
531 | 375 | - (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag | 381 | - (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag |
532 | 376 | { | 382 | { |
533 | 377 | if (mScaleFactor != newScaleFactor) | 383 | if (mScaleFactor != newScaleFactor) |
534 | @@ -381,7 +387,7 @@ | |||
535 | 381 | { | 387 | { |
536 | 382 | unsigned count = 0; | 388 | unsigned count = 0; |
537 | 383 | unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float); | 389 | unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float); |
539 | 384 | 390 | ||
540 | 385 | // We only work with some preset zoom values. If the given value does not correspond | 391 | // We only work with some preset zoom values. If the given value does not correspond |
541 | 386 | // to one then show no selection. | 392 | // to one then show no selection. |
542 | 387 | while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07)) | 393 | while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07)) |
543 | @@ -391,7 +397,7 @@ | |||
544 | 391 | else | 397 | else |
545 | 392 | { | 398 | { |
546 | 393 | [mZoomPopup selectItemAtIndex: count]; | 399 | [mZoomPopup selectItemAtIndex: count]; |
548 | 394 | 400 | ||
549 | 395 | // Set scale factor to found preset value if it comes close. | 401 | // Set scale factor to found preset value if it comes close. |
550 | 396 | mScaleFactor = DefaultScaleMenuFactors[count]; | 402 | mScaleFactor = DefaultScaleMenuFactors[count]; |
551 | 397 | } | 403 | } |
552 | @@ -400,7 +406,7 @@ | |||
553 | 400 | { | 406 | { |
554 | 401 | // Internally set. Notify owner. | 407 | // Internally set. Notify owner. |
555 | 402 | [mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor]; | 408 | [mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor]; |
557 | 403 | } | 409 | } |
558 | 404 | } | 410 | } |
559 | 405 | } | 411 | } |
560 | 406 | 412 | ||
561 | @@ -414,12 +420,12 @@ | |||
562 | 414 | // Make the position one-based. | 420 | // Make the position one-based. |
563 | 415 | int newX = (int) position.x + 1; | 421 | int newX = (int) position.x + 1; |
564 | 416 | int newY = (int) position.y + 1; | 422 | int newY = (int) position.y + 1; |
566 | 417 | 423 | ||
567 | 418 | if (mCurrentCaretX != newX || mCurrentCaretY != newY) | 424 | if (mCurrentCaretX != newX || mCurrentCaretY != newY) |
568 | 419 | { | 425 | { |
569 | 420 | mCurrentCaretX = newX; | 426 | mCurrentCaretX = newX; |
570 | 421 | mCurrentCaretY = newY; | 427 | mCurrentCaretY = newY; |
572 | 422 | 428 | ||
573 | 423 | [mCaretPositionLabel setStringValue: [NSString stringWithFormat: @"%d:%d", newX, newY]]; | 429 | [mCaretPositionLabel setStringValue: [NSString stringWithFormat: @"%d:%d", newX, newY]]; |
574 | 424 | } | 430 | } |
575 | 425 | } | 431 | } |
576 | @@ -427,7 +433,7 @@ | |||
577 | 427 | //-------------------------------------------------------------------------------------------------- | 433 | //-------------------------------------------------------------------------------------------------- |
578 | 428 | 434 | ||
579 | 429 | /** | 435 | /** |
581 | 430 | * Makes the bar resize to the smallest width that can accomodate the currently enabled items. | 436 | * Makes the bar resize to the smallest width that can accommodate the currently enabled items. |
582 | 431 | */ | 437 | */ |
583 | 432 | - (void) sizeToFit | 438 | - (void) sizeToFit |
584 | 433 | { | 439 | { |
585 | @@ -435,13 +441,13 @@ | |||
586 | 435 | frame.size.width = 0; | 441 | frame.size.width = 0; |
587 | 436 | if (mDisplayMask & IBShowZoom) | 442 | if (mDisplayMask & IBShowZoom) |
588 | 437 | frame.size.width += [mZoomPopup frame].size.width; | 443 | frame.size.width += [mZoomPopup frame].size.width; |
590 | 438 | 444 | ||
591 | 439 | if (mDisplayMask & IBShowCaretPosition) | 445 | if (mDisplayMask & IBShowCaretPosition) |
592 | 440 | frame.size.width += [mCaretPositionLabel frame].size.width; | 446 | frame.size.width += [mCaretPositionLabel frame].size.width; |
594 | 441 | 447 | ||
595 | 442 | if (mDisplayMask & IBShowStatusText) | 448 | if (mDisplayMask & IBShowStatusText) |
596 | 443 | frame.size.width += [mStatusTextLabel frame].size.width; | 449 | frame.size.width += [mStatusTextLabel frame].size.width; |
598 | 444 | 450 | ||
599 | 445 | [self setFrame: frame]; | 451 | [self setFrame: frame]; |
600 | 446 | } | 452 | } |
601 | 447 | 453 | ||
602 | 448 | 454 | ||
603 | === modified file 'cocoa/PlatCocoa.h' | |||
604 | --- cocoa/PlatCocoa.h 2012-10-26 08:56:06 +0000 | |||
605 | +++ cocoa/PlatCocoa.h 2014-01-24 04:00:28 +0000 | |||
606 | @@ -50,7 +50,7 @@ | |||
607 | 50 | QuartzTextLayout* textLayout; | 50 | QuartzTextLayout* textLayout; |
608 | 51 | int codePage; | 51 | int codePage; |
609 | 52 | int verticalDeviceResolution; | 52 | int verticalDeviceResolution; |
611 | 53 | 53 | ||
612 | 54 | /** If the surface is a bitmap context, contains a reference to the bitmap data. */ | 54 | /** If the surface is a bitmap context, contains a reference to the bitmap data. */ |
613 | 55 | uint8_t* bitmapData; | 55 | uint8_t* bitmapData; |
614 | 56 | /** If the surface is a bitmap context, stores the dimensions of the bitmap. */ | 56 | /** If the surface is a bitmap context, stores the dimensions of the bitmap. */ |
615 | @@ -96,6 +96,7 @@ | |||
616 | 96 | void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage); | 96 | void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage); |
617 | 97 | void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back); | 97 | void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back); |
618 | 98 | void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource); | 98 | void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource); |
619 | 99 | <<<<<<< TREE | ||
620 | 99 | void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, | 100 | void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, |
621 | 100 | ColourDesired back); | 101 | ColourDesired back); |
622 | 101 | void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, | 102 | void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, |
623 | @@ -110,6 +111,22 @@ | |||
624 | 110 | XYPOSITION ExternalLeading(Font &font_); | 111 | XYPOSITION ExternalLeading(Font &font_); |
625 | 111 | XYPOSITION Height(Font &font_); | 112 | XYPOSITION Height(Font &font_); |
626 | 112 | XYPOSITION AverageCharWidth(Font &font_); | 113 | XYPOSITION AverageCharWidth(Font &font_); |
627 | 114 | ======= | ||
628 | 115 | void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, | ||
629 | 116 | ColourDesired back); | ||
630 | 117 | void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, | ||
631 | 118 | ColourDesired back); | ||
632 | 119 | void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore); | ||
633 | 120 | void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions); | ||
634 | 121 | XYPOSITION WidthText(Font &font_, const char *s, int len); | ||
635 | 122 | XYPOSITION WidthChar(Font &font_, char ch); | ||
636 | 123 | XYPOSITION Ascent(Font &font_); | ||
637 | 124 | XYPOSITION Descent(Font &font_); | ||
638 | 125 | XYPOSITION InternalLeading(Font &font_); | ||
639 | 126 | XYPOSITION ExternalLeading(Font &font_); | ||
640 | 127 | XYPOSITION Height(Font &font_); | ||
641 | 128 | XYPOSITION AverageCharWidth(Font &font_); | ||
642 | 129 | >>>>>>> MERGE-SOURCE | ||
643 | 113 | 130 | ||
644 | 114 | void SetClip(PRectangle rc); | 131 | void SetClip(PRectangle rc); |
645 | 115 | void FlushCachedState(); | 132 | void FlushCachedState(); |
646 | @@ -117,7 +134,7 @@ | |||
647 | 117 | void SetUnicodeMode(bool unicodeMode_); | 134 | void SetUnicodeMode(bool unicodeMode_); |
648 | 118 | void SetDBCSMode(int codePage_); | 135 | void SetDBCSMode(int codePage_); |
649 | 119 | }; // SurfaceImpl class | 136 | }; // SurfaceImpl class |
651 | 120 | 137 | ||
652 | 121 | } // Scintilla namespace | 138 | } // Scintilla namespace |
653 | 122 | 139 | ||
654 | 123 | #endif | 140 | #endif |
655 | 124 | 141 | ||
656 | === modified file 'cocoa/PlatCocoa.mm' | |||
657 | --- cocoa/PlatCocoa.mm 2012-10-26 08:56:06 +0000 | |||
658 | +++ cocoa/PlatCocoa.mm 2014-01-24 04:00:28 +0000 | |||
659 | @@ -12,9 +12,10 @@ | |||
660 | 12 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). | 12 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). |
661 | 13 | */ | 13 | */ |
662 | 14 | 14 | ||
666 | 15 | #import <ScintillaView.h> | 15 | #import "Platform.h" |
667 | 16 | 16 | #import "ScintillaView.h" | |
668 | 17 | #include "PlatCocoa.h" | 17 | #import "ScintillaCocoa.h" |
669 | 18 | #import "PlatCocoa.h" | ||
670 | 18 | 19 | ||
671 | 19 | #include <cstring> | 20 | #include <cstring> |
672 | 20 | #include <cstdio> | 21 | #include <cstdio> |
673 | @@ -22,14 +23,14 @@ | |||
674 | 22 | #include <assert.h> | 23 | #include <assert.h> |
675 | 23 | #include <sys/time.h> | 24 | #include <sys/time.h> |
676 | 24 | #include <stdexcept> | 25 | #include <stdexcept> |
677 | 26 | #include <vector> | ||
678 | 25 | #include <map> | 27 | #include <map> |
679 | 26 | 28 | ||
680 | 29 | #include "StringCopy.h" | ||
681 | 27 | #include "XPM.h" | 30 | #include "XPM.h" |
682 | 28 | 31 | ||
683 | 29 | #import <Foundation/NSGeometry.h> | 32 | #import <Foundation/NSGeometry.h> |
684 | 30 | 33 | ||
685 | 31 | #import <Carbon/Carbon.h> // Temporary | ||
686 | 32 | |||
687 | 33 | using namespace Scintilla; | 34 | using namespace Scintilla; |
688 | 34 | 35 | ||
689 | 35 | extern sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam); | 36 | extern sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam); |
690 | @@ -57,7 +58,7 @@ | |||
691 | 57 | //-------------------------------------------------------------------------------------------------- | 58 | //-------------------------------------------------------------------------------------------------- |
692 | 58 | 59 | ||
693 | 59 | /** | 60 | /** |
695 | 60 | * Converts a PRctangle as used by Scintilla to a Quartz-style rectangle. | 61 | * Converts a PRectangle as used by Scintilla to a Quartz-style rectangle. |
696 | 61 | */ | 62 | */ |
697 | 62 | inline CGRect PRectangleToCGRect(PRectangle& rc) | 63 | inline CGRect PRectangleToCGRect(PRectangle& rc) |
698 | 63 | { | 64 | { |
699 | @@ -178,7 +179,7 @@ | |||
700 | 178 | } | 179 | } |
701 | 179 | bitmapData = NULL; | 180 | bitmapData = NULL; |
702 | 180 | gc = NULL; | 181 | gc = NULL; |
704 | 181 | 182 | ||
705 | 182 | bitmapWidth = 0; | 183 | bitmapWidth = 0; |
706 | 183 | bitmapHeight = 0; | 184 | bitmapHeight = 0; |
707 | 184 | x = 0; | 185 | x = 0; |
708 | @@ -198,11 +199,11 @@ | |||
709 | 198 | void SurfaceImpl::Init(WindowID) | 199 | void SurfaceImpl::Init(WindowID) |
710 | 199 | { | 200 | { |
711 | 200 | // To be able to draw, the surface must get a CGContext handle. We save the graphics port, | 201 | // To be able to draw, the surface must get a CGContext handle. We save the graphics port, |
713 | 201 | // then aquire/release the context on an as-need basis (see above). | 202 | // then acquire/release the context on an as-need basis (see above). |
714 | 202 | // XXX Docs on QDBeginCGContext are light, a better way to do this would be good. | 203 | // XXX Docs on QDBeginCGContext are light, a better way to do this would be good. |
715 | 203 | // AFAIK we should not hold onto a context retrieved this way, thus the need for | 204 | // AFAIK we should not hold onto a context retrieved this way, thus the need for |
718 | 204 | // aquire/release of the context. | 205 | // acquire/release of the context. |
719 | 205 | 206 | ||
720 | 206 | Release(); | 207 | Release(); |
721 | 207 | } | 208 | } |
722 | 208 | 209 | ||
723 | @@ -221,45 +222,42 @@ | |||
724 | 221 | void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */) | 222 | void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */) |
725 | 222 | { | 223 | { |
726 | 223 | Release(); | 224 | Release(); |
728 | 224 | 225 | ||
729 | 225 | // Create a new bitmap context, along with the RAM for the bitmap itself | 226 | // Create a new bitmap context, along with the RAM for the bitmap itself |
730 | 226 | bitmapWidth = width; | 227 | bitmapWidth = width; |
731 | 227 | bitmapHeight = height; | 228 | bitmapHeight = height; |
733 | 228 | 229 | ||
734 | 229 | const int bitmapBytesPerRow = (width * BYTES_PER_PIXEL); | 230 | const int bitmapBytesPerRow = (width * BYTES_PER_PIXEL); |
735 | 230 | const int bitmapByteCount = (bitmapBytesPerRow * height); | 231 | const int bitmapByteCount = (bitmapBytesPerRow * height); |
737 | 231 | 232 | ||
738 | 232 | // Create an RGB color space. | 233 | // Create an RGB color space. |
739 | 233 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | 234 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); |
740 | 234 | if (colorSpace == NULL) | 235 | if (colorSpace == NULL) |
741 | 235 | return; | 236 | return; |
743 | 236 | 237 | ||
744 | 237 | // Create the bitmap. | 238 | // Create the bitmap. |
745 | 238 | bitmapData = new uint8_t[bitmapByteCount]; | 239 | bitmapData = new uint8_t[bitmapByteCount]; |
747 | 239 | if (bitmapData != NULL) | 240 | // create the context |
748 | 241 | gc = CGBitmapContextCreate(bitmapData, | ||
749 | 242 | width, | ||
750 | 243 | height, | ||
751 | 244 | BITS_PER_COMPONENT, | ||
752 | 245 | bitmapBytesPerRow, | ||
753 | 246 | colorSpace, | ||
754 | 247 | kCGImageAlphaPremultipliedLast); | ||
755 | 248 | |||
756 | 249 | if (gc == NULL) | ||
757 | 240 | { | 250 | { |
775 | 241 | // create the context | 251 | // the context couldn't be created for some reason, |
776 | 242 | gc = CGBitmapContextCreate(bitmapData, | 252 | // and we have no use for the bitmap without the context |
777 | 243 | width, | 253 | delete[] bitmapData; |
778 | 244 | height, | 254 | bitmapData = NULL; |
762 | 245 | BITS_PER_COMPONENT, | ||
763 | 246 | bitmapBytesPerRow, | ||
764 | 247 | colorSpace, | ||
765 | 248 | kCGImageAlphaPremultipliedLast); | ||
766 | 249 | |||
767 | 250 | if (gc == NULL) | ||
768 | 251 | { | ||
769 | 252 | // the context couldn't be created for some reason, | ||
770 | 253 | // and we have no use for the bitmap without the context | ||
771 | 254 | delete[] bitmapData; | ||
772 | 255 | bitmapData = NULL; | ||
773 | 256 | } | ||
774 | 257 | textLayout->setContext (gc); | ||
779 | 258 | } | 255 | } |
781 | 259 | 256 | textLayout->setContext (gc); | |
782 | 257 | |||
783 | 260 | // the context retains the color space, so we can release it | 258 | // the context retains the color space, so we can release it |
784 | 261 | CGColorSpaceRelease(colorSpace); | 259 | CGColorSpaceRelease(colorSpace); |
786 | 262 | 260 | ||
787 | 263 | if (gc != NULL && bitmapData != NULL) | 261 | if (gc != NULL && bitmapData != NULL) |
788 | 264 | { | 262 | { |
789 | 265 | // "Erase" to white. | 263 | // "Erase" to white. |
790 | @@ -276,9 +274,9 @@ | |||
791 | 276 | if (gc) | 274 | if (gc) |
792 | 277 | { | 275 | { |
793 | 278 | ColourDesired colour(fore.AsLong()); | 276 | ColourDesired colour(fore.AsLong()); |
795 | 279 | 277 | ||
796 | 280 | // Set the Stroke color to match | 278 | // Set the Stroke color to match |
798 | 281 | CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, | 279 | CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, |
799 | 282 | colour.GetBlue() / 255.0, 1.0 ); | 280 | colour.GetBlue() / 255.0, 1.0 ); |
800 | 283 | } | 281 | } |
801 | 284 | } | 282 | } |
802 | @@ -290,9 +288,9 @@ | |||
803 | 290 | if (gc) | 288 | if (gc) |
804 | 291 | { | 289 | { |
805 | 292 | ColourDesired colour(back.AsLong()); | 290 | ColourDesired colour(back.AsLong()); |
807 | 293 | 291 | ||
808 | 294 | // Set the Fill color to match | 292 | // Set the Fill color to match |
810 | 295 | CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, | 293 | CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, |
811 | 296 | colour.GetBlue() / 255.0, 1.0 ); | 294 | colour.GetBlue() / 255.0, 1.0 ); |
812 | 297 | } | 295 | } |
813 | 298 | } | 296 | } |
814 | @@ -304,17 +302,17 @@ | |||
815 | 304 | // For now, assume that GetImage can only be called on PixMap surfaces. | 302 | // For now, assume that GetImage can only be called on PixMap surfaces. |
816 | 305 | if (bitmapData == NULL) | 303 | if (bitmapData == NULL) |
817 | 306 | return NULL; | 304 | return NULL; |
819 | 307 | 305 | ||
820 | 308 | CGContextFlush(gc); | 306 | CGContextFlush(gc); |
822 | 309 | 307 | ||
823 | 310 | // Create an RGB color space. | 308 | // Create an RGB color space. |
824 | 311 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | 309 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); |
825 | 312 | if( colorSpace == NULL ) | 310 | if( colorSpace == NULL ) |
826 | 313 | return NULL; | 311 | return NULL; |
828 | 314 | 312 | ||
829 | 315 | const int bitmapBytesPerRow = ((int) bitmapWidth * BYTES_PER_PIXEL); | 313 | const int bitmapBytesPerRow = ((int) bitmapWidth * BYTES_PER_PIXEL); |
830 | 316 | const int bitmapByteCount = (bitmapBytesPerRow * (int) bitmapHeight); | 314 | const int bitmapByteCount = (bitmapBytesPerRow * (int) bitmapHeight); |
832 | 317 | 315 | ||
833 | 318 | // Make a copy of the bitmap data for the image creation and divorce it | 316 | // Make a copy of the bitmap data for the image creation and divorce it |
834 | 319 | // From the SurfaceImpl lifetime | 317 | // From the SurfaceImpl lifetime |
835 | 320 | CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bitmapData, bitmapByteCount); | 318 | CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bitmapData, bitmapByteCount); |
836 | @@ -338,18 +336,18 @@ | |||
837 | 338 | 0, | 336 | 0, |
838 | 339 | kCGRenderingIntentDefault); | 337 | kCGRenderingIntentDefault); |
839 | 340 | } | 338 | } |
841 | 341 | 339 | ||
842 | 342 | // The image retains the color space, so we can release it. | 340 | // The image retains the color space, so we can release it. |
843 | 343 | CGColorSpaceRelease(colorSpace); | 341 | CGColorSpaceRelease(colorSpace); |
844 | 344 | colorSpace = NULL; | 342 | colorSpace = NULL; |
846 | 345 | 343 | ||
847 | 346 | // Done with the data provider. | 344 | // Done with the data provider. |
848 | 347 | CGDataProviderRelease(dataProvider); | 345 | CGDataProviderRelease(dataProvider); |
849 | 348 | dataProvider = NULL; | 346 | dataProvider = NULL; |
851 | 349 | 347 | ||
852 | 350 | // Done with the data provider. | 348 | // Done with the data provider. |
853 | 351 | CFRelease(dataRef); | 349 | CFRelease(dataRef); |
855 | 352 | 350 | ||
856 | 353 | return image; | 351 | return image; |
857 | 354 | } | 352 | } |
858 | 355 | 353 | ||
859 | @@ -389,10 +387,10 @@ | |||
860 | 389 | void SurfaceImpl::LineTo(int x_, int y_) | 387 | void SurfaceImpl::LineTo(int x_, int y_) |
861 | 390 | { | 388 | { |
862 | 391 | CGContextBeginPath( gc ); | 389 | CGContextBeginPath( gc ); |
864 | 392 | 390 | ||
865 | 393 | // Because Quartz is based on floating point, lines are drawn with half their colour | 391 | // Because Quartz is based on floating point, lines are drawn with half their colour |
866 | 394 | // on each side of the line. Integer coordinates specify the INTERSECTION of the pixel | 392 | // on each side of the line. Integer coordinates specify the INTERSECTION of the pixel |
868 | 395 | // divison lines. If you specify exact pixel values, you get a line that | 393 | // division lines. If you specify exact pixel values, you get a line that |
869 | 396 | // is twice as thick but half as intense. To get pixel aligned rendering, | 394 | // is twice as thick but half as intense. To get pixel aligned rendering, |
870 | 397 | // we render the "middle" of the pixels by adding 0.5 to the coordinates. | 395 | // we render the "middle" of the pixels by adding 0.5 to the coordinates. |
871 | 398 | CGContextMoveToPoint( gc, x + 0.5, y + 0.5 ); | 396 | CGContextMoveToPoint( gc, x + 0.5, y + 0.5 ); |
872 | @@ -408,31 +406,27 @@ | |||
873 | 408 | ColourDesired back) | 406 | ColourDesired back) |
874 | 409 | { | 407 | { |
875 | 410 | // Allocate memory for the array of points. | 408 | // Allocate memory for the array of points. |
878 | 411 | CGPoint *points = new CGPoint[npts]; | 409 | std::vector<CGPoint> points(npts); |
879 | 412 | 410 | ||
880 | 413 | for (int i = 0;i < npts;i++) | 411 | for (int i = 0;i < npts;i++) |
881 | 414 | { | 412 | { |
882 | 415 | // Quartz floating point issues: plot the MIDDLE of the pixels | 413 | // Quartz floating point issues: plot the MIDDLE of the pixels |
883 | 416 | points[i].x = pts[i].x + 0.5; | 414 | points[i].x = pts[i].x + 0.5; |
884 | 417 | points[i].y = pts[i].y + 0.5; | 415 | points[i].y = pts[i].y + 0.5; |
885 | 418 | } | 416 | } |
887 | 419 | 417 | ||
888 | 420 | CGContextBeginPath(gc); | 418 | CGContextBeginPath(gc); |
890 | 421 | 419 | ||
891 | 422 | // Set colours | 420 | // Set colours |
892 | 423 | FillColour(back); | 421 | FillColour(back); |
893 | 424 | PenColour(fore); | 422 | PenColour(fore); |
895 | 425 | 423 | ||
896 | 426 | // Draw the polygon | 424 | // Draw the polygon |
899 | 427 | CGContextAddLines(gc, points, npts); | 425 | CGContextAddLines(gc, points.data(), npts); |
900 | 428 | 426 | ||
901 | 429 | // Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only) | 427 | // Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only) |
902 | 430 | CGContextClosePath( gc ); | 428 | CGContextClosePath( gc ); |
903 | 431 | CGContextDrawPath( gc, kCGPathFillStroke ); | 429 | CGContextDrawPath( gc, kCGPathFillStroke ); |
904 | 432 | |||
905 | 433 | // Deallocate memory. | ||
906 | 434 | delete points; | ||
907 | 435 | points = NULL; | ||
908 | 436 | } | 430 | } |
909 | 437 | 431 | ||
910 | 438 | //-------------------------------------------------------------------------------------------------- | 432 | //-------------------------------------------------------------------------------------------------- |
911 | @@ -444,7 +438,7 @@ | |||
912 | 444 | CGContextBeginPath( gc ); | 438 | CGContextBeginPath( gc ); |
913 | 445 | FillColour(back); | 439 | FillColour(back); |
914 | 446 | PenColour(fore); | 440 | PenColour(fore); |
916 | 447 | 441 | ||
917 | 448 | // Quartz integer -> float point conversion fun (see comment in SurfaceImpl::LineTo) | 442 | // Quartz integer -> float point conversion fun (see comment in SurfaceImpl::LineTo) |
918 | 449 | // We subtract 1 from the Width() and Height() so that all our drawing is within the area defined | 443 | // We subtract 1 from the Width() and Height() so that all our drawing is within the area defined |
919 | 450 | // by the PRectangle. Otherwise, we draw one pixel too far to the right and bottom. | 444 | // by the PRectangle. Otherwise, we draw one pixel too far to the right and bottom. |
920 | @@ -487,7 +481,7 @@ | |||
921 | 487 | void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) | 481 | void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) |
922 | 488 | { | 482 | { |
923 | 489 | SurfaceImpl& patternSurface = static_cast<SurfaceImpl &>(surfacePattern); | 483 | SurfaceImpl& patternSurface = static_cast<SurfaceImpl &>(surfacePattern); |
925 | 490 | 484 | ||
926 | 491 | // For now, assume that copy can only be called on PixMap surfaces. Shows up black. | 485 | // For now, assume that copy can only be called on PixMap surfaces. Shows up black. |
927 | 492 | CGImageRef image = patternSurface.GetImage(); | 486 | CGImageRef image = patternSurface.GetImage(); |
928 | 493 | if (image == NULL) | 487 | if (image == NULL) |
929 | @@ -495,11 +489,19 @@ | |||
930 | 495 | FillRectangle(rc, ColourDesired(0)); | 489 | FillRectangle(rc, ColourDesired(0)); |
931 | 496 | return; | 490 | return; |
932 | 497 | } | 491 | } |
938 | 498 | 492 | <<<<<<< TREE | |
939 | 499 | const CGPatternCallbacks drawImageCallbacks = { 0, | 493 | |
940 | 500 | reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback), | 494 | const CGPatternCallbacks drawImageCallbacks = { 0, |
941 | 501 | reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) }; | 495 | reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback), |
942 | 502 | 496 | reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) }; | |
943 | 497 | |||
944 | 498 | ======= | ||
945 | 499 | |||
946 | 500 | const CGPatternCallbacks drawImageCallbacks = { 0, | ||
947 | 501 | reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback), | ||
948 | 502 | reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) }; | ||
949 | 503 | |||
950 | 504 | >>>>>>> MERGE-SOURCE | ||
951 | 503 | CGPatternRef pattern = CGPatternCreate(image, | 505 | CGPatternRef pattern = CGPatternCreate(image, |
952 | 504 | CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight), | 506 | CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight), |
953 | 505 | CGAffineTransformIdentity, | 507 | CGAffineTransformIdentity, |
954 | @@ -514,10 +516,10 @@ | |||
955 | 514 | // Create a pattern color space | 516 | // Create a pattern color space |
956 | 515 | CGColorSpaceRef colorSpace = CGColorSpaceCreatePattern( NULL ); | 517 | CGColorSpaceRef colorSpace = CGColorSpaceCreatePattern( NULL ); |
957 | 516 | if( colorSpace != NULL ) { | 518 | if( colorSpace != NULL ) { |
959 | 517 | 519 | ||
960 | 518 | CGContextSaveGState( gc ); | 520 | CGContextSaveGState( gc ); |
961 | 519 | CGContextSetFillColorSpace( gc, colorSpace ); | 521 | CGContextSetFillColorSpace( gc, colorSpace ); |
963 | 520 | 522 | ||
964 | 521 | // Unlike the documentation, you MUST pass in a "components" parameter: | 523 | // Unlike the documentation, you MUST pass in a "components" parameter: |
965 | 522 | // For coloured patterns it is the alpha value. | 524 | // For coloured patterns it is the alpha value. |
966 | 523 | const CGFloat alpha = 1.0; | 525 | const CGFloat alpha = 1.0; |
967 | @@ -540,12 +542,12 @@ | |||
968 | 540 | // which is a rectangle with rounded corners each having a radius of 4 pixels. | 542 | // which is a rectangle with rounded corners each having a radius of 4 pixels. |
969 | 541 | // It would be almost as good just cutting off the corners with lines at | 543 | // It would be almost as good just cutting off the corners with lines at |
970 | 542 | // 45 degrees as is done on GTK+. | 544 | // 45 degrees as is done on GTK+. |
972 | 543 | 545 | ||
973 | 544 | // Create a rectangle with semicircles at the corners | 546 | // Create a rectangle with semicircles at the corners |
974 | 545 | const int MAX_RADIUS = 4; | 547 | const int MAX_RADIUS = 4; |
975 | 546 | int radius = Platform::Minimum( MAX_RADIUS, rc.Height()/2 ); | 548 | int radius = Platform::Minimum( MAX_RADIUS, rc.Height()/2 ); |
976 | 547 | radius = Platform::Minimum( radius, rc.Width()/2 ); | 549 | radius = Platform::Minimum( radius, rc.Width()/2 ); |
978 | 548 | 550 | ||
979 | 549 | // Points go clockwise, starting from just below the top left | 551 | // Points go clockwise, starting from just below the top left |
980 | 550 | // Corners are kept together, so we can easily create arcs to connect them | 552 | // Corners are kept together, so we can easily create arcs to connect them |
981 | 551 | CGPoint corners[4][3] = | 553 | CGPoint corners[4][3] = |
982 | @@ -571,7 +573,7 @@ | |||
983 | 571 | { rc.left, rc.bottom - radius - 1 }, | 573 | { rc.left, rc.bottom - radius - 1 }, |
984 | 572 | }, | 574 | }, |
985 | 573 | }; | 575 | }; |
987 | 574 | 576 | ||
988 | 575 | // Align the points in the middle of the pixels | 577 | // Align the points in the middle of the pixels |
989 | 576 | for( int i = 0; i < 4; ++ i ) | 578 | for( int i = 0; i < 4; ++ i ) |
990 | 577 | { | 579 | { |
991 | @@ -581,38 +583,133 @@ | |||
992 | 581 | corners[i][j].y += 0.5; | 583 | corners[i][j].y += 0.5; |
993 | 582 | } | 584 | } |
994 | 583 | } | 585 | } |
996 | 584 | 586 | ||
997 | 585 | PenColour( fore ); | 587 | PenColour( fore ); |
998 | 586 | FillColour( back ); | 588 | FillColour( back ); |
1000 | 587 | 589 | ||
1001 | 588 | // Move to the last point to begin the path | 590 | // Move to the last point to begin the path |
1002 | 589 | CGContextBeginPath( gc ); | 591 | CGContextBeginPath( gc ); |
1003 | 590 | CGContextMoveToPoint( gc, corners[3][2].x, corners[3][2].y ); | 592 | CGContextMoveToPoint( gc, corners[3][2].x, corners[3][2].y ); |
1005 | 591 | 593 | ||
1006 | 592 | for ( int i = 0; i < 4; ++ i ) | 594 | for ( int i = 0; i < 4; ++ i ) |
1007 | 593 | { | 595 | { |
1008 | 594 | CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y ); | 596 | CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y ); |
1009 | 595 | CGContextAddArcToPoint( gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius ); | 597 | CGContextAddArcToPoint( gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius ); |
1010 | 596 | } | 598 | } |
1012 | 597 | 599 | ||
1013 | 598 | // Close the path to enclose it for stroking and for filling, then draw it | 600 | // Close the path to enclose it for stroking and for filling, then draw it |
1014 | 599 | CGContextClosePath( gc ); | 601 | CGContextClosePath( gc ); |
1015 | 600 | CGContextDrawPath( gc, kCGPathFillStroke ); | 602 | CGContextDrawPath( gc, kCGPathFillStroke ); |
1016 | 601 | } | 603 | } |
1017 | 602 | 604 | ||
1018 | 605 | <<<<<<< TREE | ||
1019 | 603 | void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, ColourDesired fill, int alphaFill, | 606 | void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, ColourDesired fill, int alphaFill, |
1020 | 604 | ColourDesired /*outline*/, int /*alphaOutline*/, int /*flags*/) | 607 | ColourDesired /*outline*/, int /*alphaOutline*/, int /*flags*/) |
1021 | 608 | ======= | ||
1022 | 609 | // DrawChamferedRectangle is a helper function for AlphaRectangle that either fills or strokes a | ||
1023 | 610 | // rectangle with its corners chamfered at 45 degrees. | ||
1024 | 611 | static void DrawChamferedRectangle(CGContextRef gc, PRectangle rc, int cornerSize, CGPathDrawingMode mode) { | ||
1025 | 612 | // Points go clockwise, starting from just below the top left | ||
1026 | 613 | CGPoint corners[4][2] = | ||
1027 | 614 | { | ||
1028 | 615 | { | ||
1029 | 616 | { rc.left, rc.top + cornerSize }, | ||
1030 | 617 | { rc.left + cornerSize, rc.top }, | ||
1031 | 618 | }, | ||
1032 | 619 | { | ||
1033 | 620 | { rc.right - cornerSize - 1, rc.top }, | ||
1034 | 621 | { rc.right - 1, rc.top + cornerSize }, | ||
1035 | 622 | }, | ||
1036 | 623 | { | ||
1037 | 624 | { rc.right - 1, rc.bottom - cornerSize - 1 }, | ||
1038 | 625 | { rc.right - cornerSize - 1, rc.bottom - 1 }, | ||
1039 | 626 | }, | ||
1040 | 627 | { | ||
1041 | 628 | { rc.left + cornerSize, rc.bottom - 1 }, | ||
1042 | 629 | { rc.left, rc.bottom - cornerSize - 1 }, | ||
1043 | 630 | }, | ||
1044 | 631 | }; | ||
1045 | 632 | |||
1046 | 633 | // Align the points in the middle of the pixels | ||
1047 | 634 | for( int i = 0; i < 4; ++ i ) | ||
1048 | 635 | { | ||
1049 | 636 | for( int j = 0; j < 2; ++ j ) | ||
1050 | 637 | { | ||
1051 | 638 | corners[i][j].x += 0.5; | ||
1052 | 639 | corners[i][j].y += 0.5; | ||
1053 | 640 | } | ||
1054 | 641 | } | ||
1055 | 642 | |||
1056 | 643 | // Move to the last point to begin the path | ||
1057 | 644 | CGContextBeginPath( gc ); | ||
1058 | 645 | CGContextMoveToPoint( gc, corners[3][1].x, corners[3][1].y ); | ||
1059 | 646 | |||
1060 | 647 | for ( int i = 0; i < 4; ++ i ) | ||
1061 | 648 | { | ||
1062 | 649 | CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y ); | ||
1063 | 650 | CGContextAddLineToPoint( gc, corners[i][1].x, corners[i][1].y ); | ||
1064 | 651 | } | ||
1065 | 652 | |||
1066 | 653 | // Close the path to enclose it for stroking and for filling, then draw it | ||
1067 | 654 | CGContextClosePath( gc ); | ||
1068 | 655 | CGContextDrawPath( gc, mode ); | ||
1069 | 656 | } | ||
1070 | 657 | |||
1071 | 658 | void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, | ||
1072 | 659 | ColourDesired outline, int alphaOutline, int /*flags*/) | ||
1073 | 660 | >>>>>>> MERGE-SOURCE | ||
1074 | 605 | { | 661 | { |
1075 | 606 | if ( gc ) { | 662 | if ( gc ) { |
1076 | 663 | <<<<<<< TREE | ||
1077 | 607 | ColourDesired colour( fill.AsLong() ); | 664 | ColourDesired colour( fill.AsLong() ); |
1078 | 608 | 665 | ||
1079 | 609 | // Snap rectangle boundaries to nearest int | 666 | // Snap rectangle boundaries to nearest int |
1080 | 610 | rc.left = lround(rc.left); | 667 | rc.left = lround(rc.left); |
1081 | 611 | rc.right = lround(rc.right); | 668 | rc.right = lround(rc.right); |
1082 | 669 | ======= | ||
1083 | 670 | // Snap rectangle boundaries to nearest int | ||
1084 | 671 | rc.left = lround(rc.left); | ||
1085 | 672 | rc.right = lround(rc.right); | ||
1086 | 673 | >>>>>>> MERGE-SOURCE | ||
1087 | 612 | // Set the Fill color to match | 674 | // Set the Fill color to match |
1091 | 613 | CGContextSetRGBFillColor( gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, colour.GetBlue() / 255.0, alphaFill / 255.0 ); | 675 | CGContextSetRGBFillColor( gc, fill.GetRed() / 255.0, fill.GetGreen() / 255.0, fill.GetBlue() / 255.0, alphaFill / 255.0 ); |
1092 | 614 | CGRect rect = PRectangleToCGRect( rc ); | 676 | CGContextSetRGBStrokeColor( gc, outline.GetRed() / 255.0, outline.GetGreen() / 255.0, outline.GetBlue() / 255.0, alphaOutline / 255.0 ); |
1093 | 615 | CGContextFillRect( gc, rect ); | 677 | PRectangle rcFill = rc; |
1094 | 678 | if (cornerSize == 0) { | ||
1095 | 679 | // A simple rectangle, no rounded corners | ||
1096 | 680 | if ((fill == outline) && (alphaFill == alphaOutline)) { | ||
1097 | 681 | // Optimization for simple case | ||
1098 | 682 | CGRect rect = PRectangleToCGRect( rcFill ); | ||
1099 | 683 | CGContextFillRect( gc, rect ); | ||
1100 | 684 | } else { | ||
1101 | 685 | rcFill.left += 1.0; | ||
1102 | 686 | rcFill.top += 1.0; | ||
1103 | 687 | rcFill.right -= 1.0; | ||
1104 | 688 | rcFill.bottom -= 1.0; | ||
1105 | 689 | CGRect rect = PRectangleToCGRect( rcFill ); | ||
1106 | 690 | CGContextFillRect( gc, rect ); | ||
1107 | 691 | CGContextAddRect( gc, CGRectMake( rc.left + 0.5, rc.top + 0.5, rc.Width() - 1, rc.Height() - 1 ) ); | ||
1108 | 692 | CGContextStrokePath( gc ); | ||
1109 | 693 | } | ||
1110 | 694 | } else { | ||
1111 | 695 | // Approximate rounded corners with 45 degree chamfers. | ||
1112 | 696 | // Drawing real circular arcs often leaves some over- or under-drawn pixels. | ||
1113 | 697 | if ((fill == outline) && (alphaFill == alphaOutline)) { | ||
1114 | 698 | // Specializing this case avoids a few stray light/dark pixels in corners. | ||
1115 | 699 | rcFill.left -= 0.5; | ||
1116 | 700 | rcFill.top -= 0.5; | ||
1117 | 701 | rcFill.right += 0.5; | ||
1118 | 702 | rcFill.bottom += 0.5; | ||
1119 | 703 | DrawChamferedRectangle( gc, rcFill, cornerSize, kCGPathFill ); | ||
1120 | 704 | } else { | ||
1121 | 705 | rcFill.left += 0.5; | ||
1122 | 706 | rcFill.top += 0.5; | ||
1123 | 707 | rcFill.right -= 0.5; | ||
1124 | 708 | rcFill.bottom -= 0.5; | ||
1125 | 709 | DrawChamferedRectangle( gc, rcFill, cornerSize-1, kCGPathFill ); | ||
1126 | 710 | DrawChamferedRectangle( gc, rc, cornerSize, kCGPathStroke ); | ||
1127 | 711 | } | ||
1128 | 712 | } | ||
1129 | 616 | } | 713 | } |
1130 | 617 | } | 714 | } |
1131 | 618 | 715 | ||
1132 | @@ -629,25 +726,30 @@ | |||
1133 | 629 | if (colorSpace) { | 726 | if (colorSpace) { |
1134 | 630 | const int bitmapBytesPerRow = ((int) width * 4); | 727 | const int bitmapBytesPerRow = ((int) width * 4); |
1135 | 631 | const int bitmapByteCount = (bitmapBytesPerRow * (int) height); | 728 | const int bitmapByteCount = (bitmapBytesPerRow * (int) height); |
1137 | 632 | 729 | ||
1138 | 633 | // Create a data provider. | 730 | // Create a data provider. |
1139 | 634 | CGDataProviderRef dataProvider = 0; | 731 | CGDataProviderRef dataProvider = 0; |
1140 | 635 | if (invert) { | 732 | if (invert) { |
1141 | 733 | <<<<<<< TREE | ||
1142 | 636 | unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount]; | 734 | unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount]; |
1143 | 637 | 735 | ||
1144 | 736 | ======= | ||
1145 | 737 | unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount]; | ||
1146 | 738 | |||
1147 | 739 | >>>>>>> MERGE-SOURCE | ||
1148 | 638 | for (int y=0; y<height; y++) { | 740 | for (int y=0; y<height; y++) { |
1149 | 639 | int yInverse = height - y - 1; | 741 | int yInverse = height - y - 1; |
1150 | 640 | memcpy(pixelsUpsideDown + y * bitmapBytesPerRow, | 742 | memcpy(pixelsUpsideDown + y * bitmapBytesPerRow, |
1151 | 641 | pixelsImage + yInverse * bitmapBytesPerRow, | 743 | pixelsImage + yInverse * bitmapBytesPerRow, |
1152 | 642 | bitmapBytesPerRow); | 744 | bitmapBytesPerRow); |
1153 | 643 | } | 745 | } |
1155 | 644 | 746 | ||
1156 | 645 | dataProvider = CGDataProviderCreateWithData( | 747 | dataProvider = CGDataProviderCreateWithData( |
1157 | 646 | NULL, pixelsUpsideDown, bitmapByteCount, ProviderReleaseData); | 748 | NULL, pixelsUpsideDown, bitmapByteCount, ProviderReleaseData); |
1158 | 647 | } else { | 749 | } else { |
1159 | 648 | dataProvider = CGDataProviderCreateWithData( | 750 | dataProvider = CGDataProviderCreateWithData( |
1160 | 649 | NULL, pixelsImage, bitmapByteCount, NULL); | 751 | NULL, pixelsImage, bitmapByteCount, NULL); |
1162 | 650 | 752 | ||
1163 | 651 | } | 753 | } |
1164 | 652 | if (dataProvider) { | 754 | if (dataProvider) { |
1165 | 653 | // Create the CGImage. | 755 | // Create the CGImage. |
1166 | @@ -665,7 +767,11 @@ | |||
1167 | 665 | 767 | ||
1168 | 666 | CGDataProviderRelease(dataProvider); | 768 | CGDataProviderRelease(dataProvider); |
1169 | 667 | } | 769 | } |
1170 | 770 | <<<<<<< TREE | ||
1171 | 668 | 771 | ||
1172 | 772 | ======= | ||
1173 | 773 | |||
1174 | 774 | >>>>>>> MERGE-SOURCE | ||
1175 | 669 | // The image retains the color space, so we can release it. | 775 | // The image retains the color space, so we can release it. |
1176 | 670 | CGColorSpaceRelease(colorSpace); | 776 | CGColorSpaceRelease(colorSpace); |
1177 | 671 | } | 777 | } |
1178 | @@ -681,6 +787,7 @@ | |||
1179 | 681 | } | 787 | } |
1180 | 682 | } | 788 | } |
1181 | 683 | 789 | ||
1182 | 790 | <<<<<<< TREE | ||
1183 | 684 | void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) { | 791 | void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) { |
1184 | 685 | // Drawing an ellipse with bezier curves. Code modified from: | 792 | // Drawing an ellipse with bezier curves. Code modified from: |
1185 | 686 | // http://www.codeguru.com/gdi/ellipse.shtml | 793 | // http://www.codeguru.com/gdi/ellipse.shtml |
1186 | @@ -722,30 +829,25 @@ | |||
1187 | 722 | cCtlPt[12].y = | 829 | cCtlPt[12].y = |
1188 | 723 | cCtlPt[6].y = centre.y + 0.5; | 830 | cCtlPt[6].y = centre.y + 0.5; |
1189 | 724 | 831 | ||
1190 | 832 | ======= | ||
1191 | 833 | void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) { | ||
1192 | 834 | CGRect ellipseRect = CGRectMake(rc.left, rc.top, rc.Width(), rc.Height()); | ||
1193 | 835 | >>>>>>> MERGE-SOURCE | ||
1194 | 725 | FillColour(back); | 836 | FillColour(back); |
1195 | 726 | PenColour(fore); | 837 | PenColour(fore); |
1208 | 727 | 838 | CGContextBeginPath(gc); | |
1209 | 728 | CGContextBeginPath( gc ); | 839 | CGContextAddEllipseInRect(gc, ellipseRect); |
1210 | 729 | CGContextMoveToPoint( gc, cCtlPt[0].x, cCtlPt[0].y ); | 840 | CGContextDrawPath(gc, kCGPathFillStroke); |
1199 | 730 | |||
1200 | 731 | for ( int i = 1; i < 13; i += 3 ) | ||
1201 | 732 | { | ||
1202 | 733 | CGContextAddCurveToPoint( gc, cCtlPt[i].x, cCtlPt[i].y, cCtlPt[i+1].x, cCtlPt[i+1].y, cCtlPt[i+2].x, cCtlPt[i+2].y ); | ||
1203 | 734 | } | ||
1204 | 735 | |||
1205 | 736 | // Close the path to enclose it for stroking and for filling, then draw it | ||
1206 | 737 | CGContextClosePath( gc ); | ||
1207 | 738 | CGContextDrawPath( gc, kCGPathFillStroke ); | ||
1211 | 739 | } | 841 | } |
1212 | 740 | 842 | ||
1213 | 741 | void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect) | 843 | void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect) |
1214 | 742 | { | 844 | { |
1215 | 743 | SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource); | 845 | SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource); |
1216 | 744 | CGImageRef image = source.GetImage(); | 846 | CGImageRef image = source.GetImage(); |
1218 | 745 | 847 | ||
1219 | 746 | CGRect src = PRectangleToCGRect(srcRect); | 848 | CGRect src = PRectangleToCGRect(srcRect); |
1220 | 747 | CGRect dst = PRectangleToCGRect(dstRect); | 849 | CGRect dst = PRectangleToCGRect(dstRect); |
1222 | 748 | 850 | ||
1223 | 749 | /* source from QuickDrawToQuartz2D.pdf on developer.apple.com */ | 851 | /* source from QuickDrawToQuartz2D.pdf on developer.apple.com */ |
1224 | 750 | float w = (float) CGImageGetWidth(image); | 852 | float w = (float) CGImageGetWidth(image); |
1225 | 751 | float h = (float) CGImageGetHeight(image); | 853 | float h = (float) CGImageGetHeight(image); |
1226 | @@ -769,10 +871,10 @@ | |||
1227 | 769 | // Maybe we have to make the Surface two contexts: | 871 | // Maybe we have to make the Surface two contexts: |
1228 | 770 | // a bitmap context which we do all the drawing on, and then a "real" context | 872 | // a bitmap context which we do all the drawing on, and then a "real" context |
1229 | 771 | // which we copy the output to when we call "Synchronize". Ugh! Gross and slow! | 873 | // which we copy the output to when we call "Synchronize". Ugh! Gross and slow! |
1231 | 772 | 874 | ||
1232 | 773 | // For now, assume that copy can only be called on PixMap surfaces | 875 | // For now, assume that copy can only be called on PixMap surfaces |
1233 | 774 | SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource); | 876 | SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource); |
1235 | 775 | 877 | ||
1236 | 776 | // Get the CGImageRef | 878 | // Get the CGImageRef |
1237 | 777 | CGImageRef image = source.GetImage(); | 879 | CGImageRef image = source.GetImage(); |
1238 | 778 | // If we could not get an image reference, fill the rectangle black | 880 | // If we could not get an image reference, fill the rectangle black |
1239 | @@ -781,19 +883,19 @@ | |||
1240 | 781 | FillRectangle( rc, ColourDesired( 0 ) ); | 883 | FillRectangle( rc, ColourDesired( 0 ) ); |
1241 | 782 | return; | 884 | return; |
1242 | 783 | } | 885 | } |
1244 | 784 | 886 | ||
1245 | 785 | // Now draw the image on the surface | 887 | // Now draw the image on the surface |
1247 | 786 | 888 | ||
1248 | 787 | // Some fancy clipping work is required here: draw only inside of rc | 889 | // Some fancy clipping work is required here: draw only inside of rc |
1249 | 788 | CGContextSaveGState( gc ); | 890 | CGContextSaveGState( gc ); |
1250 | 789 | CGContextClipToRect( gc, PRectangleToCGRect( rc ) ); | 891 | CGContextClipToRect( gc, PRectangleToCGRect( rc ) ); |
1252 | 790 | 892 | ||
1253 | 791 | //Platform::DebugPrintf(stderr, "Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\n", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ); | 893 | //Platform::DebugPrintf(stderr, "Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\n", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ); |
1254 | 792 | CGContextDrawImage( gc, CGRectMake( rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ), image ); | 894 | CGContextDrawImage( gc, CGRectMake( rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ), image ); |
1256 | 793 | 895 | ||
1257 | 794 | // Undo the clipping fun | 896 | // Undo the clipping fun |
1258 | 795 | CGContextRestoreGState( gc ); | 897 | CGContextRestoreGState( gc ); |
1260 | 796 | 898 | ||
1261 | 797 | // Done with the image | 899 | // Done with the image |
1262 | 798 | CGImageRelease( image ); | 900 | CGImageRelease( image ); |
1263 | 799 | image = NULL; | 901 | image = NULL; |
1264 | @@ -878,8 +980,13 @@ | |||
1265 | 878 | } | 980 | } |
1266 | 879 | } | 981 | } |
1267 | 880 | 982 | ||
1268 | 983 | <<<<<<< TREE | ||
1269 | 881 | void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, | 984 | void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, |
1270 | 882 | ColourDesired fore) | 985 | ColourDesired fore) |
1271 | 986 | ======= | ||
1272 | 987 | void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, | ||
1273 | 988 | ColourDesired fore) | ||
1274 | 989 | >>>>>>> MERGE-SOURCE | ||
1275 | 883 | { | 990 | { |
1276 | 884 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); | 991 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); |
1277 | 885 | ColourDesired colour(fore.AsLong()); | 992 | ColourDesired colour(fore.AsLong()); |
1278 | @@ -887,7 +994,7 @@ | |||
1279 | 887 | 994 | ||
1280 | 888 | QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID()); | 995 | QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID()); |
1281 | 889 | style->setCTStyleColor(color); | 996 | style->setCTStyleColor(color); |
1283 | 890 | 997 | ||
1284 | 891 | CGColorRelease(color); | 998 | CGColorRelease(color); |
1285 | 892 | 999 | ||
1286 | 893 | textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); | 1000 | textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); |
1287 | @@ -912,10 +1019,10 @@ | |||
1288 | 912 | { | 1019 | { |
1289 | 913 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); | 1020 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); |
1290 | 914 | textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); | 1021 | textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); |
1292 | 915 | 1022 | ||
1293 | 916 | CTLineRef mLine = textLayout->getCTLine(); | 1023 | CTLineRef mLine = textLayout->getCTLine(); |
1294 | 917 | assert(mLine != NULL); | 1024 | assert(mLine != NULL); |
1296 | 918 | 1025 | ||
1297 | 919 | if (unicodeMode) { | 1026 | if (unicodeMode) { |
1298 | 920 | // Map the widths given for UTF-16 characters back onto the UTF-8 input string | 1027 | // Map the widths given for UTF-16 characters back onto the UTF-8 input string |
1299 | 921 | CFIndex fit = textLayout->getStringLength(); | 1028 | CFIndex fit = textLayout->getStringLength(); |
1300 | @@ -961,7 +1068,7 @@ | |||
1301 | 961 | { | 1068 | { |
1302 | 962 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); | 1069 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); |
1303 | 963 | textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); | 1070 | textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); |
1305 | 964 | 1071 | ||
1306 | 965 | return textLayout->MeasureStringWidth(); | 1072 | return textLayout->MeasureStringWidth(); |
1307 | 966 | } | 1073 | } |
1308 | 967 | return 1; | 1074 | return 1; |
1309 | @@ -973,7 +1080,7 @@ | |||
1310 | 973 | { | 1080 | { |
1311 | 974 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); | 1081 | CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); |
1312 | 975 | textLayout->setText (reinterpret_cast<const UInt8*>(str), 1, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); | 1082 | textLayout->setText (reinterpret_cast<const UInt8*>(str), 1, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID())); |
1314 | 976 | 1083 | ||
1315 | 977 | return textLayout->MeasureStringWidth(); | 1084 | return textLayout->MeasureStringWidth(); |
1316 | 978 | } | 1085 | } |
1317 | 979 | else | 1086 | else |
1318 | @@ -987,7 +1094,7 @@ | |||
1319 | 987 | XYPOSITION SurfaceImpl::Ascent(Font &font_) { | 1094 | XYPOSITION SurfaceImpl::Ascent(Font &font_) { |
1320 | 988 | if (!font_.GetID()) | 1095 | if (!font_.GetID()) |
1321 | 989 | return 1; | 1096 | return 1; |
1323 | 990 | 1097 | ||
1324 | 991 | float ascent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAscent(); | 1098 | float ascent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAscent(); |
1325 | 992 | return ascent + 0.5; | 1099 | return ascent + 0.5; |
1326 | 993 | 1100 | ||
1327 | @@ -996,7 +1103,7 @@ | |||
1328 | 996 | XYPOSITION SurfaceImpl::Descent(Font &font_) { | 1103 | XYPOSITION SurfaceImpl::Descent(Font &font_) { |
1329 | 997 | if (!font_.GetID()) | 1104 | if (!font_.GetID()) |
1330 | 998 | return 1; | 1105 | return 1; |
1332 | 999 | 1106 | ||
1333 | 1000 | float descent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getDescent(); | 1107 | float descent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getDescent(); |
1334 | 1001 | return descent + 0.5; | 1108 | return descent + 0.5; |
1335 | 1002 | 1109 | ||
1336 | @@ -1009,7 +1116,7 @@ | |||
1337 | 1009 | XYPOSITION SurfaceImpl::ExternalLeading(Font &font_) { | 1116 | XYPOSITION SurfaceImpl::ExternalLeading(Font &font_) { |
1338 | 1010 | if (!font_.GetID()) | 1117 | if (!font_.GetID()) |
1339 | 1011 | return 1; | 1118 | return 1; |
1341 | 1012 | 1119 | ||
1342 | 1013 | float leading = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getLeading(); | 1120 | float leading = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getLeading(); |
1343 | 1014 | return leading + 0.5; | 1121 | return leading + 0.5; |
1344 | 1015 | 1122 | ||
1345 | @@ -1021,14 +1128,19 @@ | |||
1346 | 1021 | return ht; | 1128 | return ht; |
1347 | 1022 | } | 1129 | } |
1348 | 1023 | 1130 | ||
1349 | 1131 | <<<<<<< TREE | ||
1350 | 1024 | XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) { | 1132 | XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) { |
1351 | 1025 | 1133 | ||
1352 | 1134 | ======= | ||
1353 | 1135 | XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) { | ||
1354 | 1136 | |||
1355 | 1137 | >>>>>>> MERGE-SOURCE | ||
1356 | 1026 | if (!font_.GetID()) | 1138 | if (!font_.GetID()) |
1357 | 1027 | return 1; | 1139 | return 1; |
1360 | 1028 | 1140 | ||
1361 | 1029 | const int sizeStringLength = (sizeof( sizeString ) / sizeof( sizeString[0] ) - 1); | 1141 | const int sizeStringLength = ELEMENTS( sizeString ); |
1362 | 1030 | int width = WidthText( font_, sizeString, sizeStringLength ); | 1142 | int width = WidthText( font_, sizeString, sizeStringLength ); |
1364 | 1031 | 1143 | ||
1365 | 1032 | return (int) ((width / (float) sizeStringLength) + 0.5); | 1144 | return (int) ((width / (float) sizeStringLength) + 0.5); |
1366 | 1033 | } | 1145 | } |
1367 | 1034 | 1146 | ||
1368 | @@ -1109,8 +1221,13 @@ | |||
1369 | 1109 | // NSView | 1221 | // NSView |
1370 | 1110 | NSView* view = reinterpret_cast<NSView*>(idWin); | 1222 | NSView* view = reinterpret_cast<NSView*>(idWin); |
1371 | 1111 | win = [view window]; | 1223 | win = [view window]; |
1372 | 1224 | <<<<<<< TREE | ||
1373 | 1112 | rect = [view convertRect: [view bounds] toView: nil]; | 1225 | rect = [view convertRect: [view bounds] toView: nil]; |
1374 | 1113 | rect.origin = [win convertBaseToScreen: rect.origin]; | 1226 | rect.origin = [win convertBaseToScreen: rect.origin]; |
1375 | 1227 | ======= | ||
1376 | 1228 | rect = [view convertRect: [view bounds] toView: nil]; | ||
1377 | 1229 | rect.origin = [win convertBaseToScreen:rect.origin]; | ||
1378 | 1230 | >>>>>>> MERGE-SOURCE | ||
1379 | 1114 | } | 1231 | } |
1380 | 1115 | else | 1232 | else |
1381 | 1116 | { | 1233 | { |
1382 | @@ -1269,9 +1386,9 @@ | |||
1383 | 1269 | if (wid) | 1386 | if (wid) |
1384 | 1270 | { | 1387 | { |
1385 | 1271 | id idWin = reinterpret_cast<id>(wid); | 1388 | id idWin = reinterpret_cast<id>(wid); |
1387 | 1272 | if ([idWin isMemberOfClass: [InnerView class]]) | 1389 | if ([idWin isMemberOfClass: [SCIContentView class]]) |
1388 | 1273 | { | 1390 | { |
1390 | 1274 | InnerView* container = reinterpret_cast<InnerView*>(idWin); | 1391 | SCIContentView* container = reinterpret_cast<SCIContentView*>(idWin); |
1391 | 1275 | [container setCursor: curs]; | 1392 | [container setCursor: curs]; |
1392 | 1276 | } | 1393 | } |
1393 | 1277 | } | 1394 | } |
1394 | @@ -1488,7 +1605,6 @@ | |||
1395 | 1488 | class ListBoxImpl : public ListBox, IListBox | 1605 | class ListBoxImpl : public ListBox, IListBox |
1396 | 1489 | { | 1606 | { |
1397 | 1490 | private: | 1607 | private: |
1398 | 1491 | ControlRef lb; | ||
1399 | 1492 | ImageMap images; | 1608 | ImageMap images; |
1400 | 1493 | int lineHeight; | 1609 | int lineHeight; |
1401 | 1494 | bool unicodeMode; | 1610 | bool unicodeMode; |
1402 | @@ -1503,14 +1619,19 @@ | |||
1403 | 1503 | NSScrollView* scroller; | 1619 | NSScrollView* scroller; |
1404 | 1504 | NSTableColumn* colIcon; | 1620 | NSTableColumn* colIcon; |
1405 | 1505 | NSTableColumn* colText; | 1621 | NSTableColumn* colText; |
1406 | 1622 | <<<<<<< TREE | ||
1407 | 1506 | AutoCompletionDataSource* ds; | 1623 | AutoCompletionDataSource* ds; |
1408 | 1507 | 1624 | ||
1409 | 1625 | ======= | ||
1410 | 1626 | AutoCompletionDataSource* ds; | ||
1411 | 1627 | |||
1412 | 1628 | >>>>>>> MERGE-SOURCE | ||
1413 | 1508 | LinesData ld; | 1629 | LinesData ld; |
1414 | 1509 | CallBackAction doubleClickAction; | 1630 | CallBackAction doubleClickAction; |
1415 | 1510 | void* doubleClickActionData; | 1631 | void* doubleClickActionData; |
1416 | 1511 | 1632 | ||
1417 | 1512 | public: | 1633 | public: |
1419 | 1513 | ListBoxImpl() : lb(NULL), lineHeight(10), unicodeMode(false), | 1634 | ListBoxImpl() : lineHeight(10), unicodeMode(false), |
1420 | 1514 | desiredVisibleRows(5), maxItemWidth(0), aveCharWidth(8), maxIconWidth(0), | 1635 | desiredVisibleRows(5), maxItemWidth(0), aveCharWidth(8), maxIconWidth(0), |
1421 | 1515 | doubleClickAction(NULL), doubleClickActionData(NULL) | 1636 | doubleClickAction(NULL), doubleClickActionData(NULL) |
1422 | 1516 | { | 1637 | { |
1423 | @@ -1698,36 +1819,31 @@ | |||
1424 | 1698 | { | 1819 | { |
1425 | 1699 | Clear(); | 1820 | Clear(); |
1426 | 1700 | size_t count = strlen(list) + 1; | 1821 | size_t count = strlen(list) + 1; |
1429 | 1701 | char* words = new char[count]; | 1822 | std::vector<char> words(list, list+count); |
1430 | 1702 | if (words) | 1823 | char* startword = words.data(); |
1431 | 1824 | char* numword = NULL; | ||
1432 | 1825 | int i = 0; | ||
1433 | 1826 | for (; words[i]; i++) | ||
1434 | 1703 | { | 1827 | { |
1457 | 1704 | memcpy(words, list, count); | 1828 | if (words[i] == separator) |
1458 | 1705 | char* startword = words; | 1829 | { |
1459 | 1706 | char* numword = NULL; | 1830 | words[i] = '\0'; |
1438 | 1707 | int i = 0; | ||
1439 | 1708 | for (; words[i]; i++) | ||
1440 | 1709 | { | ||
1441 | 1710 | if (words[i] == separator) | ||
1442 | 1711 | { | ||
1443 | 1712 | words[i] = '\0'; | ||
1444 | 1713 | if (numword) | ||
1445 | 1714 | *numword = '\0'; | ||
1446 | 1715 | Append(startword, numword?atoi(numword + 1):-1); | ||
1447 | 1716 | startword = words + i + 1; | ||
1448 | 1717 | numword = NULL; | ||
1449 | 1718 | } | ||
1450 | 1719 | else if (words[i] == typesep) | ||
1451 | 1720 | { | ||
1452 | 1721 | numword = words + i; | ||
1453 | 1722 | } | ||
1454 | 1723 | } | ||
1455 | 1724 | if (startword) | ||
1456 | 1725 | { | ||
1460 | 1726 | if (numword) | 1831 | if (numword) |
1461 | 1727 | *numword = '\0'; | 1832 | *numword = '\0'; |
1462 | 1728 | Append(startword, numword?atoi(numword + 1):-1); | 1833 | Append(startword, numword?atoi(numword + 1):-1); |
1465 | 1729 | } | 1834 | startword = words.data() + i + 1; |
1466 | 1730 | delete []words; | 1835 | numword = NULL; |
1467 | 1836 | } | ||
1468 | 1837 | else if (words[i] == typesep) | ||
1469 | 1838 | { | ||
1470 | 1839 | numword = words.data() + i; | ||
1471 | 1840 | } | ||
1472 | 1841 | } | ||
1473 | 1842 | if (startword) | ||
1474 | 1843 | { | ||
1475 | 1844 | if (numword) | ||
1476 | 1845 | *numword = '\0'; | ||
1477 | 1846 | Append(startword, numword?atoi(numword + 1):-1); | ||
1478 | 1731 | } | 1847 | } |
1479 | 1732 | [table reloadData]; | 1848 | [table reloadData]; |
1480 | 1733 | } | 1849 | } |
1481 | @@ -1770,8 +1886,7 @@ | |||
1482 | 1770 | value[0] = '\0'; | 1886 | value[0] = '\0'; |
1483 | 1771 | return; | 1887 | return; |
1484 | 1772 | } | 1888 | } |
1487 | 1773 | strncpy(value, textString, len); | 1889 | strlcpy(value, textString, len); |
1486 | 1774 | value[len - 1] = '\0'; | ||
1488 | 1775 | } | 1890 | } |
1489 | 1776 | 1891 | ||
1490 | 1777 | void ListBoxImpl::RegisterImage(int type, const char* xpm_data) | 1892 | void ListBoxImpl::RegisterImage(int type, const char* xpm_data) |
1491 | @@ -1792,12 +1907,21 @@ | |||
1492 | 1792 | } | 1907 | } |
1493 | 1793 | 1908 | ||
1494 | 1794 | void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) { | 1909 | void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) { |
1495 | 1910 | <<<<<<< TREE | ||
1496 | 1795 | CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false); | 1911 | CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false); |
1497 | 1796 | NSSize sz = {width, height}; | 1912 | NSSize sz = {width, height}; |
1498 | 1797 | NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease]; | 1913 | NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease]; |
1499 | 1798 | NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; | 1914 | NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; |
1500 | 1799 | [img addRepresentation: bitmapRep]; | 1915 | [img addRepresentation: bitmapRep]; |
1501 | 1800 | [bitmapRep release]; | 1916 | [bitmapRep release]; |
1502 | 1917 | ======= | ||
1503 | 1918 | CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false); | ||
1504 | 1919 | NSSize sz = {static_cast<CGFloat>(width), static_cast<CGFloat>(height)}; | ||
1505 | 1920 | NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease]; | ||
1506 | 1921 | NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; | ||
1507 | 1922 | [img addRepresentation: bitmapRep]; | ||
1508 | 1923 | [bitmapRep release]; | ||
1509 | 1924 | >>>>>>> MERGE-SOURCE | ||
1510 | 1801 | CGImageRelease(imageRef); | 1925 | CGImageRelease(imageRef); |
1511 | 1802 | [img retain]; | 1926 | [img retain]; |
1512 | 1803 | ImageMap::iterator it=images.find(type); | 1927 | ImageMap::iterator it=images.find(type); |
1513 | @@ -1884,7 +2008,7 @@ | |||
1514 | 1884 | @implementation ScintillaContextMenu : NSMenu | 2008 | @implementation ScintillaContextMenu : NSMenu |
1515 | 1885 | 2009 | ||
1516 | 1886 | // This NSMenu subclass serves also as target for menu commands and forwards them as | 2010 | // This NSMenu subclass serves also as target for menu commands and forwards them as |
1518 | 1887 | // notfication messages to the front end. | 2011 | // notification messages to the front end. |
1519 | 1888 | 2012 | ||
1520 | 1889 | - (void) handleCommand: (NSMenuItem*) sender | 2013 | - (void) handleCommand: (NSMenuItem*) sender |
1521 | 1890 | { | 2014 | { |
1522 | @@ -1939,8 +2063,13 @@ | |||
1523 | 1939 | 2063 | ||
1524 | 1940 | ElapsedTime::ElapsedTime() { | 2064 | ElapsedTime::ElapsedTime() { |
1525 | 1941 | struct timeval curTime; | 2065 | struct timeval curTime; |
1526 | 2066 | <<<<<<< TREE | ||
1527 | 1942 | gettimeofday( &curTime, NULL ); | 2067 | gettimeofday( &curTime, NULL ); |
1528 | 1943 | 2068 | ||
1529 | 2069 | ======= | ||
1530 | 2070 | gettimeofday( &curTime, NULL ); | ||
1531 | 2071 | |||
1532 | 2072 | >>>>>>> MERGE-SOURCE | ||
1533 | 1944 | bigBit = curTime.tv_sec; | 2073 | bigBit = curTime.tv_sec; |
1534 | 1945 | littleBit = curTime.tv_usec; | 2074 | littleBit = curTime.tv_usec; |
1535 | 1946 | } | 2075 | } |
1536 | @@ -1999,18 +2128,18 @@ | |||
1537 | 1999 | //-------------------------------------------------------------------------------------------------- | 2128 | //-------------------------------------------------------------------------------------------------- |
1538 | 2000 | 2129 | ||
1539 | 2001 | /** | 2130 | /** |
1541 | 2002 | * Returns the time span in which two consequtive mouse clicks must occur to be considered as | 2131 | * Returns the time span in which two consecutive mouse clicks must occur to be considered as |
1542 | 2003 | * double click. | 2132 | * double click. |
1543 | 2004 | * | 2133 | * |
1544 | 2005 | * @return | 2134 | * @return |
1545 | 2006 | */ | 2135 | */ |
1546 | 2007 | unsigned int Platform::DoubleClickTime() | 2136 | unsigned int Platform::DoubleClickTime() |
1547 | 2008 | { | 2137 | { |
1549 | 2009 | float threshold = [[NSUserDefaults standardUserDefaults] floatForKey: | 2138 | float threshold = [[NSUserDefaults standardUserDefaults] floatForKey: |
1550 | 2010 | @"com.apple.mouse.doubleClickThreshold"]; | 2139 | @"com.apple.mouse.doubleClickThreshold"]; |
1551 | 2011 | if (threshold == 0) | 2140 | if (threshold == 0) |
1552 | 2012 | threshold = 0.5; | 2141 | threshold = 0.5; |
1554 | 2013 | return static_cast<unsigned int>(threshold / kEventDurationMillisecond); | 2142 | return static_cast<unsigned int>(threshold * 1000.0); |
1555 | 2014 | } | 2143 | } |
1556 | 2015 | 2144 | ||
1557 | 2016 | //-------------------------------------------------------------------------------------------------- | 2145 | //-------------------------------------------------------------------------------------------------- |
1558 | @@ -2023,9 +2152,9 @@ | |||
1559 | 2023 | //-------------------------------------------------------------------------------------------------- | 2152 | //-------------------------------------------------------------------------------------------------- |
1560 | 2024 | 2153 | ||
1561 | 2025 | /** | 2154 | /** |
1563 | 2026 | * Helper method for the backend to reach through to the scintiall window. | 2155 | * Helper method for the backend to reach through to the scintilla window. |
1564 | 2027 | */ | 2156 | */ |
1566 | 2028 | long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) | 2157 | long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) |
1567 | 2029 | { | 2158 | { |
1568 | 2030 | return scintilla_send_message(w, msg, wParam, lParam); | 2159 | return scintilla_send_message(w, msg, wParam, lParam); |
1569 | 2031 | } | 2160 | } |
1570 | @@ -2033,7 +2162,7 @@ | |||
1571 | 2033 | //-------------------------------------------------------------------------------------------------- | 2162 | //-------------------------------------------------------------------------------------------------- |
1572 | 2034 | 2163 | ||
1573 | 2035 | /** | 2164 | /** |
1575 | 2036 | * Helper method for the backend to reach through to the scintiall window. | 2165 | * Helper method for the backend to reach through to the scintilla window. |
1576 | 2037 | */ | 2166 | */ |
1577 | 2038 | long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) | 2167 | long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) |
1578 | 2039 | { | 2168 | { |
1579 | @@ -2052,7 +2181,7 @@ | |||
1580 | 2052 | // Shift_jis | 2181 | // Shift_jis |
1581 | 2053 | return ((uch >= 0x81) && (uch <= 0x9F)) || | 2182 | return ((uch >= 0x81) && (uch <= 0x9F)) || |
1582 | 2054 | ((uch >= 0xE0) && (uch <= 0xFC)); | 2183 | ((uch >= 0xE0) && (uch <= 0xFC)); |
1584 | 2055 | // Lead bytes F0 to FC may be a Microsoft addition. | 2184 | // Lead bytes F0 to FC may be a Microsoft addition. |
1585 | 2056 | case 936: | 2185 | case 936: |
1586 | 2057 | // GBK | 2186 | // GBK |
1587 | 2058 | return (uch >= 0x81) && (uch <= 0xFE); | 2187 | return (uch >= 0x81) && (uch <= 0xFE); |
1588 | @@ -2116,7 +2245,7 @@ | |||
1589 | 2116 | { | 2245 | { |
1590 | 2117 | const int BUF_SIZE = 2000; | 2246 | const int BUF_SIZE = 2000; |
1591 | 2118 | char buffer[BUF_SIZE]; | 2247 | char buffer[BUF_SIZE]; |
1593 | 2119 | 2248 | ||
1594 | 2120 | va_list pArguments; | 2249 | va_list pArguments; |
1595 | 2121 | va_start(pArguments, format); | 2250 | va_start(pArguments, format); |
1596 | 2122 | vsnprintf(buffer, BUF_SIZE, format, pArguments); | 2251 | vsnprintf(buffer, BUF_SIZE, format, pArguments); |
1597 | @@ -2148,10 +2277,9 @@ | |||
1598 | 2148 | void Platform::Assert(const char *c, const char *file, int line) | 2277 | void Platform::Assert(const char *c, const char *file, int line) |
1599 | 2149 | { | 2278 | { |
1600 | 2150 | char buffer[2000]; | 2279 | char buffer[2000]; |
1603 | 2151 | sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); | 2280 | snprintf(buffer, sizeof(buffer), "Assertion [%s] failed at %s %d\r\n", c, file, line); |
1602 | 2152 | strcat(buffer, "\r\n"); | ||
1604 | 2153 | Platform::DebugDisplay(buffer); | 2281 | Platform::DebugDisplay(buffer); |
1606 | 2154 | #ifdef DEBUG | 2282 | #ifdef DEBUG |
1607 | 2155 | // Jump into debugger in assert on Mac (CL269835) | 2283 | // Jump into debugger in assert on Mac (CL269835) |
1608 | 2156 | ::Debugger(); | 2284 | ::Debugger(); |
1609 | 2157 | #endif | 2285 | #endif |
1610 | @@ -2172,9 +2300,9 @@ | |||
1611 | 2172 | 2300 | ||
1612 | 2173 | /** | 2301 | /** |
1613 | 2174 | * Implements the platform specific part of library loading. | 2302 | * Implements the platform specific part of library loading. |
1615 | 2175 | * | 2303 | * |
1616 | 2176 | * @param modulePath The path to the module to load. | 2304 | * @param modulePath The path to the module to load. |
1618 | 2177 | * @return A library instance or NULL if the module could not be found or another problem occured. | 2305 | * @return A library instance or NULL if the module could not be found or another problem occurred. |
1619 | 2178 | */ | 2306 | */ |
1620 | 2179 | DynamicLibrary* DynamicLibrary::Load(const char* /* modulePath */) | 2307 | DynamicLibrary* DynamicLibrary::Load(const char* /* modulePath */) |
1621 | 2180 | { | 2308 | { |
1622 | 2181 | 2309 | ||
1623 | === modified file 'cocoa/QuartzTextLayout.h' | |||
1624 | --- cocoa/QuartzTextLayout.h 2011-08-19 07:30:58 +0000 | |||
1625 | +++ cocoa/QuartzTextLayout.h 2014-01-24 04:00:28 +0000 | |||
1626 | @@ -20,7 +20,7 @@ | |||
1627 | 20 | { | 20 | { |
1628 | 21 | public: | 21 | public: |
1629 | 22 | /** Create a text layout for drawing on the specified context. */ | 22 | /** Create a text layout for drawing on the specified context. */ |
1631 | 23 | QuartzTextLayout( CGContextRef context ) | 23 | explicit QuartzTextLayout( CGContextRef context ) |
1632 | 24 | { | 24 | { |
1633 | 25 | mString = NULL; | 25 | mString = NULL; |
1634 | 26 | mLine = NULL; | 26 | mLine = NULL; |
1635 | @@ -39,7 +39,7 @@ | |||
1636 | 39 | { | 39 | { |
1637 | 40 | CFRelease(mLine); | 40 | CFRelease(mLine); |
1638 | 41 | mLine = NULL; | 41 | mLine = NULL; |
1640 | 42 | } | 42 | } |
1641 | 43 | } | 43 | } |
1642 | 44 | 44 | ||
1643 | 45 | inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r ) | 45 | inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r ) |
1644 | @@ -47,19 +47,19 @@ | |||
1645 | 47 | CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false ); | 47 | CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false ); |
1646 | 48 | if (!str) | 48 | if (!str) |
1647 | 49 | return; | 49 | return; |
1649 | 50 | 50 | ||
1650 | 51 | stringLength = CFStringGetLength(str); | 51 | stringLength = CFStringGetLength(str); |
1651 | 52 | 52 | ||
1652 | 53 | CFMutableDictionaryRef stringAttribs = r.getCTStyle(); | 53 | CFMutableDictionaryRef stringAttribs = r.getCTStyle(); |
1654 | 54 | 54 | ||
1655 | 55 | if (mString != NULL) | 55 | if (mString != NULL) |
1656 | 56 | CFRelease(mString); | 56 | CFRelease(mString); |
1657 | 57 | mString = ::CFAttributedStringCreate(NULL, str, stringAttribs); | 57 | mString = ::CFAttributedStringCreate(NULL, str, stringAttribs); |
1659 | 58 | 58 | ||
1660 | 59 | if (mLine != NULL) | 59 | if (mLine != NULL) |
1661 | 60 | CFRelease(mLine); | 60 | CFRelease(mLine); |
1662 | 61 | mLine = ::CTLineCreateWithAttributedString(mString); | 61 | mLine = ::CTLineCreateWithAttributedString(mString); |
1664 | 62 | 62 | ||
1665 | 63 | CFRelease( str ); | 63 | CFRelease( str ); |
1666 | 64 | } | 64 | } |
1667 | 65 | 65 | ||
1668 | @@ -70,28 +70,28 @@ | |||
1669 | 70 | { | 70 | { |
1670 | 71 | if (mLine == NULL) | 71 | if (mLine == NULL) |
1671 | 72 | return; | 72 | return; |
1673 | 73 | 73 | ||
1674 | 74 | ::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0)); | 74 | ::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0)); |
1676 | 75 | 75 | ||
1677 | 76 | // Set the text drawing position. | 76 | // Set the text drawing position. |
1678 | 77 | ::CGContextSetTextPosition(gc, x, y); | 77 | ::CGContextSetTextPosition(gc, x, y); |
1680 | 78 | 78 | ||
1681 | 79 | // And finally, draw! | 79 | // And finally, draw! |
1682 | 80 | ::CTLineDraw(mLine, gc); | 80 | ::CTLineDraw(mLine, gc); |
1683 | 81 | } | 81 | } |
1685 | 82 | 82 | ||
1686 | 83 | float MeasureStringWidth() | 83 | float MeasureStringWidth() |
1688 | 84 | { | 84 | { |
1689 | 85 | if (mLine == NULL) | 85 | if (mLine == NULL) |
1690 | 86 | return 0.0f; | 86 | return 0.0f; |
1692 | 87 | 87 | ||
1693 | 88 | return ::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL); | 88 | return ::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL); |
1694 | 89 | } | 89 | } |
1696 | 90 | 90 | ||
1697 | 91 | CTLineRef getCTLine() { | 91 | CTLineRef getCTLine() { |
1698 | 92 | return mLine; | 92 | return mLine; |
1699 | 93 | } | 93 | } |
1701 | 94 | 94 | ||
1702 | 95 | CFIndex getStringLength() { | 95 | CFIndex getStringLength() { |
1703 | 96 | return stringLength; | 96 | return stringLength; |
1704 | 97 | } | 97 | } |
1705 | 98 | 98 | ||
1706 | === modified file 'cocoa/ScintillaCocoa.h' | |||
1707 | --- cocoa/ScintillaCocoa.h 2012-10-26 08:56:06 +0000 | |||
1708 | +++ cocoa/ScintillaCocoa.h 2014-01-24 04:00:28 +0000 | |||
1709 | @@ -29,7 +29,6 @@ | |||
1710 | 29 | #include "PropSetSimple.h" | 29 | #include "PropSetSimple.h" |
1711 | 30 | #endif | 30 | #endif |
1712 | 31 | 31 | ||
1713 | 32 | #include "SVector.h" | ||
1714 | 33 | #include "SplitVector.h" | 32 | #include "SplitVector.h" |
1715 | 34 | #include "Partitioning.h" | 33 | #include "Partitioning.h" |
1716 | 35 | #include "RunStyles.h" | 34 | #include "RunStyles.h" |
1717 | @@ -45,16 +44,19 @@ | |||
1718 | 45 | #include "ViewStyle.h" | 44 | #include "ViewStyle.h" |
1719 | 46 | #include "CharClassify.h" | 45 | #include "CharClassify.h" |
1720 | 47 | #include "Decoration.h" | 46 | #include "Decoration.h" |
1721 | 47 | #include "CaseFolder.h" | ||
1722 | 48 | #include "Document.h" | 48 | #include "Document.h" |
1723 | 49 | #include "Selection.h" | 49 | #include "Selection.h" |
1724 | 50 | #include "PositionCache.h" | 50 | #include "PositionCache.h" |
1725 | 51 | #include "Editor.h" | 51 | #include "Editor.h" |
1726 | 52 | //#include "ScintillaCallTip.h" | ||
1727 | 53 | 52 | ||
1728 | 54 | #include "ScintillaBase.h" | 53 | #include "ScintillaBase.h" |
1729 | 54 | #include "CaseConvert.h" | ||
1730 | 55 | 55 | ||
1731 | 56 | extern "C" NSString* ScintillaRecPboardType; | 56 | extern "C" NSString* ScintillaRecPboardType; |
1732 | 57 | 57 | ||
1733 | 58 | @class SCIContentView; | ||
1734 | 59 | @class SCIMarginView; | ||
1735 | 58 | @class ScintillaView; | 60 | @class ScintillaView; |
1736 | 59 | 61 | ||
1737 | 60 | @class FindHighlightLayer; | 62 | @class FindHighlightLayer; |
1738 | @@ -76,26 +78,6 @@ | |||
1739 | 76 | namespace Scintilla { | 78 | namespace Scintilla { |
1740 | 77 | 79 | ||
1741 | 78 | /** | 80 | /** |
1742 | 79 | * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent | ||
1743 | 80 | * back to the parent. Therefore, there must be a callback handler that acts | ||
1744 | 81 | * like a Windows WndProc, where Scintilla can send notifications to. Use | ||
1745 | 82 | * ScintillaCocoa::RegisterNotifyHandler() to register such a handler. | ||
1746 | 83 | * Message format is: | ||
1747 | 84 | * <br> | ||
1748 | 85 | * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = 0 (no control ID), lParam = ScintillaCocoa* | ||
1749 | 86 | * <br> | ||
1750 | 87 | * WM_NOTIFY: wParam = 0 (no control ID), lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa* | ||
1751 | 88 | */ | ||
1752 | 89 | typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam); | ||
1753 | 90 | |||
1754 | 91 | /** | ||
1755 | 92 | * Scintilla sends these two messages to the nofity handler. Please refer | ||
1756 | 93 | * to the Windows API doc for details about the message format. | ||
1757 | 94 | */ | ||
1758 | 95 | #define WM_COMMAND 1001 | ||
1759 | 96 | #define WM_NOTIFY 1002 | ||
1760 | 97 | |||
1761 | 98 | /** | ||
1762 | 99 | * Main scintilla class, implemented for OS X (Cocoa). | 81 | * Main scintilla class, implemented for OS X (Cocoa). |
1763 | 100 | */ | 82 | */ |
1764 | 101 | class ScintillaCocoa : public ScintillaBase | 83 | class ScintillaCocoa : public ScintillaBase |
1765 | @@ -103,48 +85,76 @@ | |||
1766 | 103 | private: | 85 | private: |
1767 | 104 | TimerTarget* timerTarget; | 86 | TimerTarget* timerTarget; |
1768 | 105 | NSEvent* lastMouseEvent; | 87 | NSEvent* lastMouseEvent; |
1770 | 106 | 88 | ||
1771 | 89 | id<ScintillaNotificationProtocol> delegate; | ||
1772 | 90 | |||
1773 | 107 | SciNotifyFunc notifyProc; | 91 | SciNotifyFunc notifyProc; |
1774 | 108 | intptr_t notifyObj; | 92 | intptr_t notifyObj; |
1775 | 109 | 93 | ||
1776 | 110 | bool capturedMouse; | 94 | bool capturedMouse; |
1777 | 111 | 95 | ||
1778 | 96 | bool enteredSetScrollingSize; | ||
1779 | 97 | |||
1780 | 112 | // Private so ScintillaCocoa objects can not be copied | 98 | // Private so ScintillaCocoa objects can not be copied |
1781 | 113 | ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {} | 99 | ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {} |
1782 | 114 | ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; } | 100 | ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; } |
1783 | 115 | 101 | ||
1784 | 116 | bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText); | 102 | bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText); |
1785 | 117 | void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText); | 103 | void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText); |
1787 | 118 | 104 | ||
1788 | 119 | int scrollSpeed; | 105 | int scrollSpeed; |
1789 | 120 | int scrollTicks; | 106 | int scrollTicks; |
1790 | 107 | <<<<<<< TREE | ||
1791 | 121 | NSTimer* tickTimer; | 108 | NSTimer* tickTimer; |
1792 | 122 | NSTimer* idleTimer; | 109 | NSTimer* idleTimer; |
1793 | 123 | 110 | ||
1794 | 124 | FindHighlightLayer *layerFindIndicator; | 111 | FindHighlightLayer *layerFindIndicator; |
1795 | 125 | 112 | ||
1796 | 113 | ======= | ||
1797 | 114 | NSTimer* tickTimer; | ||
1798 | 115 | NSTimer* idleTimer; | ||
1799 | 116 | CFRunLoopObserverRef observer; | ||
1800 | 117 | |||
1801 | 118 | FindHighlightLayer *layerFindIndicator; | ||
1802 | 119 | |||
1803 | 120 | >>>>>>> MERGE-SOURCE | ||
1804 | 126 | protected: | 121 | protected: |
1805 | 122 | Point GetVisibleOriginInMain(); | ||
1806 | 127 | PRectangle GetClientRectangle(); | 123 | PRectangle GetClientRectangle(); |
1807 | 128 | Point ConvertPoint(NSPoint point); | 124 | Point ConvertPoint(NSPoint point); |
1809 | 129 | 125 | virtual void RedrawRect(PRectangle rc); | |
1810 | 126 | virtual void Redraw(); | ||
1811 | 127 | |||
1812 | 130 | virtual void Initialise(); | 128 | virtual void Initialise(); |
1813 | 131 | virtual void Finalise(); | 129 | virtual void Finalise(); |
1814 | 132 | virtual CaseFolder *CaseFolderForEncoding(); | 130 | virtual CaseFolder *CaseFolderForEncoding(); |
1815 | 133 | virtual std::string CaseMapString(const std::string &s, int caseMapping); | 131 | virtual std::string CaseMapString(const std::string &s, int caseMapping); |
1817 | 134 | virtual void CancelModes(); | 132 | <<<<<<< TREE |
1818 | 133 | virtual void CancelModes(); | ||
1819 | 134 | ======= | ||
1820 | 135 | virtual void CancelModes(); | ||
1821 | 136 | |||
1822 | 137 | >>>>>>> MERGE-SOURCE | ||
1823 | 135 | public: | 138 | public: |
1827 | 136 | NSView* ContentView(); | 139 | ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin); |
1825 | 137 | |||
1826 | 138 | ScintillaCocoa(NSView* view); | ||
1828 | 139 | virtual ~ScintillaCocoa(); | 140 | virtual ~ScintillaCocoa(); |
1829 | 140 | 141 | ||
1830 | 142 | void SetDelegate(id<ScintillaNotificationProtocol> delegate_); | ||
1831 | 141 | void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback); | 143 | void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback); |
1832 | 142 | sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); | 144 | sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); |
1833 | 143 | 145 | ||
1834 | 144 | ScintillaView* TopContainer(); | 146 | ScintillaView* TopContainer(); |
1835 | 147 | NSScrollView* ScrollContainer(); | ||
1836 | 148 | SCIContentView* ContentView(); | ||
1837 | 145 | 149 | ||
1840 | 146 | bool SyncPaint(void* gc, PRectangle rc); | 150 | <<<<<<< TREE |
1841 | 147 | bool Draw(NSRect rect, CGContextRef gc); | 151 | bool SyncPaint(void* gc, PRectangle rc); |
1842 | 152 | bool Draw(NSRect rect, CGContextRef gc); | ||
1843 | 153 | ======= | ||
1844 | 154 | bool SyncPaint(void* gc, PRectangle rc); | ||
1845 | 155 | bool Draw(NSRect rect, CGContextRef gc); | ||
1846 | 156 | void PaintMargin(NSRect aRect); | ||
1847 | 157 | >>>>>>> MERGE-SOURCE | ||
1848 | 148 | 158 | ||
1849 | 149 | virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); | 159 | virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); |
1850 | 150 | void SetTicking(bool on); | 160 | void SetTicking(bool on); |
1851 | @@ -155,9 +165,10 @@ | |||
1852 | 155 | void SetVerticalScrollPos(); | 165 | void SetVerticalScrollPos(); |
1853 | 156 | void SetHorizontalScrollPos(); | 166 | void SetHorizontalScrollPos(); |
1854 | 157 | bool ModifyScrollBars(int nMax, int nPage); | 167 | bool ModifyScrollBars(int nMax, int nPage); |
1855 | 168 | bool SetScrollingSize(void); | ||
1856 | 158 | void Resize(); | 169 | void Resize(); |
1859 | 159 | void DoScroll(float position, NSScrollerPart part, bool horizontal); | 170 | void UpdateForScroll(); |
1860 | 160 | 171 | ||
1861 | 161 | // Notifications for the owner. | 172 | // Notifications for the owner. |
1862 | 162 | void NotifyChange(); | 173 | void NotifyChange(); |
1863 | 163 | void NotifyFocus(bool focus); | 174 | void NotifyFocus(bool focus); |
1864 | @@ -179,13 +190,20 @@ | |||
1865 | 179 | virtual void ClaimSelection(); | 190 | virtual void ClaimSelection(); |
1866 | 180 | 191 | ||
1867 | 181 | NSPoint GetCaretPosition(); | 192 | NSPoint GetCaretPosition(); |
1869 | 182 | 193 | ||
1870 | 183 | static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam); | 194 | static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam); |
1871 | 184 | 195 | ||
1872 | 185 | void TimerFired(NSTimer* timer); | 196 | void TimerFired(NSTimer* timer); |
1873 | 186 | void IdleTimerFired(); | 197 | void IdleTimerFired(); |
1874 | 198 | static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci); | ||
1875 | 199 | void ObserverAdd(); | ||
1876 | 200 | void ObserverRemove(); | ||
1877 | 201 | virtual void IdleWork(); | ||
1878 | 202 | virtual void QueueIdleWork(WorkNeeded::workItems items, int upTo); | ||
1879 | 187 | int InsertText(NSString* input); | 203 | int InsertText(NSString* input); |
1881 | 188 | 204 | void SelectOnlyMainSelection(); | |
1882 | 205 | virtual void SetDocPointer(Document *document); | ||
1883 | 206 | |||
1884 | 189 | bool KeyboardInput(NSEvent* event); | 207 | bool KeyboardInput(NSEvent* event); |
1885 | 190 | void MouseDown(NSEvent* event); | 208 | void MouseDown(NSEvent* event); |
1886 | 191 | void MouseMove(NSEvent* event); | 209 | void MouseMove(NSEvent* event); |
1887 | @@ -202,14 +220,14 @@ | |||
1888 | 202 | void DraggingExited(id <NSDraggingInfo> info); | 220 | void DraggingExited(id <NSDraggingInfo> info); |
1889 | 203 | bool PerformDragOperation(id <NSDraggingInfo> info); | 221 | bool PerformDragOperation(id <NSDraggingInfo> info); |
1890 | 204 | void DragScroll(); | 222 | void DragScroll(); |
1892 | 205 | 223 | ||
1893 | 206 | // Promote some methods needed for NSResponder actions. | 224 | // Promote some methods needed for NSResponder actions. |
1894 | 207 | virtual void SelectAll(); | 225 | virtual void SelectAll(); |
1895 | 208 | void DeleteBackward(); | 226 | void DeleteBackward(); |
1896 | 209 | virtual void Cut(); | 227 | virtual void Cut(); |
1897 | 210 | virtual void Undo(); | 228 | virtual void Undo(); |
1898 | 211 | virtual void Redo(); | 229 | virtual void Redo(); |
1900 | 212 | 230 | ||
1901 | 213 | virtual NSMenu* CreateContextMenu(NSEvent* event); | 231 | virtual NSMenu* CreateContextMenu(NSEvent* event); |
1902 | 214 | void HandleCommand(NSInteger command); | 232 | void HandleCommand(NSInteger command); |
1903 | 215 | 233 | ||
1904 | 216 | 234 | ||
1905 | === modified file 'cocoa/ScintillaCocoa.mm' | |||
1906 | --- cocoa/ScintillaCocoa.mm 2013-01-21 11:10:24 +0000 | |||
1907 | +++ cocoa/ScintillaCocoa.mm 2014-01-24 04:00:28 +0000 | |||
1908 | @@ -2,7 +2,7 @@ | |||
1909 | 2 | /** | 2 | /** |
1910 | 3 | * Scintilla source code edit control | 3 | * Scintilla source code edit control |
1911 | 4 | * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase | 4 | * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase |
1913 | 5 | * | 5 | * |
1914 | 6 | * Written by Mike Lischke <mlischke@sun.com> | 6 | * Written by Mike Lischke <mlischke@sun.com> |
1915 | 7 | * | 7 | * |
1916 | 8 | * Loosely based on ScintillaMacOSX.cxx. | 8 | * Loosely based on ScintillaMacOSX.cxx. |
1917 | @@ -15,6 +15,7 @@ | |||
1918 | 15 | */ | 15 | */ |
1919 | 16 | 16 | ||
1920 | 17 | #import <Cocoa/Cocoa.h> | 17 | #import <Cocoa/Cocoa.h> |
1921 | 18 | <<<<<<< TREE | ||
1922 | 18 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | 19 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 |
1923 | 19 | #import <QuartzCore/CAGradientLayer.h> | 20 | #import <QuartzCore/CAGradientLayer.h> |
1924 | 20 | #endif | 21 | #endif |
1925 | @@ -25,13 +26,21 @@ | |||
1926 | 25 | 26 | ||
1927 | 26 | #include "ScintillaView.h" | 27 | #include "ScintillaView.h" |
1928 | 27 | #include "PlatCocoa.h" | 28 | #include "PlatCocoa.h" |
1929 | 29 | ======= | ||
1930 | 30 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
1931 | 31 | #import <QuartzCore/CAGradientLayer.h> | ||
1932 | 32 | #endif | ||
1933 | 33 | #import <QuartzCore/CAAnimation.h> | ||
1934 | 34 | #import <QuartzCore/CATransaction.h> | ||
1935 | 35 | |||
1936 | 36 | #import "Platform.h" | ||
1937 | 37 | #import "ScintillaView.h" | ||
1938 | 38 | #import "ScintillaCocoa.h" | ||
1939 | 39 | #import "PlatCocoa.h" | ||
1940 | 40 | >>>>>>> MERGE-SOURCE | ||
1941 | 28 | 41 | ||
1942 | 29 | using namespace Scintilla; | 42 | using namespace Scintilla; |
1943 | 30 | 43 | ||
1944 | 31 | #ifndef WM_UNICHAR | ||
1945 | 32 | #define WM_UNICHAR 0x0109 | ||
1946 | 33 | #endif | ||
1947 | 34 | |||
1948 | 35 | NSString* ScintillaRecPboardType = @"com.scintilla.utf16-plain-text.rectangular"; | 44 | NSString* ScintillaRecPboardType = @"com.scintilla.utf16-plain-text.rectangular"; |
1949 | 36 | 45 | ||
1950 | 37 | //-------------------------------------------------------------------------------------------------- | 46 | //-------------------------------------------------------------------------------------------------- |
1951 | @@ -139,6 +148,7 @@ | |||
1952 | 139 | 148 | ||
1953 | 140 | //-------------------------------------------------------------------------------------------------- | 149 | //-------------------------------------------------------------------------------------------------- |
1954 | 141 | 150 | ||
1955 | 151 | <<<<<<< TREE | ||
1956 | 142 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | 152 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 |
1957 | 143 | 153 | ||
1958 | 144 | // Only implement FindHighlightLayer on OS X 10.6+ | 154 | // Only implement FindHighlightLayer on OS X 10.6+ |
1959 | @@ -307,6 +317,176 @@ | |||
1960 | 307 | 317 | ||
1961 | 308 | //-------------------------------------------------------------------------------------------------- | 318 | //-------------------------------------------------------------------------------------------------- |
1962 | 309 | 319 | ||
1963 | 320 | ======= | ||
1964 | 321 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
1965 | 322 | |||
1966 | 323 | // Only implement FindHighlightLayer on OS X 10.6+ | ||
1967 | 324 | |||
1968 | 325 | /** | ||
1969 | 326 | * Class to display the animated gold roundrect used on OS X for matches. | ||
1970 | 327 | */ | ||
1971 | 328 | @interface FindHighlightLayer : CAGradientLayer | ||
1972 | 329 | { | ||
1973 | 330 | @private | ||
1974 | 331 | NSString *sFind; | ||
1975 | 332 | int positionFind; | ||
1976 | 333 | BOOL retaining; | ||
1977 | 334 | CGFloat widthText; | ||
1978 | 335 | CGFloat heightLine; | ||
1979 | 336 | NSString *sFont; | ||
1980 | 337 | CGFloat fontSize; | ||
1981 | 338 | } | ||
1982 | 339 | |||
1983 | 340 | @property (copy) NSString *sFind; | ||
1984 | 341 | @property (assign) int positionFind; | ||
1985 | 342 | @property (assign) BOOL retaining; | ||
1986 | 343 | @property (assign) CGFloat widthText; | ||
1987 | 344 | @property (assign) CGFloat heightLine; | ||
1988 | 345 | @property (copy) NSString *sFont; | ||
1989 | 346 | @property (assign) CGFloat fontSize; | ||
1990 | 347 | |||
1991 | 348 | - (void) animateMatch: (CGPoint)ptText bounce:(BOOL)bounce; | ||
1992 | 349 | - (void) hideMatch; | ||
1993 | 350 | |||
1994 | 351 | @end | ||
1995 | 352 | |||
1996 | 353 | //-------------------------------------------------------------------------------------------------- | ||
1997 | 354 | |||
1998 | 355 | @implementation FindHighlightLayer | ||
1999 | 356 | |||
2000 | 357 | @synthesize sFind, positionFind, retaining, widthText, heightLine, sFont, fontSize; | ||
2001 | 358 | |||
2002 | 359 | -(id) init { | ||
2003 | 360 | if (self = [super init]) { | ||
2004 | 361 | [self setNeedsDisplayOnBoundsChange: YES]; | ||
2005 | 362 | // A gold to slightly redder gradient to match other applications | ||
2006 | 363 | CGColorRef colGold = CGColorCreateGenericRGB(1.0, 1.0, 0, 1.0); | ||
2007 | 364 | CGColorRef colGoldRed = CGColorCreateGenericRGB(1.0, 0.8, 0, 1.0); | ||
2008 | 365 | self.colors = [NSArray arrayWithObjects:(id)colGoldRed, (id)colGold, nil]; | ||
2009 | 366 | CGColorRelease(colGoldRed); | ||
2010 | 367 | CGColorRelease(colGold); | ||
2011 | 368 | |||
2012 | 369 | CGColorRef colGreyBorder = CGColorCreateGenericGray(0.756f, 0.5f); | ||
2013 | 370 | self.borderColor = colGreyBorder; | ||
2014 | 371 | CGColorRelease(colGreyBorder); | ||
2015 | 372 | |||
2016 | 373 | self.borderWidth = 1.0; | ||
2017 | 374 | self.cornerRadius = 5.0f; | ||
2018 | 375 | self.shadowRadius = 1.0f; | ||
2019 | 376 | self.shadowOpacity = 0.9f; | ||
2020 | 377 | self.shadowOffset = CGSizeMake(0.0f, -2.0f); | ||
2021 | 378 | self.anchorPoint = CGPointMake(0.5, 0.5); | ||
2022 | 379 | } | ||
2023 | 380 | return self; | ||
2024 | 381 | |||
2025 | 382 | } | ||
2026 | 383 | |||
2027 | 384 | const CGFloat paddingHighlightX = 4; | ||
2028 | 385 | const CGFloat paddingHighlightY = 2; | ||
2029 | 386 | |||
2030 | 387 | -(void) drawInContext:(CGContextRef)context { | ||
2031 | 388 | if (!sFind || !sFont) | ||
2032 | 389 | return; | ||
2033 | 390 | |||
2034 | 391 | CFStringRef str = CFStringRef(sFind); | ||
2035 | 392 | |||
2036 | 393 | CFMutableDictionaryRef styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2, | ||
2037 | 394 | &kCFTypeDictionaryKeyCallBacks, | ||
2038 | 395 | &kCFTypeDictionaryValueCallBacks); | ||
2039 | 396 | CGColorRef color = CGColorCreateGenericRGB(0.0, 0.0, 0.0, 1.0); | ||
2040 | 397 | CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, color); | ||
2041 | 398 | CTFontRef fontRef = ::CTFontCreateWithName((CFStringRef)sFont, fontSize, NULL); | ||
2042 | 399 | CFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef); | ||
2043 | 400 | |||
2044 | 401 | CFAttributedStringRef attrString = ::CFAttributedStringCreate(NULL, str, styleDict); | ||
2045 | 402 | CTLineRef textLine = ::CTLineCreateWithAttributedString(attrString); | ||
2046 | 403 | // Indent from corner of bounds | ||
2047 | 404 | CGContextSetTextPosition(context, paddingHighlightX, 3 + paddingHighlightY); | ||
2048 | 405 | CTLineDraw(textLine, context); | ||
2049 | 406 | |||
2050 | 407 | CFRelease(textLine); | ||
2051 | 408 | CFRelease(attrString); | ||
2052 | 409 | CFRelease(fontRef); | ||
2053 | 410 | CGColorRelease(color); | ||
2054 | 411 | CFRelease(styleDict); | ||
2055 | 412 | } | ||
2056 | 413 | |||
2057 | 414 | - (void) animateMatch: (CGPoint)ptText bounce:(BOOL)bounce { | ||
2058 | 415 | if (!self.sFind || ![self.sFind length]) { | ||
2059 | 416 | [self hideMatch]; | ||
2060 | 417 | return; | ||
2061 | 418 | } | ||
2062 | 419 | |||
2063 | 420 | CGFloat width = self.widthText + paddingHighlightX * 2; | ||
2064 | 421 | CGFloat height = self.heightLine + paddingHighlightY * 2; | ||
2065 | 422 | |||
2066 | 423 | CGFloat flipper = self.geometryFlipped ? -1.0 : 1.0; | ||
2067 | 424 | |||
2068 | 425 | // Adjust for padding | ||
2069 | 426 | ptText.x -= paddingHighlightX; | ||
2070 | 427 | ptText.y += flipper * paddingHighlightY; | ||
2071 | 428 | |||
2072 | 429 | // Shift point to centre as expanding about centre | ||
2073 | 430 | ptText.x += width / 2.0; | ||
2074 | 431 | ptText.y -= flipper * height / 2.0; | ||
2075 | 432 | |||
2076 | 433 | [CATransaction begin]; | ||
2077 | 434 | [CATransaction setValue:[NSNumber numberWithFloat:0.0] forKey:kCATransactionAnimationDuration]; | ||
2078 | 435 | self.bounds = CGRectMake(0,0, width, height); | ||
2079 | 436 | self.position = ptText; | ||
2080 | 437 | if (bounce) { | ||
2081 | 438 | // Do not reset visibility when just moving | ||
2082 | 439 | self.hidden = NO; | ||
2083 | 440 | self.opacity = 1.0; | ||
2084 | 441 | } | ||
2085 | 442 | [self setNeedsDisplay]; | ||
2086 | 443 | [CATransaction commit]; | ||
2087 | 444 | |||
2088 | 445 | if (bounce) { | ||
2089 | 446 | CABasicAnimation *animBounce = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; | ||
2090 | 447 | animBounce.duration = 0.15; | ||
2091 | 448 | animBounce.autoreverses = YES; | ||
2092 | 449 | animBounce.removedOnCompletion = NO; | ||
2093 | 450 | animBounce.fromValue = [NSNumber numberWithFloat: 1.0]; | ||
2094 | 451 | animBounce.toValue = [NSNumber numberWithFloat: 1.25]; | ||
2095 | 452 | |||
2096 | 453 | if (self.retaining) { | ||
2097 | 454 | |||
2098 | 455 | [self addAnimation: animBounce forKey:@"animateFound"]; | ||
2099 | 456 | |||
2100 | 457 | } else { | ||
2101 | 458 | |||
2102 | 459 | CABasicAnimation *animFade = [CABasicAnimation animationWithKeyPath:@"opacity"]; | ||
2103 | 460 | animFade.duration = 0.1; | ||
2104 | 461 | animFade.beginTime = 0.4; | ||
2105 | 462 | animFade.removedOnCompletion = NO; | ||
2106 | 463 | animFade.fromValue = [NSNumber numberWithFloat: 1.0]; | ||
2107 | 464 | animFade.toValue = [NSNumber numberWithFloat: 0.0]; | ||
2108 | 465 | |||
2109 | 466 | CAAnimationGroup *group = [CAAnimationGroup animation]; | ||
2110 | 467 | [group setDuration:0.5]; | ||
2111 | 468 | group.removedOnCompletion = NO; | ||
2112 | 469 | group.fillMode = kCAFillModeForwards; | ||
2113 | 470 | [group setAnimations:[NSArray arrayWithObjects:animBounce, animFade, nil]]; | ||
2114 | 471 | |||
2115 | 472 | [self addAnimation:group forKey:@"animateFound"]; | ||
2116 | 473 | } | ||
2117 | 474 | } | ||
2118 | 475 | } | ||
2119 | 476 | |||
2120 | 477 | - (void) hideMatch { | ||
2121 | 478 | self.sFind = @""; | ||
2122 | 479 | self.positionFind = INVALID_POSITION; | ||
2123 | 480 | self.hidden = YES; | ||
2124 | 481 | } | ||
2125 | 482 | |||
2126 | 483 | @end | ||
2127 | 484 | |||
2128 | 485 | #endif | ||
2129 | 486 | |||
2130 | 487 | //-------------------------------------------------------------------------------------------------- | ||
2131 | 488 | |||
2132 | 489 | >>>>>>> MERGE-SOURCE | ||
2133 | 310 | @implementation TimerTarget | 490 | @implementation TimerTarget |
2134 | 311 | 491 | ||
2135 | 312 | - (id) init: (void*) target | 492 | - (id) init: (void*) target |
2136 | @@ -318,9 +498,9 @@ | |||
2137 | 318 | 498 | ||
2138 | 319 | // Get the default notification queue for the thread which created the instance (usually the | 499 | // Get the default notification queue for the thread which created the instance (usually the |
2139 | 320 | // main thread). We need that later for idle event processing. | 500 | // main thread). We need that later for idle event processing. |
2141 | 321 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; | 501 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; |
2142 | 322 | notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center]; | 502 | notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center]; |
2144 | 323 | [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil]; | 503 | [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil]; |
2145 | 324 | } | 504 | } |
2146 | 325 | return self; | 505 | return self; |
2147 | 326 | } | 506 | } |
2148 | @@ -329,8 +509,13 @@ | |||
2149 | 329 | 509 | ||
2150 | 330 | - (void) dealloc | 510 | - (void) dealloc |
2151 | 331 | { | 511 | { |
2152 | 512 | <<<<<<< TREE | ||
2153 | 332 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; | 513 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; |
2154 | 333 | [center removeObserver: self]; | 514 | [center removeObserver: self]; |
2155 | 515 | ======= | ||
2156 | 516 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; | ||
2157 | 517 | [center removeObserver:self]; | ||
2158 | 518 | >>>>>>> MERGE-SOURCE | ||
2159 | 334 | [notificationQueue release]; | 519 | [notificationQueue release]; |
2160 | 335 | [super dealloc]; | 520 | [super dealloc]; |
2161 | 336 | } | 521 | } |
2162 | @@ -358,11 +543,11 @@ | |||
2163 | 358 | // Post a new idle notification, which gets executed when the run loop is idle. | 543 | // Post a new idle notification, which gets executed when the run loop is idle. |
2164 | 359 | // Since we are coalescing on name and sender there will always be only one actual notification | 544 | // Since we are coalescing on name and sender there will always be only one actual notification |
2165 | 360 | // even for multiple requests. | 545 | // even for multiple requests. |
2167 | 361 | NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self]; | 546 | NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self]; |
2168 | 362 | [notificationQueue enqueueNotification: notification | 547 | [notificationQueue enqueueNotification: notification |
2169 | 363 | postingStyle: NSPostWhenIdle | 548 | postingStyle: NSPostWhenIdle |
2170 | 364 | coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender) | 549 | coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender) |
2172 | 365 | forModes: nil]; | 550 | forModes: nil]; |
2173 | 366 | } | 551 | } |
2174 | 367 | 552 | ||
2175 | 368 | //-------------------------------------------------------------------------------------------------- | 553 | //-------------------------------------------------------------------------------------------------- |
2176 | @@ -381,11 +566,30 @@ | |||
2177 | 381 | 566 | ||
2178 | 382 | //----------------- ScintillaCocoa ----------------------------------------------------------------- | 567 | //----------------- ScintillaCocoa ----------------------------------------------------------------- |
2179 | 383 | 568 | ||
2181 | 384 | ScintillaCocoa::ScintillaCocoa(NSView* view) | 569 | ScintillaCocoa::ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin) |
2182 | 385 | { | 570 | { |
2186 | 386 | wMain = view; // Don't retain since we're owned by view, which would cause a cycle | 571 | <<<<<<< TREE |
2187 | 387 | timerTarget = [[TimerTarget alloc] init: this]; | 572 | wMain = view; // Don't retain since we're owned by view, which would cause a cycle |
2188 | 388 | layerFindIndicator = NULL; | 573 | timerTarget = [[TimerTarget alloc] init: this]; |
2189 | 574 | layerFindIndicator = NULL; | ||
2190 | 575 | ======= | ||
2191 | 576 | vs.marginInside = false; | ||
2192 | 577 | wMain = view; // Don't retain since we're owned by view, which would cause a cycle | ||
2193 | 578 | wMargin = viewMargin; | ||
2194 | 579 | timerTarget = [[TimerTarget alloc] init: this]; | ||
2195 | 580 | lastMouseEvent = NULL; | ||
2196 | 581 | delegate = NULL; | ||
2197 | 582 | notifyObj = NULL; | ||
2198 | 583 | notifyProc = NULL; | ||
2199 | 584 | capturedMouse = false; | ||
2200 | 585 | enteredSetScrollingSize = false; | ||
2201 | 586 | scrollSpeed = 1; | ||
2202 | 587 | scrollTicks = 2000; | ||
2203 | 588 | tickTimer = NULL; | ||
2204 | 589 | idleTimer = NULL; | ||
2205 | 590 | observer = NULL; | ||
2206 | 591 | layerFindIndicator = NULL; | ||
2207 | 592 | >>>>>>> MERGE-SOURCE | ||
2208 | 389 | Initialise(); | 593 | Initialise(); |
2209 | 390 | } | 594 | } |
2210 | 391 | 595 | ||
2211 | @@ -393,7 +597,7 @@ | |||
2212 | 393 | 597 | ||
2213 | 394 | ScintillaCocoa::~ScintillaCocoa() | 598 | ScintillaCocoa::~ScintillaCocoa() |
2214 | 395 | { | 599 | { |
2216 | 396 | SetTicking(false); | 600 | Finalise(); |
2217 | 397 | [timerTarget release]; | 601 | [timerTarget release]; |
2218 | 398 | } | 602 | } |
2219 | 399 | 603 | ||
2220 | @@ -402,29 +606,20 @@ | |||
2221 | 402 | /** | 606 | /** |
2222 | 403 | * Core initialization of the control. Everything that needs to be set up happens here. | 607 | * Core initialization of the control. Everything that needs to be set up happens here. |
2223 | 404 | */ | 608 | */ |
2225 | 405 | void ScintillaCocoa::Initialise() | 609 | void ScintillaCocoa::Initialise() |
2226 | 406 | { | 610 | { |
2238 | 407 | static bool initedLexers = false; | 611 | Scintilla_LinkLexers(); |
2239 | 408 | if (!initedLexers) | 612 | |
2229 | 409 | { | ||
2230 | 410 | initedLexers = true; | ||
2231 | 411 | Scintilla_LinkLexers(); | ||
2232 | 412 | } | ||
2233 | 413 | notifyObj = NULL; | ||
2234 | 414 | notifyProc = NULL; | ||
2235 | 415 | |||
2236 | 416 | capturedMouse = false; | ||
2237 | 417 | |||
2240 | 418 | // Tell Scintilla not to buffer: Quartz buffers drawing for us. | 613 | // Tell Scintilla not to buffer: Quartz buffers drawing for us. |
2241 | 419 | WndProc(SCI_SETBUFFEREDDRAW, 0, 0); | 614 | WndProc(SCI_SETBUFFEREDDRAW, 0, 0); |
2243 | 420 | 615 | ||
2244 | 421 | // We are working with Unicode exclusively. | 616 | // We are working with Unicode exclusively. |
2245 | 422 | WndProc(SCI_SETCODEPAGE, SC_CP_UTF8, 0); | 617 | WndProc(SCI_SETCODEPAGE, SC_CP_UTF8, 0); |
2246 | 423 | 618 | ||
2247 | 424 | // Add Mac specific key bindings. | 619 | // Add Mac specific key bindings. |
2249 | 425 | for (int i = 0; macMapDefault[i].key; i++) | 620 | for (int i = 0; macMapDefault[i].key; i++) |
2250 | 426 | kmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg); | 621 | kmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg); |
2252 | 427 | 622 | ||
2253 | 428 | } | 623 | } |
2254 | 429 | 624 | ||
2255 | 430 | //-------------------------------------------------------------------------------------------------- | 625 | //-------------------------------------------------------------------------------------------------- |
2256 | @@ -434,12 +629,70 @@ | |||
2257 | 434 | */ | 629 | */ |
2258 | 435 | void ScintillaCocoa::Finalise() | 630 | void ScintillaCocoa::Finalise() |
2259 | 436 | { | 631 | { |
2260 | 632 | ObserverRemove(); | ||
2261 | 437 | SetTicking(false); | 633 | SetTicking(false); |
2262 | 438 | ScintillaBase::Finalise(); | 634 | ScintillaBase::Finalise(); |
2263 | 439 | } | 635 | } |
2264 | 440 | 636 | ||
2265 | 441 | //-------------------------------------------------------------------------------------------------- | 637 | //-------------------------------------------------------------------------------------------------- |
2266 | 442 | 638 | ||
2267 | 639 | void ScintillaCocoa::UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) { | ||
2268 | 640 | ScintillaCocoa* sci = reinterpret_cast<ScintillaCocoa*>(info); | ||
2269 | 641 | sci->IdleWork(); | ||
2270 | 642 | } | ||
2271 | 643 | |||
2272 | 644 | //-------------------------------------------------------------------------------------------------- | ||
2273 | 645 | |||
2274 | 646 | /** | ||
2275 | 647 | * Add an observer to the run loop to perform styling as high-priority idle task. | ||
2276 | 648 | */ | ||
2277 | 649 | |||
2278 | 650 | void ScintillaCocoa::ObserverAdd() { | ||
2279 | 651 | if (!observer) { | ||
2280 | 652 | CFRunLoopObserverContext context; | ||
2281 | 653 | context.version = 0; | ||
2282 | 654 | context.info = this; | ||
2283 | 655 | context.retain = NULL; | ||
2284 | 656 | context.release = NULL; | ||
2285 | 657 | context.copyDescription = NULL; | ||
2286 | 658 | |||
2287 | 659 | CFRunLoopRef mainRunLoop = CFRunLoopGetMain(); | ||
2288 | 660 | observer = CFRunLoopObserverCreate(NULL, kCFRunLoopEntry | kCFRunLoopBeforeWaiting, | ||
2289 | 661 | true, 0, UpdateObserver, &context); | ||
2290 | 662 | CFRunLoopAddObserver(mainRunLoop, observer, kCFRunLoopCommonModes); | ||
2291 | 663 | } | ||
2292 | 664 | } | ||
2293 | 665 | |||
2294 | 666 | //-------------------------------------------------------------------------------------------------- | ||
2295 | 667 | |||
2296 | 668 | /** | ||
2297 | 669 | * Remove the run loop observer. | ||
2298 | 670 | */ | ||
2299 | 671 | void ScintillaCocoa::ObserverRemove() { | ||
2300 | 672 | if (observer) { | ||
2301 | 673 | CFRunLoopRef mainRunLoop = CFRunLoopGetMain(); | ||
2302 | 674 | CFRunLoopRemoveObserver(mainRunLoop, observer, kCFRunLoopCommonModes); | ||
2303 | 675 | CFRelease(observer); | ||
2304 | 676 | } | ||
2305 | 677 | observer = NULL; | ||
2306 | 678 | } | ||
2307 | 679 | |||
2308 | 680 | //-------------------------------------------------------------------------------------------------- | ||
2309 | 681 | |||
2310 | 682 | void ScintillaCocoa::IdleWork() { | ||
2311 | 683 | Editor::IdleWork(); | ||
2312 | 684 | ObserverRemove(); | ||
2313 | 685 | } | ||
2314 | 686 | |||
2315 | 687 | //-------------------------------------------------------------------------------------------------- | ||
2316 | 688 | |||
2317 | 689 | void ScintillaCocoa::QueueIdleWork(WorkNeeded::workItems items, int upTo) { | ||
2318 | 690 | Editor::QueueIdleWork(items, upTo); | ||
2319 | 691 | ObserverAdd(); | ||
2320 | 692 | } | ||
2321 | 693 | |||
2322 | 694 | //-------------------------------------------------------------------------------------------------- | ||
2323 | 695 | |||
2324 | 443 | /** | 696 | /** |
2325 | 444 | * Convert a core foundation string into an array of bytes in a particular encoding | 697 | * Convert a core foundation string into an array of bytes in a particular encoding |
2326 | 445 | */ | 698 | */ |
2327 | @@ -449,7 +702,7 @@ | |||
2328 | 449 | CFIndex usedLen = 0; | 702 | CFIndex usedLen = 0; |
2329 | 450 | CFStringGetBytes(cfsRef, rangeAll, encoding, '?', | 703 | CFStringGetBytes(cfsRef, rangeAll, encoding, '?', |
2330 | 451 | false, NULL, 0, &usedLen); | 704 | false, NULL, 0, &usedLen); |
2332 | 452 | 705 | ||
2333 | 453 | char *buffer = new char[usedLen+1]; | 706 | char *buffer = new char[usedLen+1]; |
2334 | 454 | CFStringGetBytes(cfsRef, rangeAll, encoding, '?', | 707 | CFStringGetBytes(cfsRef, rangeAll, encoding, '?', |
2335 | 455 | false, (UInt8 *)buffer,usedLen, NULL); | 708 | false, (UInt8 *)buffer,usedLen, NULL); |
2336 | @@ -463,6 +716,7 @@ | |||
2337 | 463 | * Case folders. | 716 | * Case folders. |
2338 | 464 | */ | 717 | */ |
2339 | 465 | 718 | ||
2340 | 719 | <<<<<<< TREE | ||
2341 | 466 | class CaseFolderUTF8 : public CaseFolderTable { | 720 | class CaseFolderUTF8 : public CaseFolderTable { |
2342 | 467 | public: | 721 | public: |
2343 | 468 | CaseFolderUTF8() { | 722 | CaseFolderUTF8() { |
2344 | @@ -494,10 +748,12 @@ | |||
2345 | 494 | } | 748 | } |
2346 | 495 | }; | 749 | }; |
2347 | 496 | 750 | ||
2348 | 751 | ======= | ||
2349 | 752 | >>>>>>> MERGE-SOURCE | ||
2350 | 497 | class CaseFolderDBCS : public CaseFolderTable { | 753 | class CaseFolderDBCS : public CaseFolderTable { |
2351 | 498 | CFStringEncoding encoding; | 754 | CFStringEncoding encoding; |
2352 | 499 | public: | 755 | public: |
2354 | 500 | CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) { | 756 | explicit CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) { |
2355 | 501 | StandardASCII(); | 757 | StandardASCII(); |
2356 | 502 | } | 758 | } |
2357 | 503 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { | 759 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { |
2358 | @@ -506,12 +762,12 @@ | |||
2359 | 506 | return 1; | 762 | return 1; |
2360 | 507 | } else { | 763 | } else { |
2361 | 508 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, | 764 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, |
2363 | 509 | reinterpret_cast<const UInt8 *>(mixed), | 765 | reinterpret_cast<const UInt8 *>(mixed), |
2364 | 510 | lenMixed, encoding, false); | 766 | lenMixed, encoding, false); |
2365 | 511 | 767 | ||
2366 | 512 | NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch | 768 | NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch |
2367 | 513 | locale:[NSLocale currentLocale]]; | 769 | locale:[NSLocale currentLocale]]; |
2369 | 514 | 770 | ||
2370 | 515 | char *encoded = EncodedBytes((CFStringRef)sMapped, encoding); | 771 | char *encoded = EncodedBytes((CFStringRef)sMapped, encoding); |
2371 | 516 | 772 | ||
2372 | 517 | size_t lenMapped = strlen(encoded); | 773 | size_t lenMapped = strlen(encoded); |
2373 | @@ -533,7 +789,7 @@ | |||
2374 | 533 | 789 | ||
2375 | 534 | CaseFolder *ScintillaCocoa::CaseFolderForEncoding() { | 790 | CaseFolder *ScintillaCocoa::CaseFolderForEncoding() { |
2376 | 535 | if (pdoc->dbcsCodePage == SC_CP_UTF8) { | 791 | if (pdoc->dbcsCodePage == SC_CP_UTF8) { |
2378 | 536 | return new CaseFolderUTF8(); | 792 | return new CaseFolderUnicode(); |
2379 | 537 | } else { | 793 | } else { |
2380 | 538 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), | 794 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), |
2381 | 539 | vs.styles[STYLE_DEFAULT].characterSet); | 795 | vs.styles[STYLE_DEFAULT].characterSet); |
2382 | @@ -545,18 +801,20 @@ | |||
2383 | 545 | char sCharacter[2] = "A"; | 801 | char sCharacter[2] = "A"; |
2384 | 546 | sCharacter[0] = i; | 802 | sCharacter[0] = i; |
2385 | 547 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, | 803 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, |
2387 | 548 | reinterpret_cast<const UInt8 *>(sCharacter), | 804 | reinterpret_cast<const UInt8 *>(sCharacter), |
2388 | 549 | 1, encoding, false); | 805 | 1, encoding, false); |
2390 | 550 | 806 | if (!cfsVal) | |
2391 | 807 | continue; | ||
2392 | 808 | |||
2393 | 551 | NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch | 809 | NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch |
2394 | 552 | locale:[NSLocale currentLocale]]; | 810 | locale:[NSLocale currentLocale]]; |
2396 | 553 | 811 | ||
2397 | 554 | char *encoded = EncodedBytes((CFStringRef)sMapped, encoding); | 812 | char *encoded = EncodedBytes((CFStringRef)sMapped, encoding); |
2399 | 555 | 813 | ||
2400 | 556 | if (strlen(encoded) == 1) { | 814 | if (strlen(encoded) == 1) { |
2401 | 557 | pcf->SetTranslation(sCharacter[0], encoded[0]); | 815 | pcf->SetTranslation(sCharacter[0], encoded[0]); |
2402 | 558 | } | 816 | } |
2404 | 559 | 817 | ||
2405 | 560 | delete []encoded; | 818 | delete []encoded; |
2406 | 561 | CFRelease(cfsVal); | 819 | CFRelease(cfsVal); |
2407 | 562 | } | 820 | } |
2408 | @@ -576,10 +834,21 @@ | |||
2409 | 576 | */ | 834 | */ |
2410 | 577 | std::string ScintillaCocoa::CaseMapString(const std::string &s, int caseMapping) | 835 | std::string ScintillaCocoa::CaseMapString(const std::string &s, int caseMapping) |
2411 | 578 | { | 836 | { |
2412 | 837 | if ((s.size() == 0) || (caseMapping == cmSame)) | ||
2413 | 838 | return s; | ||
2414 | 839 | |||
2415 | 840 | if (IsUnicodeMode()) { | ||
2416 | 841 | std::string retMapped(s.length() * maxExpansionCaseConversion, 0); | ||
2417 | 842 | size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(), | ||
2418 | 843 | (caseMapping == cmUpper) ? CaseConversionUpper : CaseConversionLower); | ||
2419 | 844 | retMapped.resize(lenMapped); | ||
2420 | 845 | return retMapped; | ||
2421 | 846 | } | ||
2422 | 847 | |||
2423 | 579 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), | 848 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), |
2424 | 580 | vs.styles[STYLE_DEFAULT].characterSet); | 849 | vs.styles[STYLE_DEFAULT].characterSet); |
2425 | 581 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, | 850 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, |
2427 | 582 | reinterpret_cast<const UInt8 *>(s.c_str()), | 851 | reinterpret_cast<const UInt8 *>(s.c_str()), |
2428 | 583 | s.length(), encoding, false); | 852 | s.length(), encoding, false); |
2429 | 584 | 853 | ||
2430 | 585 | NSString *sMapped; | 854 | NSString *sMapped; |
2431 | @@ -621,7 +890,17 @@ | |||
2432 | 621 | ScintillaView* ScintillaCocoa::TopContainer() | 890 | ScintillaView* ScintillaCocoa::TopContainer() |
2433 | 622 | { | 891 | { |
2434 | 623 | NSView* container = static_cast<NSView*>(wMain.GetID()); | 892 | NSView* container = static_cast<NSView*>(wMain.GetID()); |
2436 | 624 | return static_cast<ScintillaView*>([container superview]); | 893 | return static_cast<ScintillaView*>([[[container superview] superview] superview]); |
2437 | 894 | } | ||
2438 | 895 | |||
2439 | 896 | //-------------------------------------------------------------------------------------------------- | ||
2440 | 897 | |||
2441 | 898 | /** | ||
2442 | 899 | * Helper function to get the scrolling view. | ||
2443 | 900 | */ | ||
2444 | 901 | NSScrollView* ScintillaCocoa::ScrollContainer() { | ||
2445 | 902 | NSView* container = static_cast<NSView*>(wMain.GetID()); | ||
2446 | 903 | return static_cast<NSScrollView*>([[container superview] superview]); | ||
2447 | 625 | } | 904 | } |
2448 | 626 | 905 | ||
2449 | 627 | //-------------------------------------------------------------------------------------------------- | 906 | //-------------------------------------------------------------------------------------------------- |
2450 | @@ -629,9 +908,21 @@ | |||
2451 | 629 | /** | 908 | /** |
2452 | 630 | * Helper function to get the inner container which represents the actual "canvas" we work with. | 909 | * Helper function to get the inner container which represents the actual "canvas" we work with. |
2453 | 631 | */ | 910 | */ |
2457 | 632 | NSView* ScintillaCocoa::ContentView() | 911 | SCIContentView* ScintillaCocoa::ContentView() |
2458 | 633 | { | 912 | { |
2459 | 634 | return static_cast<NSView*>(wMain.GetID()); | 913 | return static_cast<SCIContentView*>(wMain.GetID()); |
2460 | 914 | } | ||
2461 | 915 | |||
2462 | 916 | //-------------------------------------------------------------------------------------------------- | ||
2463 | 917 | |||
2464 | 918 | /** | ||
2465 | 919 | * Return the top left visible point relative to the origin point of the whole document. | ||
2466 | 920 | */ | ||
2467 | 921 | Scintilla::Point ScintillaCocoa::GetVisibleOriginInMain() | ||
2468 | 922 | { | ||
2469 | 923 | NSScrollView *scrollView = ScrollContainer(); | ||
2470 | 924 | NSRect contentRect = [[scrollView contentView] bounds]; | ||
2471 | 925 | return Point(contentRect.origin.x, contentRect.origin.y); | ||
2472 | 635 | } | 926 | } |
2473 | 636 | 927 | ||
2474 | 637 | //-------------------------------------------------------------------------------------------------- | 928 | //-------------------------------------------------------------------------------------------------- |
2475 | @@ -639,42 +930,67 @@ | |||
2476 | 639 | /** | 930 | /** |
2477 | 640 | * Instead of returning the size of the inner view we have to return the visible part of it | 931 | * Instead of returning the size of the inner view we have to return the visible part of it |
2478 | 641 | * in order to make scrolling working properly. | 932 | * in order to make scrolling working properly. |
2479 | 933 | * The returned value is in document coordinates. | ||
2480 | 642 | */ | 934 | */ |
2481 | 643 | PRectangle ScintillaCocoa::GetClientRectangle() | 935 | PRectangle ScintillaCocoa::GetClientRectangle() |
2482 | 644 | { | 936 | { |
2486 | 645 | NSView* host = ContentView(); | 937 | NSScrollView *scrollView = ScrollContainer(); |
2487 | 646 | NSSize size = [host frame].size; | 938 | NSSize size = [[scrollView contentView] bounds].size; |
2488 | 647 | return PRectangle(0, 0, size.width, size.height); | 939 | Point origin = GetVisibleOriginInMain(); |
2489 | 940 | return PRectangle(origin.x, origin.y, origin.x+size.width, origin.y + size.height); | ||
2490 | 648 | } | 941 | } |
2491 | 649 | 942 | ||
2492 | 650 | //-------------------------------------------------------------------------------------------------- | 943 | //-------------------------------------------------------------------------------------------------- |
2493 | 651 | 944 | ||
2494 | 652 | /** | 945 | /** |
2495 | 653 | * Converts the given point from base coordinates to local coordinates and at the same time into | 946 | * Converts the given point from base coordinates to local coordinates and at the same time into |
2497 | 654 | * a native Point structure. Base coordinates are used for the top window used in the view hierarchy. | 947 | * a native Point structure. Base coordinates are used for the top window used in the view hierarchy. |
2498 | 948 | * Returned value is in view coordinates. | ||
2499 | 655 | */ | 949 | */ |
2500 | 656 | Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point) | 950 | Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point) |
2501 | 657 | { | 951 | { |
2502 | 658 | NSView* container = ContentView(); | 952 | NSView* container = ContentView(); |
2503 | 659 | NSPoint result = [container convertPoint: point fromView: nil]; | 953 | NSPoint result = [container convertPoint: point fromView: nil]; |
2506 | 660 | 954 | Scintilla::Point ptOrigin = GetVisibleOriginInMain(); | |
2507 | 661 | return Point(result.x, result.y); | 955 | return Point(result.x - ptOrigin.x, result.y - ptOrigin.y); |
2508 | 956 | } | ||
2509 | 957 | |||
2510 | 958 | //-------------------------------------------------------------------------------------------------- | ||
2511 | 959 | |||
2512 | 960 | /** | ||
2513 | 961 | * Do not clip like superclass as Cocoa is not reporting all of prepared area. | ||
2514 | 962 | */ | ||
2515 | 963 | void ScintillaCocoa::RedrawRect(PRectangle rc) | ||
2516 | 964 | { | ||
2517 | 965 | if (!rc.Empty()) | ||
2518 | 966 | wMain.InvalidateRectangle(rc); | ||
2519 | 967 | } | ||
2520 | 968 | |||
2521 | 969 | //-------------------------------------------------------------------------------------------------- | ||
2522 | 970 | |||
2523 | 971 | /** | ||
2524 | 972 | * Ensure all of prepared content is also redrawn. | ||
2525 | 973 | */ | ||
2526 | 974 | void ScintillaCocoa::Redraw() | ||
2527 | 975 | { | ||
2528 | 976 | wMargin.InvalidateAll(); | ||
2529 | 977 | wMain.InvalidateAll(); | ||
2530 | 662 | } | 978 | } |
2531 | 663 | 979 | ||
2532 | 664 | //-------------------------------------------------------------------------------------------------- | 980 | //-------------------------------------------------------------------------------------------------- |
2533 | 665 | 981 | ||
2534 | 666 | /** | 982 | /** |
2535 | 667 | * A function to directly execute code that would usually go the long way via window messages. | 983 | * A function to directly execute code that would usually go the long way via window messages. |
2537 | 668 | * However this is a Windows metapher and not used here, hence we just call our fake | 984 | * However this is a Windows metaphor and not used here, hence we just call our fake |
2538 | 669 | * window proc. The given parameters directly reflect the message parameters used on Windows. | 985 | * window proc. The given parameters directly reflect the message parameters used on Windows. |
2539 | 670 | * | 986 | * |
2540 | 671 | * @param sciThis The target which is to be called. | 987 | * @param sciThis The target which is to be called. |
2541 | 672 | * @param iMessage A code that indicates which message was sent. | 988 | * @param iMessage A code that indicates which message was sent. |
2543 | 673 | * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter | 989 | * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter |
2544 | 674 | * (hence the w prefix). | 990 | * (hence the w prefix). |
2545 | 675 | * @param lParam The other of the two free parameters. A signed long. | 991 | * @param lParam The other of the two free parameters. A signed long. |
2546 | 676 | */ | 992 | */ |
2548 | 677 | sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, | 993 | sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, |
2549 | 678 | sptr_t lParam) | 994 | sptr_t lParam) |
2550 | 679 | { | 995 | { |
2551 | 680 | return sciThis->WndProc(iMessage, wParam, lParam); | 996 | return sciThis->WndProc(iMessage, wParam, lParam); |
2552 | @@ -695,12 +1011,12 @@ | |||
2553 | 695 | 1011 | ||
2554 | 696 | //-------------------------------------------------------------------------------------------------- | 1012 | //-------------------------------------------------------------------------------------------------- |
2555 | 697 | 1013 | ||
2557 | 698 | /** | 1014 | /** |
2558 | 699 | * That's our fake window procedure. On Windows each window has a dedicated procedure to handle | 1015 | * That's our fake window procedure. On Windows each window has a dedicated procedure to handle |
2559 | 700 | * commands (also used to synchronize UI and background threads), which is not the case in Cocoa. | 1016 | * commands (also used to synchronize UI and background threads), which is not the case in Cocoa. |
2561 | 701 | * | 1017 | * |
2562 | 702 | * Messages handled here are almost solely for special commands of the backend. Everything which | 1018 | * Messages handled here are almost solely for special commands of the backend. Everything which |
2564 | 703 | * would be sytem messages on Windows (e.g. for key down, mouse move etc.) are handled by | 1019 | * would be system messages on Windows (e.g. for key down, mouse move etc.) are handled by |
2565 | 704 | * directly calling appropriate handlers. | 1020 | * directly calling appropriate handlers. |
2566 | 705 | */ | 1021 | */ |
2567 | 706 | sptr_t ScintillaCocoa::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) | 1022 | sptr_t ScintillaCocoa::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) |
2568 | @@ -709,19 +1025,20 @@ | |||
2569 | 709 | { | 1025 | { |
2570 | 710 | case SCI_GETDIRECTFUNCTION: | 1026 | case SCI_GETDIRECTFUNCTION: |
2571 | 711 | return reinterpret_cast<sptr_t>(DirectFunction); | 1027 | return reinterpret_cast<sptr_t>(DirectFunction); |
2573 | 712 | 1028 | ||
2574 | 713 | case SCI_GETDIRECTPOINTER: | 1029 | case SCI_GETDIRECTPOINTER: |
2575 | 714 | return reinterpret_cast<sptr_t>(this); | 1030 | return reinterpret_cast<sptr_t>(this); |
2577 | 715 | 1031 | ||
2578 | 716 | case SCI_GRABFOCUS: | 1032 | case SCI_GRABFOCUS: |
2580 | 717 | [[ContentView() window] makeFirstResponder:ContentView()]; | 1033 | [[ContentView() window] makeFirstResponder:ContentView()]; |
2581 | 718 | break; | 1034 | break; |
2582 | 719 | 1035 | ||
2583 | 720 | case SCI_SETBUFFEREDDRAW: | 1036 | case SCI_SETBUFFEREDDRAW: |
2585 | 721 | // Buffered drawing not supported on Cocoa | 1037 | // Buffered drawing not supported on Cocoa |
2586 | 722 | bufferedDraw = false; | 1038 | bufferedDraw = false; |
2587 | 723 | break; | 1039 | break; |
2588 | 724 | 1040 | ||
2589 | 1041 | <<<<<<< TREE | ||
2590 | 725 | case SCI_FINDINDICATORSHOW: | 1042 | case SCI_FINDINDICATORSHOW: |
2591 | 726 | ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES); | 1043 | ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES); |
2592 | 727 | return 0; | 1044 | return 0; |
2593 | @@ -747,9 +1064,23 @@ | |||
2594 | 747 | } | 1064 | } |
2595 | 748 | return 0; | 1065 | return 0; |
2596 | 749 | 1066 | ||
2597 | 1067 | ======= | ||
2598 | 1068 | case SCI_FINDINDICATORSHOW: | ||
2599 | 1069 | ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES); | ||
2600 | 1070 | return 0; | ||
2601 | 1071 | |||
2602 | 1072 | case SCI_FINDINDICATORFLASH: | ||
2603 | 1073 | ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), NO); | ||
2604 | 1074 | return 0; | ||
2605 | 1075 | |||
2606 | 1076 | case SCI_FINDINDICATORHIDE: | ||
2607 | 1077 | HideFindIndicator(); | ||
2608 | 1078 | return 0; | ||
2609 | 1079 | |||
2610 | 1080 | >>>>>>> MERGE-SOURCE | ||
2611 | 750 | default: | 1081 | default: |
2612 | 751 | sptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam); | 1082 | sptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam); |
2614 | 752 | 1083 | ||
2615 | 753 | return r; | 1084 | return r; |
2616 | 754 | } | 1085 | } |
2617 | 755 | return 0l; | 1086 | return 0l; |
2618 | @@ -758,7 +1089,7 @@ | |||
2619 | 758 | //-------------------------------------------------------------------------------------------------- | 1089 | //-------------------------------------------------------------------------------------------------- |
2620 | 759 | 1090 | ||
2621 | 760 | /** | 1091 | /** |
2623 | 761 | * In Windows lingo this is the handler which handles anything that wasn't handled in the normal | 1092 | * In Windows lingo this is the handler which handles anything that wasn't handled in the normal |
2624 | 762 | * window proc which would usually send the message back to generic window proc that Windows uses. | 1093 | * window proc which would usually send the message back to generic window proc that Windows uses. |
2625 | 763 | */ | 1094 | */ |
2626 | 764 | sptr_t ScintillaCocoa::DefWndProc(unsigned int, uptr_t, sptr_t) | 1095 | sptr_t ScintillaCocoa::DefWndProc(unsigned int, uptr_t, sptr_t) |
2627 | @@ -849,7 +1180,7 @@ | |||
2628 | 849 | { | 1180 | { |
2629 | 850 | if (!Editor::CanPaste()) | 1181 | if (!Editor::CanPaste()) |
2630 | 851 | return false; | 1182 | return false; |
2632 | 852 | 1183 | ||
2633 | 853 | return GetPasteboardData([NSPasteboard generalPasteboard], NULL); | 1184 | return GetPasteboardData([NSPasteboard generalPasteboard], NULL); |
2634 | 854 | } | 1185 | } |
2635 | 855 | 1186 | ||
2636 | @@ -871,25 +1202,25 @@ | |||
2637 | 871 | bool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText); | 1202 | bool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText); |
2638 | 872 | if (forceRectangular) | 1203 | if (forceRectangular) |
2639 | 873 | selectedText.rectangular = forceRectangular; | 1204 | selectedText.rectangular = forceRectangular; |
2642 | 874 | 1205 | ||
2643 | 875 | if (!ok || !selectedText.s) | 1206 | if (!ok || selectedText.Empty()) |
2644 | 876 | // No data or no flavor we support. | 1207 | // No data or no flavor we support. |
2645 | 877 | return; | 1208 | return; |
2647 | 878 | 1209 | ||
2648 | 879 | pdoc->BeginUndoAction(); | 1210 | pdoc->BeginUndoAction(); |
2649 | 880 | ClearSelection(false); | 1211 | ClearSelection(false); |
2651 | 881 | int length = selectedText.len - 1; // One less to avoid inserting the terminating 0 character. | 1212 | int length = selectedText.Length(); |
2652 | 1213 | SelectionPosition selStart = sel.RangeMain().Start(); | ||
2653 | 882 | if (selectedText.rectangular) | 1214 | if (selectedText.rectangular) |
2654 | 883 | { | 1215 | { |
2662 | 884 | SelectionPosition selStart = sel.RangeMain().Start(); | 1216 | PasteRectangular(selStart, selectedText.Data(), length); |
2663 | 885 | PasteRectangular(selStart, selectedText.s, length); | 1217 | } |
2664 | 886 | } | 1218 | else |
2665 | 887 | else | 1219 | { |
2666 | 888 | if (pdoc->InsertString(sel.RangeMain().caret.Position(), selectedText.s, length)) | 1220 | InsertPaste(selStart, selectedText.Data(), length); |
2667 | 889 | SetEmptySelection(sel.RangeMain().caret.Position() + length); | 1221 | } |
2661 | 890 | |||
2668 | 891 | pdoc->EndUndoAction(); | 1222 | pdoc->EndUndoAction(); |
2670 | 892 | 1223 | ||
2671 | 893 | Redraw(); | 1224 | Redraw(); |
2672 | 894 | EnsureCaretVisible(); | 1225 | EnsureCaretVisible(); |
2673 | 895 | } | 1226 | } |
2674 | @@ -923,7 +1254,7 @@ | |||
2675 | 923 | if (self) { | 1254 | if (self) { |
2676 | 924 | sci = NULL; | 1255 | sci = NULL; |
2677 | 925 | } | 1256 | } |
2679 | 926 | 1257 | ||
2680 | 927 | return self; | 1258 | return self; |
2681 | 928 | } | 1259 | } |
2682 | 929 | 1260 | ||
2683 | @@ -971,7 +1302,7 @@ | |||
2684 | 971 | void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) { | 1302 | void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) { |
2685 | 972 | if (!ct.wCallTip.Created()) { | 1303 | if (!ct.wCallTip.Created()) { |
2686 | 973 | NSRect ctRect = NSMakeRect(rc.top,rc.bottom, rc.Width(), rc.Height()); | 1304 | NSRect ctRect = NSMakeRect(rc.top,rc.bottom, rc.Width(), rc.Height()); |
2688 | 974 | NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect | 1305 | NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect |
2689 | 975 | styleMask: NSBorderlessWindowMask | 1306 | styleMask: NSBorderlessWindowMask |
2690 | 976 | backing: NSBackingStoreBuffered | 1307 | backing: NSBackingStoreBuffered |
2691 | 977 | defer: NO]; | 1308 | defer: NO]; |
2692 | @@ -994,8 +1325,13 @@ | |||
2693 | 994 | ScintillaContextMenu *menu= reinterpret_cast<ScintillaContextMenu*>(popup.GetID()); | 1325 | ScintillaContextMenu *menu= reinterpret_cast<ScintillaContextMenu*>(popup.GetID()); |
2694 | 995 | [menu setOwner: this]; | 1326 | [menu setOwner: this]; |
2695 | 996 | [menu setAutoenablesItems: NO]; | 1327 | [menu setAutoenablesItems: NO]; |
2696 | 1328 | <<<<<<< TREE | ||
2697 | 997 | 1329 | ||
2698 | 998 | if (cmd == 0) { | 1330 | if (cmd == 0) { |
2699 | 1331 | ======= | ||
2700 | 1332 | |||
2701 | 1333 | if (cmd == 0) { | ||
2702 | 1334 | >>>>>>> MERGE-SOURCE | ||
2703 | 999 | item = [NSMenuItem separatorItem]; | 1335 | item = [NSMenuItem separatorItem]; |
2704 | 1000 | } else { | 1336 | } else { |
2705 | 1001 | item = [[[NSMenuItem alloc] init] autorelease]; | 1337 | item = [[[NSMenuItem alloc] init] autorelease]; |
2706 | @@ -1005,7 +1341,7 @@ | |||
2707 | 1005 | [item setAction: @selector(handleCommand:)]; | 1341 | [item setAction: @selector(handleCommand:)]; |
2708 | 1006 | [item setTag: cmd]; | 1342 | [item setTag: cmd]; |
2709 | 1007 | [item setEnabled: enabled]; | 1343 | [item setEnabled: enabled]; |
2711 | 1008 | 1344 | ||
2712 | 1009 | [menu addItem: item]; | 1345 | [menu addItem: item]; |
2713 | 1010 | } | 1346 | } |
2714 | 1011 | 1347 | ||
2715 | @@ -1051,7 +1387,7 @@ | |||
2716 | 1051 | int line = pdoc->LineFromPosition(posDrag.Position()); | 1387 | int line = pdoc->LineFromPosition(posDrag.Position()); |
2717 | 1052 | int currentVisibleLine = cs.DisplayFromDoc(line); | 1388 | int currentVisibleLine = cs.DisplayFromDoc(line); |
2718 | 1053 | int lastVisibleLine = Platform::Minimum(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2; | 1389 | int lastVisibleLine = Platform::Minimum(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2; |
2720 | 1054 | 1390 | ||
2721 | 1055 | if (currentVisibleLine <= topLine && topLine > 0) | 1391 | if (currentVisibleLine <= topLine && topLine > 0) |
2722 | 1056 | ScrollTo(topLine - scrollSpeed); | 1392 | ScrollTo(topLine - scrollSpeed); |
2723 | 1057 | else | 1393 | else |
2724 | @@ -1063,9 +1399,9 @@ | |||
2725 | 1063 | scrollTicks = 2000; | 1399 | scrollTicks = 2000; |
2726 | 1064 | return; | 1400 | return; |
2727 | 1065 | } | 1401 | } |
2729 | 1066 | 1402 | ||
2730 | 1067 | // TODO: also handle horizontal scrolling. | 1403 | // TODO: also handle horizontal scrolling. |
2732 | 1068 | 1404 | ||
2733 | 1069 | if (scrollSpeed == 1) | 1405 | if (scrollSpeed == 1) |
2734 | 1070 | { | 1406 | { |
2735 | 1071 | scrollTicks -= timer.tickSize; | 1407 | scrollTicks -= timer.tickSize; |
2736 | @@ -1075,7 +1411,7 @@ | |||
2737 | 1075 | scrollTicks = 2000; | 1411 | scrollTicks = 2000; |
2738 | 1076 | } | 1412 | } |
2739 | 1077 | } | 1413 | } |
2741 | 1078 | 1414 | ||
2742 | 1079 | } | 1415 | } |
2743 | 1080 | 1416 | ||
2744 | 1081 | //-------------------------------------------------------------------------------------------------- | 1417 | //-------------------------------------------------------------------------------------------------- |
2745 | @@ -1088,12 +1424,14 @@ | |||
2746 | 1088 | if (sel.Empty()) | 1424 | if (sel.Empty()) |
2747 | 1089 | return; | 1425 | return; |
2748 | 1090 | 1426 | ||
2749 | 1427 | inDragDrop = ddDragging; | ||
2750 | 1428 | |||
2751 | 1091 | // Put the data to be dragged on the drag pasteboard. | 1429 | // Put the data to be dragged on the drag pasteboard. |
2752 | 1092 | SelectionText selectedText; | 1430 | SelectionText selectedText; |
2753 | 1093 | NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard]; | 1431 | NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard]; |
2754 | 1094 | CopySelectionRange(&selectedText); | 1432 | CopySelectionRange(&selectedText); |
2755 | 1095 | SetPasteboardData(pasteboard, selectedText); | 1433 | SetPasteboardData(pasteboard, selectedText); |
2757 | 1096 | 1434 | ||
2758 | 1097 | // calculate the bounds of the selection | 1435 | // calculate the bounds of the selection |
2759 | 1098 | PRectangle client = GetTextRectangle(); | 1436 | PRectangle client = GetTextRectangle(); |
2760 | 1099 | int selStart = sel.RangeMain().Start().Position(); | 1437 | int selStart = sel.RangeMain().Start().Position(); |
2761 | @@ -1102,14 +1440,14 @@ | |||
2762 | 1102 | int endLine = pdoc->LineFromPosition(selEnd); | 1440 | int endLine = pdoc->LineFromPosition(selEnd); |
2763 | 1103 | Point pt; | 1441 | Point pt; |
2764 | 1104 | long startPos, endPos, ep; | 1442 | long startPos, endPos, ep; |
2767 | 1105 | Rect rcSel; | 1443 | PRectangle rcSel; |
2768 | 1106 | 1444 | ||
2769 | 1107 | if (startLine==endLine && WndProc(SCI_GETWRAPMODE, 0, 0) != SC_WRAP_NONE) { | 1445 | if (startLine==endLine && WndProc(SCI_GETWRAPMODE, 0, 0) != SC_WRAP_NONE) { |
2770 | 1108 | // Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87571 | 1446 | // Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87571 |
2771 | 1109 | // Scintilla bug https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040200&group_id=2439 | 1447 | // Scintilla bug https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040200&group_id=2439 |
2772 | 1110 | // If the width on a wrapped-line selection is negative, | 1448 | // If the width on a wrapped-line selection is negative, |
2773 | 1111 | // find a better bounding rectangle. | 1449 | // find a better bounding rectangle. |
2775 | 1112 | 1450 | ||
2776 | 1113 | Point ptStart, ptEnd; | 1451 | Point ptStart, ptEnd; |
2777 | 1114 | startPos = WndProc(SCI_GETLINESELSTARTPOSITION, startLine, 0); | 1452 | startPos = WndProc(SCI_GETLINESELSTARTPOSITION, startLine, 0); |
2778 | 1115 | endPos = WndProc(SCI_GETLINESELENDPOSITION, startLine, 0); | 1453 | endPos = WndProc(SCI_GETLINESELENDPOSITION, startLine, 0); |
2779 | @@ -1163,19 +1501,16 @@ | |||
2780 | 1163 | } | 1501 | } |
2781 | 1164 | // must convert to global coordinates for drag regions, but also save the | 1502 | // must convert to global coordinates for drag regions, but also save the |
2782 | 1165 | // image rectangle for further calculations and copy operations | 1503 | // image rectangle for further calculations and copy operations |
2785 | 1166 | PRectangle localRectangle = PRectangle(rcSel.left, rcSel.top, rcSel.right, rcSel.bottom); | 1504 | |
2784 | 1167 | |||
2786 | 1168 | // Prepare drag image. | 1505 | // Prepare drag image. |
2789 | 1169 | NSRect selectionRectangle = PRectangleToNSRect(localRectangle); | 1506 | NSRect selectionRectangle = PRectangleToNSRect(rcSel); |
2790 | 1170 | 1507 | ||
2791 | 1171 | NSView* content = ContentView(); | 1508 | NSView* content = ContentView(); |
2792 | 1172 | |||
2793 | 1173 | #if 1 | ||
2794 | 1174 | 1509 | ||
2795 | 1175 | // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface. | 1510 | // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface. |
2796 | 1176 | SurfaceImpl *sw = new SurfaceImpl(); | 1511 | SurfaceImpl *sw = new SurfaceImpl(); |
2797 | 1177 | SurfaceImpl *pixmap = NULL; | 1512 | SurfaceImpl *pixmap = NULL; |
2799 | 1178 | 1513 | ||
2800 | 1179 | bool lastHideSelection = hideSelection; | 1514 | bool lastHideSelection = hideSelection; |
2801 | 1180 | hideSelection = true; | 1515 | hideSelection = true; |
2802 | 1181 | if (sw) | 1516 | if (sw) |
2803 | @@ -1183,26 +1518,27 @@ | |||
2804 | 1183 | pixmap = new SurfaceImpl(); | 1518 | pixmap = new SurfaceImpl(); |
2805 | 1184 | if (pixmap) | 1519 | if (pixmap) |
2806 | 1185 | { | 1520 | { |
2808 | 1186 | PRectangle imageRect = NSRectToPRectangle(selectionRectangle); | 1521 | PRectangle imageRect = rcSel; |
2809 | 1187 | paintState = painting; | 1522 | paintState = painting; |
2810 | 1188 | sw->InitPixMap(client.Width(), client.Height(), NULL, NULL); | 1523 | sw->InitPixMap(client.Width(), client.Height(), NULL, NULL); |
2811 | 1189 | paintingAllText = true; | 1524 | paintingAllText = true; |
2813 | 1190 | // Have to create a new context and make current as text drawing goes | 1525 | // Have to create a new context and make current as text drawing goes |
2814 | 1191 | // to the current context, not a passed context. | 1526 | // to the current context, not a passed context. |
2817 | 1192 | CGContextRef gcsw = sw->GetContext(); | 1527 | CGContextRef gcsw = sw->GetContext(); |
2818 | 1193 | NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort: gcsw | 1528 | NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort: gcsw |
2819 | 1194 | flipped: YES]; | 1529 | flipped: YES]; |
2820 | 1195 | [NSGraphicsContext setCurrentContext:nsgc]; | 1530 | [NSGraphicsContext setCurrentContext:nsgc]; |
2821 | 1531 | CGContextTranslateCTM(gcsw, -client.left, -client.top); | ||
2822 | 1196 | Paint(sw, client); | 1532 | Paint(sw, client); |
2823 | 1197 | paintState = notPainting; | 1533 | paintState = notPainting; |
2825 | 1198 | 1534 | ||
2826 | 1199 | pixmap->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL); | 1535 | pixmap->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL); |
2829 | 1200 | 1536 | ||
2830 | 1201 | CGContextRef gc = pixmap->GetContext(); | 1537 | CGContextRef gc = pixmap->GetContext(); |
2831 | 1202 | // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin | 1538 | // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin |
2832 | 1203 | CGContextTranslateCTM(gc, 0, imageRect.Height()); | 1539 | CGContextTranslateCTM(gc, 0, imageRect.Height()); |
2833 | 1204 | CGContextScaleCTM(gc, 1.0, -1.0); | 1540 | CGContextScaleCTM(gc, 1.0, -1.0); |
2835 | 1205 | 1541 | ||
2836 | 1206 | pixmap->CopyImageRectangle(*sw, imageRect, PRectangle(0, 0, imageRect.Width(), imageRect.Height())); | 1542 | pixmap->CopyImageRectangle(*sw, imageRect, PRectangle(0, 0, imageRect.Width(), imageRect.Height())); |
2837 | 1207 | // XXX TODO: overwrite any part of the image that is not part of the | 1543 | // XXX TODO: overwrite any part of the image that is not part of the |
2838 | 1208 | // selection to make it transparent. right now we just use | 1544 | // selection to make it transparent. right now we just use |
2839 | @@ -1212,7 +1548,7 @@ | |||
2840 | 1212 | delete sw; | 1548 | delete sw; |
2841 | 1213 | } | 1549 | } |
2842 | 1214 | hideSelection = lastHideSelection; | 1550 | hideSelection = lastHideSelection; |
2844 | 1215 | 1551 | ||
2845 | 1216 | NSBitmapImageRep* bitmap = NULL; | 1552 | NSBitmapImageRep* bitmap = NULL; |
2846 | 1217 | if (pixmap) | 1553 | if (pixmap) |
2847 | 1218 | { | 1554 | { |
2848 | @@ -1222,29 +1558,20 @@ | |||
2849 | 1222 | pixmap->Release(); | 1558 | pixmap->Release(); |
2850 | 1223 | delete pixmap; | 1559 | delete pixmap; |
2851 | 1224 | } | 1560 | } |
2862 | 1225 | #else | 1561 | |
2853 | 1226 | |||
2854 | 1227 | // Poor man's drag image: take a snapshot of the content view. | ||
2855 | 1228 | [content lockFocus]; | ||
2856 | 1229 | NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: selectionRectangle] autorelease]; | ||
2857 | 1230 | [bitmap setColorSpaceName: NSDeviceRGBColorSpace]; | ||
2858 | 1231 | [content unlockFocus]; | ||
2859 | 1232 | |||
2860 | 1233 | #endif | ||
2861 | 1234 | |||
2863 | 1235 | NSImage* image = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease]; | 1562 | NSImage* image = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease]; |
2864 | 1236 | [image addRepresentation: bitmap]; | 1563 | [image addRepresentation: bitmap]; |
2866 | 1237 | 1564 | ||
2867 | 1238 | NSImage* dragImage = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease]; | 1565 | NSImage* dragImage = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease]; |
2868 | 1239 | [dragImage setBackgroundColor: [NSColor clearColor]]; | 1566 | [dragImage setBackgroundColor: [NSColor clearColor]]; |
2869 | 1240 | [dragImage lockFocus]; | 1567 | [dragImage lockFocus]; |
2871 | 1241 | [image dissolveToPoint: NSMakePoint(0.0, 0.0) fraction: 0.5]; | 1568 | [image drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 0.5]; |
2872 | 1242 | [dragImage unlockFocus]; | 1569 | [dragImage unlockFocus]; |
2874 | 1243 | 1570 | ||
2875 | 1244 | NSPoint startPoint; | 1571 | NSPoint startPoint; |
2879 | 1245 | startPoint.x = selectionRectangle.origin.x; | 1572 | startPoint.x = selectionRectangle.origin.x + client.left; |
2880 | 1246 | startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height; | 1573 | startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height + client.top; |
2881 | 1247 | [content dragImage: dragImage | 1574 | [content dragImage: dragImage |
2882 | 1248 | at: startPoint | 1575 | at: startPoint |
2883 | 1249 | offset: NSZeroSize | 1576 | offset: NSZeroSize |
2884 | 1250 | event: lastMouseEvent // Set in MouseMove. | 1577 | event: lastMouseEvent // Set in MouseMove. |
2885 | @@ -1260,7 +1587,6 @@ | |||
2886 | 1260 | */ | 1587 | */ |
2887 | 1261 | NSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info) | 1588 | NSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info) |
2888 | 1262 | { | 1589 | { |
2889 | 1263 | inDragDrop = ddDragging; | ||
2890 | 1264 | return DraggingUpdated(info); | 1590 | return DraggingUpdated(info); |
2891 | 1265 | } | 1591 | } |
2892 | 1266 | 1592 | ||
2893 | @@ -1273,22 +1599,22 @@ | |||
2894 | 1273 | */ | 1599 | */ |
2895 | 1274 | NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info) | 1600 | NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info) |
2896 | 1275 | { | 1601 | { |
2898 | 1276 | // Convert the drag location from window coordinates to view coordinates and | 1602 | // Convert the drag location from window coordinates to view coordinates and |
2899 | 1277 | // from there to a text position to finally set the drag position. | 1603 | // from there to a text position to finally set the drag position. |
2900 | 1278 | Point location = ConvertPoint([info draggingLocation]); | 1604 | Point location = ConvertPoint([info draggingLocation]); |
2901 | 1279 | SetDragPosition(SPositionFromLocation(location)); | 1605 | SetDragPosition(SPositionFromLocation(location)); |
2903 | 1280 | 1606 | ||
2904 | 1281 | NSDragOperation sourceDragMask = [info draggingSourceOperationMask]; | 1607 | NSDragOperation sourceDragMask = [info draggingSourceOperationMask]; |
2905 | 1282 | if (sourceDragMask == NSDragOperationNone) | 1608 | if (sourceDragMask == NSDragOperationNone) |
2906 | 1283 | return sourceDragMask; | 1609 | return sourceDragMask; |
2908 | 1284 | 1610 | ||
2909 | 1285 | NSPasteboard* pasteboard = [info draggingPasteboard]; | 1611 | NSPasteboard* pasteboard = [info draggingPasteboard]; |
2911 | 1286 | 1612 | ||
2912 | 1287 | // Return what type of operation we will perform. Prefer move over copy. | 1613 | // Return what type of operation we will perform. Prefer move over copy. |
2913 | 1288 | if ([[pasteboard types] containsObject: NSStringPboardType] || | 1614 | if ([[pasteboard types] containsObject: NSStringPboardType] || |
2914 | 1289 | [[pasteboard types] containsObject: ScintillaRecPboardType]) | 1615 | [[pasteboard types] containsObject: ScintillaRecPboardType]) |
2915 | 1290 | return (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy; | 1616 | return (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy; |
2917 | 1291 | 1617 | ||
2918 | 1292 | if ([[pasteboard types] containsObject: NSFilenamesPboardType]) | 1618 | if ([[pasteboard types] containsObject: NSFilenamesPboardType]) |
2919 | 1293 | return (sourceDragMask & NSDragOperationGeneric); | 1619 | return (sourceDragMask & NSDragOperationGeneric); |
2920 | 1294 | return NSDragOperationNone; | 1620 | return NSDragOperationNone; |
2921 | @@ -1314,7 +1640,7 @@ | |||
2922 | 1314 | bool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info) | 1640 | bool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info) |
2923 | 1315 | { | 1641 | { |
2924 | 1316 | NSPasteboard* pasteboard = [info draggingPasteboard]; | 1642 | NSPasteboard* pasteboard = [info draggingPasteboard]; |
2926 | 1317 | 1643 | ||
2927 | 1318 | if ([[pasteboard types] containsObject: NSFilenamesPboardType]) | 1644 | if ([[pasteboard types] containsObject: NSFilenamesPboardType]) |
2928 | 1319 | { | 1645 | { |
2929 | 1320 | NSArray* files = [pasteboard propertyListForType: NSFilenamesPboardType]; | 1646 | NSArray* files = [pasteboard propertyListForType: NSFilenamesPboardType]; |
2930 | @@ -1325,13 +1651,13 @@ | |||
2931 | 1325 | { | 1651 | { |
2932 | 1326 | SelectionText text; | 1652 | SelectionText text; |
2933 | 1327 | GetPasteboardData(pasteboard, &text); | 1653 | GetPasteboardData(pasteboard, &text); |
2936 | 1328 | 1654 | ||
2937 | 1329 | if (text.len > 0) | 1655 | if (text.Length() > 0) |
2938 | 1330 | { | 1656 | { |
2939 | 1331 | NSDragOperation operation = [info draggingSourceOperationMask]; | 1657 | NSDragOperation operation = [info draggingSourceOperationMask]; |
2940 | 1332 | bool moving = (operation & NSDragOperationMove) != 0; | 1658 | bool moving = (operation & NSDragOperationMove) != 0; |
2943 | 1333 | 1659 | ||
2944 | 1334 | DropAt(posDrag, text.s, moving, text.rectangular); | 1660 | DropAt(posDrag, text.Data(), text.Length(), moving, text.rectangular); |
2945 | 1335 | }; | 1661 | }; |
2946 | 1336 | } | 1662 | } |
2947 | 1337 | 1663 | ||
2948 | @@ -1342,26 +1668,26 @@ | |||
2949 | 1342 | 1668 | ||
2950 | 1343 | void ScintillaCocoa::SetPasteboardData(NSPasteboard* board, const SelectionText &selectedText) | 1669 | void ScintillaCocoa::SetPasteboardData(NSPasteboard* board, const SelectionText &selectedText) |
2951 | 1344 | { | 1670 | { |
2953 | 1345 | if (selectedText.len == 0) | 1671 | if (selectedText.Length() == 0) |
2954 | 1346 | return; | 1672 | return; |
2955 | 1347 | 1673 | ||
2956 | 1348 | CFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8, | 1674 | CFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8, |
2957 | 1349 | selectedText.characterSet); | 1675 | selectedText.characterSet); |
2958 | 1350 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, | 1676 | CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault, |
2967 | 1351 | reinterpret_cast<const UInt8 *>(selectedText.s), | 1677 | reinterpret_cast<const UInt8 *>(selectedText.Data()), |
2968 | 1352 | selectedText.len-1, encoding, false); | 1678 | selectedText.Length(), encoding, false); |
2969 | 1353 | 1679 | ||
2970 | 1354 | [board declareTypes:[NSArray arrayWithObjects: | 1680 | NSArray *pbTypes = selectedText.rectangular ? |
2971 | 1355 | NSStringPboardType, | 1681 | [NSArray arrayWithObjects: NSStringPboardType, ScintillaRecPboardType, nil] : |
2972 | 1356 | selectedText.rectangular ? ScintillaRecPboardType : nil, | 1682 | [NSArray arrayWithObjects: NSStringPboardType, nil]; |
2973 | 1357 | nil] owner:nil]; | 1683 | [board declareTypes:pbTypes owner:nil]; |
2974 | 1358 | 1684 | ||
2975 | 1359 | if (selectedText.rectangular) | 1685 | if (selectedText.rectangular) |
2976 | 1360 | { | 1686 | { |
2977 | 1361 | // This is specific to scintilla, allows us to drag rectangular selections around the document. | 1687 | // This is specific to scintilla, allows us to drag rectangular selections around the document. |
2978 | 1362 | [board setString: (NSString *)cfsVal forType: ScintillaRecPboardType]; | 1688 | [board setString: (NSString *)cfsVal forType: ScintillaRecPboardType]; |
2979 | 1363 | } | 1689 | } |
2981 | 1364 | 1690 | ||
2982 | 1365 | [board setString: (NSString *)cfsVal forType: NSStringPboardType]; | 1691 | [board setString: (NSString *)cfsVal forType: NSStringPboardType]; |
2983 | 1366 | 1692 | ||
2984 | 1367 | if (cfsVal) | 1693 | if (cfsVal) |
2985 | @@ -1375,40 +1701,39 @@ | |||
2986 | 1375 | */ | 1701 | */ |
2987 | 1376 | bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selectedText) | 1702 | bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selectedText) |
2988 | 1377 | { | 1703 | { |
2991 | 1378 | NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType, | 1704 | NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType, |
2992 | 1379 | NSStringPboardType, | 1705 | NSStringPboardType, |
2993 | 1380 | nil]; | 1706 | nil]; |
2994 | 1381 | NSString *bestType = [board availableTypeFromArray: supportedTypes]; | 1707 | NSString *bestType = [board availableTypeFromArray: supportedTypes]; |
2995 | 1382 | NSString* data = [board stringForType: bestType]; | 1708 | NSString* data = [board stringForType: bestType]; |
2997 | 1383 | 1709 | ||
2998 | 1384 | if (data != nil) | 1710 | if (data != nil) |
2999 | 1385 | { | 1711 | { |
3000 | 1386 | if (selectedText != nil) | 1712 | if (selectedText != nil) |
3001 | 1387 | { | 1713 | { |
3002 | 1388 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), | 1714 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), |
3003 | 1389 | vs.styles[STYLE_DEFAULT].characterSet); | 1715 | vs.styles[STYLE_DEFAULT].characterSet); |
3005 | 1390 | CFRange rangeAll = {0, [data length]}; | 1716 | CFRange rangeAll = {0, static_cast<CFIndex>([data length])}; |
3006 | 1391 | CFIndex usedLen = 0; | 1717 | CFIndex usedLen = 0; |
3007 | 1392 | CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?', | 1718 | CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?', |
3008 | 1393 | false, NULL, 0, &usedLen); | 1719 | false, NULL, 0, &usedLen); |
3009 | 1394 | 1720 | ||
3012 | 1395 | UInt8 *buffer = new UInt8[usedLen]; | 1721 | std::vector<UInt8> buffer(usedLen); |
3013 | 1396 | 1722 | ||
3014 | 1397 | CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?', | 1723 | CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?', |
3016 | 1398 | false, buffer,usedLen, NULL); | 1724 | false, buffer.data(),usedLen, NULL); |
3017 | 1399 | 1725 | ||
3018 | 1400 | bool rectangular = bestType == ScintillaRecPboardType; | 1726 | bool rectangular = bestType == ScintillaRecPboardType; |
3019 | 1401 | 1727 | ||
3020 | 1402 | int len = static_cast<int>(usedLen); | 1728 | int len = static_cast<int>(usedLen); |
3022 | 1403 | char *dest = Document::TransformLineEnds(&len, (char *)buffer, len, pdoc->eolMode); | 1729 | std::string dest = Document::TransformLineEnds((char *)buffer.data(), len, pdoc->eolMode); |
3023 | 1404 | 1730 | ||
3025 | 1405 | selectedText->Set(dest, len+1, pdoc->dbcsCodePage, | 1731 | selectedText->Copy(dest, pdoc->dbcsCodePage, |
3026 | 1406 | vs.styles[STYLE_DEFAULT].characterSet , rectangular, false); | 1732 | vs.styles[STYLE_DEFAULT].characterSet , rectangular, false); |
3027 | 1407 | delete []buffer; | ||
3028 | 1408 | } | 1733 | } |
3029 | 1409 | return true; | 1734 | return true; |
3030 | 1410 | } | 1735 | } |
3032 | 1411 | 1736 | ||
3033 | 1412 | return false; | 1737 | return false; |
3034 | 1413 | } | 1738 | } |
3035 | 1414 | 1739 | ||
3036 | @@ -1417,16 +1742,6 @@ | |||
3037 | 1417 | void ScintillaCocoa::SetMouseCapture(bool on) | 1742 | void ScintillaCocoa::SetMouseCapture(bool on) |
3038 | 1418 | { | 1743 | { |
3039 | 1419 | capturedMouse = on; | 1744 | capturedMouse = on; |
3040 | 1420 | /* | ||
3041 | 1421 | if (mouseDownCaptures) | ||
3042 | 1422 | { | ||
3043 | 1423 | if (capturedMouse) | ||
3044 | 1424 | WndProc(SCI_SETCURSOR, Window::cursorArrow, 0); | ||
3045 | 1425 | else | ||
3046 | 1426 | // Reset to normal. Actual image will be set on mouse move. | ||
3047 | 1427 | WndProc(SCI_SETCURSOR, (unsigned int) SC_CURSORNORMAL, 0); | ||
3048 | 1428 | } | ||
3049 | 1429 | */ | ||
3050 | 1430 | } | 1745 | } |
3051 | 1431 | 1746 | ||
3052 | 1432 | //-------------------------------------------------------------------------------------------------- | 1747 | //-------------------------------------------------------------------------------------------------- |
3053 | @@ -1451,6 +1766,16 @@ | |||
3054 | 1451 | Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT); | 1766 | Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT); |
3055 | 1452 | if (sw) | 1767 | if (sw) |
3056 | 1453 | { | 1768 | { |
3057 | 1769 | CGContextSetAllowsAntialiasing((CGContextRef)gc, | ||
3058 | 1770 | vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED); | ||
3059 | 1771 | CGContextSetAllowsFontSmoothing((CGContextRef)gc, | ||
3060 | 1772 | vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED); | ||
3061 | 1773 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
3062 | 1774 | if (CGContextSetAllowsFontSubpixelPositioning != NULL) | ||
3063 | 1775 | CGContextSetAllowsFontSubpixelPositioning((CGContextRef)gc, | ||
3064 | 1776 | vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT || | ||
3065 | 1777 | vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED); | ||
3066 | 1778 | #endif | ||
3067 | 1454 | sw->Init(gc, wMain.GetID()); | 1779 | sw->Init(gc, wMain.GetID()); |
3068 | 1455 | Paint(sw, rc); | 1780 | Paint(sw, rc); |
3069 | 1456 | succeeded = paintState != paintAbandoned; | 1781 | succeeded = paintState != paintAbandoned; |
3070 | @@ -1458,6 +1783,7 @@ | |||
3071 | 1458 | delete sw; | 1783 | delete sw; |
3072 | 1459 | } | 1784 | } |
3073 | 1460 | paintState = notPainting; | 1785 | paintState = notPainting; |
3074 | 1786 | <<<<<<< TREE | ||
3075 | 1461 | return succeeded; | 1787 | return succeeded; |
3076 | 1462 | } | 1788 | } |
3077 | 1463 | 1789 | ||
3078 | @@ -1466,9 +1792,55 @@ | |||
3079 | 1466 | /** | 1792 | /** |
3080 | 1467 | * Scrolls the pixels in the window some number of lines. | 1793 | * Scrolls the pixels in the window some number of lines. |
3081 | 1468 | * Invalidates the pixels scrolled into view. | 1794 | * Invalidates the pixels scrolled into view. |
3082 | 1795 | ======= | ||
3083 | 1796 | if (!succeeded) | ||
3084 | 1797 | { | ||
3085 | 1798 | NSView *marginView = static_cast<NSView*>(wMargin.GetID()); | ||
3086 | 1799 | [marginView setNeedsDisplay:YES]; | ||
3087 | 1800 | } | ||
3088 | 1801 | return succeeded; | ||
3089 | 1802 | } | ||
3090 | 1803 | |||
3091 | 1804 | //-------------------------------------------------------------------------------------------------- | ||
3092 | 1805 | |||
3093 | 1806 | /** | ||
3094 | 1807 | * Paint the margin into the SCIMarginView space. | ||
3095 | 1808 | */ | ||
3096 | 1809 | void ScintillaCocoa::PaintMargin(NSRect aRect) | ||
3097 | 1810 | { | ||
3098 | 1811 | CGContextRef gc = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; | ||
3099 | 1812 | |||
3100 | 1813 | PRectangle rc = NSRectToPRectangle(aRect); | ||
3101 | 1814 | rcPaint = rc; | ||
3102 | 1815 | Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT); | ||
3103 | 1816 | if (sw) | ||
3104 | 1817 | { | ||
3105 | 1818 | CGContextSetAllowsAntialiasing(gc, | ||
3106 | 1819 | vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED); | ||
3107 | 1820 | CGContextSetAllowsFontSmoothing(gc, | ||
3108 | 1821 | vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED); | ||
3109 | 1822 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
3110 | 1823 | if (CGContextSetAllowsFontSubpixelPositioning != NULL) | ||
3111 | 1824 | CGContextSetAllowsFontSubpixelPositioning(gc, | ||
3112 | 1825 | vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT || | ||
3113 | 1826 | vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED); | ||
3114 | 1827 | #endif | ||
3115 | 1828 | sw->Init(gc, wMargin.GetID()); | ||
3116 | 1829 | PaintSelMargin(sw, rc); | ||
3117 | 1830 | sw->Release(); | ||
3118 | 1831 | delete sw; | ||
3119 | 1832 | } | ||
3120 | 1833 | } | ||
3121 | 1834 | |||
3122 | 1835 | //-------------------------------------------------------------------------------------------------- | ||
3123 | 1836 | |||
3124 | 1837 | /** | ||
3125 | 1838 | * ScrollText is empty because scrolling is handled by the NSScrollView. | ||
3126 | 1839 | >>>>>>> MERGE-SOURCE | ||
3127 | 1469 | */ | 1840 | */ |
3128 | 1470 | void ScintillaCocoa::ScrollText(int linesToMove) | 1841 | void ScintillaCocoa::ScrollText(int linesToMove) |
3129 | 1471 | { | 1842 | { |
3130 | 1843 | <<<<<<< TREE | ||
3131 | 1472 | // Move those pixels | 1844 | // Move those pixels |
3132 | 1473 | NSView *content = ContentView(); | 1845 | NSView *content = ContentView(); |
3133 | 1474 | if ([content layer]) { | 1846 | if ([content layer]) { |
3134 | @@ -1509,15 +1881,18 @@ | |||
3135 | 1509 | 1881 | ||
3136 | 1510 | // Could invalidate instead of synchronous draw but that may not be as smooth | 1882 | // Could invalidate instead of synchronous draw but that may not be as smooth |
3137 | 1511 | //[content setNeedsDisplayInRect: redrawRectangle]; | 1883 | //[content setNeedsDisplayInRect: redrawRectangle]; |
3138 | 1884 | ======= | ||
3139 | 1885 | >>>>>>> MERGE-SOURCE | ||
3140 | 1512 | } | 1886 | } |
3141 | 1513 | 1887 | ||
3142 | 1514 | //-------------------------------------------------------------------------------------------------- | 1888 | //-------------------------------------------------------------------------------------------------- |
3143 | 1515 | 1889 | ||
3144 | 1516 | /** | 1890 | /** |
3146 | 1517 | * Modfies the vertical scroll position to make the current top line show up as such. | 1891 | * Modifies the vertical scroll position to make the current top line show up as such. |
3147 | 1518 | */ | 1892 | */ |
3148 | 1519 | void ScintillaCocoa::SetVerticalScrollPos() | 1893 | void ScintillaCocoa::SetVerticalScrollPos() |
3149 | 1520 | { | 1894 | { |
3150 | 1895 | <<<<<<< TREE | ||
3151 | 1521 | ScintillaView* topContainer = TopContainer(); | 1896 | ScintillaView* topContainer = TopContainer(); |
3152 | 1522 | 1897 | ||
3153 | 1523 | // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area | 1898 | // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area |
3154 | @@ -1525,14 +1900,26 @@ | |||
3155 | 1525 | int maxScrollPos = MaxScrollPos(); | 1900 | int maxScrollPos = MaxScrollPos(); |
3156 | 1526 | float relativePosition = (maxScrollPos > 0) ? ((float) topLine / maxScrollPos) : 0.0f; | 1901 | float relativePosition = (maxScrollPos > 0) ? ((float) topLine / maxScrollPos) : 0.0f; |
3157 | 1527 | [topContainer setVerticalScrollPosition: relativePosition]; | 1902 | [topContainer setVerticalScrollPosition: relativePosition]; |
3158 | 1903 | ======= | ||
3159 | 1904 | NSScrollView *scrollView = ScrollContainer(); | ||
3160 | 1905 | if (scrollView) { | ||
3161 | 1906 | NSClipView *clipView = [scrollView contentView]; | ||
3162 | 1907 | NSRect contentRect = [clipView bounds]; | ||
3163 | 1908 | [clipView scrollToPoint: NSMakePoint(contentRect.origin.x, topLine * vs.lineHeight)]; | ||
3164 | 1909 | [scrollView reflectScrolledClipView:clipView]; | ||
3165 | 1910 | } | ||
3166 | 1911 | >>>>>>> MERGE-SOURCE | ||
3167 | 1528 | } | 1912 | } |
3168 | 1529 | 1913 | ||
3169 | 1530 | //-------------------------------------------------------------------------------------------------- | 1914 | //-------------------------------------------------------------------------------------------------- |
3170 | 1531 | 1915 | ||
3171 | 1916 | /** | ||
3172 | 1917 | * Modifies the horizontal scroll position to match xOffset. | ||
3173 | 1918 | */ | ||
3174 | 1532 | void ScintillaCocoa::SetHorizontalScrollPos() | 1919 | void ScintillaCocoa::SetHorizontalScrollPos() |
3175 | 1533 | { | 1920 | { |
3176 | 1534 | ScintillaView* topContainer = TopContainer(); | ||
3177 | 1535 | PRectangle textRect = GetTextRectangle(); | 1921 | PRectangle textRect = GetTextRectangle(); |
3178 | 1922 | <<<<<<< TREE | ||
3179 | 1536 | 1923 | ||
3180 | 1537 | // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area | 1924 | // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area |
3181 | 1538 | // does *not* belong to the scroll range. | 1925 | // does *not* belong to the scroll range. |
3182 | @@ -1544,12 +1931,29 @@ | |||
3183 | 1544 | float relativePosition = (float) xOffset / maxXOffset; | 1931 | float relativePosition = (float) xOffset / maxXOffset; |
3184 | 1545 | [topContainer setHorizontalScrollPosition: relativePosition]; | 1932 | [topContainer setHorizontalScrollPosition: relativePosition]; |
3185 | 1546 | MoveFindIndicatorWithBounce(NO); | 1933 | MoveFindIndicatorWithBounce(NO); |
3186 | 1934 | ======= | ||
3187 | 1935 | |||
3188 | 1936 | int maxXOffset = scrollWidth - textRect.Width(); | ||
3189 | 1937 | if (maxXOffset < 0) | ||
3190 | 1938 | maxXOffset = 0; | ||
3191 | 1939 | if (xOffset > maxXOffset) | ||
3192 | 1940 | xOffset = maxXOffset; | ||
3193 | 1941 | NSScrollView *scrollView = ScrollContainer(); | ||
3194 | 1942 | if (scrollView) { | ||
3195 | 1943 | NSClipView * clipView = [scrollView contentView]; | ||
3196 | 1944 | NSRect contentRect = [clipView bounds]; | ||
3197 | 1945 | [clipView scrollToPoint: NSMakePoint(xOffset, contentRect.origin.y)]; | ||
3198 | 1946 | [scrollView reflectScrolledClipView:clipView]; | ||
3199 | 1947 | } | ||
3200 | 1948 | MoveFindIndicatorWithBounce(NO); | ||
3201 | 1949 | >>>>>>> MERGE-SOURCE | ||
3202 | 1547 | } | 1950 | } |
3203 | 1548 | 1951 | ||
3204 | 1549 | //-------------------------------------------------------------------------------------------------- | 1952 | //-------------------------------------------------------------------------------------------------- |
3205 | 1550 | 1953 | ||
3206 | 1551 | /** | 1954 | /** |
3207 | 1552 | * Used to adjust both scrollers to reflect the current scroll range and position in the editor. | 1955 | * Used to adjust both scrollers to reflect the current scroll range and position in the editor. |
3208 | 1956 | * Arguments no longer used as NSScrollView handles details of scroll bar sizes. | ||
3209 | 1553 | * | 1957 | * |
3210 | 1554 | * @param nMax Number of lines in the editor. | 1958 | * @param nMax Number of lines in the editor. |
3211 | 1555 | * @param nPage Number of lines per scroll page. | 1959 | * @param nPage Number of lines per scroll page. |
3212 | @@ -1557,12 +1961,11 @@ | |||
3213 | 1557 | */ | 1961 | */ |
3214 | 1558 | bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage) | 1962 | bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage) |
3215 | 1559 | { | 1963 | { |
3221 | 1560 | #pragma unused(nPage) | 1964 | #pragma unused(nMax, nPage) |
3222 | 1561 | // Input values are given in lines, not pixels, so we have to convert. | 1965 | return SetScrollingSize(); |
3223 | 1562 | int lineHeight = static_cast<int>(WndProc(SCI_TEXTHEIGHT, 0, 0)); | 1966 | } |
3219 | 1563 | PRectangle bounds = GetTextRectangle(); | ||
3220 | 1564 | ScintillaView* topContainer = TopContainer(); | ||
3224 | 1565 | 1967 | ||
3225 | 1968 | <<<<<<< TREE | ||
3226 | 1566 | // Set page size to the same value as the scroll range to hide the scrollbar. | 1969 | // Set page size to the same value as the scroll range to hide the scrollbar. |
3227 | 1567 | int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one. | 1970 | int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one. |
3228 | 1568 | int pageSize; | 1971 | int pageSize; |
3229 | @@ -1582,87 +1985,86 @@ | |||
3230 | 1582 | MoveFindIndicatorWithBounce(NO); | 1985 | MoveFindIndicatorWithBounce(NO); |
3231 | 1583 | 1986 | ||
3232 | 1584 | return verticalChange || horizontalChange; | 1987 | return verticalChange || horizontalChange; |
3233 | 1988 | ======= | ||
3234 | 1989 | bool ScintillaCocoa::SetScrollingSize(void) { | ||
3235 | 1990 | bool changes = false; | ||
3236 | 1991 | SCIContentView *inner = ContentView(); | ||
3237 | 1992 | if (!enteredSetScrollingSize) { | ||
3238 | 1993 | enteredSetScrollingSize = true; | ||
3239 | 1994 | NSScrollView *scrollView = ScrollContainer(); | ||
3240 | 1995 | NSClipView *clipView = [ScrollContainer() contentView]; | ||
3241 | 1996 | NSRect clipRect = [clipView bounds]; | ||
3242 | 1997 | CGFloat docHeight = (cs.LinesDisplayed()+1) * vs.lineHeight; | ||
3243 | 1998 | if (!endAtLastLine) | ||
3244 | 1999 | docHeight += (int([scrollView bounds].size.height / vs.lineHeight)-3) * vs.lineHeight; | ||
3245 | 2000 | // Allow extra space so that last scroll position places whole line at top | ||
3246 | 2001 | int clipExtra = int(clipRect.size.height) % vs.lineHeight; | ||
3247 | 2002 | docHeight += clipExtra; | ||
3248 | 2003 | // Ensure all of clipRect covered by Scintilla drawing | ||
3249 | 2004 | if (docHeight < clipRect.size.height) | ||
3250 | 2005 | docHeight = clipRect.size.height; | ||
3251 | 2006 | CGFloat docWidth = scrollWidth; | ||
3252 | 2007 | bool showHorizontalScroll = horizontalScrollBarVisible && | ||
3253 | 2008 | !Wrapping(); | ||
3254 | 2009 | if (!showHorizontalScroll) | ||
3255 | 2010 | docWidth = clipRect.size.width; | ||
3256 | 2011 | NSRect contentRect = {0, 0, docWidth, docHeight}; | ||
3257 | 2012 | NSRect contentRectNow = [inner frame]; | ||
3258 | 2013 | changes = (contentRect.size.width != contentRectNow.size.width) || | ||
3259 | 2014 | (contentRect.size.height != contentRectNow.size.height); | ||
3260 | 2015 | if (changes) { | ||
3261 | 2016 | [inner setFrame: contentRect]; | ||
3262 | 2017 | } | ||
3263 | 2018 | [scrollView setHasVerticalScroller: verticalScrollBarVisible]; | ||
3264 | 2019 | [scrollView setHasHorizontalScroller: showHorizontalScroll]; | ||
3265 | 2020 | SetVerticalScrollPos(); | ||
3266 | 2021 | enteredSetScrollingSize = false; | ||
3267 | 2022 | } | ||
3268 | 2023 | [inner.owner setMarginWidth: vs.fixedColumnWidth]; | ||
3269 | 2024 | return changes; | ||
3270 | 2025 | >>>>>>> MERGE-SOURCE | ||
3271 | 1585 | } | 2026 | } |
3272 | 1586 | 2027 | ||
3273 | 1587 | //-------------------------------------------------------------------------------------------------- | 2028 | //-------------------------------------------------------------------------------------------------- |
3274 | 1588 | 2029 | ||
3275 | 1589 | void ScintillaCocoa::Resize() | 2030 | void ScintillaCocoa::Resize() |
3276 | 1590 | { | 2031 | { |
3277 | 2032 | SetScrollingSize(); | ||
3278 | 1591 | ChangeSize(); | 2033 | ChangeSize(); |
3279 | 1592 | } | 2034 | } |
3280 | 1593 | 2035 | ||
3281 | 1594 | //-------------------------------------------------------------------------------------------------- | 2036 | //-------------------------------------------------------------------------------------------------- |
3282 | 1595 | 2037 | ||
3283 | 1596 | /** | 2038 | /** |
3285 | 1597 | * Called by the frontend control when the user manipulates one of the scrollers. | 2039 | * Update fields to match scroll position after receiving a notification that the user has scrolled. |
3286 | 2040 | */ | ||
3287 | 2041 | void ScintillaCocoa::UpdateForScroll() { | ||
3288 | 2042 | Point ptOrigin = GetVisibleOriginInMain(); | ||
3289 | 2043 | xOffset = ptOrigin.x; | ||
3290 | 2044 | int newTop = Platform::Minimum(ptOrigin.y / vs.lineHeight, MaxScrollPos()); | ||
3291 | 2045 | SetTopLine(newTop); | ||
3292 | 2046 | } | ||
3293 | 2047 | |||
3294 | 2048 | //-------------------------------------------------------------------------------------------------- | ||
3295 | 2049 | |||
3296 | 2050 | /** | ||
3297 | 2051 | * Register a delegate that will be called for notifications and commands. | ||
3298 | 2052 | * This provides similar functionality to RegisterNotifyCallback but in an | ||
3299 | 2053 | * Objective C way. | ||
3300 | 1598 | * | 2054 | * |
3305 | 1599 | * @param position The relative position of the scroller in the range of [0..1]. | 2055 | * @param delegate_ A pointer to an object that implements ScintillaNotificationProtocol. |
3302 | 1600 | * @param part Specifies which part was clicked on by the user, so we can handle thumb tracking | ||
3303 | 1601 | * as well as page and line scrolling. | ||
3304 | 1602 | * @param horizontal True if the horizontal scroller was hit, otherwise false. | ||
3306 | 1603 | */ | 2056 | */ |
3308 | 1604 | void ScintillaCocoa::DoScroll(float position, NSScrollerPart part, bool horizontal) | 2057 | |
3309 | 2058 | void ScintillaCocoa::SetDelegate(id<ScintillaNotificationProtocol> delegate_) | ||
3310 | 1605 | { | 2059 | { |
3364 | 1606 | // If the given scroller part is not the knob (or knob slot) then the given position is not yet | 2060 | delegate = delegate_; |
3312 | 1607 | // current and we have to update it. | ||
3313 | 1608 | if (horizontal) | ||
3314 | 1609 | { | ||
3315 | 1610 | // Horizontal offset is given in pixels. | ||
3316 | 1611 | PRectangle textRect = GetTextRectangle(); | ||
3317 | 1612 | int offset = (int) (position * (scrollWidth - textRect.Width())); | ||
3318 | 1613 | int smallChange = (int) (textRect.Width() / 30); | ||
3319 | 1614 | if (smallChange < 5) | ||
3320 | 1615 | smallChange = 5; | ||
3321 | 1616 | switch (part) | ||
3322 | 1617 | { | ||
3323 | 1618 | case NSScrollerDecrementLine: | ||
3324 | 1619 | offset -= smallChange; | ||
3325 | 1620 | break; | ||
3326 | 1621 | case NSScrollerDecrementPage: | ||
3327 | 1622 | offset -= textRect.Width(); | ||
3328 | 1623 | break; | ||
3329 | 1624 | case NSScrollerIncrementLine: | ||
3330 | 1625 | offset += smallChange; | ||
3331 | 1626 | break; | ||
3332 | 1627 | case NSScrollerIncrementPage: | ||
3333 | 1628 | offset += textRect.Width(); | ||
3334 | 1629 | break; | ||
3335 | 1630 | }; | ||
3336 | 1631 | HorizontalScrollTo(offset); | ||
3337 | 1632 | } | ||
3338 | 1633 | else | ||
3339 | 1634 | { | ||
3340 | 1635 | // VerticalScrolling is by line. If the user is scrolling using the knob we can directly | ||
3341 | 1636 | // set the new scroll position. Otherwise we have to compute it first. | ||
3342 | 1637 | if (part == NSScrollerKnob) | ||
3343 | 1638 | ScrollTo(position * MaxScrollPos(), false); | ||
3344 | 1639 | else | ||
3345 | 1640 | { | ||
3346 | 1641 | switch (part) | ||
3347 | 1642 | { | ||
3348 | 1643 | case NSScrollerDecrementLine: | ||
3349 | 1644 | ScrollTo(topLine - 1, true); | ||
3350 | 1645 | break; | ||
3351 | 1646 | case NSScrollerDecrementPage: | ||
3352 | 1647 | ScrollTo(topLine - LinesOnScreen(), true); | ||
3353 | 1648 | break; | ||
3354 | 1649 | case NSScrollerIncrementLine: | ||
3355 | 1650 | ScrollTo(topLine + 1, true); | ||
3356 | 1651 | break; | ||
3357 | 1652 | case NSScrollerIncrementPage: | ||
3358 | 1653 | ScrollTo(topLine + LinesOnScreen(), true); | ||
3359 | 1654 | break; | ||
3360 | 1655 | }; | ||
3361 | 1656 | |||
3362 | 1657 | } | ||
3363 | 1658 | } | ||
3365 | 1659 | } | 2061 | } |
3366 | 1660 | 2062 | ||
3367 | 1661 | //-------------------------------------------------------------------------------------------------- | 2063 | //-------------------------------------------------------------------------------------------------- |
3368 | 1662 | 2064 | ||
3369 | 1663 | /** | 2065 | /** |
3370 | 1664 | * Used to register a callback function for a given window. This is used to emulate the way | 2066 | * Used to register a callback function for a given window. This is used to emulate the way |
3372 | 1665 | * Windows notfies other controls (mainly up in the view hierarchy) about certain events. | 2067 | * Windows notifies other controls (mainly up in the view hierarchy) about certain events. |
3373 | 1666 | * | 2068 | * |
3374 | 1667 | * @param windowid A handle to a window. That value is generic and can be anything. It is passed | 2069 | * @param windowid A handle to a window. That value is generic and can be anything. It is passed |
3375 | 1668 | * through to the callback. | 2070 | * through to the callback. |
3376 | @@ -1691,6 +2093,8 @@ | |||
3377 | 1691 | if (notifyProc != NULL) | 2093 | if (notifyProc != NULL) |
3378 | 1692 | notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)), | 2094 | notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)), |
3379 | 1693 | (uintptr_t) this); | 2095 | (uintptr_t) this); |
3380 | 2096 | |||
3381 | 2097 | Editor::NotifyFocus(focus); | ||
3382 | 1694 | } | 2098 | } |
3383 | 1695 | 2099 | ||
3384 | 1696 | //-------------------------------------------------------------------------------------------------- | 2100 | //-------------------------------------------------------------------------------------------------- |
3385 | @@ -1702,13 +2106,13 @@ | |||
3386 | 1702 | * @param scn The notification to send. | 2106 | * @param scn The notification to send. |
3387 | 1703 | */ | 2107 | */ |
3388 | 1704 | void ScintillaCocoa::NotifyParent(SCNotification scn) | 2108 | void ScintillaCocoa::NotifyParent(SCNotification scn) |
3390 | 1705 | { | 2109 | { |
3391 | 2110 | scn.nmhdr.hwndFrom = (void*) this; | ||
3392 | 2111 | scn.nmhdr.idFrom = GetCtrlID(); | ||
3393 | 1706 | if (notifyProc != NULL) | 2112 | if (notifyProc != NULL) |
3399 | 1707 | { | 2113 | notifyProc(notifyObj, WM_NOTIFY, GetCtrlID(), (uintptr_t) &scn); |
3400 | 1708 | scn.nmhdr.hwndFrom = (void*) this; | 2114 | if (delegate) |
3401 | 1709 | scn.nmhdr.idFrom = GetCtrlID(); | 2115 | [delegate notification:&scn]; |
3397 | 1710 | notifyProc(notifyObj, WM_NOTIFY, (uintptr_t) 0, (uintptr_t) &scn); | ||
3398 | 1711 | } | ||
3402 | 1712 | } | 2116 | } |
3403 | 1713 | 2117 | ||
3404 | 1714 | //-------------------------------------------------------------------------------------------------- | 2118 | //-------------------------------------------------------------------------------------------------- |
3405 | @@ -1718,7 +2122,7 @@ | |||
3406 | 1718 | SCNotification scn; | 2122 | SCNotification scn; |
3407 | 1719 | scn.nmhdr.code = SCN_URIDROPPED; | 2123 | scn.nmhdr.code = SCN_URIDROPPED; |
3408 | 1720 | scn.text = uri; | 2124 | scn.text = uri; |
3410 | 1721 | 2125 | ||
3411 | 1722 | NotifyParent(scn); | 2126 | NotifyParent(scn); |
3412 | 1723 | } | 2127 | } |
3413 | 1724 | 2128 | ||
3414 | @@ -1775,7 +2179,7 @@ | |||
3415 | 1775 | } | 2179 | } |
3416 | 1776 | 2180 | ||
3417 | 1777 | //-------------------------------------------------------------------------------------------------- | 2181 | //-------------------------------------------------------------------------------------------------- |
3419 | 1778 | 2182 | ||
3420 | 1779 | /** | 2183 | /** |
3421 | 1780 | * Helper function to translate OS X key codes to Scintilla key codes. | 2184 | * Helper function to translate OS X key codes to Scintilla key codes. |
3422 | 1781 | */ | 2185 | */ |
3423 | @@ -1821,8 +2225,26 @@ | |||
3424 | 1821 | //-------------------------------------------------------------------------------------------------- | 2225 | //-------------------------------------------------------------------------------------------------- |
3425 | 1822 | 2226 | ||
3426 | 1823 | /** | 2227 | /** |
3427 | 2228 | * Translate NSEvent modifier flags into SCI_* modifier flags. | ||
3428 | 2229 | * | ||
3429 | 2230 | * @param modifiers An integer bit set of NSSEvent modifier flags. | ||
3430 | 2231 | * @return A set of SCI_* modifier flags. | ||
3431 | 2232 | */ | ||
3432 | 2233 | static int TranslateModifierFlags(NSUInteger modifiers) | ||
3433 | 2234 | { | ||
3434 | 2235 | // Signal Control as SCI_META | ||
3435 | 2236 | return | ||
3436 | 2237 | (((modifiers & NSShiftKeyMask) != 0) ? SCI_SHIFT : 0) | | ||
3437 | 2238 | (((modifiers & NSCommandKeyMask) != 0) ? SCI_CTRL : 0) | | ||
3438 | 2239 | (((modifiers & NSAlternateKeyMask) != 0) ? SCI_ALT : 0) | | ||
3439 | 2240 | (((modifiers & NSControlKeyMask) != 0) ? SCI_META : 0); | ||
3440 | 2241 | } | ||
3441 | 2242 | |||
3442 | 2243 | //-------------------------------------------------------------------------------------------------- | ||
3443 | 2244 | |||
3444 | 2245 | /** | ||
3445 | 1824 | * Main keyboard input handling method. It is called for any key down event, including function keys, | 2246 | * Main keyboard input handling method. It is called for any key down event, including function keys, |
3447 | 1825 | * numeric keypad input and whatnot. | 2247 | * numeric keypad input and whatnot. |
3448 | 1826 | * | 2248 | * |
3449 | 1827 | * @param event The event instance associated with the key down event. | 2249 | * @param event The event instance associated with the key down event. |
3450 | 1828 | * @return True if the input was handled, false otherwise. | 2250 | * @return True if the input was handled, false otherwise. |
3451 | @@ -1830,37 +2252,24 @@ | |||
3452 | 1830 | bool ScintillaCocoa::KeyboardInput(NSEvent* event) | 2252 | bool ScintillaCocoa::KeyboardInput(NSEvent* event) |
3453 | 1831 | { | 2253 | { |
3454 | 1832 | // For now filter out function keys. | 2254 | // For now filter out function keys. |
3455 | 1833 | NSUInteger modifiers = [event modifierFlags]; | ||
3456 | 1834 | |||
3457 | 1835 | NSString* input = [event characters]; | 2255 | NSString* input = [event characters]; |
3464 | 1836 | 2256 | ||
3459 | 1837 | bool control = (modifiers & NSControlKeyMask) != 0; | ||
3460 | 1838 | bool shift = (modifiers & NSShiftKeyMask) != 0; | ||
3461 | 1839 | bool command = (modifiers & NSCommandKeyMask) != 0; | ||
3462 | 1840 | bool alt = (modifiers & NSAlternateKeyMask) != 0; | ||
3463 | 1841 | |||
3465 | 1842 | bool handled = false; | 2257 | bool handled = false; |
3468 | 1843 | 2258 | ||
3469 | 1844 | // Handle each entry individually. Usually we only have one entry anway. | 2259 | // Handle each entry individually. Usually we only have one entry anyway. |
3470 | 1845 | for (size_t i = 0; i < input.length; i++) | 2260 | for (size_t i = 0; i < input.length; i++) |
3471 | 1846 | { | 2261 | { |
3472 | 1847 | const UniChar originalKey = [input characterAtIndex: i]; | 2262 | const UniChar originalKey = [input characterAtIndex: i]; |
3473 | 1848 | UniChar key = KeyTranslate(originalKey); | 2263 | UniChar key = KeyTranslate(originalKey); |
3475 | 1849 | 2264 | ||
3476 | 1850 | bool consumed = false; // Consumed as command? | 2265 | bool consumed = false; // Consumed as command? |
3485 | 1851 | 2266 | ||
3486 | 1852 | // Signal Control as SCMOD_META | 2267 | if (KeyDownWithModifiers(key, TranslateModifierFlags([event modifierFlags]), &consumed)) |
3479 | 1853 | int modifierKeys = | ||
3480 | 1854 | (shift ? SCI_SHIFT : 0) | | ||
3481 | 1855 | (command ? SCI_CTRL : 0) | | ||
3482 | 1856 | (alt ? SCI_ALT : 0) | | ||
3483 | 1857 | (control ? SCI_META : 0); | ||
3484 | 1858 | if (KeyDownWithModifiers(key, modifierKeys, &consumed)) | ||
3487 | 1859 | handled = true; | 2268 | handled = true; |
3488 | 1860 | if (consumed) | 2269 | if (consumed) |
3489 | 1861 | handled = true; | 2270 | handled = true; |
3490 | 1862 | } | 2271 | } |
3492 | 1863 | 2272 | ||
3493 | 1864 | return handled; | 2273 | return handled; |
3494 | 1865 | } | 2274 | } |
3495 | 1866 | 2275 | ||
3496 | @@ -1873,24 +2282,53 @@ | |||
3497 | 1873 | { | 2282 | { |
3498 | 1874 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), | 2283 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), |
3499 | 1875 | vs.styles[STYLE_DEFAULT].characterSet); | 2284 | vs.styles[STYLE_DEFAULT].characterSet); |
3501 | 1876 | CFRange rangeAll = {0, [input length]}; | 2285 | CFRange rangeAll = {0, static_cast<CFIndex>([input length])}; |
3502 | 1877 | CFIndex usedLen = 0; | 2286 | CFIndex usedLen = 0; |
3503 | 1878 | CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?', | 2287 | CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?', |
3504 | 1879 | false, NULL, 0, &usedLen); | 2288 | false, NULL, 0, &usedLen); |
3508 | 1880 | 2289 | ||
3509 | 1881 | UInt8 *buffer = new UInt8[usedLen]; | 2290 | std::vector<UInt8> buffer(usedLen); |
3510 | 1882 | 2291 | ||
3511 | 1883 | CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?', | 2292 | CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?', |
3516 | 1884 | false, buffer,usedLen, NULL); | 2293 | false, buffer.data(),usedLen, NULL); |
3517 | 1885 | 2294 | ||
3518 | 1886 | AddCharUTF((char*) buffer, static_cast<unsigned int>(usedLen), false); | 2295 | AddCharUTF((char*) buffer.data(), static_cast<unsigned int>(usedLen), false); |
3515 | 1887 | delete []buffer; | ||
3519 | 1888 | return static_cast<int>(usedLen); | 2296 | return static_cast<int>(usedLen); |
3520 | 1889 | } | 2297 | } |
3521 | 1890 | 2298 | ||
3522 | 1891 | //-------------------------------------------------------------------------------------------------- | 2299 | //-------------------------------------------------------------------------------------------------- |
3523 | 1892 | 2300 | ||
3524 | 1893 | /** | 2301 | /** |
3525 | 2302 | * Used to ensure that only one selection is active for input composition as composition | ||
3526 | 2303 | * does not support multi-typing. | ||
3527 | 2304 | * Also drop virtual space as that is not supported by composition. | ||
3528 | 2305 | */ | ||
3529 | 2306 | void ScintillaCocoa::SelectOnlyMainSelection() | ||
3530 | 2307 | { | ||
3531 | 2308 | SelectionRange mainSel = sel.RangeMain(); | ||
3532 | 2309 | mainSel.ClearVirtualSpace(); | ||
3533 | 2310 | sel.SetSelection(mainSel); | ||
3534 | 2311 | Redraw(); | ||
3535 | 2312 | } | ||
3536 | 2313 | |||
3537 | 2314 | //-------------------------------------------------------------------------------------------------- | ||
3538 | 2315 | /** | ||
3539 | 2316 | * When switching documents discard any incomplete character composition state as otherwise tries to | ||
3540 | 2317 | * act on the new document. | ||
3541 | 2318 | */ | ||
3542 | 2319 | void ScintillaCocoa::SetDocPointer(Document *document) | ||
3543 | 2320 | { | ||
3544 | 2321 | // Drop input composition. | ||
3545 | 2322 | NSTextInputContext *inctxt = [NSTextInputContext currentInputContext]; | ||
3546 | 2323 | [inctxt discardMarkedText]; | ||
3547 | 2324 | SCIContentView *inner = ContentView(); | ||
3548 | 2325 | [inner unmarkText]; | ||
3549 | 2326 | Editor::SetDocPointer(document); | ||
3550 | 2327 | } | ||
3551 | 2328 | |||
3552 | 2329 | //-------------------------------------------------------------------------------------------------- | ||
3553 | 2330 | |||
3554 | 2331 | /** | ||
3555 | 1894 | * Called by the owning view when the mouse pointer enters the control. | 2332 | * Called by the owning view when the mouse pointer enters the control. |
3556 | 1895 | */ | 2333 | */ |
3557 | 1896 | void ScintillaCocoa::MouseEntered(NSEvent* event) | 2334 | void ScintillaCocoa::MouseEntered(NSEvent* event) |
3558 | @@ -1898,7 +2336,7 @@ | |||
3559 | 1898 | if (!HaveMouseCapture()) | 2336 | if (!HaveMouseCapture()) |
3560 | 1899 | { | 2337 | { |
3561 | 1900 | WndProc(SCI_SETCURSOR, (long int)SC_CURSORNORMAL, 0); | 2338 | WndProc(SCI_SETCURSOR, (long int)SC_CURSORNORMAL, 0); |
3563 | 1901 | 2339 | ||
3564 | 1902 | // Mouse location is given in screen coordinates and might also be outside of our bounds. | 2340 | // Mouse location is given in screen coordinates and might also be outside of our bounds. |
3565 | 1903 | Point location = ConvertPoint([event locationInWindow]); | 2341 | Point location = ConvertPoint([event locationInWindow]); |
3566 | 1904 | ButtonMove(location); | 2342 | ButtonMove(location); |
3567 | @@ -1921,7 +2359,7 @@ | |||
3568 | 1921 | bool command = ([event modifierFlags] & NSCommandKeyMask) != 0; | 2359 | bool command = ([event modifierFlags] & NSCommandKeyMask) != 0; |
3569 | 1922 | bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0; | 2360 | bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0; |
3570 | 1923 | bool alt = ([event modifierFlags] & NSAlternateKeyMask) != 0; | 2361 | bool alt = ([event modifierFlags] & NSAlternateKeyMask) != 0; |
3572 | 1924 | 2362 | ||
3573 | 1925 | ButtonDown(Point(location.x, location.y), (int) (time * 1000), shift, command, alt); | 2363 | ButtonDown(Point(location.x, location.y), (int) (time * 1000), shift, command, alt); |
3574 | 1926 | } | 2364 | } |
3575 | 1927 | 2365 | ||
3576 | @@ -1930,8 +2368,8 @@ | |||
3577 | 1930 | void ScintillaCocoa::MouseMove(NSEvent* event) | 2368 | void ScintillaCocoa::MouseMove(NSEvent* event) |
3578 | 1931 | { | 2369 | { |
3579 | 1932 | lastMouseEvent = event; | 2370 | lastMouseEvent = event; |
3582 | 1933 | 2371 | ||
3583 | 1934 | ButtonMove(ConvertPoint([event locationInWindow])); | 2372 | ButtonMoveWithModifiers(ConvertPoint([event locationInWindow]), TranslateModifierFlags([event modifierFlags])); |
3584 | 1935 | } | 2373 | } |
3585 | 1936 | 2374 | ||
3586 | 1937 | //-------------------------------------------------------------------------------------------------- | 2375 | //-------------------------------------------------------------------------------------------------- |
3587 | @@ -1949,18 +2387,15 @@ | |||
3588 | 1949 | void ScintillaCocoa::MouseWheel(NSEvent* event) | 2387 | void ScintillaCocoa::MouseWheel(NSEvent* event) |
3589 | 1950 | { | 2388 | { |
3590 | 1951 | bool command = ([event modifierFlags] & NSCommandKeyMask) != 0; | 2389 | bool command = ([event modifierFlags] & NSCommandKeyMask) != 0; |
3591 | 1952 | int dX = 0; | ||
3592 | 1953 | int dY = 0; | 2390 | int dY = 0; |
3593 | 1954 | 2391 | ||
3597 | 1955 | dX = 10 * [event deltaX]; // Arbitrary scale factor. | 2392 | // In order to make scrolling with larger offset smoother we scroll less lines the larger the |
3595 | 1956 | |||
3596 | 1957 | // In order to make scrolling with larger offset smoother we scroll less lines the larger the | ||
3598 | 1958 | // delta value is. | 2393 | // delta value is. |
3599 | 1959 | if ([event deltaY] < 0) | 2394 | if ([event deltaY] < 0) |
3600 | 1960 | dY = -(int) sqrt(-10.0 * [event deltaY]); | 2395 | dY = -(int) sqrt(-10.0 * [event deltaY]); |
3601 | 1961 | else | 2396 | else |
3602 | 1962 | dY = (int) sqrt(10.0 * [event deltaY]); | 2397 | dY = (int) sqrt(10.0 * [event deltaY]); |
3604 | 1963 | 2398 | ||
3605 | 1964 | if (command) | 2399 | if (command) |
3606 | 1965 | { | 2400 | { |
3607 | 1966 | // Zoom! We play with the font sizes in the styles. | 2401 | // Zoom! We play with the font sizes in the styles. |
3608 | @@ -1972,8 +2407,6 @@ | |||
3609 | 1972 | } | 2407 | } |
3610 | 1973 | else | 2408 | else |
3611 | 1974 | { | 2409 | { |
3612 | 1975 | HorizontalScrollTo(xOffset - dX); | ||
3613 | 1976 | ScrollTo(topLine - dY, true); | ||
3614 | 1977 | } | 2410 | } |
3615 | 1978 | } | 2411 | } |
3616 | 1979 | 2412 | ||
3617 | @@ -2015,7 +2448,7 @@ | |||
3618 | 2015 | { | 2448 | { |
3619 | 2016 | // Call ScintillaBase to create the context menu. | 2449 | // Call ScintillaBase to create the context menu. |
3620 | 2017 | ContextMenu(Point(0, 0)); | 2450 | ContextMenu(Point(0, 0)); |
3622 | 2018 | 2451 | ||
3623 | 2019 | return reinterpret_cast<NSMenu*>(popup.GetID()); | 2452 | return reinterpret_cast<NSMenu*>(popup.GetID()); |
3624 | 2020 | } | 2453 | } |
3625 | 2021 | 2454 | ||
3626 | @@ -2044,9 +2477,14 @@ | |||
3627 | 2044 | } | 2477 | } |
3628 | 2045 | } | 2478 | } |
3629 | 2046 | 2479 | ||
3630 | 2480 | // If building with old SDK, need to define version number for 10.8 | ||
3631 | 2481 | #ifndef NSAppKitVersionNumber10_8 | ||
3632 | 2482 | #define NSAppKitVersionNumber10_8 1187 | ||
3633 | 2483 | #endif | ||
3634 | 2047 | 2484 | ||
3635 | 2048 | //-------------------------------------------------------------------------------------------------- | 2485 | //-------------------------------------------------------------------------------------------------- |
3636 | 2049 | 2486 | ||
3637 | 2487 | <<<<<<< TREE | ||
3638 | 2050 | void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining) | 2488 | void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining) |
3639 | 2051 | { | 2489 | { |
3640 | 2052 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | 2490 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 |
3641 | @@ -2123,3 +2561,88 @@ | |||
3642 | 2123 | } | 2561 | } |
3643 | 2124 | 2562 | ||
3644 | 2125 | 2563 | ||
3645 | 2564 | ======= | ||
3646 | 2565 | void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining) | ||
3647 | 2566 | { | ||
3648 | 2567 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
3649 | 2568 | NSView *content = ContentView(); | ||
3650 | 2569 | if (!layerFindIndicator) | ||
3651 | 2570 | { | ||
3652 | 2571 | layerFindIndicator = [[FindHighlightLayer alloc] init]; | ||
3653 | 2572 | [content setWantsLayer: YES]; | ||
3654 | 2573 | layerFindIndicator.geometryFlipped = content.layer.geometryFlipped; | ||
3655 | 2574 | if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) | ||
3656 | 2575 | { | ||
3657 | 2576 | // Content layer is unflipped on 10.9, but the indicator shows wrong unless flipped | ||
3658 | 2577 | layerFindIndicator.geometryFlipped = YES; | ||
3659 | 2578 | } | ||
3660 | 2579 | [[content layer] addSublayer:layerFindIndicator]; | ||
3661 | 2580 | } | ||
3662 | 2581 | [layerFindIndicator removeAnimationForKey:@"animateFound"]; | ||
3663 | 2582 | |||
3664 | 2583 | if (charRange.length) | ||
3665 | 2584 | { | ||
3666 | 2585 | CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), | ||
3667 | 2586 | vs.styles[STYLE_DEFAULT].characterSet); | ||
3668 | 2587 | std::vector<char> buffer(charRange.length); | ||
3669 | 2588 | pdoc->GetCharRange(&buffer[0], charRange.location, charRange.length); | ||
3670 | 2589 | |||
3671 | 2590 | CFStringRef cfsFind = CFStringCreateWithBytes(kCFAllocatorDefault, | ||
3672 | 2591 | reinterpret_cast<const UInt8 *>(&buffer[0]), | ||
3673 | 2592 | charRange.length, encoding, false); | ||
3674 | 2593 | layerFindIndicator.sFind = (NSString *)cfsFind; | ||
3675 | 2594 | if (cfsFind) | ||
3676 | 2595 | CFRelease(cfsFind); | ||
3677 | 2596 | layerFindIndicator.retaining = retaining; | ||
3678 | 2597 | layerFindIndicator.positionFind = charRange.location; | ||
3679 | 2598 | int style = WndProc(SCI_GETSTYLEAT, charRange.location, 0); | ||
3680 | 2599 | std::vector<char> bufferFontName(WndProc(SCI_STYLEGETFONT, style, 0) + 1); | ||
3681 | 2600 | WndProc(SCI_STYLEGETFONT, style, (sptr_t)&bufferFontName[0]); | ||
3682 | 2601 | layerFindIndicator.sFont = [NSString stringWithUTF8String: &bufferFontName[0]]; | ||
3683 | 2602 | |||
3684 | 2603 | layerFindIndicator.fontSize = WndProc(SCI_STYLEGETSIZEFRACTIONAL, style, 0) / | ||
3685 | 2604 | (float)SC_FONT_SIZE_MULTIPLIER; | ||
3686 | 2605 | layerFindIndicator.widthText = WndProc(SCI_POINTXFROMPOSITION, 0, charRange.location + charRange.length) - | ||
3687 | 2606 | WndProc(SCI_POINTXFROMPOSITION, 0, charRange.location); | ||
3688 | 2607 | layerFindIndicator.heightLine = WndProc(SCI_TEXTHEIGHT, 0, 0); | ||
3689 | 2608 | MoveFindIndicatorWithBounce(YES); | ||
3690 | 2609 | } | ||
3691 | 2610 | else | ||
3692 | 2611 | { | ||
3693 | 2612 | [layerFindIndicator hideMatch]; | ||
3694 | 2613 | } | ||
3695 | 2614 | #endif | ||
3696 | 2615 | } | ||
3697 | 2616 | |||
3698 | 2617 | void ScintillaCocoa::MoveFindIndicatorWithBounce(BOOL bounce) | ||
3699 | 2618 | { | ||
3700 | 2619 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
3701 | 2620 | if (layerFindIndicator) | ||
3702 | 2621 | { | ||
3703 | 2622 | CGPoint ptText = CGPointMake( | ||
3704 | 2623 | WndProc(SCI_POINTXFROMPOSITION, 0, layerFindIndicator.positionFind), | ||
3705 | 2624 | WndProc(SCI_POINTYFROMPOSITION, 0, layerFindIndicator.positionFind)); | ||
3706 | 2625 | ptText.x = ptText.x - vs.fixedColumnWidth + xOffset; | ||
3707 | 2626 | ptText.y += topLine * vs.lineHeight; | ||
3708 | 2627 | if (!layerFindIndicator.geometryFlipped) | ||
3709 | 2628 | { | ||
3710 | 2629 | NSView *content = ContentView(); | ||
3711 | 2630 | ptText.y = content.bounds.size.height - ptText.y; | ||
3712 | 2631 | } | ||
3713 | 2632 | [layerFindIndicator animateMatch:ptText bounce:bounce]; | ||
3714 | 2633 | } | ||
3715 | 2634 | #endif | ||
3716 | 2635 | } | ||
3717 | 2636 | |||
3718 | 2637 | void ScintillaCocoa::HideFindIndicator() | ||
3719 | 2638 | { | ||
3720 | 2639 | #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 | ||
3721 | 2640 | if (layerFindIndicator) | ||
3722 | 2641 | { | ||
3723 | 2642 | [layerFindIndicator hideMatch]; | ||
3724 | 2643 | } | ||
3725 | 2644 | #endif | ||
3726 | 2645 | } | ||
3727 | 2646 | |||
3728 | 2647 | |||
3729 | 2648 | >>>>>>> MERGE-SOURCE | ||
3730 | 2126 | 2649 | ||
3731 | === modified file 'cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj' | |||
3732 | --- cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj 2012-10-26 08:56:06 +0000 | |||
3733 | +++ cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj 2014-01-24 04:00:28 +0000 | |||
3734 | @@ -7,6 +7,14 @@ | |||
3735 | 7 | objects = { | 7 | objects = { |
3736 | 8 | 8 | ||
3737 | 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
3738 | 10 | 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E6178E393200105727 /* CaseConvert.cxx */; }; | ||
3739 | 11 | 1100F1EC178E393200105727 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E7178E393200105727 /* CaseConvert.h */; }; | ||
3740 | 12 | 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E8178E393200105727 /* CaseFolder.cxx */; }; | ||
3741 | 13 | 1100F1EE178E393200105727 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E9178E393200105727 /* CaseFolder.h */; }; | ||
3742 | 14 | 1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */; }; | ||
3743 | 15 | 1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */; }; | ||
3744 | 16 | 11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11126B8114CD3A6200803C49 /* LexAVS.cxx */; }; | ||
3745 | 17 | 1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1114D6CA1602A951001DC345 /* LexPO.cxx */; }; | ||
3746 | 10 | 114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */; }; | 18 | 114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */; }; |
3747 | 11 | 114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBF11FA7526004FB6AB /* LexAda.cxx */; }; | 19 | 114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBF11FA7526004FB6AB /* LexAda.cxx */; }; |
3748 | 12 | 114B6F0F11FA7526004FB6AB /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */; }; | 20 | 114B6F0F11FA7526004FB6AB /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */; }; |
3749 | @@ -142,7 +150,6 @@ | |||
3750 | 142 | 114B6FD111FA7623004FB6AB /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB611FA7623004FB6AB /* Selection.h */; }; | 150 | 114B6FD111FA7623004FB6AB /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB611FA7623004FB6AB /* Selection.h */; }; |
3751 | 143 | 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB711FA7623004FB6AB /* SplitVector.h */; }; | 151 | 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB711FA7623004FB6AB /* SplitVector.h */; }; |
3752 | 144 | 114B6FD311FA7623004FB6AB /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB811FA7623004FB6AB /* Style.h */; }; | 152 | 114B6FD311FA7623004FB6AB /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB811FA7623004FB6AB /* Style.h */; }; |
3753 | 145 | 114B6FD411FA7623004FB6AB /* SVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB911FA7623004FB6AB /* SVector.h */; }; | ||
3754 | 146 | 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBA11FA7623004FB6AB /* UniConversion.h */; }; | 153 | 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBA11FA7623004FB6AB /* UniConversion.h */; }; |
3755 | 147 | 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBB11FA7623004FB6AB /* ViewStyle.h */; }; | 154 | 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBB11FA7623004FB6AB /* ViewStyle.h */; }; |
3756 | 148 | 114B6FD711FA7623004FB6AB /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBC11FA7623004FB6AB /* XPM.h */; }; | 155 | 114B6FD711FA7623004FB6AB /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBC11FA7623004FB6AB /* XPM.h */; }; |
3757 | @@ -157,9 +164,21 @@ | |||
3758 | 157 | 114B6FEB11FA7645004FB6AB /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE011FA7645004FB6AB /* PropSetSimple.h */; }; | 164 | 114B6FEB11FA7645004FB6AB /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE011FA7645004FB6AB /* PropSetSimple.h */; }; |
3759 | 158 | 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE111FA7645004FB6AB /* StyleContext.h */; }; | 165 | 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE111FA7645004FB6AB /* StyleContext.h */; }; |
3760 | 159 | 114B6FED11FA7645004FB6AB /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE211FA7645004FB6AB /* WordList.h */; }; | 166 | 114B6FED11FA7645004FB6AB /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE211FA7645004FB6AB /* WordList.h */; }; |
3761 | 167 | 1152A77315313E58000D4E1A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A77215313E58000D4E1A /* QuartzCore.framework */; }; | ||
3762 | 168 | 11594BE9155B91DF0099E1FA /* LexOScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11594BE7155B91DF0099E1FA /* LexOScript.cxx */; }; | ||
3763 | 169 | 11594BEA155B91DF0099E1FA /* LexVisualProlog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */; }; | ||
3764 | 170 | 1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1160E0371803651C00BCEBCB /* LexRust.cxx */; }; | ||
3765 | 171 | 117ACE9114A29A1E002876F9 /* LexTCMD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */; }; | ||
3766 | 160 | 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */; }; | 172 | 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */; }; |
3767 | 173 | 11A0A8A1148602DF0018D143 /* LexCoffeeScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */; }; | ||
3768 | 161 | 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */; }; | 174 | 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */; }; |
3769 | 175 | 11BEB6A214EF189600BDE92A /* LexECL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BEB6A114EF189600BDE92A /* LexECL.cxx */; }; | ||
3770 | 162 | 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; }; | 176 | 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; }; |
3771 | 177 | 11FBA39D17817DA00048C071 /* CharacterCategory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */; }; | ||
3772 | 178 | 11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 11FBA39C17817DA00048C071 /* CharacterCategory.h */; }; | ||
3773 | 179 | 11FDAEB7174E1A9800FA161B /* LexSTTXT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */; }; | ||
3774 | 180 | 11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */; }; | ||
3775 | 181 | 11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */; }; | ||
3776 | 163 | 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; | 182 | 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
3777 | 164 | 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; }; | 183 | 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
3778 | 165 | 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; }; | 184 | 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
3779 | @@ -185,6 +204,12 @@ | |||
3780 | 185 | 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; }; | 204 | 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; }; |
3781 | 186 | 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; }; | 205 | 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; }; |
3782 | 187 | 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; }; | 206 | 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; }; |
3783 | 207 | 280056FB188DDD2C00F200AE /* SparseState.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F8188DDD2C00F200AE /* SparseState.h */; }; | ||
3784 | 208 | 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F9188DDD2C00F200AE /* StringCopy.h */; }; | ||
3785 | 209 | 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056FA188DDD2C00F200AE /* SubStyles.h */; }; | ||
3786 | 210 | 28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */; }; | ||
3787 | 211 | 28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */; }; | ||
3788 | 212 | 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */; }; | ||
3789 | 188 | 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; | 213 | 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; |
3790 | 189 | 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; | 214 | 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; |
3791 | 190 | /* End PBXBuildFile section */ | 215 | /* End PBXBuildFile section */ |
3792 | @@ -194,6 +219,14 @@ | |||
3793 | 194 | 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; | 219 | 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; |
3794 | 195 | 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | 220 | 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; |
3795 | 196 | 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; | 221 | 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; |
3796 | 222 | 1100F1E6178E393200105727 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = "<group>"; }; | ||
3797 | 223 | 1100F1E7178E393200105727 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = "<group>"; }; | ||
3798 | 224 | 1100F1E8178E393200105727 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = "<group>"; }; | ||
3799 | 225 | 1100F1E9178E393200105727 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = "<group>"; }; | ||
3800 | 226 | 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnicodeFromUTF8.h; path = ../../src/UnicodeFromUTF8.h; sourceTree = "<group>"; }; | ||
3801 | 227 | 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLaTeX.cxx; path = ../../lexers/LexLaTeX.cxx; sourceTree = "<group>"; }; | ||
3802 | 228 | 11126B8114CD3A6200803C49 /* LexAVS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVS.cxx; path = ../../lexers/LexAVS.cxx; sourceTree = "<group>"; }; | ||
3803 | 229 | 1114D6CA1602A951001DC345 /* LexPO.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPO.cxx; path = ../../lexers/LexPO.cxx; sourceTree = "<group>"; }; | ||
3804 | 197 | 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; }; | 230 | 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; }; |
3805 | 198 | 114B6EBF11FA7526004FB6AB /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = SOURCE_ROOT; }; | 231 | 114B6EBF11FA7526004FB6AB /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = SOURCE_ROOT; }; |
3806 | 199 | 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../lexers/LexAPDL.cxx; sourceTree = SOURCE_ROOT; }; | 232 | 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../lexers/LexAPDL.cxx; sourceTree = SOURCE_ROOT; }; |
3807 | @@ -329,7 +362,6 @@ | |||
3808 | 329 | 114B6FB611FA7623004FB6AB /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; }; | 362 | 114B6FB611FA7623004FB6AB /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; }; |
3809 | 330 | 114B6FB711FA7623004FB6AB /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; }; | 363 | 114B6FB711FA7623004FB6AB /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; }; |
3810 | 331 | 114B6FB811FA7623004FB6AB /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; }; | 364 | 114B6FB811FA7623004FB6AB /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; }; |
3811 | 332 | 114B6FB911FA7623004FB6AB /* SVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVector.h; path = ../../src/SVector.h; sourceTree = SOURCE_ROOT; }; | ||
3812 | 333 | 114B6FBA11FA7623004FB6AB /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; }; | 365 | 114B6FBA11FA7623004FB6AB /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; }; |
3813 | 334 | 114B6FBB11FA7623004FB6AB /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; }; | 366 | 114B6FBB11FA7623004FB6AB /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; }; |
3814 | 335 | 114B6FBC11FA7623004FB6AB /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; }; | 367 | 114B6FBC11FA7623004FB6AB /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; }; |
3815 | @@ -344,9 +376,21 @@ | |||
3816 | 344 | 114B6FE011FA7645004FB6AB /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = SOURCE_ROOT; }; | 376 | 114B6FE011FA7645004FB6AB /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = SOURCE_ROOT; }; |
3817 | 345 | 114B6FE111FA7645004FB6AB /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = SOURCE_ROOT; }; | 377 | 114B6FE111FA7645004FB6AB /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = SOURCE_ROOT; }; |
3818 | 346 | 114B6FE211FA7645004FB6AB /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = SOURCE_ROOT; }; | 378 | 114B6FE211FA7645004FB6AB /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = SOURCE_ROOT; }; |
3819 | 379 | 1152A77215313E58000D4E1A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = ../../../../../../../../System/Library/Frameworks/QuartzCore.framework; sourceTree = "<group>"; }; | ||
3820 | 380 | 11594BE7155B91DF0099E1FA /* LexOScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOScript.cxx; path = ../../lexers/LexOScript.cxx; sourceTree = "<group>"; }; | ||
3821 | 381 | 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVisualProlog.cxx; path = ../../lexers/LexVisualProlog.cxx; sourceTree = "<group>"; }; | ||
3822 | 382 | 1160E0371803651C00BCEBCB /* LexRust.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRust.cxx; path = ../../lexers/LexRust.cxx; sourceTree = "<group>"; }; | ||
3823 | 383 | 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCMD.cxx; path = ../../lexers/LexTCMD.cxx; sourceTree = "<group>"; }; | ||
3824 | 347 | 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; }; | 384 | 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; }; |
3825 | 385 | 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCoffeeScript.cxx; path = ../../lexers/LexCoffeeScript.cxx; sourceTree = "<group>"; }; | ||
3826 | 348 | 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = SOURCE_ROOT; }; | 386 | 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = SOURCE_ROOT; }; |
3827 | 387 | 11BEB6A114EF189600BDE92A /* LexECL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexECL.cxx; path = ../../lexers/LexECL.cxx; sourceTree = "<group>"; }; | ||
3828 | 349 | 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; }; | 388 | 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; }; |
3829 | 389 | 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategory.cxx; path = ../../lexlib/CharacterCategory.cxx; sourceTree = "<group>"; }; | ||
3830 | 390 | 11FBA39C17817DA00048C071 /* CharacterCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategory.h; path = ../../lexlib/CharacterCategory.h; sourceTree = "<group>"; }; | ||
3831 | 391 | 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSTTXT.cxx; path = ../../lexers/LexSTTXT.cxx; sourceTree = "<group>"; }; | ||
3832 | 392 | 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKVIrc.cxx; path = ../../lexers/LexKVIrc.cxx; sourceTree = "<group>"; }; | ||
3833 | 393 | 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMAP.cxx; path = ../../lexers/LexDMAP.cxx; sourceTree = "<group>"; }; | ||
3834 | 350 | 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; }; | 394 | 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; }; |
3835 | 351 | 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; }; | 395 | 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; }; |
3836 | 352 | 2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; }; | 396 | 2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; }; |
3837 | @@ -372,6 +416,12 @@ | |||
3838 | 372 | 27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; }; | 416 | 27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; }; |
3839 | 373 | 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; }; | 417 | 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; }; |
3840 | 374 | 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; }; | 418 | 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; }; |
3841 | 419 | 280056F8188DDD2C00F200AE /* SparseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseState.h; path = ../../lexlib/SparseState.h; sourceTree = "<group>"; }; | ||
3842 | 420 | 280056F9188DDD2C00F200AE /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = "<group>"; }; | ||
3843 | 421 | 280056FA188DDD2C00F200AE /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = "<group>"; }; | ||
3844 | 422 | 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info_bar_bg@2x.png"; sourceTree = "<group>"; }; | ||
3845 | 423 | 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_busy@2x.png"; sourceTree = "<group>"; }; | ||
3846 | 424 | 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_flipped@2x.png"; sourceTree = "<group>"; }; | ||
3847 | 375 | 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; }; | 425 | 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; }; |
3848 | 376 | 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | 426 | 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
3849 | 377 | 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | 427 | 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
3850 | @@ -385,6 +435,7 @@ | |||
3851 | 385 | files = ( | 435 | files = ( |
3852 | 386 | 27CEACF816358CC400DEDFD9 /* QuartzCore.framework in Frameworks */, | 436 | 27CEACF816358CC400DEDFD9 /* QuartzCore.framework in Frameworks */, |
3853 | 387 | 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */, | 437 | 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */, |
3854 | 438 | 1152A77315313E58000D4E1A /* QuartzCore.framework in Frameworks */, | ||
3855 | 388 | ); | 439 | ); |
3856 | 389 | runOnlyForDeploymentPostprocessing = 0; | 440 | runOnlyForDeploymentPostprocessing = 0; |
3857 | 390 | }; | 441 | }; |
3858 | @@ -453,6 +504,7 @@ | |||
3859 | 453 | 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = { | 504 | 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = { |
3860 | 454 | isa = PBXGroup; | 505 | isa = PBXGroup; |
3861 | 455 | children = ( | 506 | children = ( |
3862 | 507 | 1152A77215313E58000D4E1A /* QuartzCore.framework */, | ||
3863 | 456 | 0867D6A5FE840307C02AAC07 /* AppKit.framework */, | 508 | 0867D6A5FE840307C02AAC07 /* AppKit.framework */, |
3864 | 457 | D2F7E79907B2D74100F64583 /* CoreData.framework */, | 509 | D2F7E79907B2D74100F64583 /* CoreData.framework */, |
3865 | 458 | 0867D69BFE84028FC02AAC07 /* Foundation.framework */, | 510 | 0867D69BFE84028FC02AAC07 /* Foundation.framework */, |
3866 | @@ -472,6 +524,7 @@ | |||
3867 | 472 | 2744E47D0FC1674E00E85C33 /* Lexers */ = { | 524 | 2744E47D0FC1674E00E85C33 /* Lexers */ = { |
3868 | 473 | isa = PBXGroup; | 525 | isa = PBXGroup; |
3869 | 474 | children = ( | 526 | children = ( |
3870 | 527 | <<<<<<< TREE | ||
3871 | 475 | 27CEACFA16358CFD00DEDFD9 /* LexAVS.cxx */, | 528 | 27CEACFA16358CFD00DEDFD9 /* LexAVS.cxx */, |
3872 | 476 | 27CEACFB16358CFD00DEDFD9 /* LexCoffeeScript.cxx */, | 529 | 27CEACFB16358CFD00DEDFD9 /* LexCoffeeScript.cxx */, |
3873 | 477 | 27CEACFC16358CFD00DEDFD9 /* LexECL.cxx */, | 530 | 27CEACFC16358CFD00DEDFD9 /* LexECL.cxx */, |
3874 | @@ -480,6 +533,9 @@ | |||
3875 | 480 | 27CEACFF16358CFD00DEDFD9 /* LexTCMD.cxx */, | 533 | 27CEACFF16358CFD00DEDFD9 /* LexTCMD.cxx */, |
3876 | 481 | 27CEAD0016358CFD00DEDFD9 /* LexVisualProlog.cxx */, | 534 | 27CEAD0016358CFD00DEDFD9 /* LexVisualProlog.cxx */, |
3877 | 482 | 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */, | 535 | 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */, |
3878 | 536 | ======= | ||
3879 | 537 | 11126B8114CD3A6200803C49 /* LexAVS.cxx */, | ||
3880 | 538 | >>>>>>> MERGE-SOURCE | ||
3881 | 483 | 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */, | 539 | 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */, |
3882 | 484 | 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */, | 540 | 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */, |
3883 | 485 | 114B6EBF11FA7526004FB6AB /* LexAda.cxx */, | 541 | 114B6EBF11FA7526004FB6AB /* LexAda.cxx */, |
3884 | @@ -497,12 +553,15 @@ | |||
3885 | 497 | 114B6ECB11FA7526004FB6AB /* LexCLW.cxx */, | 553 | 114B6ECB11FA7526004FB6AB /* LexCLW.cxx */, |
3886 | 498 | 114B6ECC11FA7526004FB6AB /* LexCmake.cxx */, | 554 | 114B6ECC11FA7526004FB6AB /* LexCmake.cxx */, |
3887 | 499 | 114B6ECD11FA7526004FB6AB /* LexCOBOL.cxx */, | 555 | 114B6ECD11FA7526004FB6AB /* LexCOBOL.cxx */, |
3888 | 556 | 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */, | ||
3889 | 500 | 114B6ECE11FA7526004FB6AB /* LexConf.cxx */, | 557 | 114B6ECE11FA7526004FB6AB /* LexConf.cxx */, |
3890 | 501 | 114B6ECF11FA7526004FB6AB /* LexCPP.cxx */, | 558 | 114B6ECF11FA7526004FB6AB /* LexCPP.cxx */, |
3891 | 502 | 114B6ED011FA7526004FB6AB /* LexCrontab.cxx */, | 559 | 114B6ED011FA7526004FB6AB /* LexCrontab.cxx */, |
3892 | 503 | 114B6ED111FA7526004FB6AB /* LexCsound.cxx */, | 560 | 114B6ED111FA7526004FB6AB /* LexCsound.cxx */, |
3893 | 504 | 114B6ED211FA7526004FB6AB /* LexCSS.cxx */, | 561 | 114B6ED211FA7526004FB6AB /* LexCSS.cxx */, |
3894 | 505 | 114B6ED311FA7526004FB6AB /* LexD.cxx */, | 562 | 114B6ED311FA7526004FB6AB /* LexD.cxx */, |
3895 | 563 | 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */, | ||
3896 | 564 | 11BEB6A114EF189600BDE92A /* LexECL.cxx */, | ||
3897 | 506 | 114B6ED411FA7526004FB6AB /* LexEiffel.cxx */, | 565 | 114B6ED411FA7526004FB6AB /* LexEiffel.cxx */, |
3898 | 507 | 114B6ED511FA7526004FB6AB /* LexErlang.cxx */, | 566 | 114B6ED511FA7526004FB6AB /* LexErlang.cxx */, |
3899 | 508 | 114B6ED611FA7526004FB6AB /* LexEScript.cxx */, | 567 | 114B6ED611FA7526004FB6AB /* LexEScript.cxx */, |
3900 | @@ -515,6 +574,8 @@ | |||
3901 | 515 | 114B6EDD11FA7526004FB6AB /* LexHTML.cxx */, | 574 | 114B6EDD11FA7526004FB6AB /* LexHTML.cxx */, |
3902 | 516 | 114B6EDE11FA7526004FB6AB /* LexInno.cxx */, | 575 | 114B6EDE11FA7526004FB6AB /* LexInno.cxx */, |
3903 | 517 | 114B6EDF11FA7526004FB6AB /* LexKix.cxx */, | 576 | 114B6EDF11FA7526004FB6AB /* LexKix.cxx */, |
3904 | 577 | 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */, | ||
3905 | 578 | 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */, | ||
3906 | 518 | 114B6EE011FA7526004FB6AB /* LexLisp.cxx */, | 579 | 114B6EE011FA7526004FB6AB /* LexLisp.cxx */, |
3907 | 519 | 114B6EE111FA7526004FB6AB /* LexLout.cxx */, | 580 | 114B6EE111FA7526004FB6AB /* LexLout.cxx */, |
3908 | 520 | 114B6EE211FA7526004FB6AB /* LexLua.cxx */, | 581 | 114B6EE211FA7526004FB6AB /* LexLua.cxx */, |
3909 | @@ -523,17 +584,20 @@ | |||
3910 | 523 | 114B6EE511FA7526004FB6AB /* LexMatlab.cxx */, | 584 | 114B6EE511FA7526004FB6AB /* LexMatlab.cxx */, |
3911 | 524 | 114B6EE611FA7526004FB6AB /* LexMetapost.cxx */, | 585 | 114B6EE611FA7526004FB6AB /* LexMetapost.cxx */, |
3912 | 525 | 114B6EE711FA7526004FB6AB /* LexMMIXAL.cxx */, | 586 | 114B6EE711FA7526004FB6AB /* LexMMIXAL.cxx */, |
3913 | 587 | 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */, | ||
3914 | 526 | 114B6EE811FA7526004FB6AB /* LexMPT.cxx */, | 588 | 114B6EE811FA7526004FB6AB /* LexMPT.cxx */, |
3915 | 527 | 114B6EE911FA7526004FB6AB /* LexMSSQL.cxx */, | 589 | 114B6EE911FA7526004FB6AB /* LexMSSQL.cxx */, |
3916 | 528 | 114B6EEA11FA7526004FB6AB /* LexMySQL.cxx */, | 590 | 114B6EEA11FA7526004FB6AB /* LexMySQL.cxx */, |
3917 | 529 | 114B6EEB11FA7526004FB6AB /* LexNimrod.cxx */, | 591 | 114B6EEB11FA7526004FB6AB /* LexNimrod.cxx */, |
3918 | 530 | 114B6EEC11FA7526004FB6AB /* LexNsis.cxx */, | 592 | 114B6EEC11FA7526004FB6AB /* LexNsis.cxx */, |
3919 | 531 | 114B6EED11FA7526004FB6AB /* LexOpal.cxx */, | 593 | 114B6EED11FA7526004FB6AB /* LexOpal.cxx */, |
3920 | 594 | 11594BE7155B91DF0099E1FA /* LexOScript.cxx */, | ||
3921 | 532 | 114B6EEE11FA7526004FB6AB /* LexOthers.cxx */, | 595 | 114B6EEE11FA7526004FB6AB /* LexOthers.cxx */, |
3922 | 533 | 114B6EEF11FA7526004FB6AB /* LexPascal.cxx */, | 596 | 114B6EEF11FA7526004FB6AB /* LexPascal.cxx */, |
3923 | 534 | 114B6EF011FA7526004FB6AB /* LexPB.cxx */, | 597 | 114B6EF011FA7526004FB6AB /* LexPB.cxx */, |
3924 | 535 | 114B6EF111FA7526004FB6AB /* LexPerl.cxx */, | 598 | 114B6EF111FA7526004FB6AB /* LexPerl.cxx */, |
3925 | 536 | 114B6EF211FA7526004FB6AB /* LexPLM.cxx */, | 599 | 114B6EF211FA7526004FB6AB /* LexPLM.cxx */, |
3926 | 600 | 1114D6CA1602A951001DC345 /* LexPO.cxx */, | ||
3927 | 537 | 114B6EF311FA7526004FB6AB /* LexPOV.cxx */, | 601 | 114B6EF311FA7526004FB6AB /* LexPOV.cxx */, |
3928 | 538 | 114B6EF411FA7526004FB6AB /* LexPowerPro.cxx */, | 602 | 114B6EF411FA7526004FB6AB /* LexPowerPro.cxx */, |
3929 | 539 | 114B6EF511FA7526004FB6AB /* LexPowerShell.cxx */, | 603 | 114B6EF511FA7526004FB6AB /* LexPowerShell.cxx */, |
3930 | @@ -543,6 +607,7 @@ | |||
3931 | 543 | 114B6EF911FA7526004FB6AB /* LexR.cxx */, | 607 | 114B6EF911FA7526004FB6AB /* LexR.cxx */, |
3932 | 544 | 114B6EFA11FA7526004FB6AB /* LexRebol.cxx */, | 608 | 114B6EFA11FA7526004FB6AB /* LexRebol.cxx */, |
3933 | 545 | 114B6EFB11FA7526004FB6AB /* LexRuby.cxx */, | 609 | 114B6EFB11FA7526004FB6AB /* LexRuby.cxx */, |
3934 | 610 | 1160E0371803651C00BCEBCB /* LexRust.cxx */, | ||
3935 | 546 | 114B6EFC11FA7526004FB6AB /* LexScriptol.cxx */, | 611 | 114B6EFC11FA7526004FB6AB /* LexScriptol.cxx */, |
3936 | 547 | 114B6EFD11FA7526004FB6AB /* LexSmalltalk.cxx */, | 612 | 114B6EFD11FA7526004FB6AB /* LexSmalltalk.cxx */, |
3937 | 548 | 114B6EFE11FA7526004FB6AB /* LexSML.cxx */, | 613 | 114B6EFE11FA7526004FB6AB /* LexSML.cxx */, |
3938 | @@ -550,15 +615,18 @@ | |||
3939 | 550 | 114B6F0011FA7526004FB6AB /* LexSpecman.cxx */, | 615 | 114B6F0011FA7526004FB6AB /* LexSpecman.cxx */, |
3940 | 551 | 114B6F0111FA7526004FB6AB /* LexSpice.cxx */, | 616 | 114B6F0111FA7526004FB6AB /* LexSpice.cxx */, |
3941 | 552 | 114B6F0211FA7526004FB6AB /* LexSQL.cxx */, | 617 | 114B6F0211FA7526004FB6AB /* LexSQL.cxx */, |
3942 | 618 | 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */, | ||
3943 | 553 | 114B6F0311FA7526004FB6AB /* LexTACL.cxx */, | 619 | 114B6F0311FA7526004FB6AB /* LexTACL.cxx */, |
3944 | 554 | 114B6F0411FA7526004FB6AB /* LexTADS3.cxx */, | 620 | 114B6F0411FA7526004FB6AB /* LexTADS3.cxx */, |
3945 | 555 | 114B6F0511FA7526004FB6AB /* LexTAL.cxx */, | 621 | 114B6F0511FA7526004FB6AB /* LexTAL.cxx */, |
3946 | 556 | 114B6F0611FA7526004FB6AB /* LexTCL.cxx */, | 622 | 114B6F0611FA7526004FB6AB /* LexTCL.cxx */, |
3947 | 623 | 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */, | ||
3948 | 557 | 114B6F0711FA7526004FB6AB /* LexTeX.cxx */, | 624 | 114B6F0711FA7526004FB6AB /* LexTeX.cxx */, |
3949 | 558 | 114B6F0811FA7526004FB6AB /* LexTxt2tags.cxx */, | 625 | 114B6F0811FA7526004FB6AB /* LexTxt2tags.cxx */, |
3950 | 559 | 114B6F0911FA7526004FB6AB /* LexVB.cxx */, | 626 | 114B6F0911FA7526004FB6AB /* LexVB.cxx */, |
3951 | 560 | 114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */, | 627 | 114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */, |
3952 | 561 | 114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */, | 628 | 114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */, |
3953 | 629 | 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */, | ||
3954 | 562 | 114B6F0C11FA7526004FB6AB /* LexYAML.cxx */, | 630 | 114B6F0C11FA7526004FB6AB /* LexYAML.cxx */, |
3955 | 563 | ); | 631 | ); |
3956 | 564 | name = Lexers; | 632 | name = Lexers; |
3957 | @@ -568,20 +636,14 @@ | |||
3958 | 568 | isa = PBXGroup; | 636 | isa = PBXGroup; |
3959 | 569 | children = ( | 637 | children = ( |
3960 | 570 | 114B6FD811FA7645004FB6AB /* Accessor.h */, | 638 | 114B6FD811FA7645004FB6AB /* Accessor.h */, |
3961 | 571 | 114B6FD911FA7645004FB6AB /* CharacterSet.h */, | ||
3962 | 572 | 114B6FDA11FA7645004FB6AB /* LexAccessor.h */, | ||
3963 | 573 | 114B6FDB11FA7645004FB6AB /* LexerBase.h */, | ||
3964 | 574 | 114B6FDC11FA7645004FB6AB /* LexerModule.h */, | ||
3965 | 575 | 114B6FDD11FA7645004FB6AB /* LexerNoExceptions.h */, | ||
3966 | 576 | 114B6FDE11FA7645004FB6AB /* LexerSimple.h */, | ||
3967 | 577 | 114B6FDF11FA7645004FB6AB /* OptionSet.h */, | ||
3968 | 578 | 114B6FE011FA7645004FB6AB /* PropSetSimple.h */, | ||
3969 | 579 | 114B6FE111FA7645004FB6AB /* StyleContext.h */, | ||
3970 | 580 | 114B6FE211FA7645004FB6AB /* WordList.h */, | ||
3971 | 581 | 114B6FA211FA7623004FB6AB /* AutoComplete.h */, | 639 | 114B6FA211FA7623004FB6AB /* AutoComplete.h */, |
3972 | 582 | 114B6FA311FA7623004FB6AB /* CallTip.h */, | 640 | 114B6FA311FA7623004FB6AB /* CallTip.h */, |
3973 | 641 | 1100F1E7178E393200105727 /* CaseConvert.h */, | ||
3974 | 642 | 1100F1E9178E393200105727 /* CaseFolder.h */, | ||
3975 | 583 | 114B6FA411FA7623004FB6AB /* Catalogue.h */, | 643 | 114B6FA411FA7623004FB6AB /* Catalogue.h */, |
3976 | 584 | 114B6FA511FA7623004FB6AB /* CellBuffer.h */, | 644 | 114B6FA511FA7623004FB6AB /* CellBuffer.h */, |
3977 | 645 | 11FBA39C17817DA00048C071 /* CharacterCategory.h */, | ||
3978 | 646 | 114B6FD911FA7645004FB6AB /* CharacterSet.h */, | ||
3979 | 585 | 114B6FA611FA7623004FB6AB /* CharClassify.h */, | 647 | 114B6FA611FA7623004FB6AB /* CharClassify.h */, |
3980 | 586 | 114B6FA711FA7623004FB6AB /* ContractionState.h */, | 648 | 114B6FA711FA7623004FB6AB /* ContractionState.h */, |
3981 | 587 | 114B6FA811FA7623004FB6AB /* Decoration.h */, | 649 | 114B6FA811FA7623004FB6AB /* Decoration.h */, |
3982 | @@ -589,23 +651,35 @@ | |||
3983 | 589 | 114B6FAA11FA7623004FB6AB /* Editor.h */, | 651 | 114B6FAA11FA7623004FB6AB /* Editor.h */, |
3984 | 590 | 114B6FAB11FA7623004FB6AB /* ExternalLexer.h */, | 652 | 114B6FAB11FA7623004FB6AB /* ExternalLexer.h */, |
3985 | 591 | 114B6FAC11FA7623004FB6AB /* FontQuality.h */, | 653 | 114B6FAC11FA7623004FB6AB /* FontQuality.h */, |
3986 | 654 | 114B6FA011FA75DB004FB6AB /* ILexer.h */, | ||
3987 | 592 | 114B6FAD11FA7623004FB6AB /* Indicator.h */, | 655 | 114B6FAD11FA7623004FB6AB /* Indicator.h */, |
3988 | 593 | 114B6FAE11FA7623004FB6AB /* KeyMap.h */, | 656 | 114B6FAE11FA7623004FB6AB /* KeyMap.h */, |
3989 | 657 | 114B6FDA11FA7645004FB6AB /* LexAccessor.h */, | ||
3990 | 658 | 114B6FDB11FA7645004FB6AB /* LexerBase.h */, | ||
3991 | 659 | 114B6FDC11FA7645004FB6AB /* LexerModule.h */, | ||
3992 | 660 | 114B6FDD11FA7645004FB6AB /* LexerNoExceptions.h */, | ||
3993 | 661 | 114B6FDE11FA7645004FB6AB /* LexerSimple.h */, | ||
3994 | 594 | 114B6FAF11FA7623004FB6AB /* LineMarker.h */, | 662 | 114B6FAF11FA7623004FB6AB /* LineMarker.h */, |
3995 | 663 | 114B6FDF11FA7645004FB6AB /* OptionSet.h */, | ||
3996 | 595 | 114B6FB011FA7623004FB6AB /* Partitioning.h */, | 664 | 114B6FB011FA7623004FB6AB /* Partitioning.h */, |
3997 | 596 | 114B6FB111FA7623004FB6AB /* PerLine.h */, | 665 | 114B6FB111FA7623004FB6AB /* PerLine.h */, |
3998 | 597 | 114B6FB211FA7623004FB6AB /* PositionCache.h */, | 666 | 114B6FB211FA7623004FB6AB /* PositionCache.h */, |
3999 | 667 | 114B6FE011FA7645004FB6AB /* PropSetSimple.h */, | ||
4000 | 598 | 114B6FB311FA7623004FB6AB /* RESearch.h */, | 668 | 114B6FB311FA7623004FB6AB /* RESearch.h */, |
4001 | 599 | 114B6FB411FA7623004FB6AB /* RunStyles.h */, | 669 | 114B6FB411FA7623004FB6AB /* RunStyles.h */, |
4002 | 600 | 114B6FB511FA7623004FB6AB /* ScintillaBase.h */, | 670 | 114B6FB511FA7623004FB6AB /* ScintillaBase.h */, |
4003 | 601 | 114B6FB611FA7623004FB6AB /* Selection.h */, | 671 | 114B6FB611FA7623004FB6AB /* Selection.h */, |
4004 | 672 | 280056F8188DDD2C00F200AE /* SparseState.h */, | ||
4005 | 602 | 114B6FB711FA7623004FB6AB /* SplitVector.h */, | 673 | 114B6FB711FA7623004FB6AB /* SplitVector.h */, |
4006 | 674 | 280056F9188DDD2C00F200AE /* StringCopy.h */, | ||
4007 | 603 | 114B6FB811FA7623004FB6AB /* Style.h */, | 675 | 114B6FB811FA7623004FB6AB /* Style.h */, |
4009 | 604 | 114B6FB911FA7623004FB6AB /* SVector.h */, | 676 | 114B6FE111FA7645004FB6AB /* StyleContext.h */, |
4010 | 677 | 280056FA188DDD2C00F200AE /* SubStyles.h */, | ||
4011 | 678 | 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */, | ||
4012 | 605 | 114B6FBA11FA7623004FB6AB /* UniConversion.h */, | 679 | 114B6FBA11FA7623004FB6AB /* UniConversion.h */, |
4013 | 606 | 114B6FBB11FA7623004FB6AB /* ViewStyle.h */, | 680 | 114B6FBB11FA7623004FB6AB /* ViewStyle.h */, |
4014 | 681 | 114B6FE211FA7645004FB6AB /* WordList.h */, | ||
4015 | 607 | 114B6FBC11FA7623004FB6AB /* XPM.h */, | 682 | 114B6FBC11FA7623004FB6AB /* XPM.h */, |
4016 | 608 | 114B6FA011FA75DB004FB6AB /* ILexer.h */, | ||
4017 | 609 | ); | 683 | ); |
4018 | 610 | name = "Header Files"; | 684 | name = "Header Files"; |
4019 | 611 | sourceTree = "<group>"; | 685 | sourceTree = "<group>"; |
4020 | @@ -614,18 +688,14 @@ | |||
4021 | 614 | isa = PBXGroup; | 688 | isa = PBXGroup; |
4022 | 615 | children = ( | 689 | children = ( |
4023 | 616 | 114B6F8E11FA75BE004FB6AB /* Accessor.cxx */, | 690 | 114B6F8E11FA75BE004FB6AB /* Accessor.cxx */, |
4024 | 617 | 114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */, | ||
4025 | 618 | 114B6F9011FA75BE004FB6AB /* LexerBase.cxx */, | ||
4026 | 619 | 114B6F9111FA75BE004FB6AB /* LexerModule.cxx */, | ||
4027 | 620 | 114B6F9211FA75BE004FB6AB /* LexerNoExceptions.cxx */, | ||
4028 | 621 | 114B6F9311FA75BE004FB6AB /* LexerSimple.cxx */, | ||
4029 | 622 | 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */, | ||
4030 | 623 | 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */, | ||
4031 | 624 | 114B6F9611FA75BE004FB6AB /* WordList.cxx */, | ||
4032 | 625 | 114B6F6011FA7597004FB6AB /* AutoComplete.cxx */, | 691 | 114B6F6011FA7597004FB6AB /* AutoComplete.cxx */, |
4033 | 626 | 114B6F6111FA7597004FB6AB /* CallTip.cxx */, | 692 | 114B6F6111FA7597004FB6AB /* CallTip.cxx */, |
4034 | 693 | 1100F1E6178E393200105727 /* CaseConvert.cxx */, | ||
4035 | 694 | 1100F1E8178E393200105727 /* CaseFolder.cxx */, | ||
4036 | 627 | 114B6F6211FA7597004FB6AB /* Catalogue.cxx */, | 695 | 114B6F6211FA7597004FB6AB /* Catalogue.cxx */, |
4037 | 628 | 114B6F6311FA7597004FB6AB /* CellBuffer.cxx */, | 696 | 114B6F6311FA7597004FB6AB /* CellBuffer.cxx */, |
4038 | 697 | 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */, | ||
4039 | 698 | 114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */, | ||
4040 | 629 | 114B6F6411FA7597004FB6AB /* CharClassify.cxx */, | 699 | 114B6F6411FA7597004FB6AB /* CharClassify.cxx */, |
4041 | 630 | 114B6F6511FA7597004FB6AB /* ContractionState.cxx */, | 700 | 114B6F6511FA7597004FB6AB /* ContractionState.cxx */, |
4042 | 631 | 114B6F6611FA7597004FB6AB /* Decoration.cxx */, | 701 | 114B6F6611FA7597004FB6AB /* Decoration.cxx */, |
4043 | @@ -634,16 +704,23 @@ | |||
4044 | 634 | 114B6F6911FA7598004FB6AB /* ExternalLexer.cxx */, | 704 | 114B6F6911FA7598004FB6AB /* ExternalLexer.cxx */, |
4045 | 635 | 114B6F6A11FA7598004FB6AB /* Indicator.cxx */, | 705 | 114B6F6A11FA7598004FB6AB /* Indicator.cxx */, |
4046 | 636 | 114B6F6B11FA7598004FB6AB /* KeyMap.cxx */, | 706 | 114B6F6B11FA7598004FB6AB /* KeyMap.cxx */, |
4047 | 707 | 114B6F9011FA75BE004FB6AB /* LexerBase.cxx */, | ||
4048 | 708 | 114B6F9111FA75BE004FB6AB /* LexerModule.cxx */, | ||
4049 | 709 | 114B6F9211FA75BE004FB6AB /* LexerNoExceptions.cxx */, | ||
4050 | 710 | 114B6F9311FA75BE004FB6AB /* LexerSimple.cxx */, | ||
4051 | 637 | 114B6F6C11FA7598004FB6AB /* LineMarker.cxx */, | 711 | 114B6F6C11FA7598004FB6AB /* LineMarker.cxx */, |
4052 | 638 | 114B6F6D11FA7598004FB6AB /* PerLine.cxx */, | 712 | 114B6F6D11FA7598004FB6AB /* PerLine.cxx */, |
4053 | 639 | 114B6F6E11FA7598004FB6AB /* PositionCache.cxx */, | 713 | 114B6F6E11FA7598004FB6AB /* PositionCache.cxx */, |
4054 | 714 | 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */, | ||
4055 | 640 | 114B6F6F11FA7598004FB6AB /* RESearch.cxx */, | 715 | 114B6F6F11FA7598004FB6AB /* RESearch.cxx */, |
4056 | 641 | 114B6F7011FA7598004FB6AB /* RunStyles.cxx */, | 716 | 114B6F7011FA7598004FB6AB /* RunStyles.cxx */, |
4057 | 642 | 114B6F7111FA7598004FB6AB /* ScintillaBase.cxx */, | 717 | 114B6F7111FA7598004FB6AB /* ScintillaBase.cxx */, |
4058 | 643 | 114B6F7211FA7598004FB6AB /* Selection.cxx */, | 718 | 114B6F7211FA7598004FB6AB /* Selection.cxx */, |
4059 | 644 | 114B6F7311FA7598004FB6AB /* Style.cxx */, | 719 | 114B6F7311FA7598004FB6AB /* Style.cxx */, |
4060 | 720 | 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */, | ||
4061 | 645 | 114B6F7411FA7598004FB6AB /* UniConversion.cxx */, | 721 | 114B6F7411FA7598004FB6AB /* UniConversion.cxx */, |
4062 | 646 | 114B6F7511FA7598004FB6AB /* ViewStyle.cxx */, | 722 | 114B6F7511FA7598004FB6AB /* ViewStyle.cxx */, |
4063 | 723 | 114B6F9611FA75BE004FB6AB /* WordList.cxx */, | ||
4064 | 647 | 114B6F7611FA7598004FB6AB /* XPM.cxx */, | 724 | 114B6F7611FA7598004FB6AB /* XPM.cxx */, |
4065 | 648 | ); | 725 | ); |
4066 | 649 | name = "Source Files"; | 726 | name = "Source Files"; |
4067 | @@ -681,6 +758,9 @@ | |||
4068 | 681 | 27FEF4500FC1B413005E115A /* res */ = { | 758 | 27FEF4500FC1B413005E115A /* res */ = { |
4069 | 682 | isa = PBXGroup; | 759 | isa = PBXGroup; |
4070 | 683 | children = ( | 760 | children = ( |
4071 | 761 | 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */, | ||
4072 | 762 | 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */, | ||
4073 | 763 | 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */, | ||
4074 | 684 | 27FEF4510FC1B413005E115A /* info_bar_bg.png */, | 764 | 27FEF4510FC1B413005E115A /* info_bar_bg.png */, |
4075 | 685 | 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */, | 765 | 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */, |
4076 | 686 | 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */, | 766 | 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */, |
4077 | @@ -712,6 +792,7 @@ | |||
4078 | 712 | 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */, | 792 | 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */, |
4079 | 713 | 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */, | 793 | 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */, |
4080 | 714 | 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */, | 794 | 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */, |
4081 | 795 | 280056FB188DDD2C00F200AE /* SparseState.h in Headers */, | ||
4082 | 715 | 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */, | 796 | 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */, |
4083 | 716 | 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */, | 797 | 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */, |
4084 | 717 | 114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */, | 798 | 114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */, |
4085 | @@ -734,11 +815,12 @@ | |||
4086 | 734 | 114B6FCD11FA7623004FB6AB /* PositionCache.h in Headers */, | 815 | 114B6FCD11FA7623004FB6AB /* PositionCache.h in Headers */, |
4087 | 735 | 114B6FCE11FA7623004FB6AB /* RESearch.h in Headers */, | 816 | 114B6FCE11FA7623004FB6AB /* RESearch.h in Headers */, |
4088 | 736 | 114B6FCF11FA7623004FB6AB /* RunStyles.h in Headers */, | 817 | 114B6FCF11FA7623004FB6AB /* RunStyles.h in Headers */, |
4089 | 818 | 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */, | ||
4090 | 737 | 114B6FD011FA7623004FB6AB /* ScintillaBase.h in Headers */, | 819 | 114B6FD011FA7623004FB6AB /* ScintillaBase.h in Headers */, |
4091 | 738 | 114B6FD111FA7623004FB6AB /* Selection.h in Headers */, | 820 | 114B6FD111FA7623004FB6AB /* Selection.h in Headers */, |
4092 | 739 | 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */, | 821 | 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */, |
4093 | 740 | 114B6FD311FA7623004FB6AB /* Style.h in Headers */, | 822 | 114B6FD311FA7623004FB6AB /* Style.h in Headers */, |
4095 | 741 | 114B6FD411FA7623004FB6AB /* SVector.h in Headers */, | 823 | 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */, |
4096 | 742 | 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */, | 824 | 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */, |
4097 | 743 | 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */, | 825 | 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */, |
4098 | 744 | 114B6FD711FA7623004FB6AB /* XPM.h in Headers */, | 826 | 114B6FD711FA7623004FB6AB /* XPM.h in Headers */, |
4099 | @@ -754,6 +836,10 @@ | |||
4100 | 754 | 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */, | 836 | 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */, |
4101 | 755 | 114B6FED11FA7645004FB6AB /* WordList.h in Headers */, | 837 | 114B6FED11FA7645004FB6AB /* WordList.h in Headers */, |
4102 | 756 | 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */, | 838 | 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */, |
4103 | 839 | 11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */, | ||
4104 | 840 | 1100F1EC178E393200105727 /* CaseConvert.h in Headers */, | ||
4105 | 841 | 1100F1EE178E393200105727 /* CaseFolder.h in Headers */, | ||
4106 | 842 | 1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */, | ||
4107 | 757 | ); | 843 | ); |
4108 | 758 | runOnlyForDeploymentPostprocessing = 0; | 844 | runOnlyForDeploymentPostprocessing = 0; |
4109 | 759 | }; | 845 | }; |
4110 | @@ -785,7 +871,11 @@ | |||
4111 | 785 | 0867D690FE84028FC02AAC07 /* Project object */ = { | 871 | 0867D690FE84028FC02AAC07 /* Project object */ = { |
4112 | 786 | isa = PBXProject; | 872 | isa = PBXProject; |
4113 | 787 | attributes = { | 873 | attributes = { |
4114 | 874 | <<<<<<< TREE | ||
4115 | 788 | LastUpgradeCheck = 0440; | 875 | LastUpgradeCheck = 0440; |
4116 | 876 | ======= | ||
4117 | 877 | LastUpgradeCheck = 0500; | ||
4118 | 878 | >>>>>>> MERGE-SOURCE | ||
4119 | 789 | }; | 879 | }; |
4120 | 790 | buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */; | 880 | buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */; |
4121 | 791 | compatibilityVersion = "Xcode 3.2"; | 881 | compatibilityVersion = "Xcode 3.2"; |
4122 | @@ -814,8 +904,11 @@ | |||
4123 | 814 | files = ( | 904 | files = ( |
4124 | 815 | 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */, | 905 | 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */, |
4125 | 816 | 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */, | 906 | 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */, |
4126 | 907 | 28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */, | ||
4127 | 908 | 28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */, | ||
4128 | 817 | 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */, | 909 | 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */, |
4129 | 818 | 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */, | 910 | 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */, |
4130 | 911 | 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */, | ||
4131 | 819 | ); | 912 | ); |
4132 | 820 | runOnlyForDeploymentPostprocessing = 0; | 913 | runOnlyForDeploymentPostprocessing = 0; |
4133 | 821 | }; | 914 | }; |
4134 | @@ -943,6 +1036,7 @@ | |||
4135 | 943 | 114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */, | 1036 | 114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */, |
4136 | 944 | 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */, | 1037 | 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */, |
4137 | 945 | 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */, | 1038 | 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */, |
4138 | 1039 | <<<<<<< TREE | ||
4139 | 946 | 27CEAD0116358CFD00DEDFD9 /* LexAVS.cxx in Sources */, | 1040 | 27CEAD0116358CFD00DEDFD9 /* LexAVS.cxx in Sources */, |
4140 | 947 | 27CEAD0216358CFD00DEDFD9 /* LexCoffeeScript.cxx in Sources */, | 1041 | 27CEAD0216358CFD00DEDFD9 /* LexCoffeeScript.cxx in Sources */, |
4141 | 948 | 27CEAD0316358CFD00DEDFD9 /* LexECL.cxx in Sources */, | 1042 | 27CEAD0316358CFD00DEDFD9 /* LexECL.cxx in Sources */, |
4142 | @@ -950,6 +1044,23 @@ | |||
4143 | 950 | 27CEAD0516358CFD00DEDFD9 /* LexPO.cxx in Sources */, | 1044 | 27CEAD0516358CFD00DEDFD9 /* LexPO.cxx in Sources */, |
4144 | 951 | 27CEAD0616358CFD00DEDFD9 /* LexTCMD.cxx in Sources */, | 1045 | 27CEAD0616358CFD00DEDFD9 /* LexTCMD.cxx in Sources */, |
4145 | 952 | 27CEAD0716358CFD00DEDFD9 /* LexVisualProlog.cxx in Sources */, | 1046 | 27CEAD0716358CFD00DEDFD9 /* LexVisualProlog.cxx in Sources */, |
4146 | 1047 | ======= | ||
4147 | 1048 | 11A0A8A1148602DF0018D143 /* LexCoffeeScript.cxx in Sources */, | ||
4148 | 1049 | 117ACE9114A29A1E002876F9 /* LexTCMD.cxx in Sources */, | ||
4149 | 1050 | 11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */, | ||
4150 | 1051 | 11BEB6A214EF189600BDE92A /* LexECL.cxx in Sources */, | ||
4151 | 1052 | 11594BE9155B91DF0099E1FA /* LexOScript.cxx in Sources */, | ||
4152 | 1053 | 11594BEA155B91DF0099E1FA /* LexVisualProlog.cxx in Sources */, | ||
4153 | 1054 | 1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */, | ||
4154 | 1055 | 1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */, | ||
4155 | 1056 | 11FDAEB7174E1A9800FA161B /* LexSTTXT.cxx in Sources */, | ||
4156 | 1057 | 11FBA39D17817DA00048C071 /* CharacterCategory.cxx in Sources */, | ||
4157 | 1058 | 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */, | ||
4158 | 1059 | 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */, | ||
4159 | 1060 | 11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */, | ||
4160 | 1061 | 1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */, | ||
4161 | 1062 | 11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */, | ||
4162 | 1063 | >>>>>>> MERGE-SOURCE | ||
4163 | 953 | ); | 1064 | ); |
4164 | 954 | runOnlyForDeploymentPostprocessing = 0; | 1065 | runOnlyForDeploymentPostprocessing = 0; |
4165 | 955 | }; | 1066 | }; |
4166 | @@ -971,8 +1082,12 @@ | |||
4167 | 971 | isa = XCBuildConfiguration; | 1082 | isa = XCBuildConfiguration; |
4168 | 972 | buildSettings = { | 1083 | buildSettings = { |
4169 | 973 | ALWAYS_SEARCH_USER_PATHS = NO; | 1084 | ALWAYS_SEARCH_USER_PATHS = NO; |
4170 | 1085 | <<<<<<< TREE | ||
4171 | 974 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | 1086 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
4172 | 975 | COMBINE_HIDPI_IMAGES = YES; | 1087 | COMBINE_HIDPI_IMAGES = YES; |
4173 | 1088 | ======= | ||
4174 | 1089 | COMBINE_HIDPI_IMAGES = YES; | ||
4175 | 1090 | >>>>>>> MERGE-SOURCE | ||
4176 | 976 | COPY_PHASE_STRIP = NO; | 1091 | COPY_PHASE_STRIP = NO; |
4177 | 977 | DYLIB_COMPATIBILITY_VERSION = 1; | 1092 | DYLIB_COMPATIBILITY_VERSION = 1; |
4178 | 978 | DYLIB_CURRENT_VERSION = 1; | 1093 | DYLIB_CURRENT_VERSION = 1; |
4179 | @@ -987,7 +1102,10 @@ | |||
4180 | 987 | SCI_NAMESPACE, | 1102 | SCI_NAMESPACE, |
4181 | 988 | SCI_LEXER, | 1103 | SCI_LEXER, |
4182 | 989 | ); | 1104 | ); |
4183 | 1105 | <<<<<<< TREE | ||
4184 | 990 | GCC_VERSION = ""; | 1106 | GCC_VERSION = ""; |
4185 | 1107 | ======= | ||
4186 | 1108 | >>>>>>> MERGE-SOURCE | ||
4187 | 991 | GCC_WARN_UNINITIALIZED_AUTOS = NO; | 1109 | GCC_WARN_UNINITIALIZED_AUTOS = NO; |
4188 | 992 | GCC_WARN_UNKNOWN_PRAGMAS = YES; | 1110 | GCC_WARN_UNKNOWN_PRAGMAS = YES; |
4189 | 993 | GCC_WARN_UNUSED_FUNCTION = YES; | 1111 | GCC_WARN_UNUSED_FUNCTION = YES; |
4190 | @@ -996,7 +1114,11 @@ | |||
4191 | 996 | INSTALL_PATH = "@executable_path/../Frameworks"; | 1114 | INSTALL_PATH = "@executable_path/../Frameworks"; |
4192 | 997 | MACOSX_DEPLOYMENT_TARGET = 10.5; | 1115 | MACOSX_DEPLOYMENT_TARGET = 10.5; |
4193 | 998 | PRODUCT_NAME = Scintilla; | 1116 | PRODUCT_NAME = Scintilla; |
4194 | 1117 | <<<<<<< TREE | ||
4195 | 999 | SDKROOT = ""; | 1118 | SDKROOT = ""; |
4196 | 1119 | ======= | ||
4197 | 1120 | SKIP_INSTALL = YES; | ||
4198 | 1121 | >>>>>>> MERGE-SOURCE | ||
4199 | 1000 | WRAPPER_EXTENSION = framework; | 1122 | WRAPPER_EXTENSION = framework; |
4200 | 1001 | }; | 1123 | }; |
4201 | 1002 | name = Debug; | 1124 | name = Debug; |
4202 | @@ -1005,8 +1127,12 @@ | |||
4203 | 1005 | isa = XCBuildConfiguration; | 1127 | isa = XCBuildConfiguration; |
4204 | 1006 | buildSettings = { | 1128 | buildSettings = { |
4205 | 1007 | ALWAYS_SEARCH_USER_PATHS = NO; | 1129 | ALWAYS_SEARCH_USER_PATHS = NO; |
4206 | 1130 | <<<<<<< TREE | ||
4207 | 1008 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | 1131 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
4208 | 1009 | COMBINE_HIDPI_IMAGES = YES; | 1132 | COMBINE_HIDPI_IMAGES = YES; |
4209 | 1133 | ======= | ||
4210 | 1134 | COMBINE_HIDPI_IMAGES = YES; | ||
4211 | 1135 | >>>>>>> MERGE-SOURCE | ||
4212 | 1010 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | 1136 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
4213 | 1011 | DYLIB_COMPATIBILITY_VERSION = 1; | 1137 | DYLIB_COMPATIBILITY_VERSION = 1; |
4214 | 1012 | DYLIB_CURRENT_VERSION = 1; | 1138 | DYLIB_CURRENT_VERSION = 1; |
4215 | @@ -1018,8 +1144,12 @@ | |||
4216 | 1018 | SCI_NAMESPACE, | 1144 | SCI_NAMESPACE, |
4217 | 1019 | SCI_LEXER, | 1145 | SCI_LEXER, |
4218 | 1020 | ); | 1146 | ); |
4219 | 1147 | <<<<<<< TREE | ||
4220 | 1021 | GCC_VERSION = ""; | 1148 | GCC_VERSION = ""; |
4221 | 1022 | GCC_WARN_UNINITIALIZED_AUTOS = YES; | 1149 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
4222 | 1150 | ======= | ||
4223 | 1151 | GCC_WARN_UNINITIALIZED_AUTOS = NO; | ||
4224 | 1152 | >>>>>>> MERGE-SOURCE | ||
4225 | 1023 | GCC_WARN_UNKNOWN_PRAGMAS = YES; | 1153 | GCC_WARN_UNKNOWN_PRAGMAS = YES; |
4226 | 1024 | GCC_WARN_UNUSED_FUNCTION = YES; | 1154 | GCC_WARN_UNUSED_FUNCTION = YES; |
4227 | 1025 | GCC_WARN_UNUSED_LABEL = YES; | 1155 | GCC_WARN_UNUSED_LABEL = YES; |
4228 | @@ -1027,7 +1157,11 @@ | |||
4229 | 1027 | INSTALL_PATH = "@executable_path/../Frameworks"; | 1157 | INSTALL_PATH = "@executable_path/../Frameworks"; |
4230 | 1028 | MACOSX_DEPLOYMENT_TARGET = 10.5; | 1158 | MACOSX_DEPLOYMENT_TARGET = 10.5; |
4231 | 1029 | PRODUCT_NAME = Scintilla; | 1159 | PRODUCT_NAME = Scintilla; |
4232 | 1160 | <<<<<<< TREE | ||
4233 | 1030 | SDKROOT = ""; | 1161 | SDKROOT = ""; |
4234 | 1162 | ======= | ||
4235 | 1163 | SKIP_INSTALL = YES; | ||
4236 | 1164 | >>>>>>> MERGE-SOURCE | ||
4237 | 1031 | WRAPPER_EXTENSION = framework; | 1165 | WRAPPER_EXTENSION = framework; |
4238 | 1032 | }; | 1166 | }; |
4239 | 1033 | name = Release; | 1167 | name = Release; |
4240 | @@ -1035,7 +1169,8 @@ | |||
4241 | 1035 | 1DEB91B208733DA50010E9CD /* Debug */ = { | 1169 | 1DEB91B208733DA50010E9CD /* Debug */ = { |
4242 | 1036 | isa = XCBuildConfiguration; | 1170 | isa = XCBuildConfiguration; |
4243 | 1037 | buildSettings = { | 1171 | buildSettings = { |
4245 | 1038 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; | 1172 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
4246 | 1173 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; | ||
4247 | 1039 | GCC_C_LANGUAGE_STANDARD = c99; | 1174 | GCC_C_LANGUAGE_STANDARD = c99; |
4248 | 1040 | GCC_OPTIMIZATION_LEVEL = 0; | 1175 | GCC_OPTIMIZATION_LEVEL = 0; |
4249 | 1041 | GCC_WARN_ABOUT_RETURN_TYPE = YES; | 1176 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
4250 | @@ -1045,15 +1180,22 @@ | |||
4251 | 1045 | ../../src, | 1180 | ../../src, |
4252 | 1046 | ../../lexlib, | 1181 | ../../lexlib, |
4253 | 1047 | ); | 1182 | ); |
4254 | 1183 | <<<<<<< TREE | ||
4255 | 1048 | MACOSX_DEPLOYMENT_TARGET = 10.5; | 1184 | MACOSX_DEPLOYMENT_TARGET = 10.5; |
4256 | 1049 | SKIP_INSTALL = YES; | 1185 | SKIP_INSTALL = YES; |
4257 | 1186 | ======= | ||
4258 | 1187 | MACOSX_DEPLOYMENT_TARGET = 10.5; | ||
4259 | 1188 | ONLY_ACTIVE_ARCH = YES; | ||
4260 | 1189 | SDKROOT = macosx; | ||
4261 | 1190 | >>>>>>> MERGE-SOURCE | ||
4262 | 1050 | }; | 1191 | }; |
4263 | 1051 | name = Debug; | 1192 | name = Debug; |
4264 | 1052 | }; | 1193 | }; |
4265 | 1053 | 1DEB91B308733DA50010E9CD /* Release */ = { | 1194 | 1DEB91B308733DA50010E9CD /* Release */ = { |
4266 | 1054 | isa = XCBuildConfiguration; | 1195 | isa = XCBuildConfiguration; |
4267 | 1055 | buildSettings = { | 1196 | buildSettings = { |
4269 | 1056 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; | 1197 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
4270 | 1198 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; | ||
4271 | 1057 | GCC_C_LANGUAGE_STANDARD = c99; | 1199 | GCC_C_LANGUAGE_STANDARD = c99; |
4272 | 1058 | GCC_WARN_ABOUT_RETURN_TYPE = YES; | 1200 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
4273 | 1059 | GCC_WARN_UNUSED_VARIABLE = YES; | 1201 | GCC_WARN_UNUSED_VARIABLE = YES; |
4274 | @@ -1062,8 +1204,13 @@ | |||
4275 | 1062 | ../../src, | 1204 | ../../src, |
4276 | 1063 | ../../lexlib, | 1205 | ../../lexlib, |
4277 | 1064 | ); | 1206 | ); |
4278 | 1207 | <<<<<<< TREE | ||
4279 | 1065 | MACOSX_DEPLOYMENT_TARGET = 10.5; | 1208 | MACOSX_DEPLOYMENT_TARGET = 10.5; |
4280 | 1066 | SKIP_INSTALL = YES; | 1209 | SKIP_INSTALL = YES; |
4281 | 1210 | ======= | ||
4282 | 1211 | MACOSX_DEPLOYMENT_TARGET = 10.5; | ||
4283 | 1212 | SDKROOT = macosx; | ||
4284 | 1213 | >>>>>>> MERGE-SOURCE | ||
4285 | 1067 | }; | 1214 | }; |
4286 | 1068 | name = Release; | 1215 | name = Release; |
4287 | 1069 | }; | 1216 | }; |
4288 | 1070 | 1217 | ||
4289 | === modified file 'cocoa/ScintillaTest/AppController.mm' | |||
4290 | --- cocoa/ScintillaTest/AppController.mm 2012-10-26 08:56:06 +0000 | |||
4291 | +++ cocoa/ScintillaTest/AppController.mm 2014-01-24 04:00:28 +0000 | |||
4292 | @@ -261,6 +261,7 @@ | |||
4293 | 261 | matchCase: NO | 261 | matchCase: NO |
4294 | 262 | wholeWord: NO | 262 | wholeWord: NO |
4295 | 263 | scrollTo: YES | 263 | scrollTo: YES |
4296 | 264 | <<<<<<< TREE | ||
4297 | 264 | wrap: YES | 265 | wrap: YES |
4298 | 265 | backwards: NO]; | 266 | backwards: NO]; |
4299 | 266 | 267 | ||
4300 | @@ -268,10 +269,23 @@ | |||
4301 | 268 | long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0]; | 269 | long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0]; |
4302 | 269 | [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd]; | 270 | [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd]; |
4303 | 270 | 271 | ||
4304 | 272 | ======= | ||
4305 | 273 | wrap: YES]; | ||
4306 | 274 | |||
4307 | 275 | long matchStart = [mEditor getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0]; | ||
4308 | 276 | long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0]; | ||
4309 | 277 | [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd]; | ||
4310 | 278 | |||
4311 | 279 | >>>>>>> MERGE-SOURCE | ||
4312 | 271 | if ([[searchField stringValue] isEqualToString: @"XX"]) | 280 | if ([[searchField stringValue] isEqualToString: @"XX"]) |
4313 | 272 | [self showAutocompletion]; | 281 | [self showAutocompletion]; |
4314 | 273 | } | 282 | } |
4315 | 274 | 283 | ||
4316 | 284 | -(IBAction) setFontQuality: (id) sender | ||
4317 | 285 | { | ||
4318 | 286 | [ScintillaView directCall:mEditor message:SCI_SETFONTQUALITY wParam:[sender tag] lParam:0]; | ||
4319 | 287 | } | ||
4320 | 288 | |||
4321 | 275 | @end | 289 | @end |
4322 | 276 | 290 | ||
4323 | 277 | //-------------------------------------------------------------------------------------------------- | 291 | //-------------------------------------------------------------------------------------------------- |
4324 | 278 | 292 | ||
4325 | === modified file 'cocoa/ScintillaTest/English.lproj/MainMenu.xib' | |||
4326 | --- cocoa/ScintillaTest/English.lproj/MainMenu.xib 2010-05-09 16:49:06 +0000 | |||
4327 | +++ cocoa/ScintillaTest/English.lproj/MainMenu.xib 2014-01-24 04:00:28 +0000 | |||
4328 | @@ -856,6 +856,56 @@ | |||
4329 | 856 | </object> | 856 | </object> |
4330 | 857 | </object> | 857 | </object> |
4331 | 858 | </object> | 858 | </object> |
4332 | 859 | <object class="NSMenuItem" id="693549040"> | ||
4333 | 860 | <reference key="NSMenu" ref="786677654"/> | ||
4334 | 861 | <string key="NSTitle">Font Quality</string> | ||
4335 | 862 | <string key="NSKeyEquiv"/> | ||
4336 | 863 | <int key="NSMnemonicLoc">2147483647</int> | ||
4337 | 864 | <reference key="NSOnImage" ref="35465992"/> | ||
4338 | 865 | <reference key="NSMixedImage" ref="502551668"/> | ||
4339 | 866 | <string key="NSAction">submenuAction:</string> | ||
4340 | 867 | <object class="NSMenu" key="NSSubmenu" id="129955363"> | ||
4341 | 868 | <string key="NSTitle">Font Quality</string> | ||
4342 | 869 | <object class="NSMutableArray" key="NSMenuItems"> | ||
4343 | 870 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
4344 | 871 | <object class="NSMenuItem" id="746486634"> | ||
4345 | 872 | <reference key="NSMenu" ref="129955363"/> | ||
4346 | 873 | <string key="NSTitle">Default</string> | ||
4347 | 874 | <string key="NSKeyEquiv"/> | ||
4348 | 875 | <int key="NSMnemonicLoc">2147483647</int> | ||
4349 | 876 | <reference key="NSOnImage" ref="35465992"/> | ||
4350 | 877 | <reference key="NSMixedImage" ref="502551668"/> | ||
4351 | 878 | </object> | ||
4352 | 879 | <object class="NSMenuItem" id="693037100"> | ||
4353 | 880 | <reference key="NSMenu" ref="129955363"/> | ||
4354 | 881 | <string key="NSTitle">Non-antialiased</string> | ||
4355 | 882 | <string key="NSKeyEquiv"/> | ||
4356 | 883 | <int key="NSMnemonicLoc">2147483647</int> | ||
4357 | 884 | <reference key="NSOnImage" ref="35465992"/> | ||
4358 | 885 | <reference key="NSMixedImage" ref="502551668"/> | ||
4359 | 886 | <int key="NSTag">1</int> | ||
4360 | 887 | </object> | ||
4361 | 888 | <object class="NSMenuItem" id="863119271"> | ||
4362 | 889 | <reference key="NSMenu" ref="129955363"/> | ||
4363 | 890 | <string key="NSTitle">Antialiased</string> | ||
4364 | 891 | <string key="NSKeyEquiv"/> | ||
4365 | 892 | <int key="NSMnemonicLoc">2147483647</int> | ||
4366 | 893 | <reference key="NSOnImage" ref="35465992"/> | ||
4367 | 894 | <reference key="NSMixedImage" ref="502551668"/> | ||
4368 | 895 | <int key="NSTag">2</int> | ||
4369 | 896 | </object> | ||
4370 | 897 | <object class="NSMenuItem" id="1060624593"> | ||
4371 | 898 | <reference key="NSMenu" ref="129955363"/> | ||
4372 | 899 | <string key="NSTitle">LCD Optimized</string> | ||
4373 | 900 | <string key="NSKeyEquiv"/> | ||
4374 | 901 | <int key="NSMnemonicLoc">2147483647</int> | ||
4375 | 902 | <reference key="NSOnImage" ref="35465992"/> | ||
4376 | 903 | <reference key="NSMixedImage" ref="502551668"/> | ||
4377 | 904 | <int key="NSTag">3</int> | ||
4378 | 905 | </object> | ||
4379 | 906 | </object> | ||
4380 | 907 | </object> | ||
4381 | 908 | </object> | ||
4382 | 859 | <object class="NSMenuItem" id="739652853"> | 909 | <object class="NSMenuItem" id="739652853"> |
4383 | 860 | <reference key="NSMenu" ref="786677654"/> | 910 | <reference key="NSMenu" ref="786677654"/> |
4384 | 861 | <bool key="NSIsDisabled">YES</bool> | 911 | <bool key="NSIsDisabled">YES</bool> |
4385 | @@ -1833,6 +1883,38 @@ | |||
4386 | 1833 | </object> | 1883 | </object> |
4387 | 1834 | <int key="connectionID">468</int> | 1884 | <int key="connectionID">468</int> |
4388 | 1835 | </object> | 1885 | </object> |
4389 | 1886 | <object class="IBConnectionRecord"> | ||
4390 | 1887 | <object class="IBActionConnection" key="connection"> | ||
4391 | 1888 | <string key="label">setFontQuality:</string> | ||
4392 | 1889 | <reference key="source" ref="229445039"/> | ||
4393 | 1890 | <reference key="destination" ref="746486634"/> | ||
4394 | 1891 | </object> | ||
4395 | 1892 | <int key="connectionID">475</int> | ||
4396 | 1893 | </object> | ||
4397 | 1894 | <object class="IBConnectionRecord"> | ||
4398 | 1895 | <object class="IBActionConnection" key="connection"> | ||
4399 | 1896 | <string key="label">setFontQuality:</string> | ||
4400 | 1897 | <reference key="source" ref="229445039"/> | ||
4401 | 1898 | <reference key="destination" ref="693037100"/> | ||
4402 | 1899 | </object> | ||
4403 | 1900 | <int key="connectionID">476</int> | ||
4404 | 1901 | </object> | ||
4405 | 1902 | <object class="IBConnectionRecord"> | ||
4406 | 1903 | <object class="IBActionConnection" key="connection"> | ||
4407 | 1904 | <string key="label">setFontQuality:</string> | ||
4408 | 1905 | <reference key="source" ref="229445039"/> | ||
4409 | 1906 | <reference key="destination" ref="863119271"/> | ||
4410 | 1907 | </object> | ||
4411 | 1908 | <int key="connectionID">477</int> | ||
4412 | 1909 | </object> | ||
4413 | 1910 | <object class="IBConnectionRecord"> | ||
4414 | 1911 | <object class="IBActionConnection" key="connection"> | ||
4415 | 1912 | <string key="label">setFontQuality:</string> | ||
4416 | 1913 | <reference key="source" ref="229445039"/> | ||
4417 | 1914 | <reference key="destination" ref="1060624593"/> | ||
4418 | 1915 | </object> | ||
4419 | 1916 | <int key="connectionID">478</int> | ||
4420 | 1917 | </object> | ||
4421 | 1836 | </object> | 1918 | </object> |
4422 | 1837 | <object class="IBMutableOrderedSet" key="objectRecords"> | 1919 | <object class="IBMutableOrderedSet" key="objectRecords"> |
4423 | 1838 | <object class="NSArray" key="orderedObjects"> | 1920 | <object class="NSArray" key="orderedObjects"> |
4424 | @@ -2537,6 +2619,7 @@ | |||
4425 | 2537 | <reference ref="214559597"/> | 2619 | <reference ref="214559597"/> |
4426 | 2538 | <reference ref="596732606"/> | 2620 | <reference ref="596732606"/> |
4427 | 2539 | <reference ref="393423671"/> | 2621 | <reference ref="393423671"/> |
4428 | 2622 | <reference ref="693549040"/> | ||
4429 | 2540 | </object> | 2623 | </object> |
4430 | 2541 | <reference key="parent" ref="792887677"/> | 2624 | <reference key="parent" ref="792887677"/> |
4431 | 2542 | </object> | 2625 | </object> |
4432 | @@ -2771,6 +2854,47 @@ | |||
4433 | 2771 | <reference key="object" ref="515024530"/> | 2854 | <reference key="object" ref="515024530"/> |
4434 | 2772 | <reference key="parent" ref="552917647"/> | 2855 | <reference key="parent" ref="552917647"/> |
4435 | 2773 | </object> | 2856 | </object> |
4436 | 2857 | <object class="IBObjectRecord"> | ||
4437 | 2858 | <int key="objectID">469</int> | ||
4438 | 2859 | <reference key="object" ref="693549040"/> | ||
4439 | 2860 | <object class="NSMutableArray" key="children"> | ||
4440 | 2861 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
4441 | 2862 | <reference ref="129955363"/> | ||
4442 | 2863 | </object> | ||
4443 | 2864 | <reference key="parent" ref="786677654"/> | ||
4444 | 2865 | </object> | ||
4445 | 2866 | <object class="IBObjectRecord"> | ||
4446 | 2867 | <int key="objectID">470</int> | ||
4447 | 2868 | <reference key="object" ref="129955363"/> | ||
4448 | 2869 | <object class="NSMutableArray" key="children"> | ||
4449 | 2870 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
4450 | 2871 | <reference ref="746486634"/> | ||
4451 | 2872 | <reference ref="693037100"/> | ||
4452 | 2873 | <reference ref="863119271"/> | ||
4453 | 2874 | <reference ref="1060624593"/> | ||
4454 | 2875 | </object> | ||
4455 | 2876 | <reference key="parent" ref="693549040"/> | ||
4456 | 2877 | </object> | ||
4457 | 2878 | <object class="IBObjectRecord"> | ||
4458 | 2879 | <int key="objectID">471</int> | ||
4459 | 2880 | <reference key="object" ref="746486634"/> | ||
4460 | 2881 | <reference key="parent" ref="129955363"/> | ||
4461 | 2882 | </object> | ||
4462 | 2883 | <object class="IBObjectRecord"> | ||
4463 | 2884 | <int key="objectID">472</int> | ||
4464 | 2885 | <reference key="object" ref="693037100"/> | ||
4465 | 2886 | <reference key="parent" ref="129955363"/> | ||
4466 | 2887 | </object> | ||
4467 | 2888 | <object class="IBObjectRecord"> | ||
4468 | 2889 | <int key="objectID">473</int> | ||
4469 | 2890 | <reference key="object" ref="863119271"/> | ||
4470 | 2891 | <reference key="parent" ref="129955363"/> | ||
4471 | 2892 | </object> | ||
4472 | 2893 | <object class="IBObjectRecord"> | ||
4473 | 2894 | <int key="objectID">474</int> | ||
4474 | 2895 | <reference key="object" ref="1060624593"/> | ||
4475 | 2896 | <reference key="parent" ref="129955363"/> | ||
4476 | 2897 | </object> | ||
4477 | 2774 | </object> | 2898 | </object> |
4478 | 2775 | </object> | 2899 | </object> |
4479 | 2776 | <object class="NSMutableDictionary" key="flattenedProperties"> | 2900 | <object class="NSMutableDictionary" key="flattenedProperties"> |
4480 | 2777 | 2901 | ||
4481 | === modified file 'cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj' | |||
4482 | --- cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj 2012-10-26 08:56:06 +0000 | |||
4483 | +++ cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj 2014-01-24 04:00:28 +0000 | |||
4484 | @@ -191,7 +191,11 @@ | |||
4485 | 191 | 29B97313FDCFA39411CA2CEA /* Project object */ = { | 191 | 29B97313FDCFA39411CA2CEA /* Project object */ = { |
4486 | 192 | isa = PBXProject; | 192 | isa = PBXProject; |
4487 | 193 | attributes = { | 193 | attributes = { |
4488 | 194 | <<<<<<< TREE | ||
4489 | 194 | LastUpgradeCheck = 0440; | 195 | LastUpgradeCheck = 0440; |
4490 | 196 | ======= | ||
4491 | 197 | LastUpgradeCheck = 0450; | ||
4492 | 198 | >>>>>>> MERGE-SOURCE | ||
4493 | 195 | }; | 199 | }; |
4494 | 196 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */; | 200 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */; |
4495 | 197 | compatibilityVersion = "Xcode 3.2"; | 201 | compatibilityVersion = "Xcode 3.2"; |
4496 | @@ -304,6 +308,7 @@ | |||
4497 | 304 | LIBRARY_SEARCH_PATHS = "$(inherited)"; | 308 | LIBRARY_SEARCH_PATHS = "$(inherited)"; |
4498 | 305 | OTHER_LDFLAGS = ""; | 309 | OTHER_LDFLAGS = ""; |
4499 | 306 | PRODUCT_NAME = ScintillaTest; | 310 | PRODUCT_NAME = ScintillaTest; |
4500 | 311 | SDKROOT = macosx; | ||
4501 | 307 | USER_HEADER_SEARCH_PATHS = ""; | 312 | USER_HEADER_SEARCH_PATHS = ""; |
4502 | 308 | }; | 313 | }; |
4503 | 309 | name = Debug; | 314 | name = Debug; |
4504 | @@ -330,6 +335,7 @@ | |||
4505 | 330 | ONLY_ACTIVE_ARCH = YES; | 335 | ONLY_ACTIVE_ARCH = YES; |
4506 | 331 | OTHER_LDFLAGS = ""; | 336 | OTHER_LDFLAGS = ""; |
4507 | 332 | PRODUCT_NAME = ScintillaTest; | 337 | PRODUCT_NAME = ScintillaTest; |
4508 | 338 | SDKROOT = macosx; | ||
4509 | 333 | USER_HEADER_SEARCH_PATHS = ""; | 339 | USER_HEADER_SEARCH_PATHS = ""; |
4510 | 334 | }; | 340 | }; |
4511 | 335 | name = Release; | 341 | name = Release; |
4512 | @@ -340,12 +346,17 @@ | |||
4513 | 340 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | 346 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
4514 | 341 | GCC_C_LANGUAGE_STANDARD = c99; | 347 | GCC_C_LANGUAGE_STANDARD = c99; |
4515 | 342 | GCC_OPTIMIZATION_LEVEL = 0; | 348 | GCC_OPTIMIZATION_LEVEL = 0; |
4516 | 349 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; | ||
4517 | 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES; | 350 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
4518 | 344 | GCC_WARN_UNUSED_VARIABLE = YES; | 351 | GCC_WARN_UNUSED_VARIABLE = YES; |
4519 | 345 | MACOSX_DEPLOYMENT_TARGET = 10.5; | 352 | MACOSX_DEPLOYMENT_TARGET = 10.5; |
4520 | 346 | ONLY_ACTIVE_ARCH = YES; | 353 | ONLY_ACTIVE_ARCH = YES; |
4521 | 347 | OTHER_LDFLAGS = ""; | 354 | OTHER_LDFLAGS = ""; |
4522 | 355 | <<<<<<< TREE | ||
4523 | 348 | SDKROOT = ""; | 356 | SDKROOT = ""; |
4524 | 357 | ======= | ||
4525 | 358 | SDKROOT = macosx; | ||
4526 | 359 | >>>>>>> MERGE-SOURCE | ||
4527 | 349 | }; | 360 | }; |
4528 | 350 | name = Debug; | 361 | name = Debug; |
4529 | 351 | }; | 362 | }; |
4530 | @@ -354,12 +365,17 @@ | |||
4531 | 354 | buildSettings = { | 365 | buildSettings = { |
4532 | 355 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | 366 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
4533 | 356 | GCC_C_LANGUAGE_STANDARD = c99; | 367 | GCC_C_LANGUAGE_STANDARD = c99; |
4534 | 368 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; | ||
4535 | 357 | GCC_WARN_ABOUT_RETURN_TYPE = YES; | 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
4536 | 358 | GCC_WARN_UNUSED_VARIABLE = YES; | 370 | GCC_WARN_UNUSED_VARIABLE = YES; |
4537 | 359 | MACOSX_DEPLOYMENT_TARGET = 10.5; | 371 | MACOSX_DEPLOYMENT_TARGET = 10.5; |
4538 | 360 | ONLY_ACTIVE_ARCH = YES; | 372 | ONLY_ACTIVE_ARCH = YES; |
4539 | 361 | OTHER_LDFLAGS = ""; | 373 | OTHER_LDFLAGS = ""; |
4540 | 374 | <<<<<<< TREE | ||
4541 | 362 | SDKROOT = ""; | 375 | SDKROOT = ""; |
4542 | 376 | ======= | ||
4543 | 377 | SDKROOT = macosx; | ||
4544 | 378 | >>>>>>> MERGE-SOURCE | ||
4545 | 363 | }; | 379 | }; |
4546 | 364 | name = Release; | 380 | name = Release; |
4547 | 365 | }; | 381 | }; |
4548 | 366 | 382 | ||
4549 | === modified file 'cocoa/ScintillaView.h' | |||
4550 | --- cocoa/ScintillaView.h 2013-01-21 11:10:24 +0000 | |||
4551 | +++ cocoa/ScintillaView.h 2014-01-24 04:00:28 +0000 | |||
4552 | @@ -11,15 +11,38 @@ | |||
4553 | 11 | 11 | ||
4554 | 12 | #import <Cocoa/Cocoa.h> | 12 | #import <Cocoa/Cocoa.h> |
4555 | 13 | 13 | ||
4556 | 14 | #import "Platform.h" | ||
4557 | 15 | #import "Scintilla.h" | 14 | #import "Scintilla.h" |
4558 | 16 | #import "SciLexer.h" | 15 | #import "SciLexer.h" |
4559 | 17 | 16 | ||
4560 | 18 | #import "InfoBarCommunicator.h" | 17 | #import "InfoBarCommunicator.h" |
4562 | 19 | #import "ScintillaCocoa.h" | 18 | |
4563 | 19 | /** | ||
4564 | 20 | * Scintilla sends these two messages to the notify handler. Please refer | ||
4565 | 21 | * to the Windows API doc for details about the message format. | ||
4566 | 22 | */ | ||
4567 | 23 | #define WM_COMMAND 1001 | ||
4568 | 24 | #define WM_NOTIFY 1002 | ||
4569 | 25 | |||
4570 | 26 | namespace Scintilla { | ||
4571 | 27 | /** | ||
4572 | 28 | * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent | ||
4573 | 29 | * back to the parent. Therefore, there must be a callback handler that acts | ||
4574 | 30 | * like a Windows WndProc, where Scintilla can send notifications to. Use | ||
4575 | 31 | * ScintillaView registerNotifyCallback() to register such a handler. | ||
4576 | 32 | * Message format is: | ||
4577 | 33 | * <br> | ||
4578 | 34 | * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = control ID, lParam = ScintillaCocoa* | ||
4579 | 35 | * <br> | ||
4580 | 36 | * WM_NOTIFY: wParam = control ID, lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa* | ||
4581 | 37 | */ | ||
4582 | 38 | typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam); | ||
4583 | 39 | |||
4584 | 40 | class ScintillaCocoa; | ||
4585 | 41 | } | ||
4586 | 20 | 42 | ||
4587 | 21 | @class ScintillaView; | 43 | @class ScintillaView; |
4588 | 22 | 44 | ||
4589 | 45 | <<<<<<< TREE | ||
4590 | 23 | extern NSString *SCIUpdateUINotification; | 46 | extern NSString *SCIUpdateUINotification; |
4591 | 24 | 47 | ||
4592 | 25 | @protocol ScintillaNotificationProtocol | 48 | @protocol ScintillaNotificationProtocol |
4593 | @@ -28,9 +51,37 @@ | |||
4594 | 28 | 51 | ||
4595 | 29 | /** | 52 | /** |
4596 | 30 | * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and | 53 | * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and |
4597 | 54 | ======= | ||
4598 | 55 | extern NSString *const SCIUpdateUINotification; | ||
4599 | 56 | |||
4600 | 57 | @protocol ScintillaNotificationProtocol | ||
4601 | 58 | - (void)notification: (Scintilla::SCNotification*)notification; | ||
4602 | 59 | @end | ||
4603 | 60 | |||
4604 | 61 | /** | ||
4605 | 62 | * SCIMarginView draws line numbers and other margins next to the text view. | ||
4606 | 63 | */ | ||
4607 | 64 | @interface SCIMarginView : NSRulerView | ||
4608 | 65 | { | ||
4609 | 66 | @private | ||
4610 | 67 | int marginWidth; | ||
4611 | 68 | ScintillaView *owner; | ||
4612 | 69 | NSMutableArray *currentCursors; | ||
4613 | 70 | } | ||
4614 | 71 | |||
4615 | 72 | @property (assign) int marginWidth; | ||
4616 | 73 | @property (assign) ScintillaView *owner; | ||
4617 | 74 | |||
4618 | 75 | - (id)initWithScrollView:(NSScrollView *)aScrollView; | ||
4619 | 76 | |||
4620 | 77 | @end | ||
4621 | 78 | |||
4622 | 79 | /** | ||
4623 | 80 | * SCIContentView is the Cocoa interface to the Scintilla backend. It handles text input and | ||
4624 | 81 | >>>>>>> MERGE-SOURCE | ||
4625 | 31 | * provides a canvas for painting the output. | 82 | * provides a canvas for painting the output. |
4626 | 32 | */ | 83 | */ |
4628 | 33 | @interface InnerView : NSView <NSTextInput> | 84 | @interface SCIContentView : NSView <NSTextInputClient, NSUserInterfaceValidations> |
4629 | 34 | { | 85 | { |
4630 | 35 | @private | 86 | @private |
4631 | 36 | ScintillaView* mOwner; | 87 | ScintillaView* mOwner; |
4632 | @@ -42,28 +93,31 @@ | |||
4633 | 42 | BOOL undoCollectionWasActive; | 93 | BOOL undoCollectionWasActive; |
4634 | 43 | } | 94 | } |
4635 | 44 | 95 | ||
4636 | 96 | <<<<<<< TREE | ||
4637 | 45 | @property (nonatomic, assign) ScintillaView* owner; | 97 | @property (nonatomic, assign) ScintillaView* owner; |
4638 | 46 | 98 | ||
4639 | 47 | - (void) dealloc; | 99 | - (void) dealloc; |
4640 | 100 | ======= | ||
4641 | 101 | @property (nonatomic, assign) ScintillaView* owner; | ||
4642 | 102 | |||
4643 | 103 | >>>>>>> MERGE-SOURCE | ||
4644 | 48 | - (void) removeMarkedText; | 104 | - (void) removeMarkedText; |
4646 | 49 | - (void) setCursor: (Scintilla::Window::Cursor) cursor; | 105 | - (void) setCursor: (int) cursor; |
4647 | 50 | 106 | ||
4648 | 51 | - (BOOL) canUndo; | 107 | - (BOOL) canUndo; |
4649 | 52 | - (BOOL) canRedo; | 108 | - (BOOL) canRedo; |
4650 | 53 | 109 | ||
4651 | 54 | @end | 110 | @end |
4652 | 55 | 111 | ||
4654 | 56 | @interface ScintillaView : NSView <InfoBarCommunicator> | 112 | @interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol> |
4655 | 57 | { | 113 | { |
4656 | 58 | @private | 114 | @private |
4657 | 59 | // The back end is kind of a controller and model in one. | 115 | // The back end is kind of a controller and model in one. |
4658 | 60 | // It uses the content view for display. | 116 | // It uses the content view for display. |
4659 | 61 | Scintilla::ScintillaCocoa* mBackend; | 117 | Scintilla::ScintillaCocoa* mBackend; |
4664 | 62 | 118 | ||
4661 | 63 | // The object (eg NSDocument) that controls the ScintillaView. | ||
4662 | 64 | NSObject* mOwner; | ||
4663 | 65 | |||
4665 | 66 | // This is the actual content to which the backend renders itself. | 119 | // This is the actual content to which the backend renders itself. |
4666 | 120 | <<<<<<< TREE | ||
4667 | 67 | InnerView* mContent; | 121 | InnerView* mContent; |
4668 | 68 | 122 | ||
4669 | 69 | NSScroller* mHorizontalScroller; | 123 | NSScroller* mHorizontalScroller; |
4670 | @@ -71,20 +125,44 @@ | |||
4671 | 71 | 125 | ||
4672 | 72 | CGFloat zoomDelta; | 126 | CGFloat zoomDelta; |
4673 | 73 | 127 | ||
4674 | 128 | ======= | ||
4675 | 129 | SCIContentView* mContent; | ||
4676 | 130 | |||
4677 | 131 | NSScrollView *scrollView; | ||
4678 | 132 | SCIMarginView *marginView; | ||
4679 | 133 | |||
4680 | 134 | CGFloat zoomDelta; | ||
4681 | 135 | |||
4682 | 136 | >>>>>>> MERGE-SOURCE | ||
4683 | 74 | // Area to display additional controls (e.g. zoom info, caret position, status info). | 137 | // Area to display additional controls (e.g. zoom info, caret position, status info). |
4684 | 75 | NSView <InfoBarCommunicator>* mInfoBar; | 138 | NSView <InfoBarCommunicator>* mInfoBar; |
4685 | 76 | BOOL mInfoBarAtTop; | 139 | BOOL mInfoBarAtTop; |
4686 | 140 | <<<<<<< TREE | ||
4687 | 77 | int mInitialInfoBarWidth; | 141 | int mInitialInfoBarWidth; |
4688 | 78 | 142 | ||
4689 | 79 | id<ScintillaNotificationProtocol> mDelegate; | 143 | id<ScintillaNotificationProtocol> mDelegate; |
4690 | 144 | ======= | ||
4691 | 145 | |||
4692 | 146 | id<ScintillaNotificationProtocol> mDelegate; | ||
4693 | 147 | >>>>>>> MERGE-SOURCE | ||
4694 | 80 | } | 148 | } |
4695 | 81 | 149 | ||
4696 | 150 | <<<<<<< TREE | ||
4697 | 82 | @property (nonatomic, assign) Scintilla::ScintillaCocoa* backend; | 151 | @property (nonatomic, assign) Scintilla::ScintillaCocoa* backend; |
4698 | 83 | @property (nonatomic, assign) NSObject* owner; | 152 | @property (nonatomic, assign) NSObject* owner; |
4699 | 84 | @property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate; | 153 | @property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate; |
4700 | 85 | 154 | ||
4701 | 86 | - (void) dealloc; | 155 | - (void) dealloc; |
4702 | 87 | - (void) positionSubViews; | 156 | - (void) positionSubViews; |
4703 | 157 | ======= | ||
4704 | 158 | @property (nonatomic, readonly) Scintilla::ScintillaCocoa* backend; | ||
4705 | 159 | @property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate; | ||
4706 | 160 | @property (nonatomic, readonly) NSScrollView *scrollView; | ||
4707 | 161 | |||
4708 | 162 | + (Class) contentViewClass; | ||
4709 | 163 | |||
4710 | 164 | - (void) positionSubViews; | ||
4711 | 165 | >>>>>>> MERGE-SOURCE | ||
4712 | 88 | 166 | ||
4713 | 89 | - (void) sendNotification: (NSString*) notificationName; | 167 | - (void) sendNotification: (NSString*) notificationName; |
4714 | 90 | - (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location | 168 | - (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location |
4715 | @@ -92,15 +170,13 @@ | |||
4716 | 92 | - (void) setCallback: (id <InfoBarCommunicator>) callback; | 170 | - (void) setCallback: (id <InfoBarCommunicator>) callback; |
4717 | 93 | 171 | ||
4718 | 94 | - (void) suspendDrawing: (BOOL) suspend; | 172 | - (void) suspendDrawing: (BOOL) suspend; |
4719 | 173 | - (void) notification: (Scintilla::SCNotification*) notification; | ||
4720 | 95 | 174 | ||
4721 | 96 | // Scroller handling | 175 | // Scroller handling |
4727 | 97 | - (BOOL) setVerticalScrollRange: (int) range page: (int) page; | 176 | - (void) setMarginWidth: (int) width; |
4723 | 98 | - (void) setVerticalScrollPosition: (float) position; | ||
4724 | 99 | - (BOOL) setHorizontalScrollRange: (int) range page: (int) page; | ||
4725 | 100 | - (void) setHorizontalScrollPosition: (float) position; | ||
4726 | 101 | |||
4728 | 102 | - (void) scrollerAction: (id) sender; | 177 | - (void) scrollerAction: (id) sender; |
4730 | 103 | - (InnerView*) content; | 178 | - (SCIContentView*) content; |
4731 | 179 | - (void) updateMarginCursors; | ||
4732 | 104 | 180 | ||
4733 | 105 | // NSTextView compatibility layer. | 181 | // NSTextView compatibility layer. |
4734 | 106 | - (NSString*) string; | 182 | - (NSString*) string; |
4735 | @@ -120,6 +196,9 @@ | |||
4736 | 120 | // Native call through to the backend. | 196 | // Native call through to the backend. |
4737 | 121 | + (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam | 197 | + (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam |
4738 | 122 | lParam: (sptr_t) lParam; | 198 | lParam: (sptr_t) lParam; |
4739 | 199 | - (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam lParam: (sptr_t) lParam; | ||
4740 | 200 | - (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam; | ||
4741 | 201 | - (sptr_t) message: (unsigned int) message; | ||
4742 | 123 | 202 | ||
4743 | 124 | // Back end properties getters and setters. | 203 | // Back end properties getters and setters. |
4744 | 125 | - (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value; | 204 | - (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value; |
4745 | @@ -139,8 +218,14 @@ | |||
4746 | 139 | - (void) setLexerProperty: (NSString*) name value: (NSString*) value; | 218 | - (void) setLexerProperty: (NSString*) name value: (NSString*) value; |
4747 | 140 | - (NSString*) getLexerProperty: (NSString*) name; | 219 | - (NSString*) getLexerProperty: (NSString*) name; |
4748 | 141 | 220 | ||
4751 | 142 | - (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback; | 221 | <<<<<<< TREE |
4752 | 143 | 222 | - (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback; | |
4753 | 223 | |||
4754 | 224 | ======= | ||
4755 | 225 | // The delegate property should be used instead of registerNotifyCallback which will be deprecated. | ||
4756 | 226 | - (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback; | ||
4757 | 227 | |||
4758 | 228 | >>>>>>> MERGE-SOURCE | ||
4759 | 144 | - (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top; | 229 | - (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top; |
4760 | 145 | - (void) setStatusText: (NSString*) text; | 230 | - (void) setStatusText: (NSString*) text; |
4761 | 146 | 231 | ||
4762 | 147 | 232 | ||
4763 | === modified file 'cocoa/ScintillaView.mm' | |||
4764 | --- cocoa/ScintillaView.mm 2013-01-21 11:10:24 +0000 | |||
4765 | +++ cocoa/ScintillaView.mm 2014-01-24 04:00:28 +0000 | |||
4766 | @@ -9,7 +9,9 @@ | |||
4767 | 9 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). | 9 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). |
4768 | 10 | */ | 10 | */ |
4769 | 11 | 11 | ||
4770 | 12 | #import "Platform.h" | ||
4771 | 12 | #import "ScintillaView.h" | 13 | #import "ScintillaView.h" |
4772 | 14 | #import "ScintillaCocoa.h" | ||
4773 | 13 | 15 | ||
4774 | 14 | using namespace Scintilla; | 16 | using namespace Scintilla; |
4775 | 15 | 17 | ||
4776 | @@ -20,29 +22,162 @@ | |||
4777 | 20 | // The scintilla indicator used for keyboard input. | 22 | // The scintilla indicator used for keyboard input. |
4778 | 21 | #define INPUT_INDICATOR INDIC_MAX - 1 | 23 | #define INPUT_INDICATOR INDIC_MAX - 1 |
4779 | 22 | 24 | ||
4780 | 25 | <<<<<<< TREE | ||
4781 | 23 | NSString *SCIUpdateUINotification = @"SCIUpdateUI"; | 26 | NSString *SCIUpdateUINotification = @"SCIUpdateUI"; |
4782 | 24 | 27 | ||
4783 | 25 | @implementation InnerView | 28 | @implementation InnerView |
4784 | 29 | ======= | ||
4785 | 30 | NSString *const SCIUpdateUINotification = @"SCIUpdateUI"; | ||
4786 | 31 | |||
4787 | 32 | /** | ||
4788 | 33 | * Provide an NSCursor object that matches the Window::Cursor enumeration. | ||
4789 | 34 | */ | ||
4790 | 35 | static NSCursor *cursorFromEnum(Window::Cursor cursor) | ||
4791 | 36 | { | ||
4792 | 37 | switch (cursor) | ||
4793 | 38 | { | ||
4794 | 39 | case Window::cursorText: | ||
4795 | 40 | return [NSCursor IBeamCursor]; | ||
4796 | 41 | case Window::cursorArrow: | ||
4797 | 42 | return [NSCursor arrowCursor]; | ||
4798 | 43 | case Window::cursorWait: | ||
4799 | 44 | return waitCursor; | ||
4800 | 45 | case Window::cursorHoriz: | ||
4801 | 46 | return [NSCursor resizeLeftRightCursor]; | ||
4802 | 47 | case Window::cursorVert: | ||
4803 | 48 | return [NSCursor resizeUpDownCursor]; | ||
4804 | 49 | case Window::cursorReverseArrow: | ||
4805 | 50 | return reverseArrowCursor; | ||
4806 | 51 | case Window::cursorUp: | ||
4807 | 52 | default: | ||
4808 | 53 | return [NSCursor arrowCursor]; | ||
4809 | 54 | } | ||
4810 | 55 | } | ||
4811 | 56 | |||
4812 | 57 | |||
4813 | 58 | @implementation SCIMarginView | ||
4814 | 59 | |||
4815 | 60 | @synthesize marginWidth, owner; | ||
4816 | 61 | |||
4817 | 62 | - (id)initWithScrollView:(NSScrollView *)aScrollView | ||
4818 | 63 | { | ||
4819 | 64 | self = [super initWithScrollView:aScrollView orientation:NSVerticalRuler]; | ||
4820 | 65 | if (self != nil) | ||
4821 | 66 | { | ||
4822 | 67 | owner = nil; | ||
4823 | 68 | marginWidth = 20; | ||
4824 | 69 | currentCursors = [[NSMutableArray arrayWithCapacity:0] retain]; | ||
4825 | 70 | for (size_t i=0; i<5; i++) | ||
4826 | 71 | { | ||
4827 | 72 | [currentCursors addObject: [reverseArrowCursor retain]]; | ||
4828 | 73 | } | ||
4829 | 74 | [self setClientView:[aScrollView documentView]]; | ||
4830 | 75 | } | ||
4831 | 76 | return self; | ||
4832 | 77 | } | ||
4833 | 78 | |||
4834 | 79 | - (void) dealloc | ||
4835 | 80 | { | ||
4836 | 81 | [currentCursors release]; | ||
4837 | 82 | [super dealloc]; | ||
4838 | 83 | } | ||
4839 | 84 | |||
4840 | 85 | - (void) setFrame: (NSRect) frame | ||
4841 | 86 | { | ||
4842 | 87 | [super setFrame: frame]; | ||
4843 | 88 | |||
4844 | 89 | [[self window] invalidateCursorRectsForView: self]; | ||
4845 | 90 | } | ||
4846 | 91 | |||
4847 | 92 | - (CGFloat)requiredThickness | ||
4848 | 93 | { | ||
4849 | 94 | return marginWidth; | ||
4850 | 95 | } | ||
4851 | 96 | |||
4852 | 97 | - (void)drawHashMarksAndLabelsInRect:(NSRect)aRect | ||
4853 | 98 | { | ||
4854 | 99 | if (owner) { | ||
4855 | 100 | NSRect contentRect = [[[self scrollView] contentView] bounds]; | ||
4856 | 101 | NSRect marginRect = [self bounds]; | ||
4857 | 102 | // Ensure paint to bottom of view to avoid glitches | ||
4858 | 103 | if (marginRect.size.height > contentRect.size.height) { | ||
4859 | 104 | // Legacy scroll bar mode leaves a poorly painted corner | ||
4860 | 105 | aRect = marginRect; | ||
4861 | 106 | } | ||
4862 | 107 | owner.backend->PaintMargin(aRect); | ||
4863 | 108 | } | ||
4864 | 109 | } | ||
4865 | 110 | |||
4866 | 111 | - (void) mouseDown: (NSEvent *) theEvent | ||
4867 | 112 | { | ||
4868 | 113 | NSClipView *textView = [[self scrollView] contentView]; | ||
4869 | 114 | [[textView window] makeFirstResponder:textView]; | ||
4870 | 115 | owner.backend->MouseDown(theEvent); | ||
4871 | 116 | } | ||
4872 | 117 | |||
4873 | 118 | - (void) mouseDragged: (NSEvent *) theEvent | ||
4874 | 119 | { | ||
4875 | 120 | owner.backend->MouseMove(theEvent); | ||
4876 | 121 | } | ||
4877 | 122 | |||
4878 | 123 | - (void) mouseMoved: (NSEvent *) theEvent | ||
4879 | 124 | { | ||
4880 | 125 | owner.backend->MouseMove(theEvent); | ||
4881 | 126 | } | ||
4882 | 127 | |||
4883 | 128 | - (void) mouseUp: (NSEvent *) theEvent | ||
4884 | 129 | { | ||
4885 | 130 | owner.backend->MouseUp(theEvent); | ||
4886 | 131 | } | ||
4887 | 132 | |||
4888 | 133 | /** | ||
4889 | 134 | * This method is called to give us the opportunity to define our mouse sensitive rectangle. | ||
4890 | 135 | */ | ||
4891 | 136 | - (void) resetCursorRects | ||
4892 | 137 | { | ||
4893 | 138 | [super resetCursorRects]; | ||
4894 | 139 | |||
4895 | 140 | int x = 0; | ||
4896 | 141 | NSRect marginRect = [self bounds]; | ||
4897 | 142 | size_t co = [currentCursors count]; | ||
4898 | 143 | for (size_t i=0; i<co; i++) | ||
4899 | 144 | { | ||
4900 | 145 | int cursType = owner.backend->WndProc(SCI_GETMARGINCURSORN, i, 0); | ||
4901 | 146 | int width =owner.backend->WndProc(SCI_GETMARGINWIDTHN, i, 0); | ||
4902 | 147 | NSCursor *cc = cursorFromEnum(static_cast<Window::Cursor>(cursType)); | ||
4903 | 148 | [currentCursors replaceObjectAtIndex:i withObject: cc]; | ||
4904 | 149 | marginRect.origin.x = x; | ||
4905 | 150 | marginRect.size.width = width; | ||
4906 | 151 | [self addCursorRect: marginRect cursor: cc]; | ||
4907 | 152 | [cc setOnMouseEntered: YES]; | ||
4908 | 153 | x += width; | ||
4909 | 154 | } | ||
4910 | 155 | } | ||
4911 | 156 | |||
4912 | 157 | @end | ||
4913 | 158 | |||
4914 | 159 | @implementation SCIContentView | ||
4915 | 160 | >>>>>>> MERGE-SOURCE | ||
4916 | 26 | 161 | ||
4917 | 27 | @synthesize owner = mOwner; | 162 | @synthesize owner = mOwner; |
4918 | 28 | 163 | ||
4919 | 29 | //-------------------------------------------------------------------------------------------------- | 164 | //-------------------------------------------------------------------------------------------------- |
4920 | 30 | 165 | ||
4922 | 31 | - (NSView*) initWithFrame: (NSRect) frame | 166 | - (NSView*) initWithFrame: (NSRect) frame |
4923 | 32 | { | 167 | { |
4924 | 33 | self = [super initWithFrame: frame]; | 168 | self = [super initWithFrame: frame]; |
4926 | 34 | 169 | ||
4927 | 35 | if (self != nil) | 170 | if (self != nil) |
4928 | 36 | { | 171 | { |
4929 | 37 | // Some initialization for our view. | 172 | // Some initialization for our view. |
4930 | 38 | mCurrentCursor = [[NSCursor arrowCursor] retain]; | 173 | mCurrentCursor = [[NSCursor arrowCursor] retain]; |
4931 | 39 | mCurrentTrackingRect = 0; | 174 | mCurrentTrackingRect = 0; |
4932 | 40 | mMarkedTextRange = NSMakeRange(NSNotFound, 0); | 175 | mMarkedTextRange = NSMakeRange(NSNotFound, 0); |
4934 | 41 | 176 | ||
4935 | 42 | [self registerForDraggedTypes: [NSArray arrayWithObjects: | 177 | [self registerForDraggedTypes: [NSArray arrayWithObjects: |
4936 | 43 | NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]]; | 178 | NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]]; |
4937 | 44 | } | 179 | } |
4939 | 45 | 180 | ||
4940 | 46 | return self; | 181 | return self; |
4941 | 47 | } | 182 | } |
4942 | 48 | 183 | ||
4943 | @@ -70,39 +205,16 @@ | |||
4944 | 70 | /** | 205 | /** |
4945 | 71 | * Called by the backend if a new cursor must be set for the view. | 206 | * Called by the backend if a new cursor must be set for the view. |
4946 | 72 | */ | 207 | */ |
4948 | 73 | - (void) setCursor: (Window::Cursor) cursor | 208 | - (void) setCursor: (int) cursor |
4949 | 74 | { | 209 | { |
4950 | 210 | Window::Cursor eCursor = (Window::Cursor)cursor; | ||
4951 | 75 | [mCurrentCursor autorelease]; | 211 | [mCurrentCursor autorelease]; |
4978 | 76 | switch (cursor) | 212 | mCurrentCursor = cursorFromEnum(eCursor); |
4953 | 77 | { | ||
4954 | 78 | case Window::cursorText: | ||
4955 | 79 | mCurrentCursor = [NSCursor IBeamCursor]; | ||
4956 | 80 | break; | ||
4957 | 81 | case Window::cursorArrow: | ||
4958 | 82 | mCurrentCursor = [NSCursor arrowCursor]; | ||
4959 | 83 | break; | ||
4960 | 84 | case Window::cursorWait: | ||
4961 | 85 | mCurrentCursor = waitCursor; | ||
4962 | 86 | break; | ||
4963 | 87 | case Window::cursorHoriz: | ||
4964 | 88 | mCurrentCursor = [NSCursor resizeLeftRightCursor]; | ||
4965 | 89 | break; | ||
4966 | 90 | case Window::cursorVert: | ||
4967 | 91 | mCurrentCursor = [NSCursor resizeUpDownCursor]; | ||
4968 | 92 | break; | ||
4969 | 93 | case Window::cursorReverseArrow: | ||
4970 | 94 | mCurrentCursor = reverseArrowCursor; | ||
4971 | 95 | break; | ||
4972 | 96 | case Window::cursorUp: | ||
4973 | 97 | default: | ||
4974 | 98 | mCurrentCursor = [NSCursor arrowCursor]; | ||
4975 | 99 | break; | ||
4976 | 100 | } | ||
4977 | 101 | |||
4979 | 102 | [mCurrentCursor retain]; | 213 | [mCurrentCursor retain]; |
4981 | 103 | 214 | ||
4982 | 104 | // Trigger recreation of the cursor rectangle(s). | 215 | // Trigger recreation of the cursor rectangle(s). |
4983 | 105 | [[self window] invalidateCursorRectsForView: self]; | 216 | [[self window] invalidateCursorRectsForView: self]; |
4984 | 217 | [mOwner updateMarginCursors]; | ||
4985 | 106 | } | 218 | } |
4986 | 107 | 219 | ||
4987 | 108 | //-------------------------------------------------------------------------------------------------- | 220 | //-------------------------------------------------------------------------------------------------- |
4988 | @@ -113,7 +225,7 @@ | |||
4989 | 113 | - (void) resetCursorRects | 225 | - (void) resetCursorRects |
4990 | 114 | { | 226 | { |
4991 | 115 | [super resetCursorRects]; | 227 | [super resetCursorRects]; |
4993 | 116 | 228 | ||
4994 | 117 | // We only have one cursor rect: our bounds. | 229 | // We only have one cursor rect: our bounds. |
4995 | 118 | [self addCursorRect: [self bounds] cursor: mCurrentCursor]; | 230 | [self addCursorRect: [self bounds] cursor: mCurrentCursor]; |
4996 | 119 | [mCurrentCursor setOnMouseEntered: YES]; | 231 | [mCurrentCursor setOnMouseEntered: YES]; |
4997 | @@ -127,17 +239,26 @@ | |||
4998 | 127 | - (void) drawRect: (NSRect) rect | 239 | - (void) drawRect: (NSRect) rect |
4999 | 128 | { | 240 | { |
5000 | 129 | CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; | 241 | CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; |
Proposing because CS3376 and CS3377 are important. Plus it fixes a cocoa specific build break.