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
=== removed file '.bzrignore'
--- .bzrignore 2009-05-20 12:52:54 +0000
+++ .bzrignore 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.mode2v3
2cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.pbxuser
3*.mode2v3
4*.pbxuser
5.DS_Store
6cocoa/ScintillaTest/build
7bin
8bin
9*.perspectivev3
10cocoa/ScintillaFramework/build
110
=== added file '.hgeol'
--- .hgeol 1970-01-01 00:00:00 +0000
+++ .hgeol 2014-01-24 04:00:28 +0000
@@ -0,0 +1,42 @@
1[patterns]
2**.cxx = native
3**.cpp = native
4**.c = native
5**.h = native
6**.m = native
7**.mm = native
8**.iface = native
9**.template = native
10**.mk = native
11**.py = native
12**.rc = native
13**.html = native
14**.bat = native
15**.mak = native
16**.def = native
17**.manifest = native
18**.properties = native
19**.styled = native
20**.asp = native
21**.php = native
22**.vb = native
23**.d = native
24**.lua = native
25**.rb = native
26**.pl = native
27**.txt = native
28**.pch = native
29**.hgeol = native
30**.dsp = native
31**.sln = native
32**.vcproj = native
33**.pro = native
34**.gen = native
35**makefile = native
36README = native
37**.bmp = BIN
38**.cur = BIN
39**.ico = BIN
40**.jpg = BIN
41**.png = BIN
42tgzsrc = LF
043
=== renamed file '.hgeol' => '.hgeol.moved'
=== added file '.hgignore'
--- .hgignore 1970-01-01 00:00:00 +0000
+++ .hgignore 2014-01-24 04:00:28 +0000
@@ -0,0 +1,59 @@
1syntax: glob
2*.o
3*.a
4*.lib
5*.obj
6*.pyc
7*.dll
8*.dylib
9*.framework
10*.pyd
11*.exp
12*.lib
13*.pdb
14*.res
15*.bak
16*.sbr
17*.suo
18*.idb
19*.bsc
20*.intermediate.manifest
21*.lastbuildstate
22*.cache
23*.ilk
24*.ncb
25*.tlog
26*.sdf
27gtk/*.plist
28win32/*.plist
29*.opt
30*.plg
31*.pbxbtree
32*.mode1v3
33*.pbxuser
34*.pbproj
35*.log
36*.xcbkptlist
37*.xcscheme
38*.xcworkspacedata
39*.xcuserstate
40*.xcsettings
41xcschememanagement.plist
42.DS_Store
43cocoa/build
44cocoa/ScintillaFramework/build
45cocoa/ScintillaTest/build
46macosx/SciTest/build
47*.cppcheck
48Makefile.Debug
49Makefile.Release
50*_resource.rc
51moc_*
52*.pro.user
53ScintillaEdit.cpp
54ScintillaEdit.h
55ScintillaConstants.py
56ScintillaEditBase.intermediate.manifest
57ScintillaEdit.intermediate.manifest
58qt/*/Makefile
59cov-int
060
=== renamed file '.hgignore' => '.hgignore.moved'
=== added file '.hgtags'
--- .hgtags 1970-01-01 00:00:00 +0000
+++ .hgtags 2014-01-24 04:00:28 +0000
@@ -0,0 +1,95 @@
101f406ccdce315e9870c44036e18ebf0fa74df22 rel-1-64
2038d4e745187fddd764fda49b12b878ece14c0bd rel-1-63
303dff61592cf2abbabd9e383f1c8417af3e9d87b rel-1-34
411a62bd24819d0044dcf4b8621f79924cab781bd rel-1-56
51804bf43c2443fb8db7468a36e8022891dfc32c5 rel-1-73
61c4055eaf77fb0e2730adcba2b04a9c40318bdf1 rel-1-74
72abff14b87854b56df577a96d6d87e06bbb44251 rel-1-27
83a80173ef6320433ac4ab05ff97774f186d878ba rel-1-75
94107ec8a3a14b68b832dd12ce568d6517da063f1 rel-2-03
104479fb32e7238069d4ed81d7e586b6bcbc2a94ce rel-1-39
114af05ea4430505d34c9832313c1e5aaac7a54237 rel-1-61
124b0ff01c39b7b9c7aa65d1965bd49daaffe05ea8 rel-1-40
134ec090359e447b59d24c3e970fc9faede13ec187 rel-1-45
144f3e52891003743da45d4464020f59849240d278 rel-1-37
154f77dabcfbab1de33dc2ef89029a4536a1c6c697 rel-1-25
164ff6778c456258929c6f9074bdc03d90c28968bf rel-2-00
1758c51367e4127167fe7be54681b788618732d65b rel-1-51
18668816d0fd5d75dee228bca98b183969c4b1de53 rel-1-52
1967a79ce06212780dc0592bbcf3a3172244cf18c8 rel-1-76
2067aaa980e972a75e9aa11e1fbfe66b4b9c1d78fe rel-1-48
216a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66
226a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66-carbon
236aa816d746280a68821eb90efad0fb5f2d3b751e rel-1-35
246b44857e410f45ad5c9e9b48a481fb902c20a2dc rel-1-26
256b9c7f104c6160507212e5412ba79ecffc6f9057 initial
267681410bf25abb8fa8f51552fd61ec83bdf1a8b0 rel-1-65
277c87fe602c2c1fd973eb89675813192723f7f368 rel-1-30
2885fbbc9b421bdc97a34bead08cdd34cf4c6271f3 rel-1-58
2986d8875ed69c96026e9ec4b77fff3f9d369bfcb6 rel-1-60
3087f60a6fb558871ef85a781e5d03321f77e1d11a rel-1-38
3189b230d9f013855747841b3b3bc8b229259e0c81 rel-1-79
328af30946bc0ad1196ddf51b51545929cab3fa2e6 rel-1-69
338c2d64c399e5d823e2b2ef547a260357be0428c0 rel-1-54
348d11fc4c543f6228d73fa385ec9fca5723f8c832 rel-2-11
3594801bf860900c9dde428db66c5e01a63e521c05 rel-1-44
36988c66dff88ed44913d8d6303f7e136c19f5d6ea rel-2-02
379d268dfb34560f2aeb817148ca746814fd85115d rel-1-46
389e813ff6f15778dd6c6d2f6ab20f9aa8e91b2e47 rel-1-47
399eda4d6efdd657f2ce8ad1034bdd20998f573a40 rel-1-49
40a313740fe8b8ee9df5cfc6f4bae7c665d160f4dd rel-1-78
41a5905b21afdbee56912e039eeb2e2f7fdcf155df rel-1-42
42ade751c9a7e7945e48428e32cdf41d6f7d189f08 rel-1-62
43ae7bd57a9dcedb67467a4b43a27bdf802479bc9e rel-1-33
44af2def618260df6bde2fdb3fd1f22ad532b18270 rel-1-77
45b618c255982d76d4d554c456888cd705b1a52d33 rel-1-68
46b6b5e68dd21fa2f5015e1b45f5b1880aa1c9ecef rel-1-55
47bd0f312842328a1118c43ebd54899916f1009b86 rel-1-57
48c019d05d7131f21ccf7abedb979ca29f2ff5fe32 rel-1-71
49c2c0575d28f000d925d4c0ec689df9b1e572af2d rel-1-43
50c6733869c489c4e39aeb84ffe5d28378e9fb121d rel-1-31
51cc4d999c38f16be78e8ba54749bd4e3711b66882 rel-1-41
52d125f70deea4580ead7cb72814bdb17ad9c16258 rel-1-36
53d2316766e67ea2a10effe85e6e27ea7b520df409 rel-1-70
54d940969f5c6f78c252ac110884aa89014c7d1349 rel-2-10
55ed67316cd7395abf840d8c9d10eb6a23f693d4fc rel-1-28
56ee4e67b4a9fe76e85230216340dc7eff3978fbf8 rel-1-59
57f04248111a542b559402f0e08253b613d7dec849 rel-1-32
58f394f7465aa354dfdea57599f8c7d0e424313144 rel-1-53
59f4d4bb4d5fd70e9affe63460161cf2779f9dfdb3 rel-1-24
60f6af29ca9c6e9ffd457d9f6b9477d03f2d944f64 rel-1-67
61f99c7dfc2bffb16cd478633526b4cba883e266ab rel-2-12
62fd3e6bb269b1c38e003202dc5856cf120667ed88 rel-1-72
63fdf95390299493c05c0e11c3c2ef98293c552908 rel-1-50
64fe112bae056a00c5e0b7218dd3903b16e3d43d24 rel-1-23
65ffde119d297ecdce968737c68f0e21410a0c36c4 rel-2-20
66bae0795bc8950108a5265dd3a1b231dbb1c0a92f rel-2-21
6791d53a344450102a73387dd591cecc4294574891 rel-2-22
68338e9c43eb8339b293aa5cb069aa84c60bbac6ba rel-2-23
693a0d1edb7ae5478426346dab2219e10606238bd0 rel-2-24
70930e2f7d36165066fffd5cef6225c7774a2d7996 rel-2-25
71221dae018a0dd86d4adc91370dfc507ca078b452 rel-2-26
7202d0b25c22c3a4d672aca5fa37b3e5bffc30fa32 rel-2-27
73265b4ffceb4a356fd7917ce938051e8a206bac3e rel-2-28
746f590a14726334be3256c55e8bab9119c71f3160 rel-2-29
757a59b936e02452b66dff32264e5bc72c038ade19 rel-3-0-0
76ad485b918c5a81dbf591eab1916afa3d600b0639 rel-3-0-1
7716f620503ab2e3ae463e39c36f897385fd73b9d1 rel-3-0-2
78d147d5b894708a5c7d3e7b81513fe02f0075e62c rel-3-0-3
792faf55888eeb76e40d5b286cd45f4f40c331b1c2 rel-3-0-4
80a9219577729080874f5f46e0a634d5d117cc2eed rel-3-1-0
81ae4d2f897a8fd92294f61d4d56e90e7700a912df rel-3-2-0
8241bdec833d4a9bb108bd3e4890371b22d1132f1a rel-3-2-1
83183c117293e78c4264dca7afac9f66cb5d585ddc rel-3-2-2
847d54d6d61ace06828cb0850b53a8008672d67f33 rel-3-2-3
851092d3d2495955cfe1a227e360e14d5358b5136f rel-3-2-4
8674f6ed8c5737db179f791d6fe6cab2dc119f65fb rel-3-2-5
8704c9afc26342f4c1b9492c4b27efb33585d6a56d rel-3-3-0
885f9c0934513bf8d9dfe64127ad19cb95800415e9 scitex-3-3-0
89d2022a5e4948379ab0aa89b510b850209d6cbb01 rel-3-3-1
90d887fce163757c50ec95ed204d50b02675db830c rel-3-3-2
911cd0ebd585926933259e776ac380ef17a20e2d5d rel-3-3-3
92e1c3afb1c5d42c664558839b1d68ed4dcc50e5d1 rel-3-3-4
93c343e43079c4458fae69f82ff3b6569b7bba0821 rel-3-3-5
94da3cbb774e02f626fd9ee5446608f0f63665042a rel-3-3-6
955693714a8b0b30e481ba4f089f2ecc93fc80c80d rel-3-3-7
096
=== renamed file '.hgtags' => '.hgtags.moved'
=== modified file 'README'
--- README 2011-08-19 07:30:58 +0000
+++ README 2014-01-24 04:00:28 +0000
@@ -40,8 +40,8 @@
4040
41*** Windows version ***41*** Windows version ***
4242
43A C++ compiler is required. Visual Studio .NET 2010 is the development system43A C++ compiler is required. Visual Studio 2010 is the development system
44used for most development although TDM Mingw32 4.4.1 is also supported.44used for most development although TDM Mingw32 4.7.1 is also supported.
4545
46To build Scintilla, make in the scintilla/win32 directory46To build Scintilla, make in the scintilla/win32 directory
47 cd scintilla\win3247 cd scintilla\win32
@@ -54,10 +54,7 @@
54GCC: mingw32-make54GCC: mingw32-make
55VS .NET: nmake -f scite.mak55VS .NET: nmake -f scite.mak
5656
57An executable SciTE will now be in scite\bin.57An executable SciTE will now be in scite/bin.
58
59The Visual C++ 6.0 project (.dsp) and make files are no longer supported but are left
60in the download for people that are prepared to update them.
6158
62*** GTK+/Windows version ***59*** GTK+/Windows version ***
6360
6461
=== added directory 'bin'
=== added file 'bin/.cvsignore'
--- bin/.cvsignore 1970-01-01 00:00:00 +0000
+++ bin/.cvsignore 2014-01-24 04:00:28 +0000
@@ -0,0 +1,2 @@
1.cvsignore
2*.dll
03
=== added file 'bin/__init__.py'
--- bin/__init__.py 1970-01-01 00:00:00 +0000
+++ bin/__init__.py 2014-01-24 04:00:28 +0000
@@ -0,0 +1,1 @@
1
02
=== added file 'bin/empty.txt'
--- bin/empty.txt 1970-01-01 00:00:00 +0000
+++ bin/empty.txt 2014-01-24 04:00:28 +0000
@@ -0,0 +1,1 @@
1This empty files ensures that the directory is created.
0\ No newline at end of file2\ No newline at end of file
13
=== modified file 'cocoa/Framework.mk'
--- cocoa/Framework.mk 2011-08-19 07:30:58 +0000
+++ cocoa/Framework.mk 2014-01-24 04:00:28 +0000
@@ -4,19 +4,16 @@
4INST_NAME=-install_name \4INST_NAME=-install_name \
5 @executable_path/../Frameworks/Sci.framework/Versions/A/Sci5 @executable_path/../Frameworks/Sci.framework/Versions/A/Sci
66
7LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME)7LD=$(COMPILER) $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME) -framework QuartzCore
88
9LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))9LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
1010
11SCI_LEXERS=$(LEXOBJS) \11SCI_LEXERS=$(LEXOBJS) \
12 LexerBase.o LexerModule.o LexerSimple.o Accessor.o12 $(addsuffix .o, $(basename $(notdir $(wildcard ../lexlib/*.cxx))))
1313
14SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o \14SCI_FILES = $(notdir $(wildcard $(SCI_DIR)/*.cxx))
15 ContractionState.o Decoration.o Document.o Editor.o \15SCI_OBJ = $(addsuffix .o,$(basename $(SCI_FILES)))
16 ExternalLexer.o Indicator.o KeyMap.o LineMarker.o PerLine.o \16SCI_OBJ += $(SCI_LEXERS)
17 PositionCache.o PropSetSimple.o RESearch.o RunStyles.o ScintillaBase.o Style.o \
18 StyleContext.o UniConversion.o ViewStyle.o XPM.o WordList.o \
19 Selection.o CharacterSet.o Catalogue.o $(SCI_LEXERS)
2017
21WAH_OBJ=DocumentAccessor.o KeyWords.o WindowAccessor.o18WAH_OBJ=DocumentAccessor.o KeyWords.o WindowAccessor.o
2219
2320
=== modified file 'cocoa/InfoBar.h'
--- cocoa/InfoBar.h 2012-10-26 08:56:06 +0000
+++ cocoa/InfoBar.h 2014-01-24 04:00:28 +0000
@@ -28,15 +28,15 @@
28@private28@private
29 NSImage* mBackground;29 NSImage* mBackground;
30 IBDisplay mDisplayMask;30 IBDisplay mDisplayMask;
31 31
32 float mScaleFactor;32 float mScaleFactor;
33 NSPopUpButton* mZoomPopup;33 NSPopUpButton* mZoomPopup;
34 34
35 int mCurrentCaretX;35 int mCurrentCaretX;
36 int mCurrentCaretY;36 int mCurrentCaretY;
37 NSTextField* mCaretPositionLabel;37 NSTextField* mCaretPositionLabel;
38 NSTextField* mStatusTextLabel;38 NSTextField* mStatusTextLabel;
39 39
40 id <InfoBarCommunicator> mCallback;40 id <InfoBarCommunicator> mCallback;
41}41}
4242
4343
=== modified file 'cocoa/InfoBar.mm'
--- cocoa/InfoBar.mm 2013-01-09 10:52:16 +0000
+++ cocoa/InfoBar.mm 2014-01-24 04:00:28 +0000
@@ -22,7 +22,7 @@
22{22{
23 // Get the parent's idea of where we should draw23 // Get the parent's idea of where we should draw
24 NSRect newRect = [super drawingRectForBounds: theRect];24 NSRect newRect = [super drawingRectForBounds: theRect];
25 25
26 // When the text field is being edited or selected, we have to turn off the magic because it26 // When the text field is being edited or selected, we have to turn off the magic because it
27 // screws up the configuration of the field editor. We sneak around this by intercepting27 // screws up the configuration of the field editor. We sneak around this by intercepting
28 // selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute.28 // selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute.
@@ -30,26 +30,26 @@
30 {30 {
31 // Get our ideal size for current text31 // Get our ideal size for current text
32 NSSize textSize = [self cellSizeForBounds: theRect];32 NSSize textSize = [self cellSizeForBounds: theRect];
33 33
34 // Center that in the proposed rect34 // Center that in the proposed rect
35 float heightDelta = newRect.size.height - textSize.height; 35 float heightDelta = newRect.size.height - textSize.height;
36 if (heightDelta > 0)36 if (heightDelta > 0)
37 {37 {
38 newRect.size.height -= heightDelta;38 newRect.size.height -= heightDelta;
39 newRect.origin.y += ceil(heightDelta / 2);39 newRect.origin.y += ceil(heightDelta / 2);
40 }40 }
41 }41 }
42 42
43 return newRect;43 return newRect;
44}44}
4545
46//--------------------------------------------------------------------------------------------------46//--------------------------------------------------------------------------------------------------
4747
48- (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj 48- (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
49 delegate:(id) anObject start: (NSInteger) selStart length: (NSInteger) selLength49 delegate:(id) anObject start: (NSInteger) selStart length: (NSInteger) selLength
50{50{
51 aRect = [self drawingRectForBounds: aRect];51 aRect = [self drawingRectForBounds: aRect];
52 mIsEditingOrSelecting = YES; 52 mIsEditingOrSelecting = YES;
53 [super selectWithFrame: aRect53 [super selectWithFrame: aRect
54 inView: controlView54 inView: controlView
55 editor: textObj55 editor: textObj
@@ -63,7 +63,7 @@
6363
64- (void) editWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj64- (void) editWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
65 delegate: (id) anObject event: (NSEvent*) theEvent65 delegate: (id) anObject event: (NSEvent*) theEvent
66{ 66{
67 aRect = [self drawingRectForBounds: aRect];67 aRect = [self drawingRectForBounds: aRect];
68 mIsEditingOrSelecting = YES;68 mIsEditingOrSelecting = YES;
69 [super editWithFrame: aRect69 [super editWithFrame: aRect
@@ -86,9 +86,15 @@
86 if (self)86 if (self)
87 {87 {
88 NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]];88 NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]];
89<<<<<<< TREE
89 90
90 NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"png" inDirectory: nil];91 NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"png" inDirectory: nil];
91 mBackground = [[NSImage alloc] initWithContentsOfFile: path];92 mBackground = [[NSImage alloc] initWithContentsOfFile: path];
93=======
94
95 NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"tiff" inDirectory: nil];
96 mBackground = [[NSImage alloc] initWithContentsOfFile: path];
97>>>>>>> MERGE-SOURCE
92 if (![mBackground isValid])98 if (![mBackground isValid])
93 NSLog(@"Background image for info bar is invalid.");99 NSLog(@"Background image for info bar is invalid.");
94100
@@ -103,7 +109,7 @@
103//--------------------------------------------------------------------------------------------------109//--------------------------------------------------------------------------------------------------
104110
105/**111/**
106 * Called by a connected compontent (usually the info bar) if something changed there.112 * Called by a connected component (usually the info bar) if something changed there.
107 *113 *
108 * @param type The type of the notification.114 * @param type The type of the notification.
109 * @param message Carries the new status message if the type is a status message change.115 * @param message Carries the new status message if the type is a status message change.
@@ -152,14 +158,14 @@
152{158{
153 // 1) The zoom popup.159 // 1) The zoom popup.
154 unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);160 unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);
155 161
156 // Create the popup button.162 // Create the popup button.
157 mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];163 mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];
158 164
159 // No border or background please.165 // No border or background please.
160 [[mZoomPopup cell] setBordered: NO];166 [[mZoomPopup cell] setBordered: NO];
161 [[mZoomPopup cell] setArrowPosition: NSPopUpArrowAtBottom];167 [[mZoomPopup cell] setArrowPosition: NSPopUpArrowAtBottom];
162 168
163 // Fill it.169 // Fill it.
164 for (unsigned count = 0; count < numberOfDefaultItems; count++)170 for (unsigned count = 0; count < numberOfDefaultItems; count++)
165 {171 {
@@ -169,28 +175,28 @@
169 [currentItem setRepresentedObject: [NSNumber numberWithFloat: DefaultScaleMenuFactors[count]]];175 [currentItem setRepresentedObject: [NSNumber numberWithFloat: DefaultScaleMenuFactors[count]]];
170 }176 }
171 [mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex];177 [mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex];
172 178
173 // Hook it up.179 // Hook it up.
174 [mZoomPopup setTarget: self];180 [mZoomPopup setTarget: self];
175 [mZoomPopup setAction: @selector(zoomItemAction:)];181 [mZoomPopup setAction: @selector(zoomItemAction:)];
176 182
177 // Set a suitable font.183 // Set a suitable font.
178 [mZoomPopup setFont: [NSFont menuBarFontOfSize: BarFontSize]];184 [mZoomPopup setFont: [NSFont menuBarFontOfSize: BarFontSize]];
179 185
180 // Make sure the popup is big enough to fit the cells.186 // Make sure the popup is big enough to fit the cells.
181 [mZoomPopup sizeToFit];187 [mZoomPopup sizeToFit];
182 188
183 // Don't let it become first responder189 // Don't let it become first responder
184 [mZoomPopup setRefusesFirstResponder: YES];190 [mZoomPopup setRefusesFirstResponder: YES];
185 191
186 // put it in the scrollview.192 // put it in the scrollview.
187 [self addSubview: mZoomPopup];193 [self addSubview: mZoomPopup];
188 [mZoomPopup release];194 [mZoomPopup release];
189 195
190 // 2) The caret position label.196 // 2) The caret position label.
191 Class oldCellClass = [NSTextField cellClass];197 Class oldCellClass = [NSTextField cellClass];
192 [NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]];198 [NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]];
193 199
194 mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)];200 mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)];
195 [mCaretPositionLabel setBezeled: NO];201 [mCaretPositionLabel setBezeled: NO];
196 [mCaretPositionLabel setBordered: NO];202 [mCaretPositionLabel setBordered: NO];
@@ -205,7 +211,7 @@
205211
206 [self addSubview: mCaretPositionLabel];212 [self addSubview: mCaretPositionLabel];
207 [mCaretPositionLabel release];213 [mCaretPositionLabel release];
208 214
209 // 3) The status text.215 // 3) The status text.
210 mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)];216 mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)];
211 [mStatusTextLabel setBezeled: NO];217 [mStatusTextLabel setBezeled: NO];
@@ -220,7 +226,7 @@
220226
221 [self addSubview: mStatusTextLabel];227 [self addSubview: mStatusTextLabel];
222 [mStatusTextLabel release];228 [mStatusTextLabel release];
223 229
224 // Restore original cell class so that everything else doesn't get broken230 // Restore original cell class so that everything else doesn't get broken
225 [NSTextField setCellClass: oldCellClass];231 [NSTextField setCellClass: oldCellClass];
226}232}
@@ -248,12 +254,12 @@
248 [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];254 [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
249 target.x += mBackground.size.width;255 target.x += mBackground.size.width;
250 }256 }
251 257
252 // Draw separator lines between items.258 // Draw separator lines between items.
253 NSRect verticalLineRect;259 NSRect verticalLineRect;
254 float component = 190.0 / 255.0;260 float component = 190.0 / 255.0;
255 NSColor* lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1];261 NSColor* lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1];
256 262
257 if (mDisplayMask & IBShowZoom)263 if (mDisplayMask & IBShowZoom)
258 {264 {
259 verticalLineRect = [mZoomPopup frame];265 verticalLineRect = [mZoomPopup frame];
@@ -265,7 +271,7 @@
265 NSRectFill(verticalLineRect);271 NSRectFill(verticalLineRect);
266 }272 }
267 }273 }
268 274
269 if (mDisplayMask & IBShowCaretPosition)275 if (mDisplayMask & IBShowCaretPosition)
270 {276 {
271 verticalLineRect = [mCaretPositionLabel frame];277 verticalLineRect = [mCaretPositionLabel frame];
@@ -347,7 +353,7 @@
347 mDisplayMask = display;353 mDisplayMask = display;
348 [self positionSubViews];354 [self positionSubViews];
349 [self needsDisplay];355 [self needsDisplay];
350 } 356 }
351}357}
352358
353//--------------------------------------------------------------------------------------------------359//--------------------------------------------------------------------------------------------------
@@ -358,7 +364,7 @@
358- (void) zoomItemAction: (id) sender364- (void) zoomItemAction: (id) sender
359{365{
360 NSNumber* selectedFactorObject = [[sender selectedCell] representedObject];366 NSNumber* selectedFactorObject = [[sender selectedCell] representedObject];
361 367
362 if (selectedFactorObject == nil)368 if (selectedFactorObject == nil)
363 {369 {
364 NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported.");370 NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported.");
@@ -369,9 +375,9 @@
369 [self setScaleFactor: [selectedFactorObject floatValue] adjustPopup: NO];375 [self setScaleFactor: [selectedFactorObject floatValue] adjustPopup: NO];
370 }376 }
371}377}
372 378
373//--------------------------------------------------------------------------------------------------379//--------------------------------------------------------------------------------------------------
374 380
375- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag381- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag
376{382{
377 if (mScaleFactor != newScaleFactor)383 if (mScaleFactor != newScaleFactor)
@@ -381,7 +387,7 @@
381 {387 {
382 unsigned count = 0;388 unsigned count = 0;
383 unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float);389 unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float);
384 390
385 // We only work with some preset zoom values. If the given value does not correspond391 // We only work with some preset zoom values. If the given value does not correspond
386 // to one then show no selection.392 // to one then show no selection.
387 while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))393 while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
@@ -391,7 +397,7 @@
391 else397 else
392 {398 {
393 [mZoomPopup selectItemAtIndex: count];399 [mZoomPopup selectItemAtIndex: count];
394 400
395 // Set scale factor to found preset value if it comes close.401 // Set scale factor to found preset value if it comes close.
396 mScaleFactor = DefaultScaleMenuFactors[count];402 mScaleFactor = DefaultScaleMenuFactors[count];
397 }403 }
@@ -400,7 +406,7 @@
400 {406 {
401 // Internally set. Notify owner.407 // Internally set. Notify owner.
402 [mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor];408 [mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor];
403 } 409 }
404 }410 }
405}411}
406412
@@ -414,12 +420,12 @@
414 // Make the position one-based.420 // Make the position one-based.
415 int newX = (int) position.x + 1;421 int newX = (int) position.x + 1;
416 int newY = (int) position.y + 1;422 int newY = (int) position.y + 1;
417 423
418 if (mCurrentCaretX != newX || mCurrentCaretY != newY)424 if (mCurrentCaretX != newX || mCurrentCaretY != newY)
419 {425 {
420 mCurrentCaretX = newX;426 mCurrentCaretX = newX;
421 mCurrentCaretY = newY;427 mCurrentCaretY = newY;
422 428
423 [mCaretPositionLabel setStringValue: [NSString stringWithFormat: @"%d:%d", newX, newY]];429 [mCaretPositionLabel setStringValue: [NSString stringWithFormat: @"%d:%d", newX, newY]];
424 }430 }
425}431}
@@ -427,7 +433,7 @@
427//--------------------------------------------------------------------------------------------------433//--------------------------------------------------------------------------------------------------
428434
429/**435/**
430 * Makes the bar resize to the smallest width that can accomodate the currently enabled items.436 * Makes the bar resize to the smallest width that can accommodate the currently enabled items.
431 */437 */
432- (void) sizeToFit438- (void) sizeToFit
433{439{
@@ -435,13 +441,13 @@
435 frame.size.width = 0;441 frame.size.width = 0;
436 if (mDisplayMask & IBShowZoom)442 if (mDisplayMask & IBShowZoom)
437 frame.size.width += [mZoomPopup frame].size.width;443 frame.size.width += [mZoomPopup frame].size.width;
438 444
439 if (mDisplayMask & IBShowCaretPosition)445 if (mDisplayMask & IBShowCaretPosition)
440 frame.size.width += [mCaretPositionLabel frame].size.width;446 frame.size.width += [mCaretPositionLabel frame].size.width;
441 447
442 if (mDisplayMask & IBShowStatusText)448 if (mDisplayMask & IBShowStatusText)
443 frame.size.width += [mStatusTextLabel frame].size.width;449 frame.size.width += [mStatusTextLabel frame].size.width;
444 450
445 [self setFrame: frame];451 [self setFrame: frame];
446}452}
447453
448454
=== modified file 'cocoa/PlatCocoa.h'
--- cocoa/PlatCocoa.h 2012-10-26 08:56:06 +0000
+++ cocoa/PlatCocoa.h 2014-01-24 04:00:28 +0000
@@ -50,7 +50,7 @@
50 QuartzTextLayout* textLayout;50 QuartzTextLayout* textLayout;
51 int codePage;51 int codePage;
52 int verticalDeviceResolution;52 int verticalDeviceResolution;
53 53
54 /** If the surface is a bitmap context, contains a reference to the bitmap data. */54 /** If the surface is a bitmap context, contains a reference to the bitmap data. */
55 uint8_t* bitmapData;55 uint8_t* bitmapData;
56 /** If the surface is a bitmap context, stores the dimensions of the bitmap. */56 /** If the surface is a bitmap context, stores the dimensions of the bitmap. */
@@ -96,6 +96,7 @@
96 void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage);96 void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage);
97 void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back);97 void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back);
98 void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);98 void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);
99<<<<<<< TREE
99 void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,100 void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
100 ColourDesired back);101 ColourDesired back);
101 void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, 102 void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
@@ -110,6 +111,22 @@
110 XYPOSITION ExternalLeading(Font &font_);111 XYPOSITION ExternalLeading(Font &font_);
111 XYPOSITION Height(Font &font_);112 XYPOSITION Height(Font &font_);
112 XYPOSITION AverageCharWidth(Font &font_);113 XYPOSITION AverageCharWidth(Font &font_);
114=======
115 void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
116 ColourDesired back);
117 void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
118 ColourDesired back);
119 void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore);
120 void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions);
121 XYPOSITION WidthText(Font &font_, const char *s, int len);
122 XYPOSITION WidthChar(Font &font_, char ch);
123 XYPOSITION Ascent(Font &font_);
124 XYPOSITION Descent(Font &font_);
125 XYPOSITION InternalLeading(Font &font_);
126 XYPOSITION ExternalLeading(Font &font_);
127 XYPOSITION Height(Font &font_);
128 XYPOSITION AverageCharWidth(Font &font_);
129>>>>>>> MERGE-SOURCE
113130
114 void SetClip(PRectangle rc);131 void SetClip(PRectangle rc);
115 void FlushCachedState();132 void FlushCachedState();
@@ -117,7 +134,7 @@
117 void SetUnicodeMode(bool unicodeMode_);134 void SetUnicodeMode(bool unicodeMode_);
118 void SetDBCSMode(int codePage_);135 void SetDBCSMode(int codePage_);
119}; // SurfaceImpl class136}; // SurfaceImpl class
120 137
121} // Scintilla namespace138} // Scintilla namespace
122139
123#endif140#endif
124141
=== modified file 'cocoa/PlatCocoa.mm'
--- cocoa/PlatCocoa.mm 2012-10-26 08:56:06 +0000
+++ cocoa/PlatCocoa.mm 2014-01-24 04:00:28 +0000
@@ -12,9 +12,10 @@
12 * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).12 * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
13 */13 */
1414
15#import <ScintillaView.h>15#import "Platform.h"
1616#import "ScintillaView.h"
17#include "PlatCocoa.h"17#import "ScintillaCocoa.h"
18#import "PlatCocoa.h"
1819
19#include <cstring>20#include <cstring>
20#include <cstdio>21#include <cstdio>
@@ -22,14 +23,14 @@
22#include <assert.h>23#include <assert.h>
23#include <sys/time.h>24#include <sys/time.h>
24#include <stdexcept>25#include <stdexcept>
26#include <vector>
25#include <map>27#include <map>
2628
29#include "StringCopy.h"
27#include "XPM.h"30#include "XPM.h"
2831
29#import <Foundation/NSGeometry.h>32#import <Foundation/NSGeometry.h>
3033
31#import <Carbon/Carbon.h> // Temporary
32
33using namespace Scintilla;34using namespace Scintilla;
3435
35extern sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam);36extern sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
@@ -57,7 +58,7 @@
57//--------------------------------------------------------------------------------------------------58//--------------------------------------------------------------------------------------------------
5859
59/**60/**
60 * Converts a PRctangle as used by Scintilla to a Quartz-style rectangle.61 * Converts a PRectangle as used by Scintilla to a Quartz-style rectangle.
61 */62 */
62inline CGRect PRectangleToCGRect(PRectangle& rc)63inline CGRect PRectangleToCGRect(PRectangle& rc)
63{64{
@@ -178,7 +179,7 @@
178 }179 }
179 bitmapData = NULL;180 bitmapData = NULL;
180 gc = NULL;181 gc = NULL;
181 182
182 bitmapWidth = 0;183 bitmapWidth = 0;
183 bitmapHeight = 0;184 bitmapHeight = 0;
184 x = 0;185 x = 0;
@@ -198,11 +199,11 @@
198void SurfaceImpl::Init(WindowID)199void SurfaceImpl::Init(WindowID)
199{200{
200 // To be able to draw, the surface must get a CGContext handle. We save the graphics port,201 // To be able to draw, the surface must get a CGContext handle. We save the graphics port,
201 // then aquire/release the context on an as-need basis (see above).202 // then acquire/release the context on an as-need basis (see above).
202 // XXX Docs on QDBeginCGContext are light, a better way to do this would be good.203 // XXX Docs on QDBeginCGContext are light, a better way to do this would be good.
203 // AFAIK we should not hold onto a context retrieved this way, thus the need for204 // AFAIK we should not hold onto a context retrieved this way, thus the need for
204 // aquire/release of the context.205 // acquire/release of the context.
205 206
206 Release();207 Release();
207}208}
208209
@@ -221,45 +222,42 @@
221void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */)222void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */)
222{223{
223 Release();224 Release();
224 225
225 // Create a new bitmap context, along with the RAM for the bitmap itself226 // Create a new bitmap context, along with the RAM for the bitmap itself
226 bitmapWidth = width;227 bitmapWidth = width;
227 bitmapHeight = height;228 bitmapHeight = height;
228 229
229 const int bitmapBytesPerRow = (width * BYTES_PER_PIXEL);230 const int bitmapBytesPerRow = (width * BYTES_PER_PIXEL);
230 const int bitmapByteCount = (bitmapBytesPerRow * height);231 const int bitmapByteCount = (bitmapBytesPerRow * height);
231 232
232 // Create an RGB color space.233 // Create an RGB color space.
233 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();234 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
234 if (colorSpace == NULL)235 if (colorSpace == NULL)
235 return;236 return;
236 237
237 // Create the bitmap.238 // Create the bitmap.
238 bitmapData = new uint8_t[bitmapByteCount];239 bitmapData = new uint8_t[bitmapByteCount];
239 if (bitmapData != NULL)240 // create the context
241 gc = CGBitmapContextCreate(bitmapData,
242 width,
243 height,
244 BITS_PER_COMPONENT,
245 bitmapBytesPerRow,
246 colorSpace,
247 kCGImageAlphaPremultipliedLast);
248
249 if (gc == NULL)
240 {250 {
241 // create the context251 // the context couldn't be created for some reason,
242 gc = CGBitmapContextCreate(bitmapData,252 // and we have no use for the bitmap without the context
243 width,253 delete[] bitmapData;
244 height,254 bitmapData = NULL;
245 BITS_PER_COMPONENT,
246 bitmapBytesPerRow,
247 colorSpace,
248 kCGImageAlphaPremultipliedLast);
249
250 if (gc == NULL)
251 {
252 // the context couldn't be created for some reason,
253 // and we have no use for the bitmap without the context
254 delete[] bitmapData;
255 bitmapData = NULL;
256 }
257 textLayout->setContext (gc);
258 }255 }
259 256 textLayout->setContext (gc);
257
260 // the context retains the color space, so we can release it258 // the context retains the color space, so we can release it
261 CGColorSpaceRelease(colorSpace);259 CGColorSpaceRelease(colorSpace);
262 260
263 if (gc != NULL && bitmapData != NULL)261 if (gc != NULL && bitmapData != NULL)
264 {262 {
265 // "Erase" to white.263 // "Erase" to white.
@@ -276,9 +274,9 @@
276 if (gc)274 if (gc)
277 {275 {
278 ColourDesired colour(fore.AsLong());276 ColourDesired colour(fore.AsLong());
279 277
280 // Set the Stroke color to match278 // Set the Stroke color to match
281 CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, 279 CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
282 colour.GetBlue() / 255.0, 1.0 );280 colour.GetBlue() / 255.0, 1.0 );
283 }281 }
284}282}
@@ -290,9 +288,9 @@
290 if (gc)288 if (gc)
291 {289 {
292 ColourDesired colour(back.AsLong());290 ColourDesired colour(back.AsLong());
293 291
294 // Set the Fill color to match292 // Set the Fill color to match
295 CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, 293 CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
296 colour.GetBlue() / 255.0, 1.0 );294 colour.GetBlue() / 255.0, 1.0 );
297 }295 }
298}296}
@@ -304,17 +302,17 @@
304 // For now, assume that GetImage can only be called on PixMap surfaces.302 // For now, assume that GetImage can only be called on PixMap surfaces.
305 if (bitmapData == NULL)303 if (bitmapData == NULL)
306 return NULL;304 return NULL;
307 305
308 CGContextFlush(gc);306 CGContextFlush(gc);
309 307
310 // Create an RGB color space.308 // Create an RGB color space.
311 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();309 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
312 if( colorSpace == NULL )310 if( colorSpace == NULL )
313 return NULL;311 return NULL;
314 312
315 const int bitmapBytesPerRow = ((int) bitmapWidth * BYTES_PER_PIXEL);313 const int bitmapBytesPerRow = ((int) bitmapWidth * BYTES_PER_PIXEL);
316 const int bitmapByteCount = (bitmapBytesPerRow * (int) bitmapHeight);314 const int bitmapByteCount = (bitmapBytesPerRow * (int) bitmapHeight);
317 315
318 // Make a copy of the bitmap data for the image creation and divorce it316 // Make a copy of the bitmap data for the image creation and divorce it
319 // From the SurfaceImpl lifetime317 // From the SurfaceImpl lifetime
320 CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bitmapData, bitmapByteCount);318 CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bitmapData, bitmapByteCount);
@@ -338,18 +336,18 @@
338 0,336 0,
339 kCGRenderingIntentDefault);337 kCGRenderingIntentDefault);
340 }338 }
341 339
342 // The image retains the color space, so we can release it.340 // The image retains the color space, so we can release it.
343 CGColorSpaceRelease(colorSpace);341 CGColorSpaceRelease(colorSpace);
344 colorSpace = NULL;342 colorSpace = NULL;
345 343
346 // Done with the data provider.344 // Done with the data provider.
347 CGDataProviderRelease(dataProvider);345 CGDataProviderRelease(dataProvider);
348 dataProvider = NULL;346 dataProvider = NULL;
349 347
350 // Done with the data provider.348 // Done with the data provider.
351 CFRelease(dataRef);349 CFRelease(dataRef);
352 350
353 return image;351 return image;
354}352}
355353
@@ -389,10 +387,10 @@
389void SurfaceImpl::LineTo(int x_, int y_)387void SurfaceImpl::LineTo(int x_, int y_)
390{388{
391 CGContextBeginPath( gc );389 CGContextBeginPath( gc );
392 390
393 // Because Quartz is based on floating point, lines are drawn with half their colour391 // Because Quartz is based on floating point, lines are drawn with half their colour
394 // on each side of the line. Integer coordinates specify the INTERSECTION of the pixel392 // on each side of the line. Integer coordinates specify the INTERSECTION of the pixel
395 // divison lines. If you specify exact pixel values, you get a line that393 // division lines. If you specify exact pixel values, you get a line that
396 // is twice as thick but half as intense. To get pixel aligned rendering,394 // is twice as thick but half as intense. To get pixel aligned rendering,
397 // we render the "middle" of the pixels by adding 0.5 to the coordinates.395 // we render the "middle" of the pixels by adding 0.5 to the coordinates.
398 CGContextMoveToPoint( gc, x + 0.5, y + 0.5 );396 CGContextMoveToPoint( gc, x + 0.5, y + 0.5 );
@@ -408,31 +406,27 @@
408 ColourDesired back)406 ColourDesired back)
409{407{
410 // Allocate memory for the array of points.408 // Allocate memory for the array of points.
411 CGPoint *points = new CGPoint[npts];409 std::vector<CGPoint> points(npts);
412 410
413 for (int i = 0;i < npts;i++)411 for (int i = 0;i < npts;i++)
414 {412 {
415 // Quartz floating point issues: plot the MIDDLE of the pixels413 // Quartz floating point issues: plot the MIDDLE of the pixels
416 points[i].x = pts[i].x + 0.5;414 points[i].x = pts[i].x + 0.5;
417 points[i].y = pts[i].y + 0.5;415 points[i].y = pts[i].y + 0.5;
418 }416 }
419 417
420 CGContextBeginPath(gc);418 CGContextBeginPath(gc);
421 419
422 // Set colours420 // Set colours
423 FillColour(back);421 FillColour(back);
424 PenColour(fore);422 PenColour(fore);
425 423
426 // Draw the polygon424 // Draw the polygon
427 CGContextAddLines(gc, points, npts);425 CGContextAddLines(gc, points.data(), npts);
428 426
429 // Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only)427 // Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only)
430 CGContextClosePath( gc );428 CGContextClosePath( gc );
431 CGContextDrawPath( gc, kCGPathFillStroke );429 CGContextDrawPath( gc, kCGPathFillStroke );
432
433 // Deallocate memory.
434 delete points;
435 points = NULL;
436}430}
437431
438//--------------------------------------------------------------------------------------------------432//--------------------------------------------------------------------------------------------------
@@ -444,7 +438,7 @@
444 CGContextBeginPath( gc );438 CGContextBeginPath( gc );
445 FillColour(back);439 FillColour(back);
446 PenColour(fore);440 PenColour(fore);
447 441
448 // Quartz integer -> float point conversion fun (see comment in SurfaceImpl::LineTo)442 // Quartz integer -> float point conversion fun (see comment in SurfaceImpl::LineTo)
449 // We subtract 1 from the Width() and Height() so that all our drawing is within the area defined443 // We subtract 1 from the Width() and Height() so that all our drawing is within the area defined
450 // by the PRectangle. Otherwise, we draw one pixel too far to the right and bottom.444 // by the PRectangle. Otherwise, we draw one pixel too far to the right and bottom.
@@ -487,7 +481,7 @@
487void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern)481void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern)
488{482{
489 SurfaceImpl& patternSurface = static_cast<SurfaceImpl &>(surfacePattern);483 SurfaceImpl& patternSurface = static_cast<SurfaceImpl &>(surfacePattern);
490 484
491 // For now, assume that copy can only be called on PixMap surfaces. Shows up black.485 // For now, assume that copy can only be called on PixMap surfaces. Shows up black.
492 CGImageRef image = patternSurface.GetImage();486 CGImageRef image = patternSurface.GetImage();
493 if (image == NULL)487 if (image == NULL)
@@ -495,11 +489,19 @@
495 FillRectangle(rc, ColourDesired(0));489 FillRectangle(rc, ColourDesired(0));
496 return;490 return;
497 }491 }
498 492<<<<<<< TREE
499 const CGPatternCallbacks drawImageCallbacks = { 0,493
500 reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback),494 const CGPatternCallbacks drawImageCallbacks = { 0,
501 reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) };495 reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback),
502 496 reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) };
497
498=======
499
500 const CGPatternCallbacks drawImageCallbacks = { 0,
501 reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback),
502 reinterpret_cast<CGPatternReleaseInfoCallback>(releaseImageRefCallback) };
503
504>>>>>>> MERGE-SOURCE
503 CGPatternRef pattern = CGPatternCreate(image,505 CGPatternRef pattern = CGPatternCreate(image,
504 CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight),506 CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight),
505 CGAffineTransformIdentity,507 CGAffineTransformIdentity,
@@ -514,10 +516,10 @@
514 // Create a pattern color space516 // Create a pattern color space
515 CGColorSpaceRef colorSpace = CGColorSpaceCreatePattern( NULL );517 CGColorSpaceRef colorSpace = CGColorSpaceCreatePattern( NULL );
516 if( colorSpace != NULL ) {518 if( colorSpace != NULL ) {
517 519
518 CGContextSaveGState( gc );520 CGContextSaveGState( gc );
519 CGContextSetFillColorSpace( gc, colorSpace );521 CGContextSetFillColorSpace( gc, colorSpace );
520 522
521 // Unlike the documentation, you MUST pass in a "components" parameter:523 // Unlike the documentation, you MUST pass in a "components" parameter:
522 // For coloured patterns it is the alpha value.524 // For coloured patterns it is the alpha value.
523 const CGFloat alpha = 1.0;525 const CGFloat alpha = 1.0;
@@ -540,12 +542,12 @@
540 // which is a rectangle with rounded corners each having a radius of 4 pixels.542 // which is a rectangle with rounded corners each having a radius of 4 pixels.
541 // It would be almost as good just cutting off the corners with lines at543 // It would be almost as good just cutting off the corners with lines at
542 // 45 degrees as is done on GTK+.544 // 45 degrees as is done on GTK+.
543 545
544 // Create a rectangle with semicircles at the corners546 // Create a rectangle with semicircles at the corners
545 const int MAX_RADIUS = 4;547 const int MAX_RADIUS = 4;
546 int radius = Platform::Minimum( MAX_RADIUS, rc.Height()/2 );548 int radius = Platform::Minimum( MAX_RADIUS, rc.Height()/2 );
547 radius = Platform::Minimum( radius, rc.Width()/2 );549 radius = Platform::Minimum( radius, rc.Width()/2 );
548 550
549 // Points go clockwise, starting from just below the top left551 // Points go clockwise, starting from just below the top left
550 // Corners are kept together, so we can easily create arcs to connect them552 // Corners are kept together, so we can easily create arcs to connect them
551 CGPoint corners[4][3] =553 CGPoint corners[4][3] =
@@ -571,7 +573,7 @@
571 { rc.left, rc.bottom - radius - 1 },573 { rc.left, rc.bottom - radius - 1 },
572 },574 },
573 };575 };
574 576
575 // Align the points in the middle of the pixels577 // Align the points in the middle of the pixels
576 for( int i = 0; i < 4; ++ i )578 for( int i = 0; i < 4; ++ i )
577 {579 {
@@ -581,38 +583,133 @@
581 corners[i][j].y += 0.5;583 corners[i][j].y += 0.5;
582 }584 }
583 }585 }
584 586
585 PenColour( fore );587 PenColour( fore );
586 FillColour( back );588 FillColour( back );
587 589
588 // Move to the last point to begin the path590 // Move to the last point to begin the path
589 CGContextBeginPath( gc );591 CGContextBeginPath( gc );
590 CGContextMoveToPoint( gc, corners[3][2].x, corners[3][2].y );592 CGContextMoveToPoint( gc, corners[3][2].x, corners[3][2].y );
591 593
592 for ( int i = 0; i < 4; ++ i )594 for ( int i = 0; i < 4; ++ i )
593 {595 {
594 CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y );596 CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y );
595 CGContextAddArcToPoint( gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius );597 CGContextAddArcToPoint( gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius );
596 }598 }
597 599
598 // Close the path to enclose it for stroking and for filling, then draw it600 // Close the path to enclose it for stroking and for filling, then draw it
599 CGContextClosePath( gc );601 CGContextClosePath( gc );
600 CGContextDrawPath( gc, kCGPathFillStroke );602 CGContextDrawPath( gc, kCGPathFillStroke );
601}603}
602604
605<<<<<<< TREE
603void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, ColourDesired fill, int alphaFill,606void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, ColourDesired fill, int alphaFill,
604 ColourDesired /*outline*/, int /*alphaOutline*/, int /*flags*/)607 ColourDesired /*outline*/, int /*alphaOutline*/, int /*flags*/)
608=======
609// DrawChamferedRectangle is a helper function for AlphaRectangle that either fills or strokes a
610// rectangle with its corners chamfered at 45 degrees.
611static void DrawChamferedRectangle(CGContextRef gc, PRectangle rc, int cornerSize, CGPathDrawingMode mode) {
612 // Points go clockwise, starting from just below the top left
613 CGPoint corners[4][2] =
614 {
615 {
616 { rc.left, rc.top + cornerSize },
617 { rc.left + cornerSize, rc.top },
618 },
619 {
620 { rc.right - cornerSize - 1, rc.top },
621 { rc.right - 1, rc.top + cornerSize },
622 },
623 {
624 { rc.right - 1, rc.bottom - cornerSize - 1 },
625 { rc.right - cornerSize - 1, rc.bottom - 1 },
626 },
627 {
628 { rc.left + cornerSize, rc.bottom - 1 },
629 { rc.left, rc.bottom - cornerSize - 1 },
630 },
631 };
632
633 // Align the points in the middle of the pixels
634 for( int i = 0; i < 4; ++ i )
635 {
636 for( int j = 0; j < 2; ++ j )
637 {
638 corners[i][j].x += 0.5;
639 corners[i][j].y += 0.5;
640 }
641 }
642
643 // Move to the last point to begin the path
644 CGContextBeginPath( gc );
645 CGContextMoveToPoint( gc, corners[3][1].x, corners[3][1].y );
646
647 for ( int i = 0; i < 4; ++ i )
648 {
649 CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y );
650 CGContextAddLineToPoint( gc, corners[i][1].x, corners[i][1].y );
651 }
652
653 // Close the path to enclose it for stroking and for filling, then draw it
654 CGContextClosePath( gc );
655 CGContextDrawPath( gc, mode );
656}
657
658void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
659 ColourDesired outline, int alphaOutline, int /*flags*/)
660>>>>>>> MERGE-SOURCE
605{661{
606 if ( gc ) {662 if ( gc ) {
663<<<<<<< TREE
607 ColourDesired colour( fill.AsLong() );664 ColourDesired colour( fill.AsLong() );
608 665
609 // Snap rectangle boundaries to nearest int666 // Snap rectangle boundaries to nearest int
610 rc.left = lround(rc.left);667 rc.left = lround(rc.left);
611 rc.right = lround(rc.right);668 rc.right = lround(rc.right);
669=======
670 // Snap rectangle boundaries to nearest int
671 rc.left = lround(rc.left);
672 rc.right = lround(rc.right);
673>>>>>>> MERGE-SOURCE
612 // Set the Fill color to match674 // Set the Fill color to match
613 CGContextSetRGBFillColor( gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, colour.GetBlue() / 255.0, alphaFill / 255.0 );675 CGContextSetRGBFillColor( gc, fill.GetRed() / 255.0, fill.GetGreen() / 255.0, fill.GetBlue() / 255.0, alphaFill / 255.0 );
614 CGRect rect = PRectangleToCGRect( rc );676 CGContextSetRGBStrokeColor( gc, outline.GetRed() / 255.0, outline.GetGreen() / 255.0, outline.GetBlue() / 255.0, alphaOutline / 255.0 );
615 CGContextFillRect( gc, rect );677 PRectangle rcFill = rc;
678 if (cornerSize == 0) {
679 // A simple rectangle, no rounded corners
680 if ((fill == outline) && (alphaFill == alphaOutline)) {
681 // Optimization for simple case
682 CGRect rect = PRectangleToCGRect( rcFill );
683 CGContextFillRect( gc, rect );
684 } else {
685 rcFill.left += 1.0;
686 rcFill.top += 1.0;
687 rcFill.right -= 1.0;
688 rcFill.bottom -= 1.0;
689 CGRect rect = PRectangleToCGRect( rcFill );
690 CGContextFillRect( gc, rect );
691 CGContextAddRect( gc, CGRectMake( rc.left + 0.5, rc.top + 0.5, rc.Width() - 1, rc.Height() - 1 ) );
692 CGContextStrokePath( gc );
693 }
694 } else {
695 // Approximate rounded corners with 45 degree chamfers.
696 // Drawing real circular arcs often leaves some over- or under-drawn pixels.
697 if ((fill == outline) && (alphaFill == alphaOutline)) {
698 // Specializing this case avoids a few stray light/dark pixels in corners.
699 rcFill.left -= 0.5;
700 rcFill.top -= 0.5;
701 rcFill.right += 0.5;
702 rcFill.bottom += 0.5;
703 DrawChamferedRectangle( gc, rcFill, cornerSize, kCGPathFill );
704 } else {
705 rcFill.left += 0.5;
706 rcFill.top += 0.5;
707 rcFill.right -= 0.5;
708 rcFill.bottom -= 0.5;
709 DrawChamferedRectangle( gc, rcFill, cornerSize-1, kCGPathFill );
710 DrawChamferedRectangle( gc, rc, cornerSize, kCGPathStroke );
711 }
712 }
616 }713 }
617}714}
618715
@@ -629,25 +726,30 @@
629 if (colorSpace) {726 if (colorSpace) {
630 const int bitmapBytesPerRow = ((int) width * 4);727 const int bitmapBytesPerRow = ((int) width * 4);
631 const int bitmapByteCount = (bitmapBytesPerRow * (int) height);728 const int bitmapByteCount = (bitmapBytesPerRow * (int) height);
632 729
633 // Create a data provider.730 // Create a data provider.
634 CGDataProviderRef dataProvider = 0;731 CGDataProviderRef dataProvider = 0;
635 if (invert) {732 if (invert) {
733<<<<<<< TREE
636 unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount];734 unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount];
637 735
736=======
737 unsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount];
738
739>>>>>>> MERGE-SOURCE
638 for (int y=0; y<height; y++) {740 for (int y=0; y<height; y++) {
639 int yInverse = height - y - 1;741 int yInverse = height - y - 1;
640 memcpy(pixelsUpsideDown + y * bitmapBytesPerRow,742 memcpy(pixelsUpsideDown + y * bitmapBytesPerRow,
641 pixelsImage + yInverse * bitmapBytesPerRow,743 pixelsImage + yInverse * bitmapBytesPerRow,
642 bitmapBytesPerRow);744 bitmapBytesPerRow);
643 }745 }
644 746
645 dataProvider = CGDataProviderCreateWithData(747 dataProvider = CGDataProviderCreateWithData(
646 NULL, pixelsUpsideDown, bitmapByteCount, ProviderReleaseData);748 NULL, pixelsUpsideDown, bitmapByteCount, ProviderReleaseData);
647 } else {749 } else {
648 dataProvider = CGDataProviderCreateWithData(750 dataProvider = CGDataProviderCreateWithData(
649 NULL, pixelsImage, bitmapByteCount, NULL);751 NULL, pixelsImage, bitmapByteCount, NULL);
650 752
651 }753 }
652 if (dataProvider) {754 if (dataProvider) {
653 // Create the CGImage.755 // Create the CGImage.
@@ -665,7 +767,11 @@
665767
666 CGDataProviderRelease(dataProvider);768 CGDataProviderRelease(dataProvider);
667 }769 }
770<<<<<<< TREE
668 771
772=======
773
774>>>>>>> MERGE-SOURCE
669 // The image retains the color space, so we can release it.775 // The image retains the color space, so we can release it.
670 CGColorSpaceRelease(colorSpace);776 CGColorSpaceRelease(colorSpace);
671 }777 }
@@ -681,6 +787,7 @@
681 }787 }
682}788}
683789
790<<<<<<< TREE
684void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) {791void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) {
685 // Drawing an ellipse with bezier curves. Code modified from:792 // Drawing an ellipse with bezier curves. Code modified from:
686 // http://www.codeguru.com/gdi/ellipse.shtml793 // http://www.codeguru.com/gdi/ellipse.shtml
@@ -722,30 +829,25 @@
722 cCtlPt[12].y =829 cCtlPt[12].y =
723 cCtlPt[6].y = centre.y + 0.5;830 cCtlPt[6].y = centre.y + 0.5;
724 831
832=======
833void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) {
834 CGRect ellipseRect = CGRectMake(rc.left, rc.top, rc.Width(), rc.Height());
835>>>>>>> MERGE-SOURCE
725 FillColour(back);836 FillColour(back);
726 PenColour(fore);837 PenColour(fore);
727 838 CGContextBeginPath(gc);
728 CGContextBeginPath( gc );839 CGContextAddEllipseInRect(gc, ellipseRect);
729 CGContextMoveToPoint( gc, cCtlPt[0].x, cCtlPt[0].y );840 CGContextDrawPath(gc, kCGPathFillStroke);
730
731 for ( int i = 1; i < 13; i += 3 )
732 {
733 CGContextAddCurveToPoint( gc, cCtlPt[i].x, cCtlPt[i].y, cCtlPt[i+1].x, cCtlPt[i+1].y, cCtlPt[i+2].x, cCtlPt[i+2].y );
734 }
735
736 // Close the path to enclose it for stroking and for filling, then draw it
737 CGContextClosePath( gc );
738 CGContextDrawPath( gc, kCGPathFillStroke );
739}841}
740842
741void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect)843void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect)
742{844{
743 SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);845 SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);
744 CGImageRef image = source.GetImage();846 CGImageRef image = source.GetImage();
745 847
746 CGRect src = PRectangleToCGRect(srcRect);848 CGRect src = PRectangleToCGRect(srcRect);
747 CGRect dst = PRectangleToCGRect(dstRect);849 CGRect dst = PRectangleToCGRect(dstRect);
748 850
749 /* source from QuickDrawToQuartz2D.pdf on developer.apple.com */851 /* source from QuickDrawToQuartz2D.pdf on developer.apple.com */
750 float w = (float) CGImageGetWidth(image);852 float w = (float) CGImageGetWidth(image);
751 float h = (float) CGImageGetHeight(image);853 float h = (float) CGImageGetHeight(image);
@@ -769,10 +871,10 @@
769 // Maybe we have to make the Surface two contexts:871 // Maybe we have to make the Surface two contexts:
770 // a bitmap context which we do all the drawing on, and then a "real" context872 // a bitmap context which we do all the drawing on, and then a "real" context
771 // which we copy the output to when we call "Synchronize". Ugh! Gross and slow!873 // which we copy the output to when we call "Synchronize". Ugh! Gross and slow!
772 874
773 // For now, assume that copy can only be called on PixMap surfaces875 // For now, assume that copy can only be called on PixMap surfaces
774 SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);876 SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);
775 877
776 // Get the CGImageRef878 // Get the CGImageRef
777 CGImageRef image = source.GetImage();879 CGImageRef image = source.GetImage();
778 // If we could not get an image reference, fill the rectangle black880 // If we could not get an image reference, fill the rectangle black
@@ -781,19 +883,19 @@
781 FillRectangle( rc, ColourDesired( 0 ) );883 FillRectangle( rc, ColourDesired( 0 ) );
782 return;884 return;
783 }885 }
784 886
785 // Now draw the image on the surface887 // Now draw the image on the surface
786 888
787 // Some fancy clipping work is required here: draw only inside of rc889 // Some fancy clipping work is required here: draw only inside of rc
788 CGContextSaveGState( gc );890 CGContextSaveGState( gc );
789 CGContextClipToRect( gc, PRectangleToCGRect( rc ) );891 CGContextClipToRect( gc, PRectangleToCGRect( rc ) );
790 892
791 //Platform::DebugPrintf(stderr, "Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\n", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight );893 //Platform::DebugPrintf(stderr, "Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\n", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight );
792 CGContextDrawImage( gc, CGRectMake( rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ), image );894 CGContextDrawImage( gc, CGRectMake( rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ), image );
793 895
794 // Undo the clipping fun896 // Undo the clipping fun
795 CGContextRestoreGState( gc );897 CGContextRestoreGState( gc );
796 898
797 // Done with the image899 // Done with the image
798 CGImageRelease( image );900 CGImageRelease( image );
799 image = NULL;901 image = NULL;
@@ -878,8 +980,13 @@
878 }980 }
879}981}
880982
983<<<<<<< TREE
881void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, 984void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len,
882 ColourDesired fore)985 ColourDesired fore)
986=======
987void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len,
988 ColourDesired fore)
989>>>>>>> MERGE-SOURCE
883{990{
884 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));991 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
885 ColourDesired colour(fore.AsLong());992 ColourDesired colour(fore.AsLong());
@@ -887,7 +994,7 @@
887994
888 QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID());995 QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID());
889 style->setCTStyleColor(color);996 style->setCTStyleColor(color);
890 997
891 CGColorRelease(color);998 CGColorRelease(color);
892999
893 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));1000 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
@@ -912,10 +1019,10 @@
912{1019{
913 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));1020 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
914 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));1021 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
915 1022
916 CTLineRef mLine = textLayout->getCTLine();1023 CTLineRef mLine = textLayout->getCTLine();
917 assert(mLine != NULL);1024 assert(mLine != NULL);
918 1025
919 if (unicodeMode) {1026 if (unicodeMode) {
920 // Map the widths given for UTF-16 characters back onto the UTF-8 input string1027 // Map the widths given for UTF-16 characters back onto the UTF-8 input string
921 CFIndex fit = textLayout->getStringLength();1028 CFIndex fit = textLayout->getStringLength();
@@ -961,7 +1068,7 @@
961 {1068 {
962 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));1069 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
963 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));1070 textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
964 1071
965 return textLayout->MeasureStringWidth();1072 return textLayout->MeasureStringWidth();
966 }1073 }
967 return 1;1074 return 1;
@@ -973,7 +1080,7 @@
973 {1080 {
974 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));1081 CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
975 textLayout->setText (reinterpret_cast<const UInt8*>(str), 1, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));1082 textLayout->setText (reinterpret_cast<const UInt8*>(str), 1, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
976 1083
977 return textLayout->MeasureStringWidth();1084 return textLayout->MeasureStringWidth();
978 }1085 }
979 else1086 else
@@ -987,7 +1094,7 @@
987XYPOSITION SurfaceImpl::Ascent(Font &font_) {1094XYPOSITION SurfaceImpl::Ascent(Font &font_) {
988 if (!font_.GetID())1095 if (!font_.GetID())
989 return 1;1096 return 1;
990 1097
991 float ascent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAscent();1098 float ascent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAscent();
992 return ascent + 0.5;1099 return ascent + 0.5;
9931100
@@ -996,7 +1103,7 @@
996XYPOSITION SurfaceImpl::Descent(Font &font_) {1103XYPOSITION SurfaceImpl::Descent(Font &font_) {
997 if (!font_.GetID())1104 if (!font_.GetID())
998 return 1;1105 return 1;
999 1106
1000 float descent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getDescent();1107 float descent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getDescent();
1001 return descent + 0.5;1108 return descent + 0.5;
10021109
@@ -1009,7 +1116,7 @@
1009XYPOSITION SurfaceImpl::ExternalLeading(Font &font_) {1116XYPOSITION SurfaceImpl::ExternalLeading(Font &font_) {
1010 if (!font_.GetID())1117 if (!font_.GetID())
1011 return 1;1118 return 1;
1012 1119
1013 float leading = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getLeading();1120 float leading = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getLeading();
1014 return leading + 0.5;1121 return leading + 0.5;
10151122
@@ -1021,14 +1128,19 @@
1021 return ht;1128 return ht;
1022}1129}
10231130
1131<<<<<<< TREE
1024XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {1132XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {
1025 1133
1134=======
1135XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {
1136
1137>>>>>>> MERGE-SOURCE
1026 if (!font_.GetID())1138 if (!font_.GetID())
1027 return 1;1139 return 1;
1028 1140
1029 const int sizeStringLength = (sizeof( sizeString ) / sizeof( sizeString[0] ) - 1);1141 const int sizeStringLength = ELEMENTS( sizeString );
1030 int width = WidthText( font_, sizeString, sizeStringLength );1142 int width = WidthText( font_, sizeString, sizeStringLength );
1031 1143
1032 return (int) ((width / (float) sizeStringLength) + 0.5);1144 return (int) ((width / (float) sizeStringLength) + 0.5);
1033}1145}
10341146
@@ -1109,8 +1221,13 @@
1109 // NSView1221 // NSView
1110 NSView* view = reinterpret_cast<NSView*>(idWin);1222 NSView* view = reinterpret_cast<NSView*>(idWin);
1111 win = [view window];1223 win = [view window];
1224<<<<<<< TREE
1112 rect = [view convertRect: [view bounds] toView: nil];1225 rect = [view convertRect: [view bounds] toView: nil];
1113 rect.origin = [win convertBaseToScreen: rect.origin];1226 rect.origin = [win convertBaseToScreen: rect.origin];
1227=======
1228 rect = [view convertRect: [view bounds] toView: nil];
1229 rect.origin = [win convertBaseToScreen:rect.origin];
1230>>>>>>> MERGE-SOURCE
1114 }1231 }
1115 else1232 else
1116 {1233 {
@@ -1269,9 +1386,9 @@
1269 if (wid)1386 if (wid)
1270 {1387 {
1271 id idWin = reinterpret_cast<id>(wid);1388 id idWin = reinterpret_cast<id>(wid);
1272 if ([idWin isMemberOfClass: [InnerView class]])1389 if ([idWin isMemberOfClass: [SCIContentView class]])
1273 {1390 {
1274 InnerView* container = reinterpret_cast<InnerView*>(idWin);1391 SCIContentView* container = reinterpret_cast<SCIContentView*>(idWin);
1275 [container setCursor: curs];1392 [container setCursor: curs];
1276 }1393 }
1277 }1394 }
@@ -1488,7 +1605,6 @@
1488class ListBoxImpl : public ListBox, IListBox1605class ListBoxImpl : public ListBox, IListBox
1489{1606{
1490private:1607private:
1491 ControlRef lb;
1492 ImageMap images;1608 ImageMap images;
1493 int lineHeight;1609 int lineHeight;
1494 bool unicodeMode;1610 bool unicodeMode;
@@ -1503,14 +1619,19 @@
1503 NSScrollView* scroller;1619 NSScrollView* scroller;
1504 NSTableColumn* colIcon;1620 NSTableColumn* colIcon;
1505 NSTableColumn* colText;1621 NSTableColumn* colText;
1622<<<<<<< TREE
1506 AutoCompletionDataSource* ds;1623 AutoCompletionDataSource* ds;
1507 1624
1625=======
1626 AutoCompletionDataSource* ds;
1627
1628>>>>>>> MERGE-SOURCE
1508 LinesData ld;1629 LinesData ld;
1509 CallBackAction doubleClickAction;1630 CallBackAction doubleClickAction;
1510 void* doubleClickActionData;1631 void* doubleClickActionData;
15111632
1512public:1633public:
1513 ListBoxImpl() : lb(NULL), lineHeight(10), unicodeMode(false),1634 ListBoxImpl() : lineHeight(10), unicodeMode(false),
1514 desiredVisibleRows(5), maxItemWidth(0), aveCharWidth(8), maxIconWidth(0),1635 desiredVisibleRows(5), maxItemWidth(0), aveCharWidth(8), maxIconWidth(0),
1515 doubleClickAction(NULL), doubleClickActionData(NULL)1636 doubleClickAction(NULL), doubleClickActionData(NULL)
1516 {1637 {
@@ -1698,36 +1819,31 @@
1698{1819{
1699 Clear();1820 Clear();
1700 size_t count = strlen(list) + 1;1821 size_t count = strlen(list) + 1;
1701 char* words = new char[count];1822 std::vector<char> words(list, list+count);
1702 if (words)1823 char* startword = words.data();
1824 char* numword = NULL;
1825 int i = 0;
1826 for (; words[i]; i++)
1703 {1827 {
1704 memcpy(words, list, count);1828 if (words[i] == separator)
1705 char* startword = words;1829 {
1706 char* numword = NULL;1830 words[i] = '\0';
1707 int i = 0;
1708 for (; words[i]; i++)
1709 {
1710 if (words[i] == separator)
1711 {
1712 words[i] = '\0';
1713 if (numword)
1714 *numword = '\0';
1715 Append(startword, numword?atoi(numword + 1):-1);
1716 startword = words + i + 1;
1717 numword = NULL;
1718 }
1719 else if (words[i] == typesep)
1720 {
1721 numword = words + i;
1722 }
1723 }
1724 if (startword)
1725 {
1726 if (numword)1831 if (numword)
1727 *numword = '\0';1832 *numword = '\0';
1728 Append(startword, numword?atoi(numword + 1):-1);1833 Append(startword, numword?atoi(numword + 1):-1);
1729 }1834 startword = words.data() + i + 1;
1730 delete []words;1835 numword = NULL;
1836 }
1837 else if (words[i] == typesep)
1838 {
1839 numword = words.data() + i;
1840 }
1841 }
1842 if (startword)
1843 {
1844 if (numword)
1845 *numword = '\0';
1846 Append(startword, numword?atoi(numword + 1):-1);
1731 }1847 }
1732 [table reloadData];1848 [table reloadData];
1733}1849}
@@ -1770,8 +1886,7 @@
1770 value[0] = '\0';1886 value[0] = '\0';
1771 return;1887 return;
1772 }1888 }
1773 strncpy(value, textString, len);1889 strlcpy(value, textString, len);
1774 value[len - 1] = '\0';
1775}1890}
17761891
1777void ListBoxImpl::RegisterImage(int type, const char* xpm_data)1892void ListBoxImpl::RegisterImage(int type, const char* xpm_data)
@@ -1792,12 +1907,21 @@
1792}1907}
17931908
1794void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {1909void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {
1910<<<<<<< TREE
1795 CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);1911 CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);
1796 NSSize sz = {width, height};1912 NSSize sz = {width, height};
1797 NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease];1913 NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease];
1798 NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef];1914 NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef];
1799 [img addRepresentation: bitmapRep];1915 [img addRepresentation: bitmapRep];
1800 [bitmapRep release];1916 [bitmapRep release];
1917=======
1918 CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);
1919 NSSize sz = {static_cast<CGFloat>(width), static_cast<CGFloat>(height)};
1920 NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease];
1921 NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef];
1922 [img addRepresentation: bitmapRep];
1923 [bitmapRep release];
1924>>>>>>> MERGE-SOURCE
1801 CGImageRelease(imageRef);1925 CGImageRelease(imageRef);
1802 [img retain];1926 [img retain];
1803 ImageMap::iterator it=images.find(type);1927 ImageMap::iterator it=images.find(type);
@@ -1884,7 +2008,7 @@
1884@implementation ScintillaContextMenu : NSMenu2008@implementation ScintillaContextMenu : NSMenu
18852009
1886// This NSMenu subclass serves also as target for menu commands and forwards them as2010// This NSMenu subclass serves also as target for menu commands and forwards them as
1887// notfication messages to the front end.2011// notification messages to the front end.
18882012
1889- (void) handleCommand: (NSMenuItem*) sender2013- (void) handleCommand: (NSMenuItem*) sender
1890{2014{
@@ -1939,8 +2063,13 @@
19392063
1940ElapsedTime::ElapsedTime() {2064ElapsedTime::ElapsedTime() {
1941 struct timeval curTime;2065 struct timeval curTime;
2066<<<<<<< TREE
1942 gettimeofday( &curTime, NULL );2067 gettimeofday( &curTime, NULL );
1943 2068
2069=======
2070 gettimeofday( &curTime, NULL );
2071
2072>>>>>>> MERGE-SOURCE
1944 bigBit = curTime.tv_sec;2073 bigBit = curTime.tv_sec;
1945 littleBit = curTime.tv_usec;2074 littleBit = curTime.tv_usec;
1946}2075}
@@ -1999,18 +2128,18 @@
1999//--------------------------------------------------------------------------------------------------2128//--------------------------------------------------------------------------------------------------
20002129
2001/**2130/**
2002 * Returns the time span in which two consequtive mouse clicks must occur to be considered as2131 * Returns the time span in which two consecutive mouse clicks must occur to be considered as
2003 * double click.2132 * double click.
2004 *2133 *
2005 * @return2134 * @return
2006 */2135 */
2007unsigned int Platform::DoubleClickTime()2136unsigned int Platform::DoubleClickTime()
2008{2137{
2009 float threshold = [[NSUserDefaults standardUserDefaults] floatForKey: 2138 float threshold = [[NSUserDefaults standardUserDefaults] floatForKey:
2010 @"com.apple.mouse.doubleClickThreshold"];2139 @"com.apple.mouse.doubleClickThreshold"];
2011 if (threshold == 0)2140 if (threshold == 0)
2012 threshold = 0.5;2141 threshold = 0.5;
2013 return static_cast<unsigned int>(threshold / kEventDurationMillisecond);2142 return static_cast<unsigned int>(threshold * 1000.0);
2014}2143}
20152144
2016//--------------------------------------------------------------------------------------------------2145//--------------------------------------------------------------------------------------------------
@@ -2023,9 +2152,9 @@
2023//--------------------------------------------------------------------------------------------------2152//--------------------------------------------------------------------------------------------------
20242153
2025/**2154/**
2026 * Helper method for the backend to reach through to the scintiall window.2155 * Helper method for the backend to reach through to the scintilla window.
2027 */2156 */
2028long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) 2157long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam)
2029{2158{
2030 return scintilla_send_message(w, msg, wParam, lParam);2159 return scintilla_send_message(w, msg, wParam, lParam);
2031}2160}
@@ -2033,7 +2162,7 @@
2033//--------------------------------------------------------------------------------------------------2162//--------------------------------------------------------------------------------------------------
20342163
2035/**2164/**
2036 * Helper method for the backend to reach through to the scintiall window.2165 * Helper method for the backend to reach through to the scintilla window.
2037 */2166 */
2038long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam)2167long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam)
2039{2168{
@@ -2052,7 +2181,7 @@
2052 // Shift_jis2181 // Shift_jis
2053 return ((uch >= 0x81) && (uch <= 0x9F)) ||2182 return ((uch >= 0x81) && (uch <= 0x9F)) ||
2054 ((uch >= 0xE0) && (uch <= 0xFC));2183 ((uch >= 0xE0) && (uch <= 0xFC));
2055 // Lead bytes F0 to FC may be a Microsoft addition. 2184 // Lead bytes F0 to FC may be a Microsoft addition.
2056 case 936:2185 case 936:
2057 // GBK2186 // GBK
2058 return (uch >= 0x81) && (uch <= 0xFE);2187 return (uch >= 0x81) && (uch <= 0xFE);
@@ -2116,7 +2245,7 @@
2116{2245{
2117 const int BUF_SIZE = 2000;2246 const int BUF_SIZE = 2000;
2118 char buffer[BUF_SIZE];2247 char buffer[BUF_SIZE];
2119 2248
2120 va_list pArguments;2249 va_list pArguments;
2121 va_start(pArguments, format);2250 va_start(pArguments, format);
2122 vsnprintf(buffer, BUF_SIZE, format, pArguments);2251 vsnprintf(buffer, BUF_SIZE, format, pArguments);
@@ -2148,10 +2277,9 @@
2148void Platform::Assert(const char *c, const char *file, int line)2277void Platform::Assert(const char *c, const char *file, int line)
2149{2278{
2150 char buffer[2000];2279 char buffer[2000];
2151 sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line);2280 snprintf(buffer, sizeof(buffer), "Assertion [%s] failed at %s %d\r\n", c, file, line);
2152 strcat(buffer, "\r\n");
2153 Platform::DebugDisplay(buffer);2281 Platform::DebugDisplay(buffer);
2154#ifdef DEBUG 2282#ifdef DEBUG
2155 // Jump into debugger in assert on Mac (CL269835)2283 // Jump into debugger in assert on Mac (CL269835)
2156 ::Debugger();2284 ::Debugger();
2157#endif2285#endif
@@ -2172,9 +2300,9 @@
21722300
2173/**2301/**
2174 * Implements the platform specific part of library loading.2302 * Implements the platform specific part of library loading.
2175 * 2303 *
2176 * @param modulePath The path to the module to load.2304 * @param modulePath The path to the module to load.
2177 * @return A library instance or NULL if the module could not be found or another problem occured.2305 * @return A library instance or NULL if the module could not be found or another problem occurred.
2178 */2306 */
2179DynamicLibrary* DynamicLibrary::Load(const char* /* modulePath */)2307DynamicLibrary* DynamicLibrary::Load(const char* /* modulePath */)
2180{2308{
21812309
=== modified file 'cocoa/QuartzTextLayout.h'
--- cocoa/QuartzTextLayout.h 2011-08-19 07:30:58 +0000
+++ cocoa/QuartzTextLayout.h 2014-01-24 04:00:28 +0000
@@ -20,7 +20,7 @@
20{20{
21public:21public:
22 /** Create a text layout for drawing on the specified context. */22 /** Create a text layout for drawing on the specified context. */
23 QuartzTextLayout( CGContextRef context )23 explicit QuartzTextLayout( CGContextRef context )
24 {24 {
25 mString = NULL;25 mString = NULL;
26 mLine = NULL;26 mLine = NULL;
@@ -39,7 +39,7 @@
39 {39 {
40 CFRelease(mLine);40 CFRelease(mLine);
41 mLine = NULL;41 mLine = NULL;
42 } 42 }
43 }43 }
4444
45 inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r )45 inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r )
@@ -47,19 +47,19 @@
47 CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );47 CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );
48 if (!str)48 if (!str)
49 return;49 return;
50 50
51 stringLength = CFStringGetLength(str);51 stringLength = CFStringGetLength(str);
5252
53 CFMutableDictionaryRef stringAttribs = r.getCTStyle();53 CFMutableDictionaryRef stringAttribs = r.getCTStyle();
54 54
55 if (mString != NULL)55 if (mString != NULL)
56 CFRelease(mString);56 CFRelease(mString);
57 mString = ::CFAttributedStringCreate(NULL, str, stringAttribs);57 mString = ::CFAttributedStringCreate(NULL, str, stringAttribs);
58 58
59 if (mLine != NULL)59 if (mLine != NULL)
60 CFRelease(mLine);60 CFRelease(mLine);
61 mLine = ::CTLineCreateWithAttributedString(mString);61 mLine = ::CTLineCreateWithAttributedString(mString);
62 62
63 CFRelease( str );63 CFRelease( str );
64 }64 }
6565
@@ -70,28 +70,28 @@
70 {70 {
71 if (mLine == NULL)71 if (mLine == NULL)
72 return;72 return;
73 73
74 ::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0));74 ::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0));
75 75
76 // Set the text drawing position.76 // Set the text drawing position.
77 ::CGContextSetTextPosition(gc, x, y);77 ::CGContextSetTextPosition(gc, x, y);
78 78
79 // And finally, draw!79 // And finally, draw!
80 ::CTLineDraw(mLine, gc);80 ::CTLineDraw(mLine, gc);
81 }81 }
82 82
83 float MeasureStringWidth()83 float MeasureStringWidth()
84 { 84 {
85 if (mLine == NULL)85 if (mLine == NULL)
86 return 0.0f;86 return 0.0f;
87 87
88 return ::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL);88 return ::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL);
89 }89 }
90 90
91 CTLineRef getCTLine() {91 CTLineRef getCTLine() {
92 return mLine;92 return mLine;
93 }93 }
94 94
95 CFIndex getStringLength() {95 CFIndex getStringLength() {
96 return stringLength;96 return stringLength;
97 }97 }
9898
=== modified file 'cocoa/ScintillaCocoa.h'
--- cocoa/ScintillaCocoa.h 2012-10-26 08:56:06 +0000
+++ cocoa/ScintillaCocoa.h 2014-01-24 04:00:28 +0000
@@ -29,7 +29,6 @@
29#include "PropSetSimple.h"29#include "PropSetSimple.h"
30#endif30#endif
3131
32#include "SVector.h"
33#include "SplitVector.h"32#include "SplitVector.h"
34#include "Partitioning.h"33#include "Partitioning.h"
35#include "RunStyles.h"34#include "RunStyles.h"
@@ -45,16 +44,19 @@
45#include "ViewStyle.h"44#include "ViewStyle.h"
46#include "CharClassify.h"45#include "CharClassify.h"
47#include "Decoration.h"46#include "Decoration.h"
47#include "CaseFolder.h"
48#include "Document.h"48#include "Document.h"
49#include "Selection.h"49#include "Selection.h"
50#include "PositionCache.h"50#include "PositionCache.h"
51#include "Editor.h"51#include "Editor.h"
52//#include "ScintillaCallTip.h"
5352
54#include "ScintillaBase.h"53#include "ScintillaBase.h"
54#include "CaseConvert.h"
5555
56extern "C" NSString* ScintillaRecPboardType;56extern "C" NSString* ScintillaRecPboardType;
5757
58@class SCIContentView;
59@class SCIMarginView;
58@class ScintillaView;60@class ScintillaView;
5961
60@class FindHighlightLayer;62@class FindHighlightLayer;
@@ -76,26 +78,6 @@
76namespace Scintilla {78namespace Scintilla {
7779
78/**80/**
79 * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
80 * back to the parent. Therefore, there must be a callback handler that acts
81 * like a Windows WndProc, where Scintilla can send notifications to. Use
82 * ScintillaCocoa::RegisterNotifyHandler() to register such a handler.
83 * Message format is:
84 * <br>
85 * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = 0 (no control ID), lParam = ScintillaCocoa*
86 * <br>
87 * WM_NOTIFY: wParam = 0 (no control ID), lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*
88 */
89typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
90
91/**
92 * Scintilla sends these two messages to the nofity handler. Please refer
93 * to the Windows API doc for details about the message format.
94 */
95#define WM_COMMAND 1001
96#define WM_NOTIFY 1002
97
98/**
99 * Main scintilla class, implemented for OS X (Cocoa).81 * Main scintilla class, implemented for OS X (Cocoa).
100 */82 */
101class ScintillaCocoa : public ScintillaBase83class ScintillaCocoa : public ScintillaBase
@@ -103,48 +85,76 @@
103private:85private:
104 TimerTarget* timerTarget;86 TimerTarget* timerTarget;
105 NSEvent* lastMouseEvent;87 NSEvent* lastMouseEvent;
106 88
89 id<ScintillaNotificationProtocol> delegate;
90
107 SciNotifyFunc notifyProc;91 SciNotifyFunc notifyProc;
108 intptr_t notifyObj;92 intptr_t notifyObj;
10993
110 bool capturedMouse;94 bool capturedMouse;
11195
96 bool enteredSetScrollingSize;
97
112 // Private so ScintillaCocoa objects can not be copied98 // Private so ScintillaCocoa objects can not be copied
113 ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}99 ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}
114 ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }100 ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }
115101
116 bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);102 bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);
117 void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);103 void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);
118 104
119 int scrollSpeed;105 int scrollSpeed;
120 int scrollTicks;106 int scrollTicks;
107<<<<<<< TREE
121 NSTimer* tickTimer;108 NSTimer* tickTimer;
122 NSTimer* idleTimer;109 NSTimer* idleTimer;
123 110
124 FindHighlightLayer *layerFindIndicator;111 FindHighlightLayer *layerFindIndicator;
125112
113=======
114 NSTimer* tickTimer;
115 NSTimer* idleTimer;
116 CFRunLoopObserverRef observer;
117
118 FindHighlightLayer *layerFindIndicator;
119
120>>>>>>> MERGE-SOURCE
126protected:121protected:
122 Point GetVisibleOriginInMain();
127 PRectangle GetClientRectangle();123 PRectangle GetClientRectangle();
128 Point ConvertPoint(NSPoint point);124 Point ConvertPoint(NSPoint point);
129 125 virtual void RedrawRect(PRectangle rc);
126 virtual void Redraw();
127
130 virtual void Initialise();128 virtual void Initialise();
131 virtual void Finalise();129 virtual void Finalise();
132 virtual CaseFolder *CaseFolderForEncoding();130 virtual CaseFolder *CaseFolderForEncoding();
133 virtual std::string CaseMapString(const std::string &s, int caseMapping);131 virtual std::string CaseMapString(const std::string &s, int caseMapping);
134 virtual void CancelModes();132<<<<<<< TREE
133 virtual void CancelModes();
134=======
135 virtual void CancelModes();
136
137>>>>>>> MERGE-SOURCE
135public:138public:
136 NSView* ContentView();139 ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin);
137
138 ScintillaCocoa(NSView* view);
139 virtual ~ScintillaCocoa();140 virtual ~ScintillaCocoa();
140141
142 void SetDelegate(id<ScintillaNotificationProtocol> delegate_);
141 void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);143 void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
142 sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);144 sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
143145
144 ScintillaView* TopContainer();146 ScintillaView* TopContainer();
147 NSScrollView* ScrollContainer();
148 SCIContentView* ContentView();
145149
146 bool SyncPaint(void* gc, PRectangle rc);150<<<<<<< TREE
147 bool Draw(NSRect rect, CGContextRef gc);151 bool SyncPaint(void* gc, PRectangle rc);
152 bool Draw(NSRect rect, CGContextRef gc);
153=======
154 bool SyncPaint(void* gc, PRectangle rc);
155 bool Draw(NSRect rect, CGContextRef gc);
156 void PaintMargin(NSRect aRect);
157>>>>>>> MERGE-SOURCE
148158
149 virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);159 virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
150 void SetTicking(bool on);160 void SetTicking(bool on);
@@ -155,9 +165,10 @@
155 void SetVerticalScrollPos();165 void SetVerticalScrollPos();
156 void SetHorizontalScrollPos();166 void SetHorizontalScrollPos();
157 bool ModifyScrollBars(int nMax, int nPage);167 bool ModifyScrollBars(int nMax, int nPage);
168 bool SetScrollingSize(void);
158 void Resize();169 void Resize();
159 void DoScroll(float position, NSScrollerPart part, bool horizontal);170 void UpdateForScroll();
160 171
161 // Notifications for the owner.172 // Notifications for the owner.
162 void NotifyChange();173 void NotifyChange();
163 void NotifyFocus(bool focus);174 void NotifyFocus(bool focus);
@@ -179,13 +190,20 @@
179 virtual void ClaimSelection();190 virtual void ClaimSelection();
180191
181 NSPoint GetCaretPosition();192 NSPoint GetCaretPosition();
182 193
183 static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam);194 static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
184195
185 void TimerFired(NSTimer* timer);196 void TimerFired(NSTimer* timer);
186 void IdleTimerFired();197 void IdleTimerFired();
198 static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci);
199 void ObserverAdd();
200 void ObserverRemove();
201 virtual void IdleWork();
202 virtual void QueueIdleWork(WorkNeeded::workItems items, int upTo);
187 int InsertText(NSString* input);203 int InsertText(NSString* input);
188 204 void SelectOnlyMainSelection();
205 virtual void SetDocPointer(Document *document);
206
189 bool KeyboardInput(NSEvent* event);207 bool KeyboardInput(NSEvent* event);
190 void MouseDown(NSEvent* event);208 void MouseDown(NSEvent* event);
191 void MouseMove(NSEvent* event);209 void MouseMove(NSEvent* event);
@@ -202,14 +220,14 @@
202 void DraggingExited(id <NSDraggingInfo> info);220 void DraggingExited(id <NSDraggingInfo> info);
203 bool PerformDragOperation(id <NSDraggingInfo> info);221 bool PerformDragOperation(id <NSDraggingInfo> info);
204 void DragScroll();222 void DragScroll();
205 223
206 // Promote some methods needed for NSResponder actions.224 // Promote some methods needed for NSResponder actions.
207 virtual void SelectAll();225 virtual void SelectAll();
208 void DeleteBackward();226 void DeleteBackward();
209 virtual void Cut();227 virtual void Cut();
210 virtual void Undo();228 virtual void Undo();
211 virtual void Redo();229 virtual void Redo();
212 230
213 virtual NSMenu* CreateContextMenu(NSEvent* event);231 virtual NSMenu* CreateContextMenu(NSEvent* event);
214 void HandleCommand(NSInteger command);232 void HandleCommand(NSInteger command);
215233
216234
=== modified file 'cocoa/ScintillaCocoa.mm'
--- cocoa/ScintillaCocoa.mm 2013-01-21 11:10:24 +0000
+++ cocoa/ScintillaCocoa.mm 2014-01-24 04:00:28 +0000
@@ -2,7 +2,7 @@
2/**2/**
3 * Scintilla source code edit control3 * Scintilla source code edit control
4 * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase4 * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase
5 * 5 *
6 * Written by Mike Lischke <mlischke@sun.com>6 * Written by Mike Lischke <mlischke@sun.com>
7 *7 *
8 * Loosely based on ScintillaMacOSX.cxx.8 * Loosely based on ScintillaMacOSX.cxx.
@@ -15,6 +15,7 @@
15 */15 */
1616
17#import <Cocoa/Cocoa.h>17#import <Cocoa/Cocoa.h>
18<<<<<<< TREE
18#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_519#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
19#import <QuartzCore/CAGradientLayer.h>20#import <QuartzCore/CAGradientLayer.h>
20#endif21#endif
@@ -25,13 +26,21 @@
2526
26#include "ScintillaView.h"27#include "ScintillaView.h"
27#include "PlatCocoa.h"28#include "PlatCocoa.h"
29=======
30#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
31#import <QuartzCore/CAGradientLayer.h>
32#endif
33#import <QuartzCore/CAAnimation.h>
34#import <QuartzCore/CATransaction.h>
35
36#import "Platform.h"
37#import "ScintillaView.h"
38#import "ScintillaCocoa.h"
39#import "PlatCocoa.h"
40>>>>>>> MERGE-SOURCE
2841
29using namespace Scintilla;42using namespace Scintilla;
3043
31#ifndef WM_UNICHAR
32#define WM_UNICHAR 0x0109
33#endif
34
35NSString* ScintillaRecPboardType = @"com.scintilla.utf16-plain-text.rectangular";44NSString* ScintillaRecPboardType = @"com.scintilla.utf16-plain-text.rectangular";
3645
37//--------------------------------------------------------------------------------------------------46//--------------------------------------------------------------------------------------------------
@@ -139,6 +148,7 @@
139148
140//--------------------------------------------------------------------------------------------------149//--------------------------------------------------------------------------------------------------
141150
151<<<<<<< TREE
142#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5152#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
143153
144// Only implement FindHighlightLayer on OS X 10.6+154// Only implement FindHighlightLayer on OS X 10.6+
@@ -307,6 +317,176 @@
307317
308//--------------------------------------------------------------------------------------------------318//--------------------------------------------------------------------------------------------------
309319
320=======
321#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
322
323// Only implement FindHighlightLayer on OS X 10.6+
324
325/**
326 * Class to display the animated gold roundrect used on OS X for matches.
327 */
328@interface FindHighlightLayer : CAGradientLayer
329{
330@private
331 NSString *sFind;
332 int positionFind;
333 BOOL retaining;
334 CGFloat widthText;
335 CGFloat heightLine;
336 NSString *sFont;
337 CGFloat fontSize;
338}
339
340@property (copy) NSString *sFind;
341@property (assign) int positionFind;
342@property (assign) BOOL retaining;
343@property (assign) CGFloat widthText;
344@property (assign) CGFloat heightLine;
345@property (copy) NSString *sFont;
346@property (assign) CGFloat fontSize;
347
348- (void) animateMatch: (CGPoint)ptText bounce:(BOOL)bounce;
349- (void) hideMatch;
350
351@end
352
353//--------------------------------------------------------------------------------------------------
354
355@implementation FindHighlightLayer
356
357@synthesize sFind, positionFind, retaining, widthText, heightLine, sFont, fontSize;
358
359-(id) init {
360 if (self = [super init]) {
361 [self setNeedsDisplayOnBoundsChange: YES];
362 // A gold to slightly redder gradient to match other applications
363 CGColorRef colGold = CGColorCreateGenericRGB(1.0, 1.0, 0, 1.0);
364 CGColorRef colGoldRed = CGColorCreateGenericRGB(1.0, 0.8, 0, 1.0);
365 self.colors = [NSArray arrayWithObjects:(id)colGoldRed, (id)colGold, nil];
366 CGColorRelease(colGoldRed);
367 CGColorRelease(colGold);
368
369 CGColorRef colGreyBorder = CGColorCreateGenericGray(0.756f, 0.5f);
370 self.borderColor = colGreyBorder;
371 CGColorRelease(colGreyBorder);
372
373 self.borderWidth = 1.0;
374 self.cornerRadius = 5.0f;
375 self.shadowRadius = 1.0f;
376 self.shadowOpacity = 0.9f;
377 self.shadowOffset = CGSizeMake(0.0f, -2.0f);
378 self.anchorPoint = CGPointMake(0.5, 0.5);
379 }
380 return self;
381
382}
383
384const CGFloat paddingHighlightX = 4;
385const CGFloat paddingHighlightY = 2;
386
387-(void) drawInContext:(CGContextRef)context {
388 if (!sFind || !sFont)
389 return;
390
391 CFStringRef str = CFStringRef(sFind);
392
393 CFMutableDictionaryRef styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
394 &kCFTypeDictionaryKeyCallBacks,
395 &kCFTypeDictionaryValueCallBacks);
396 CGColorRef color = CGColorCreateGenericRGB(0.0, 0.0, 0.0, 1.0);
397 CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, color);
398 CTFontRef fontRef = ::CTFontCreateWithName((CFStringRef)sFont, fontSize, NULL);
399 CFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);
400
401 CFAttributedStringRef attrString = ::CFAttributedStringCreate(NULL, str, styleDict);
402 CTLineRef textLine = ::CTLineCreateWithAttributedString(attrString);
403 // Indent from corner of bounds
404 CGContextSetTextPosition(context, paddingHighlightX, 3 + paddingHighlightY);
405 CTLineDraw(textLine, context);
406
407 CFRelease(textLine);
408 CFRelease(attrString);
409 CFRelease(fontRef);
410 CGColorRelease(color);
411 CFRelease(styleDict);
412}
413
414- (void) animateMatch: (CGPoint)ptText bounce:(BOOL)bounce {
415 if (!self.sFind || ![self.sFind length]) {
416 [self hideMatch];
417 return;
418 }
419
420 CGFloat width = self.widthText + paddingHighlightX * 2;
421 CGFloat height = self.heightLine + paddingHighlightY * 2;
422
423 CGFloat flipper = self.geometryFlipped ? -1.0 : 1.0;
424
425 // Adjust for padding
426 ptText.x -= paddingHighlightX;
427 ptText.y += flipper * paddingHighlightY;
428
429 // Shift point to centre as expanding about centre
430 ptText.x += width / 2.0;
431 ptText.y -= flipper * height / 2.0;
432
433 [CATransaction begin];
434 [CATransaction setValue:[NSNumber numberWithFloat:0.0] forKey:kCATransactionAnimationDuration];
435 self.bounds = CGRectMake(0,0, width, height);
436 self.position = ptText;
437 if (bounce) {
438 // Do not reset visibility when just moving
439 self.hidden = NO;
440 self.opacity = 1.0;
441 }
442 [self setNeedsDisplay];
443 [CATransaction commit];
444
445 if (bounce) {
446 CABasicAnimation *animBounce = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
447 animBounce.duration = 0.15;
448 animBounce.autoreverses = YES;
449 animBounce.removedOnCompletion = NO;
450 animBounce.fromValue = [NSNumber numberWithFloat: 1.0];
451 animBounce.toValue = [NSNumber numberWithFloat: 1.25];
452
453 if (self.retaining) {
454
455 [self addAnimation: animBounce forKey:@"animateFound"];
456
457 } else {
458
459 CABasicAnimation *animFade = [CABasicAnimation animationWithKeyPath:@"opacity"];
460 animFade.duration = 0.1;
461 animFade.beginTime = 0.4;
462 animFade.removedOnCompletion = NO;
463 animFade.fromValue = [NSNumber numberWithFloat: 1.0];
464 animFade.toValue = [NSNumber numberWithFloat: 0.0];
465
466 CAAnimationGroup *group = [CAAnimationGroup animation];
467 [group setDuration:0.5];
468 group.removedOnCompletion = NO;
469 group.fillMode = kCAFillModeForwards;
470 [group setAnimations:[NSArray arrayWithObjects:animBounce, animFade, nil]];
471
472 [self addAnimation:group forKey:@"animateFound"];
473 }
474 }
475}
476
477- (void) hideMatch {
478 self.sFind = @"";
479 self.positionFind = INVALID_POSITION;
480 self.hidden = YES;
481}
482
483@end
484
485#endif
486
487//--------------------------------------------------------------------------------------------------
488
489>>>>>>> MERGE-SOURCE
310@implementation TimerTarget490@implementation TimerTarget
311491
312- (id) init: (void*) target492- (id) init: (void*) target
@@ -318,9 +498,9 @@
318498
319 // Get the default notification queue for the thread which created the instance (usually the499 // Get the default notification queue for the thread which created the instance (usually the
320 // main thread). We need that later for idle event processing.500 // main thread). We need that later for idle event processing.
321 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; 501 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
322 notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center];502 notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center];
323 [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil]; 503 [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil];
324 }504 }
325 return self;505 return self;
326}506}
@@ -329,8 +509,13 @@
329509
330- (void) dealloc510- (void) dealloc
331{511{
512<<<<<<< TREE
332 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];513 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
333 [center removeObserver: self];514 [center removeObserver: self];
515=======
516 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
517 [center removeObserver:self];
518>>>>>>> MERGE-SOURCE
334 [notificationQueue release];519 [notificationQueue release];
335 [super dealloc];520 [super dealloc];
336}521}
@@ -358,11 +543,11 @@
358 // Post a new idle notification, which gets executed when the run loop is idle.543 // Post a new idle notification, which gets executed when the run loop is idle.
359 // Since we are coalescing on name and sender there will always be only one actual notification544 // Since we are coalescing on name and sender there will always be only one actual notification
360 // even for multiple requests.545 // even for multiple requests.
361 NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self]; 546 NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self];
362 [notificationQueue enqueueNotification: notification547 [notificationQueue enqueueNotification: notification
363 postingStyle: NSPostWhenIdle548 postingStyle: NSPostWhenIdle
364 coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender)549 coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender)
365 forModes: nil]; 550 forModes: nil];
366}551}
367552
368//--------------------------------------------------------------------------------------------------553//--------------------------------------------------------------------------------------------------
@@ -381,11 +566,30 @@
381566
382//----------------- ScintillaCocoa -----------------------------------------------------------------567//----------------- ScintillaCocoa -----------------------------------------------------------------
383568
384ScintillaCocoa::ScintillaCocoa(NSView* view)569ScintillaCocoa::ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin)
385{570{
386 wMain = view; // Don't retain since we're owned by view, which would cause a cycle571<<<<<<< TREE
387 timerTarget = [[TimerTarget alloc] init: this];572 wMain = view; // Don't retain since we're owned by view, which would cause a cycle
388 layerFindIndicator = NULL;573 timerTarget = [[TimerTarget alloc] init: this];
574 layerFindIndicator = NULL;
575=======
576 vs.marginInside = false;
577 wMain = view; // Don't retain since we're owned by view, which would cause a cycle
578 wMargin = viewMargin;
579 timerTarget = [[TimerTarget alloc] init: this];
580 lastMouseEvent = NULL;
581 delegate = NULL;
582 notifyObj = NULL;
583 notifyProc = NULL;
584 capturedMouse = false;
585 enteredSetScrollingSize = false;
586 scrollSpeed = 1;
587 scrollTicks = 2000;
588 tickTimer = NULL;
589 idleTimer = NULL;
590 observer = NULL;
591 layerFindIndicator = NULL;
592>>>>>>> MERGE-SOURCE
389 Initialise();593 Initialise();
390}594}
391595
@@ -393,7 +597,7 @@
393597
394ScintillaCocoa::~ScintillaCocoa()598ScintillaCocoa::~ScintillaCocoa()
395{599{
396 SetTicking(false);600 Finalise();
397 [timerTarget release];601 [timerTarget release];
398}602}
399603
@@ -402,29 +606,20 @@
402/**606/**
403 * Core initialization of the control. Everything that needs to be set up happens here.607 * Core initialization of the control. Everything that needs to be set up happens here.
404 */608 */
405void ScintillaCocoa::Initialise() 609void ScintillaCocoa::Initialise()
406{610{
407 static bool initedLexers = false;611 Scintilla_LinkLexers();
408 if (!initedLexers)612
409 {
410 initedLexers = true;
411 Scintilla_LinkLexers();
412 }
413 notifyObj = NULL;
414 notifyProc = NULL;
415
416 capturedMouse = false;
417
418 // Tell Scintilla not to buffer: Quartz buffers drawing for us.613 // Tell Scintilla not to buffer: Quartz buffers drawing for us.
419 WndProc(SCI_SETBUFFEREDDRAW, 0, 0);614 WndProc(SCI_SETBUFFEREDDRAW, 0, 0);
420 615
421 // We are working with Unicode exclusively.616 // We are working with Unicode exclusively.
422 WndProc(SCI_SETCODEPAGE, SC_CP_UTF8, 0);617 WndProc(SCI_SETCODEPAGE, SC_CP_UTF8, 0);
423618
424 // Add Mac specific key bindings.619 // Add Mac specific key bindings.
425 for (int i = 0; macMapDefault[i].key; i++) 620 for (int i = 0; macMapDefault[i].key; i++)
426 kmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg);621 kmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg);
427 622
428}623}
429624
430//--------------------------------------------------------------------------------------------------625//--------------------------------------------------------------------------------------------------
@@ -434,12 +629,70 @@
434 */629 */
435void ScintillaCocoa::Finalise()630void ScintillaCocoa::Finalise()
436{631{
632 ObserverRemove();
437 SetTicking(false);633 SetTicking(false);
438 ScintillaBase::Finalise();634 ScintillaBase::Finalise();
439}635}
440636
441//--------------------------------------------------------------------------------------------------637//--------------------------------------------------------------------------------------------------
442638
639void ScintillaCocoa::UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) {
640 ScintillaCocoa* sci = reinterpret_cast<ScintillaCocoa*>(info);
641 sci->IdleWork();
642}
643
644//--------------------------------------------------------------------------------------------------
645
646/**
647 * Add an observer to the run loop to perform styling as high-priority idle task.
648 */
649
650void ScintillaCocoa::ObserverAdd() {
651 if (!observer) {
652 CFRunLoopObserverContext context;
653 context.version = 0;
654 context.info = this;
655 context.retain = NULL;
656 context.release = NULL;
657 context.copyDescription = NULL;
658
659 CFRunLoopRef mainRunLoop = CFRunLoopGetMain();
660 observer = CFRunLoopObserverCreate(NULL, kCFRunLoopEntry | kCFRunLoopBeforeWaiting,
661 true, 0, UpdateObserver, &context);
662 CFRunLoopAddObserver(mainRunLoop, observer, kCFRunLoopCommonModes);
663 }
664}
665
666//--------------------------------------------------------------------------------------------------
667
668/**
669 * Remove the run loop observer.
670 */
671void ScintillaCocoa::ObserverRemove() {
672 if (observer) {
673 CFRunLoopRef mainRunLoop = CFRunLoopGetMain();
674 CFRunLoopRemoveObserver(mainRunLoop, observer, kCFRunLoopCommonModes);
675 CFRelease(observer);
676 }
677 observer = NULL;
678}
679
680//--------------------------------------------------------------------------------------------------
681
682void ScintillaCocoa::IdleWork() {
683 Editor::IdleWork();
684 ObserverRemove();
685}
686
687//--------------------------------------------------------------------------------------------------
688
689void ScintillaCocoa::QueueIdleWork(WorkNeeded::workItems items, int upTo) {
690 Editor::QueueIdleWork(items, upTo);
691 ObserverAdd();
692}
693
694//--------------------------------------------------------------------------------------------------
695
443/**696/**
444 * Convert a core foundation string into an array of bytes in a particular encoding697 * Convert a core foundation string into an array of bytes in a particular encoding
445 */698 */
@@ -449,7 +702,7 @@
449 CFIndex usedLen = 0;702 CFIndex usedLen = 0;
450 CFStringGetBytes(cfsRef, rangeAll, encoding, '?',703 CFStringGetBytes(cfsRef, rangeAll, encoding, '?',
451 false, NULL, 0, &usedLen);704 false, NULL, 0, &usedLen);
452 705
453 char *buffer = new char[usedLen+1];706 char *buffer = new char[usedLen+1];
454 CFStringGetBytes(cfsRef, rangeAll, encoding, '?',707 CFStringGetBytes(cfsRef, rangeAll, encoding, '?',
455 false, (UInt8 *)buffer,usedLen, NULL);708 false, (UInt8 *)buffer,usedLen, NULL);
@@ -463,6 +716,7 @@
463 * Case folders.716 * Case folders.
464 */717 */
465718
719<<<<<<< TREE
466class CaseFolderUTF8 : public CaseFolderTable {720class CaseFolderUTF8 : public CaseFolderTable {
467public:721public:
468 CaseFolderUTF8() {722 CaseFolderUTF8() {
@@ -494,10 +748,12 @@
494 }748 }
495};749};
496750
751=======
752>>>>>>> MERGE-SOURCE
497class CaseFolderDBCS : public CaseFolderTable {753class CaseFolderDBCS : public CaseFolderTable {
498 CFStringEncoding encoding;754 CFStringEncoding encoding;
499public:755public:
500 CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) {756 explicit CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) {
501 StandardASCII();757 StandardASCII();
502 }758 }
503 virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) {759 virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) {
@@ -506,12 +762,12 @@
506 return 1;762 return 1;
507 } else {763 } else {
508 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,764 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
509 reinterpret_cast<const UInt8 *>(mixed), 765 reinterpret_cast<const UInt8 *>(mixed),
510 lenMixed, encoding, false);766 lenMixed, encoding, false);
511767
512 NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch768 NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch
513 locale:[NSLocale currentLocale]];769 locale:[NSLocale currentLocale]];
514 770
515 char *encoded = EncodedBytes((CFStringRef)sMapped, encoding);771 char *encoded = EncodedBytes((CFStringRef)sMapped, encoding);
516772
517 size_t lenMapped = strlen(encoded);773 size_t lenMapped = strlen(encoded);
@@ -533,7 +789,7 @@
533789
534CaseFolder *ScintillaCocoa::CaseFolderForEncoding() {790CaseFolder *ScintillaCocoa::CaseFolderForEncoding() {
535 if (pdoc->dbcsCodePage == SC_CP_UTF8) {791 if (pdoc->dbcsCodePage == SC_CP_UTF8) {
536 return new CaseFolderUTF8();792 return new CaseFolderUnicode();
537 } else {793 } else {
538 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),794 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
539 vs.styles[STYLE_DEFAULT].characterSet);795 vs.styles[STYLE_DEFAULT].characterSet);
@@ -545,18 +801,20 @@
545 char sCharacter[2] = "A";801 char sCharacter[2] = "A";
546 sCharacter[0] = i;802 sCharacter[0] = i;
547 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,803 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
548 reinterpret_cast<const UInt8 *>(sCharacter), 804 reinterpret_cast<const UInt8 *>(sCharacter),
549 1, encoding, false);805 1, encoding, false);
550 806 if (!cfsVal)
807 continue;
808
551 NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch809 NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch
552 locale:[NSLocale currentLocale]];810 locale:[NSLocale currentLocale]];
553 811
554 char *encoded = EncodedBytes((CFStringRef)sMapped, encoding);812 char *encoded = EncodedBytes((CFStringRef)sMapped, encoding);
555 813
556 if (strlen(encoded) == 1) {814 if (strlen(encoded) == 1) {
557 pcf->SetTranslation(sCharacter[0], encoded[0]);815 pcf->SetTranslation(sCharacter[0], encoded[0]);
558 }816 }
559 817
560 delete []encoded;818 delete []encoded;
561 CFRelease(cfsVal);819 CFRelease(cfsVal);
562 }820 }
@@ -576,10 +834,21 @@
576 */834 */
577std::string ScintillaCocoa::CaseMapString(const std::string &s, int caseMapping)835std::string ScintillaCocoa::CaseMapString(const std::string &s, int caseMapping)
578{836{
837 if ((s.size() == 0) || (caseMapping == cmSame))
838 return s;
839
840 if (IsUnicodeMode()) {
841 std::string retMapped(s.length() * maxExpansionCaseConversion, 0);
842 size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),
843 (caseMapping == cmUpper) ? CaseConversionUpper : CaseConversionLower);
844 retMapped.resize(lenMapped);
845 return retMapped;
846 }
847
579 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),848 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
580 vs.styles[STYLE_DEFAULT].characterSet);849 vs.styles[STYLE_DEFAULT].characterSet);
581 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,850 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
582 reinterpret_cast<const UInt8 *>(s.c_str()), 851 reinterpret_cast<const UInt8 *>(s.c_str()),
583 s.length(), encoding, false);852 s.length(), encoding, false);
584853
585 NSString *sMapped;854 NSString *sMapped;
@@ -621,7 +890,17 @@
621ScintillaView* ScintillaCocoa::TopContainer()890ScintillaView* ScintillaCocoa::TopContainer()
622{891{
623 NSView* container = static_cast<NSView*>(wMain.GetID());892 NSView* container = static_cast<NSView*>(wMain.GetID());
624 return static_cast<ScintillaView*>([container superview]);893 return static_cast<ScintillaView*>([[[container superview] superview] superview]);
894}
895
896//--------------------------------------------------------------------------------------------------
897
898/**
899 * Helper function to get the scrolling view.
900 */
901NSScrollView* ScintillaCocoa::ScrollContainer() {
902 NSView* container = static_cast<NSView*>(wMain.GetID());
903 return static_cast<NSScrollView*>([[container superview] superview]);
625}904}
626905
627//--------------------------------------------------------------------------------------------------906//--------------------------------------------------------------------------------------------------
@@ -629,9 +908,21 @@
629/**908/**
630 * Helper function to get the inner container which represents the actual "canvas" we work with.909 * Helper function to get the inner container which represents the actual "canvas" we work with.
631 */910 */
632NSView* ScintillaCocoa::ContentView()911SCIContentView* ScintillaCocoa::ContentView()
633{912{
634 return static_cast<NSView*>(wMain.GetID());913 return static_cast<SCIContentView*>(wMain.GetID());
914}
915
916//--------------------------------------------------------------------------------------------------
917
918/**
919 * Return the top left visible point relative to the origin point of the whole document.
920 */
921Scintilla::Point ScintillaCocoa::GetVisibleOriginInMain()
922{
923 NSScrollView *scrollView = ScrollContainer();
924 NSRect contentRect = [[scrollView contentView] bounds];
925 return Point(contentRect.origin.x, contentRect.origin.y);
635}926}
636927
637//--------------------------------------------------------------------------------------------------928//--------------------------------------------------------------------------------------------------
@@ -639,42 +930,67 @@
639/**930/**
640 * Instead of returning the size of the inner view we have to return the visible part of it931 * Instead of returning the size of the inner view we have to return the visible part of it
641 * in order to make scrolling working properly.932 * in order to make scrolling working properly.
933 * The returned value is in document coordinates.
642 */934 */
643PRectangle ScintillaCocoa::GetClientRectangle()935PRectangle ScintillaCocoa::GetClientRectangle()
644{936{
645 NSView* host = ContentView();937 NSScrollView *scrollView = ScrollContainer();
646 NSSize size = [host frame].size;938 NSSize size = [[scrollView contentView] bounds].size;
647 return PRectangle(0, 0, size.width, size.height);939 Point origin = GetVisibleOriginInMain();
940 return PRectangle(origin.x, origin.y, origin.x+size.width, origin.y + size.height);
648}941}
649942
650//--------------------------------------------------------------------------------------------------943//--------------------------------------------------------------------------------------------------
651944
652/**945/**
653 * Converts the given point from base coordinates to local coordinates and at the same time into946 * Converts the given point from base coordinates to local coordinates and at the same time into
654 * a native Point structure. Base coordinates are used for the top window used in the view hierarchy. 947 * a native Point structure. Base coordinates are used for the top window used in the view hierarchy.
948 * Returned value is in view coordinates.
655 */949 */
656Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point)950Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point)
657{951{
658 NSView* container = ContentView();952 NSView* container = ContentView();
659 NSPoint result = [container convertPoint: point fromView: nil];953 NSPoint result = [container convertPoint: point fromView: nil];
660 954 Scintilla::Point ptOrigin = GetVisibleOriginInMain();
661 return Point(result.x, result.y);955 return Point(result.x - ptOrigin.x, result.y - ptOrigin.y);
956}
957
958//--------------------------------------------------------------------------------------------------
959
960/**
961 * Do not clip like superclass as Cocoa is not reporting all of prepared area.
962 */
963void ScintillaCocoa::RedrawRect(PRectangle rc)
964{
965 if (!rc.Empty())
966 wMain.InvalidateRectangle(rc);
967}
968
969//--------------------------------------------------------------------------------------------------
970
971/**
972 * Ensure all of prepared content is also redrawn.
973 */
974void ScintillaCocoa::Redraw()
975{
976 wMargin.InvalidateAll();
977 wMain.InvalidateAll();
662}978}
663979
664//--------------------------------------------------------------------------------------------------980//--------------------------------------------------------------------------------------------------
665981
666/**982/**
667 * A function to directly execute code that would usually go the long way via window messages.983 * A function to directly execute code that would usually go the long way via window messages.
668 * However this is a Windows metapher and not used here, hence we just call our fake984 * However this is a Windows metaphor and not used here, hence we just call our fake
669 * window proc. The given parameters directly reflect the message parameters used on Windows.985 * window proc. The given parameters directly reflect the message parameters used on Windows.
670 *986 *
671 * @param sciThis The target which is to be called.987 * @param sciThis The target which is to be called.
672 * @param iMessage A code that indicates which message was sent.988 * @param iMessage A code that indicates which message was sent.
673 * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter 989 * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter
674 * (hence the w prefix).990 * (hence the w prefix).
675 * @param lParam The other of the two free parameters. A signed long.991 * @param lParam The other of the two free parameters. A signed long.
676 */992 */
677sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, 993sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam,
678 sptr_t lParam)994 sptr_t lParam)
679{995{
680 return sciThis->WndProc(iMessage, wParam, lParam);996 return sciThis->WndProc(iMessage, wParam, lParam);
@@ -695,12 +1011,12 @@
6951011
696//--------------------------------------------------------------------------------------------------1012//--------------------------------------------------------------------------------------------------
6971013
698/** 1014/**
699 * That's our fake window procedure. On Windows each window has a dedicated procedure to handle1015 * That's our fake window procedure. On Windows each window has a dedicated procedure to handle
700 * commands (also used to synchronize UI and background threads), which is not the case in Cocoa.1016 * commands (also used to synchronize UI and background threads), which is not the case in Cocoa.
701 * 1017 *
702 * Messages handled here are almost solely for special commands of the backend. Everything which1018 * Messages handled here are almost solely for special commands of the backend. Everything which
703 * would be sytem messages on Windows (e.g. for key down, mouse move etc.) are handled by1019 * would be system messages on Windows (e.g. for key down, mouse move etc.) are handled by
704 * directly calling appropriate handlers.1020 * directly calling appropriate handlers.
705 */1021 */
706sptr_t ScintillaCocoa::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)1022sptr_t ScintillaCocoa::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
@@ -709,19 +1025,20 @@
709 {1025 {
710 case SCI_GETDIRECTFUNCTION:1026 case SCI_GETDIRECTFUNCTION:
711 return reinterpret_cast<sptr_t>(DirectFunction);1027 return reinterpret_cast<sptr_t>(DirectFunction);
712 1028
713 case SCI_GETDIRECTPOINTER:1029 case SCI_GETDIRECTPOINTER:
714 return reinterpret_cast<sptr_t>(this);1030 return reinterpret_cast<sptr_t>(this);
715 1031
716 case SCI_GRABFOCUS:1032 case SCI_GRABFOCUS:
717 [[ContentView() window] makeFirstResponder:ContentView()];1033 [[ContentView() window] makeFirstResponder:ContentView()];
718 break;1034 break;
7191035
720 case SCI_SETBUFFEREDDRAW:1036 case SCI_SETBUFFEREDDRAW:
721 // Buffered drawing not supported on Cocoa 1037 // Buffered drawing not supported on Cocoa
722 bufferedDraw = false;1038 bufferedDraw = false;
723 break;1039 break;
7241040
1041<<<<<<< TREE
725 case SCI_FINDINDICATORSHOW:1042 case SCI_FINDINDICATORSHOW:
726 ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES);1043 ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES);
727 return 0;1044 return 0;
@@ -747,9 +1064,23 @@
747 }1064 }
748 return 0;1065 return 0;
7491066
1067=======
1068 case SCI_FINDINDICATORSHOW:
1069 ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES);
1070 return 0;
1071
1072 case SCI_FINDINDICATORFLASH:
1073 ShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), NO);
1074 return 0;
1075
1076 case SCI_FINDINDICATORHIDE:
1077 HideFindIndicator();
1078 return 0;
1079
1080>>>>>>> MERGE-SOURCE
750 default:1081 default:
751 sptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam);1082 sptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam);
752 1083
753 return r;1084 return r;
754 }1085 }
755 return 0l;1086 return 0l;
@@ -758,7 +1089,7 @@
758//--------------------------------------------------------------------------------------------------1089//--------------------------------------------------------------------------------------------------
7591090
760/**1091/**
761 * In Windows lingo this is the handler which handles anything that wasn't handled in the normal 1092 * In Windows lingo this is the handler which handles anything that wasn't handled in the normal
762 * window proc which would usually send the message back to generic window proc that Windows uses.1093 * window proc which would usually send the message back to generic window proc that Windows uses.
763 */1094 */
764sptr_t ScintillaCocoa::DefWndProc(unsigned int, uptr_t, sptr_t)1095sptr_t ScintillaCocoa::DefWndProc(unsigned int, uptr_t, sptr_t)
@@ -849,7 +1180,7 @@
849{1180{
850 if (!Editor::CanPaste())1181 if (!Editor::CanPaste())
851 return false;1182 return false;
852 1183
853 return GetPasteboardData([NSPasteboard generalPasteboard], NULL);1184 return GetPasteboardData([NSPasteboard generalPasteboard], NULL);
854}1185}
8551186
@@ -871,25 +1202,25 @@
871 bool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText);1202 bool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText);
872 if (forceRectangular)1203 if (forceRectangular)
873 selectedText.rectangular = forceRectangular;1204 selectedText.rectangular = forceRectangular;
874 1205
875 if (!ok || !selectedText.s)1206 if (!ok || selectedText.Empty())
876 // No data or no flavor we support.1207 // No data or no flavor we support.
877 return;1208 return;
878 1209
879 pdoc->BeginUndoAction();1210 pdoc->BeginUndoAction();
880 ClearSelection(false);1211 ClearSelection(false);
881 int length = selectedText.len - 1; // One less to avoid inserting the terminating 0 character.1212 int length = selectedText.Length();
1213 SelectionPosition selStart = sel.RangeMain().Start();
882 if (selectedText.rectangular)1214 if (selectedText.rectangular)
883 {1215 {
884 SelectionPosition selStart = sel.RangeMain().Start();1216 PasteRectangular(selStart, selectedText.Data(), length);
885 PasteRectangular(selStart, selectedText.s, length);1217 }
886 }1218 else
887 else 1219 {
888 if (pdoc->InsertString(sel.RangeMain().caret.Position(), selectedText.s, length))1220 InsertPaste(selStart, selectedText.Data(), length);
889 SetEmptySelection(sel.RangeMain().caret.Position() + length);1221 }
890
891 pdoc->EndUndoAction();1222 pdoc->EndUndoAction();
892 1223
893 Redraw();1224 Redraw();
894 EnsureCaretVisible();1225 EnsureCaretVisible();
895}1226}
@@ -923,7 +1254,7 @@
923 if (self) {1254 if (self) {
924 sci = NULL;1255 sci = NULL;
925 }1256 }
926 1257
927 return self;1258 return self;
928}1259}
9291260
@@ -971,7 +1302,7 @@
971void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) {1302void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) {
972 if (!ct.wCallTip.Created()) {1303 if (!ct.wCallTip.Created()) {
973 NSRect ctRect = NSMakeRect(rc.top,rc.bottom, rc.Width(), rc.Height());1304 NSRect ctRect = NSMakeRect(rc.top,rc.bottom, rc.Width(), rc.Height());
974 NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect 1305 NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect
975 styleMask: NSBorderlessWindowMask1306 styleMask: NSBorderlessWindowMask
976 backing: NSBackingStoreBuffered1307 backing: NSBackingStoreBuffered
977 defer: NO];1308 defer: NO];
@@ -994,8 +1325,13 @@
994 ScintillaContextMenu *menu= reinterpret_cast<ScintillaContextMenu*>(popup.GetID());1325 ScintillaContextMenu *menu= reinterpret_cast<ScintillaContextMenu*>(popup.GetID());
995 [menu setOwner: this];1326 [menu setOwner: this];
996 [menu setAutoenablesItems: NO];1327 [menu setAutoenablesItems: NO];
1328<<<<<<< TREE
997 1329
998 if (cmd == 0) {1330 if (cmd == 0) {
1331=======
1332
1333 if (cmd == 0) {
1334>>>>>>> MERGE-SOURCE
999 item = [NSMenuItem separatorItem];1335 item = [NSMenuItem separatorItem];
1000 } else {1336 } else {
1001 item = [[[NSMenuItem alloc] init] autorelease];1337 item = [[[NSMenuItem alloc] init] autorelease];
@@ -1005,7 +1341,7 @@
1005 [item setAction: @selector(handleCommand:)];1341 [item setAction: @selector(handleCommand:)];
1006 [item setTag: cmd];1342 [item setTag: cmd];
1007 [item setEnabled: enabled];1343 [item setEnabled: enabled];
1008 1344
1009 [menu addItem: item];1345 [menu addItem: item];
1010}1346}
10111347
@@ -1051,7 +1387,7 @@
1051 int line = pdoc->LineFromPosition(posDrag.Position());1387 int line = pdoc->LineFromPosition(posDrag.Position());
1052 int currentVisibleLine = cs.DisplayFromDoc(line);1388 int currentVisibleLine = cs.DisplayFromDoc(line);
1053 int lastVisibleLine = Platform::Minimum(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2;1389 int lastVisibleLine = Platform::Minimum(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2;
1054 1390
1055 if (currentVisibleLine <= topLine && topLine > 0)1391 if (currentVisibleLine <= topLine && topLine > 0)
1056 ScrollTo(topLine - scrollSpeed);1392 ScrollTo(topLine - scrollSpeed);
1057 else1393 else
@@ -1063,9 +1399,9 @@
1063 scrollTicks = 2000;1399 scrollTicks = 2000;
1064 return;1400 return;
1065 }1401 }
1066 1402
1067 // TODO: also handle horizontal scrolling.1403 // TODO: also handle horizontal scrolling.
1068 1404
1069 if (scrollSpeed == 1)1405 if (scrollSpeed == 1)
1070 {1406 {
1071 scrollTicks -= timer.tickSize;1407 scrollTicks -= timer.tickSize;
@@ -1075,7 +1411,7 @@
1075 scrollTicks = 2000;1411 scrollTicks = 2000;
1076 }1412 }
1077 }1413 }
1078 1414
1079}1415}
10801416
1081//--------------------------------------------------------------------------------------------------1417//--------------------------------------------------------------------------------------------------
@@ -1088,12 +1424,14 @@
1088 if (sel.Empty())1424 if (sel.Empty())
1089 return;1425 return;
10901426
1427 inDragDrop = ddDragging;
1428
1091 // Put the data to be dragged on the drag pasteboard.1429 // Put the data to be dragged on the drag pasteboard.
1092 SelectionText selectedText;1430 SelectionText selectedText;
1093 NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];1431 NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
1094 CopySelectionRange(&selectedText);1432 CopySelectionRange(&selectedText);
1095 SetPasteboardData(pasteboard, selectedText);1433 SetPasteboardData(pasteboard, selectedText);
1096 1434
1097 // calculate the bounds of the selection1435 // calculate the bounds of the selection
1098 PRectangle client = GetTextRectangle();1436 PRectangle client = GetTextRectangle();
1099 int selStart = sel.RangeMain().Start().Position();1437 int selStart = sel.RangeMain().Start().Position();
@@ -1102,14 +1440,14 @@
1102 int endLine = pdoc->LineFromPosition(selEnd);1440 int endLine = pdoc->LineFromPosition(selEnd);
1103 Point pt;1441 Point pt;
1104 long startPos, endPos, ep;1442 long startPos, endPos, ep;
1105 Rect rcSel;1443 PRectangle rcSel;
1106 1444
1107 if (startLine==endLine && WndProc(SCI_GETWRAPMODE, 0, 0) != SC_WRAP_NONE) {1445 if (startLine==endLine && WndProc(SCI_GETWRAPMODE, 0, 0) != SC_WRAP_NONE) {
1108 // Komodo bug http://bugs.activestate.com/show_bug.cgi?id=875711446 // Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87571
1109 // Scintilla bug https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040200&group_id=24391447 // Scintilla bug https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040200&group_id=2439
1110 // If the width on a wrapped-line selection is negative,1448 // If the width on a wrapped-line selection is negative,
1111 // find a better bounding rectangle.1449 // find a better bounding rectangle.
1112 1450
1113 Point ptStart, ptEnd;1451 Point ptStart, ptEnd;
1114 startPos = WndProc(SCI_GETLINESELSTARTPOSITION, startLine, 0);1452 startPos = WndProc(SCI_GETLINESELSTARTPOSITION, startLine, 0);
1115 endPos = WndProc(SCI_GETLINESELENDPOSITION, startLine, 0);1453 endPos = WndProc(SCI_GETLINESELENDPOSITION, startLine, 0);
@@ -1163,19 +1501,16 @@
1163 }1501 }
1164 // must convert to global coordinates for drag regions, but also save the1502 // must convert to global coordinates for drag regions, but also save the
1165 // image rectangle for further calculations and copy operations1503 // image rectangle for further calculations and copy operations
1166 PRectangle localRectangle = PRectangle(rcSel.left, rcSel.top, rcSel.right, rcSel.bottom);1504
1167
1168 // Prepare drag image.1505 // Prepare drag image.
1169 NSRect selectionRectangle = PRectangleToNSRect(localRectangle);1506 NSRect selectionRectangle = PRectangleToNSRect(rcSel);
1170 1507
1171 NSView* content = ContentView();1508 NSView* content = ContentView();
1172
1173#if 1
11741509
1175 // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface.1510 // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface.
1176 SurfaceImpl *sw = new SurfaceImpl();1511 SurfaceImpl *sw = new SurfaceImpl();
1177 SurfaceImpl *pixmap = NULL;1512 SurfaceImpl *pixmap = NULL;
1178 1513
1179 bool lastHideSelection = hideSelection;1514 bool lastHideSelection = hideSelection;
1180 hideSelection = true;1515 hideSelection = true;
1181 if (sw)1516 if (sw)
@@ -1183,26 +1518,27 @@
1183 pixmap = new SurfaceImpl();1518 pixmap = new SurfaceImpl();
1184 if (pixmap)1519 if (pixmap)
1185 {1520 {
1186 PRectangle imageRect = NSRectToPRectangle(selectionRectangle);1521 PRectangle imageRect = rcSel;
1187 paintState = painting;1522 paintState = painting;
1188 sw->InitPixMap(client.Width(), client.Height(), NULL, NULL);1523 sw->InitPixMap(client.Width(), client.Height(), NULL, NULL);
1189 paintingAllText = true;1524 paintingAllText = true;
1190 // Have to create a new context and make current as text drawing goes 1525 // Have to create a new context and make current as text drawing goes
1191 // to the current context, not a passed context.1526 // to the current context, not a passed context.
1192 CGContextRef gcsw = sw->GetContext(); 1527 CGContextRef gcsw = sw->GetContext();
1193 NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort: gcsw 1528 NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort: gcsw
1194 flipped: YES];1529 flipped: YES];
1195 [NSGraphicsContext setCurrentContext:nsgc];1530 [NSGraphicsContext setCurrentContext:nsgc];
1531 CGContextTranslateCTM(gcsw, -client.left, -client.top);
1196 Paint(sw, client);1532 Paint(sw, client);
1197 paintState = notPainting;1533 paintState = notPainting;
1198 1534
1199 pixmap->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL);1535 pixmap->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL);
1200 1536
1201 CGContextRef gc = pixmap->GetContext(); 1537 CGContextRef gc = pixmap->GetContext();
1202 // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin1538 // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin
1203 CGContextTranslateCTM(gc, 0, imageRect.Height());1539 CGContextTranslateCTM(gc, 0, imageRect.Height());
1204 CGContextScaleCTM(gc, 1.0, -1.0);1540 CGContextScaleCTM(gc, 1.0, -1.0);
1205 1541
1206 pixmap->CopyImageRectangle(*sw, imageRect, PRectangle(0, 0, imageRect.Width(), imageRect.Height()));1542 pixmap->CopyImageRectangle(*sw, imageRect, PRectangle(0, 0, imageRect.Width(), imageRect.Height()));
1207 // XXX TODO: overwrite any part of the image that is not part of the1543 // XXX TODO: overwrite any part of the image that is not part of the
1208 // selection to make it transparent. right now we just use1544 // selection to make it transparent. right now we just use
@@ -1212,7 +1548,7 @@
1212 delete sw;1548 delete sw;
1213 }1549 }
1214 hideSelection = lastHideSelection;1550 hideSelection = lastHideSelection;
1215 1551
1216 NSBitmapImageRep* bitmap = NULL;1552 NSBitmapImageRep* bitmap = NULL;
1217 if (pixmap)1553 if (pixmap)
1218 {1554 {
@@ -1222,29 +1558,20 @@
1222 pixmap->Release();1558 pixmap->Release();
1223 delete pixmap;1559 delete pixmap;
1224 }1560 }
1225#else1561
1226
1227 // Poor man's drag image: take a snapshot of the content view.
1228 [content lockFocus];
1229 NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: selectionRectangle] autorelease];
1230 [bitmap setColorSpaceName: NSDeviceRGBColorSpace];
1231 [content unlockFocus];
1232
1233#endif
1234
1235 NSImage* image = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];1562 NSImage* image = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];
1236 [image addRepresentation: bitmap];1563 [image addRepresentation: bitmap];
1237 1564
1238 NSImage* dragImage = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];1565 NSImage* dragImage = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];
1239 [dragImage setBackgroundColor: [NSColor clearColor]];1566 [dragImage setBackgroundColor: [NSColor clearColor]];
1240 [dragImage lockFocus];1567 [dragImage lockFocus];
1241 [image dissolveToPoint: NSMakePoint(0.0, 0.0) fraction: 0.5];1568 [image drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 0.5];
1242 [dragImage unlockFocus];1569 [dragImage unlockFocus];
1243 1570
1244 NSPoint startPoint;1571 NSPoint startPoint;
1245 startPoint.x = selectionRectangle.origin.x;1572 startPoint.x = selectionRectangle.origin.x + client.left;
1246 startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height;1573 startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height + client.top;
1247 [content dragImage: dragImage 1574 [content dragImage: dragImage
1248 at: startPoint1575 at: startPoint
1249 offset: NSZeroSize1576 offset: NSZeroSize
1250 event: lastMouseEvent // Set in MouseMove.1577 event: lastMouseEvent // Set in MouseMove.
@@ -1260,7 +1587,6 @@
1260 */1587 */
1261NSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info)1588NSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info)
1262{1589{
1263 inDragDrop = ddDragging;
1264 return DraggingUpdated(info);1590 return DraggingUpdated(info);
1265}1591}
12661592
@@ -1273,22 +1599,22 @@
1273 */1599 */
1274NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info)1600NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info)
1275{1601{
1276 // Convert the drag location from window coordinates to view coordinates and 1602 // Convert the drag location from window coordinates to view coordinates and
1277 // from there to a text position to finally set the drag position.1603 // from there to a text position to finally set the drag position.
1278 Point location = ConvertPoint([info draggingLocation]);1604 Point location = ConvertPoint([info draggingLocation]);
1279 SetDragPosition(SPositionFromLocation(location));1605 SetDragPosition(SPositionFromLocation(location));
1280 1606
1281 NSDragOperation sourceDragMask = [info draggingSourceOperationMask];1607 NSDragOperation sourceDragMask = [info draggingSourceOperationMask];
1282 if (sourceDragMask == NSDragOperationNone)1608 if (sourceDragMask == NSDragOperationNone)
1283 return sourceDragMask;1609 return sourceDragMask;
1284 1610
1285 NSPasteboard* pasteboard = [info draggingPasteboard];1611 NSPasteboard* pasteboard = [info draggingPasteboard];
1286 1612
1287 // Return what type of operation we will perform. Prefer move over copy.1613 // Return what type of operation we will perform. Prefer move over copy.
1288 if ([[pasteboard types] containsObject: NSStringPboardType] ||1614 if ([[pasteboard types] containsObject: NSStringPboardType] ||
1289 [[pasteboard types] containsObject: ScintillaRecPboardType])1615 [[pasteboard types] containsObject: ScintillaRecPboardType])
1290 return (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy;1616 return (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy;
1291 1617
1292 if ([[pasteboard types] containsObject: NSFilenamesPboardType])1618 if ([[pasteboard types] containsObject: NSFilenamesPboardType])
1293 return (sourceDragMask & NSDragOperationGeneric);1619 return (sourceDragMask & NSDragOperationGeneric);
1294 return NSDragOperationNone;1620 return NSDragOperationNone;
@@ -1314,7 +1640,7 @@
1314bool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info)1640bool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info)
1315{1641{
1316 NSPasteboard* pasteboard = [info draggingPasteboard];1642 NSPasteboard* pasteboard = [info draggingPasteboard];
1317 1643
1318 if ([[pasteboard types] containsObject: NSFilenamesPboardType])1644 if ([[pasteboard types] containsObject: NSFilenamesPboardType])
1319 {1645 {
1320 NSArray* files = [pasteboard propertyListForType: NSFilenamesPboardType];1646 NSArray* files = [pasteboard propertyListForType: NSFilenamesPboardType];
@@ -1325,13 +1651,13 @@
1325 {1651 {
1326 SelectionText text;1652 SelectionText text;
1327 GetPasteboardData(pasteboard, &text);1653 GetPasteboardData(pasteboard, &text);
1328 1654
1329 if (text.len > 0)1655 if (text.Length() > 0)
1330 {1656 {
1331 NSDragOperation operation = [info draggingSourceOperationMask];1657 NSDragOperation operation = [info draggingSourceOperationMask];
1332 bool moving = (operation & NSDragOperationMove) != 0;1658 bool moving = (operation & NSDragOperationMove) != 0;
1333 1659
1334 DropAt(posDrag, text.s, moving, text.rectangular);1660 DropAt(posDrag, text.Data(), text.Length(), moving, text.rectangular);
1335 };1661 };
1336 }1662 }
13371663
@@ -1342,26 +1668,26 @@
13421668
1343void ScintillaCocoa::SetPasteboardData(NSPasteboard* board, const SelectionText &selectedText)1669void ScintillaCocoa::SetPasteboardData(NSPasteboard* board, const SelectionText &selectedText)
1344{1670{
1345 if (selectedText.len == 0)1671 if (selectedText.Length() == 0)
1346 return;1672 return;
13471673
1348 CFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8,1674 CFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8,
1349 selectedText.characterSet);1675 selectedText.characterSet);
1350 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,1676 CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
1351 reinterpret_cast<const UInt8 *>(selectedText.s), 1677 reinterpret_cast<const UInt8 *>(selectedText.Data()),
1352 selectedText.len-1, encoding, false);1678 selectedText.Length(), encoding, false);
13531679
1354 [board declareTypes:[NSArray arrayWithObjects:1680 NSArray *pbTypes = selectedText.rectangular ?
1355 NSStringPboardType,1681 [NSArray arrayWithObjects: NSStringPboardType, ScintillaRecPboardType, nil] :
1356 selectedText.rectangular ? ScintillaRecPboardType : nil,1682 [NSArray arrayWithObjects: NSStringPboardType, nil];
1357 nil] owner:nil];1683 [board declareTypes:pbTypes owner:nil];
1358 1684
1359 if (selectedText.rectangular)1685 if (selectedText.rectangular)
1360 {1686 {
1361 // This is specific to scintilla, allows us to drag rectangular selections around the document.1687 // This is specific to scintilla, allows us to drag rectangular selections around the document.
1362 [board setString: (NSString *)cfsVal forType: ScintillaRecPboardType];1688 [board setString: (NSString *)cfsVal forType: ScintillaRecPboardType];
1363 }1689 }
1364 1690
1365 [board setString: (NSString *)cfsVal forType: NSStringPboardType];1691 [board setString: (NSString *)cfsVal forType: NSStringPboardType];
13661692
1367 if (cfsVal)1693 if (cfsVal)
@@ -1375,40 +1701,39 @@
1375 */1701 */
1376bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selectedText)1702bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selectedText)
1377{1703{
1378 NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType, 1704 NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType,
1379 NSStringPboardType, 1705 NSStringPboardType,
1380 nil];1706 nil];
1381 NSString *bestType = [board availableTypeFromArray: supportedTypes];1707 NSString *bestType = [board availableTypeFromArray: supportedTypes];
1382 NSString* data = [board stringForType: bestType];1708 NSString* data = [board stringForType: bestType];
1383 1709
1384 if (data != nil)1710 if (data != nil)
1385 {1711 {
1386 if (selectedText != nil)1712 if (selectedText != nil)
1387 {1713 {
1388 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),1714 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
1389 vs.styles[STYLE_DEFAULT].characterSet);1715 vs.styles[STYLE_DEFAULT].characterSet);
1390 CFRange rangeAll = {0, [data length]};1716 CFRange rangeAll = {0, static_cast<CFIndex>([data length])};
1391 CFIndex usedLen = 0;1717 CFIndex usedLen = 0;
1392 CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',1718 CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',
1393 false, NULL, 0, &usedLen);1719 false, NULL, 0, &usedLen);
13941720
1395 UInt8 *buffer = new UInt8[usedLen];1721 std::vector<UInt8> buffer(usedLen);
1396 1722
1397 CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',1723 CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',
1398 false, buffer,usedLen, NULL);1724 false, buffer.data(),usedLen, NULL);
13991725
1400 bool rectangular = bestType == ScintillaRecPboardType;1726 bool rectangular = bestType == ScintillaRecPboardType;
14011727
1402 int len = static_cast<int>(usedLen);1728 int len = static_cast<int>(usedLen);
1403 char *dest = Document::TransformLineEnds(&len, (char *)buffer, len, pdoc->eolMode);1729 std::string dest = Document::TransformLineEnds((char *)buffer.data(), len, pdoc->eolMode);
14041730
1405 selectedText->Set(dest, len+1, pdoc->dbcsCodePage, 1731 selectedText->Copy(dest, pdoc->dbcsCodePage,
1406 vs.styles[STYLE_DEFAULT].characterSet , rectangular, false);1732 vs.styles[STYLE_DEFAULT].characterSet , rectangular, false);
1407 delete []buffer;
1408 }1733 }
1409 return true;1734 return true;
1410 }1735 }
1411 1736
1412 return false;1737 return false;
1413}1738}
14141739
@@ -1417,16 +1742,6 @@
1417void ScintillaCocoa::SetMouseCapture(bool on)1742void ScintillaCocoa::SetMouseCapture(bool on)
1418{1743{
1419 capturedMouse = on;1744 capturedMouse = on;
1420 /*
1421 if (mouseDownCaptures)
1422 {
1423 if (capturedMouse)
1424 WndProc(SCI_SETCURSOR, Window::cursorArrow, 0);
1425 else
1426 // Reset to normal. Actual image will be set on mouse move.
1427 WndProc(SCI_SETCURSOR, (unsigned int) SC_CURSORNORMAL, 0);
1428 }
1429 */
1430}1745}
14311746
1432//--------------------------------------------------------------------------------------------------1747//--------------------------------------------------------------------------------------------------
@@ -1451,6 +1766,16 @@
1451 Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);1766 Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
1452 if (sw)1767 if (sw)
1453 {1768 {
1769 CGContextSetAllowsAntialiasing((CGContextRef)gc,
1770 vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED);
1771 CGContextSetAllowsFontSmoothing((CGContextRef)gc,
1772 vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
1773#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
1774 if (CGContextSetAllowsFontSubpixelPositioning != NULL)
1775 CGContextSetAllowsFontSubpixelPositioning((CGContextRef)gc,
1776 vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
1777 vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
1778#endif
1454 sw->Init(gc, wMain.GetID());1779 sw->Init(gc, wMain.GetID());
1455 Paint(sw, rc);1780 Paint(sw, rc);
1456 succeeded = paintState != paintAbandoned;1781 succeeded = paintState != paintAbandoned;
@@ -1458,6 +1783,7 @@
1458 delete sw;1783 delete sw;
1459 }1784 }
1460 paintState = notPainting;1785 paintState = notPainting;
1786<<<<<<< TREE
1461 return succeeded;1787 return succeeded;
1462}1788}
14631789
@@ -1466,9 +1792,55 @@
1466/**1792/**
1467 * Scrolls the pixels in the window some number of lines.1793 * Scrolls the pixels in the window some number of lines.
1468 * Invalidates the pixels scrolled into view.1794 * Invalidates the pixels scrolled into view.
1795=======
1796 if (!succeeded)
1797 {
1798 NSView *marginView = static_cast<NSView*>(wMargin.GetID());
1799 [marginView setNeedsDisplay:YES];
1800 }
1801 return succeeded;
1802}
1803
1804//--------------------------------------------------------------------------------------------------
1805
1806/**
1807 * Paint the margin into the SCIMarginView space.
1808 */
1809void ScintillaCocoa::PaintMargin(NSRect aRect)
1810{
1811 CGContextRef gc = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
1812
1813 PRectangle rc = NSRectToPRectangle(aRect);
1814 rcPaint = rc;
1815 Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
1816 if (sw)
1817 {
1818 CGContextSetAllowsAntialiasing(gc,
1819 vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED);
1820 CGContextSetAllowsFontSmoothing(gc,
1821 vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
1822#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
1823 if (CGContextSetAllowsFontSubpixelPositioning != NULL)
1824 CGContextSetAllowsFontSubpixelPositioning(gc,
1825 vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
1826 vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
1827#endif
1828 sw->Init(gc, wMargin.GetID());
1829 PaintSelMargin(sw, rc);
1830 sw->Release();
1831 delete sw;
1832 }
1833}
1834
1835//--------------------------------------------------------------------------------------------------
1836
1837/**
1838 * ScrollText is empty because scrolling is handled by the NSScrollView.
1839>>>>>>> MERGE-SOURCE
1469 */1840 */
1470void ScintillaCocoa::ScrollText(int linesToMove)1841void ScintillaCocoa::ScrollText(int linesToMove)
1471{1842{
1843<<<<<<< TREE
1472 // Move those pixels1844 // Move those pixels
1473 NSView *content = ContentView();1845 NSView *content = ContentView();
1474 if ([content layer]) {1846 if ([content layer]) {
@@ -1509,15 +1881,18 @@
15091881
1510 // Could invalidate instead of synchronous draw but that may not be as smooth1882 // Could invalidate instead of synchronous draw but that may not be as smooth
1511 //[content setNeedsDisplayInRect: redrawRectangle];1883 //[content setNeedsDisplayInRect: redrawRectangle];
1884=======
1885>>>>>>> MERGE-SOURCE
1512}1886}
15131887
1514//--------------------------------------------------------------------------------------------------1888//--------------------------------------------------------------------------------------------------
15151889
1516/**1890/**
1517 * Modfies the vertical scroll position to make the current top line show up as such.1891 * Modifies the vertical scroll position to make the current top line show up as such.
1518 */1892 */
1519void ScintillaCocoa::SetVerticalScrollPos()1893void ScintillaCocoa::SetVerticalScrollPos()
1520{1894{
1895<<<<<<< TREE
1521 ScintillaView* topContainer = TopContainer();1896 ScintillaView* topContainer = TopContainer();
1522 1897
1523 // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area1898 // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area
@@ -1525,14 +1900,26 @@
1525 int maxScrollPos = MaxScrollPos();1900 int maxScrollPos = MaxScrollPos();
1526 float relativePosition = (maxScrollPos > 0) ? ((float) topLine / maxScrollPos) : 0.0f;1901 float relativePosition = (maxScrollPos > 0) ? ((float) topLine / maxScrollPos) : 0.0f;
1527 [topContainer setVerticalScrollPosition: relativePosition];1902 [topContainer setVerticalScrollPosition: relativePosition];
1903=======
1904 NSScrollView *scrollView = ScrollContainer();
1905 if (scrollView) {
1906 NSClipView *clipView = [scrollView contentView];
1907 NSRect contentRect = [clipView bounds];
1908 [clipView scrollToPoint: NSMakePoint(contentRect.origin.x, topLine * vs.lineHeight)];
1909 [scrollView reflectScrolledClipView:clipView];
1910 }
1911>>>>>>> MERGE-SOURCE
1528}1912}
15291913
1530//--------------------------------------------------------------------------------------------------1914//--------------------------------------------------------------------------------------------------
15311915
1916/**
1917 * Modifies the horizontal scroll position to match xOffset.
1918 */
1532void ScintillaCocoa::SetHorizontalScrollPos()1919void ScintillaCocoa::SetHorizontalScrollPos()
1533{1920{
1534 ScintillaView* topContainer = TopContainer();
1535 PRectangle textRect = GetTextRectangle();1921 PRectangle textRect = GetTextRectangle();
1922<<<<<<< TREE
1536 1923
1537 // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area1924 // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area
1538 // does *not* belong to the scroll range.1925 // does *not* belong to the scroll range.
@@ -1544,12 +1931,29 @@
1544 float relativePosition = (float) xOffset / maxXOffset;1931 float relativePosition = (float) xOffset / maxXOffset;
1545 [topContainer setHorizontalScrollPosition: relativePosition];1932 [topContainer setHorizontalScrollPosition: relativePosition];
1546 MoveFindIndicatorWithBounce(NO);1933 MoveFindIndicatorWithBounce(NO);
1934=======
1935
1936 int maxXOffset = scrollWidth - textRect.Width();
1937 if (maxXOffset < 0)
1938 maxXOffset = 0;
1939 if (xOffset > maxXOffset)
1940 xOffset = maxXOffset;
1941 NSScrollView *scrollView = ScrollContainer();
1942 if (scrollView) {
1943 NSClipView * clipView = [scrollView contentView];
1944 NSRect contentRect = [clipView bounds];
1945 [clipView scrollToPoint: NSMakePoint(xOffset, contentRect.origin.y)];
1946 [scrollView reflectScrolledClipView:clipView];
1947 }
1948 MoveFindIndicatorWithBounce(NO);
1949>>>>>>> MERGE-SOURCE
1547}1950}
15481951
1549//--------------------------------------------------------------------------------------------------1952//--------------------------------------------------------------------------------------------------
15501953
1551/**1954/**
1552 * Used to adjust both scrollers to reflect the current scroll range and position in the editor.1955 * Used to adjust both scrollers to reflect the current scroll range and position in the editor.
1956 * Arguments no longer used as NSScrollView handles details of scroll bar sizes.
1553 *1957 *
1554 * @param nMax Number of lines in the editor.1958 * @param nMax Number of lines in the editor.
1555 * @param nPage Number of lines per scroll page.1959 * @param nPage Number of lines per scroll page.
@@ -1557,12 +1961,11 @@
1557 */1961 */
1558bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage)1962bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage)
1559{1963{
1560#pragma unused(nPage)1964#pragma unused(nMax, nPage)
1561 // Input values are given in lines, not pixels, so we have to convert.1965 return SetScrollingSize();
1562 int lineHeight = static_cast<int>(WndProc(SCI_TEXTHEIGHT, 0, 0));1966}
1563 PRectangle bounds = GetTextRectangle();
1564 ScintillaView* topContainer = TopContainer();
15651967
1968<<<<<<< TREE
1566 // Set page size to the same value as the scroll range to hide the scrollbar.1969 // Set page size to the same value as the scroll range to hide the scrollbar.
1567 int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one.1970 int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one.
1568 int pageSize;1971 int pageSize;
@@ -1582,87 +1985,86 @@
1582 MoveFindIndicatorWithBounce(NO); 1985 MoveFindIndicatorWithBounce(NO);
1583 1986
1584 return verticalChange || horizontalChange;1987 return verticalChange || horizontalChange;
1988=======
1989bool ScintillaCocoa::SetScrollingSize(void) {
1990 bool changes = false;
1991 SCIContentView *inner = ContentView();
1992 if (!enteredSetScrollingSize) {
1993 enteredSetScrollingSize = true;
1994 NSScrollView *scrollView = ScrollContainer();
1995 NSClipView *clipView = [ScrollContainer() contentView];
1996 NSRect clipRect = [clipView bounds];
1997 CGFloat docHeight = (cs.LinesDisplayed()+1) * vs.lineHeight;
1998 if (!endAtLastLine)
1999 docHeight += (int([scrollView bounds].size.height / vs.lineHeight)-3) * vs.lineHeight;
2000 // Allow extra space so that last scroll position places whole line at top
2001 int clipExtra = int(clipRect.size.height) % vs.lineHeight;
2002 docHeight += clipExtra;
2003 // Ensure all of clipRect covered by Scintilla drawing
2004 if (docHeight < clipRect.size.height)
2005 docHeight = clipRect.size.height;
2006 CGFloat docWidth = scrollWidth;
2007 bool showHorizontalScroll = horizontalScrollBarVisible &&
2008 !Wrapping();
2009 if (!showHorizontalScroll)
2010 docWidth = clipRect.size.width;
2011 NSRect contentRect = {0, 0, docWidth, docHeight};
2012 NSRect contentRectNow = [inner frame];
2013 changes = (contentRect.size.width != contentRectNow.size.width) ||
2014 (contentRect.size.height != contentRectNow.size.height);
2015 if (changes) {
2016 [inner setFrame: contentRect];
2017 }
2018 [scrollView setHasVerticalScroller: verticalScrollBarVisible];
2019 [scrollView setHasHorizontalScroller: showHorizontalScroll];
2020 SetVerticalScrollPos();
2021 enteredSetScrollingSize = false;
2022 }
2023 [inner.owner setMarginWidth: vs.fixedColumnWidth];
2024 return changes;
2025>>>>>>> MERGE-SOURCE
1585}2026}
15862027
1587//--------------------------------------------------------------------------------------------------2028//--------------------------------------------------------------------------------------------------
15882029
1589void ScintillaCocoa::Resize()2030void ScintillaCocoa::Resize()
1590{2031{
2032 SetScrollingSize();
1591 ChangeSize();2033 ChangeSize();
1592}2034}
15932035
1594//--------------------------------------------------------------------------------------------------2036//--------------------------------------------------------------------------------------------------
15952037
1596/**2038/**
1597 * Called by the frontend control when the user manipulates one of the scrollers.2039 * Update fields to match scroll position after receiving a notification that the user has scrolled.
2040 */
2041void ScintillaCocoa::UpdateForScroll() {
2042 Point ptOrigin = GetVisibleOriginInMain();
2043 xOffset = ptOrigin.x;
2044 int newTop = Platform::Minimum(ptOrigin.y / vs.lineHeight, MaxScrollPos());
2045 SetTopLine(newTop);
2046}
2047
2048//--------------------------------------------------------------------------------------------------
2049
2050/**
2051 * Register a delegate that will be called for notifications and commands.
2052 * This provides similar functionality to RegisterNotifyCallback but in an
2053 * Objective C way.
1598 *2054 *
1599 * @param position The relative position of the scroller in the range of [0..1].2055 * @param delegate_ A pointer to an object that implements ScintillaNotificationProtocol.
1600 * @param part Specifies which part was clicked on by the user, so we can handle thumb tracking
1601 * as well as page and line scrolling.
1602 * @param horizontal True if the horizontal scroller was hit, otherwise false.
1603 */2056 */
1604void ScintillaCocoa::DoScroll(float position, NSScrollerPart part, bool horizontal)2057
2058void ScintillaCocoa::SetDelegate(id<ScintillaNotificationProtocol> delegate_)
1605{2059{
1606 // If the given scroller part is not the knob (or knob slot) then the given position is not yet2060 delegate = delegate_;
1607 // current and we have to update it.
1608 if (horizontal)
1609 {
1610 // Horizontal offset is given in pixels.
1611 PRectangle textRect = GetTextRectangle();
1612 int offset = (int) (position * (scrollWidth - textRect.Width()));
1613 int smallChange = (int) (textRect.Width() / 30);
1614 if (smallChange < 5)
1615 smallChange = 5;
1616 switch (part)
1617 {
1618 case NSScrollerDecrementLine:
1619 offset -= smallChange;
1620 break;
1621 case NSScrollerDecrementPage:
1622 offset -= textRect.Width();
1623 break;
1624 case NSScrollerIncrementLine:
1625 offset += smallChange;
1626 break;
1627 case NSScrollerIncrementPage:
1628 offset += textRect.Width();
1629 break;
1630 };
1631 HorizontalScrollTo(offset);
1632 }
1633 else
1634 {
1635 // VerticalScrolling is by line. If the user is scrolling using the knob we can directly
1636 // set the new scroll position. Otherwise we have to compute it first.
1637 if (part == NSScrollerKnob)
1638 ScrollTo(position * MaxScrollPos(), false);
1639 else
1640 {
1641 switch (part)
1642 {
1643 case NSScrollerDecrementLine:
1644 ScrollTo(topLine - 1, true);
1645 break;
1646 case NSScrollerDecrementPage:
1647 ScrollTo(topLine - LinesOnScreen(), true);
1648 break;
1649 case NSScrollerIncrementLine:
1650 ScrollTo(topLine + 1, true);
1651 break;
1652 case NSScrollerIncrementPage:
1653 ScrollTo(topLine + LinesOnScreen(), true);
1654 break;
1655 };
1656
1657 }
1658 }
1659}2061}
16602062
1661//--------------------------------------------------------------------------------------------------2063//--------------------------------------------------------------------------------------------------
16622064
1663/**2065/**
1664 * Used to register a callback function for a given window. This is used to emulate the way2066 * Used to register a callback function for a given window. This is used to emulate the way
1665 * Windows notfies other controls (mainly up in the view hierarchy) about certain events.2067 * Windows notifies other controls (mainly up in the view hierarchy) about certain events.
1666 *2068 *
1667 * @param windowid A handle to a window. That value is generic and can be anything. It is passed2069 * @param windowid A handle to a window. That value is generic and can be anything. It is passed
1668 * through to the callback.2070 * through to the callback.
@@ -1691,6 +2093,8 @@
1691 if (notifyProc != NULL)2093 if (notifyProc != NULL)
1692 notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)),2094 notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)),
1693 (uintptr_t) this);2095 (uintptr_t) this);
2096
2097 Editor::NotifyFocus(focus);
1694}2098}
16952099
1696//--------------------------------------------------------------------------------------------------2100//--------------------------------------------------------------------------------------------------
@@ -1702,13 +2106,13 @@
1702 * @param scn The notification to send.2106 * @param scn The notification to send.
1703 */2107 */
1704void ScintillaCocoa::NotifyParent(SCNotification scn)2108void ScintillaCocoa::NotifyParent(SCNotification scn)
1705{ 2109{
2110 scn.nmhdr.hwndFrom = (void*) this;
2111 scn.nmhdr.idFrom = GetCtrlID();
1706 if (notifyProc != NULL)2112 if (notifyProc != NULL)
1707 {2113 notifyProc(notifyObj, WM_NOTIFY, GetCtrlID(), (uintptr_t) &scn);
1708 scn.nmhdr.hwndFrom = (void*) this;2114 if (delegate)
1709 scn.nmhdr.idFrom = GetCtrlID();2115 [delegate notification:&scn];
1710 notifyProc(notifyObj, WM_NOTIFY, (uintptr_t) 0, (uintptr_t) &scn);
1711 }
1712}2116}
17132117
1714//--------------------------------------------------------------------------------------------------2118//--------------------------------------------------------------------------------------------------
@@ -1718,7 +2122,7 @@
1718 SCNotification scn;2122 SCNotification scn;
1719 scn.nmhdr.code = SCN_URIDROPPED;2123 scn.nmhdr.code = SCN_URIDROPPED;
1720 scn.text = uri;2124 scn.text = uri;
1721 2125
1722 NotifyParent(scn);2126 NotifyParent(scn);
1723}2127}
17242128
@@ -1775,7 +2179,7 @@
1775}2179}
17762180
1777//--------------------------------------------------------------------------------------------------2181//--------------------------------------------------------------------------------------------------
1778 2182
1779/**2183/**
1780 * Helper function to translate OS X key codes to Scintilla key codes.2184 * Helper function to translate OS X key codes to Scintilla key codes.
1781 */2185 */
@@ -1821,8 +2225,26 @@
1821//--------------------------------------------------------------------------------------------------2225//--------------------------------------------------------------------------------------------------
18222226
1823/**2227/**
2228 * Translate NSEvent modifier flags into SCI_* modifier flags.
2229 *
2230 * @param modifiers An integer bit set of NSSEvent modifier flags.
2231 * @return A set of SCI_* modifier flags.
2232 */
2233static int TranslateModifierFlags(NSUInteger modifiers)
2234{
2235 // Signal Control as SCI_META
2236 return
2237 (((modifiers & NSShiftKeyMask) != 0) ? SCI_SHIFT : 0) |
2238 (((modifiers & NSCommandKeyMask) != 0) ? SCI_CTRL : 0) |
2239 (((modifiers & NSAlternateKeyMask) != 0) ? SCI_ALT : 0) |
2240 (((modifiers & NSControlKeyMask) != 0) ? SCI_META : 0);
2241}
2242
2243//--------------------------------------------------------------------------------------------------
2244
2245/**
1824 * Main keyboard input handling method. It is called for any key down event, including function keys,2246 * Main keyboard input handling method. It is called for any key down event, including function keys,
1825 * numeric keypad input and whatnot. 2247 * numeric keypad input and whatnot.
1826 *2248 *
1827 * @param event The event instance associated with the key down event.2249 * @param event The event instance associated with the key down event.
1828 * @return True if the input was handled, false otherwise.2250 * @return True if the input was handled, false otherwise.
@@ -1830,37 +2252,24 @@
1830bool ScintillaCocoa::KeyboardInput(NSEvent* event)2252bool ScintillaCocoa::KeyboardInput(NSEvent* event)
1831{2253{
1832 // For now filter out function keys.2254 // For now filter out function keys.
1833 NSUInteger modifiers = [event modifierFlags];
1834
1835 NSString* input = [event characters];2255 NSString* input = [event characters];
1836 2256
1837 bool control = (modifiers & NSControlKeyMask) != 0;
1838 bool shift = (modifiers & NSShiftKeyMask) != 0;
1839 bool command = (modifiers & NSCommandKeyMask) != 0;
1840 bool alt = (modifiers & NSAlternateKeyMask) != 0;
1841
1842 bool handled = false;2257 bool handled = false;
1843 2258
1844 // Handle each entry individually. Usually we only have one entry anway.2259 // Handle each entry individually. Usually we only have one entry anyway.
1845 for (size_t i = 0; i < input.length; i++)2260 for (size_t i = 0; i < input.length; i++)
1846 {2261 {
1847 const UniChar originalKey = [input characterAtIndex: i];2262 const UniChar originalKey = [input characterAtIndex: i];
1848 UniChar key = KeyTranslate(originalKey);2263 UniChar key = KeyTranslate(originalKey);
1849 2264
1850 bool consumed = false; // Consumed as command?2265 bool consumed = false; // Consumed as command?
1851 2266
1852 // Signal Control as SCMOD_META2267 if (KeyDownWithModifiers(key, TranslateModifierFlags([event modifierFlags]), &consumed))
1853 int modifierKeys =
1854 (shift ? SCI_SHIFT : 0) |
1855 (command ? SCI_CTRL : 0) |
1856 (alt ? SCI_ALT : 0) |
1857 (control ? SCI_META : 0);
1858 if (KeyDownWithModifiers(key, modifierKeys, &consumed))
1859 handled = true;2268 handled = true;
1860 if (consumed)2269 if (consumed)
1861 handled = true;2270 handled = true;
1862 }2271 }
1863 2272
1864 return handled;2273 return handled;
1865}2274}
18662275
@@ -1873,24 +2282,53 @@
1873{2282{
1874 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),2283 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
1875 vs.styles[STYLE_DEFAULT].characterSet);2284 vs.styles[STYLE_DEFAULT].characterSet);
1876 CFRange rangeAll = {0, [input length]};2285 CFRange rangeAll = {0, static_cast<CFIndex>([input length])};
1877 CFIndex usedLen = 0;2286 CFIndex usedLen = 0;
1878 CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?',2287 CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?',
1879 false, NULL, 0, &usedLen);2288 false, NULL, 0, &usedLen);
1880 2289
1881 UInt8 *buffer = new UInt8[usedLen];2290 std::vector<UInt8> buffer(usedLen);
1882 2291
1883 CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?',2292 CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?',
1884 false, buffer,usedLen, NULL);2293 false, buffer.data(),usedLen, NULL);
1885 2294
1886 AddCharUTF((char*) buffer, static_cast<unsigned int>(usedLen), false);2295 AddCharUTF((char*) buffer.data(), static_cast<unsigned int>(usedLen), false);
1887 delete []buffer;
1888 return static_cast<int>(usedLen);2296 return static_cast<int>(usedLen);
1889}2297}
18902298
1891//--------------------------------------------------------------------------------------------------2299//--------------------------------------------------------------------------------------------------
18922300
1893/**2301/**
2302 * Used to ensure that only one selection is active for input composition as composition
2303 * does not support multi-typing.
2304 * Also drop virtual space as that is not supported by composition.
2305 */
2306void ScintillaCocoa::SelectOnlyMainSelection()
2307{
2308 SelectionRange mainSel = sel.RangeMain();
2309 mainSel.ClearVirtualSpace();
2310 sel.SetSelection(mainSel);
2311 Redraw();
2312}
2313
2314//--------------------------------------------------------------------------------------------------
2315/**
2316 * When switching documents discard any incomplete character composition state as otherwise tries to
2317 * act on the new document.
2318 */
2319void ScintillaCocoa::SetDocPointer(Document *document)
2320{
2321 // Drop input composition.
2322 NSTextInputContext *inctxt = [NSTextInputContext currentInputContext];
2323 [inctxt discardMarkedText];
2324 SCIContentView *inner = ContentView();
2325 [inner unmarkText];
2326 Editor::SetDocPointer(document);
2327}
2328
2329//--------------------------------------------------------------------------------------------------
2330
2331/**
1894 * Called by the owning view when the mouse pointer enters the control.2332 * Called by the owning view when the mouse pointer enters the control.
1895 */2333 */
1896void ScintillaCocoa::MouseEntered(NSEvent* event)2334void ScintillaCocoa::MouseEntered(NSEvent* event)
@@ -1898,7 +2336,7 @@
1898 if (!HaveMouseCapture())2336 if (!HaveMouseCapture())
1899 {2337 {
1900 WndProc(SCI_SETCURSOR, (long int)SC_CURSORNORMAL, 0);2338 WndProc(SCI_SETCURSOR, (long int)SC_CURSORNORMAL, 0);
1901 2339
1902 // Mouse location is given in screen coordinates and might also be outside of our bounds.2340 // Mouse location is given in screen coordinates and might also be outside of our bounds.
1903 Point location = ConvertPoint([event locationInWindow]);2341 Point location = ConvertPoint([event locationInWindow]);
1904 ButtonMove(location);2342 ButtonMove(location);
@@ -1921,7 +2359,7 @@
1921 bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;2359 bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
1922 bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0;2360 bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0;
1923 bool alt = ([event modifierFlags] & NSAlternateKeyMask) != 0;2361 bool alt = ([event modifierFlags] & NSAlternateKeyMask) != 0;
1924 2362
1925 ButtonDown(Point(location.x, location.y), (int) (time * 1000), shift, command, alt);2363 ButtonDown(Point(location.x, location.y), (int) (time * 1000), shift, command, alt);
1926}2364}
19272365
@@ -1930,8 +2368,8 @@
1930void ScintillaCocoa::MouseMove(NSEvent* event)2368void ScintillaCocoa::MouseMove(NSEvent* event)
1931{2369{
1932 lastMouseEvent = event;2370 lastMouseEvent = event;
1933 2371
1934 ButtonMove(ConvertPoint([event locationInWindow]));2372 ButtonMoveWithModifiers(ConvertPoint([event locationInWindow]), TranslateModifierFlags([event modifierFlags]));
1935}2373}
19362374
1937//--------------------------------------------------------------------------------------------------2375//--------------------------------------------------------------------------------------------------
@@ -1949,18 +2387,15 @@
1949void ScintillaCocoa::MouseWheel(NSEvent* event)2387void ScintillaCocoa::MouseWheel(NSEvent* event)
1950{2388{
1951 bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;2389 bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
1952 int dX = 0;
1953 int dY = 0;2390 int dY = 0;
19542391
1955 dX = 10 * [event deltaX]; // Arbitrary scale factor.2392 // In order to make scrolling with larger offset smoother we scroll less lines the larger the
1956
1957 // In order to make scrolling with larger offset smoother we scroll less lines the larger the
1958 // delta value is.2393 // delta value is.
1959 if ([event deltaY] < 0)2394 if ([event deltaY] < 0)
1960 dY = -(int) sqrt(-10.0 * [event deltaY]);2395 dY = -(int) sqrt(-10.0 * [event deltaY]);
1961 else2396 else
1962 dY = (int) sqrt(10.0 * [event deltaY]);2397 dY = (int) sqrt(10.0 * [event deltaY]);
1963 2398
1964 if (command)2399 if (command)
1965 {2400 {
1966 // Zoom! We play with the font sizes in the styles.2401 // Zoom! We play with the font sizes in the styles.
@@ -1972,8 +2407,6 @@
1972 }2407 }
1973 else2408 else
1974 {2409 {
1975 HorizontalScrollTo(xOffset - dX);
1976 ScrollTo(topLine - dY, true);
1977 }2410 }
1978}2411}
19792412
@@ -2015,7 +2448,7 @@
2015{2448{
2016 // Call ScintillaBase to create the context menu.2449 // Call ScintillaBase to create the context menu.
2017 ContextMenu(Point(0, 0));2450 ContextMenu(Point(0, 0));
2018 2451
2019 return reinterpret_cast<NSMenu*>(popup.GetID());2452 return reinterpret_cast<NSMenu*>(popup.GetID());
2020}2453}
20212454
@@ -2044,9 +2477,14 @@
2044 }2477 }
2045}2478}
20462479
2480// If building with old SDK, need to define version number for 10.8
2481#ifndef NSAppKitVersionNumber10_8
2482#define NSAppKitVersionNumber10_8 1187
2483#endif
20472484
2048//--------------------------------------------------------------------------------------------------2485//--------------------------------------------------------------------------------------------------
20492486
2487<<<<<<< TREE
2050void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining)2488void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining)
2051{2489{
2052#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_52490#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
@@ -2123,3 +2561,88 @@
2123}2561}
21242562
21252563
2564=======
2565void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining)
2566{
2567#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
2568 NSView *content = ContentView();
2569 if (!layerFindIndicator)
2570 {
2571 layerFindIndicator = [[FindHighlightLayer alloc] init];
2572 [content setWantsLayer: YES];
2573 layerFindIndicator.geometryFlipped = content.layer.geometryFlipped;
2574 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8)
2575 {
2576 // Content layer is unflipped on 10.9, but the indicator shows wrong unless flipped
2577 layerFindIndicator.geometryFlipped = YES;
2578 }
2579 [[content layer] addSublayer:layerFindIndicator];
2580 }
2581 [layerFindIndicator removeAnimationForKey:@"animateFound"];
2582
2583 if (charRange.length)
2584 {
2585 CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
2586 vs.styles[STYLE_DEFAULT].characterSet);
2587 std::vector<char> buffer(charRange.length);
2588 pdoc->GetCharRange(&buffer[0], charRange.location, charRange.length);
2589
2590 CFStringRef cfsFind = CFStringCreateWithBytes(kCFAllocatorDefault,
2591 reinterpret_cast<const UInt8 *>(&buffer[0]),
2592 charRange.length, encoding, false);
2593 layerFindIndicator.sFind = (NSString *)cfsFind;
2594 if (cfsFind)
2595 CFRelease(cfsFind);
2596 layerFindIndicator.retaining = retaining;
2597 layerFindIndicator.positionFind = charRange.location;
2598 int style = WndProc(SCI_GETSTYLEAT, charRange.location, 0);
2599 std::vector<char> bufferFontName(WndProc(SCI_STYLEGETFONT, style, 0) + 1);
2600 WndProc(SCI_STYLEGETFONT, style, (sptr_t)&bufferFontName[0]);
2601 layerFindIndicator.sFont = [NSString stringWithUTF8String: &bufferFontName[0]];
2602
2603 layerFindIndicator.fontSize = WndProc(SCI_STYLEGETSIZEFRACTIONAL, style, 0) /
2604 (float)SC_FONT_SIZE_MULTIPLIER;
2605 layerFindIndicator.widthText = WndProc(SCI_POINTXFROMPOSITION, 0, charRange.location + charRange.length) -
2606 WndProc(SCI_POINTXFROMPOSITION, 0, charRange.location);
2607 layerFindIndicator.heightLine = WndProc(SCI_TEXTHEIGHT, 0, 0);
2608 MoveFindIndicatorWithBounce(YES);
2609 }
2610 else
2611 {
2612 [layerFindIndicator hideMatch];
2613 }
2614#endif
2615}
2616
2617void ScintillaCocoa::MoveFindIndicatorWithBounce(BOOL bounce)
2618{
2619#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
2620 if (layerFindIndicator)
2621 {
2622 CGPoint ptText = CGPointMake(
2623 WndProc(SCI_POINTXFROMPOSITION, 0, layerFindIndicator.positionFind),
2624 WndProc(SCI_POINTYFROMPOSITION, 0, layerFindIndicator.positionFind));
2625 ptText.x = ptText.x - vs.fixedColumnWidth + xOffset;
2626 ptText.y += topLine * vs.lineHeight;
2627 if (!layerFindIndicator.geometryFlipped)
2628 {
2629 NSView *content = ContentView();
2630 ptText.y = content.bounds.size.height - ptText.y;
2631 }
2632 [layerFindIndicator animateMatch:ptText bounce:bounce];
2633 }
2634#endif
2635}
2636
2637void ScintillaCocoa::HideFindIndicator()
2638{
2639#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
2640 if (layerFindIndicator)
2641 {
2642 [layerFindIndicator hideMatch];
2643 }
2644#endif
2645}
2646
2647
2648>>>>>>> MERGE-SOURCE
21262649
=== modified file 'cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj'
--- cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj 2012-10-26 08:56:06 +0000
+++ cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj 2014-01-24 04:00:28 +0000
@@ -7,6 +7,14 @@
7 objects = {7 objects = {
88
9/* Begin PBXBuildFile section */9/* Begin PBXBuildFile section */
10 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E6178E393200105727 /* CaseConvert.cxx */; };
11 1100F1EC178E393200105727 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E7178E393200105727 /* CaseConvert.h */; };
12 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E8178E393200105727 /* CaseFolder.cxx */; };
13 1100F1EE178E393200105727 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E9178E393200105727 /* CaseFolder.h */; };
14 1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */; };
15 1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */; };
16 11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11126B8114CD3A6200803C49 /* LexAVS.cxx */; };
17 1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1114D6CA1602A951001DC345 /* LexPO.cxx */; };
10 114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */; };18 114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */; };
11 114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBF11FA7526004FB6AB /* LexAda.cxx */; };19 114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EBF11FA7526004FB6AB /* LexAda.cxx */; };
12 114B6F0F11FA7526004FB6AB /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */; };20 114B6F0F11FA7526004FB6AB /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */; };
@@ -142,7 +150,6 @@
142 114B6FD111FA7623004FB6AB /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB611FA7623004FB6AB /* Selection.h */; };150 114B6FD111FA7623004FB6AB /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB611FA7623004FB6AB /* Selection.h */; };
143 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB711FA7623004FB6AB /* SplitVector.h */; };151 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB711FA7623004FB6AB /* SplitVector.h */; };
144 114B6FD311FA7623004FB6AB /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB811FA7623004FB6AB /* Style.h */; };152 114B6FD311FA7623004FB6AB /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB811FA7623004FB6AB /* Style.h */; };
145 114B6FD411FA7623004FB6AB /* SVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FB911FA7623004FB6AB /* SVector.h */; };
146 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBA11FA7623004FB6AB /* UniConversion.h */; };153 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBA11FA7623004FB6AB /* UniConversion.h */; };
147 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBB11FA7623004FB6AB /* ViewStyle.h */; };154 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBB11FA7623004FB6AB /* ViewStyle.h */; };
148 114B6FD711FA7623004FB6AB /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBC11FA7623004FB6AB /* XPM.h */; };155 114B6FD711FA7623004FB6AB /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FBC11FA7623004FB6AB /* XPM.h */; };
@@ -157,9 +164,21 @@
157 114B6FEB11FA7645004FB6AB /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE011FA7645004FB6AB /* PropSetSimple.h */; };164 114B6FEB11FA7645004FB6AB /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE011FA7645004FB6AB /* PropSetSimple.h */; };
158 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE111FA7645004FB6AB /* StyleContext.h */; };165 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE111FA7645004FB6AB /* StyleContext.h */; };
159 114B6FED11FA7645004FB6AB /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE211FA7645004FB6AB /* WordList.h */; };166 114B6FED11FA7645004FB6AB /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FE211FA7645004FB6AB /* WordList.h */; };
167 1152A77315313E58000D4E1A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A77215313E58000D4E1A /* QuartzCore.framework */; };
168 11594BE9155B91DF0099E1FA /* LexOScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11594BE7155B91DF0099E1FA /* LexOScript.cxx */; };
169 11594BEA155B91DF0099E1FA /* LexVisualProlog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */; };
170 1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1160E0371803651C00BCEBCB /* LexRust.cxx */; };
171 117ACE9114A29A1E002876F9 /* LexTCMD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */; };
160 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */; };172 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */; };
173 11A0A8A1148602DF0018D143 /* LexCoffeeScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */; };
161 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */; };174 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */; };
175 11BEB6A214EF189600BDE92A /* LexECL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11BEB6A114EF189600BDE92A /* LexECL.cxx */; };
162 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; };176 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; };
177 11FBA39D17817DA00048C071 /* CharacterCategory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */; };
178 11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 11FBA39C17817DA00048C071 /* CharacterCategory.h */; };
179 11FDAEB7174E1A9800FA161B /* LexSTTXT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */; };
180 11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */; };
181 11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */; };
163 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };182 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
164 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };183 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
165 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };184 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -185,6 +204,12 @@
185 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; };204 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; };
186 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; };205 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; };
187 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; };206 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; };
207 280056FB188DDD2C00F200AE /* SparseState.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F8188DDD2C00F200AE /* SparseState.h */; };
208 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F9188DDD2C00F200AE /* StringCopy.h */; };
209 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056FA188DDD2C00F200AE /* SubStyles.h */; };
210 28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */; };
211 28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */; };
212 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */; };
188 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };213 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
189 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };214 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
190/* End PBXBuildFile section */215/* End PBXBuildFile section */
@@ -194,6 +219,14 @@
194 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };219 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
195 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };220 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
196 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };221 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
222 1100F1E6178E393200105727 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = "<group>"; };
223 1100F1E7178E393200105727 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = "<group>"; };
224 1100F1E8178E393200105727 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = "<group>"; };
225 1100F1E9178E393200105727 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = "<group>"; };
226 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnicodeFromUTF8.h; path = ../../src/UnicodeFromUTF8.h; sourceTree = "<group>"; };
227 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLaTeX.cxx; path = ../../lexers/LexLaTeX.cxx; sourceTree = "<group>"; };
228 11126B8114CD3A6200803C49 /* LexAVS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVS.cxx; path = ../../lexers/LexAVS.cxx; sourceTree = "<group>"; };
229 1114D6CA1602A951001DC345 /* LexPO.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPO.cxx; path = ../../lexers/LexPO.cxx; sourceTree = "<group>"; };
197 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; };230 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; };
198 114B6EBF11FA7526004FB6AB /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = SOURCE_ROOT; };231 114B6EBF11FA7526004FB6AB /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = SOURCE_ROOT; };
199 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../lexers/LexAPDL.cxx; sourceTree = SOURCE_ROOT; };232 114B6EC011FA7526004FB6AB /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../lexers/LexAPDL.cxx; sourceTree = SOURCE_ROOT; };
@@ -329,7 +362,6 @@
329 114B6FB611FA7623004FB6AB /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; };362 114B6FB611FA7623004FB6AB /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; };
330 114B6FB711FA7623004FB6AB /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; };363 114B6FB711FA7623004FB6AB /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; };
331 114B6FB811FA7623004FB6AB /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; };364 114B6FB811FA7623004FB6AB /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; };
332 114B6FB911FA7623004FB6AB /* SVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVector.h; path = ../../src/SVector.h; sourceTree = SOURCE_ROOT; };
333 114B6FBA11FA7623004FB6AB /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; };365 114B6FBA11FA7623004FB6AB /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; };
334 114B6FBB11FA7623004FB6AB /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; };366 114B6FBB11FA7623004FB6AB /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; };
335 114B6FBC11FA7623004FB6AB /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; };367 114B6FBC11FA7623004FB6AB /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; };
@@ -344,9 +376,21 @@
344 114B6FE011FA7645004FB6AB /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = SOURCE_ROOT; };376 114B6FE011FA7645004FB6AB /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = SOURCE_ROOT; };
345 114B6FE111FA7645004FB6AB /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = SOURCE_ROOT; };377 114B6FE111FA7645004FB6AB /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = SOURCE_ROOT; };
346 114B6FE211FA7645004FB6AB /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = SOURCE_ROOT; };378 114B6FE211FA7645004FB6AB /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = SOURCE_ROOT; };
379 1152A77215313E58000D4E1A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = ../../../../../../../../System/Library/Frameworks/QuartzCore.framework; sourceTree = "<group>"; };
380 11594BE7155B91DF0099E1FA /* LexOScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOScript.cxx; path = ../../lexers/LexOScript.cxx; sourceTree = "<group>"; };
381 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVisualProlog.cxx; path = ../../lexers/LexVisualProlog.cxx; sourceTree = "<group>"; };
382 1160E0371803651C00BCEBCB /* LexRust.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRust.cxx; path = ../../lexers/LexRust.cxx; sourceTree = "<group>"; };
383 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCMD.cxx; path = ../../lexers/LexTCMD.cxx; sourceTree = "<group>"; };
347 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; };384 119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; };
385 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCoffeeScript.cxx; path = ../../lexers/LexCoffeeScript.cxx; sourceTree = "<group>"; };
348 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = SOURCE_ROOT; };386 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = SOURCE_ROOT; };
387 11BEB6A114EF189600BDE92A /* LexECL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexECL.cxx; path = ../../lexers/LexECL.cxx; sourceTree = "<group>"; };
349 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; };388 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; };
389 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategory.cxx; path = ../../lexlib/CharacterCategory.cxx; sourceTree = "<group>"; };
390 11FBA39C17817DA00048C071 /* CharacterCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategory.h; path = ../../lexlib/CharacterCategory.h; sourceTree = "<group>"; };
391 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSTTXT.cxx; path = ../../lexers/LexSTTXT.cxx; sourceTree = "<group>"; };
392 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKVIrc.cxx; path = ../../lexers/LexKVIrc.cxx; sourceTree = "<group>"; };
393 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMAP.cxx; path = ../../lexers/LexDMAP.cxx; sourceTree = "<group>"; };
350 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; };394 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; };
351 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; };395 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; };
352 2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; };396 2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; };
@@ -372,6 +416,12 @@
372 27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; };416 27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; };
373 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; };417 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; };
374 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; };418 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; };
419 280056F8188DDD2C00F200AE /* SparseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseState.h; path = ../../lexlib/SparseState.h; sourceTree = "<group>"; };
420 280056F9188DDD2C00F200AE /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = "<group>"; };
421 280056FA188DDD2C00F200AE /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = "<group>"; };
422 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info_bar_bg@2x.png"; sourceTree = "<group>"; };
423 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_busy@2x.png"; sourceTree = "<group>"; };
424 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_flipped@2x.png"; sourceTree = "<group>"; };
375 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; };425 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; };
376 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };426 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
377 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };427 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -385,6 +435,7 @@
385 files = (435 files = (
386 27CEACF816358CC400DEDFD9 /* QuartzCore.framework in Frameworks */,436 27CEACF816358CC400DEDFD9 /* QuartzCore.framework in Frameworks */,
387 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,437 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
438 1152A77315313E58000D4E1A /* QuartzCore.framework in Frameworks */,
388 );439 );
389 runOnlyForDeploymentPostprocessing = 0;440 runOnlyForDeploymentPostprocessing = 0;
390 };441 };
@@ -453,6 +504,7 @@
453 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {504 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
454 isa = PBXGroup;505 isa = PBXGroup;
455 children = (506 children = (
507 1152A77215313E58000D4E1A /* QuartzCore.framework */,
456 0867D6A5FE840307C02AAC07 /* AppKit.framework */,508 0867D6A5FE840307C02AAC07 /* AppKit.framework */,
457 D2F7E79907B2D74100F64583 /* CoreData.framework */,509 D2F7E79907B2D74100F64583 /* CoreData.framework */,
458 0867D69BFE84028FC02AAC07 /* Foundation.framework */,510 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
@@ -472,6 +524,7 @@
472 2744E47D0FC1674E00E85C33 /* Lexers */ = {524 2744E47D0FC1674E00E85C33 /* Lexers */ = {
473 isa = PBXGroup;525 isa = PBXGroup;
474 children = (526 children = (
527<<<<<<< TREE
475 27CEACFA16358CFD00DEDFD9 /* LexAVS.cxx */,528 27CEACFA16358CFD00DEDFD9 /* LexAVS.cxx */,
476 27CEACFB16358CFD00DEDFD9 /* LexCoffeeScript.cxx */,529 27CEACFB16358CFD00DEDFD9 /* LexCoffeeScript.cxx */,
477 27CEACFC16358CFD00DEDFD9 /* LexECL.cxx */,530 27CEACFC16358CFD00DEDFD9 /* LexECL.cxx */,
@@ -480,6 +533,9 @@
480 27CEACFF16358CFD00DEDFD9 /* LexTCMD.cxx */,533 27CEACFF16358CFD00DEDFD9 /* LexTCMD.cxx */,
481 27CEAD0016358CFD00DEDFD9 /* LexVisualProlog.cxx */,534 27CEAD0016358CFD00DEDFD9 /* LexVisualProlog.cxx */,
482 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */,535 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */,
536=======
537 11126B8114CD3A6200803C49 /* LexAVS.cxx */,
538>>>>>>> MERGE-SOURCE
483 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */,539 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */,
484 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */,540 114B6EBE11FA7526004FB6AB /* LexAbaqus.cxx */,
485 114B6EBF11FA7526004FB6AB /* LexAda.cxx */,541 114B6EBF11FA7526004FB6AB /* LexAda.cxx */,
@@ -497,12 +553,15 @@
497 114B6ECB11FA7526004FB6AB /* LexCLW.cxx */,553 114B6ECB11FA7526004FB6AB /* LexCLW.cxx */,
498 114B6ECC11FA7526004FB6AB /* LexCmake.cxx */,554 114B6ECC11FA7526004FB6AB /* LexCmake.cxx */,
499 114B6ECD11FA7526004FB6AB /* LexCOBOL.cxx */,555 114B6ECD11FA7526004FB6AB /* LexCOBOL.cxx */,
556 11A0A8A0148602DF0018D143 /* LexCoffeeScript.cxx */,
500 114B6ECE11FA7526004FB6AB /* LexConf.cxx */,557 114B6ECE11FA7526004FB6AB /* LexConf.cxx */,
501 114B6ECF11FA7526004FB6AB /* LexCPP.cxx */,558 114B6ECF11FA7526004FB6AB /* LexCPP.cxx */,
502 114B6ED011FA7526004FB6AB /* LexCrontab.cxx */,559 114B6ED011FA7526004FB6AB /* LexCrontab.cxx */,
503 114B6ED111FA7526004FB6AB /* LexCsound.cxx */,560 114B6ED111FA7526004FB6AB /* LexCsound.cxx */,
504 114B6ED211FA7526004FB6AB /* LexCSS.cxx */,561 114B6ED211FA7526004FB6AB /* LexCSS.cxx */,
505 114B6ED311FA7526004FB6AB /* LexD.cxx */,562 114B6ED311FA7526004FB6AB /* LexD.cxx */,
563 11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */,
564 11BEB6A114EF189600BDE92A /* LexECL.cxx */,
506 114B6ED411FA7526004FB6AB /* LexEiffel.cxx */,565 114B6ED411FA7526004FB6AB /* LexEiffel.cxx */,
507 114B6ED511FA7526004FB6AB /* LexErlang.cxx */,566 114B6ED511FA7526004FB6AB /* LexErlang.cxx */,
508 114B6ED611FA7526004FB6AB /* LexEScript.cxx */,567 114B6ED611FA7526004FB6AB /* LexEScript.cxx */,
@@ -515,6 +574,8 @@
515 114B6EDD11FA7526004FB6AB /* LexHTML.cxx */,574 114B6EDD11FA7526004FB6AB /* LexHTML.cxx */,
516 114B6EDE11FA7526004FB6AB /* LexInno.cxx */,575 114B6EDE11FA7526004FB6AB /* LexInno.cxx */,
517 114B6EDF11FA7526004FB6AB /* LexKix.cxx */,576 114B6EDF11FA7526004FB6AB /* LexKix.cxx */,
577 11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */,
578 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */,
518 114B6EE011FA7526004FB6AB /* LexLisp.cxx */,579 114B6EE011FA7526004FB6AB /* LexLisp.cxx */,
519 114B6EE111FA7526004FB6AB /* LexLout.cxx */,580 114B6EE111FA7526004FB6AB /* LexLout.cxx */,
520 114B6EE211FA7526004FB6AB /* LexLua.cxx */,581 114B6EE211FA7526004FB6AB /* LexLua.cxx */,
@@ -523,17 +584,20 @@
523 114B6EE511FA7526004FB6AB /* LexMatlab.cxx */,584 114B6EE511FA7526004FB6AB /* LexMatlab.cxx */,
524 114B6EE611FA7526004FB6AB /* LexMetapost.cxx */,585 114B6EE611FA7526004FB6AB /* LexMetapost.cxx */,
525 114B6EE711FA7526004FB6AB /* LexMMIXAL.cxx */,586 114B6EE711FA7526004FB6AB /* LexMMIXAL.cxx */,
587 11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */,
526 114B6EE811FA7526004FB6AB /* LexMPT.cxx */,588 114B6EE811FA7526004FB6AB /* LexMPT.cxx */,
527 114B6EE911FA7526004FB6AB /* LexMSSQL.cxx */,589 114B6EE911FA7526004FB6AB /* LexMSSQL.cxx */,
528 114B6EEA11FA7526004FB6AB /* LexMySQL.cxx */,590 114B6EEA11FA7526004FB6AB /* LexMySQL.cxx */,
529 114B6EEB11FA7526004FB6AB /* LexNimrod.cxx */,591 114B6EEB11FA7526004FB6AB /* LexNimrod.cxx */,
530 114B6EEC11FA7526004FB6AB /* LexNsis.cxx */,592 114B6EEC11FA7526004FB6AB /* LexNsis.cxx */,
531 114B6EED11FA7526004FB6AB /* LexOpal.cxx */,593 114B6EED11FA7526004FB6AB /* LexOpal.cxx */,
594 11594BE7155B91DF0099E1FA /* LexOScript.cxx */,
532 114B6EEE11FA7526004FB6AB /* LexOthers.cxx */,595 114B6EEE11FA7526004FB6AB /* LexOthers.cxx */,
533 114B6EEF11FA7526004FB6AB /* LexPascal.cxx */,596 114B6EEF11FA7526004FB6AB /* LexPascal.cxx */,
534 114B6EF011FA7526004FB6AB /* LexPB.cxx */,597 114B6EF011FA7526004FB6AB /* LexPB.cxx */,
535 114B6EF111FA7526004FB6AB /* LexPerl.cxx */,598 114B6EF111FA7526004FB6AB /* LexPerl.cxx */,
536 114B6EF211FA7526004FB6AB /* LexPLM.cxx */,599 114B6EF211FA7526004FB6AB /* LexPLM.cxx */,
600 1114D6CA1602A951001DC345 /* LexPO.cxx */,
537 114B6EF311FA7526004FB6AB /* LexPOV.cxx */,601 114B6EF311FA7526004FB6AB /* LexPOV.cxx */,
538 114B6EF411FA7526004FB6AB /* LexPowerPro.cxx */,602 114B6EF411FA7526004FB6AB /* LexPowerPro.cxx */,
539 114B6EF511FA7526004FB6AB /* LexPowerShell.cxx */,603 114B6EF511FA7526004FB6AB /* LexPowerShell.cxx */,
@@ -543,6 +607,7 @@
543 114B6EF911FA7526004FB6AB /* LexR.cxx */,607 114B6EF911FA7526004FB6AB /* LexR.cxx */,
544 114B6EFA11FA7526004FB6AB /* LexRebol.cxx */,608 114B6EFA11FA7526004FB6AB /* LexRebol.cxx */,
545 114B6EFB11FA7526004FB6AB /* LexRuby.cxx */,609 114B6EFB11FA7526004FB6AB /* LexRuby.cxx */,
610 1160E0371803651C00BCEBCB /* LexRust.cxx */,
546 114B6EFC11FA7526004FB6AB /* LexScriptol.cxx */,611 114B6EFC11FA7526004FB6AB /* LexScriptol.cxx */,
547 114B6EFD11FA7526004FB6AB /* LexSmalltalk.cxx */,612 114B6EFD11FA7526004FB6AB /* LexSmalltalk.cxx */,
548 114B6EFE11FA7526004FB6AB /* LexSML.cxx */,613 114B6EFE11FA7526004FB6AB /* LexSML.cxx */,
@@ -550,15 +615,18 @@
550 114B6F0011FA7526004FB6AB /* LexSpecman.cxx */,615 114B6F0011FA7526004FB6AB /* LexSpecman.cxx */,
551 114B6F0111FA7526004FB6AB /* LexSpice.cxx */,616 114B6F0111FA7526004FB6AB /* LexSpice.cxx */,
552 114B6F0211FA7526004FB6AB /* LexSQL.cxx */,617 114B6F0211FA7526004FB6AB /* LexSQL.cxx */,
618 11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */,
553 114B6F0311FA7526004FB6AB /* LexTACL.cxx */,619 114B6F0311FA7526004FB6AB /* LexTACL.cxx */,
554 114B6F0411FA7526004FB6AB /* LexTADS3.cxx */,620 114B6F0411FA7526004FB6AB /* LexTADS3.cxx */,
555 114B6F0511FA7526004FB6AB /* LexTAL.cxx */,621 114B6F0511FA7526004FB6AB /* LexTAL.cxx */,
556 114B6F0611FA7526004FB6AB /* LexTCL.cxx */,622 114B6F0611FA7526004FB6AB /* LexTCL.cxx */,
623 117ACE9014A29A1E002876F9 /* LexTCMD.cxx */,
557 114B6F0711FA7526004FB6AB /* LexTeX.cxx */,624 114B6F0711FA7526004FB6AB /* LexTeX.cxx */,
558 114B6F0811FA7526004FB6AB /* LexTxt2tags.cxx */,625 114B6F0811FA7526004FB6AB /* LexTxt2tags.cxx */,
559 114B6F0911FA7526004FB6AB /* LexVB.cxx */,626 114B6F0911FA7526004FB6AB /* LexVB.cxx */,
560 114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */,627 114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */,
561 114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */,628 114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */,
629 11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */,
562 114B6F0C11FA7526004FB6AB /* LexYAML.cxx */,630 114B6F0C11FA7526004FB6AB /* LexYAML.cxx */,
563 );631 );
564 name = Lexers;632 name = Lexers;
@@ -568,20 +636,14 @@
568 isa = PBXGroup;636 isa = PBXGroup;
569 children = (637 children = (
570 114B6FD811FA7645004FB6AB /* Accessor.h */,638 114B6FD811FA7645004FB6AB /* Accessor.h */,
571 114B6FD911FA7645004FB6AB /* CharacterSet.h */,
572 114B6FDA11FA7645004FB6AB /* LexAccessor.h */,
573 114B6FDB11FA7645004FB6AB /* LexerBase.h */,
574 114B6FDC11FA7645004FB6AB /* LexerModule.h */,
575 114B6FDD11FA7645004FB6AB /* LexerNoExceptions.h */,
576 114B6FDE11FA7645004FB6AB /* LexerSimple.h */,
577 114B6FDF11FA7645004FB6AB /* OptionSet.h */,
578 114B6FE011FA7645004FB6AB /* PropSetSimple.h */,
579 114B6FE111FA7645004FB6AB /* StyleContext.h */,
580 114B6FE211FA7645004FB6AB /* WordList.h */,
581 114B6FA211FA7623004FB6AB /* AutoComplete.h */,639 114B6FA211FA7623004FB6AB /* AutoComplete.h */,
582 114B6FA311FA7623004FB6AB /* CallTip.h */,640 114B6FA311FA7623004FB6AB /* CallTip.h */,
641 1100F1E7178E393200105727 /* CaseConvert.h */,
642 1100F1E9178E393200105727 /* CaseFolder.h */,
583 114B6FA411FA7623004FB6AB /* Catalogue.h */,643 114B6FA411FA7623004FB6AB /* Catalogue.h */,
584 114B6FA511FA7623004FB6AB /* CellBuffer.h */,644 114B6FA511FA7623004FB6AB /* CellBuffer.h */,
645 11FBA39C17817DA00048C071 /* CharacterCategory.h */,
646 114B6FD911FA7645004FB6AB /* CharacterSet.h */,
585 114B6FA611FA7623004FB6AB /* CharClassify.h */,647 114B6FA611FA7623004FB6AB /* CharClassify.h */,
586 114B6FA711FA7623004FB6AB /* ContractionState.h */,648 114B6FA711FA7623004FB6AB /* ContractionState.h */,
587 114B6FA811FA7623004FB6AB /* Decoration.h */,649 114B6FA811FA7623004FB6AB /* Decoration.h */,
@@ -589,23 +651,35 @@
589 114B6FAA11FA7623004FB6AB /* Editor.h */,651 114B6FAA11FA7623004FB6AB /* Editor.h */,
590 114B6FAB11FA7623004FB6AB /* ExternalLexer.h */,652 114B6FAB11FA7623004FB6AB /* ExternalLexer.h */,
591 114B6FAC11FA7623004FB6AB /* FontQuality.h */,653 114B6FAC11FA7623004FB6AB /* FontQuality.h */,
654 114B6FA011FA75DB004FB6AB /* ILexer.h */,
592 114B6FAD11FA7623004FB6AB /* Indicator.h */,655 114B6FAD11FA7623004FB6AB /* Indicator.h */,
593 114B6FAE11FA7623004FB6AB /* KeyMap.h */,656 114B6FAE11FA7623004FB6AB /* KeyMap.h */,
657 114B6FDA11FA7645004FB6AB /* LexAccessor.h */,
658 114B6FDB11FA7645004FB6AB /* LexerBase.h */,
659 114B6FDC11FA7645004FB6AB /* LexerModule.h */,
660 114B6FDD11FA7645004FB6AB /* LexerNoExceptions.h */,
661 114B6FDE11FA7645004FB6AB /* LexerSimple.h */,
594 114B6FAF11FA7623004FB6AB /* LineMarker.h */,662 114B6FAF11FA7623004FB6AB /* LineMarker.h */,
663 114B6FDF11FA7645004FB6AB /* OptionSet.h */,
595 114B6FB011FA7623004FB6AB /* Partitioning.h */,664 114B6FB011FA7623004FB6AB /* Partitioning.h */,
596 114B6FB111FA7623004FB6AB /* PerLine.h */,665 114B6FB111FA7623004FB6AB /* PerLine.h */,
597 114B6FB211FA7623004FB6AB /* PositionCache.h */,666 114B6FB211FA7623004FB6AB /* PositionCache.h */,
667 114B6FE011FA7645004FB6AB /* PropSetSimple.h */,
598 114B6FB311FA7623004FB6AB /* RESearch.h */,668 114B6FB311FA7623004FB6AB /* RESearch.h */,
599 114B6FB411FA7623004FB6AB /* RunStyles.h */,669 114B6FB411FA7623004FB6AB /* RunStyles.h */,
600 114B6FB511FA7623004FB6AB /* ScintillaBase.h */,670 114B6FB511FA7623004FB6AB /* ScintillaBase.h */,
601 114B6FB611FA7623004FB6AB /* Selection.h */,671 114B6FB611FA7623004FB6AB /* Selection.h */,
672 280056F8188DDD2C00F200AE /* SparseState.h */,
602 114B6FB711FA7623004FB6AB /* SplitVector.h */,673 114B6FB711FA7623004FB6AB /* SplitVector.h */,
674 280056F9188DDD2C00F200AE /* StringCopy.h */,
603 114B6FB811FA7623004FB6AB /* Style.h */,675 114B6FB811FA7623004FB6AB /* Style.h */,
604 114B6FB911FA7623004FB6AB /* SVector.h */,676 114B6FE111FA7645004FB6AB /* StyleContext.h */,
677 280056FA188DDD2C00F200AE /* SubStyles.h */,
678 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */,
605 114B6FBA11FA7623004FB6AB /* UniConversion.h */,679 114B6FBA11FA7623004FB6AB /* UniConversion.h */,
606 114B6FBB11FA7623004FB6AB /* ViewStyle.h */,680 114B6FBB11FA7623004FB6AB /* ViewStyle.h */,
681 114B6FE211FA7645004FB6AB /* WordList.h */,
607 114B6FBC11FA7623004FB6AB /* XPM.h */,682 114B6FBC11FA7623004FB6AB /* XPM.h */,
608 114B6FA011FA75DB004FB6AB /* ILexer.h */,
609 );683 );
610 name = "Header Files";684 name = "Header Files";
611 sourceTree = "<group>";685 sourceTree = "<group>";
@@ -614,18 +688,14 @@
614 isa = PBXGroup;688 isa = PBXGroup;
615 children = (689 children = (
616 114B6F8E11FA75BE004FB6AB /* Accessor.cxx */,690 114B6F8E11FA75BE004FB6AB /* Accessor.cxx */,
617 114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */,
618 114B6F9011FA75BE004FB6AB /* LexerBase.cxx */,
619 114B6F9111FA75BE004FB6AB /* LexerModule.cxx */,
620 114B6F9211FA75BE004FB6AB /* LexerNoExceptions.cxx */,
621 114B6F9311FA75BE004FB6AB /* LexerSimple.cxx */,
622 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */,
623 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */,
624 114B6F9611FA75BE004FB6AB /* WordList.cxx */,
625 114B6F6011FA7597004FB6AB /* AutoComplete.cxx */,691 114B6F6011FA7597004FB6AB /* AutoComplete.cxx */,
626 114B6F6111FA7597004FB6AB /* CallTip.cxx */,692 114B6F6111FA7597004FB6AB /* CallTip.cxx */,
693 1100F1E6178E393200105727 /* CaseConvert.cxx */,
694 1100F1E8178E393200105727 /* CaseFolder.cxx */,
627 114B6F6211FA7597004FB6AB /* Catalogue.cxx */,695 114B6F6211FA7597004FB6AB /* Catalogue.cxx */,
628 114B6F6311FA7597004FB6AB /* CellBuffer.cxx */,696 114B6F6311FA7597004FB6AB /* CellBuffer.cxx */,
697 11FBA39B17817DA00048C071 /* CharacterCategory.cxx */,
698 114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */,
629 114B6F6411FA7597004FB6AB /* CharClassify.cxx */,699 114B6F6411FA7597004FB6AB /* CharClassify.cxx */,
630 114B6F6511FA7597004FB6AB /* ContractionState.cxx */,700 114B6F6511FA7597004FB6AB /* ContractionState.cxx */,
631 114B6F6611FA7597004FB6AB /* Decoration.cxx */,701 114B6F6611FA7597004FB6AB /* Decoration.cxx */,
@@ -634,16 +704,23 @@
634 114B6F6911FA7598004FB6AB /* ExternalLexer.cxx */,704 114B6F6911FA7598004FB6AB /* ExternalLexer.cxx */,
635 114B6F6A11FA7598004FB6AB /* Indicator.cxx */,705 114B6F6A11FA7598004FB6AB /* Indicator.cxx */,
636 114B6F6B11FA7598004FB6AB /* KeyMap.cxx */,706 114B6F6B11FA7598004FB6AB /* KeyMap.cxx */,
707 114B6F9011FA75BE004FB6AB /* LexerBase.cxx */,
708 114B6F9111FA75BE004FB6AB /* LexerModule.cxx */,
709 114B6F9211FA75BE004FB6AB /* LexerNoExceptions.cxx */,
710 114B6F9311FA75BE004FB6AB /* LexerSimple.cxx */,
637 114B6F6C11FA7598004FB6AB /* LineMarker.cxx */,711 114B6F6C11FA7598004FB6AB /* LineMarker.cxx */,
638 114B6F6D11FA7598004FB6AB /* PerLine.cxx */,712 114B6F6D11FA7598004FB6AB /* PerLine.cxx */,
639 114B6F6E11FA7598004FB6AB /* PositionCache.cxx */,713 114B6F6E11FA7598004FB6AB /* PositionCache.cxx */,
714 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */,
640 114B6F6F11FA7598004FB6AB /* RESearch.cxx */,715 114B6F6F11FA7598004FB6AB /* RESearch.cxx */,
641 114B6F7011FA7598004FB6AB /* RunStyles.cxx */,716 114B6F7011FA7598004FB6AB /* RunStyles.cxx */,
642 114B6F7111FA7598004FB6AB /* ScintillaBase.cxx */,717 114B6F7111FA7598004FB6AB /* ScintillaBase.cxx */,
643 114B6F7211FA7598004FB6AB /* Selection.cxx */,718 114B6F7211FA7598004FB6AB /* Selection.cxx */,
644 114B6F7311FA7598004FB6AB /* Style.cxx */,719 114B6F7311FA7598004FB6AB /* Style.cxx */,
720 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */,
645 114B6F7411FA7598004FB6AB /* UniConversion.cxx */,721 114B6F7411FA7598004FB6AB /* UniConversion.cxx */,
646 114B6F7511FA7598004FB6AB /* ViewStyle.cxx */,722 114B6F7511FA7598004FB6AB /* ViewStyle.cxx */,
723 114B6F9611FA75BE004FB6AB /* WordList.cxx */,
647 114B6F7611FA7598004FB6AB /* XPM.cxx */,724 114B6F7611FA7598004FB6AB /* XPM.cxx */,
648 );725 );
649 name = "Source Files";726 name = "Source Files";
@@ -681,6 +758,9 @@
681 27FEF4500FC1B413005E115A /* res */ = {758 27FEF4500FC1B413005E115A /* res */ = {
682 isa = PBXGroup;759 isa = PBXGroup;
683 children = (760 children = (
761 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */,
762 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */,
763 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */,
684 27FEF4510FC1B413005E115A /* info_bar_bg.png */,764 27FEF4510FC1B413005E115A /* info_bar_bg.png */,
685 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */,765 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */,
686 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */,766 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */,
@@ -712,6 +792,7 @@
712 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */,792 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */,
713 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */,793 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */,
714 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */,794 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */,
795 280056FB188DDD2C00F200AE /* SparseState.h in Headers */,
715 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */,796 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */,
716 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */,797 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */,
717 114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */,798 114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */,
@@ -734,11 +815,12 @@
734 114B6FCD11FA7623004FB6AB /* PositionCache.h in Headers */,815 114B6FCD11FA7623004FB6AB /* PositionCache.h in Headers */,
735 114B6FCE11FA7623004FB6AB /* RESearch.h in Headers */,816 114B6FCE11FA7623004FB6AB /* RESearch.h in Headers */,
736 114B6FCF11FA7623004FB6AB /* RunStyles.h in Headers */,817 114B6FCF11FA7623004FB6AB /* RunStyles.h in Headers */,
818 280056FD188DDD2C00F200AE /* SubStyles.h in Headers */,
737 114B6FD011FA7623004FB6AB /* ScintillaBase.h in Headers */,819 114B6FD011FA7623004FB6AB /* ScintillaBase.h in Headers */,
738 114B6FD111FA7623004FB6AB /* Selection.h in Headers */,820 114B6FD111FA7623004FB6AB /* Selection.h in Headers */,
739 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */,821 114B6FD211FA7623004FB6AB /* SplitVector.h in Headers */,
740 114B6FD311FA7623004FB6AB /* Style.h in Headers */,822 114B6FD311FA7623004FB6AB /* Style.h in Headers */,
741 114B6FD411FA7623004FB6AB /* SVector.h in Headers */,823 280056FC188DDD2C00F200AE /* StringCopy.h in Headers */,
742 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */,824 114B6FD511FA7623004FB6AB /* UniConversion.h in Headers */,
743 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */,825 114B6FD611FA7623004FB6AB /* ViewStyle.h in Headers */,
744 114B6FD711FA7623004FB6AB /* XPM.h in Headers */,826 114B6FD711FA7623004FB6AB /* XPM.h in Headers */,
@@ -754,6 +836,10 @@
754 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */,836 114B6FEC11FA7645004FB6AB /* StyleContext.h in Headers */,
755 114B6FED11FA7645004FB6AB /* WordList.h in Headers */,837 114B6FED11FA7645004FB6AB /* WordList.h in Headers */,
756 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */,838 119FF1BF13C9D1820007CE42 /* QuartzTextStyle.h in Headers */,
839 11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */,
840 1100F1EC178E393200105727 /* CaseConvert.h in Headers */,
841 1100F1EE178E393200105727 /* CaseFolder.h in Headers */,
842 1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */,
757 );843 );
758 runOnlyForDeploymentPostprocessing = 0;844 runOnlyForDeploymentPostprocessing = 0;
759 };845 };
@@ -785,7 +871,11 @@
785 0867D690FE84028FC02AAC07 /* Project object */ = {871 0867D690FE84028FC02AAC07 /* Project object */ = {
786 isa = PBXProject;872 isa = PBXProject;
787 attributes = {873 attributes = {
874<<<<<<< TREE
788 LastUpgradeCheck = 0440;875 LastUpgradeCheck = 0440;
876=======
877 LastUpgradeCheck = 0500;
878>>>>>>> MERGE-SOURCE
789 };879 };
790 buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */;880 buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */;
791 compatibilityVersion = "Xcode 3.2";881 compatibilityVersion = "Xcode 3.2";
@@ -814,8 +904,11 @@
814 files = (904 files = (
815 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,905 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
816 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */,906 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */,
907 28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */,
908 28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */,
817 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */,909 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */,
818 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */,910 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */,
911 28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */,
819 );912 );
820 runOnlyForDeploymentPostprocessing = 0;913 runOnlyForDeploymentPostprocessing = 0;
821 };914 };
@@ -943,6 +1036,7 @@
943 114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */,1036 114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */,
944 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */,1037 11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */,
945 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */,1038 11BB124D12FF9C1300F6BCF7 /* LexModula.cxx in Sources */,
1039<<<<<<< TREE
946 27CEAD0116358CFD00DEDFD9 /* LexAVS.cxx in Sources */,1040 27CEAD0116358CFD00DEDFD9 /* LexAVS.cxx in Sources */,
947 27CEAD0216358CFD00DEDFD9 /* LexCoffeeScript.cxx in Sources */,1041 27CEAD0216358CFD00DEDFD9 /* LexCoffeeScript.cxx in Sources */,
948 27CEAD0316358CFD00DEDFD9 /* LexECL.cxx in Sources */,1042 27CEAD0316358CFD00DEDFD9 /* LexECL.cxx in Sources */,
@@ -950,6 +1044,23 @@
950 27CEAD0516358CFD00DEDFD9 /* LexPO.cxx in Sources */,1044 27CEAD0516358CFD00DEDFD9 /* LexPO.cxx in Sources */,
951 27CEAD0616358CFD00DEDFD9 /* LexTCMD.cxx in Sources */,1045 27CEAD0616358CFD00DEDFD9 /* LexTCMD.cxx in Sources */,
952 27CEAD0716358CFD00DEDFD9 /* LexVisualProlog.cxx in Sources */,1046 27CEAD0716358CFD00DEDFD9 /* LexVisualProlog.cxx in Sources */,
1047=======
1048 11A0A8A1148602DF0018D143 /* LexCoffeeScript.cxx in Sources */,
1049 117ACE9114A29A1E002876F9 /* LexTCMD.cxx in Sources */,
1050 11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */,
1051 11BEB6A214EF189600BDE92A /* LexECL.cxx in Sources */,
1052 11594BE9155B91DF0099E1FA /* LexOScript.cxx in Sources */,
1053 11594BEA155B91DF0099E1FA /* LexVisualProlog.cxx in Sources */,
1054 1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */,
1055 1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */,
1056 11FDAEB7174E1A9800FA161B /* LexSTTXT.cxx in Sources */,
1057 11FBA39D17817DA00048C071 /* CharacterCategory.cxx in Sources */,
1058 1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */,
1059 1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */,
1060 11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */,
1061 1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */,
1062 11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */,
1063>>>>>>> MERGE-SOURCE
953 );1064 );
954 runOnlyForDeploymentPostprocessing = 0;1065 runOnlyForDeploymentPostprocessing = 0;
955 };1066 };
@@ -971,8 +1082,12 @@
971 isa = XCBuildConfiguration;1082 isa = XCBuildConfiguration;
972 buildSettings = {1083 buildSettings = {
973 ALWAYS_SEARCH_USER_PATHS = NO;1084 ALWAYS_SEARCH_USER_PATHS = NO;
1085<<<<<<< TREE
974 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";1086 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
975 COMBINE_HIDPI_IMAGES = YES;1087 COMBINE_HIDPI_IMAGES = YES;
1088=======
1089 COMBINE_HIDPI_IMAGES = YES;
1090>>>>>>> MERGE-SOURCE
976 COPY_PHASE_STRIP = NO;1091 COPY_PHASE_STRIP = NO;
977 DYLIB_COMPATIBILITY_VERSION = 1;1092 DYLIB_COMPATIBILITY_VERSION = 1;
978 DYLIB_CURRENT_VERSION = 1;1093 DYLIB_CURRENT_VERSION = 1;
@@ -987,7 +1102,10 @@
987 SCI_NAMESPACE,1102 SCI_NAMESPACE,
988 SCI_LEXER,1103 SCI_LEXER,
989 );1104 );
1105<<<<<<< TREE
990 GCC_VERSION = "";1106 GCC_VERSION = "";
1107=======
1108>>>>>>> MERGE-SOURCE
991 GCC_WARN_UNINITIALIZED_AUTOS = NO;1109 GCC_WARN_UNINITIALIZED_AUTOS = NO;
992 GCC_WARN_UNKNOWN_PRAGMAS = YES;1110 GCC_WARN_UNKNOWN_PRAGMAS = YES;
993 GCC_WARN_UNUSED_FUNCTION = YES;1111 GCC_WARN_UNUSED_FUNCTION = YES;
@@ -996,7 +1114,11 @@
996 INSTALL_PATH = "@executable_path/../Frameworks";1114 INSTALL_PATH = "@executable_path/../Frameworks";
997 MACOSX_DEPLOYMENT_TARGET = 10.5;1115 MACOSX_DEPLOYMENT_TARGET = 10.5;
998 PRODUCT_NAME = Scintilla;1116 PRODUCT_NAME = Scintilla;
1117<<<<<<< TREE
999 SDKROOT = "";1118 SDKROOT = "";
1119=======
1120 SKIP_INSTALL = YES;
1121>>>>>>> MERGE-SOURCE
1000 WRAPPER_EXTENSION = framework;1122 WRAPPER_EXTENSION = framework;
1001 };1123 };
1002 name = Debug;1124 name = Debug;
@@ -1005,8 +1127,12 @@
1005 isa = XCBuildConfiguration;1127 isa = XCBuildConfiguration;
1006 buildSettings = {1128 buildSettings = {
1007 ALWAYS_SEARCH_USER_PATHS = NO;1129 ALWAYS_SEARCH_USER_PATHS = NO;
1130<<<<<<< TREE
1008 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";1131 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
1009 COMBINE_HIDPI_IMAGES = YES;1132 COMBINE_HIDPI_IMAGES = YES;
1133=======
1134 COMBINE_HIDPI_IMAGES = YES;
1135>>>>>>> MERGE-SOURCE
1010 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";1136 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1011 DYLIB_COMPATIBILITY_VERSION = 1;1137 DYLIB_COMPATIBILITY_VERSION = 1;
1012 DYLIB_CURRENT_VERSION = 1;1138 DYLIB_CURRENT_VERSION = 1;
@@ -1018,8 +1144,12 @@
1018 SCI_NAMESPACE,1144 SCI_NAMESPACE,
1019 SCI_LEXER,1145 SCI_LEXER,
1020 );1146 );
1147<<<<<<< TREE
1021 GCC_VERSION = "";1148 GCC_VERSION = "";
1022 GCC_WARN_UNINITIALIZED_AUTOS = YES;1149 GCC_WARN_UNINITIALIZED_AUTOS = YES;
1150=======
1151 GCC_WARN_UNINITIALIZED_AUTOS = NO;
1152>>>>>>> MERGE-SOURCE
1023 GCC_WARN_UNKNOWN_PRAGMAS = YES;1153 GCC_WARN_UNKNOWN_PRAGMAS = YES;
1024 GCC_WARN_UNUSED_FUNCTION = YES;1154 GCC_WARN_UNUSED_FUNCTION = YES;
1025 GCC_WARN_UNUSED_LABEL = YES;1155 GCC_WARN_UNUSED_LABEL = YES;
@@ -1027,7 +1157,11 @@
1027 INSTALL_PATH = "@executable_path/../Frameworks";1157 INSTALL_PATH = "@executable_path/../Frameworks";
1028 MACOSX_DEPLOYMENT_TARGET = 10.5;1158 MACOSX_DEPLOYMENT_TARGET = 10.5;
1029 PRODUCT_NAME = Scintilla;1159 PRODUCT_NAME = Scintilla;
1160<<<<<<< TREE
1030 SDKROOT = "";1161 SDKROOT = "";
1162=======
1163 SKIP_INSTALL = YES;
1164>>>>>>> MERGE-SOURCE
1031 WRAPPER_EXTENSION = framework;1165 WRAPPER_EXTENSION = framework;
1032 };1166 };
1033 name = Release;1167 name = Release;
@@ -1035,7 +1169,8 @@
1035 1DEB91B208733DA50010E9CD /* Debug */ = {1169 1DEB91B208733DA50010E9CD /* Debug */ = {
1036 isa = XCBuildConfiguration;1170 isa = XCBuildConfiguration;
1037 buildSettings = {1171 buildSettings = {
1038 ARCHS = "$(ARCHS_STANDARD_32_BIT)";1172 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
1173 CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
1039 GCC_C_LANGUAGE_STANDARD = c99;1174 GCC_C_LANGUAGE_STANDARD = c99;
1040 GCC_OPTIMIZATION_LEVEL = 0;1175 GCC_OPTIMIZATION_LEVEL = 0;
1041 GCC_WARN_ABOUT_RETURN_TYPE = YES;1176 GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1045,15 +1180,22 @@
1045 ../../src,1180 ../../src,
1046 ../../lexlib,1181 ../../lexlib,
1047 );1182 );
1183<<<<<<< TREE
1048 MACOSX_DEPLOYMENT_TARGET = 10.5;1184 MACOSX_DEPLOYMENT_TARGET = 10.5;
1049 SKIP_INSTALL = YES;1185 SKIP_INSTALL = YES;
1186=======
1187 MACOSX_DEPLOYMENT_TARGET = 10.5;
1188 ONLY_ACTIVE_ARCH = YES;
1189 SDKROOT = macosx;
1190>>>>>>> MERGE-SOURCE
1050 };1191 };
1051 name = Debug;1192 name = Debug;
1052 };1193 };
1053 1DEB91B308733DA50010E9CD /* Release */ = {1194 1DEB91B308733DA50010E9CD /* Release */ = {
1054 isa = XCBuildConfiguration;1195 isa = XCBuildConfiguration;
1055 buildSettings = {1196 buildSettings = {
1056 ARCHS = "$(ARCHS_STANDARD_32_BIT)";1197 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
1198 CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
1057 GCC_C_LANGUAGE_STANDARD = c99;1199 GCC_C_LANGUAGE_STANDARD = c99;
1058 GCC_WARN_ABOUT_RETURN_TYPE = YES;1200 GCC_WARN_ABOUT_RETURN_TYPE = YES;
1059 GCC_WARN_UNUSED_VARIABLE = YES;1201 GCC_WARN_UNUSED_VARIABLE = YES;
@@ -1062,8 +1204,13 @@
1062 ../../src,1204 ../../src,
1063 ../../lexlib,1205 ../../lexlib,
1064 );1206 );
1207<<<<<<< TREE
1065 MACOSX_DEPLOYMENT_TARGET = 10.5;1208 MACOSX_DEPLOYMENT_TARGET = 10.5;
1066 SKIP_INSTALL = YES;1209 SKIP_INSTALL = YES;
1210=======
1211 MACOSX_DEPLOYMENT_TARGET = 10.5;
1212 SDKROOT = macosx;
1213>>>>>>> MERGE-SOURCE
1067 };1214 };
1068 name = Release;1215 name = Release;
1069 };1216 };
10701217
=== modified file 'cocoa/ScintillaTest/AppController.mm'
--- cocoa/ScintillaTest/AppController.mm 2012-10-26 08:56:06 +0000
+++ cocoa/ScintillaTest/AppController.mm 2014-01-24 04:00:28 +0000
@@ -261,6 +261,7 @@
261 matchCase: NO261 matchCase: NO
262 wholeWord: NO262 wholeWord: NO
263 scrollTo: YES263 scrollTo: YES
264<<<<<<< TREE
264 wrap: YES265 wrap: YES
265 backwards: NO];266 backwards: NO];
266267
@@ -268,10 +269,23 @@
268 long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];269 long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];
269 [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];270 [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];
270271
272=======
273 wrap: YES];
274
275 long matchStart = [mEditor getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0];
276 long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];
277 [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];
278
279>>>>>>> MERGE-SOURCE
271 if ([[searchField stringValue] isEqualToString: @"XX"])280 if ([[searchField stringValue] isEqualToString: @"XX"])
272 [self showAutocompletion];281 [self showAutocompletion];
273}282}
274283
284-(IBAction) setFontQuality: (id) sender
285{
286 [ScintillaView directCall:mEditor message:SCI_SETFONTQUALITY wParam:[sender tag] lParam:0];
287}
288
275@end289@end
276290
277//--------------------------------------------------------------------------------------------------291//--------------------------------------------------------------------------------------------------
278292
=== modified file 'cocoa/ScintillaTest/English.lproj/MainMenu.xib'
--- cocoa/ScintillaTest/English.lproj/MainMenu.xib 2010-05-09 16:49:06 +0000
+++ cocoa/ScintillaTest/English.lproj/MainMenu.xib 2014-01-24 04:00:28 +0000
@@ -856,6 +856,56 @@
856 </object>856 </object>
857 </object>857 </object>
858 </object>858 </object>
859 <object class="NSMenuItem" id="693549040">
860 <reference key="NSMenu" ref="786677654"/>
861 <string key="NSTitle">Font Quality</string>
862 <string key="NSKeyEquiv"/>
863 <int key="NSMnemonicLoc">2147483647</int>
864 <reference key="NSOnImage" ref="35465992"/>
865 <reference key="NSMixedImage" ref="502551668"/>
866 <string key="NSAction">submenuAction:</string>
867 <object class="NSMenu" key="NSSubmenu" id="129955363">
868 <string key="NSTitle">Font Quality</string>
869 <object class="NSMutableArray" key="NSMenuItems">
870 <bool key="EncodedWithXMLCoder">YES</bool>
871 <object class="NSMenuItem" id="746486634">
872 <reference key="NSMenu" ref="129955363"/>
873 <string key="NSTitle">Default</string>
874 <string key="NSKeyEquiv"/>
875 <int key="NSMnemonicLoc">2147483647</int>
876 <reference key="NSOnImage" ref="35465992"/>
877 <reference key="NSMixedImage" ref="502551668"/>
878 </object>
879 <object class="NSMenuItem" id="693037100">
880 <reference key="NSMenu" ref="129955363"/>
881 <string key="NSTitle">Non-antialiased</string>
882 <string key="NSKeyEquiv"/>
883 <int key="NSMnemonicLoc">2147483647</int>
884 <reference key="NSOnImage" ref="35465992"/>
885 <reference key="NSMixedImage" ref="502551668"/>
886 <int key="NSTag">1</int>
887 </object>
888 <object class="NSMenuItem" id="863119271">
889 <reference key="NSMenu" ref="129955363"/>
890 <string key="NSTitle">Antialiased</string>
891 <string key="NSKeyEquiv"/>
892 <int key="NSMnemonicLoc">2147483647</int>
893 <reference key="NSOnImage" ref="35465992"/>
894 <reference key="NSMixedImage" ref="502551668"/>
895 <int key="NSTag">2</int>
896 </object>
897 <object class="NSMenuItem" id="1060624593">
898 <reference key="NSMenu" ref="129955363"/>
899 <string key="NSTitle">LCD Optimized</string>
900 <string key="NSKeyEquiv"/>
901 <int key="NSMnemonicLoc">2147483647</int>
902 <reference key="NSOnImage" ref="35465992"/>
903 <reference key="NSMixedImage" ref="502551668"/>
904 <int key="NSTag">3</int>
905 </object>
906 </object>
907 </object>
908 </object>
859 <object class="NSMenuItem" id="739652853">909 <object class="NSMenuItem" id="739652853">
860 <reference key="NSMenu" ref="786677654"/>910 <reference key="NSMenu" ref="786677654"/>
861 <bool key="NSIsDisabled">YES</bool>911 <bool key="NSIsDisabled">YES</bool>
@@ -1833,6 +1883,38 @@
1833 </object>1883 </object>
1834 <int key="connectionID">468</int>1884 <int key="connectionID">468</int>
1835 </object>1885 </object>
1886 <object class="IBConnectionRecord">
1887 <object class="IBActionConnection" key="connection">
1888 <string key="label">setFontQuality:</string>
1889 <reference key="source" ref="229445039"/>
1890 <reference key="destination" ref="746486634"/>
1891 </object>
1892 <int key="connectionID">475</int>
1893 </object>
1894 <object class="IBConnectionRecord">
1895 <object class="IBActionConnection" key="connection">
1896 <string key="label">setFontQuality:</string>
1897 <reference key="source" ref="229445039"/>
1898 <reference key="destination" ref="693037100"/>
1899 </object>
1900 <int key="connectionID">476</int>
1901 </object>
1902 <object class="IBConnectionRecord">
1903 <object class="IBActionConnection" key="connection">
1904 <string key="label">setFontQuality:</string>
1905 <reference key="source" ref="229445039"/>
1906 <reference key="destination" ref="863119271"/>
1907 </object>
1908 <int key="connectionID">477</int>
1909 </object>
1910 <object class="IBConnectionRecord">
1911 <object class="IBActionConnection" key="connection">
1912 <string key="label">setFontQuality:</string>
1913 <reference key="source" ref="229445039"/>
1914 <reference key="destination" ref="1060624593"/>
1915 </object>
1916 <int key="connectionID">478</int>
1917 </object>
1836 </object>1918 </object>
1837 <object class="IBMutableOrderedSet" key="objectRecords">1919 <object class="IBMutableOrderedSet" key="objectRecords">
1838 <object class="NSArray" key="orderedObjects">1920 <object class="NSArray" key="orderedObjects">
@@ -2537,6 +2619,7 @@
2537 <reference ref="214559597"/>2619 <reference ref="214559597"/>
2538 <reference ref="596732606"/>2620 <reference ref="596732606"/>
2539 <reference ref="393423671"/>2621 <reference ref="393423671"/>
2622 <reference ref="693549040"/>
2540 </object>2623 </object>
2541 <reference key="parent" ref="792887677"/>2624 <reference key="parent" ref="792887677"/>
2542 </object>2625 </object>
@@ -2771,6 +2854,47 @@
2771 <reference key="object" ref="515024530"/>2854 <reference key="object" ref="515024530"/>
2772 <reference key="parent" ref="552917647"/>2855 <reference key="parent" ref="552917647"/>
2773 </object>2856 </object>
2857 <object class="IBObjectRecord">
2858 <int key="objectID">469</int>
2859 <reference key="object" ref="693549040"/>
2860 <object class="NSMutableArray" key="children">
2861 <bool key="EncodedWithXMLCoder">YES</bool>
2862 <reference ref="129955363"/>
2863 </object>
2864 <reference key="parent" ref="786677654"/>
2865 </object>
2866 <object class="IBObjectRecord">
2867 <int key="objectID">470</int>
2868 <reference key="object" ref="129955363"/>
2869 <object class="NSMutableArray" key="children">
2870 <bool key="EncodedWithXMLCoder">YES</bool>
2871 <reference ref="746486634"/>
2872 <reference ref="693037100"/>
2873 <reference ref="863119271"/>
2874 <reference ref="1060624593"/>
2875 </object>
2876 <reference key="parent" ref="693549040"/>
2877 </object>
2878 <object class="IBObjectRecord">
2879 <int key="objectID">471</int>
2880 <reference key="object" ref="746486634"/>
2881 <reference key="parent" ref="129955363"/>
2882 </object>
2883 <object class="IBObjectRecord">
2884 <int key="objectID">472</int>
2885 <reference key="object" ref="693037100"/>
2886 <reference key="parent" ref="129955363"/>
2887 </object>
2888 <object class="IBObjectRecord">
2889 <int key="objectID">473</int>
2890 <reference key="object" ref="863119271"/>
2891 <reference key="parent" ref="129955363"/>
2892 </object>
2893 <object class="IBObjectRecord">
2894 <int key="objectID">474</int>
2895 <reference key="object" ref="1060624593"/>
2896 <reference key="parent" ref="129955363"/>
2897 </object>
2774 </object>2898 </object>
2775 </object>2899 </object>
2776 <object class="NSMutableDictionary" key="flattenedProperties">2900 <object class="NSMutableDictionary" key="flattenedProperties">
27772901
=== modified file 'cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj'
--- cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj 2012-10-26 08:56:06 +0000
+++ cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj 2014-01-24 04:00:28 +0000
@@ -191,7 +191,11 @@
191 29B97313FDCFA39411CA2CEA /* Project object */ = {191 29B97313FDCFA39411CA2CEA /* Project object */ = {
192 isa = PBXProject;192 isa = PBXProject;
193 attributes = {193 attributes = {
194<<<<<<< TREE
194 LastUpgradeCheck = 0440;195 LastUpgradeCheck = 0440;
196=======
197 LastUpgradeCheck = 0450;
198>>>>>>> MERGE-SOURCE
195 };199 };
196 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;200 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
197 compatibilityVersion = "Xcode 3.2";201 compatibilityVersion = "Xcode 3.2";
@@ -304,6 +308,7 @@
304 LIBRARY_SEARCH_PATHS = "$(inherited)";308 LIBRARY_SEARCH_PATHS = "$(inherited)";
305 OTHER_LDFLAGS = "";309 OTHER_LDFLAGS = "";
306 PRODUCT_NAME = ScintillaTest;310 PRODUCT_NAME = ScintillaTest;
311 SDKROOT = macosx;
307 USER_HEADER_SEARCH_PATHS = "";312 USER_HEADER_SEARCH_PATHS = "";
308 };313 };
309 name = Debug;314 name = Debug;
@@ -330,6 +335,7 @@
330 ONLY_ACTIVE_ARCH = YES;335 ONLY_ACTIVE_ARCH = YES;
331 OTHER_LDFLAGS = "";336 OTHER_LDFLAGS = "";
332 PRODUCT_NAME = ScintillaTest;337 PRODUCT_NAME = ScintillaTest;
338 SDKROOT = macosx;
333 USER_HEADER_SEARCH_PATHS = "";339 USER_HEADER_SEARCH_PATHS = "";
334 };340 };
335 name = Release;341 name = Release;
@@ -340,12 +346,17 @@
340 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";346 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
341 GCC_C_LANGUAGE_STANDARD = c99;347 GCC_C_LANGUAGE_STANDARD = c99;
342 GCC_OPTIMIZATION_LEVEL = 0;348 GCC_OPTIMIZATION_LEVEL = 0;
349 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
343 GCC_WARN_ABOUT_RETURN_TYPE = YES;350 GCC_WARN_ABOUT_RETURN_TYPE = YES;
344 GCC_WARN_UNUSED_VARIABLE = YES;351 GCC_WARN_UNUSED_VARIABLE = YES;
345 MACOSX_DEPLOYMENT_TARGET = 10.5;352 MACOSX_DEPLOYMENT_TARGET = 10.5;
346 ONLY_ACTIVE_ARCH = YES;353 ONLY_ACTIVE_ARCH = YES;
347 OTHER_LDFLAGS = "";354 OTHER_LDFLAGS = "";
355<<<<<<< TREE
348 SDKROOT = "";356 SDKROOT = "";
357=======
358 SDKROOT = macosx;
359>>>>>>> MERGE-SOURCE
349 };360 };
350 name = Debug;361 name = Debug;
351 };362 };
@@ -354,12 +365,17 @@
354 buildSettings = {365 buildSettings = {
355 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";366 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
356 GCC_C_LANGUAGE_STANDARD = c99;367 GCC_C_LANGUAGE_STANDARD = c99;
368 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
357 GCC_WARN_ABOUT_RETURN_TYPE = YES;369 GCC_WARN_ABOUT_RETURN_TYPE = YES;
358 GCC_WARN_UNUSED_VARIABLE = YES;370 GCC_WARN_UNUSED_VARIABLE = YES;
359 MACOSX_DEPLOYMENT_TARGET = 10.5;371 MACOSX_DEPLOYMENT_TARGET = 10.5;
360 ONLY_ACTIVE_ARCH = YES;372 ONLY_ACTIVE_ARCH = YES;
361 OTHER_LDFLAGS = "";373 OTHER_LDFLAGS = "";
374<<<<<<< TREE
362 SDKROOT = "";375 SDKROOT = "";
376=======
377 SDKROOT = macosx;
378>>>>>>> MERGE-SOURCE
363 };379 };
364 name = Release;380 name = Release;
365 };381 };
366382
=== modified file 'cocoa/ScintillaView.h'
--- cocoa/ScintillaView.h 2013-01-21 11:10:24 +0000
+++ cocoa/ScintillaView.h 2014-01-24 04:00:28 +0000
@@ -11,15 +11,38 @@
1111
12#import <Cocoa/Cocoa.h>12#import <Cocoa/Cocoa.h>
1313
14#import "Platform.h"
15#import "Scintilla.h"14#import "Scintilla.h"
16#import "SciLexer.h"15#import "SciLexer.h"
1716
18#import "InfoBarCommunicator.h"17#import "InfoBarCommunicator.h"
19#import "ScintillaCocoa.h"18
19/**
20 * Scintilla sends these two messages to the notify handler. Please refer
21 * to the Windows API doc for details about the message format.
22 */
23#define WM_COMMAND 1001
24#define WM_NOTIFY 1002
25
26namespace Scintilla {
27/**
28 * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
29 * back to the parent. Therefore, there must be a callback handler that acts
30 * like a Windows WndProc, where Scintilla can send notifications to. Use
31 * ScintillaView registerNotifyCallback() to register such a handler.
32 * Message format is:
33 * <br>
34 * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = control ID, lParam = ScintillaCocoa*
35 * <br>
36 * WM_NOTIFY: wParam = control ID, lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*
37 */
38typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
39
40class ScintillaCocoa;
41}
2042
21@class ScintillaView;43@class ScintillaView;
2244
45<<<<<<< TREE
23extern NSString *SCIUpdateUINotification;46extern NSString *SCIUpdateUINotification;
2447
25@protocol ScintillaNotificationProtocol48@protocol ScintillaNotificationProtocol
@@ -28,9 +51,37 @@
2851
29/**52/**
30 * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and53 * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and
54=======
55extern NSString *const SCIUpdateUINotification;
56
57@protocol ScintillaNotificationProtocol
58- (void)notification: (Scintilla::SCNotification*)notification;
59@end
60
61/**
62 * SCIMarginView draws line numbers and other margins next to the text view.
63 */
64@interface SCIMarginView : NSRulerView
65{
66@private
67 int marginWidth;
68 ScintillaView *owner;
69 NSMutableArray *currentCursors;
70}
71
72@property (assign) int marginWidth;
73@property (assign) ScintillaView *owner;
74
75- (id)initWithScrollView:(NSScrollView *)aScrollView;
76
77@end
78
79/**
80 * SCIContentView is the Cocoa interface to the Scintilla backend. It handles text input and
81>>>>>>> MERGE-SOURCE
31 * provides a canvas for painting the output.82 * provides a canvas for painting the output.
32 */83 */
33@interface InnerView : NSView <NSTextInput>84@interface SCIContentView : NSView <NSTextInputClient, NSUserInterfaceValidations>
34{85{
35@private86@private
36 ScintillaView* mOwner;87 ScintillaView* mOwner;
@@ -42,28 +93,31 @@
42 BOOL undoCollectionWasActive;93 BOOL undoCollectionWasActive;
43}94}
4495
96<<<<<<< TREE
45@property (nonatomic, assign) ScintillaView* owner;97@property (nonatomic, assign) ScintillaView* owner;
4698
47- (void) dealloc;99- (void) dealloc;
100=======
101@property (nonatomic, assign) ScintillaView* owner;
102
103>>>>>>> MERGE-SOURCE
48- (void) removeMarkedText;104- (void) removeMarkedText;
49- (void) setCursor: (Scintilla::Window::Cursor) cursor;105- (void) setCursor: (int) cursor;
50106
51- (BOOL) canUndo;107- (BOOL) canUndo;
52- (BOOL) canRedo;108- (BOOL) canRedo;
53109
54@end110@end
55111
56@interface ScintillaView : NSView <InfoBarCommunicator>112@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol>
57{113{
58@private114@private
59 // The back end is kind of a controller and model in one.115 // The back end is kind of a controller and model in one.
60 // It uses the content view for display.116 // It uses the content view for display.
61 Scintilla::ScintillaCocoa* mBackend;117 Scintilla::ScintillaCocoa* mBackend;
62 118
63 // The object (eg NSDocument) that controls the ScintillaView.
64 NSObject* mOwner;
65
66 // This is the actual content to which the backend renders itself.119 // This is the actual content to which the backend renders itself.
120<<<<<<< TREE
67 InnerView* mContent;121 InnerView* mContent;
68 122
69 NSScroller* mHorizontalScroller;123 NSScroller* mHorizontalScroller;
@@ -71,20 +125,44 @@
71 125
72 CGFloat zoomDelta;126 CGFloat zoomDelta;
73 127
128=======
129 SCIContentView* mContent;
130
131 NSScrollView *scrollView;
132 SCIMarginView *marginView;
133
134 CGFloat zoomDelta;
135
136>>>>>>> MERGE-SOURCE
74 // Area to display additional controls (e.g. zoom info, caret position, status info).137 // Area to display additional controls (e.g. zoom info, caret position, status info).
75 NSView <InfoBarCommunicator>* mInfoBar;138 NSView <InfoBarCommunicator>* mInfoBar;
76 BOOL mInfoBarAtTop;139 BOOL mInfoBarAtTop;
140<<<<<<< TREE
77 int mInitialInfoBarWidth;141 int mInitialInfoBarWidth;
78142
79 id<ScintillaNotificationProtocol> mDelegate;143 id<ScintillaNotificationProtocol> mDelegate;
144=======
145
146 id<ScintillaNotificationProtocol> mDelegate;
147>>>>>>> MERGE-SOURCE
80}148}
81149
150<<<<<<< TREE
82@property (nonatomic, assign) Scintilla::ScintillaCocoa* backend;151@property (nonatomic, assign) Scintilla::ScintillaCocoa* backend;
83@property (nonatomic, assign) NSObject* owner;152@property (nonatomic, assign) NSObject* owner;
84@property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;153@property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;
85154
86- (void) dealloc;155- (void) dealloc;
87- (void) positionSubViews;156- (void) positionSubViews;
157=======
158@property (nonatomic, readonly) Scintilla::ScintillaCocoa* backend;
159@property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;
160@property (nonatomic, readonly) NSScrollView *scrollView;
161
162+ (Class) contentViewClass;
163
164- (void) positionSubViews;
165>>>>>>> MERGE-SOURCE
88166
89- (void) sendNotification: (NSString*) notificationName;167- (void) sendNotification: (NSString*) notificationName;
90- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location168- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
@@ -92,15 +170,13 @@
92- (void) setCallback: (id <InfoBarCommunicator>) callback;170- (void) setCallback: (id <InfoBarCommunicator>) callback;
93171
94- (void) suspendDrawing: (BOOL) suspend;172- (void) suspendDrawing: (BOOL) suspend;
173- (void) notification: (Scintilla::SCNotification*) notification;
95174
96// Scroller handling175// Scroller handling
97- (BOOL) setVerticalScrollRange: (int) range page: (int) page;176- (void) setMarginWidth: (int) width;
98- (void) setVerticalScrollPosition: (float) position;
99- (BOOL) setHorizontalScrollRange: (int) range page: (int) page;
100- (void) setHorizontalScrollPosition: (float) position;
101
102- (void) scrollerAction: (id) sender;177- (void) scrollerAction: (id) sender;
103- (InnerView*) content;178- (SCIContentView*) content;
179- (void) updateMarginCursors;
104180
105// NSTextView compatibility layer.181// NSTextView compatibility layer.
106- (NSString*) string;182- (NSString*) string;
@@ -120,6 +196,9 @@
120// Native call through to the backend.196// Native call through to the backend.
121+ (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam197+ (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam
122 lParam: (sptr_t) lParam;198 lParam: (sptr_t) lParam;
199- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam lParam: (sptr_t) lParam;
200- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam;
201- (sptr_t) message: (unsigned int) message;
123202
124// Back end properties getters and setters.203// Back end properties getters and setters.
125- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;204- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;
@@ -139,8 +218,14 @@
139- (void) setLexerProperty: (NSString*) name value: (NSString*) value;218- (void) setLexerProperty: (NSString*) name value: (NSString*) value;
140- (NSString*) getLexerProperty: (NSString*) name;219- (NSString*) getLexerProperty: (NSString*) name;
141220
142- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback;221<<<<<<< TREE
143222- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback;
223
224=======
225// The delegate property should be used instead of registerNotifyCallback which will be deprecated.
226- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback;
227
228>>>>>>> MERGE-SOURCE
144- (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;229- (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;
145- (void) setStatusText: (NSString*) text;230- (void) setStatusText: (NSString*) text;
146231
147232
=== modified file 'cocoa/ScintillaView.mm'
--- cocoa/ScintillaView.mm 2013-01-21 11:10:24 +0000
+++ cocoa/ScintillaView.mm 2014-01-24 04:00:28 +0000
@@ -9,7 +9,9 @@
9 * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).9 * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
10 */10 */
1111
12#import "Platform.h"
12#import "ScintillaView.h"13#import "ScintillaView.h"
14#import "ScintillaCocoa.h"
1315
14using namespace Scintilla;16using namespace Scintilla;
1517
@@ -20,29 +22,162 @@
20// The scintilla indicator used for keyboard input.22// The scintilla indicator used for keyboard input.
21#define INPUT_INDICATOR INDIC_MAX - 123#define INPUT_INDICATOR INDIC_MAX - 1
2224
25<<<<<<< TREE
23NSString *SCIUpdateUINotification = @"SCIUpdateUI";26NSString *SCIUpdateUINotification = @"SCIUpdateUI";
2427
25@implementation InnerView28@implementation InnerView
29=======
30NSString *const SCIUpdateUINotification = @"SCIUpdateUI";
31
32/**
33 * Provide an NSCursor object that matches the Window::Cursor enumeration.
34 */
35static NSCursor *cursorFromEnum(Window::Cursor cursor)
36{
37 switch (cursor)
38 {
39 case Window::cursorText:
40 return [NSCursor IBeamCursor];
41 case Window::cursorArrow:
42 return [NSCursor arrowCursor];
43 case Window::cursorWait:
44 return waitCursor;
45 case Window::cursorHoriz:
46 return [NSCursor resizeLeftRightCursor];
47 case Window::cursorVert:
48 return [NSCursor resizeUpDownCursor];
49 case Window::cursorReverseArrow:
50 return reverseArrowCursor;
51 case Window::cursorUp:
52 default:
53 return [NSCursor arrowCursor];
54 }
55}
56
57
58@implementation SCIMarginView
59
60@synthesize marginWidth, owner;
61
62- (id)initWithScrollView:(NSScrollView *)aScrollView
63{
64 self = [super initWithScrollView:aScrollView orientation:NSVerticalRuler];
65 if (self != nil)
66 {
67 owner = nil;
68 marginWidth = 20;
69 currentCursors = [[NSMutableArray arrayWithCapacity:0] retain];
70 for (size_t i=0; i<5; i++)
71 {
72 [currentCursors addObject: [reverseArrowCursor retain]];
73 }
74 [self setClientView:[aScrollView documentView]];
75 }
76 return self;
77}
78
79- (void) dealloc
80{
81 [currentCursors release];
82 [super dealloc];
83}
84
85- (void) setFrame: (NSRect) frame
86{
87 [super setFrame: frame];
88
89 [[self window] invalidateCursorRectsForView: self];
90}
91
92- (CGFloat)requiredThickness
93{
94 return marginWidth;
95}
96
97- (void)drawHashMarksAndLabelsInRect:(NSRect)aRect
98{
99 if (owner) {
100 NSRect contentRect = [[[self scrollView] contentView] bounds];
101 NSRect marginRect = [self bounds];
102 // Ensure paint to bottom of view to avoid glitches
103 if (marginRect.size.height > contentRect.size.height) {
104 // Legacy scroll bar mode leaves a poorly painted corner
105 aRect = marginRect;
106 }
107 owner.backend->PaintMargin(aRect);
108 }
109}
110
111- (void) mouseDown: (NSEvent *) theEvent
112{
113 NSClipView *textView = [[self scrollView] contentView];
114 [[textView window] makeFirstResponder:textView];
115 owner.backend->MouseDown(theEvent);
116}
117
118- (void) mouseDragged: (NSEvent *) theEvent
119{
120 owner.backend->MouseMove(theEvent);
121}
122
123- (void) mouseMoved: (NSEvent *) theEvent
124{
125 owner.backend->MouseMove(theEvent);
126}
127
128- (void) mouseUp: (NSEvent *) theEvent
129{
130 owner.backend->MouseUp(theEvent);
131}
132
133/**
134 * This method is called to give us the opportunity to define our mouse sensitive rectangle.
135 */
136- (void) resetCursorRects
137{
138 [super resetCursorRects];
139
140 int x = 0;
141 NSRect marginRect = [self bounds];
142 size_t co = [currentCursors count];
143 for (size_t i=0; i<co; i++)
144 {
145 int cursType = owner.backend->WndProc(SCI_GETMARGINCURSORN, i, 0);
146 int width =owner.backend->WndProc(SCI_GETMARGINWIDTHN, i, 0);
147 NSCursor *cc = cursorFromEnum(static_cast<Window::Cursor>(cursType));
148 [currentCursors replaceObjectAtIndex:i withObject: cc];
149 marginRect.origin.x = x;
150 marginRect.size.width = width;
151 [self addCursorRect: marginRect cursor: cc];
152 [cc setOnMouseEntered: YES];
153 x += width;
154 }
155}
156
157@end
158
159@implementation SCIContentView
160>>>>>>> MERGE-SOURCE
26161
27@synthesize owner = mOwner;162@synthesize owner = mOwner;
28163
29//--------------------------------------------------------------------------------------------------164//--------------------------------------------------------------------------------------------------
30165
31- (NSView*) initWithFrame: (NSRect) frame 166- (NSView*) initWithFrame: (NSRect) frame
32{167{
33 self = [super initWithFrame: frame];168 self = [super initWithFrame: frame];
34 169
35 if (self != nil)170 if (self != nil)
36 {171 {
37 // Some initialization for our view.172 // Some initialization for our view.
38 mCurrentCursor = [[NSCursor arrowCursor] retain];173 mCurrentCursor = [[NSCursor arrowCursor] retain];
39 mCurrentTrackingRect = 0;174 mCurrentTrackingRect = 0;
40 mMarkedTextRange = NSMakeRange(NSNotFound, 0);175 mMarkedTextRange = NSMakeRange(NSNotFound, 0);
41 176
42 [self registerForDraggedTypes: [NSArray arrayWithObjects:177 [self registerForDraggedTypes: [NSArray arrayWithObjects:
43 NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]];178 NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]];
44 }179 }
45 180
46 return self;181 return self;
47}182}
48183
@@ -70,39 +205,16 @@
70/**205/**
71 * Called by the backend if a new cursor must be set for the view.206 * Called by the backend if a new cursor must be set for the view.
72 */207 */
73- (void) setCursor: (Window::Cursor) cursor208- (void) setCursor: (int) cursor
74{209{
210 Window::Cursor eCursor = (Window::Cursor)cursor;
75 [mCurrentCursor autorelease];211 [mCurrentCursor autorelease];
76 switch (cursor)212 mCurrentCursor = cursorFromEnum(eCursor);
77 {
78 case Window::cursorText:
79 mCurrentCursor = [NSCursor IBeamCursor];
80 break;
81 case Window::cursorArrow:
82 mCurrentCursor = [NSCursor arrowCursor];
83 break;
84 case Window::cursorWait:
85 mCurrentCursor = waitCursor;
86 break;
87 case Window::cursorHoriz:
88 mCurrentCursor = [NSCursor resizeLeftRightCursor];
89 break;
90 case Window::cursorVert:
91 mCurrentCursor = [NSCursor resizeUpDownCursor];
92 break;
93 case Window::cursorReverseArrow:
94 mCurrentCursor = reverseArrowCursor;
95 break;
96 case Window::cursorUp:
97 default:
98 mCurrentCursor = [NSCursor arrowCursor];
99 break;
100 }
101
102 [mCurrentCursor retain];213 [mCurrentCursor retain];
103 214
104 // Trigger recreation of the cursor rectangle(s).215 // Trigger recreation of the cursor rectangle(s).
105 [[self window] invalidateCursorRectsForView: self];216 [[self window] invalidateCursorRectsForView: self];
217 [mOwner updateMarginCursors];
106}218}
107219
108//--------------------------------------------------------------------------------------------------220//--------------------------------------------------------------------------------------------------
@@ -113,7 +225,7 @@
113- (void) resetCursorRects225- (void) resetCursorRects
114{226{
115 [super resetCursorRects];227 [super resetCursorRects];
116 228
117 // We only have one cursor rect: our bounds.229 // We only have one cursor rect: our bounds.
118 [self addCursorRect: [self bounds] cursor: mCurrentCursor];230 [self addCursorRect: [self bounds] cursor: mCurrentCursor];
119 [mCurrentCursor setOnMouseEntered: YES];231 [mCurrentCursor setOnMouseEntered: YES];
@@ -127,17 +239,26 @@
127- (void) drawRect: (NSRect) rect239- (void) drawRect: (NSRect) rect
128{240{
129 CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];241 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: