Merge lp:~masmullin/scintilla-cocoa/updates into lp:scintilla-cocoa

Proposed by masmullin
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
Reviewer Review Type Date Requested Status
Mike Lischke Needs Resubmitting
Review via email: mp+32724@code.launchpad.net

Description of the change

Updates from http://scintilla.hg.sourceforge.net:8000/hgroot/scintilla/scintilla
+ 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

To post a comment you must log in.
Revision history for this message
masmullin (masmullin) wrote :

Proposing because CS3376 and CS3377 are important. Plus it fixes a cocoa specific build break.

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

Revision history for this message
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.

review: Needs Resubmitting
Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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-cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.mode2v3
6-cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.pbxuser
7-*.mode2v3
8-*.pbxuser
9-.DS_Store
10-cocoa/ScintillaTest/build
11-bin
12-bin
13-*.perspectivev3
14-cocoa/ScintillaFramework/build
15
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+[patterns]
21+**.cxx = native
22+**.cpp = native
23+**.c = native
24+**.h = native
25+**.m = native
26+**.mm = native
27+**.iface = native
28+**.template = native
29+**.mk = native
30+**.py = native
31+**.rc = native
32+**.html = native
33+**.bat = native
34+**.mak = native
35+**.def = native
36+**.manifest = native
37+**.properties = native
38+**.styled = native
39+**.asp = native
40+**.php = native
41+**.vb = native
42+**.d = native
43+**.lua = native
44+**.rb = native
45+**.pl = native
46+**.txt = native
47+**.pch = native
48+**.hgeol = native
49+**.dsp = native
50+**.sln = native
51+**.vcproj = native
52+**.pro = native
53+**.gen = native
54+**makefile = native
55+README = native
56+**.bmp = BIN
57+**.cur = BIN
58+**.ico = BIN
59+**.jpg = BIN
60+**.png = BIN
61+tgzsrc = LF
62
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+syntax: glob
69+*.o
70+*.a
71+*.lib
72+*.obj
73+*.pyc
74+*.dll
75+*.dylib
76+*.framework
77+*.pyd
78+*.exp
79+*.lib
80+*.pdb
81+*.res
82+*.bak
83+*.sbr
84+*.suo
85+*.idb
86+*.bsc
87+*.intermediate.manifest
88+*.lastbuildstate
89+*.cache
90+*.ilk
91+*.ncb
92+*.tlog
93+*.sdf
94+gtk/*.plist
95+win32/*.plist
96+*.opt
97+*.plg
98+*.pbxbtree
99+*.mode1v3
100+*.pbxuser
101+*.pbproj
102+*.log
103+*.xcbkptlist
104+*.xcscheme
105+*.xcworkspacedata
106+*.xcuserstate
107+*.xcsettings
108+xcschememanagement.plist
109+.DS_Store
110+cocoa/build
111+cocoa/ScintillaFramework/build
112+cocoa/ScintillaTest/build
113+macosx/SciTest/build
114+*.cppcheck
115+Makefile.Debug
116+Makefile.Release
117+*_resource.rc
118+moc_*
119+*.pro.user
120+ScintillaEdit.cpp
121+ScintillaEdit.h
122+ScintillaConstants.py
123+ScintillaEditBase.intermediate.manifest
124+ScintillaEdit.intermediate.manifest
125+qt/*/Makefile
126+cov-int
127
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+01f406ccdce315e9870c44036e18ebf0fa74df22 rel-1-64
134+038d4e745187fddd764fda49b12b878ece14c0bd rel-1-63
135+03dff61592cf2abbabd9e383f1c8417af3e9d87b rel-1-34
136+11a62bd24819d0044dcf4b8621f79924cab781bd rel-1-56
137+1804bf43c2443fb8db7468a36e8022891dfc32c5 rel-1-73
138+1c4055eaf77fb0e2730adcba2b04a9c40318bdf1 rel-1-74
139+2abff14b87854b56df577a96d6d87e06bbb44251 rel-1-27
140+3a80173ef6320433ac4ab05ff97774f186d878ba rel-1-75
141+4107ec8a3a14b68b832dd12ce568d6517da063f1 rel-2-03
142+4479fb32e7238069d4ed81d7e586b6bcbc2a94ce rel-1-39
143+4af05ea4430505d34c9832313c1e5aaac7a54237 rel-1-61
144+4b0ff01c39b7b9c7aa65d1965bd49daaffe05ea8 rel-1-40
145+4ec090359e447b59d24c3e970fc9faede13ec187 rel-1-45
146+4f3e52891003743da45d4464020f59849240d278 rel-1-37
147+4f77dabcfbab1de33dc2ef89029a4536a1c6c697 rel-1-25
148+4ff6778c456258929c6f9074bdc03d90c28968bf rel-2-00
149+58c51367e4127167fe7be54681b788618732d65b rel-1-51
150+668816d0fd5d75dee228bca98b183969c4b1de53 rel-1-52
151+67a79ce06212780dc0592bbcf3a3172244cf18c8 rel-1-76
152+67aaa980e972a75e9aa11e1fbfe66b4b9c1d78fe rel-1-48
153+6a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66
154+6a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66-carbon
155+6aa816d746280a68821eb90efad0fb5f2d3b751e rel-1-35
156+6b44857e410f45ad5c9e9b48a481fb902c20a2dc rel-1-26
157+6b9c7f104c6160507212e5412ba79ecffc6f9057 initial
158+7681410bf25abb8fa8f51552fd61ec83bdf1a8b0 rel-1-65
159+7c87fe602c2c1fd973eb89675813192723f7f368 rel-1-30
160+85fbbc9b421bdc97a34bead08cdd34cf4c6271f3 rel-1-58
161+86d8875ed69c96026e9ec4b77fff3f9d369bfcb6 rel-1-60
162+87f60a6fb558871ef85a781e5d03321f77e1d11a rel-1-38
163+89b230d9f013855747841b3b3bc8b229259e0c81 rel-1-79
164+8af30946bc0ad1196ddf51b51545929cab3fa2e6 rel-1-69
165+8c2d64c399e5d823e2b2ef547a260357be0428c0 rel-1-54
166+8d11fc4c543f6228d73fa385ec9fca5723f8c832 rel-2-11
167+94801bf860900c9dde428db66c5e01a63e521c05 rel-1-44
168+988c66dff88ed44913d8d6303f7e136c19f5d6ea rel-2-02
169+9d268dfb34560f2aeb817148ca746814fd85115d rel-1-46
170+9e813ff6f15778dd6c6d2f6ab20f9aa8e91b2e47 rel-1-47
171+9eda4d6efdd657f2ce8ad1034bdd20998f573a40 rel-1-49
172+a313740fe8b8ee9df5cfc6f4bae7c665d160f4dd rel-1-78
173+a5905b21afdbee56912e039eeb2e2f7fdcf155df rel-1-42
174+ade751c9a7e7945e48428e32cdf41d6f7d189f08 rel-1-62
175+ae7bd57a9dcedb67467a4b43a27bdf802479bc9e rel-1-33
176+af2def618260df6bde2fdb3fd1f22ad532b18270 rel-1-77
177+b618c255982d76d4d554c456888cd705b1a52d33 rel-1-68
178+b6b5e68dd21fa2f5015e1b45f5b1880aa1c9ecef rel-1-55
179+bd0f312842328a1118c43ebd54899916f1009b86 rel-1-57
180+c019d05d7131f21ccf7abedb979ca29f2ff5fe32 rel-1-71
181+c2c0575d28f000d925d4c0ec689df9b1e572af2d rel-1-43
182+c6733869c489c4e39aeb84ffe5d28378e9fb121d rel-1-31
183+cc4d999c38f16be78e8ba54749bd4e3711b66882 rel-1-41
184+d125f70deea4580ead7cb72814bdb17ad9c16258 rel-1-36
185+d2316766e67ea2a10effe85e6e27ea7b520df409 rel-1-70
186+d940969f5c6f78c252ac110884aa89014c7d1349 rel-2-10
187+ed67316cd7395abf840d8c9d10eb6a23f693d4fc rel-1-28
188+ee4e67b4a9fe76e85230216340dc7eff3978fbf8 rel-1-59
189+f04248111a542b559402f0e08253b613d7dec849 rel-1-32
190+f394f7465aa354dfdea57599f8c7d0e424313144 rel-1-53
191+f4d4bb4d5fd70e9affe63460161cf2779f9dfdb3 rel-1-24
192+f6af29ca9c6e9ffd457d9f6b9477d03f2d944f64 rel-1-67
193+f99c7dfc2bffb16cd478633526b4cba883e266ab rel-2-12
194+fd3e6bb269b1c38e003202dc5856cf120667ed88 rel-1-72
195+fdf95390299493c05c0e11c3c2ef98293c552908 rel-1-50
196+fe112bae056a00c5e0b7218dd3903b16e3d43d24 rel-1-23
197+ffde119d297ecdce968737c68f0e21410a0c36c4 rel-2-20
198+bae0795bc8950108a5265dd3a1b231dbb1c0a92f rel-2-21
199+91d53a344450102a73387dd591cecc4294574891 rel-2-22
200+338e9c43eb8339b293aa5cb069aa84c60bbac6ba rel-2-23
201+3a0d1edb7ae5478426346dab2219e10606238bd0 rel-2-24
202+930e2f7d36165066fffd5cef6225c7774a2d7996 rel-2-25
203+221dae018a0dd86d4adc91370dfc507ca078b452 rel-2-26
204+02d0b25c22c3a4d672aca5fa37b3e5bffc30fa32 rel-2-27
205+265b4ffceb4a356fd7917ce938051e8a206bac3e rel-2-28
206+6f590a14726334be3256c55e8bab9119c71f3160 rel-2-29
207+7a59b936e02452b66dff32264e5bc72c038ade19 rel-3-0-0
208+ad485b918c5a81dbf591eab1916afa3d600b0639 rel-3-0-1
209+16f620503ab2e3ae463e39c36f897385fd73b9d1 rel-3-0-2
210+d147d5b894708a5c7d3e7b81513fe02f0075e62c rel-3-0-3
211+2faf55888eeb76e40d5b286cd45f4f40c331b1c2 rel-3-0-4
212+a9219577729080874f5f46e0a634d5d117cc2eed rel-3-1-0
213+ae4d2f897a8fd92294f61d4d56e90e7700a912df rel-3-2-0
214+41bdec833d4a9bb108bd3e4890371b22d1132f1a rel-3-2-1
215+183c117293e78c4264dca7afac9f66cb5d585ddc rel-3-2-2
216+7d54d6d61ace06828cb0850b53a8008672d67f33 rel-3-2-3
217+1092d3d2495955cfe1a227e360e14d5358b5136f rel-3-2-4
218+74f6ed8c5737db179f791d6fe6cab2dc119f65fb rel-3-2-5
219+04c9afc26342f4c1b9492c4b27efb33585d6a56d rel-3-3-0
220+5f9c0934513bf8d9dfe64127ad19cb95800415e9 scitex-3-3-0
221+d2022a5e4948379ab0aa89b510b850209d6cbb01 rel-3-3-1
222+d887fce163757c50ec95ed204d50b02675db830c rel-3-3-2
223+1cd0ebd585926933259e776ac380ef17a20e2d5d rel-3-3-3
224+e1c3afb1c5d42c664558839b1d68ed4dcc50e5d1 rel-3-3-4
225+c343e43079c4458fae69f82ff3b6569b7bba0821 rel-3-3-5
226+da3cbb774e02f626fd9ee5446608f0f63665042a rel-3-3-6
227+5693714a8b0b30e481ba4f089f2ecc93fc80c80d rel-3-3-7
228
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
235 *** Windows version ***
236
237-A C++ compiler is required. Visual Studio .NET 2010 is the development system
238-used for most development although TDM Mingw32 4.4.1 is also supported.
239+A C++ compiler is required. Visual Studio 2010 is the development system
240+used for most development although TDM Mingw32 4.7.1 is also supported.
241
242 To build Scintilla, make in the scintilla/win32 directory
243 cd scintilla\win32
244@@ -54,10 +54,7 @@
245 GCC: mingw32-make
246 VS .NET: nmake -f scite.mak
247
248-An executable SciTE will now be in scite\bin.
249-
250-The Visual C++ 6.0 project (.dsp) and make files are no longer supported but are left
251-in the download for people that are prepared to update them.
252+An executable SciTE will now be in scite/bin.
253
254 *** GTK+/Windows version ***
255
256
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+.cvsignore
263+*.dll
264
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+
270
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+This empty files ensures that the directory is created.
276\ No newline at end of file
277
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 INST_NAME=-install_name \
283 @executable_path/../Frameworks/Sci.framework/Versions/A/Sci
284
285-LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME)
286+LD=$(COMPILER) $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME) -framework QuartzCore
287
288 LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
289
290 SCI_LEXERS=$(LEXOBJS) \
291- LexerBase.o LexerModule.o LexerSimple.o Accessor.o
292+ $(addsuffix .o, $(basename $(notdir $(wildcard ../lexlib/*.cxx))))
293
294-SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o \
295- ContractionState.o Decoration.o Document.o Editor.o \
296- ExternalLexer.o Indicator.o KeyMap.o LineMarker.o PerLine.o \
297- PositionCache.o PropSetSimple.o RESearch.o RunStyles.o ScintillaBase.o Style.o \
298- StyleContext.o UniConversion.o ViewStyle.o XPM.o WordList.o \
299- Selection.o CharacterSet.o Catalogue.o $(SCI_LEXERS)
300+SCI_FILES = $(notdir $(wildcard $(SCI_DIR)/*.cxx))
301+SCI_OBJ = $(addsuffix .o,$(basename $(SCI_FILES)))
302+SCI_OBJ += $(SCI_LEXERS)
303
304 WAH_OBJ=DocumentAccessor.o KeyWords.o WindowAccessor.o
305
306
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 @private
312 NSImage* mBackground;
313 IBDisplay mDisplayMask;
314-
315+
316 float mScaleFactor;
317 NSPopUpButton* mZoomPopup;
318-
319+
320 int mCurrentCaretX;
321 int mCurrentCaretY;
322 NSTextField* mCaretPositionLabel;
323 NSTextField* mStatusTextLabel;
324-
325+
326 id <InfoBarCommunicator> mCallback;
327 }
328
329
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 {
335 // Get the parent's idea of where we should draw
336 NSRect newRect = [super drawingRectForBounds: theRect];
337-
338+
339 // When the text field is being edited or selected, we have to turn off the magic because it
340 // screws up the configuration of the field editor. We sneak around this by intercepting
341 // selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute.
342@@ -30,26 +30,26 @@
343 {
344 // Get our ideal size for current text
345 NSSize textSize = [self cellSizeForBounds: theRect];
346-
347+
348 // Center that in the proposed rect
349- float heightDelta = newRect.size.height - textSize.height;
350+ float heightDelta = newRect.size.height - textSize.height;
351 if (heightDelta > 0)
352 {
353 newRect.size.height -= heightDelta;
354 newRect.origin.y += ceil(heightDelta / 2);
355 }
356 }
357-
358+
359 return newRect;
360 }
361
362 //--------------------------------------------------------------------------------------------------
363
364-- (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
365+- (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
366 delegate:(id) anObject start: (NSInteger) selStart length: (NSInteger) selLength
367 {
368 aRect = [self drawingRectForBounds: aRect];
369- mIsEditingOrSelecting = YES;
370+ mIsEditingOrSelecting = YES;
371 [super selectWithFrame: aRect
372 inView: controlView
373 editor: textObj
374@@ -63,7 +63,7 @@
375
376 - (void) editWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
377 delegate: (id) anObject event: (NSEvent*) theEvent
378-{
379+{
380 aRect = [self drawingRectForBounds: aRect];
381 mIsEditingOrSelecting = YES;
382 [super editWithFrame: aRect
383@@ -86,9 +86,15 @@
384 if (self)
385 {
386 NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]];
387+<<<<<<< TREE
388
389 NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"png" inDirectory: nil];
390 mBackground = [[NSImage alloc] initWithContentsOfFile: path];
391+=======
392+
393+ NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"tiff" inDirectory: nil];
394+ mBackground = [[NSImage alloc] initWithContentsOfFile: path];
395+>>>>>>> MERGE-SOURCE
396 if (![mBackground isValid])
397 NSLog(@"Background image for info bar is invalid.");
398
399@@ -103,7 +109,7 @@
400 //--------------------------------------------------------------------------------------------------
401
402 /**
403- * Called by a connected compontent (usually the info bar) if something changed there.
404+ * Called by a connected component (usually the info bar) if something changed there.
405 *
406 * @param type The type of the notification.
407 * @param message Carries the new status message if the type is a status message change.
408@@ -152,14 +158,14 @@
409 {
410 // 1) The zoom popup.
411 unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);
412-
413+
414 // Create the popup button.
415 mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];
416-
417+
418 // No border or background please.
419 [[mZoomPopup cell] setBordered: NO];
420 [[mZoomPopup cell] setArrowPosition: NSPopUpArrowAtBottom];
421-
422+
423 // Fill it.
424 for (unsigned count = 0; count < numberOfDefaultItems; count++)
425 {
426@@ -169,28 +175,28 @@
427 [currentItem setRepresentedObject: [NSNumber numberWithFloat: DefaultScaleMenuFactors[count]]];
428 }
429 [mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex];
430-
431+
432 // Hook it up.
433 [mZoomPopup setTarget: self];
434 [mZoomPopup setAction: @selector(zoomItemAction:)];
435-
436+
437 // Set a suitable font.
438 [mZoomPopup setFont: [NSFont menuBarFontOfSize: BarFontSize]];
439-
440+
441 // Make sure the popup is big enough to fit the cells.
442 [mZoomPopup sizeToFit];
443-
444+
445 // Don't let it become first responder
446 [mZoomPopup setRefusesFirstResponder: YES];
447-
448+
449 // put it in the scrollview.
450 [self addSubview: mZoomPopup];
451 [mZoomPopup release];
452-
453+
454 // 2) The caret position label.
455 Class oldCellClass = [NSTextField cellClass];
456 [NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]];
457-
458+
459 mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)];
460 [mCaretPositionLabel setBezeled: NO];
461 [mCaretPositionLabel setBordered: NO];
462@@ -205,7 +211,7 @@
463
464 [self addSubview: mCaretPositionLabel];
465 [mCaretPositionLabel release];
466-
467+
468 // 3) The status text.
469 mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)];
470 [mStatusTextLabel setBezeled: NO];
471@@ -220,7 +226,7 @@
472
473 [self addSubview: mStatusTextLabel];
474 [mStatusTextLabel release];
475-
476+
477 // Restore original cell class so that everything else doesn't get broken
478 [NSTextField setCellClass: oldCellClass];
479 }
480@@ -248,12 +254,12 @@
481 [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
482 target.x += mBackground.size.width;
483 }
484-
485+
486 // Draw separator lines between items.
487 NSRect verticalLineRect;
488 float component = 190.0 / 255.0;
489 NSColor* lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1];
490-
491+
492 if (mDisplayMask & IBShowZoom)
493 {
494 verticalLineRect = [mZoomPopup frame];
495@@ -265,7 +271,7 @@
496 NSRectFill(verticalLineRect);
497 }
498 }
499-
500+
501 if (mDisplayMask & IBShowCaretPosition)
502 {
503 verticalLineRect = [mCaretPositionLabel frame];
504@@ -347,7 +353,7 @@
505 mDisplayMask = display;
506 [self positionSubViews];
507 [self needsDisplay];
508- }
509+ }
510 }
511
512 //--------------------------------------------------------------------------------------------------
513@@ -358,7 +364,7 @@
514 - (void) zoomItemAction: (id) sender
515 {
516 NSNumber* selectedFactorObject = [[sender selectedCell] representedObject];
517-
518+
519 if (selectedFactorObject == nil)
520 {
521 NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported.");
522@@ -369,9 +375,9 @@
523 [self setScaleFactor: [selectedFactorObject floatValue] adjustPopup: NO];
524 }
525 }
526-
527+
528 //--------------------------------------------------------------------------------------------------
529-
530+
531 - (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag
532 {
533 if (mScaleFactor != newScaleFactor)
534@@ -381,7 +387,7 @@
535 {
536 unsigned count = 0;
537 unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float);
538-
539+
540 // We only work with some preset zoom values. If the given value does not correspond
541 // to one then show no selection.
542 while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
543@@ -391,7 +397,7 @@
544 else
545 {
546 [mZoomPopup selectItemAtIndex: count];
547-
548+
549 // Set scale factor to found preset value if it comes close.
550 mScaleFactor = DefaultScaleMenuFactors[count];
551 }
552@@ -400,7 +406,7 @@
553 {
554 // Internally set. Notify owner.
555 [mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor];
556- }
557+ }
558 }
559 }
560
561@@ -414,12 +420,12 @@
562 // Make the position one-based.
563 int newX = (int) position.x + 1;
564 int newY = (int) position.y + 1;
565-
566+
567 if (mCurrentCaretX != newX || mCurrentCaretY != newY)
568 {
569 mCurrentCaretX = newX;
570 mCurrentCaretY = newY;
571-
572+
573 [mCaretPositionLabel setStringValue: [NSString stringWithFormat: @"%d:%d", newX, newY]];
574 }
575 }
576@@ -427,7 +433,7 @@
577 //--------------------------------------------------------------------------------------------------
578
579 /**
580- * Makes the bar resize to the smallest width that can accomodate the currently enabled items.
581+ * Makes the bar resize to the smallest width that can accommodate the currently enabled items.
582 */
583 - (void) sizeToFit
584 {
585@@ -435,13 +441,13 @@
586 frame.size.width = 0;
587 if (mDisplayMask & IBShowZoom)
588 frame.size.width += [mZoomPopup frame].size.width;
589-
590+
591 if (mDisplayMask & IBShowCaretPosition)
592 frame.size.width += [mCaretPositionLabel frame].size.width;
593-
594+
595 if (mDisplayMask & IBShowStatusText)
596 frame.size.width += [mStatusTextLabel frame].size.width;
597-
598+
599 [self setFrame: frame];
600 }
601
602
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 QuartzTextLayout* textLayout;
608 int codePage;
609 int verticalDeviceResolution;
610-
611+
612 /** If the surface is a bitmap context, contains a reference to the bitmap data. */
613 uint8_t* bitmapData;
614 /** If the surface is a bitmap context, stores the dimensions of the bitmap. */
615@@ -96,6 +96,7 @@
616 void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage);
617 void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back);
618 void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);
619+<<<<<<< TREE
620 void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
621 ColourDesired back);
622 void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
623@@ -110,6 +111,22 @@
624 XYPOSITION ExternalLeading(Font &font_);
625 XYPOSITION Height(Font &font_);
626 XYPOSITION AverageCharWidth(Font &font_);
627+=======
628+ void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
629+ ColourDesired back);
630+ void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
631+ ColourDesired back);
632+ void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore);
633+ void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions);
634+ XYPOSITION WidthText(Font &font_, const char *s, int len);
635+ XYPOSITION WidthChar(Font &font_, char ch);
636+ XYPOSITION Ascent(Font &font_);
637+ XYPOSITION Descent(Font &font_);
638+ XYPOSITION InternalLeading(Font &font_);
639+ XYPOSITION ExternalLeading(Font &font_);
640+ XYPOSITION Height(Font &font_);
641+ XYPOSITION AverageCharWidth(Font &font_);
642+>>>>>>> MERGE-SOURCE
643
644 void SetClip(PRectangle rc);
645 void FlushCachedState();
646@@ -117,7 +134,7 @@
647 void SetUnicodeMode(bool unicodeMode_);
648 void SetDBCSMode(int codePage_);
649 }; // SurfaceImpl class
650-
651+
652 } // Scintilla namespace
653
654 #endif
655
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 * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
661 */
662
663-#import <ScintillaView.h>
664-
665-#include "PlatCocoa.h"
666+#import "Platform.h"
667+#import "ScintillaView.h"
668+#import "ScintillaCocoa.h"
669+#import "PlatCocoa.h"
670
671 #include <cstring>
672 #include <cstdio>
673@@ -22,14 +23,14 @@
674 #include <assert.h>
675 #include <sys/time.h>
676 #include <stdexcept>
677+#include <vector>
678 #include <map>
679
680+#include "StringCopy.h"
681 #include "XPM.h"
682
683 #import <Foundation/NSGeometry.h>
684
685-#import <Carbon/Carbon.h> // Temporary
686-
687 using namespace Scintilla;
688
689 extern sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
690@@ -57,7 +58,7 @@
691 //--------------------------------------------------------------------------------------------------
692
693 /**
694- * Converts a PRctangle as used by Scintilla to a Quartz-style rectangle.
695+ * Converts a PRectangle as used by Scintilla to a Quartz-style rectangle.
696 */
697 inline CGRect PRectangleToCGRect(PRectangle& rc)
698 {
699@@ -178,7 +179,7 @@
700 }
701 bitmapData = NULL;
702 gc = NULL;
703-
704+
705 bitmapWidth = 0;
706 bitmapHeight = 0;
707 x = 0;
708@@ -198,11 +199,11 @@
709 void SurfaceImpl::Init(WindowID)
710 {
711 // To be able to draw, the surface must get a CGContext handle. We save the graphics port,
712- // then aquire/release the context on an as-need basis (see above).
713+ // then acquire/release the context on an as-need basis (see above).
714 // XXX Docs on QDBeginCGContext are light, a better way to do this would be good.
715 // AFAIK we should not hold onto a context retrieved this way, thus the need for
716- // aquire/release of the context.
717-
718+ // acquire/release of the context.
719+
720 Release();
721 }
722
723@@ -221,45 +222,42 @@
724 void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */)
725 {
726 Release();
727-
728+
729 // Create a new bitmap context, along with the RAM for the bitmap itself
730 bitmapWidth = width;
731 bitmapHeight = height;
732-
733+
734 const int bitmapBytesPerRow = (width * BYTES_PER_PIXEL);
735 const int bitmapByteCount = (bitmapBytesPerRow * height);
736-
737+
738 // Create an RGB color space.
739 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
740 if (colorSpace == NULL)
741 return;
742-
743+
744 // Create the bitmap.
745 bitmapData = new uint8_t[bitmapByteCount];
746- if (bitmapData != NULL)
747+ // create the context
748+ gc = CGBitmapContextCreate(bitmapData,
749+ width,
750+ height,
751+ BITS_PER_COMPONENT,
752+ bitmapBytesPerRow,
753+ colorSpace,
754+ kCGImageAlphaPremultipliedLast);
755+
756+ if (gc == NULL)
757 {
758- // create the context
759- gc = CGBitmapContextCreate(bitmapData,
760- width,
761- height,
762- BITS_PER_COMPONENT,
763- bitmapBytesPerRow,
764- colorSpace,
765- kCGImageAlphaPremultipliedLast);
766-
767- if (gc == NULL)
768- {
769- // the context couldn't be created for some reason,
770- // and we have no use for the bitmap without the context
771- delete[] bitmapData;
772- bitmapData = NULL;
773- }
774- textLayout->setContext (gc);
775+ // the context couldn't be created for some reason,
776+ // and we have no use for the bitmap without the context
777+ delete[] bitmapData;
778+ bitmapData = NULL;
779 }
780-
781+ textLayout->setContext (gc);
782+
783 // the context retains the color space, so we can release it
784 CGColorSpaceRelease(colorSpace);
785-
786+
787 if (gc != NULL && bitmapData != NULL)
788 {
789 // "Erase" to white.
790@@ -276,9 +274,9 @@
791 if (gc)
792 {
793 ColourDesired colour(fore.AsLong());
794-
795+
796 // Set the Stroke color to match
797- CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
798+ CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
799 colour.GetBlue() / 255.0, 1.0 );
800 }
801 }
802@@ -290,9 +288,9 @@
803 if (gc)
804 {
805 ColourDesired colour(back.AsLong());
806-
807+
808 // Set the Fill color to match
809- CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
810+ CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
811 colour.GetBlue() / 255.0, 1.0 );
812 }
813 }
814@@ -304,17 +302,17 @@
815 // For now, assume that GetImage can only be called on PixMap surfaces.
816 if (bitmapData == NULL)
817 return NULL;
818-
819+
820 CGContextFlush(gc);
821-
822+
823 // Create an RGB color space.
824 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
825 if( colorSpace == NULL )
826 return NULL;
827-
828+
829 const int bitmapBytesPerRow = ((int) bitmapWidth * BYTES_PER_PIXEL);
830 const int bitmapByteCount = (bitmapBytesPerRow * (int) bitmapHeight);
831-
832+
833 // Make a copy of the bitmap data for the image creation and divorce it
834 // From the SurfaceImpl lifetime
835 CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bitmapData, bitmapByteCount);
836@@ -338,18 +336,18 @@
837 0,
838 kCGRenderingIntentDefault);
839 }
840-
841+
842 // The image retains the color space, so we can release it.
843 CGColorSpaceRelease(colorSpace);
844 colorSpace = NULL;
845-
846+
847 // Done with the data provider.
848 CGDataProviderRelease(dataProvider);
849 dataProvider = NULL;
850-
851+
852 // Done with the data provider.
853 CFRelease(dataRef);
854-
855+
856 return image;
857 }
858
859@@ -389,10 +387,10 @@
860 void SurfaceImpl::LineTo(int x_, int y_)
861 {
862 CGContextBeginPath( gc );
863-
864+
865 // Because Quartz is based on floating point, lines are drawn with half their colour
866 // on each side of the line. Integer coordinates specify the INTERSECTION of the pixel
867- // divison lines. If you specify exact pixel values, you get a line that
868+ // division lines. If you specify exact pixel values, you get a line that
869 // is twice as thick but half as intense. To get pixel aligned rendering,
870 // we render the "middle" of the pixels by adding 0.5 to the coordinates.
871 CGContextMoveToPoint( gc, x + 0.5, y + 0.5 );
872@@ -408,31 +406,27 @@
873 ColourDesired back)
874 {
875 // Allocate memory for the array of points.
876- CGPoint *points = new CGPoint[npts];
877-
878+ std::vector<CGPoint> points(npts);
879+
880 for (int i = 0;i < npts;i++)
881 {
882 // Quartz floating point issues: plot the MIDDLE of the pixels
883 points[i].x = pts[i].x + 0.5;
884 points[i].y = pts[i].y + 0.5;
885 }
886-
887+
888 CGContextBeginPath(gc);
889-
890+
891 // Set colours
892 FillColour(back);
893 PenColour(fore);
894-
895+
896 // Draw the polygon
897- CGContextAddLines(gc, points, npts);
898-
899+ CGContextAddLines(gc, points.data(), npts);
900+
901 // Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only)
902 CGContextClosePath( gc );
903 CGContextDrawPath( gc, kCGPathFillStroke );
904-
905- // Deallocate memory.
906- delete points;
907- points = NULL;
908 }
909
910 //--------------------------------------------------------------------------------------------------
911@@ -444,7 +438,7 @@
912 CGContextBeginPath( gc );
913 FillColour(back);
914 PenColour(fore);
915-
916+
917 // Quartz integer -> float point conversion fun (see comment in SurfaceImpl::LineTo)
918 // We subtract 1 from the Width() and Height() so that all our drawing is within the area defined
919 // by the PRectangle. Otherwise, we draw one pixel too far to the right and bottom.
920@@ -487,7 +481,7 @@
921 void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern)
922 {
923 SurfaceImpl& patternSurface = static_cast<SurfaceImpl &>(surfacePattern);
924-
925+
926 // For now, assume that copy can only be called on PixMap surfaces. Shows up black.
927 CGImageRef image = patternSurface.GetImage();
928 if (image == NULL)
929@@ -495,11 +489,19 @@
930 FillRectangle(rc, ColourDesired(0));
931 return;
932 }
933-
934- const CGPatternCallbacks drawImageCallbacks = { 0,
935- reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback),
936- reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) };
937-
938+<<<<<<< TREE
939+
940+ const CGPatternCallbacks drawImageCallbacks = { 0,
941+ reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback),
942+ reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) };
943+
944+=======
945+
946+ const CGPatternCallbacks drawImageCallbacks = { 0,
947+ reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback),
948+ reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) };
949+
950+>>>>>>> MERGE-SOURCE
951 CGPatternRef pattern = CGPatternCreate(image,
952 CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight),
953 CGAffineTransformIdentity,
954@@ -514,10 +516,10 @@
955 // Create a pattern color space
956 CGColorSpaceRef colorSpace = CGColorSpaceCreatePattern( NULL );
957 if( colorSpace != NULL ) {
958-
959+
960 CGContextSaveGState( gc );
961 CGContextSetFillColorSpace( gc, colorSpace );
962-
963+
964 // Unlike the documentation, you MUST pass in a "components" parameter:
965 // For coloured patterns it is the alpha value.
966 const CGFloat alpha = 1.0;
967@@ -540,12 +542,12 @@
968 // which is a rectangle with rounded corners each having a radius of 4 pixels.
969 // It would be almost as good just cutting off the corners with lines at
970 // 45 degrees as is done on GTK+.
971-
972+
973 // Create a rectangle with semicircles at the corners
974 const int MAX_RADIUS = 4;
975 int radius = Platform::Minimum( MAX_RADIUS, rc.Height()/2 );
976 radius = Platform::Minimum( radius, rc.Width()/2 );
977-
978+
979 // Points go clockwise, starting from just below the top left
980 // Corners are kept together, so we can easily create arcs to connect them
981 CGPoint corners[4][3] =
982@@ -571,7 +573,7 @@
983 { rc.left, rc.bottom - radius - 1 },
984 },
985 };
986-
987+
988 // Align the points in the middle of the pixels
989 for( int i = 0; i < 4; ++ i )
990 {
991@@ -581,38 +583,133 @@
992 corners[i][j].y += 0.5;
993 }
994 }
995-
996+
997 PenColour( fore );
998 FillColour( back );
999-
1000+
1001 // Move to the last point to begin the path
1002 CGContextBeginPath( gc );
1003 CGContextMoveToPoint( gc, corners[3][2].x, corners[3][2].y );
1004-
1005+
1006 for ( int i = 0; i < 4; ++ i )
1007 {
1008 CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y );
1009 CGContextAddArcToPoint( gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius );
1010 }
1011-
1012+
1013 // Close the path to enclose it for stroking and for filling, then draw it
1014 CGContextClosePath( gc );
1015 CGContextDrawPath( gc, kCGPathFillStroke );
1016 }
1017
1018+<<<<<<< TREE
1019 void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, ColourDesired fill, int alphaFill,
1020 ColourDesired /*outline*/, int /*alphaOutline*/, int /*flags*/)
1021+=======
1022+// DrawChamferedRectangle is a helper function for AlphaRectangle that either fills or strokes a
1023+// rectangle with its corners chamfered at 45 degrees.
1024+static void DrawChamferedRectangle(CGContextRef gc, PRectangle rc, int cornerSize, CGPathDrawingMode mode) {
1025+ // Points go clockwise, starting from just below the top left
1026+ CGPoint corners[4][2] =
1027+ {
1028+ {
1029+ { rc.left, rc.top + cornerSize },
1030+ { rc.left + cornerSize, rc.top },
1031+ },
1032+ {
1033+ { rc.right - cornerSize - 1, rc.top },
1034+ { rc.right - 1, rc.top + cornerSize },
1035+ },
1036+ {
1037+ { rc.right - 1, rc.bottom - cornerSize - 1 },
1038+ { rc.right - cornerSize - 1, rc.bottom - 1 },
1039+ },
1040+ {
1041+ { rc.left + cornerSize, rc.bottom - 1 },
1042+ { rc.left, rc.bottom - cornerSize - 1 },
1043+ },
1044+ };
1045+
1046+ // Align the points in the middle of the pixels
1047+ for( int i = 0; i < 4; ++ i )
1048+ {
1049+ for( int j = 0; j < 2; ++ j )
1050+ {
1051+ corners[i][j].x += 0.5;
1052+ corners[i][j].y += 0.5;
1053+ }
1054+ }
1055+
1056+ // Move to the last point to begin the path
1057+ CGContextBeginPath( gc );
1058+ CGContextMoveToPoint( gc, corners[3][1].x, corners[3][1].y );
1059+
1060+ for ( int i = 0; i < 4; ++ i )
1061+ {
1062+ CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y );
1063+ CGContextAddLineToPoint( gc, corners[i][1].x, corners[i][1].y );
1064+ }
1065+
1066+ // Close the path to enclose it for stroking and for filling, then draw it
1067+ CGContextClosePath( gc );
1068+ CGContextDrawPath( gc, mode );
1069+}
1070+
1071+void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
1072+ ColourDesired outline, int alphaOutline, int /*flags*/)
1073+>>>>>>> MERGE-SOURCE
1074 {
1075 if ( gc ) {
1076+<<<<<<< TREE
1077 ColourDesired colour( fill.AsLong() );
1078
1079 // Snap rectangle boundaries to nearest int
1080 rc.left = lround(rc.left);
1081 rc.right = lround(rc.right);
1082+=======
1083+ // Snap rectangle boundaries to nearest int
1084+ rc.left = lround(rc.left);
1085+ rc.right = lround(rc.right);
1086+>>>>>>> MERGE-SOURCE
1087 // Set the Fill color to match
1088- CGContextSetRGBFillColor( gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, colour.GetBlue() / 255.0, alphaFill / 255.0 );
1089- CGRect rect = PRectangleToCGRect( rc );
1090- CGContextFillRect( gc, rect );
1091+ CGContextSetRGBFillColor( gc, fill.GetRed() / 255.0, fill.GetGreen() / 255.0, fill.GetBlue() / 255.0, alphaFill / 255.0 );
1092+ CGContextSetRGBStrokeColor( gc, outline.GetRed() / 255.0, outline.GetGreen() / 255.0, outline.GetBlue() / 255.0, alphaOutline / 255.0 );
1093+ PRectangle rcFill = rc;
1094+ if (cornerSize == 0) {
1095+ // A simple rectangle, no rounded corners
1096+ if ((fill == outline) && (alphaFill == alphaOutline)) {
1097+ // Optimization for simple case
1098+ CGRect rect = PRectangleToCGRect( rcFill );
1099+ CGContextFillRect( gc, rect );
1100+ } else {
1101+ rcFill.left += 1.0;
1102+ rcFill.top += 1.0;
1103+ rcFill.right -= 1.0;
1104+ rcFill.bottom -= 1.0;
1105+ CGRect rect = PRectangleToCGRect( rcFill );
1106+ CGContextFillRect( gc, rect );
1107+ CGContextAddRect( gc, CGRectMake( rc.left + 0.5, rc.top + 0.5, rc.Width() - 1, rc.Height() - 1 ) );
1108+ CGContextStrokePath( gc );
1109+ }
1110+ } else {
1111+ // Approximate rounded corners with 45 degree chamfers.
1112+ // Drawing real circular arcs often leaves some over- or under-drawn pixels.
1113+ if ((fill == outline) && (alphaFill == alphaOutline)) {
1114+ // Specializing this case avoids a few stray light/dark pixels in corners.
1115+ rcFill.left -= 0.5;
1116+ rcFill.top -= 0.5;
1117+ rcFill.right += 0.5;
1118+ rcFill.bottom += 0.5;
1119+ DrawChamferedRectangle( gc, rcFill, cornerSize, kCGPathFill );
1120+ } else {
1121+ rcFill.left += 0.5;
1122+ rcFill.top += 0.5;
1123+ rcFill.right -= 0.5;
1124+ rcFill.bottom -= 0.5;
1125+ DrawChamferedRectangle( gc, rcFill, cornerSize-1, kCGPathFill );
1126+ DrawChamferedRectangle( gc, rc, cornerSize, kCGPathStroke );
1127+ }
1128+ }
1129 }
1130 }
1131
1132@@ -629,25 +726,30 @@
1133 if (colorSpace) {
1134 const int bitmapBytesPerRow = ((int) width * 4);
1135 const int bitmapByteCount = (bitmapBytesPerRow * (int) height);
1136-
1137+
1138 // Create a data provider.
1139 CGDataProviderRef dataProvider = 0;
1140 if (invert) {
1141+<<<<<<< TREE
1142 unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount];
1143
1144+=======
1145+ unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount];
1146+
1147+>>>>>>> MERGE-SOURCE
1148 for (int y=0; y<height; y++) {
1149 int yInverse = height - y - 1;
1150 memcpy(pixelsUpsideDown + y * bitmapBytesPerRow,
1151 pixelsImage + yInverse * bitmapBytesPerRow,
1152 bitmapBytesPerRow);
1153 }
1154-
1155+
1156 dataProvider = CGDataProviderCreateWithData(
1157 NULL, pixelsUpsideDown, bitmapByteCount, ProviderReleaseData);
1158 } else {
1159 dataProvider = CGDataProviderCreateWithData(
1160 NULL, pixelsImage, bitmapByteCount, NULL);
1161-
1162+
1163 }
1164 if (dataProvider) {
1165 // Create the CGImage.
1166@@ -665,7 +767,11 @@
1167
1168 CGDataProviderRelease(dataProvider);
1169 }
1170+<<<<<<< TREE
1171
1172+=======
1173+
1174+>>>>>>> MERGE-SOURCE
1175 // The image retains the color space, so we can release it.
1176 CGColorSpaceRelease(colorSpace);
1177 }
1178@@ -681,6 +787,7 @@
1179 }
1180 }
1181
1182+<<<<<<< TREE
1183 void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) {
1184 // Drawing an ellipse with bezier curves. Code modified from:
1185 // http://www.codeguru.com/gdi/ellipse.shtml
1186@@ -722,30 +829,25 @@
1187 cCtlPt[12].y =
1188 cCtlPt[6].y = centre.y + 0.5;
1189
1190+=======
1191+void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) {
1192+ CGRect ellipseRect = CGRectMake(rc.left, rc.top, rc.Width(), rc.Height());
1193+>>>>>>> MERGE-SOURCE
1194 FillColour(back);
1195 PenColour(fore);
1196-
1197- CGContextBeginPath( gc );
1198- CGContextMoveToPoint( gc, cCtlPt[0].x, cCtlPt[0].y );
1199-
1200- for ( int i = 1; i < 13; i += 3 )
1201- {
1202- 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- }
1204-
1205- // Close the path to enclose it for stroking and for filling, then draw it
1206- CGContextClosePath( gc );
1207- CGContextDrawPath( gc, kCGPathFillStroke );
1208+ CGContextBeginPath(gc);
1209+ CGContextAddEllipseInRect(gc, ellipseRect);
1210+ CGContextDrawPath(gc, kCGPathFillStroke);
1211 }
1212
1213 void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect)
1214 {
1215 SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);
1216 CGImageRef image = source.GetImage();
1217-
1218+
1219 CGRect src = PRectangleToCGRect(srcRect);
1220 CGRect dst = PRectangleToCGRect(dstRect);
1221-
1222+
1223 /* source from QuickDrawToQuartz2D.pdf on developer.apple.com */
1224 float w = (float) CGImageGetWidth(image);
1225 float h = (float) CGImageGetHeight(image);
1226@@ -769,10 +871,10 @@
1227 // Maybe we have to make the Surface two contexts:
1228 // a bitmap context which we do all the drawing on, and then a "real" context
1229 // which we copy the output to when we call "Synchronize". Ugh! Gross and slow!
1230-
1231+
1232 // For now, assume that copy can only be called on PixMap surfaces
1233 SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);
1234-
1235+
1236 // Get the CGImageRef
1237 CGImageRef image = source.GetImage();
1238 // If we could not get an image reference, fill the rectangle black
1239@@ -781,19 +883,19 @@
1240 FillRectangle( rc, ColourDesired( 0 ) );
1241 return;
1242 }
1243-
1244+
1245 // Now draw the image on the surface
1246-
1247+
1248 // Some fancy clipping work is required here: draw only inside of rc
1249 CGContextSaveGState( gc );
1250 CGContextClipToRect( gc, PRectangleToCGRect( rc ) );
1251-
1252+
1253 //Platform::DebugPrintf(stderr, "Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\n", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight );
1254 CGContextDrawImage( gc, CGRectMake( rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ), image );
1255-
1256+
1257 // Undo the clipping fun
1258 CGContextRestoreGState( gc );
1259-
1260+
1261 // Done with the image
1262 CGImageRelease( image );
1263 image = NULL;
1264@@ -878,8 +980,13 @@
1265 }
1266 }
1267
1268+<<<<<<< TREE
1269 void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len,
1270 ColourDesired fore)
1271+=======
1272+void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len,
1273+ ColourDesired fore)
1274+>>>>>>> MERGE-SOURCE
1275 {
1276 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
1277 ColourDesired colour(fore.AsLong());
1278@@ -887,7 +994,7 @@
1279
1280 QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID());
1281 style->setCTStyleColor(color);
1282-
1283+
1284 CGColorRelease(color);
1285
1286 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
1287@@ -912,10 +1019,10 @@
1288 {
1289 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
1290 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
1291-
1292+
1293 CTLineRef mLine = textLayout->getCTLine();
1294 assert(mLine != NULL);
1295-
1296+
1297 if (unicodeMode) {
1298 // Map the widths given for UTF-16 characters back onto the UTF-8 input string
1299 CFIndex fit = textLayout->getStringLength();
1300@@ -961,7 +1068,7 @@
1301 {
1302 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
1303 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
1304-
1305+
1306 return textLayout->MeasureStringWidth();
1307 }
1308 return 1;
1309@@ -973,7 +1080,7 @@
1310 {
1311 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
1312 textLayout->setText (reinterpret_cast<const UInt8*>(str), 1, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
1313-
1314+
1315 return textLayout->MeasureStringWidth();
1316 }
1317 else
1318@@ -987,7 +1094,7 @@
1319 XYPOSITION SurfaceImpl::Ascent(Font &font_) {
1320 if (!font_.GetID())
1321 return 1;
1322-
1323+
1324 float ascent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAscent();
1325 return ascent + 0.5;
1326
1327@@ -996,7 +1103,7 @@
1328 XYPOSITION SurfaceImpl::Descent(Font &font_) {
1329 if (!font_.GetID())
1330 return 1;
1331-
1332+
1333 float descent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getDescent();
1334 return descent + 0.5;
1335
1336@@ -1009,7 +1116,7 @@
1337 XYPOSITION SurfaceImpl::ExternalLeading(Font &font_) {
1338 if (!font_.GetID())
1339 return 1;
1340-
1341+
1342 float leading = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getLeading();
1343 return leading + 0.5;
1344
1345@@ -1021,14 +1128,19 @@
1346 return ht;
1347 }
1348
1349+<<<<<<< TREE
1350 XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {
1351
1352+=======
1353+XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {
1354+
1355+>>>>>>> MERGE-SOURCE
1356 if (!font_.GetID())
1357 return 1;
1358-
1359- const int sizeStringLength = (sizeof( sizeString ) / sizeof( sizeString[0] ) - 1);
1360+
1361+ const int sizeStringLength = ELEMENTS( sizeString );
1362 int width = WidthText( font_, sizeString, sizeStringLength );
1363-
1364+
1365 return (int) ((width / (float) sizeStringLength) + 0.5);
1366 }
1367
1368@@ -1109,8 +1221,13 @@
1369 // NSView
1370 NSView* view = reinterpret_cast<NSView*>(idWin);
1371 win = [view window];
1372+<<<<<<< TREE
1373 rect = [view convertRect: [view bounds] toView: nil];
1374 rect.origin = [win convertBaseToScreen: rect.origin];
1375+=======
1376+ rect = [view convertRect: [view bounds] toView: nil];
1377+ rect.origin = [win convertBaseToScreen:rect.origin];
1378+>>>>>>> MERGE-SOURCE
1379 }
1380 else
1381 {
1382@@ -1269,9 +1386,9 @@
1383 if (wid)
1384 {
1385 id idWin = reinterpret_cast<id>(wid);
1386- if ([idWin isMemberOfClass: [InnerView class]])
1387+ if ([idWin isMemberOfClass: [SCIContentView class]])
1388 {
1389- InnerView* container = reinterpret_cast<InnerView*>(idWin);
1390+ SCIContentView* container = reinterpret_cast<SCIContentView*>(idWin);
1391 [container setCursor: curs];
1392 }
1393 }
1394@@ -1488,7 +1605,6 @@
1395 class ListBoxImpl : public ListBox, IListBox
1396 {
1397 private:
1398- ControlRef lb;
1399 ImageMap images;
1400 int lineHeight;
1401 bool unicodeMode;
1402@@ -1503,14 +1619,19 @@
1403 NSScrollView* scroller;
1404 NSTableColumn* colIcon;
1405 NSTableColumn* colText;
1406+<<<<<<< TREE
1407 AutoCompletionDataSource* ds;
1408
1409+=======
1410+ AutoCompletionDataSource* ds;
1411+
1412+>>>>>>> MERGE-SOURCE
1413 LinesData ld;
1414 CallBackAction doubleClickAction;
1415 void* doubleClickActionData;
1416
1417 public:
1418- ListBoxImpl() : lb(NULL), lineHeight(10), unicodeMode(false),
1419+ ListBoxImpl() : lineHeight(10), unicodeMode(false),
1420 desiredVisibleRows(5), maxItemWidth(0), aveCharWidth(8), maxIconWidth(0),
1421 doubleClickAction(NULL), doubleClickActionData(NULL)
1422 {
1423@@ -1698,36 +1819,31 @@
1424 {
1425 Clear();
1426 size_t count = strlen(list) + 1;
1427- char* words = new char[count];
1428- if (words)
1429+ std::vector<char> words(list, list+count);
1430+ char* startword = words.data();
1431+ char* numword = NULL;
1432+ int i = 0;
1433+ for (; words[i]; i++)
1434 {
1435- memcpy(words, list, count);
1436- char* startword = words;
1437- char* numword = NULL;
1438- int i = 0;
1439- for (; words[i]; i++)
1440- {
1441- if (words[i] == separator)
1442- {
1443- words[i] = '\0';
1444- if (numword)
1445- *numword = '\0';
1446- Append(startword, numword?atoi(numword + 1):-1);
1447- startword = words + i + 1;
1448- numword = NULL;
1449- }
1450- else if (words[i] == typesep)
1451- {
1452- numword = words + i;
1453- }
1454- }
1455- if (startword)
1456- {
1457+ if (words[i] == separator)
1458+ {
1459+ words[i] = '\0';
1460 if (numword)
1461 *numword = '\0';
1462 Append(startword, numword?atoi(numword + 1):-1);
1463- }
1464- delete []words;
1465+ startword = words.data() + i + 1;
1466+ numword = NULL;
1467+ }
1468+ else if (words[i] == typesep)
1469+ {
1470+ numword = words.data() + i;
1471+ }
1472+ }
1473+ if (startword)
1474+ {
1475+ if (numword)
1476+ *numword = '\0';
1477+ Append(startword, numword?atoi(numword + 1):-1);
1478 }
1479 [table reloadData];
1480 }
1481@@ -1770,8 +1886,7 @@
1482 value[0] = '\0';
1483 return;
1484 }
1485- strncpy(value, textString, len);
1486- value[len - 1] = '\0';
1487+ strlcpy(value, textString, len);
1488 }
1489
1490 void ListBoxImpl::RegisterImage(int type, const char* xpm_data)
1491@@ -1792,12 +1907,21 @@
1492 }
1493
1494 void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {
1495+<<<<<<< TREE
1496 CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);
1497 NSSize sz = {width, height};
1498 NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease];
1499 NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef];
1500 [img addRepresentation: bitmapRep];
1501 [bitmapRep release];
1502+=======
1503+ CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);
1504+ NSSize sz = {static_cast<CGFloat>(width), static_cast<CGFloat>(height)};
1505+ NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease];
1506+ NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef];
1507+ [img addRepresentation: bitmapRep];
1508+ [bitmapRep release];
1509+>>>>>>> MERGE-SOURCE
1510 CGImageRelease(imageRef);
1511 [img retain];
1512 ImageMap::iterator it=images.find(type);
1513@@ -1884,7 +2008,7 @@
1514 @implementation ScintillaContextMenu : NSMenu
1515
1516 // This NSMenu subclass serves also as target for menu commands and forwards them as
1517-// notfication messages to the front end.
1518+// notification messages to the front end.
1519
1520 - (void) handleCommand: (NSMenuItem*) sender
1521 {
1522@@ -1939,8 +2063,13 @@
1523
1524 ElapsedTime::ElapsedTime() {
1525 struct timeval curTime;
1526+<<<<<<< TREE
1527 gettimeofday( &curTime, NULL );
1528
1529+=======
1530+ gettimeofday( &curTime, NULL );
1531+
1532+>>>>>>> MERGE-SOURCE
1533 bigBit = curTime.tv_sec;
1534 littleBit = curTime.tv_usec;
1535 }
1536@@ -1999,18 +2128,18 @@
1537 //--------------------------------------------------------------------------------------------------
1538
1539 /**
1540- * Returns the time span in which two consequtive mouse clicks must occur to be considered as
1541+ * Returns the time span in which two consecutive mouse clicks must occur to be considered as
1542 * double click.
1543 *
1544 * @return
1545 */
1546 unsigned int Platform::DoubleClickTime()
1547 {
1548- float threshold = [[NSUserDefaults standardUserDefaults] floatForKey:
1549+ float threshold = [[NSUserDefaults standardUserDefaults] floatForKey:
1550 @"com.apple.mouse.doubleClickThreshold"];
1551 if (threshold == 0)
1552 threshold = 0.5;
1553- return static_cast<unsigned int>(threshold / kEventDurationMillisecond);
1554+ return static_cast<unsigned int>(threshold * 1000.0);
1555 }
1556
1557 //--------------------------------------------------------------------------------------------------
1558@@ -2023,9 +2152,9 @@
1559 //--------------------------------------------------------------------------------------------------
1560
1561 /**
1562- * Helper method for the backend to reach through to the scintiall window.
1563+ * Helper method for the backend to reach through to the scintilla window.
1564 */
1565-long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam)
1566+long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam)
1567 {
1568 return scintilla_send_message(w, msg, wParam, lParam);
1569 }
1570@@ -2033,7 +2162,7 @@
1571 //--------------------------------------------------------------------------------------------------
1572
1573 /**
1574- * Helper method for the backend to reach through to the scintiall window.
1575+ * Helper method for the backend to reach through to the scintilla window.
1576 */
1577 long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam)
1578 {
1579@@ -2052,7 +2181,7 @@
1580 // Shift_jis
1581 return ((uch >= 0x81) && (uch <= 0x9F)) ||
1582 ((uch >= 0xE0) && (uch <= 0xFC));
1583- // Lead bytes F0 to FC may be a Microsoft addition.
1584+ // Lead bytes F0 to FC may be a Microsoft addition.
1585 case 936:
1586 // GBK
1587 return (uch >= 0x81) && (uch <= 0xFE);
1588@@ -2116,7 +2245,7 @@
1589 {
1590 const int BUF_SIZE = 2000;
1591 char buffer[BUF_SIZE];
1592-
1593+
1594 va_list pArguments;
1595 va_start(pArguments, format);
1596 vsnprintf(buffer, BUF_SIZE, format, pArguments);
1597@@ -2148,10 +2277,9 @@
1598 void Platform::Assert(const char *c, const char *file, int line)
1599 {
1600 char buffer[2000];
1601- sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line);
1602- strcat(buffer, "\r\n");
1603+ snprintf(buffer, sizeof(buffer), "Assertion [%s] failed at %s %d\r\n", c, file, line);
1604 Platform::DebugDisplay(buffer);
1605-#ifdef DEBUG
1606+#ifdef DEBUG
1607 // Jump into debugger in assert on Mac (CL269835)
1608 ::Debugger();
1609 #endif
1610@@ -2172,9 +2300,9 @@
1611
1612 /**
1613 * Implements the platform specific part of library loading.
1614- *
1615+ *
1616 * @param modulePath The path to the module to load.
1617- * @return A library instance or NULL if the module could not be found or another problem occured.
1618+ * @return A library instance or NULL if the module could not be found or another problem occurred.
1619 */
1620 DynamicLibrary* DynamicLibrary::Load(const char* /* modulePath */)
1621 {
1622
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 {
1628 public:
1629 /** Create a text layout for drawing on the specified context. */
1630- QuartzTextLayout( CGContextRef context )
1631+ explicit QuartzTextLayout( CGContextRef context )
1632 {
1633 mString = NULL;
1634 mLine = NULL;
1635@@ -39,7 +39,7 @@
1636 {
1637 CFRelease(mLine);
1638 mLine = NULL;
1639- }
1640+ }
1641 }
1642
1643 inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r )
1644@@ -47,19 +47,19 @@
1645 CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );
1646 if (!str)
1647 return;
1648-
1649+
1650 stringLength = CFStringGetLength(str);
1651
1652 CFMutableDictionaryRef stringAttribs = r.getCTStyle();
1653-
1654+
1655 if (mString != NULL)
1656 CFRelease(mString);
1657 mString = ::CFAttributedStringCreate(NULL, str, stringAttribs);
1658-
1659+
1660 if (mLine != NULL)
1661 CFRelease(mLine);
1662 mLine = ::CTLineCreateWithAttributedString(mString);
1663-
1664+
1665 CFRelease( str );
1666 }
1667
1668@@ -70,28 +70,28 @@
1669 {
1670 if (mLine == NULL)
1671 return;
1672-
1673+
1674 ::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0));
1675-
1676+
1677 // Set the text drawing position.
1678 ::CGContextSetTextPosition(gc, x, y);
1679-
1680+
1681 // And finally, draw!
1682 ::CTLineDraw(mLine, gc);
1683 }
1684-
1685+
1686 float MeasureStringWidth()
1687- {
1688+ {
1689 if (mLine == NULL)
1690 return 0.0f;
1691-
1692+
1693 return ::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL);
1694 }
1695-
1696+
1697 CTLineRef getCTLine() {
1698 return mLine;
1699 }
1700-
1701+
1702 CFIndex getStringLength() {
1703 return stringLength;
1704 }
1705
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 #include "PropSetSimple.h"
1711 #endif
1712
1713-#include "SVector.h"
1714 #include "SplitVector.h"
1715 #include "Partitioning.h"
1716 #include "RunStyles.h"
1717@@ -45,16 +44,19 @@
1718 #include "ViewStyle.h"
1719 #include "CharClassify.h"
1720 #include "Decoration.h"
1721+#include "CaseFolder.h"
1722 #include "Document.h"
1723 #include "Selection.h"
1724 #include "PositionCache.h"
1725 #include "Editor.h"
1726-//#include "ScintillaCallTip.h"
1727
1728 #include "ScintillaBase.h"
1729+#include "CaseConvert.h"
1730
1731 extern "C" NSString* ScintillaRecPboardType;
1732
1733+@class SCIContentView;
1734+@class SCIMarginView;
1735 @class ScintillaView;
1736
1737 @class FindHighlightLayer;
1738@@ -76,26 +78,6 @@
1739 namespace Scintilla {
1740
1741 /**
1742- * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
1743- * back to the parent. Therefore, there must be a callback handler that acts
1744- * like a Windows WndProc, where Scintilla can send notifications to. Use
1745- * ScintillaCocoa::RegisterNotifyHandler() to register such a handler.
1746- * Message format is:
1747- * <br>
1748- * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = 0 (no control ID), lParam = ScintillaCocoa*
1749- * <br>
1750- * WM_NOTIFY: wParam = 0 (no control ID), lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*
1751- */
1752-typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
1753-
1754-/**
1755- * Scintilla sends these two messages to the nofity handler. Please refer
1756- * to the Windows API doc for details about the message format.
1757- */
1758-#define WM_COMMAND 1001
1759-#define WM_NOTIFY 1002
1760-
1761-/**
1762 * Main scintilla class, implemented for OS X (Cocoa).
1763 */
1764 class ScintillaCocoa : public ScintillaBase
1765@@ -103,48 +85,76 @@
1766 private:
1767 TimerTarget* timerTarget;
1768 NSEvent* lastMouseEvent;
1769-
1770+
1771+ id<ScintillaNotificationProtocol> delegate;
1772+
1773 SciNotifyFunc notifyProc;
1774 intptr_t notifyObj;
1775
1776 bool capturedMouse;
1777
1778+ bool enteredSetScrollingSize;
1779+
1780 // Private so ScintillaCocoa objects can not be copied
1781 ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}
1782 ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }
1783
1784 bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);
1785 void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);
1786-
1787+
1788 int scrollSpeed;
1789 int scrollTicks;
1790+<<<<<<< TREE
1791 NSTimer* tickTimer;
1792 NSTimer* idleTimer;
1793
1794 FindHighlightLayer *layerFindIndicator;
1795
1796+=======
1797+ NSTimer* tickTimer;
1798+ NSTimer* idleTimer;
1799+ CFRunLoopObserverRef observer;
1800+
1801+ FindHighlightLayer *layerFindIndicator;
1802+
1803+>>>>>>> MERGE-SOURCE
1804 protected:
1805+ Point GetVisibleOriginInMain();
1806 PRectangle GetClientRectangle();
1807 Point ConvertPoint(NSPoint point);
1808-
1809+ virtual void RedrawRect(PRectangle rc);
1810+ virtual void Redraw();
1811+
1812 virtual void Initialise();
1813 virtual void Finalise();
1814 virtual CaseFolder *CaseFolderForEncoding();
1815 virtual std::string CaseMapString(const std::string &s, int caseMapping);
1816- virtual void CancelModes();
1817+<<<<<<< TREE
1818+ virtual void CancelModes();
1819+=======
1820+ virtual void CancelModes();
1821+
1822+>>>>>>> MERGE-SOURCE
1823 public:
1824- NSView* ContentView();
1825-
1826- ScintillaCocoa(NSView* view);
1827+ ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin);
1828 virtual ~ScintillaCocoa();
1829
1830+ void SetDelegate(id<ScintillaNotificationProtocol> delegate_);
1831 void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
1832 sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
1833
1834 ScintillaView* TopContainer();
1835+ NSScrollView* ScrollContainer();
1836+ SCIContentView* ContentView();
1837
1838- bool SyncPaint(void* gc, PRectangle rc);
1839- bool Draw(NSRect rect, CGContextRef gc);
1840+<<<<<<< TREE
1841+ bool SyncPaint(void* gc, PRectangle rc);
1842+ bool Draw(NSRect rect, CGContextRef gc);
1843+=======
1844+ bool SyncPaint(void* gc, PRectangle rc);
1845+ bool Draw(NSRect rect, CGContextRef gc);
1846+ void PaintMargin(NSRect aRect);
1847+>>>>>>> MERGE-SOURCE
1848
1849 virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
1850 void SetTicking(bool on);
1851@@ -155,9 +165,10 @@
1852 void SetVerticalScrollPos();
1853 void SetHorizontalScrollPos();
1854 bool ModifyScrollBars(int nMax, int nPage);
1855+ bool SetScrollingSize(void);
1856 void Resize();
1857- void DoScroll(float position, NSScrollerPart part, bool horizontal);
1858-
1859+ void UpdateForScroll();
1860+
1861 // Notifications for the owner.
1862 void NotifyChange();
1863 void NotifyFocus(bool focus);
1864@@ -179,13 +190,20 @@
1865 virtual void ClaimSelection();
1866
1867 NSPoint GetCaretPosition();
1868-
1869+
1870 static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
1871
1872 void TimerFired(NSTimer* timer);
1873 void IdleTimerFired();
1874+ static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci);
1875+ void ObserverAdd();
1876+ void ObserverRemove();
1877+ virtual void IdleWork();
1878+ virtual void QueueIdleWork(WorkNeeded::workItems items, int upTo);
1879 int InsertText(NSString* input);
1880-
1881+ void SelectOnlyMainSelection();
1882+ virtual void SetDocPointer(Document *document);
1883+
1884 bool KeyboardInput(NSEvent* event);
1885 void MouseDown(NSEvent* event);
1886 void MouseMove(NSEvent* event);
1887@@ -202,14 +220,14 @@
1888 void DraggingExited(id <NSDraggingInfo> info);
1889 bool PerformDragOperation(id <NSDraggingInfo> info);
1890 void DragScroll();
1891-
1892+
1893 // Promote some methods needed for NSResponder actions.
1894 virtual void SelectAll();
1895 void DeleteBackward();
1896 virtual void Cut();
1897 virtual void Undo();
1898 virtual void Redo();
1899-
1900+
1901 virtual NSMenu* CreateContextMenu(NSEvent* event);
1902 void HandleCommand(NSInteger command);
1903
1904
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 /**
1910 * Scintilla source code edit control
1911 * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase
1912- *
1913+ *
1914 * Written by Mike Lischke <mlischke@sun.com>
1915 *
1916 * Loosely based on ScintillaMacOSX.cxx.
1917@@ -15,6 +15,7 @@
1918 */
1919
1920 #import <Cocoa/Cocoa.h>
1921+<<<<<<< TREE
1922 #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
1923 #import <QuartzCore/CAGradientLayer.h>
1924 #endif
1925@@ -25,13 +26,21 @@
1926
1927 #include "ScintillaView.h"
1928 #include "PlatCocoa.h"
1929+=======
1930+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
1931+#import <QuartzCore/CAGradientLayer.h>
1932+#endif
1933+#import <QuartzCore/CAAnimation.h>
1934+#import <QuartzCore/CATransaction.h>
1935+
1936+#import "Platform.h"
1937+#import "ScintillaView.h"
1938+#import "ScintillaCocoa.h"
1939+#import "PlatCocoa.h"
1940+>>>>>>> MERGE-SOURCE
1941
1942 using namespace Scintilla;
1943
1944-#ifndef WM_UNICHAR
1945-#define WM_UNICHAR 0x0109
1946-#endif
1947-
1948 NSString* ScintillaRecPboardType = @"com.scintilla.utf16-plain-text.rectangular";
1949
1950 //--------------------------------------------------------------------------------------------------
1951@@ -139,6 +148,7 @@
1952
1953 //--------------------------------------------------------------------------------------------------
1954
1955+<<<<<<< TREE
1956 #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
1957
1958 // Only implement FindHighlightLayer on OS X 10.6+
1959@@ -307,6 +317,176 @@
1960
1961 //--------------------------------------------------------------------------------------------------
1962
1963+=======
1964+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
1965+
1966+// Only implement FindHighlightLayer on OS X 10.6+
1967+
1968+/**
1969+ * Class to display the animated gold roundrect used on OS X for matches.
1970+ */
1971+@interface FindHighlightLayer : CAGradientLayer
1972+{
1973+@private
1974+ NSString *sFind;
1975+ int positionFind;
1976+ BOOL retaining;
1977+ CGFloat widthText;
1978+ CGFloat heightLine;
1979+ NSString *sFont;
1980+ CGFloat fontSize;
1981+}
1982+
1983+@property (copy) NSString *sFind;
1984+@property (assign) int positionFind;
1985+@property (assign) BOOL retaining;
1986+@property (assign) CGFloat widthText;
1987+@property (assign) CGFloat heightLine;
1988+@property (copy) NSString *sFont;
1989+@property (assign) CGFloat fontSize;
1990+
1991+- (void) animateMatch: (CGPoint)ptText bounce:(BOOL)bounce;
1992+- (void) hideMatch;
1993+
1994+@end
1995+
1996+//--------------------------------------------------------------------------------------------------
1997+
1998+@implementation FindHighlightLayer
1999+
2000+@synthesize sFind, positionFind, retaining, widthText, heightLine, sFont, fontSize;
2001+
2002+-(id) init {
2003+ if (self = [super init]) {
2004+ [self setNeedsDisplayOnBoundsChange: YES];
2005+ // A gold to slightly redder gradient to match other applications
2006+ CGColorRef colGold = CGColorCreateGenericRGB(1.0, 1.0, 0, 1.0);
2007+ CGColorRef colGoldRed = CGColorCreateGenericRGB(1.0, 0.8, 0, 1.0);
2008+ self.colors = [NSArray arrayWithObjects:(id)colGoldRed, (id)colGold, nil];
2009+ CGColorRelease(colGoldRed);
2010+ CGColorRelease(colGold);
2011+
2012+ CGColorRef colGreyBorder = CGColorCreateGenericGray(0.756f, 0.5f);
2013+ self.borderColor = colGreyBorder;
2014+ CGColorRelease(colGreyBorder);
2015+
2016+ self.borderWidth = 1.0;
2017+ self.cornerRadius = 5.0f;
2018+ self.shadowRadius = 1.0f;
2019+ self.shadowOpacity = 0.9f;
2020+ self.shadowOffset = CGSizeMake(0.0f, -2.0f);
2021+ self.anchorPoint = CGPointMake(0.5, 0.5);
2022+ }
2023+ return self;
2024+
2025+}
2026+
2027+const CGFloat paddingHighlightX = 4;
2028+const CGFloat paddingHighlightY = 2;
2029+
2030+-(void) drawInContext:(CGContextRef)context {
2031+ if (!sFind || !sFont)
2032+ return;
2033+
2034+ CFStringRef str = CFStringRef(sFind);
2035+
2036+ CFMutableDictionaryRef styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
2037+ &kCFTypeDictionaryKeyCallBacks,
2038+ &kCFTypeDictionaryValueCallBacks);
2039+ CGColorRef color = CGColorCreateGenericRGB(0.0, 0.0, 0.0, 1.0);
2040+ CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, color);
2041+ CTFontRef fontRef = ::CTFontCreateWithName((CFStringRef)sFont, fontSize, NULL);
2042+ CFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);
2043+
2044+ CFAttributedStringRef attrString = ::CFAttributedStringCreate(NULL, str, styleDict);
2045+ CTLineRef textLine = ::CTLineCreateWithAttributedString(attrString);
2046+ // Indent from corner of bounds
2047+ CGContextSetTextPosition(context, paddingHighlightX, 3 + paddingHighlightY);
2048+ CTLineDraw(textLine, context);
2049+
2050+ CFRelease(textLine);
2051+ CFRelease(attrString);
2052+ CFRelease(fontRef);
2053+ CGColorRelease(color);
2054+ CFRelease(styleDict);
2055+}
2056+
2057+- (void) animateMatch: (CGPoint)ptText bounce:(BOOL)bounce {
2058+ if (!self.sFind || ![self.sFind length]) {
2059+ [self hideMatch];
2060+ return;
2061+ }
2062+
2063+ CGFloat width = self.widthText + paddingHighlightX * 2;
2064+ CGFloat height = self.heightLine + paddingHighlightY * 2;
2065+
2066+ CGFloat flipper = self.geometryFlipped ? -1.0 : 1.0;
2067+
2068+ // Adjust for padding
2069+ ptText.x -= paddingHighlightX;
2070+ ptText.y += flipper * paddingHighlightY;
2071+
2072+ // Shift point to centre as expanding about centre
2073+ ptText.x += width / 2.0;
2074+ ptText.y -= flipper * height / 2.0;
2075+
2076+ [CATransaction begin];
2077+ [CATransaction setValue:[NSNumber numberWithFloat:0.0] forKey:kCATransactionAnimationDuration];
2078+ self.bounds = CGRectMake(0,0, width, height);
2079+ self.position = ptText;
2080+ if (bounce) {
2081+ // Do not reset visibility when just moving
2082+ self.hidden = NO;
2083+ self.opacity = 1.0;
2084+ }
2085+ [self setNeedsDisplay];
2086+ [CATransaction commit];
2087+
2088+ if (bounce) {
2089+ CABasicAnimation *animBounce = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
2090+ animBounce.duration = 0.15;
2091+ animBounce.autoreverses = YES;
2092+ animBounce.removedOnCompletion = NO;
2093+ animBounce.fromValue = [NSNumber numberWithFloat: 1.0];
2094+ animBounce.toValue = [NSNumber numberWithFloat: 1.25];
2095+
2096+ if (self.retaining) {
2097+
2098+ [self addAnimation: animBounce forKey:@"animateFound"];
2099+
2100+ } else {
2101+
2102+ CABasicAnimation *animFade = [CABasicAnimation animationWithKeyPath:@"opacity"];
2103+ animFade.duration = 0.1;
2104+ animFade.beginTime = 0.4;
2105+ animFade.removedOnCompletion = NO;
2106+ animFade.fromValue = [NSNumber numberWithFloat: 1.0];
2107+ animFade.toValue = [NSNumber numberWithFloat: 0.0];
2108+
2109+ CAAnimationGroup *group = [CAAnimationGroup animation];
2110+ [group setDuration:0.5];
2111+ group.removedOnCompletion = NO;
2112+ group.fillMode = kCAFillModeForwards;
2113+ [group setAnimations:[NSArray arrayWithObjects:animBounce, animFade, nil]];
2114+
2115+ [self addAnimation:group forKey:@"animateFound"];
2116+ }
2117+ }
2118+}
2119+
2120+- (void) hideMatch {
2121+ self.sFind = @"";
2122+ self.positionFind = INVALID_POSITION;
2123+ self.hidden = YES;
2124+}
2125+
2126+@end
2127+
2128+#endif
2129+
2130+//--------------------------------------------------------------------------------------------------
2131+
2132+>>>>>>> MERGE-SOURCE
2133 @implementation TimerTarget
2134
2135 - (id) init: (void*) target
2136@@ -318,9 +498,9 @@
2137
2138 // Get the default notification queue for the thread which created the instance (usually the
2139 // main thread). We need that later for idle event processing.
2140- NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
2141+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
2142 notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center];
2143- [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil];
2144+ [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil];
2145 }
2146 return self;
2147 }
2148@@ -329,8 +509,13 @@
2149
2150 - (void) dealloc
2151 {
2152+<<<<<<< TREE
2153 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
2154 [center removeObserver: self];
2155+=======
2156+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
2157+ [center removeObserver:self];
2158+>>>>>>> MERGE-SOURCE
2159 [notificationQueue release];
2160 [super dealloc];
2161 }
2162@@ -358,11 +543,11 @@
2163 // Post a new idle notification, which gets executed when the run loop is idle.
2164 // Since we are coalescing on name and sender there will always be only one actual notification
2165 // even for multiple requests.
2166- NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self];
2167+ NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self];
2168 [notificationQueue enqueueNotification: notification
2169 postingStyle: NSPostWhenIdle
2170 coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender)
2171- forModes: nil];
2172+ forModes: nil];
2173 }
2174
2175 //--------------------------------------------------------------------------------------------------
2176@@ -381,11 +566,30 @@
2177
2178 //----------------- ScintillaCocoa -----------------------------------------------------------------
2179
2180-ScintillaCocoa::ScintillaCocoa(NSView* view)
2181+ScintillaCocoa::ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin)
2182 {
2183- wMain = view; // Don't retain since we're owned by view, which would cause a cycle
2184- timerTarget = [[TimerTarget alloc] init: this];
2185- layerFindIndicator = NULL;
2186+<<<<<<< TREE
2187+ wMain = view; // Don't retain since we're owned by view, which would cause a cycle
2188+ timerTarget = [[TimerTarget alloc] init: this];
2189+ layerFindIndicator = NULL;
2190+=======
2191+ vs.marginInside = false;
2192+ wMain = view; // Don't retain since we're owned by view, which would cause a cycle
2193+ wMargin = viewMargin;
2194+ timerTarget = [[TimerTarget alloc] init: this];
2195+ lastMouseEvent = NULL;
2196+ delegate = NULL;
2197+ notifyObj = NULL;
2198+ notifyProc = NULL;
2199+ capturedMouse = false;
2200+ enteredSetScrollingSize = false;
2201+ scrollSpeed = 1;
2202+ scrollTicks = 2000;
2203+ tickTimer = NULL;
2204+ idleTimer = NULL;
2205+ observer = NULL;
2206+ layerFindIndicator = NULL;
2207+>>>>>>> MERGE-SOURCE
2208 Initialise();
2209 }
2210
2211@@ -393,7 +597,7 @@
2212
2213 ScintillaCocoa::~ScintillaCocoa()
2214 {
2215- SetTicking(false);
2216+ Finalise();
2217 [timerTarget release];
2218 }
2219
2220@@ -402,29 +606,20 @@
2221 /**
2222 * Core initialization of the control. Everything that needs to be set up happens here.
2223 */
2224-void ScintillaCocoa::Initialise()
2225+void ScintillaCocoa::Initialise()
2226 {
2227- static bool initedLexers = false;
2228- if (!initedLexers)
2229- {
2230- initedLexers = true;
2231- Scintilla_LinkLexers();
2232- }
2233- notifyObj = NULL;
2234- notifyProc = NULL;
2235-
2236- capturedMouse = false;
2237-
2238+ Scintilla_LinkLexers();
2239+
2240 // Tell Scintilla not to buffer: Quartz buffers drawing for us.
2241 WndProc(SCI_SETBUFFEREDDRAW, 0, 0);
2242-
2243+
2244 // We are working with Unicode exclusively.
2245 WndProc(SCI_SETCODEPAGE, SC_CP_UTF8, 0);
2246
2247 // Add Mac specific key bindings.
2248- for (int i = 0; macMapDefault[i].key; i++)
2249+ for (int i = 0; macMapDefault[i].key; i++)
2250 kmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg);
2251-
2252+
2253 }
2254
2255 //--------------------------------------------------------------------------------------------------
2256@@ -434,12 +629,70 @@
2257 */
2258 void ScintillaCocoa::Finalise()
2259 {
2260+ ObserverRemove();
2261 SetTicking(false);
2262 ScintillaBase::Finalise();
2263 }
2264
2265 //--------------------------------------------------------------------------------------------------
2266
2267+void ScintillaCocoa::UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) {
2268+ ScintillaCocoa* sci = reinterpret_cast<ScintillaCocoa*>(info);
2269+ sci->IdleWork();
2270+}
2271+
2272+//--------------------------------------------------------------------------------------------------
2273+
2274+/**
2275+ * Add an observer to the run loop to perform styling as high-priority idle task.
2276+ */
2277+
2278+void ScintillaCocoa::ObserverAdd() {
2279+ if (!observer) {
2280+ CFRunLoopObserverContext context;
2281+ context.version = 0;
2282+ context.info = this;
2283+ context.retain = NULL;
2284+ context.release = NULL;
2285+ context.copyDescription = NULL;
2286+
2287+ CFRunLoopRef mainRunLoop = CFRunLoopGetMain();
2288+ observer = CFRunLoopObserverCreate(NULL, kCFRunLoopEntry | kCFRunLoopBeforeWaiting,
2289+ true, 0, UpdateObserver, &context);
2290+ CFRunLoopAddObserver(mainRunLoop, observer, kCFRunLoopCommonModes);
2291+ }
2292+}
2293+
2294+//--------------------------------------------------------------------------------------------------
2295+
2296+/**
2297+ * Remove the run loop observer.
2298+ */
2299+void ScintillaCocoa::ObserverRemove() {
2300+ if (observer) {
2301+ CFRunLoopRef mainRunLoop = CFRunLoopGetMain();
2302+ CFRunLoopRemoveObserver(mainRunLoop, observer, kCFRunLoopCommonModes);
2303+ CFRelease(observer);
2304+ }
2305+ observer = NULL;
2306+}
2307+
2308+//--------------------------------------------------------------------------------------------------
2309+
2310+void ScintillaCocoa::IdleWork() {
2311+ Editor::IdleWork();
2312+ ObserverRemove();
2313+}
2314+
2315+//--------------------------------------------------------------------------------------------------
2316+
2317+void ScintillaCocoa::QueueIdleWork(WorkNeeded::workItems items, int upTo) {
2318+ Editor::QueueIdleWork(items, upTo);
2319+ ObserverAdd();
2320+}
2321+
2322+//--------------------------------------------------------------------------------------------------
2323+
2324 /**
2325 * Convert a core foundation string into an array of bytes in a particular encoding
2326 */
2327@@ -449,7 +702,7 @@
2328 CFIndex usedLen = 0;
2329 CFStringGetBytes(cfsRef, rangeAll, encoding, '?',
2330 false, NULL, 0, &usedLen);
2331-
2332+
2333 char *buffer = new char[usedLen+1];
2334 CFStringGetBytes(cfsRef, rangeAll, encoding, '?',
2335 false, (UInt8 *)buffer,usedLen, NULL);
2336@@ -463,6 +716,7 @@
2337 * Case folders.
2338 */
2339
2340+<<<<<<< TREE
2341 class CaseFolderUTF8 : public CaseFolderTable {
2342 public:
2343 CaseFolderUTF8() {
2344@@ -494,10 +748,12 @@
2345 }
2346 };
2347
2348+=======
2349+>>>>>>> MERGE-SOURCE
2350 class CaseFolderDBCS : public CaseFolderTable {
2351 CFStringEncoding encoding;
2352 public:
2353- CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) {
2354+ explicit CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) {
2355 StandardASCII();
2356 }
2357 virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) {
2358@@ -506,12 +762,12 @@
2359 return 1;
2360 } else {
2361 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
2362- reinterpret_cast<const UInt8 *>(mixed),
2363+ reinterpret_cast<const UInt8 *>(mixed),
2364 lenMixed, encoding, false);
2365
2366 NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch
2367 locale:[NSLocale currentLocale]];
2368-
2369+
2370 char *encoded = EncodedBytes((CFStringRef)sMapped, encoding);
2371
2372 size_t lenMapped = strlen(encoded);
2373@@ -533,7 +789,7 @@
2374
2375 CaseFolder *ScintillaCocoa::CaseFolderForEncoding() {
2376 if (pdoc->dbcsCodePage == SC_CP_UTF8) {
2377- return new CaseFolderUTF8();
2378+ return new CaseFolderUnicode();
2379 } else {
2380 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
2381 vs.styles[STYLE_DEFAULT].characterSet);
2382@@ -545,18 +801,20 @@
2383 char sCharacter[2] = "A";
2384 sCharacter[0] = i;
2385 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
2386- reinterpret_cast<const UInt8 *>(sCharacter),
2387+ reinterpret_cast<const UInt8 *>(sCharacter),
2388 1, encoding, false);
2389-
2390+ if (!cfsVal)
2391+ continue;
2392+
2393 NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch
2394 locale:[NSLocale currentLocale]];
2395-
2396+
2397 char *encoded = EncodedBytes((CFStringRef)sMapped, encoding);
2398-
2399+
2400 if (strlen(encoded) == 1) {
2401 pcf->SetTranslation(sCharacter[0], encoded[0]);
2402 }
2403-
2404+
2405 delete []encoded;
2406 CFRelease(cfsVal);
2407 }
2408@@ -576,10 +834,21 @@
2409 */
2410 std::string ScintillaCocoa::CaseMapString(const std::string &s, int caseMapping)
2411 {
2412+ if ((s.size() == 0) || (caseMapping == cmSame))
2413+ return s;
2414+
2415+ if (IsUnicodeMode()) {
2416+ std::string retMapped(s.length() * maxExpansionCaseConversion, 0);
2417+ size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),
2418+ (caseMapping == cmUpper) ? CaseConversionUpper : CaseConversionLower);
2419+ retMapped.resize(lenMapped);
2420+ return retMapped;
2421+ }
2422+
2423 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
2424 vs.styles[STYLE_DEFAULT].characterSet);
2425 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
2426- reinterpret_cast<const UInt8 *>(s.c_str()),
2427+ reinterpret_cast<const UInt8 *>(s.c_str()),
2428 s.length(), encoding, false);
2429
2430 NSString *sMapped;
2431@@ -621,7 +890,17 @@
2432 ScintillaView* ScintillaCocoa::TopContainer()
2433 {
2434 NSView* container = static_cast<NSView*>(wMain.GetID());
2435- return static_cast<ScintillaView*>([container superview]);
2436+ return static_cast<ScintillaView*>([[[container superview] superview] superview]);
2437+}
2438+
2439+//--------------------------------------------------------------------------------------------------
2440+
2441+/**
2442+ * Helper function to get the scrolling view.
2443+ */
2444+NSScrollView* ScintillaCocoa::ScrollContainer() {
2445+ NSView* container = static_cast<NSView*>(wMain.GetID());
2446+ return static_cast<NSScrollView*>([[container superview] superview]);
2447 }
2448
2449 //--------------------------------------------------------------------------------------------------
2450@@ -629,9 +908,21 @@
2451 /**
2452 * Helper function to get the inner container which represents the actual "canvas" we work with.
2453 */
2454-NSView* ScintillaCocoa::ContentView()
2455-{
2456- return static_cast<NSView*>(wMain.GetID());
2457+SCIContentView* ScintillaCocoa::ContentView()
2458+{
2459+ return static_cast<SCIContentView*>(wMain.GetID());
2460+}
2461+
2462+//--------------------------------------------------------------------------------------------------
2463+
2464+/**
2465+ * Return the top left visible point relative to the origin point of the whole document.
2466+ */
2467+Scintilla::Point ScintillaCocoa::GetVisibleOriginInMain()
2468+{
2469+ NSScrollView *scrollView = ScrollContainer();
2470+ NSRect contentRect = [[scrollView contentView] bounds];
2471+ return Point(contentRect.origin.x, contentRect.origin.y);
2472 }
2473
2474 //--------------------------------------------------------------------------------------------------
2475@@ -639,42 +930,67 @@
2476 /**
2477 * Instead of returning the size of the inner view we have to return the visible part of it
2478 * in order to make scrolling working properly.
2479+ * The returned value is in document coordinates.
2480 */
2481 PRectangle ScintillaCocoa::GetClientRectangle()
2482 {
2483- NSView* host = ContentView();
2484- NSSize size = [host frame].size;
2485- return PRectangle(0, 0, size.width, size.height);
2486+ NSScrollView *scrollView = ScrollContainer();
2487+ NSSize size = [[scrollView contentView] bounds].size;
2488+ Point origin = GetVisibleOriginInMain();
2489+ return PRectangle(origin.x, origin.y, origin.x+size.width, origin.y + size.height);
2490 }
2491
2492 //--------------------------------------------------------------------------------------------------
2493
2494 /**
2495 * Converts the given point from base coordinates to local coordinates and at the same time into
2496- * a native Point structure. Base coordinates are used for the top window used in the view hierarchy.
2497+ * a native Point structure. Base coordinates are used for the top window used in the view hierarchy.
2498+ * Returned value is in view coordinates.
2499 */
2500 Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point)
2501 {
2502 NSView* container = ContentView();
2503 NSPoint result = [container convertPoint: point fromView: nil];
2504-
2505- return Point(result.x, result.y);
2506+ Scintilla::Point ptOrigin = GetVisibleOriginInMain();
2507+ return Point(result.x - ptOrigin.x, result.y - ptOrigin.y);
2508+}
2509+
2510+//--------------------------------------------------------------------------------------------------
2511+
2512+/**
2513+ * Do not clip like superclass as Cocoa is not reporting all of prepared area.
2514+ */
2515+void ScintillaCocoa::RedrawRect(PRectangle rc)
2516+{
2517+ if (!rc.Empty())
2518+ wMain.InvalidateRectangle(rc);
2519+}
2520+
2521+//--------------------------------------------------------------------------------------------------
2522+
2523+/**
2524+ * Ensure all of prepared content is also redrawn.
2525+ */
2526+void ScintillaCocoa::Redraw()
2527+{
2528+ wMargin.InvalidateAll();
2529+ wMain.InvalidateAll();
2530 }
2531
2532 //--------------------------------------------------------------------------------------------------
2533
2534 /**
2535 * A function to directly execute code that would usually go the long way via window messages.
2536- * However this is a Windows metapher and not used here, hence we just call our fake
2537+ * However this is a Windows metaphor and not used here, hence we just call our fake
2538 * window proc. The given parameters directly reflect the message parameters used on Windows.
2539 *
2540 * @param sciThis The target which is to be called.
2541 * @param iMessage A code that indicates which message was sent.
2542- * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter
2543+ * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter
2544 * (hence the w prefix).
2545 * @param lParam The other of the two free parameters. A signed long.
2546 */
2547-sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam,
2548+sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam,
2549 sptr_t lParam)
2550 {
2551 return sciThis->WndProc(iMessage, wParam, lParam);
2552@@ -695,12 +1011,12 @@
2553
2554 //--------------------------------------------------------------------------------------------------
2555
2556-/**
2557+/**
2558 * That's our fake window procedure. On Windows each window has a dedicated procedure to handle
2559 * commands (also used to synchronize UI and background threads), which is not the case in Cocoa.
2560- *
2561+ *
2562 * Messages handled here are almost solely for special commands of the backend. Everything which
2563- * would be sytem messages on Windows (e.g. for key down, mouse move etc.) are handled by
2564+ * would be system messages on Windows (e.g. for key down, mouse move etc.) are handled by
2565 * directly calling appropriate handlers.
2566 */
2567 sptr_t ScintillaCocoa::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
2568@@ -709,19 +1025,20 @@
2569 {
2570 case SCI_GETDIRECTFUNCTION:
2571 return reinterpret_cast<sptr_t>(DirectFunction);
2572-
2573+
2574 case SCI_GETDIRECTPOINTER:
2575 return reinterpret_cast<sptr_t>(this);
2576-
2577+
2578 case SCI_GRABFOCUS:
2579- [[ContentView() window] makeFirstResponder:ContentView()];
2580+ [[ContentView() window] makeFirstResponder:ContentView()];
2581 break;
2582
2583 case SCI_SETBUFFEREDDRAW:
2584- // Buffered drawing not supported on Cocoa
2585+ // Buffered drawing not supported on Cocoa
2586 bufferedDraw = false;
2587 break;
2588
2589+<<<<<<< TREE
2590 case SCI_FINDINDICATORSHOW:
2591 ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES);
2592 return 0;
2593@@ -747,9 +1064,23 @@
2594 }
2595 return 0;
2596
2597+=======
2598+ case SCI_FINDINDICATORSHOW:
2599+ ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES);
2600+ return 0;
2601+
2602+ case SCI_FINDINDICATORFLASH:
2603+ ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), NO);
2604+ return 0;
2605+
2606+ case SCI_FINDINDICATORHIDE:
2607+ HideFindIndicator();
2608+ return 0;
2609+
2610+>>>>>>> MERGE-SOURCE
2611 default:
2612 sptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam);
2613-
2614+
2615 return r;
2616 }
2617 return 0l;
2618@@ -758,7 +1089,7 @@
2619 //--------------------------------------------------------------------------------------------------
2620
2621 /**
2622- * In Windows lingo this is the handler which handles anything that wasn't handled in the normal
2623+ * In Windows lingo this is the handler which handles anything that wasn't handled in the normal
2624 * window proc which would usually send the message back to generic window proc that Windows uses.
2625 */
2626 sptr_t ScintillaCocoa::DefWndProc(unsigned int, uptr_t, sptr_t)
2627@@ -849,7 +1180,7 @@
2628 {
2629 if (!Editor::CanPaste())
2630 return false;
2631-
2632+
2633 return GetPasteboardData([NSPasteboard generalPasteboard], NULL);
2634 }
2635
2636@@ -871,25 +1202,25 @@
2637 bool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText);
2638 if (forceRectangular)
2639 selectedText.rectangular = forceRectangular;
2640-
2641- if (!ok || !selectedText.s)
2642+
2643+ if (!ok || selectedText.Empty())
2644 // No data or no flavor we support.
2645 return;
2646-
2647+
2648 pdoc->BeginUndoAction();
2649 ClearSelection(false);
2650- int length = selectedText.len - 1; // One less to avoid inserting the terminating 0 character.
2651+ int length = selectedText.Length();
2652+ SelectionPosition selStart = sel.RangeMain().Start();
2653 if (selectedText.rectangular)
2654 {
2655- SelectionPosition selStart = sel.RangeMain().Start();
2656- PasteRectangular(selStart, selectedText.s, length);
2657- }
2658- else
2659- if (pdoc->InsertString(sel.RangeMain().caret.Position(), selectedText.s, length))
2660- SetEmptySelection(sel.RangeMain().caret.Position() + length);
2661-
2662+ PasteRectangular(selStart, selectedText.Data(), length);
2663+ }
2664+ else
2665+ {
2666+ InsertPaste(selStart, selectedText.Data(), length);
2667+ }
2668 pdoc->EndUndoAction();
2669-
2670+
2671 Redraw();
2672 EnsureCaretVisible();
2673 }
2674@@ -923,7 +1254,7 @@
2675 if (self) {
2676 sci = NULL;
2677 }
2678-
2679+
2680 return self;
2681 }
2682
2683@@ -971,7 +1302,7 @@
2684 void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) {
2685 if (!ct.wCallTip.Created()) {
2686 NSRect ctRect = NSMakeRect(rc.top,rc.bottom, rc.Width(), rc.Height());
2687- NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect
2688+ NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect
2689 styleMask: NSBorderlessWindowMask
2690 backing: NSBackingStoreBuffered
2691 defer: NO];
2692@@ -994,8 +1325,13 @@
2693 ScintillaContextMenu *menu= reinterpret_cast<ScintillaContextMenu*>(popup.GetID());
2694 [menu setOwner: this];
2695 [menu setAutoenablesItems: NO];
2696+<<<<<<< TREE
2697
2698 if (cmd == 0) {
2699+=======
2700+
2701+ if (cmd == 0) {
2702+>>>>>>> MERGE-SOURCE
2703 item = [NSMenuItem separatorItem];
2704 } else {
2705 item = [[[NSMenuItem alloc] init] autorelease];
2706@@ -1005,7 +1341,7 @@
2707 [item setAction: @selector(handleCommand:)];
2708 [item setTag: cmd];
2709 [item setEnabled: enabled];
2710-
2711+
2712 [menu addItem: item];
2713 }
2714
2715@@ -1051,7 +1387,7 @@
2716 int line = pdoc->LineFromPosition(posDrag.Position());
2717 int currentVisibleLine = cs.DisplayFromDoc(line);
2718 int lastVisibleLine = Platform::Minimum(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2;
2719-
2720+
2721 if (currentVisibleLine <= topLine && topLine > 0)
2722 ScrollTo(topLine - scrollSpeed);
2723 else
2724@@ -1063,9 +1399,9 @@
2725 scrollTicks = 2000;
2726 return;
2727 }
2728-
2729+
2730 // TODO: also handle horizontal scrolling.
2731-
2732+
2733 if (scrollSpeed == 1)
2734 {
2735 scrollTicks -= timer.tickSize;
2736@@ -1075,7 +1411,7 @@
2737 scrollTicks = 2000;
2738 }
2739 }
2740-
2741+
2742 }
2743
2744 //--------------------------------------------------------------------------------------------------
2745@@ -1088,12 +1424,14 @@
2746 if (sel.Empty())
2747 return;
2748
2749+ inDragDrop = ddDragging;
2750+
2751 // Put the data to be dragged on the drag pasteboard.
2752 SelectionText selectedText;
2753 NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
2754 CopySelectionRange(&selectedText);
2755 SetPasteboardData(pasteboard, selectedText);
2756-
2757+
2758 // calculate the bounds of the selection
2759 PRectangle client = GetTextRectangle();
2760 int selStart = sel.RangeMain().Start().Position();
2761@@ -1102,14 +1440,14 @@
2762 int endLine = pdoc->LineFromPosition(selEnd);
2763 Point pt;
2764 long startPos, endPos, ep;
2765- Rect rcSel;
2766-
2767+ PRectangle rcSel;
2768+
2769 if (startLine==endLine && WndProc(SCI_GETWRAPMODE, 0, 0) != SC_WRAP_NONE) {
2770 // Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87571
2771 // Scintilla bug https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040200&group_id=2439
2772 // If the width on a wrapped-line selection is negative,
2773 // find a better bounding rectangle.
2774-
2775+
2776 Point ptStart, ptEnd;
2777 startPos = WndProc(SCI_GETLINESELSTARTPOSITION, startLine, 0);
2778 endPos = WndProc(SCI_GETLINESELENDPOSITION, startLine, 0);
2779@@ -1163,19 +1501,16 @@
2780 }
2781 // must convert to global coordinates for drag regions, but also save the
2782 // image rectangle for further calculations and copy operations
2783- PRectangle localRectangle = PRectangle(rcSel.left, rcSel.top, rcSel.right, rcSel.bottom);
2784-
2785+
2786 // Prepare drag image.
2787- NSRect selectionRectangle = PRectangleToNSRect(localRectangle);
2788-
2789+ NSRect selectionRectangle = PRectangleToNSRect(rcSel);
2790+
2791 NSView* content = ContentView();
2792-
2793-#if 1
2794
2795 // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface.
2796 SurfaceImpl *sw = new SurfaceImpl();
2797 SurfaceImpl *pixmap = NULL;
2798-
2799+
2800 bool lastHideSelection = hideSelection;
2801 hideSelection = true;
2802 if (sw)
2803@@ -1183,26 +1518,27 @@
2804 pixmap = new SurfaceImpl();
2805 if (pixmap)
2806 {
2807- PRectangle imageRect = NSRectToPRectangle(selectionRectangle);
2808+ PRectangle imageRect = rcSel;
2809 paintState = painting;
2810 sw->InitPixMap(client.Width(), client.Height(), NULL, NULL);
2811 paintingAllText = true;
2812- // Have to create a new context and make current as text drawing goes
2813+ // Have to create a new context and make current as text drawing goes
2814 // to the current context, not a passed context.
2815- CGContextRef gcsw = sw->GetContext();
2816- NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort: gcsw
2817+ CGContextRef gcsw = sw->GetContext();
2818+ NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort: gcsw
2819 flipped: YES];
2820 [NSGraphicsContext setCurrentContext:nsgc];
2821+ CGContextTranslateCTM(gcsw, -client.left, -client.top);
2822 Paint(sw, client);
2823 paintState = notPainting;
2824-
2825+
2826 pixmap->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL);
2827-
2828- CGContextRef gc = pixmap->GetContext();
2829+
2830+ CGContextRef gc = pixmap->GetContext();
2831 // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin
2832 CGContextTranslateCTM(gc, 0, imageRect.Height());
2833 CGContextScaleCTM(gc, 1.0, -1.0);
2834-
2835+
2836 pixmap->CopyImageRectangle(*sw, imageRect, PRectangle(0, 0, imageRect.Width(), imageRect.Height()));
2837 // XXX TODO: overwrite any part of the image that is not part of the
2838 // selection to make it transparent. right now we just use
2839@@ -1212,7 +1548,7 @@
2840 delete sw;
2841 }
2842 hideSelection = lastHideSelection;
2843-
2844+
2845 NSBitmapImageRep* bitmap = NULL;
2846 if (pixmap)
2847 {
2848@@ -1222,29 +1558,20 @@
2849 pixmap->Release();
2850 delete pixmap;
2851 }
2852-#else
2853-
2854- // Poor man's drag image: take a snapshot of the content view.
2855- [content lockFocus];
2856- NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: selectionRectangle] autorelease];
2857- [bitmap setColorSpaceName: NSDeviceRGBColorSpace];
2858- [content unlockFocus];
2859-
2860-#endif
2861-
2862+
2863 NSImage* image = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];
2864 [image addRepresentation: bitmap];
2865-
2866+
2867 NSImage* dragImage = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];
2868 [dragImage setBackgroundColor: [NSColor clearColor]];
2869 [dragImage lockFocus];
2870- [image dissolveToPoint: NSMakePoint(0.0, 0.0) fraction: 0.5];
2871+ [image drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 0.5];
2872 [dragImage unlockFocus];
2873-
2874+
2875 NSPoint startPoint;
2876- startPoint.x = selectionRectangle.origin.x;
2877- startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height;
2878- [content dragImage: dragImage
2879+ startPoint.x = selectionRectangle.origin.x + client.left;
2880+ startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height + client.top;
2881+ [content dragImage: dragImage
2882 at: startPoint
2883 offset: NSZeroSize
2884 event: lastMouseEvent // Set in MouseMove.
2885@@ -1260,7 +1587,6 @@
2886 */
2887 NSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info)
2888 {
2889- inDragDrop = ddDragging;
2890 return DraggingUpdated(info);
2891 }
2892
2893@@ -1273,22 +1599,22 @@
2894 */
2895 NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info)
2896 {
2897- // Convert the drag location from window coordinates to view coordinates and
2898+ // Convert the drag location from window coordinates to view coordinates and
2899 // from there to a text position to finally set the drag position.
2900 Point location = ConvertPoint([info draggingLocation]);
2901 SetDragPosition(SPositionFromLocation(location));
2902-
2903+
2904 NSDragOperation sourceDragMask = [info draggingSourceOperationMask];
2905 if (sourceDragMask == NSDragOperationNone)
2906 return sourceDragMask;
2907-
2908+
2909 NSPasteboard* pasteboard = [info draggingPasteboard];
2910-
2911+
2912 // Return what type of operation we will perform. Prefer move over copy.
2913 if ([[pasteboard types] containsObject: NSStringPboardType] ||
2914 [[pasteboard types] containsObject: ScintillaRecPboardType])
2915 return (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy;
2916-
2917+
2918 if ([[pasteboard types] containsObject: NSFilenamesPboardType])
2919 return (sourceDragMask & NSDragOperationGeneric);
2920 return NSDragOperationNone;
2921@@ -1314,7 +1640,7 @@
2922 bool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info)
2923 {
2924 NSPasteboard* pasteboard = [info draggingPasteboard];
2925-
2926+
2927 if ([[pasteboard types] containsObject: NSFilenamesPboardType])
2928 {
2929 NSArray* files = [pasteboard propertyListForType: NSFilenamesPboardType];
2930@@ -1325,13 +1651,13 @@
2931 {
2932 SelectionText text;
2933 GetPasteboardData(pasteboard, &text);
2934-
2935- if (text.len > 0)
2936+
2937+ if (text.Length() > 0)
2938 {
2939 NSDragOperation operation = [info draggingSourceOperationMask];
2940 bool moving = (operation & NSDragOperationMove) != 0;
2941-
2942- DropAt(posDrag, text.s, moving, text.rectangular);
2943+
2944+ DropAt(posDrag, text.Data(), text.Length(), moving, text.rectangular);
2945 };
2946 }
2947
2948@@ -1342,26 +1668,26 @@
2949
2950 void ScintillaCocoa::SetPasteboardData(NSPasteboard* board, const SelectionText &selectedText)
2951 {
2952- if (selectedText.len == 0)
2953+ if (selectedText.Length() == 0)
2954 return;
2955
2956 CFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8,
2957 selectedText.characterSet);
2958 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
2959- reinterpret_cast<const UInt8 *>(selectedText.s),
2960- selectedText.len-1, encoding, false);
2961-
2962- [board declareTypes:[NSArray arrayWithObjects:
2963- NSStringPboardType,
2964- selectedText.rectangular ? ScintillaRecPboardType : nil,
2965- nil] owner:nil];
2966-
2967+ reinterpret_cast<const UInt8 *>(selectedText.Data()),
2968+ selectedText.Length(), encoding, false);
2969+
2970+ NSArray *pbTypes = selectedText.rectangular ?
2971+ [NSArray arrayWithObjects: NSStringPboardType, ScintillaRecPboardType, nil] :
2972+ [NSArray arrayWithObjects: NSStringPboardType, nil];
2973+ [board declareTypes:pbTypes owner:nil];
2974+
2975 if (selectedText.rectangular)
2976 {
2977 // This is specific to scintilla, allows us to drag rectangular selections around the document.
2978 [board setString: (NSString *)cfsVal forType: ScintillaRecPboardType];
2979 }
2980-
2981+
2982 [board setString: (NSString *)cfsVal forType: NSStringPboardType];
2983
2984 if (cfsVal)
2985@@ -1375,40 +1701,39 @@
2986 */
2987 bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selectedText)
2988 {
2989- NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType,
2990- NSStringPboardType,
2991+ NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType,
2992+ NSStringPboardType,
2993 nil];
2994 NSString *bestType = [board availableTypeFromArray: supportedTypes];
2995 NSString* data = [board stringForType: bestType];
2996-
2997+
2998 if (data != nil)
2999 {
3000 if (selectedText != nil)
3001 {
3002 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
3003 vs.styles[STYLE_DEFAULT].characterSet);
3004- CFRange rangeAll = {0, [data length]};
3005+ CFRange rangeAll = {0, static_cast<CFIndex>([data length])};
3006 CFIndex usedLen = 0;
3007 CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',
3008 false, NULL, 0, &usedLen);
3009
3010- UInt8 *buffer = new UInt8[usedLen];
3011-
3012+ std::vector<UInt8> buffer(usedLen);
3013+
3014 CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',
3015- false, buffer,usedLen, NULL);
3016+ false, buffer.data(),usedLen, NULL);
3017
3018 bool rectangular = bestType == ScintillaRecPboardType;
3019
3020 int len = static_cast<int>(usedLen);
3021- char *dest = Document::TransformLineEnds(&len, (char *)buffer, len, pdoc->eolMode);
3022+ std::string dest = Document::TransformLineEnds((char *)buffer.data(), len, pdoc->eolMode);
3023
3024- selectedText->Set(dest, len+1, pdoc->dbcsCodePage,
3025+ selectedText->Copy(dest, pdoc->dbcsCodePage,
3026 vs.styles[STYLE_DEFAULT].characterSet , rectangular, false);
3027- delete []buffer;
3028 }
3029 return true;
3030 }
3031-
3032+
3033 return false;
3034 }
3035
3036@@ -1417,16 +1742,6 @@
3037 void ScintillaCocoa::SetMouseCapture(bool on)
3038 {
3039 capturedMouse = on;
3040- /*
3041- if (mouseDownCaptures)
3042- {
3043- if (capturedMouse)
3044- WndProc(SCI_SETCURSOR, Window::cursorArrow, 0);
3045- else
3046- // Reset to normal. Actual image will be set on mouse move.
3047- WndProc(SCI_SETCURSOR, (unsigned int) SC_CURSORNORMAL, 0);
3048- }
3049- */
3050 }
3051
3052 //--------------------------------------------------------------------------------------------------
3053@@ -1451,6 +1766,16 @@
3054 Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
3055 if (sw)
3056 {
3057+ CGContextSetAllowsAntialiasing((CGContextRef)gc,
3058+ vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED);
3059+ CGContextSetAllowsFontSmoothing((CGContextRef)gc,
3060+ vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
3061+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
3062+ if (CGContextSetAllowsFontSubpixelPositioning != NULL)
3063+ CGContextSetAllowsFontSubpixelPositioning((CGContextRef)gc,
3064+ vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
3065+ vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
3066+#endif
3067 sw->Init(gc, wMain.GetID());
3068 Paint(sw, rc);
3069 succeeded = paintState != paintAbandoned;
3070@@ -1458,6 +1783,7 @@
3071 delete sw;
3072 }
3073 paintState = notPainting;
3074+<<<<<<< TREE
3075 return succeeded;
3076 }
3077
3078@@ -1466,9 +1792,55 @@
3079 /**
3080 * Scrolls the pixels in the window some number of lines.
3081 * Invalidates the pixels scrolled into view.
3082+=======
3083+ if (!succeeded)
3084+ {
3085+ NSView *marginView = static_cast<NSView*>(wMargin.GetID());
3086+ [marginView setNeedsDisplay:YES];
3087+ }
3088+ return succeeded;
3089+}
3090+
3091+//--------------------------------------------------------------------------------------------------
3092+
3093+/**
3094+ * Paint the margin into the SCIMarginView space.
3095+ */
3096+void ScintillaCocoa::PaintMargin(NSRect aRect)
3097+{
3098+ CGContextRef gc = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
3099+
3100+ PRectangle rc = NSRectToPRectangle(aRect);
3101+ rcPaint = rc;
3102+ Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
3103+ if (sw)
3104+ {
3105+ CGContextSetAllowsAntialiasing(gc,
3106+ vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED);
3107+ CGContextSetAllowsFontSmoothing(gc,
3108+ vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
3109+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
3110+ if (CGContextSetAllowsFontSubpixelPositioning != NULL)
3111+ CGContextSetAllowsFontSubpixelPositioning(gc,
3112+ vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
3113+ vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
3114+#endif
3115+ sw->Init(gc, wMargin.GetID());
3116+ PaintSelMargin(sw, rc);
3117+ sw->Release();
3118+ delete sw;
3119+ }
3120+}
3121+
3122+//--------------------------------------------------------------------------------------------------
3123+
3124+/**
3125+ * ScrollText is empty because scrolling is handled by the NSScrollView.
3126+>>>>>>> MERGE-SOURCE
3127 */
3128 void ScintillaCocoa::ScrollText(int linesToMove)
3129 {
3130+<<<<<<< TREE
3131 // Move those pixels
3132 NSView *content = ContentView();
3133 if ([content layer]) {
3134@@ -1509,15 +1881,18 @@
3135
3136 // Could invalidate instead of synchronous draw but that may not be as smooth
3137 //[content setNeedsDisplayInRect: redrawRectangle];
3138+=======
3139+>>>>>>> MERGE-SOURCE
3140 }
3141
3142 //--------------------------------------------------------------------------------------------------
3143
3144 /**
3145- * Modfies the vertical scroll position to make the current top line show up as such.
3146+ * Modifies the vertical scroll position to make the current top line show up as such.
3147 */
3148 void ScintillaCocoa::SetVerticalScrollPos()
3149 {
3150+<<<<<<< TREE
3151 ScintillaView* topContainer = TopContainer();
3152
3153 // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area
3154@@ -1525,14 +1900,26 @@
3155 int maxScrollPos = MaxScrollPos();
3156 float relativePosition = (maxScrollPos > 0) ? ((float) topLine / maxScrollPos) : 0.0f;
3157 [topContainer setVerticalScrollPosition: relativePosition];
3158+=======
3159+ NSScrollView *scrollView = ScrollContainer();
3160+ if (scrollView) {
3161+ NSClipView *clipView = [scrollView contentView];
3162+ NSRect contentRect = [clipView bounds];
3163+ [clipView scrollToPoint: NSMakePoint(contentRect.origin.x, topLine * vs.lineHeight)];
3164+ [scrollView reflectScrolledClipView:clipView];
3165+ }
3166+>>>>>>> MERGE-SOURCE
3167 }
3168
3169 //--------------------------------------------------------------------------------------------------
3170
3171+/**
3172+ * Modifies the horizontal scroll position to match xOffset.
3173+ */
3174 void ScintillaCocoa::SetHorizontalScrollPos()
3175 {
3176- ScintillaView* topContainer = TopContainer();
3177 PRectangle textRect = GetTextRectangle();
3178+<<<<<<< TREE
3179
3180 // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area
3181 // does *not* belong to the scroll range.
3182@@ -1544,12 +1931,29 @@
3183 float relativePosition = (float) xOffset / maxXOffset;
3184 [topContainer setHorizontalScrollPosition: relativePosition];
3185 MoveFindIndicatorWithBounce(NO);
3186+=======
3187+
3188+ int maxXOffset = scrollWidth - textRect.Width();
3189+ if (maxXOffset < 0)
3190+ maxXOffset = 0;
3191+ if (xOffset > maxXOffset)
3192+ xOffset = maxXOffset;
3193+ NSScrollView *scrollView = ScrollContainer();
3194+ if (scrollView) {
3195+ NSClipView * clipView = [scrollView contentView];
3196+ NSRect contentRect = [clipView bounds];
3197+ [clipView scrollToPoint: NSMakePoint(xOffset, contentRect.origin.y)];
3198+ [scrollView reflectScrolledClipView:clipView];
3199+ }
3200+ MoveFindIndicatorWithBounce(NO);
3201+>>>>>>> MERGE-SOURCE
3202 }
3203
3204 //--------------------------------------------------------------------------------------------------
3205
3206 /**
3207 * Used to adjust both scrollers to reflect the current scroll range and position in the editor.
3208+ * Arguments no longer used as NSScrollView handles details of scroll bar sizes.
3209 *
3210 * @param nMax Number of lines in the editor.
3211 * @param nPage Number of lines per scroll page.
3212@@ -1557,12 +1961,11 @@
3213 */
3214 bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage)
3215 {
3216-#pragma unused(nPage)
3217- // Input values are given in lines, not pixels, so we have to convert.
3218- int lineHeight = static_cast<int>(WndProc(SCI_TEXTHEIGHT, 0, 0));
3219- PRectangle bounds = GetTextRectangle();
3220- ScintillaView* topContainer = TopContainer();
3221+#pragma unused(nMax, nPage)
3222+ return SetScrollingSize();
3223+}
3224
3225+<<<<<<< TREE
3226 // Set page size to the same value as the scroll range to hide the scrollbar.
3227 int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one.
3228 int pageSize;
3229@@ -1582,87 +1985,86 @@
3230 MoveFindIndicatorWithBounce(NO);
3231
3232 return verticalChange || horizontalChange;
3233+=======
3234+bool ScintillaCocoa::SetScrollingSize(void) {
3235+ bool changes = false;
3236+ SCIContentView *inner = ContentView();
3237+ if (!enteredSetScrollingSize) {
3238+ enteredSetScrollingSize = true;
3239+ NSScrollView *scrollView = ScrollContainer();
3240+ NSClipView *clipView = [ScrollContainer() contentView];
3241+ NSRect clipRect = [clipView bounds];
3242+ CGFloat docHeight = (cs.LinesDisplayed()+1) * vs.lineHeight;
3243+ if (!endAtLastLine)
3244+ docHeight += (int([scrollView bounds].size.height / vs.lineHeight)-3) * vs.lineHeight;
3245+ // Allow extra space so that last scroll position places whole line at top
3246+ int clipExtra = int(clipRect.size.height) % vs.lineHeight;
3247+ docHeight += clipExtra;
3248+ // Ensure all of clipRect covered by Scintilla drawing
3249+ if (docHeight < clipRect.size.height)
3250+ docHeight = clipRect.size.height;
3251+ CGFloat docWidth = scrollWidth;
3252+ bool showHorizontalScroll = horizontalScrollBarVisible &&
3253+ !Wrapping();
3254+ if (!showHorizontalScroll)
3255+ docWidth = clipRect.size.width;
3256+ NSRect contentRect = {0, 0, docWidth, docHeight};
3257+ NSRect contentRectNow = [inner frame];
3258+ changes = (contentRect.size.width != contentRectNow.size.width) ||
3259+ (contentRect.size.height != contentRectNow.size.height);
3260+ if (changes) {
3261+ [inner setFrame: contentRect];
3262+ }
3263+ [scrollView setHasVerticalScroller: verticalScrollBarVisible];
3264+ [scrollView setHasHorizontalScroller: showHorizontalScroll];
3265+ SetVerticalScrollPos();
3266+ enteredSetScrollingSize = false;
3267+ }
3268+ [inner.owner setMarginWidth: vs.fixedColumnWidth];
3269+ return changes;
3270+>>>>>>> MERGE-SOURCE
3271 }
3272
3273 //--------------------------------------------------------------------------------------------------
3274
3275 void ScintillaCocoa::Resize()
3276 {
3277+ SetScrollingSize();
3278 ChangeSize();
3279 }
3280
3281 //--------------------------------------------------------------------------------------------------
3282
3283 /**
3284- * Called by the frontend control when the user manipulates one of the scrollers.
3285+ * Update fields to match scroll position after receiving a notification that the user has scrolled.
3286+ */
3287+void ScintillaCocoa::UpdateForScroll() {
3288+ Point ptOrigin = GetVisibleOriginInMain();
3289+ xOffset = ptOrigin.x;
3290+ int newTop = Platform::Minimum(ptOrigin.y / vs.lineHeight, MaxScrollPos());
3291+ SetTopLine(newTop);
3292+}
3293+
3294+//--------------------------------------------------------------------------------------------------
3295+
3296+/**
3297+ * Register a delegate that will be called for notifications and commands.
3298+ * This provides similar functionality to RegisterNotifyCallback but in an
3299+ * Objective C way.
3300 *
3301- * @param position The relative position of the scroller in the range of [0..1].
3302- * @param part Specifies which part was clicked on by the user, so we can handle thumb tracking
3303- * as well as page and line scrolling.
3304- * @param horizontal True if the horizontal scroller was hit, otherwise false.
3305+ * @param delegate_ A pointer to an object that implements ScintillaNotificationProtocol.
3306 */
3307-void ScintillaCocoa::DoScroll(float position, NSScrollerPart part, bool horizontal)
3308+
3309+void ScintillaCocoa::SetDelegate(id<ScintillaNotificationProtocol> delegate_)
3310 {
3311- // If the given scroller part is not the knob (or knob slot) then the given position is not yet
3312- // current and we have to update it.
3313- if (horizontal)
3314- {
3315- // Horizontal offset is given in pixels.
3316- PRectangle textRect = GetTextRectangle();
3317- int offset = (int) (position * (scrollWidth - textRect.Width()));
3318- int smallChange = (int) (textRect.Width() / 30);
3319- if (smallChange < 5)
3320- smallChange = 5;
3321- switch (part)
3322- {
3323- case NSScrollerDecrementLine:
3324- offset -= smallChange;
3325- break;
3326- case NSScrollerDecrementPage:
3327- offset -= textRect.Width();
3328- break;
3329- case NSScrollerIncrementLine:
3330- offset += smallChange;
3331- break;
3332- case NSScrollerIncrementPage:
3333- offset += textRect.Width();
3334- break;
3335- };
3336- HorizontalScrollTo(offset);
3337- }
3338- else
3339- {
3340- // VerticalScrolling is by line. If the user is scrolling using the knob we can directly
3341- // set the new scroll position. Otherwise we have to compute it first.
3342- if (part == NSScrollerKnob)
3343- ScrollTo(position * MaxScrollPos(), false);
3344- else
3345- {
3346- switch (part)
3347- {
3348- case NSScrollerDecrementLine:
3349- ScrollTo(topLine - 1, true);
3350- break;
3351- case NSScrollerDecrementPage:
3352- ScrollTo(topLine - LinesOnScreen(), true);
3353- break;
3354- case NSScrollerIncrementLine:
3355- ScrollTo(topLine + 1, true);
3356- break;
3357- case NSScrollerIncrementPage:
3358- ScrollTo(topLine + LinesOnScreen(), true);
3359- break;
3360- };
3361-
3362- }
3363- }
3364+ delegate = delegate_;
3365 }
3366
3367 //--------------------------------------------------------------------------------------------------
3368
3369 /**
3370 * Used to register a callback function for a given window. This is used to emulate the way
3371- * Windows notfies other controls (mainly up in the view hierarchy) about certain events.
3372+ * Windows notifies other controls (mainly up in the view hierarchy) about certain events.
3373 *
3374 * @param windowid A handle to a window. That value is generic and can be anything. It is passed
3375 * through to the callback.
3376@@ -1691,6 +2093,8 @@
3377 if (notifyProc != NULL)
3378 notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)),
3379 (uintptr_t) this);
3380+
3381+ Editor::NotifyFocus(focus);
3382 }
3383
3384 //--------------------------------------------------------------------------------------------------
3385@@ -1702,13 +2106,13 @@
3386 * @param scn The notification to send.
3387 */
3388 void ScintillaCocoa::NotifyParent(SCNotification scn)
3389-{
3390+{
3391+ scn.nmhdr.hwndFrom = (void*) this;
3392+ scn.nmhdr.idFrom = GetCtrlID();
3393 if (notifyProc != NULL)
3394- {
3395- scn.nmhdr.hwndFrom = (void*) this;
3396- scn.nmhdr.idFrom = GetCtrlID();
3397- notifyProc(notifyObj, WM_NOTIFY, (uintptr_t) 0, (uintptr_t) &scn);
3398- }
3399+ notifyProc(notifyObj, WM_NOTIFY, GetCtrlID(), (uintptr_t) &scn);
3400+ if (delegate)
3401+ [delegate notification:&scn];
3402 }
3403
3404 //--------------------------------------------------------------------------------------------------
3405@@ -1718,7 +2122,7 @@
3406 SCNotification scn;
3407 scn.nmhdr.code = SCN_URIDROPPED;
3408 scn.text = uri;
3409-
3410+
3411 NotifyParent(scn);
3412 }
3413
3414@@ -1775,7 +2179,7 @@
3415 }
3416
3417 //--------------------------------------------------------------------------------------------------
3418-
3419+
3420 /**
3421 * Helper function to translate OS X key codes to Scintilla key codes.
3422 */
3423@@ -1821,8 +2225,26 @@
3424 //--------------------------------------------------------------------------------------------------
3425
3426 /**
3427+ * Translate NSEvent modifier flags into SCI_* modifier flags.
3428+ *
3429+ * @param modifiers An integer bit set of NSSEvent modifier flags.
3430+ * @return A set of SCI_* modifier flags.
3431+ */
3432+static int TranslateModifierFlags(NSUInteger modifiers)
3433+{
3434+ // Signal Control as SCI_META
3435+ return
3436+ (((modifiers & NSShiftKeyMask) != 0) ? SCI_SHIFT : 0) |
3437+ (((modifiers & NSCommandKeyMask) != 0) ? SCI_CTRL : 0) |
3438+ (((modifiers & NSAlternateKeyMask) != 0) ? SCI_ALT : 0) |
3439+ (((modifiers & NSControlKeyMask) != 0) ? SCI_META : 0);
3440+}
3441+
3442+//--------------------------------------------------------------------------------------------------
3443+
3444+/**
3445 * Main keyboard input handling method. It is called for any key down event, including function keys,
3446- * numeric keypad input and whatnot.
3447+ * numeric keypad input and whatnot.
3448 *
3449 * @param event The event instance associated with the key down event.
3450 * @return True if the input was handled, false otherwise.
3451@@ -1830,37 +2252,24 @@
3452 bool ScintillaCocoa::KeyboardInput(NSEvent* event)
3453 {
3454 // For now filter out function keys.
3455- NSUInteger modifiers = [event modifierFlags];
3456-
3457 NSString* input = [event characters];
3458-
3459- bool control = (modifiers & NSControlKeyMask) != 0;
3460- bool shift = (modifiers & NSShiftKeyMask) != 0;
3461- bool command = (modifiers & NSCommandKeyMask) != 0;
3462- bool alt = (modifiers & NSAlternateKeyMask) != 0;
3463-
3464+
3465 bool handled = false;
3466-
3467- // Handle each entry individually. Usually we only have one entry anway.
3468+
3469+ // Handle each entry individually. Usually we only have one entry anyway.
3470 for (size_t i = 0; i < input.length; i++)
3471 {
3472 const UniChar originalKey = [input characterAtIndex: i];
3473 UniChar key = KeyTranslate(originalKey);
3474-
3475+
3476 bool consumed = false; // Consumed as command?
3477-
3478- // Signal Control as SCMOD_META
3479- int modifierKeys =
3480- (shift ? SCI_SHIFT : 0) |
3481- (command ? SCI_CTRL : 0) |
3482- (alt ? SCI_ALT : 0) |
3483- (control ? SCI_META : 0);
3484- if (KeyDownWithModifiers(key, modifierKeys, &consumed))
3485+
3486+ if (KeyDownWithModifiers(key, TranslateModifierFlags([event modifierFlags]), &consumed))
3487 handled = true;
3488 if (consumed)
3489 handled = true;
3490 }
3491-
3492+
3493 return handled;
3494 }
3495
3496@@ -1873,24 +2282,53 @@
3497 {
3498 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
3499 vs.styles[STYLE_DEFAULT].characterSet);
3500- CFRange rangeAll = {0, [input length]};
3501+ CFRange rangeAll = {0, static_cast<CFIndex>([input length])};
3502 CFIndex usedLen = 0;
3503 CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?',
3504 false, NULL, 0, &usedLen);
3505-
3506- UInt8 *buffer = new UInt8[usedLen];
3507-
3508+
3509+ std::vector<UInt8> buffer(usedLen);
3510+
3511 CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?',
3512- false, buffer,usedLen, NULL);
3513-
3514- AddCharUTF((char*) buffer, static_cast<unsigned int>(usedLen), false);
3515- delete []buffer;
3516+ false, buffer.data(),usedLen, NULL);
3517+
3518+ AddCharUTF((char*) buffer.data(), static_cast<unsigned int>(usedLen), false);
3519 return static_cast<int>(usedLen);
3520 }
3521
3522 //--------------------------------------------------------------------------------------------------
3523
3524 /**
3525+ * Used to ensure that only one selection is active for input composition as composition
3526+ * does not support multi-typing.
3527+ * Also drop virtual space as that is not supported by composition.
3528+ */
3529+void ScintillaCocoa::SelectOnlyMainSelection()
3530+{
3531+ SelectionRange mainSel = sel.RangeMain();
3532+ mainSel.ClearVirtualSpace();
3533+ sel.SetSelection(mainSel);
3534+ Redraw();
3535+}
3536+
3537+//--------------------------------------------------------------------------------------------------
3538+/**
3539+ * When switching documents discard any incomplete character composition state as otherwise tries to
3540+ * act on the new document.
3541+ */
3542+void ScintillaCocoa::SetDocPointer(Document *document)
3543+{
3544+ // Drop input composition.
3545+ NSTextInputContext *inctxt = [NSTextInputContext currentInputContext];
3546+ [inctxt discardMarkedText];
3547+ SCIContentView *inner = ContentView();
3548+ [inner unmarkText];
3549+ Editor::SetDocPointer(document);
3550+}
3551+
3552+//--------------------------------------------------------------------------------------------------
3553+
3554+/**
3555 * Called by the owning view when the mouse pointer enters the control.
3556 */
3557 void ScintillaCocoa::MouseEntered(NSEvent* event)
3558@@ -1898,7 +2336,7 @@
3559 if (!HaveMouseCapture())
3560 {
3561 WndProc(SCI_SETCURSOR, (long int)SC_CURSORNORMAL, 0);
3562-
3563+
3564 // Mouse location is given in screen coordinates and might also be outside of our bounds.
3565 Point location = ConvertPoint([event locationInWindow]);
3566 ButtonMove(location);
3567@@ -1921,7 +2359,7 @@
3568 bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
3569 bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0;
3570 bool alt = ([event modifierFlags] & NSAlternateKeyMask) != 0;
3571-
3572+
3573 ButtonDown(Point(location.x, location.y), (int) (time * 1000), shift, command, alt);
3574 }
3575
3576@@ -1930,8 +2368,8 @@
3577 void ScintillaCocoa::MouseMove(NSEvent* event)
3578 {
3579 lastMouseEvent = event;
3580-
3581- ButtonMove(ConvertPoint([event locationInWindow]));
3582+
3583+ ButtonMoveWithModifiers(ConvertPoint([event locationInWindow]), TranslateModifierFlags([event modifierFlags]));
3584 }
3585
3586 //--------------------------------------------------------------------------------------------------
3587@@ -1949,18 +2387,15 @@
3588 void ScintillaCocoa::MouseWheel(NSEvent* event)
3589 {
3590 bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
3591- int dX = 0;
3592 int dY = 0;
3593
3594- dX = 10 * [event deltaX]; // Arbitrary scale factor.
3595-
3596- // In order to make scrolling with larger offset smoother we scroll less lines the larger the
3597+ // In order to make scrolling with larger offset smoother we scroll less lines the larger the
3598 // delta value is.
3599 if ([event deltaY] < 0)
3600 dY = -(int) sqrt(-10.0 * [event deltaY]);
3601 else
3602 dY = (int) sqrt(10.0 * [event deltaY]);
3603-
3604+
3605 if (command)
3606 {
3607 // Zoom! We play with the font sizes in the styles.
3608@@ -1972,8 +2407,6 @@
3609 }
3610 else
3611 {
3612- HorizontalScrollTo(xOffset - dX);
3613- ScrollTo(topLine - dY, true);
3614 }
3615 }
3616
3617@@ -2015,7 +2448,7 @@
3618 {
3619 // Call ScintillaBase to create the context menu.
3620 ContextMenu(Point(0, 0));
3621-
3622+
3623 return reinterpret_cast<NSMenu*>(popup.GetID());
3624 }
3625
3626@@ -2044,9 +2477,14 @@
3627 }
3628 }
3629
3630+// If building with old SDK, need to define version number for 10.8
3631+#ifndef NSAppKitVersionNumber10_8
3632+#define NSAppKitVersionNumber10_8 1187
3633+#endif
3634
3635 //--------------------------------------------------------------------------------------------------
3636
3637+<<<<<<< TREE
3638 void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining)
3639 {
3640 #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
3641@@ -2123,3 +2561,88 @@
3642 }
3643
3644
3645+=======
3646+void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining)
3647+{
3648+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
3649+ NSView *content = ContentView();
3650+ if (!layerFindIndicator)
3651+ {
3652+ layerFindIndicator = [[FindHighlightLayer alloc] init];
3653+ [content setWantsLayer: YES];
3654+ layerFindIndicator.geometryFlipped = content.layer.geometryFlipped;
3655+ if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8)
3656+ {
3657+ // Content layer is unflipped on 10.9, but the indicator shows wrong unless flipped
3658+ layerFindIndicator.geometryFlipped = YES;
3659+ }
3660+ [[content layer] addSublayer:layerFindIndicator];
3661+ }
3662+ [layerFindIndicator removeAnimationForKey:@"animateFound"];
3663+
3664+ if (charRange.length)
3665+ {
3666+ CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
3667+ vs.styles[STYLE_DEFAULT].characterSet);
3668+ std::vector<char> buffer(charRange.length);
3669+ pdoc->GetCharRange(&buffer[0], charRange.location, charRange.length);
3670+
3671+ CFStringRef cfsFind = CFStringCreateWithBytes(kCFAllocatorDefault,
3672+ reinterpret_cast<const UInt8 *>(&buffer[0]),
3673+ charRange.length, encoding, false);
3674+ layerFindIndicator.sFind = (NSString *)cfsFind;
3675+ if (cfsFind)
3676+ CFRelease(cfsFind);
3677+ layerFindIndicator.retaining = retaining;
3678+ layerFindIndicator.positionFind = charRange.location;
3679+ int style = WndProc(SCI_GETSTYLEAT, charRange.location, 0);
3680+ std::vector<char> bufferFontName(WndProc(SCI_STYLEGETFONT, style, 0) + 1);
3681+ WndProc(SCI_STYLEGETFONT, style, (sptr_t)&bufferFontName[0]);
3682+ layerFindIndicator.sFont = [NSString stringWithUTF8String: &bufferFontName[0]];
3683+
3684+ layerFindIndicator.fontSize = WndProc(SCI_STYLEGETSIZEFRACTIONAL, style, 0) /
3685+ (float)SC_FONT_SIZE_MULTIPLIER;
3686+ layerFindIndicator.widthText = WndProc(SCI_POINTXFROMPOSITION, 0, charRange.location + charRange.length) -
3687+ WndProc(SCI_POINTXFROMPOSITION, 0, charRange.location);
3688+ layerFindIndicator.heightLine = WndProc(SCI_TEXTHEIGHT, 0, 0);
3689+ MoveFindIndicatorWithBounce(YES);
3690+ }
3691+ else
3692+ {
3693+ [layerFindIndicator hideMatch];
3694+ }
3695+#endif
3696+}
3697+
3698+void ScintillaCocoa::MoveFindIndicatorWithBounce(BOOL bounce)
3699+{
3700+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
3701+ if (layerFindIndicator)
3702+ {
3703+ CGPoint ptText = CGPointMake(
3704+ WndProc(SCI_POINTXFROMPOSITION, 0, layerFindIndicator.positionFind),
3705+ WndProc(SCI_POINTYFROMPOSITION, 0, layerFindIndicator.positionFind));
3706+ ptText.x = ptText.x - vs.fixedColumnWidth + xOffset;
3707+ ptText.y += topLine * vs.lineHeight;
3708+ if (!layerFindIndicator.geometryFlipped)
3709+ {
3710+ NSView *content = ContentView();
3711+ ptText.y = content.bounds.size.height - ptText.y;
3712+ }
3713+ [layerFindIndicator animateMatch:ptText bounce:bounce];
3714+ }
3715+#endif
3716+}
3717+
3718+void ScintillaCocoa::HideFindIndicator()
3719+{
3720+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
3721+ if (layerFindIndicator)
3722+ {
3723+ [layerFindIndicator hideMatch];
3724+ }
3725+#endif
3726+}
3727+
3728+
3729+>>>>>>> MERGE-SOURCE
3730
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 objects = {
3736
3737 /* Begin PBXBuildFile section */
3738+ 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E6178E393200105727 /* CaseConvert.cxx */; };
3739+ 1100F1EC178E393200105727 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E7178E393200105727 /* CaseConvert.h */; };
3740+ 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E8178E393200105727 /* CaseFolder.cxx */; };
3741+ 1100F1EE178E393200105727 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E9178E393200105727 /* CaseFolder.h */; };
3742+ 1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */; };
3743+ 1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */; };
3744+ 11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11126B8114CD3A6200803C49 /* LexAVS.cxx */; };
3745+ 1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1114D6CA1602A951001DC345 /* LexPO.cxx */; };
3746 114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */; };
3747 114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBF11FA7526004FB6AB /* LexAda.cxx */; };
3748 114B6F0F11FA7526004FB6AB /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */; };
3749@@ -142,7 +150,6 @@
3750 114B6FD111FA7623004FB6AB /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB611FA7623004FB6AB /* Selection.h */; };
3751 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB711FA7623004FB6AB /* SplitVector.h */; };
3752 114B6FD311FA7623004FB6AB /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB811FA7623004FB6AB /* Style.h */; };
3753- 114B6FD411FA7623004FB6AB /* SVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB911FA7623004FB6AB /* SVector.h */; };
3754 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBA11FA7623004FB6AB /* UniConversion.h */; };
3755 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBB11FA7623004FB6AB /* ViewStyle.h */; };
3756 114B6FD711FA7623004FB6AB /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBC11FA7623004FB6AB /* XPM.h */; };
3757@@ -157,9 +164,21 @@
3758 114B6FEB11FA7645004FB6AB /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE011FA7645004FB6AB /* PropSetSimple.h */; };
3759 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE111FA7645004FB6AB /* StyleContext.h */; };
3760 114B6FED11FA7645004FB6AB /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE211FA7645004FB6AB /* WordList.h */; };
3761+ 1152A77315313E58000D4E1A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A77215313E58000D4E1A /* QuartzCore.framework */; };
3762+ 11594BE9155B91DF0099E1FA /* LexOScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11594BE7155B91DF0099E1FA /* LexOScript.cxx */; };
3763+ 11594BEA155B91DF0099E1FA /* LexVisualProlog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */; };
3764+ 1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1160E0371803651C00BCEBCB /* LexRust.cxx */; };
3765+ 117ACE9114A29A1E002876F9 /* LexTCMD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */; };
3766 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */; };
3767+ 11A0A8A1148602DF0018D143 /* LexCoffeeScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */; };
3768 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */; };
3769+ 11BEB6A214EF189600BDE92A /* LexECL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BEB6A114EF189600BDE92A /* LexECL.cxx */; };
3770 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; };
3771+ 11FBA39D17817DA00048C071 /* CharacterCategory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */; };
3772+ 11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 11FBA39C17817DA00048C071 /* CharacterCategory.h */; };
3773+ 11FDAEB7174E1A9800FA161B /* LexSTTXT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */; };
3774+ 11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */; };
3775+ 11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */; };
3776 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
3777 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
3778 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
3779@@ -185,6 +204,12 @@
3780 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; };
3781 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; };
3782 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; };
3783+ 280056FB188DDD2C00F200AE /* SparseState.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F8188DDD2C00F200AE /* SparseState.h */; };
3784+ 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F9188DDD2C00F200AE /* StringCopy.h */; };
3785+ 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056FA188DDD2C00F200AE /* SubStyles.h */; };
3786+ 28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */; };
3787+ 28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */; };
3788+ 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */; };
3789 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
3790 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
3791 /* End PBXBuildFile section */
3792@@ -194,6 +219,14 @@
3793 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
3794 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3795 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
3796+ 1100F1E6178E393200105727 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = "<group>"; };
3797+ 1100F1E7178E393200105727 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = "<group>"; };
3798+ 1100F1E8178E393200105727 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = "<group>"; };
3799+ 1100F1E9178E393200105727 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = "<group>"; };
3800+ 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnicodeFromUTF8.h; path = ../../src/UnicodeFromUTF8.h; sourceTree = "<group>"; };
3801+ 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLaTeX.cxx; path = ../../lexers/LexLaTeX.cxx; sourceTree = "<group>"; };
3802+ 11126B8114CD3A6200803C49 /* LexAVS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVS.cxx; path = ../../lexers/LexAVS.cxx; sourceTree = "<group>"; };
3803+ 1114D6CA1602A951001DC345 /* LexPO.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPO.cxx; path = ../../lexers/LexPO.cxx; sourceTree = "<group>"; };
3804 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; };
3805 114B6EBF11FA7526004FB6AB /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = SOURCE_ROOT; };
3806 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 114B6FB611FA7623004FB6AB /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; };
3809 114B6FB711FA7623004FB6AB /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; };
3810 114B6FB811FA7623004FB6AB /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; };
3811- 114B6FB911FA7623004FB6AB /* SVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVector.h; path = ../../src/SVector.h; sourceTree = SOURCE_ROOT; };
3812 114B6FBA11FA7623004FB6AB /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; };
3813 114B6FBB11FA7623004FB6AB /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; };
3814 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 114B6FE011FA7645004FB6AB /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = SOURCE_ROOT; };
3817 114B6FE111FA7645004FB6AB /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = SOURCE_ROOT; };
3818 114B6FE211FA7645004FB6AB /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = SOURCE_ROOT; };
3819+ 1152A77215313E58000D4E1A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = ../../../../../../../../System/Library/Frameworks/QuartzCore.framework; sourceTree = "<group>"; };
3820+ 11594BE7155B91DF0099E1FA /* LexOScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOScript.cxx; path = ../../lexers/LexOScript.cxx; sourceTree = "<group>"; };
3821+ 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVisualProlog.cxx; path = ../../lexers/LexVisualProlog.cxx; sourceTree = "<group>"; };
3822+ 1160E0371803651C00BCEBCB /* LexRust.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRust.cxx; path = ../../lexers/LexRust.cxx; sourceTree = "<group>"; };
3823+ 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCMD.cxx; path = ../../lexers/LexTCMD.cxx; sourceTree = "<group>"; };
3824 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; };
3825+ 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCoffeeScript.cxx; path = ../../lexers/LexCoffeeScript.cxx; sourceTree = "<group>"; };
3826 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = SOURCE_ROOT; };
3827+ 11BEB6A114EF189600BDE92A /* LexECL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexECL.cxx; path = ../../lexers/LexECL.cxx; sourceTree = "<group>"; };
3828 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; };
3829+ 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategory.cxx; path = ../../lexlib/CharacterCategory.cxx; sourceTree = "<group>"; };
3830+ 11FBA39C17817DA00048C071 /* CharacterCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategory.h; path = ../../lexlib/CharacterCategory.h; sourceTree = "<group>"; };
3831+ 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSTTXT.cxx; path = ../../lexers/LexSTTXT.cxx; sourceTree = "<group>"; };
3832+ 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKVIrc.cxx; path = ../../lexers/LexKVIrc.cxx; sourceTree = "<group>"; };
3833+ 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMAP.cxx; path = ../../lexers/LexDMAP.cxx; sourceTree = "<group>"; };
3834 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; };
3835 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; };
3836 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 27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; };
3839 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; };
3840 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; };
3841+ 280056F8188DDD2C00F200AE /* SparseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseState.h; path = ../../lexlib/SparseState.h; sourceTree = "<group>"; };
3842+ 280056F9188DDD2C00F200AE /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = "<group>"; };
3843+ 280056FA188DDD2C00F200AE /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = "<group>"; };
3844+ 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info_bar_bg@2x.png"; sourceTree = "<group>"; };
3845+ 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_busy@2x.png"; sourceTree = "<group>"; };
3846+ 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_flipped@2x.png"; sourceTree = "<group>"; };
3847 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; };
3848 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3849 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3850@@ -385,6 +435,7 @@
3851 files = (
3852 27CEACF816358CC400DEDFD9 /* QuartzCore.framework in Frameworks */,
3853 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
3854+ 1152A77315313E58000D4E1A /* QuartzCore.framework in Frameworks */,
3855 );
3856 runOnlyForDeploymentPostprocessing = 0;
3857 };
3858@@ -453,6 +504,7 @@
3859 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
3860 isa = PBXGroup;
3861 children = (
3862+ 1152A77215313E58000D4E1A /* QuartzCore.framework */,
3863 0867D6A5FE840307C02AAC07 /* AppKit.framework */,
3864 D2F7E79907B2D74100F64583 /* CoreData.framework */,
3865 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
3866@@ -472,6 +524,7 @@
3867 2744E47D0FC1674E00E85C33 /* Lexers */ = {
3868 isa = PBXGroup;
3869 children = (
3870+<<<<<<< TREE
3871 27CEACFA16358CFD00DEDFD9 /* LexAVS.cxx */,
3872 27CEACFB16358CFD00DEDFD9 /* LexCoffeeScript.cxx */,
3873 27CEACFC16358CFD00DEDFD9 /* LexECL.cxx */,
3874@@ -480,6 +533,9 @@
3875 27CEACFF16358CFD00DEDFD9 /* LexTCMD.cxx */,
3876 27CEAD0016358CFD00DEDFD9 /* LexVisualProlog.cxx */,
3877 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */,
3878+=======
3879+ 11126B8114CD3A6200803C49 /* LexAVS.cxx */,
3880+>>>>>>> MERGE-SOURCE
3881 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */,
3882 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */,
3883 114B6EBF11FA7526004FB6AB /* LexAda.cxx */,
3884@@ -497,12 +553,15 @@
3885 114B6ECB11FA7526004FB6AB /* LexCLW.cxx */,
3886 114B6ECC11FA7526004FB6AB /* LexCmake.cxx */,
3887 114B6ECD11FA7526004FB6AB /* LexCOBOL.cxx */,
3888+ 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */,
3889 114B6ECE11FA7526004FB6AB /* LexConf.cxx */,
3890 114B6ECF11FA7526004FB6AB /* LexCPP.cxx */,
3891 114B6ED011FA7526004FB6AB /* LexCrontab.cxx */,
3892 114B6ED111FA7526004FB6AB /* LexCsound.cxx */,
3893 114B6ED211FA7526004FB6AB /* LexCSS.cxx */,
3894 114B6ED311FA7526004FB6AB /* LexD.cxx */,
3895+ 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */,
3896+ 11BEB6A114EF189600BDE92A /* LexECL.cxx */,
3897 114B6ED411FA7526004FB6AB /* LexEiffel.cxx */,
3898 114B6ED511FA7526004FB6AB /* LexErlang.cxx */,
3899 114B6ED611FA7526004FB6AB /* LexEScript.cxx */,
3900@@ -515,6 +574,8 @@
3901 114B6EDD11FA7526004FB6AB /* LexHTML.cxx */,
3902 114B6EDE11FA7526004FB6AB /* LexInno.cxx */,
3903 114B6EDF11FA7526004FB6AB /* LexKix.cxx */,
3904+ 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */,
3905+ 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */,
3906 114B6EE011FA7526004FB6AB /* LexLisp.cxx */,
3907 114B6EE111FA7526004FB6AB /* LexLout.cxx */,
3908 114B6EE211FA7526004FB6AB /* LexLua.cxx */,
3909@@ -523,17 +584,20 @@
3910 114B6EE511FA7526004FB6AB /* LexMatlab.cxx */,
3911 114B6EE611FA7526004FB6AB /* LexMetapost.cxx */,
3912 114B6EE711FA7526004FB6AB /* LexMMIXAL.cxx */,
3913+ 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */,
3914 114B6EE811FA7526004FB6AB /* LexMPT.cxx */,
3915 114B6EE911FA7526004FB6AB /* LexMSSQL.cxx */,
3916 114B6EEA11FA7526004FB6AB /* LexMySQL.cxx */,
3917 114B6EEB11FA7526004FB6AB /* LexNimrod.cxx */,
3918 114B6EEC11FA7526004FB6AB /* LexNsis.cxx */,
3919 114B6EED11FA7526004FB6AB /* LexOpal.cxx */,
3920+ 11594BE7155B91DF0099E1FA /* LexOScript.cxx */,
3921 114B6EEE11FA7526004FB6AB /* LexOthers.cxx */,
3922 114B6EEF11FA7526004FB6AB /* LexPascal.cxx */,
3923 114B6EF011FA7526004FB6AB /* LexPB.cxx */,
3924 114B6EF111FA7526004FB6AB /* LexPerl.cxx */,
3925 114B6EF211FA7526004FB6AB /* LexPLM.cxx */,
3926+ 1114D6CA1602A951001DC345 /* LexPO.cxx */,
3927 114B6EF311FA7526004FB6AB /* LexPOV.cxx */,
3928 114B6EF411FA7526004FB6AB /* LexPowerPro.cxx */,
3929 114B6EF511FA7526004FB6AB /* LexPowerShell.cxx */,
3930@@ -543,6 +607,7 @@
3931 114B6EF911FA7526004FB6AB /* LexR.cxx */,
3932 114B6EFA11FA7526004FB6AB /* LexRebol.cxx */,
3933 114B6EFB11FA7526004FB6AB /* LexRuby.cxx */,
3934+ 1160E0371803651C00BCEBCB /* LexRust.cxx */,
3935 114B6EFC11FA7526004FB6AB /* LexScriptol.cxx */,
3936 114B6EFD11FA7526004FB6AB /* LexSmalltalk.cxx */,
3937 114B6EFE11FA7526004FB6AB /* LexSML.cxx */,
3938@@ -550,15 +615,18 @@
3939 114B6F0011FA7526004FB6AB /* LexSpecman.cxx */,
3940 114B6F0111FA7526004FB6AB /* LexSpice.cxx */,
3941 114B6F0211FA7526004FB6AB /* LexSQL.cxx */,
3942+ 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */,
3943 114B6F0311FA7526004FB6AB /* LexTACL.cxx */,
3944 114B6F0411FA7526004FB6AB /* LexTADS3.cxx */,
3945 114B6F0511FA7526004FB6AB /* LexTAL.cxx */,
3946 114B6F0611FA7526004FB6AB /* LexTCL.cxx */,
3947+ 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */,
3948 114B6F0711FA7526004FB6AB /* LexTeX.cxx */,
3949 114B6F0811FA7526004FB6AB /* LexTxt2tags.cxx */,
3950 114B6F0911FA7526004FB6AB /* LexVB.cxx */,
3951 114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */,
3952 114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */,
3953+ 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */,
3954 114B6F0C11FA7526004FB6AB /* LexYAML.cxx */,
3955 );
3956 name = Lexers;
3957@@ -568,20 +636,14 @@
3958 isa = PBXGroup;
3959 children = (
3960 114B6FD811FA7645004FB6AB /* Accessor.h */,
3961- 114B6FD911FA7645004FB6AB /* CharacterSet.h */,
3962- 114B6FDA11FA7645004FB6AB /* LexAccessor.h */,
3963- 114B6FDB11FA7645004FB6AB /* LexerBase.h */,
3964- 114B6FDC11FA7645004FB6AB /* LexerModule.h */,
3965- 114B6FDD11FA7645004FB6AB /* LexerNoExceptions.h */,
3966- 114B6FDE11FA7645004FB6AB /* LexerSimple.h */,
3967- 114B6FDF11FA7645004FB6AB /* OptionSet.h */,
3968- 114B6FE011FA7645004FB6AB /* PropSetSimple.h */,
3969- 114B6FE111FA7645004FB6AB /* StyleContext.h */,
3970- 114B6FE211FA7645004FB6AB /* WordList.h */,
3971 114B6FA211FA7623004FB6AB /* AutoComplete.h */,
3972 114B6FA311FA7623004FB6AB /* CallTip.h */,
3973+ 1100F1E7178E393200105727 /* CaseConvert.h */,
3974+ 1100F1E9178E393200105727 /* CaseFolder.h */,
3975 114B6FA411FA7623004FB6AB /* Catalogue.h */,
3976 114B6FA511FA7623004FB6AB /* CellBuffer.h */,
3977+ 11FBA39C17817DA00048C071 /* CharacterCategory.h */,
3978+ 114B6FD911FA7645004FB6AB /* CharacterSet.h */,
3979 114B6FA611FA7623004FB6AB /* CharClassify.h */,
3980 114B6FA711FA7623004FB6AB /* ContractionState.h */,
3981 114B6FA811FA7623004FB6AB /* Decoration.h */,
3982@@ -589,23 +651,35 @@
3983 114B6FAA11FA7623004FB6AB /* Editor.h */,
3984 114B6FAB11FA7623004FB6AB /* ExternalLexer.h */,
3985 114B6FAC11FA7623004FB6AB /* FontQuality.h */,
3986+ 114B6FA011FA75DB004FB6AB /* ILexer.h */,
3987 114B6FAD11FA7623004FB6AB /* Indicator.h */,
3988 114B6FAE11FA7623004FB6AB /* KeyMap.h */,
3989+ 114B6FDA11FA7645004FB6AB /* LexAccessor.h */,
3990+ 114B6FDB11FA7645004FB6AB /* LexerBase.h */,
3991+ 114B6FDC11FA7645004FB6AB /* LexerModule.h */,
3992+ 114B6FDD11FA7645004FB6AB /* LexerNoExceptions.h */,
3993+ 114B6FDE11FA7645004FB6AB /* LexerSimple.h */,
3994 114B6FAF11FA7623004FB6AB /* LineMarker.h */,
3995+ 114B6FDF11FA7645004FB6AB /* OptionSet.h */,
3996 114B6FB011FA7623004FB6AB /* Partitioning.h */,
3997 114B6FB111FA7623004FB6AB /* PerLine.h */,
3998 114B6FB211FA7623004FB6AB /* PositionCache.h */,
3999+ 114B6FE011FA7645004FB6AB /* PropSetSimple.h */,
4000 114B6FB311FA7623004FB6AB /* RESearch.h */,
4001 114B6FB411FA7623004FB6AB /* RunStyles.h */,
4002 114B6FB511FA7623004FB6AB /* ScintillaBase.h */,
4003 114B6FB611FA7623004FB6AB /* Selection.h */,
4004+ 280056F8188DDD2C00F200AE /* SparseState.h */,
4005 114B6FB711FA7623004FB6AB /* SplitVector.h */,
4006+ 280056F9188DDD2C00F200AE /* StringCopy.h */,
4007 114B6FB811FA7623004FB6AB /* Style.h */,
4008- 114B6FB911FA7623004FB6AB /* SVector.h */,
4009+ 114B6FE111FA7645004FB6AB /* StyleContext.h */,
4010+ 280056FA188DDD2C00F200AE /* SubStyles.h */,
4011+ 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */,
4012 114B6FBA11FA7623004FB6AB /* UniConversion.h */,
4013 114B6FBB11FA7623004FB6AB /* ViewStyle.h */,
4014+ 114B6FE211FA7645004FB6AB /* WordList.h */,
4015 114B6FBC11FA7623004FB6AB /* XPM.h */,
4016- 114B6FA011FA75DB004FB6AB /* ILexer.h */,
4017 );
4018 name = "Header Files";
4019 sourceTree = "<group>";
4020@@ -614,18 +688,14 @@
4021 isa = PBXGroup;
4022 children = (
4023 114B6F8E11FA75BE004FB6AB /* Accessor.cxx */,
4024- 114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */,
4025- 114B6F9011FA75BE004FB6AB /* LexerBase.cxx */,
4026- 114B6F9111FA75BE004FB6AB /* LexerModule.cxx */,
4027- 114B6F9211FA75BE004FB6AB /* LexerNoExceptions.cxx */,
4028- 114B6F9311FA75BE004FB6AB /* LexerSimple.cxx */,
4029- 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */,
4030- 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */,
4031- 114B6F9611FA75BE004FB6AB /* WordList.cxx */,
4032 114B6F6011FA7597004FB6AB /* AutoComplete.cxx */,
4033 114B6F6111FA7597004FB6AB /* CallTip.cxx */,
4034+ 1100F1E6178E393200105727 /* CaseConvert.cxx */,
4035+ 1100F1E8178E393200105727 /* CaseFolder.cxx */,
4036 114B6F6211FA7597004FB6AB /* Catalogue.cxx */,
4037 114B6F6311FA7597004FB6AB /* CellBuffer.cxx */,
4038+ 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */,
4039+ 114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */,
4040 114B6F6411FA7597004FB6AB /* CharClassify.cxx */,
4041 114B6F6511FA7597004FB6AB /* ContractionState.cxx */,
4042 114B6F6611FA7597004FB6AB /* Decoration.cxx */,
4043@@ -634,16 +704,23 @@
4044 114B6F6911FA7598004FB6AB /* ExternalLexer.cxx */,
4045 114B6F6A11FA7598004FB6AB /* Indicator.cxx */,
4046 114B6F6B11FA7598004FB6AB /* KeyMap.cxx */,
4047+ 114B6F9011FA75BE004FB6AB /* LexerBase.cxx */,
4048+ 114B6F9111FA75BE004FB6AB /* LexerModule.cxx */,
4049+ 114B6F9211FA75BE004FB6AB /* LexerNoExceptions.cxx */,
4050+ 114B6F9311FA75BE004FB6AB /* LexerSimple.cxx */,
4051 114B6F6C11FA7598004FB6AB /* LineMarker.cxx */,
4052 114B6F6D11FA7598004FB6AB /* PerLine.cxx */,
4053 114B6F6E11FA7598004FB6AB /* PositionCache.cxx */,
4054+ 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */,
4055 114B6F6F11FA7598004FB6AB /* RESearch.cxx */,
4056 114B6F7011FA7598004FB6AB /* RunStyles.cxx */,
4057 114B6F7111FA7598004FB6AB /* ScintillaBase.cxx */,
4058 114B6F7211FA7598004FB6AB /* Selection.cxx */,
4059 114B6F7311FA7598004FB6AB /* Style.cxx */,
4060+ 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */,
4061 114B6F7411FA7598004FB6AB /* UniConversion.cxx */,
4062 114B6F7511FA7598004FB6AB /* ViewStyle.cxx */,
4063+ 114B6F9611FA75BE004FB6AB /* WordList.cxx */,
4064 114B6F7611FA7598004FB6AB /* XPM.cxx */,
4065 );
4066 name = "Source Files";
4067@@ -681,6 +758,9 @@
4068 27FEF4500FC1B413005E115A /* res */ = {
4069 isa = PBXGroup;
4070 children = (
4071+ 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */,
4072+ 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */,
4073+ 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */,
4074 27FEF4510FC1B413005E115A /* info_bar_bg.png */,
4075 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */,
4076 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */,
4077@@ -712,6 +792,7 @@
4078 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */,
4079 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */,
4080 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */,
4081+ 280056FB188DDD2C00F200AE /* SparseState.h in Headers */,
4082 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */,
4083 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */,
4084 114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */,
4085@@ -734,11 +815,12 @@
4086 114B6FCD11FA7623004FB6AB /* PositionCache.h in Headers */,
4087 114B6FCE11FA7623004FB6AB /* RESearch.h in Headers */,
4088 114B6FCF11FA7623004FB6AB /* RunStyles.h in Headers */,
4089+ 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */,
4090 114B6FD011FA7623004FB6AB /* ScintillaBase.h in Headers */,
4091 114B6FD111FA7623004FB6AB /* Selection.h in Headers */,
4092 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */,
4093 114B6FD311FA7623004FB6AB /* Style.h in Headers */,
4094- 114B6FD411FA7623004FB6AB /* SVector.h in Headers */,
4095+ 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */,
4096 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */,
4097 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */,
4098 114B6FD711FA7623004FB6AB /* XPM.h in Headers */,
4099@@ -754,6 +836,10 @@
4100 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */,
4101 114B6FED11FA7645004FB6AB /* WordList.h in Headers */,
4102 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */,
4103+ 11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */,
4104+ 1100F1EC178E393200105727 /* CaseConvert.h in Headers */,
4105+ 1100F1EE178E393200105727 /* CaseFolder.h in Headers */,
4106+ 1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */,
4107 );
4108 runOnlyForDeploymentPostprocessing = 0;
4109 };
4110@@ -785,7 +871,11 @@
4111 0867D690FE84028FC02AAC07 /* Project object */ = {
4112 isa = PBXProject;
4113 attributes = {
4114+<<<<<<< TREE
4115 LastUpgradeCheck = 0440;
4116+=======
4117+ LastUpgradeCheck = 0500;
4118+>>>>>>> MERGE-SOURCE
4119 };
4120 buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */;
4121 compatibilityVersion = "Xcode 3.2";
4122@@ -814,8 +904,11 @@
4123 files = (
4124 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
4125 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */,
4126+ 28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */,
4127+ 28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */,
4128 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */,
4129 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */,
4130+ 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */,
4131 );
4132 runOnlyForDeploymentPostprocessing = 0;
4133 };
4134@@ -943,6 +1036,7 @@
4135 114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */,
4136 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */,
4137 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */,
4138+<<<<<<< TREE
4139 27CEAD0116358CFD00DEDFD9 /* LexAVS.cxx in Sources */,
4140 27CEAD0216358CFD00DEDFD9 /* LexCoffeeScript.cxx in Sources */,
4141 27CEAD0316358CFD00DEDFD9 /* LexECL.cxx in Sources */,
4142@@ -950,6 +1044,23 @@
4143 27CEAD0516358CFD00DEDFD9 /* LexPO.cxx in Sources */,
4144 27CEAD0616358CFD00DEDFD9 /* LexTCMD.cxx in Sources */,
4145 27CEAD0716358CFD00DEDFD9 /* LexVisualProlog.cxx in Sources */,
4146+=======
4147+ 11A0A8A1148602DF0018D143 /* LexCoffeeScript.cxx in Sources */,
4148+ 117ACE9114A29A1E002876F9 /* LexTCMD.cxx in Sources */,
4149+ 11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */,
4150+ 11BEB6A214EF189600BDE92A /* LexECL.cxx in Sources */,
4151+ 11594BE9155B91DF0099E1FA /* LexOScript.cxx in Sources */,
4152+ 11594BEA155B91DF0099E1FA /* LexVisualProlog.cxx in Sources */,
4153+ 1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */,
4154+ 1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */,
4155+ 11FDAEB7174E1A9800FA161B /* LexSTTXT.cxx in Sources */,
4156+ 11FBA39D17817DA00048C071 /* CharacterCategory.cxx in Sources */,
4157+ 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */,
4158+ 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */,
4159+ 11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */,
4160+ 1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */,
4161+ 11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */,
4162+>>>>>>> MERGE-SOURCE
4163 );
4164 runOnlyForDeploymentPostprocessing = 0;
4165 };
4166@@ -971,8 +1082,12 @@
4167 isa = XCBuildConfiguration;
4168 buildSettings = {
4169 ALWAYS_SEARCH_USER_PATHS = NO;
4170+<<<<<<< TREE
4171 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
4172 COMBINE_HIDPI_IMAGES = YES;
4173+=======
4174+ COMBINE_HIDPI_IMAGES = YES;
4175+>>>>>>> MERGE-SOURCE
4176 COPY_PHASE_STRIP = NO;
4177 DYLIB_COMPATIBILITY_VERSION = 1;
4178 DYLIB_CURRENT_VERSION = 1;
4179@@ -987,7 +1102,10 @@
4180 SCI_NAMESPACE,
4181 SCI_LEXER,
4182 );
4183+<<<<<<< TREE
4184 GCC_VERSION = "";
4185+=======
4186+>>>>>>> MERGE-SOURCE
4187 GCC_WARN_UNINITIALIZED_AUTOS = NO;
4188 GCC_WARN_UNKNOWN_PRAGMAS = YES;
4189 GCC_WARN_UNUSED_FUNCTION = YES;
4190@@ -996,7 +1114,11 @@
4191 INSTALL_PATH = "@executable_path/../Frameworks";
4192 MACOSX_DEPLOYMENT_TARGET = 10.5;
4193 PRODUCT_NAME = Scintilla;
4194+<<<<<<< TREE
4195 SDKROOT = "";
4196+=======
4197+ SKIP_INSTALL = YES;
4198+>>>>>>> MERGE-SOURCE
4199 WRAPPER_EXTENSION = framework;
4200 };
4201 name = Debug;
4202@@ -1005,8 +1127,12 @@
4203 isa = XCBuildConfiguration;
4204 buildSettings = {
4205 ALWAYS_SEARCH_USER_PATHS = NO;
4206+<<<<<<< TREE
4207 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
4208 COMBINE_HIDPI_IMAGES = YES;
4209+=======
4210+ COMBINE_HIDPI_IMAGES = YES;
4211+>>>>>>> MERGE-SOURCE
4212 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
4213 DYLIB_COMPATIBILITY_VERSION = 1;
4214 DYLIB_CURRENT_VERSION = 1;
4215@@ -1018,8 +1144,12 @@
4216 SCI_NAMESPACE,
4217 SCI_LEXER,
4218 );
4219+<<<<<<< TREE
4220 GCC_VERSION = "";
4221 GCC_WARN_UNINITIALIZED_AUTOS = YES;
4222+=======
4223+ GCC_WARN_UNINITIALIZED_AUTOS = NO;
4224+>>>>>>> MERGE-SOURCE
4225 GCC_WARN_UNKNOWN_PRAGMAS = YES;
4226 GCC_WARN_UNUSED_FUNCTION = YES;
4227 GCC_WARN_UNUSED_LABEL = YES;
4228@@ -1027,7 +1157,11 @@
4229 INSTALL_PATH = "@executable_path/../Frameworks";
4230 MACOSX_DEPLOYMENT_TARGET = 10.5;
4231 PRODUCT_NAME = Scintilla;
4232+<<<<<<< TREE
4233 SDKROOT = "";
4234+=======
4235+ SKIP_INSTALL = YES;
4236+>>>>>>> MERGE-SOURCE
4237 WRAPPER_EXTENSION = framework;
4238 };
4239 name = Release;
4240@@ -1035,7 +1169,8 @@
4241 1DEB91B208733DA50010E9CD /* Debug */ = {
4242 isa = XCBuildConfiguration;
4243 buildSettings = {
4244- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
4245+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
4246+ CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
4247 GCC_C_LANGUAGE_STANDARD = c99;
4248 GCC_OPTIMIZATION_LEVEL = 0;
4249 GCC_WARN_ABOUT_RETURN_TYPE = YES;
4250@@ -1045,15 +1180,22 @@
4251 ../../src,
4252 ../../lexlib,
4253 );
4254+<<<<<<< TREE
4255 MACOSX_DEPLOYMENT_TARGET = 10.5;
4256 SKIP_INSTALL = YES;
4257+=======
4258+ MACOSX_DEPLOYMENT_TARGET = 10.5;
4259+ ONLY_ACTIVE_ARCH = YES;
4260+ SDKROOT = macosx;
4261+>>>>>>> MERGE-SOURCE
4262 };
4263 name = Debug;
4264 };
4265 1DEB91B308733DA50010E9CD /* Release */ = {
4266 isa = XCBuildConfiguration;
4267 buildSettings = {
4268- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
4269+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
4270+ CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
4271 GCC_C_LANGUAGE_STANDARD = c99;
4272 GCC_WARN_ABOUT_RETURN_TYPE = YES;
4273 GCC_WARN_UNUSED_VARIABLE = YES;
4274@@ -1062,8 +1204,13 @@
4275 ../../src,
4276 ../../lexlib,
4277 );
4278+<<<<<<< TREE
4279 MACOSX_DEPLOYMENT_TARGET = 10.5;
4280 SKIP_INSTALL = YES;
4281+=======
4282+ MACOSX_DEPLOYMENT_TARGET = 10.5;
4283+ SDKROOT = macosx;
4284+>>>>>>> MERGE-SOURCE
4285 };
4286 name = Release;
4287 };
4288
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 matchCase: NO
4294 wholeWord: NO
4295 scrollTo: YES
4296+<<<<<<< TREE
4297 wrap: YES
4298 backwards: NO];
4299
4300@@ -268,10 +269,23 @@
4301 long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];
4302 [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];
4303
4304+=======
4305+ wrap: YES];
4306+
4307+ long matchStart = [mEditor getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0];
4308+ long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];
4309+ [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];
4310+
4311+>>>>>>> MERGE-SOURCE
4312 if ([[searchField stringValue] isEqualToString: @"XX"])
4313 [self showAutocompletion];
4314 }
4315
4316+-(IBAction) setFontQuality: (id) sender
4317+{
4318+ [ScintillaView directCall:mEditor message:SCI_SETFONTQUALITY wParam:[sender tag] lParam:0];
4319+}
4320+
4321 @end
4322
4323 //--------------------------------------------------------------------------------------------------
4324
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 </object>
4330 </object>
4331 </object>
4332+ <object class="NSMenuItem" id="693549040">
4333+ <reference key="NSMenu" ref="786677654"/>
4334+ <string key="NSTitle">Font Quality</string>
4335+ <string key="NSKeyEquiv"/>
4336+ <int key="NSMnemonicLoc">2147483647</int>
4337+ <reference key="NSOnImage" ref="35465992"/>
4338+ <reference key="NSMixedImage" ref="502551668"/>
4339+ <string key="NSAction">submenuAction:</string>
4340+ <object class="NSMenu" key="NSSubmenu" id="129955363">
4341+ <string key="NSTitle">Font Quality</string>
4342+ <object class="NSMutableArray" key="NSMenuItems">
4343+ <bool key="EncodedWithXMLCoder">YES</bool>
4344+ <object class="NSMenuItem" id="746486634">
4345+ <reference key="NSMenu" ref="129955363"/>
4346+ <string key="NSTitle">Default</string>
4347+ <string key="NSKeyEquiv"/>
4348+ <int key="NSMnemonicLoc">2147483647</int>
4349+ <reference key="NSOnImage" ref="35465992"/>
4350+ <reference key="NSMixedImage" ref="502551668"/>
4351+ </object>
4352+ <object class="NSMenuItem" id="693037100">
4353+ <reference key="NSMenu" ref="129955363"/>
4354+ <string key="NSTitle">Non-antialiased</string>
4355+ <string key="NSKeyEquiv"/>
4356+ <int key="NSMnemonicLoc">2147483647</int>
4357+ <reference key="NSOnImage" ref="35465992"/>
4358+ <reference key="NSMixedImage" ref="502551668"/>
4359+ <int key="NSTag">1</int>
4360+ </object>
4361+ <object class="NSMenuItem" id="863119271">
4362+ <reference key="NSMenu" ref="129955363"/>
4363+ <string key="NSTitle">Antialiased</string>
4364+ <string key="NSKeyEquiv"/>
4365+ <int key="NSMnemonicLoc">2147483647</int>
4366+ <reference key="NSOnImage" ref="35465992"/>
4367+ <reference key="NSMixedImage" ref="502551668"/>
4368+ <int key="NSTag">2</int>
4369+ </object>
4370+ <object class="NSMenuItem" id="1060624593">
4371+ <reference key="NSMenu" ref="129955363"/>
4372+ <string key="NSTitle">LCD Optimized</string>
4373+ <string key="NSKeyEquiv"/>
4374+ <int key="NSMnemonicLoc">2147483647</int>
4375+ <reference key="NSOnImage" ref="35465992"/>
4376+ <reference key="NSMixedImage" ref="502551668"/>
4377+ <int key="NSTag">3</int>
4378+ </object>
4379+ </object>
4380+ </object>
4381+ </object>
4382 <object class="NSMenuItem" id="739652853">
4383 <reference key="NSMenu" ref="786677654"/>
4384 <bool key="NSIsDisabled">YES</bool>
4385@@ -1833,6 +1883,38 @@
4386 </object>
4387 <int key="connectionID">468</int>
4388 </object>
4389+ <object class="IBConnectionRecord">
4390+ <object class="IBActionConnection" key="connection">
4391+ <string key="label">setFontQuality:</string>
4392+ <reference key="source" ref="229445039"/>
4393+ <reference key="destination" ref="746486634"/>
4394+ </object>
4395+ <int key="connectionID">475</int>
4396+ </object>
4397+ <object class="IBConnectionRecord">
4398+ <object class="IBActionConnection" key="connection">
4399+ <string key="label">setFontQuality:</string>
4400+ <reference key="source" ref="229445039"/>
4401+ <reference key="destination" ref="693037100"/>
4402+ </object>
4403+ <int key="connectionID">476</int>
4404+ </object>
4405+ <object class="IBConnectionRecord">
4406+ <object class="IBActionConnection" key="connection">
4407+ <string key="label">setFontQuality:</string>
4408+ <reference key="source" ref="229445039"/>
4409+ <reference key="destination" ref="863119271"/>
4410+ </object>
4411+ <int key="connectionID">477</int>
4412+ </object>
4413+ <object class="IBConnectionRecord">
4414+ <object class="IBActionConnection" key="connection">
4415+ <string key="label">setFontQuality:</string>
4416+ <reference key="source" ref="229445039"/>
4417+ <reference key="destination" ref="1060624593"/>
4418+ </object>
4419+ <int key="connectionID">478</int>
4420+ </object>
4421 </object>
4422 <object class="IBMutableOrderedSet" key="objectRecords">
4423 <object class="NSArray" key="orderedObjects">
4424@@ -2537,6 +2619,7 @@
4425 <reference ref="214559597"/>
4426 <reference ref="596732606"/>
4427 <reference ref="393423671"/>
4428+ <reference ref="693549040"/>
4429 </object>
4430 <reference key="parent" ref="792887677"/>
4431 </object>
4432@@ -2771,6 +2854,47 @@
4433 <reference key="object" ref="515024530"/>
4434 <reference key="parent" ref="552917647"/>
4435 </object>
4436+ <object class="IBObjectRecord">
4437+ <int key="objectID">469</int>
4438+ <reference key="object" ref="693549040"/>
4439+ <object class="NSMutableArray" key="children">
4440+ <bool key="EncodedWithXMLCoder">YES</bool>
4441+ <reference ref="129955363"/>
4442+ </object>
4443+ <reference key="parent" ref="786677654"/>
4444+ </object>
4445+ <object class="IBObjectRecord">
4446+ <int key="objectID">470</int>
4447+ <reference key="object" ref="129955363"/>
4448+ <object class="NSMutableArray" key="children">
4449+ <bool key="EncodedWithXMLCoder">YES</bool>
4450+ <reference ref="746486634"/>
4451+ <reference ref="693037100"/>
4452+ <reference ref="863119271"/>
4453+ <reference ref="1060624593"/>
4454+ </object>
4455+ <reference key="parent" ref="693549040"/>
4456+ </object>
4457+ <object class="IBObjectRecord">
4458+ <int key="objectID">471</int>
4459+ <reference key="object" ref="746486634"/>
4460+ <reference key="parent" ref="129955363"/>
4461+ </object>
4462+ <object class="IBObjectRecord">
4463+ <int key="objectID">472</int>
4464+ <reference key="object" ref="693037100"/>
4465+ <reference key="parent" ref="129955363"/>
4466+ </object>
4467+ <object class="IBObjectRecord">
4468+ <int key="objectID">473</int>
4469+ <reference key="object" ref="863119271"/>
4470+ <reference key="parent" ref="129955363"/>
4471+ </object>
4472+ <object class="IBObjectRecord">
4473+ <int key="objectID">474</int>
4474+ <reference key="object" ref="1060624593"/>
4475+ <reference key="parent" ref="129955363"/>
4476+ </object>
4477 </object>
4478 </object>
4479 <object class="NSMutableDictionary" key="flattenedProperties">
4480
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 29B97313FDCFA39411CA2CEA /* Project object */ = {
4486 isa = PBXProject;
4487 attributes = {
4488+<<<<<<< TREE
4489 LastUpgradeCheck = 0440;
4490+=======
4491+ LastUpgradeCheck = 0450;
4492+>>>>>>> MERGE-SOURCE
4493 };
4494 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
4495 compatibilityVersion = "Xcode 3.2";
4496@@ -304,6 +308,7 @@
4497 LIBRARY_SEARCH_PATHS = "$(inherited)";
4498 OTHER_LDFLAGS = "";
4499 PRODUCT_NAME = ScintillaTest;
4500+ SDKROOT = macosx;
4501 USER_HEADER_SEARCH_PATHS = "";
4502 };
4503 name = Debug;
4504@@ -330,6 +335,7 @@
4505 ONLY_ACTIVE_ARCH = YES;
4506 OTHER_LDFLAGS = "";
4507 PRODUCT_NAME = ScintillaTest;
4508+ SDKROOT = macosx;
4509 USER_HEADER_SEARCH_PATHS = "";
4510 };
4511 name = Release;
4512@@ -340,12 +346,17 @@
4513 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
4514 GCC_C_LANGUAGE_STANDARD = c99;
4515 GCC_OPTIMIZATION_LEVEL = 0;
4516+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
4517 GCC_WARN_ABOUT_RETURN_TYPE = YES;
4518 GCC_WARN_UNUSED_VARIABLE = YES;
4519 MACOSX_DEPLOYMENT_TARGET = 10.5;
4520 ONLY_ACTIVE_ARCH = YES;
4521 OTHER_LDFLAGS = "";
4522+<<<<<<< TREE
4523 SDKROOT = "";
4524+=======
4525+ SDKROOT = macosx;
4526+>>>>>>> MERGE-SOURCE
4527 };
4528 name = Debug;
4529 };
4530@@ -354,12 +365,17 @@
4531 buildSettings = {
4532 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
4533 GCC_C_LANGUAGE_STANDARD = c99;
4534+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
4535 GCC_WARN_ABOUT_RETURN_TYPE = YES;
4536 GCC_WARN_UNUSED_VARIABLE = YES;
4537 MACOSX_DEPLOYMENT_TARGET = 10.5;
4538 ONLY_ACTIVE_ARCH = YES;
4539 OTHER_LDFLAGS = "";
4540+<<<<<<< TREE
4541 SDKROOT = "";
4542+=======
4543+ SDKROOT = macosx;
4544+>>>>>>> MERGE-SOURCE
4545 };
4546 name = Release;
4547 };
4548
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
4554 #import <Cocoa/Cocoa.h>
4555
4556-#import "Platform.h"
4557 #import "Scintilla.h"
4558 #import "SciLexer.h"
4559
4560 #import "InfoBarCommunicator.h"
4561-#import "ScintillaCocoa.h"
4562+
4563+/**
4564+ * Scintilla sends these two messages to the notify handler. Please refer
4565+ * to the Windows API doc for details about the message format.
4566+ */
4567+#define WM_COMMAND 1001
4568+#define WM_NOTIFY 1002
4569+
4570+namespace Scintilla {
4571+/**
4572+ * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
4573+ * back to the parent. Therefore, there must be a callback handler that acts
4574+ * like a Windows WndProc, where Scintilla can send notifications to. Use
4575+ * ScintillaView registerNotifyCallback() to register such a handler.
4576+ * Message format is:
4577+ * <br>
4578+ * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = control ID, lParam = ScintillaCocoa*
4579+ * <br>
4580+ * WM_NOTIFY: wParam = control ID, lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*
4581+ */
4582+typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
4583+
4584+class ScintillaCocoa;
4585+}
4586
4587 @class ScintillaView;
4588
4589+<<<<<<< TREE
4590 extern NSString *SCIUpdateUINotification;
4591
4592 @protocol ScintillaNotificationProtocol
4593@@ -28,9 +51,37 @@
4594
4595 /**
4596 * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and
4597+=======
4598+extern NSString *const SCIUpdateUINotification;
4599+
4600+@protocol ScintillaNotificationProtocol
4601+- (void)notification: (Scintilla::SCNotification*)notification;
4602+@end
4603+
4604+/**
4605+ * SCIMarginView draws line numbers and other margins next to the text view.
4606+ */
4607+@interface SCIMarginView : NSRulerView
4608+{
4609+@private
4610+ int marginWidth;
4611+ ScintillaView *owner;
4612+ NSMutableArray *currentCursors;
4613+}
4614+
4615+@property (assign) int marginWidth;
4616+@property (assign) ScintillaView *owner;
4617+
4618+- (id)initWithScrollView:(NSScrollView *)aScrollView;
4619+
4620+@end
4621+
4622+/**
4623+ * SCIContentView is the Cocoa interface to the Scintilla backend. It handles text input and
4624+>>>>>>> MERGE-SOURCE
4625 * provides a canvas for painting the output.
4626 */
4627-@interface InnerView : NSView <NSTextInput>
4628+@interface SCIContentView : NSView <NSTextInputClient, NSUserInterfaceValidations>
4629 {
4630 @private
4631 ScintillaView* mOwner;
4632@@ -42,28 +93,31 @@
4633 BOOL undoCollectionWasActive;
4634 }
4635
4636+<<<<<<< TREE
4637 @property (nonatomic, assign) ScintillaView* owner;
4638
4639 - (void) dealloc;
4640+=======
4641+@property (nonatomic, assign) ScintillaView* owner;
4642+
4643+>>>>>>> MERGE-SOURCE
4644 - (void) removeMarkedText;
4645-- (void) setCursor: (Scintilla::Window::Cursor) cursor;
4646+- (void) setCursor: (int) cursor;
4647
4648 - (BOOL) canUndo;
4649 - (BOOL) canRedo;
4650
4651 @end
4652
4653-@interface ScintillaView : NSView <InfoBarCommunicator>
4654+@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol>
4655 {
4656 @private
4657 // The back end is kind of a controller and model in one.
4658 // It uses the content view for display.
4659 Scintilla::ScintillaCocoa* mBackend;
4660-
4661- // The object (eg NSDocument) that controls the ScintillaView.
4662- NSObject* mOwner;
4663-
4664+
4665 // This is the actual content to which the backend renders itself.
4666+<<<<<<< TREE
4667 InnerView* mContent;
4668
4669 NSScroller* mHorizontalScroller;
4670@@ -71,20 +125,44 @@
4671
4672 CGFloat zoomDelta;
4673
4674+=======
4675+ SCIContentView* mContent;
4676+
4677+ NSScrollView *scrollView;
4678+ SCIMarginView *marginView;
4679+
4680+ CGFloat zoomDelta;
4681+
4682+>>>>>>> MERGE-SOURCE
4683 // Area to display additional controls (e.g. zoom info, caret position, status info).
4684 NSView <InfoBarCommunicator>* mInfoBar;
4685 BOOL mInfoBarAtTop;
4686+<<<<<<< TREE
4687 int mInitialInfoBarWidth;
4688
4689 id<ScintillaNotificationProtocol> mDelegate;
4690+=======
4691+
4692+ id<ScintillaNotificationProtocol> mDelegate;
4693+>>>>>>> MERGE-SOURCE
4694 }
4695
4696+<<<<<<< TREE
4697 @property (nonatomic, assign) Scintilla::ScintillaCocoa* backend;
4698 @property (nonatomic, assign) NSObject* owner;
4699 @property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;
4700
4701 - (void) dealloc;
4702 - (void) positionSubViews;
4703+=======
4704+@property (nonatomic, readonly) Scintilla::ScintillaCocoa* backend;
4705+@property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;
4706+@property (nonatomic, readonly) NSScrollView *scrollView;
4707+
4708++ (Class) contentViewClass;
4709+
4710+- (void) positionSubViews;
4711+>>>>>>> MERGE-SOURCE
4712
4713 - (void) sendNotification: (NSString*) notificationName;
4714 - (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
4715@@ -92,15 +170,13 @@
4716 - (void) setCallback: (id <InfoBarCommunicator>) callback;
4717
4718 - (void) suspendDrawing: (BOOL) suspend;
4719+- (void) notification: (Scintilla::SCNotification*) notification;
4720
4721 // Scroller handling
4722-- (BOOL) setVerticalScrollRange: (int) range page: (int) page;
4723-- (void) setVerticalScrollPosition: (float) position;
4724-- (BOOL) setHorizontalScrollRange: (int) range page: (int) page;
4725-- (void) setHorizontalScrollPosition: (float) position;
4726-
4727+- (void) setMarginWidth: (int) width;
4728 - (void) scrollerAction: (id) sender;
4729-- (InnerView*) content;
4730+- (SCIContentView*) content;
4731+- (void) updateMarginCursors;
4732
4733 // NSTextView compatibility layer.
4734 - (NSString*) string;
4735@@ -120,6 +196,9 @@
4736 // Native call through to the backend.
4737 + (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam
4738 lParam: (sptr_t) lParam;
4739+- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam lParam: (sptr_t) lParam;
4740+- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam;
4741+- (sptr_t) message: (unsigned int) message;
4742
4743 // Back end properties getters and setters.
4744 - (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;
4745@@ -139,8 +218,14 @@
4746 - (void) setLexerProperty: (NSString*) name value: (NSString*) value;
4747 - (NSString*) getLexerProperty: (NSString*) name;
4748
4749-- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback;
4750-
4751+<<<<<<< TREE
4752+- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback;
4753+
4754+=======
4755+// The delegate property should be used instead of registerNotifyCallback which will be deprecated.
4756+- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback;
4757+
4758+>>>>>>> MERGE-SOURCE
4759 - (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;
4760 - (void) setStatusText: (NSString*) text;
4761
4762
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 * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
4768 */
4769
4770+#import "Platform.h"
4771 #import "ScintillaView.h"
4772+#import "ScintillaCocoa.h"
4773
4774 using namespace Scintilla;
4775
4776@@ -20,29 +22,162 @@
4777 // The scintilla indicator used for keyboard input.
4778 #define INPUT_INDICATOR INDIC_MAX - 1
4779
4780+<<<<<<< TREE
4781 NSString *SCIUpdateUINotification = @"SCIUpdateUI";
4782
4783 @implementation InnerView
4784+=======
4785+NSString *const SCIUpdateUINotification = @"SCIUpdateUI";
4786+
4787+/**
4788+ * Provide an NSCursor object that matches the Window::Cursor enumeration.
4789+ */
4790+static NSCursor *cursorFromEnum(Window::Cursor cursor)
4791+{
4792+ switch (cursor)
4793+ {
4794+ case Window::cursorText:
4795+ return [NSCursor IBeamCursor];
4796+ case Window::cursorArrow:
4797+ return [NSCursor arrowCursor];
4798+ case Window::cursorWait:
4799+ return waitCursor;
4800+ case Window::cursorHoriz:
4801+ return [NSCursor resizeLeftRightCursor];
4802+ case Window::cursorVert:
4803+ return [NSCursor resizeUpDownCursor];
4804+ case Window::cursorReverseArrow:
4805+ return reverseArrowCursor;
4806+ case Window::cursorUp:
4807+ default:
4808+ return [NSCursor arrowCursor];
4809+ }
4810+}
4811+
4812+
4813+@implementation SCIMarginView
4814+
4815+@synthesize marginWidth, owner;
4816+
4817+- (id)initWithScrollView:(NSScrollView *)aScrollView
4818+{
4819+ self = [super initWithScrollView:aScrollView orientation:NSVerticalRuler];
4820+ if (self != nil)
4821+ {
4822+ owner = nil;
4823+ marginWidth = 20;
4824+ currentCursors = [[NSMutableArray arrayWithCapacity:0] retain];
4825+ for (size_t i=0; i<5; i++)
4826+ {
4827+ [currentCursors addObject: [reverseArrowCursor retain]];
4828+ }
4829+ [self setClientView:[aScrollView documentView]];
4830+ }
4831+ return self;
4832+}
4833+
4834+- (void) dealloc
4835+{
4836+ [currentCursors release];
4837+ [super dealloc];
4838+}
4839+
4840+- (void) setFrame: (NSRect) frame
4841+{
4842+ [super setFrame: frame];
4843+
4844+ [[self window] invalidateCursorRectsForView: self];
4845+}
4846+
4847+- (CGFloat)requiredThickness
4848+{
4849+ return marginWidth;
4850+}
4851+
4852+- (void)drawHashMarksAndLabelsInRect:(NSRect)aRect
4853+{
4854+ if (owner) {
4855+ NSRect contentRect = [[[self scrollView] contentView] bounds];
4856+ NSRect marginRect = [self bounds];
4857+ // Ensure paint to bottom of view to avoid glitches
4858+ if (marginRect.size.height > contentRect.size.height) {
4859+ // Legacy scroll bar mode leaves a poorly painted corner
4860+ aRect = marginRect;
4861+ }
4862+ owner.backend->PaintMargin(aRect);
4863+ }
4864+}
4865+
4866+- (void) mouseDown: (NSEvent *) theEvent
4867+{
4868+ NSClipView *textView = [[self scrollView] contentView];
4869+ [[textView window] makeFirstResponder:textView];
4870+ owner.backend->MouseDown(theEvent);
4871+}
4872+
4873+- (void) mouseDragged: (NSEvent *) theEvent
4874+{
4875+ owner.backend->MouseMove(theEvent);
4876+}
4877+
4878+- (void) mouseMoved: (NSEvent *) theEvent
4879+{
4880+ owner.backend->MouseMove(theEvent);
4881+}
4882+
4883+- (void) mouseUp: (NSEvent *) theEvent
4884+{
4885+ owner.backend->MouseUp(theEvent);
4886+}
4887+
4888+/**
4889+ * This method is called to give us the opportunity to define our mouse sensitive rectangle.
4890+ */
4891+- (void) resetCursorRects
4892+{
4893+ [super resetCursorRects];
4894+
4895+ int x = 0;
4896+ NSRect marginRect = [self bounds];
4897+ size_t co = [currentCursors count];
4898+ for (size_t i=0; i<co; i++)
4899+ {
4900+ int cursType = owner.backend->WndProc(SCI_GETMARGINCURSORN, i, 0);
4901+ int width =owner.backend->WndProc(SCI_GETMARGINWIDTHN, i, 0);
4902+ NSCursor *cc = cursorFromEnum(static_cast<Window::Cursor>(cursType));
4903+ [currentCursors replaceObjectAtIndex:i withObject: cc];
4904+ marginRect.origin.x = x;
4905+ marginRect.size.width = width;
4906+ [self addCursorRect: marginRect cursor: cc];
4907+ [cc setOnMouseEntered: YES];
4908+ x += width;
4909+ }
4910+}
4911+
4912+@end
4913+
4914+@implementation SCIContentView
4915+>>>>>>> MERGE-SOURCE
4916
4917 @synthesize owner = mOwner;
4918
4919 //--------------------------------------------------------------------------------------------------
4920
4921-- (NSView*) initWithFrame: (NSRect) frame
4922+- (NSView*) initWithFrame: (NSRect) frame
4923 {
4924 self = [super initWithFrame: frame];
4925-
4926+
4927 if (self != nil)
4928 {
4929 // Some initialization for our view.
4930 mCurrentCursor = [[NSCursor arrowCursor] retain];
4931 mCurrentTrackingRect = 0;
4932 mMarkedTextRange = NSMakeRange(NSNotFound, 0);
4933-
4934+
4935 [self registerForDraggedTypes: [NSArray arrayWithObjects:
4936 NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]];
4937 }
4938-
4939+
4940 return self;
4941 }
4942
4943@@ -70,39 +205,16 @@
4944 /**
4945 * Called by the backend if a new cursor must be set for the view.
4946 */
4947-- (void) setCursor: (Window::Cursor) cursor
4948+- (void) setCursor: (int) cursor
4949 {
4950+ Window::Cursor eCursor = (Window::Cursor)cursor;
4951 [mCurrentCursor autorelease];
4952- switch (cursor)
4953- {
4954- case Window::cursorText:
4955- mCurrentCursor = [NSCursor IBeamCursor];
4956- break;
4957- case Window::cursorArrow:
4958- mCurrentCursor = [NSCursor arrowCursor];
4959- break;
4960- case Window::cursorWait:
4961- mCurrentCursor = waitCursor;
4962- break;
4963- case Window::cursorHoriz:
4964- mCurrentCursor = [NSCursor resizeLeftRightCursor];
4965- break;
4966- case Window::cursorVert:
4967- mCurrentCursor = [NSCursor resizeUpDownCursor];
4968- break;
4969- case Window::cursorReverseArrow:
4970- mCurrentCursor = reverseArrowCursor;
4971- break;
4972- case Window::cursorUp:
4973- default:
4974- mCurrentCursor = [NSCursor arrowCursor];
4975- break;
4976- }
4977-
4978+ mCurrentCursor = cursorFromEnum(eCursor);
4979 [mCurrentCursor retain];
4980-
4981+
4982 // Trigger recreation of the cursor rectangle(s).
4983 [[self window] invalidateCursorRectsForView: self];
4984+ [mOwner updateMarginCursors];
4985 }
4986
4987 //--------------------------------------------------------------------------------------------------
4988@@ -113,7 +225,7 @@
4989 - (void) resetCursorRects
4990 {
4991 [super resetCursorRects];
4992-
4993+
4994 // We only have one cursor rect: our bounds.
4995 [self addCursorRect: [self bounds] cursor: mCurrentCursor];
4996 [mCurrentCursor setOnMouseEntered: YES];
4997@@ -127,17 +239,26 @@
4998 - (void) drawRect: (NSRect) rect
4999 {
5000 CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: