Upgrade scintilla to version 3.10.6 and drop separate scintillua library

This commit is contained in:
Jason Haslam 2019-08-27 17:39:15 -06:00
parent 1f9a02cfc4
commit 6beb9958f7
817 changed files with 113568 additions and 53052 deletions

View File

@ -1,4 +1,5 @@
find_package(PkgConfig)
add_subdirectory(openssl)
add_subdirectory(libssh2)
add_subdirectory(libgit2)
@ -7,6 +8,5 @@ add_subdirectory(cmark)
add_subdirectory(lua)
add_subdirectory(lpeg)
add_subdirectory(scintilla)
add_subdirectory(scintillua)
add_subdirectory(git)

View File

@ -1,4 +1,4 @@
set(SCINTILLA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/scintilla-3.6.0)
set(SCINTILLA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/scintilla-3.10.6)
add_library(scintilla
${SCINTILLA_DIR}/src/AutoComplete.cxx
@ -27,6 +27,7 @@ add_library(scintilla
${SCINTILLA_DIR}/src/Selection.cxx
${SCINTILLA_DIR}/src/Style.cxx
${SCINTILLA_DIR}/src/UniConversion.cxx
${SCINTILLA_DIR}/src/UniqueString.cxx
${SCINTILLA_DIR}/src/ViewStyle.cxx
${SCINTILLA_DIR}/src/XPM.cxx
${SCINTILLA_DIR}/lexlib/Accessor.cxx
@ -61,3 +62,5 @@ target_link_libraries(scintilla
set_target_properties(scintilla PROPERTIES
AUTOMOC ON
)
set(SCINTILLUA_LEXERS_DIR ${SCINTILLA_DIR}/lexlua CACHE INTERNAL "")

View File

@ -0,0 +1,5 @@
repo: bdf8c3ef2fb01ea24578e726337888e706d10b92
node: ff65f37949a5b59e8893843549dba045639d361a
branch: LongTerm3
latesttag: rel-3-10-6
latesttagdistance: 1

View File

@ -22,8 +22,10 @@
**.vb = native
**.d = native
**.lua = native
**.rb = native
**.nim = native
**.pl = native
**.rb = native
**.tcl = native
**.txt = native
**.pch = native
**.hgeol = native

View File

@ -1,16 +1,20 @@
syntax: glob
*.o
*.a
*.asm
*.lib
*.obj
*.iobj
*.pyc
*.dll
*.dylib
*.framework
*.pyd
*.exe
*.exp
*.lib
*.pdb
*.ipdb
*.res
*.bak
*.sbr
@ -34,9 +38,8 @@ win32/*.plist
*.pbproj
*.log
*.xcbkptlist
*.xcscheme
*.xcworkspacedata
*.xcuserstate
xcuserdata/
*.xcsettings
xcschememanagement.plist
.DS_Store
@ -51,6 +54,7 @@ Makefile.Release
*_resource.rc
moc_*
*.pro.user
.qmake.stash
ScintillaEdit.cpp
ScintillaEdit.h
ScintillaConstants.py
@ -58,3 +62,9 @@ ScintillaEditBase.intermediate.manifest
ScintillaEdit.intermediate.manifest
qt/*/Makefile
cov-int
.vs
meson-private
meson-logs
build.ninja
.ninja*
compile_commands.json

View File

@ -112,3 +112,34 @@ a797ff255bdf2085f0475b9202527da6a16d507a rel-3-5-2
dea417bad80a9225d72b4f839ab04b1f7ffd936f rel-3-5-5
e9bfc7a0cb83a972e8bfa5dbaa8aabd359549b57 rel-3-5-6
49ce1d4c2dea737f1e4c92858921dd403a61cb20 rel-3-5-7
87a4e0fa293ec1dc47d9d4d4288a139a5e240c6f rel-3-6-0
59165fbb6b9d51efae82d13ce1c4471310b90bde rel-3-6-1
d906ba5d62cbb79a3b25d29aa4dae3f3d1fdf22a rel-3-6-2
e575024931f89fbc70e06d1faaf73a2e8721a2da rel-3-6-3
d2d4928e3e6a3e79ed7dbfd949968d5fc9818424 rel-3-6-4
afd67be6f0b141ba23be25ea1f472258bb4d976f rel-3-6-5
bfdfb44eb77717778c7a3ac2c3726903e66c81b8 rel-3-6-6
f9ff5b9b1a485d742fb7bfae14ba323a3f990663 rel-3-6-7
13cdacbbe2515620b0f582c4c274b17cae06180c rel-3-7-0
a7dfda6c85859a9aa9f5c4ae43af005d3b7ce5fb rel-3-7-1
e02540a3097449da69003d37c116c9b2104e3448 rel-3-7-2
e99b1a2bfbf808a12ec988bcab2121b6c4cbb556 rel-3-7-3
535c34f64993f3ef7367e773950e22a37d2475be rel-3-7-4
535c34f64993f3ef7367e773950e22a37d2475be rel-3-7-4
0000000000000000000000000000000000000000 rel-3-7-4
0000000000000000000000000000000000000000 rel-3-7-4
ddcae5344fa5390b352c1075d01e95379e145b43 rel-3-7-4
7c0d4e81e9388f87a648208b834f58516797be31 rel-3-7-5
c534665d5d3434bef08e400a93bfc5db8bb2d548 rel-3-7-6
c534665d5d3434bef08e400a93bfc5db8bb2d548 rel-3-7-6
0000000000000000000000000000000000000000 rel-3-7-6
0000000000000000000000000000000000000000 rel-3-7-6
caeb7b0e4db6d0ec81f1aaa78853eca6425257ed rel-3-7-6
7c78091d5d6c1cc51b7633f6ef2ba5a4fb8ed3de rel-3-8-0
68325956b46762053a471358508f2a4614aceb48 rel-3-10-0
28b920189a7c81ef935c12793427cccbea313bb8 rel-3-10-1
8b888bf05fe312a60fd249dcfa824744547c5dde rel-3-10-2
233bf37d3bec6467ca3c81ad27129a5dffb28d42 rel-3-10-3
0c0ea9d3c2df26a5f363250897885ab9d59613e3 rel-3-10-4
59cfb7d5c8eed0f3498e982a92993801e7d28546 rel-3-10-5
08973e00da9c1ed614516675e9f56c384483befa rel-3-10-6

View File

@ -0,0 +1,472 @@
Overview
========
The LongTerm3 branch gets nearly all of its updates from default via
backporting. The process is simple:
hg update LongTerm3
hg graft -e [changeset]
This grafts (or cherry-picks) [changeset] from default into LongTerm3. The '-e'
option allows for editing the commit message. Backported commit messages usually
have the form:
Backport: [original commit message]
Backport of [revision]:[changeset].
Any backport-specific additions, modifications, or deletions from the original
changeset should be mentioned in the new message.
Note: the '-e' option also gives you a chance to compile and/or test any adverse
effects produced by the graft prior to commit. Any changes made to files before
committing will reflect in the final graft.
In order to back out of a graft:
hg rollback
hg revert --all [--no-backup]
This can only be done ONCE, and affects the most recent graft, so make sure you
test any questionable grafts first before attempting another one.
Testing Backports
=================
Backporting a change is one thing, but ensuring the backport was successful is
another. Currently, the measure of "success" is whether Scintilla compiles on
all platforms after a backported change. This process can be automated using hg
hooks and the "check.mak" makefile. By adding the following to .hg/hgrc:
[hooks]
pretxncommit.adddeps = test -z "`hg status | grep '^A' | grep '\.\(h\|cxx\)$'`" || make -f check.mak deps
pretxncommit.compile = make -f check.mak
whenever a backported change is about to be committed, hg runs "check.mak",
which attempts to compile Scintilla on all platforms. If successful, the commit
is made. Otherwise, the commit fails and changes must be made before attempting
to commit again.
The file "check.mak" is designed to run on a Linux machine that has
cross-compilers for Win32 and Mac OSX. It does not necessarily produce any
binary builds of Scintilla that can be used -- it just ensures Scintilla can be
built without compile errors. How to obtain a set of cross-compilers is beyond
the scope of this document. At the time of writing, GCC 5.4 is used exclusively.
Not only does "check.mak" perform platform compile checks, but it also has rules
for manually running Scintilla's unit tests (which take too long to run
automatically as a pre-commit hook), creating a LongTerm3 release archive set,
and uploading documentation to the LongTerm3 website on SourceForge:
make test
make zip
make upload
The last rule requires user credentials.
Backport Status
===============
This section mentions all upstream changesets that have either NOT been
backported, beginning at 6289:4c1084a571ff (Starting 3.x long term maintenance
branch), or have information worth noting.
6290:2378244bf3c7 Converted to Automatic Reference Counting.
6291:31466630bccc Using instancetype for constructors.
6292:7f58802368f4 Using modern Objective C literals and indexing.
6294:e1301b1d2321 Use property dot syntax.
6295:57988f82bf71 Indented consistently by using astyle.
Cocoa platform only.
None of these are backported since I am unsure if they are supported in C++11.
Despite finding references to ARC and some Modern Objective-C dating back to
2013ish, I also see that Clang 4.0 introduced support for some of this.
However, Clang 4.0 was released in early 2017.
6304:b6cf154fe8d0 SciTE change log.
Not backported, as this applies only to SciTE.
6309:2d4cb83e9297 Back down from gnu++17 to gnu++14 so can build with g++ on current Ubuntu.
Not backported since only C++11 is supported.
6317:0f15d772bceb SciTE change log.
6319:a3b66b2525e7 SciTE change log.
Not backported, as these apply only to SciTE.
6328:3c87cf6d2599 Update IDocument for version 4. Drop IDocumentWithLineEnd interface to just have IDocument but with all the methods from IDocumentWithLineEnd. This removes version checking (for now). Use dvRelease4 ID. Drop mask argument to StartStyling.
Not backported since IDocument and ILexer interfaces should not change once
published according to Neil. Since the only substantial change is changing the
StartStyling() API, it does not seem worth creating a new IDocument4
interface with an option mask argument. It would likely cause compiler issues
too.
6329:6468941ee017 Updated documentation to match changes to IDocument and ILexer.
Not backported since IDocument has not been changed.
It may be worth committed a modification of the first diff though, if 3.8.0
ends up using 64-bit types for Sci_Position and Sci_PositionU.
6330:59f341b22087 Deprecate single phase drawing.
6333:320418de6275 Clean whitespace.
Not backported since the curses platform relies on single-phase drawing for
now.
6345:faecbd0078e5 Merge Ilexer and ILexerWithSubStyles into ILexer4 to avoid need for version checking in 4.0. Use lvRelease4 ID.
Partially backported with 6346:72bd27f81477 minus ILexer4, since the ILexer4
interface being added cannot co-exist with the existing ILexer interface.
(LexerModule.h uses a single typedef.)
6357:96232b746342 SciTE change log.
6361:69fddf8f8a15 SciTE changelog.
Not backported, as these apply only to SciTE.
6372:cae69b34b92e Preparing for the 4.0.0 release.
6374:ec8e68de4ddb Delaying a day due to change with Lua in SciTE.
6375:4aaf170db91a Added tag rel-4-0-0 for changeset ec8e68de4ddb
Not backported, since this is LongTerm3.
6394:dae03efac67d Update Xcode project files automatically for Xcode 9.
Not backported, since Xcode 9 was released in late 2017.
6403:bd5c44cb0ab8 Updates for 4.0.1 release.
6404:e04bd73927ea Added tag rel-4-0-1 for changeset bd5c44cb0ab8
Not backported, since this is LongTerm3.
6407:f60756d22ff3 Fix bad formatting.
Not backported, as the bad formatting was not merged into the previous
backport.
6409:c6a13f6eac24 Disable the animated find indicator on macOS 10.13 where it fails.
6410:29e81816b889 Change log.
Not backported, since macOS 10.13 was released late 2017 and
NSAppKitVersionNumber10_12_2 is probably not defined on earlier macOSs. I
cannot find a good way to #ifdef around it.
6411:96becb885ce4 Updates for 4.0.2.
6412:ad210d76378f Added tag rel-4-0-2 for changeset 96becb885ce4
6417:f78045efae20 Add section for 4.0.3 and move posr-4.0.2 items into it.
Not backported, since this is LongTerm3.
6425:73343682cbda Start of bidirectional code - implement SCI_SETBIDIRECTIONAL.
6426:0f7f5a382dbb Add ENABLE_BIDIRECTIONAL option to make files.
Not backported, since it is unknown whether or not this feature will have any
C++14 or C++17 features in it.
6432:b25c127aa6c5 Ensure build allows C++17. ARC setting is matching same setting at different scope so no effect.
6433:231ac99e1fdc Allow C++17 in all build and project files.
6435:5dd1b26df75f Replace Sci::clamp with C++ standard std::clamp function. std::clamp is from C++17.
Not backported, since only C++11 is supported.
6438:f635874b303b SciTE changelog.
6439:0e036d7fa960 SciTE changelog.
Not backported, as these apply only to SciTE.
6440:a1731ae83d2a Disable animated find indicator on macOS 10.12 as it causes drawing failures.
Not backported, since macOS 10.13 was released late 2017 and
NSAppKitVersionNumber10_12_2 is probably not defined on earlier macOSs. I
cannot find a good way to #ifdef around it.
6446:f7abec3bbc7a SciTE change log.
6447:44ff2195a202 SciTE change log.
Not backported, as these apply only to SciTE.
6450:7295a806b4c4 Updating for 4.0.3.
Not backported, since this is LongTerm3.
6452:1bf8b7c50995 Update Cocoa test app to Xcode 9.2 settings.
Not backported, since Xcode 9 was released in late 2017.
6453:71a51a9a6048 Added tag rel-4-0-3 for changeset 1bf8b7c50995
Not backported, since this is LongTerm3.
6454:c25d3cb37f7d SciTE change log.
6455:b9e278677527 SciTE changelog.
6459:0aef625a6ab0 SciTE changelog.
Not backported, as these apply only to SciTE.
6460:b4500f60b593 Added string_view to order.
Not backported, since only C++11 is supported.
6464:fe5f45df61ce SciTE change log.
Not backported, as this applies only to SciTE.
6465:cdfd8b285278 Update to c++17 so make_unique is available.
6476:59bafd0d2f77 Updated requied compiler versions.
Not backported, since only C++11 is supported.
6632:8399b7723701 Change standard flag on MacOS as Xcode clang doesn't yet like c++17.
Not backported, since only C++11 is supported.
6643:ebbb4e5aaf93 Update unit test Visual C++ builds to Visual C++ 2017 with /std:c++latest.
Not backported, since only C++11 is supported.
6661:d03cd726962c New Xcode 9.3 so ran the updater which turned on some warnings and it fiddled with the projects and schemes.
6662:3c001296c0a4 Reverted #6488 as Xcode clang 9.1 now likes --std=c++17.
6664:0f1db0d9a0a6 Standardize on --std=c++17, avoiding GNU extensions and enabling clang 6.0.
6666:9561714c303b Updated due to allowing C++17 code now.
Not backported, since only C++11 is supported.
6676:d48bdae67b33 Updates for 4.0.4.
6678:95fdb4c19b33 Added tag rel-4-0-4 for changeset d48bdae67b33
Not backported, since this is LongTerm3.
6680:0161abb24da4 Bug [#2008]. Avoid warning unsigned >= 0.
Not backported, since it is unknown whether or not this feature will have any
C++14 or C++17 features in it.
6689:41dbff5a4813 Make method const as it is just a reader.
Not backported, since return value depends on interface, which is different
from single interface in 4.x.
6746:61e16d5c73cf Change log for SciTE for macOS.
6749:85d99f7c5c6d SciTE change log.
6757:56a46ce2e0b4 SciTE change log.
6779:d5508bacbfd4 SciTE change log.
Not backported, as these apply only to SciTE.
6786:68c8592fe333 Specify type of std::clamp to avoid casting arguments.
Not backported, since std::clamp is C++17 and Sci::clamp is not typed.
6922:d97cb73c8da7 SciTE change log.
Not backported, as this applies only to SciTE.
6924:b9ab83221b03 Updates for 4.0.5.
6931:87dc832e3c94 Added tag rel-4-0-5 for changeset b9ab83221b03
6932:cc470382029e Add stub for next release.
Not backported, since this is LongTerm3.
6936:c98e38d29c46 Include <string_view> in tests in case needed.
6937:5200f56c1494 Include <string_view> to allow future use in Platform interface and Unicode.
6941:8a34096cd01e Modernize Platform.h (4) - update Surface to use string_view for text arguments.
Not backported, since only C++11 is supported.
6942:adbc779db70a Modernize Platform.h (5) - remove ElapsedTime.
Not backported, since it was already removed in changeset 6876:a057d12cc6b9.
6943:39f2ec3334c1 Use string_view for UniConversion functions.
Not backported, since only C++11 is supported.
6946:959308676456 Fix warning.
Not backported, since it applies to a previous changeset not backported.
6947:fb52ef66ed47 Remove dependency on StringCopy and simplify constructor.
Not backported, since only C++11 is supported.
6949:7747dc29d8a0 Fix warnings in debug assertions.
Not backported, since it applies to a previous changeset not backported.
6950:682b634df52b Encapsulate WideCharToMultiByte and MultiByteToWideChar to simplify calling sites and standardize use of options.
Not backported, since only C++11 is supported.
6951:b2a17a08a1f8 Replace ELEMENTS with std::size and drop inclusion of StringCopy.h.
Backported only the latter bit since C++11 does not have std::size.
6961:d2563c53ab4c SciTE change log.
Not backported, as this applies only to SciTE.
6962:514fde42ccbf Draw invalid bytes in DBCS when detected as blobs in a similar way to UTF-8.
Backported, but replaced std::string_view usage with const char* and size_t
components.
6964:d7ec2cdbcd16 If decoding DBCS text fails, use the MacRoman encoding to ensure something is visible.
Not backported, as it makes use of a previous changeset not backported and is
not easy for me to support if I patched it.
6970:b78f7643ae73 Add definitions for bidirectional support to Platform.h and provide empty implementations for each platform.
6971:e51e7a972b89 Implement bidirectional mode bidiL2R for DirectDraw on Win32.
6972:f30d0a228046 Update for bidirectional support.
6973:7570322b0219 Added credits.
7006:a6d3cefd4f79 Add TabPositionAfter method to IScreenLine as this calculation is needed on each platform and it allows extension to custom tab stops.
Not backported, since previous bidirectional support was not backported.
7009:e1100c6feaaf Add function to find a UTF-16 position in a UTF-8 string.
Not backported, since it is only used in bidirectional support at the moment.
7011:23a98ab36601 Define IScreenLineLayout as the main interface for implementing bidirectional features by platform code.
7012:5f4011e010f9 Implement IScreenLineLayout for Cocoa Core Text as ScreenLineLayout.
7013:0d86879c5ca5 Make virtual space selections visible in bidirectional mode.
7014:39d3e00c381a UpdateBidiData is called by EditView but doesn't use any EditView fields so make it static.
7015:6a7459cd08f9 Updated to mention bidirectional works on Cocoa.
Not backported, since previous bidirectional support was not backported.
7026:4377a8d710e1 Update Cocoa enumerations to current names instead of deprecated names.
Not backported, since many of these enumerations are not available for older SDKs.
7027:b71248119e8b Remove compile-time ENABLE_BIDIRECTIONAL option as bidirectional feature is now controlled completely at run-time.
Not backported, since previous bidirectional support was not backported.
7033:5da90aad11da Updates for 4.1.0.
Not backported, since this is LongTerm3.
7034:0dc20d87a4f9 Note that Cocoa also supports bidirectional text.
Not backported, since previous bidirectional support was not backported.
7055:bb3c92f403f7 Added tag rel-4-1-0 for changeset 0dc20d87a4f9
7059:455f134efbc1 SciTE change log.
7061:d744568dfaa5 SciTE change log.
Not backported, since this is LongTerm3.
7063:0d5edc93e280 Optional indexing of line starts in UTF-8 documents by UTF-32 code points and
Backported, but replaced std::string_view usage with const char* and size_t
components. Also used const_cast where appropriate to fix compile errors.
7066:ee645426b872 Add SciTE credit.
7067:43101fb47a25 SciTE change log.
Not backported, since this is LongTerm3.
7069:e65cfc5348a5 Change lifetime of textLayout for bidirectional so it is always released in
7071:d9e28bcc6cf9 Bug [#2030]. Fix Win32 crash setting technology to default after bidirectional
Not backported, since previous bidirectional support was not backported.
7074:b190647b5084 SciTE change log.
7079:744cd6e004ae Updates for 4.1.1.
7080:59fdd1f4d5cd Updated change list for 4.1.1.
7082:058cd4b189e6 Added tag rel-4-1-1 for changeset 892c361b3969
7083:d87b627094ad Fix version number.
7084:cd27559c2a65 Moved tag because of doc fix.
7085:fcf47c352832 Updated outdated text.
7086:c8643589ba1d Added tag rel-4-1-1 for changeset fcf47c352832
7091:575636ffe226 Added section for next release.
7095:58524eea6d35 SciTE change log.
7101:f4988dfccc31 Updates for 4.1.2 release.
7103:20455b6997e3 Added tag rel-4-1-2 for changeset 927e7d62e917
Not backported, since this is LongTerm3.
7104:9b7f24b1b150 Fix crash when particular patterns of invalid UTF-8 led to failure to create a
Not backported, since previous bidirectional support was not backported.
7109:29f0ca6d2d1b Improve performance of Editor::RangeText by avoding per-character checks.
Backported, but with const_cast to file compile error.
7121:2f5d50043861 Bug [#2055]. Use dark info bar background when system is set to Dark Appearance.
Not backported, since its parent changeset 7026:4377a8d710e1 was not
backported.
7172:05e2d46ae4c0 SciTE change log.
7177:08ccc2c490c2 SciTE change log.
Not backported, since this is LongTerm3.
7187:29c12794f87e Stop specifying -std:c++latest as that is no longer needed to enable C++17
Not backported, since only C++11 is supported.
7194:b428bfb5a730 Bug [#2022]. Fix incorrect horizontal offset on macOS 10.14 Mojave.
Not backported, since I have no easy way to test if this compiles. I'd also
like to assume LongTerm3 clients are only interested in earlier versions of
macOS.
7197:1484a537b380 Updates for version 4.1.3.
7198:974d0f564d0d Added tag rel-4-1-3 for changeset 1484a537b380
Not backported, since this is LongTerm3.
7250:f77887e669fc SciTE history.
Not backported, since this is LongTerm3.
7280:9cf6a15d6c85 Use noexcept and constexpr where possible and reasonable.
Backported, but removed use of constexpr, since it is a >= C++14 feature for
non-return-only functions.
7281:4cb7fa260e77 SciTE changelog.
7284:b52eed62fda9 SciTE change log.
Not backported, since this is LongTerm3.
7289:3f930310a0de Use constexpr where reasonable and move groups of static functions into unnamed namespace.
Backported, but removed some instances of constexpr, since it is a >= C++14
feature for non-return-only functions
7290:07b4e4192bb2 Updated version number for release.
7292:20a944185079 Added tag rel-4-1-4 for changeset cd35899fef5e
Not backported, since this is LongTerm3.
7293:3d4c60be1963 Update download sizes.
Not backported, since this is not applicable.
7315:57ea0255c8aa Avoid hangs in idle styling modes caused by high-priority idle work styling.
Backported, but removed some instances of constexpr, since it is a >= C++14
feature for non-static data members.
7319:6db11117d56f Use noexcept where allowed, not inherited from base class, and not a COM method.
7320:304d26d7137f Minor warnings fixed - uninitialized, nullptr, type agreement, avoid casts.
Backported, but without the C++17 multi-byte helper functions from a previous
changeset.
7322:b79d68be7e96 Credit for SciTE change.
Not backported, since this is LongTerm3.
7325:6148329fb2f3 Implement WStringFromUTF8 to simplify code that creates wstring objects for regular expressions and calling the Win32 API.
Backported, but replaced std::string_view usage with const char* and size_t
components. Also used #ifdef instead of C++17 `if constexpr` at suggestion of
Neil.
7326:2f9b5e1c97ae Use noexcept where sensible. Rename UTF8 string_view parameters for clarity.
Backported, but without the variable renames, since they are not applicable.
7328:521b1e23bfe2 Fix warnings from MSVC Code Analysis.
Backported, but without C++17 std::size and `SymbolValue() = default` instead
of `SymbolValue() noexcept = default`, since the latter causes a compile
error.
7329:2662ef098d93 Use generic versions of ceil, floor, round, lround, trunc from <cmath>.
Backported, but without std::round and std::lround, since older Mac OSX SDKs
may not have them.
7332:982c5f3833bb Simplify with range for.
Not backported, since std::string_view from C++17 is not used.
7333:3f381a0bbeff Use std::make_unique.
Not backported, since std::make_unique is not in C++11.
7337:eeaddec85ecc Use size_t for consistency and to avoid casts.
Not backported, since std::string_view from C++17 is not used.
7349:0b7800a19ed3 Updated ScintillaFramework internationalization to fix warnings from Xcode 10.2.
Backported, but only .cxx file reordering. Internationalization was not
backported in case it's not compatible with earlier versions of Xcode.
7350:0b319d73d317 Updated ScintillaTest internationalization to fix warnings from Xcode 10.2.
Not backported in case it's not compatible with earlier versions of Xcode.
7392:2832adedd0f4 Feature [feature-requests:#1259]. Add SCI_SETCHARACTERCATEGORYOPTIMIZATION API
Backported, but with added includes for Sci::clamp().
7402:751b76b567f9 Move UniqueStringCopy into its own source file UniqueString.cxx to hide the implementation.
7409:a70a4ee51448 Rename FontNames to UniqueStringSet and move into UniqueString.
Backported, but with an alternative to C++17's string_view.
7411:c3bc2e4277b2 Make dependencies scripts work when called from scite/scripts/RegenerateSource.py.
Not backported, since it is for SciTE and it requires Python 3.x.
7414:599d698f70bf Use noexcept in CaseConvert as well as std::string_view::copy.
Backported, but without std::string_view::copy.
7416:76d7aeac3271 Updated required Python version due to differences in how imports work in 2.7.
Not backported, since it is for SciTE and it requires Python 3.x.
7417:bbef7c52aecf Use views for input string parameters as that allows calling with more varied values and can avoid allocations.
7418:bf93fe7f0940 Bug [#2093]. Use wstring_view to unify adding text and eliminate AddCharUTF16.
Not backported, since a previous commit to use C++17's std::string_view was
not backported.
7423:2e2cf21cee0b Bug [#2093]. Remove restrictions on IME input length.
Not backported, since the lack of a previous backport still references
maxLenInputIME.
7425:466a7bd45f06 Preparing for 4.1.5 release.
7427:72074cd809c5 Added 4.1.5 blurb.
7428:bebdebd489c6 Added tag rel-4-1-5 for changeset 72074cd809c5
7430:6a6bf370ae9f Removed tag rel-4-1-5
7431:fcecd4a96700 Added tag rel-4-1-5 for changeset 6a6bf370ae9f
Not backported, since this is LongTerm3.
7479:be5a36866340 Switch from /std:c++latest to /std:c++17 as Visual C++ 2019 now includes some
Not backported, since only C++11 is supported.
7480:1b7760e143911 SciTE change log.
Not backported, since this is LongTerm3.
7486:a99fa007805f Feature [feature-requests:#1280]. Lexer added for X12.
Backported, but with LexerX12::Terminator struct definition not having default
values, which is a C++14 feature.
7550:fb4a24eb8aec Preparing for 4.1.6 release.
7551:4781ee00f04f Clarified large file support.
7559:6ccb029fd955 Updated release date for 4.1.6.
7561:0e040330cb60 Added tag rel-4-1-6 for changeset 6ccb029fd955
Not backported, since this is LongTerm3.

View File

@ -0,0 +1,20 @@
Fixes should be posted to the Bug Tracker
http://sourceforge.net/p/scintilla/bugs/
Features should be posted to the Feature Request Tracker
http://sourceforge.net/p/scintilla/feature-requests/
Either send unified diffs (or patch files) or zip archives with whole files.
Mercurial patch files are best as they include author information and commit
messages.
Questions should go to the scintilla-interest mailing list
https://groups.google.com/forum/#!forum/scintilla-interest
Code should follow the guidelines at
http://www.scintilla.org/SciCoding.html
Do not use SourceForge's Merge Request mechanism or message sending
feature as no one is monitoring these.
The neilh @ scintilla.org account receives much spam and is only checked
occasionally. Almost all Scintilla mail should go to the mailing list.

View File

@ -0,0 +1,20 @@
License for Scintilla and SciTE
Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -0,0 +1,73 @@
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Download Scintilla
</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<img src="SciTEIco.png" border="3" height="64" width="64" alt="Scintilla icon" />
</td>
<td>
<a href="index.html" style="color:white;text-decoration:none"><font size="5">Download
Scintilla</font></a>
</td>
</tr>
</table>
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.10.6/scintilla3106.zip/download">
Windows</a>&nbsp;&nbsp;
<a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.10.6/scintilla3106.tgz/download">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
</tr>
</table>
<h2>
Download.
</h2>
<p>
This page is for the LongTerm3 branch of Scintilla which avoids depending on C++14 or later features.
Compilers as old as GCC 4.8, MSVC 2015 (theoretically), and Clang 3.4 are supported.
</p>
<p>
The <a href="License.txt">license</a> for using Scintilla is similar to that of Python
containing very few restrictions.
</p>
<h3>
Release 3.10.6
</h3>
<h4>
Source Code
</h4>
The source code package contains all of the source code for Scintilla but no binary
executable code and is available in
<ul>
<li><a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.10.6/scintilla3106.zip/download">zip format</a> commonly used on Windows</li>
<li><a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.10.6/scintilla3106.tgz/download">tgz format</a> commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<p>
Previous versions can be downloaded from the <a href="ScintillaHistory.html">history
page</a>.
</p>
<p>
Also available from Mercurial:
</p>
<pre>
hg clone http://hg.code.sf.net/p/scintilla/code scintilla
cd scintilla && hg update LongTerm3
</pre>
</body>
</html>

View File

@ -6,9 +6,11 @@ To build SciTE, Scintilla must first be built.
*** GTK+/Linux version ***
You must first have GTK+ 2.0 or later and GCC (4.1 or better) installed.
GTK+ 1.x will not work.
You must first have GTK+ 2.24 or later and GCC (4.8 or better) installed.
Clang may be used by adding CLANG=1 to the make command line.
Other C++ compilers may work but may require tweaking the make file.
Either GTK+ 2.x or 3.x may be used with 2.x the default and 3.x
chosen with the make argument GTK3=1.
To build Scintilla, use the makefile located in the scintilla/gtk directory
cd scintilla/gtk
@ -18,7 +20,7 @@ To build Scintilla, use the makefile located in the scintilla/gtk directory
To build and install SciTE, use the makefile located in the scite/gtk directory
cd scite/gtk
make
make install
sudo make install
This installs SciTE into $prefix/bin. The value of $prefix is determined from
the location of Gnome if it is installed. This is usually /usr if installed
@ -30,7 +32,7 @@ properties file is installed at $prefix/share/scite/SciTEGlobal.properties.
The language specific properties files are also installed into this directory.
To remove SciTE
make uninstall
sudo make uninstall
To clean the object files which may be needed to change $prefix
make clean
@ -40,19 +42,20 @@ The current make file only supports static linking between SciTE and Scintilla.
*** Windows version ***
A C++ compiler is required. Visual Studio 2010 is the development system
used for most development although TDM Mingw32 4.7.1 is also supported.
A C++ 11 compiler is required.
Visual Studio 2015 is the development system used for most development
although Mingw32 4.8 is also supported.
To build Scintilla, make in the scintilla/win32 directory
cd scintilla\win32
GCC: mingw32-make
VS .NET: nmake -f scintilla.mak
Visual C++: nmake -f scintilla.mak
cd ..\..
To build SciTE, use the makefiles located in the scite/win32 directory
cd scite\win32
GCC: mingw32-make
VS .NET: nmake -f scite.mak
Visual C++: nmake -f scite.mak
An executable SciTE will now be in scite/bin.
@ -65,3 +68,22 @@ Only Scintilla will build with GTK+ on Windows. SciTE will not work.
To build Scintilla, make in the scintilla/gtk directory
cd scintilla\gtk
mingw32-make
*** macOS Cocoa version ***
Xcode 8 may be used to build Scintilla on macOS.
There is no open source version of SciTE for macOS but there is a commercial
version available through the App Store.
To build Scintilla, run xcodebuild in the scintilla/cocoa/ScintillaFramework directory
cd cocoa/ScintillaFramework
xcodebuild
*** Qt version ***
See the qt/README file to build Scintilla with Qt.
*** Curses version ***
See the curses/README.md file to build Scintilla with curses.

View File

@ -0,0 +1,214 @@
# Copyright 2018-2019 Mitchell mitchell.att.foicica.com. See License.txt.
# This makefile is used only for catching compile and test errors when
# backporting fixes and features from the main branch of Scintilla. It likely
# will not produce compiled targets that can be used by a Scintilla-based
# application.
# Usage: make -f check.mak
.SUFFIXES: .cxx .c .o .h .a
INCLUDEDIRS = -Iinclude -Isrc -Ilexlib
CC = gcc
CXX = g++
AR = ar
CLANG_CC = clang --gcc-toolchain=$(shell pwd)/gcc/4.8.1
CLANG_CXX = clang++ --gcc-toolchain=$(shell pwd)/gcc/4.8.1
CFLAGS = -pedantic -Wall
CXXFLAGS = -std=c++11 -pedantic -pedantic-errors -DSCI_LEXER $(INCLUDEDIRS) \
-DNDEBUG -Os -Wall
CROSS_WIN32 = i686-w64-mingw32-
CROSS_OSX = i386-apple-darwin9-
LINUX_CC = $(CC)-4.8
LINUX_CXX = $(CXX)-4.8
ifndef GTK3
GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
else
GTK_CFLAGS = $(shell pkg-config --cflags gtk+-3.0)
endif
base_src_objs = AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o \
Catalogue.o CellBuffer.o CharClassify.o ContractionState.o \
DBCS.o Decoration.o Document.o EditModel.o Editor.o EditView.o \
ExternalLexer.o Indicator.o KeyMap.o LineMarker.o MarginView.o \
PerLine.o PositionCache.o RESearch.o RunStyles.o \
ScintillaBase.o Selection.o Style.o UniConversion.o \
ViewStyle.o UniqueString.o XPM.o
base_lexlib_objs = Accessor.o CharacterCategory.o CharacterSet.o LexerBase.o \
LexerModule.o LexerNoExceptions.o LexerSimple.o \
PropSetSimple.o StyleContext.o WordList.o
base_lexer_objs = $(addsuffix .o,$(basename $(sort $(notdir $(wildcard lexers/Lex*.cxx)))))
win32_src_objs = $(addprefix win32/, $(base_src_objs))
win32_lexlib_objs = $(addprefix win32/, $(base_lexlib_objs))
win32_lexer_objs = $(addprefix win32/, $(base_lexer_objs))
win32_plat_objs = win32/PlatWin.o win32/ScintillaWin.o win32/ScintillaDLL.o \
win32/HanjaDic.o
cocoa_src_objs = $(addprefix cocoa/, $(base_src_objs))
cocoa_lexlib_objs = $(addprefix cocoa/, $(base_lexlib_objs))
cocoa_lexer_objs = $(addprefix cocoa/, $(base_lexer_objs))
cocoa_plat_objs = cocoa/PlatCocoa.o cocoa/ScintillaCocoa.o cocoa/ScintillaView.o
gtk_src_objs = $(addprefix gtk/, $(base_src_objs))
gtk_lexlib_objs = $(addprefix gtk/, $(base_lexlib_objs))
gtk_lexer_objs = $(addprefix gtk/, $(base_lexer_objs))
gtk_plat_cc_objs = gtk/scintilla-marshal.o
gtk_plat_cxx_objs = gtk/PlatGTK.o gtk/ScintillaGTK.o \
gtk/ScintillaGTKAccessible.o
gtk_src_objs_clang = $(addprefix gtk/clang-, $(base_src_objs))
gtk_lexlib_objs_clang = $(addprefix gtk/clang-, $(base_lexlib_objs))
gtk_lexer_objs_clang = $(addprefix gtk/clang-, $(base_lexer_objs))
gtk_plat_cc_objs_clang = $(addprefix gtk/clang-, $(notdir $(gtk_plat_cc_objs)))
gtk_plat_cxx_objs_clang = $(addprefix gtk/clang-, $(notdir $(gtk_plat_cxx_objs)))
curses_src_objs = $(addprefix curses/, $(base_src_objs))
curses_lexlib_objs = $(addprefix curses/, $(base_lexlib_objs))
curses_lexer_objs = $(addprefix curses/, $(base_lexer_objs))
curses_plat_objs = curses/ScintillaCurses.o
curses_src_objs_clang = $(addprefix curses/clang-, $(base_src_objs))
curses_lexlib_objs_clang = $(addprefix curses/clang-, $(base_lexlib_objs))
curses_lexer_objs_clang = $(addprefix curses/clang-, $(base_lexer_objs))
curses_plat_objs_clang = $(addprefix curses/clang-, $(notdir $(curses_plat_objs)))
all: | /tmp/scintilla
$(MAKE) -C $| -f check.mak -j8 bin/scintilla_win32.a bin/scintilla_cocoa.a \
bin/scintilla_gtk.a bin/clang-scintilla_gtk.a bin/scintilla_curses.a \
bin/clang-scintilla_curses.a qt qt-clang
/tmp/scintilla:
cp -rs `pwd` $@
cp -r $@/qt $@/qt-clang
mkdir -p $@/gcc/4.8.1/include/c++/4.8.1
cp -rs /usr/include/c++/4.8.1/* $@/gcc/4.8.1/include/c++/4.8.1
cp -rs /usr/include/x86_64-linux-gnu/c++/4.8/* $@/gcc/4.8.1/include/c++/4.8.1
mkdir -p $@/gcc/4.8.1/lib/gcc/x86_64-linux-gnu/4.8.1
cp -rs /usr/lib/gcc/x86_64-linux-gnu/4.8.1/* \
$@/gcc/4.8.1/lib/gcc/x86_64-linux-gnu/4.8.1/
# Windows platform objects.
bin/scintilla_win32.a: $(win32_src_objs) $(win32_lexlib_objs) \
$(win32_lexer_objs) $(win32_plat_objs)
$(CROSS_WIN32)$(AR) rc $@ $^
touch $@
$(win32_src_objs): win32/%.o: src/%.cxx
$(win32_lexlib_objs): win32/%.o: lexlib/%.cxx
$(win32_lexer_objs): win32/%.o: lexers/%.cxx
$(win32_src_objs) $(win32_lexlib_objs) $(win32_lexer_objs):
$(CROSS_WIN32)$(CXX) -c $(CXXFLAGS) $< -o $@
$(win32_plat_objs): win32/%.o: win32/%.cxx
$(CROSS_WIN32)$(CXX) -c $(CXXFLAGS) $< -o $@
# MacOS platform objects.
bin/scintilla_cocoa.a: $(cocoa_src_objs) $(cocoa_lexlib_objs) \
$(cocoa_lexer_objs) #$(cocoa_plat_objs)
$(CROSS_OSX)$(AR) rc $@ $^
touch $@
$(cocoa_src_objs): cocoa/%.o: src/%.cxx
$(cocoa_lexlib_objs): cocoa/%.o: lexlib/%.cxx
$(cocoa_lexer_objs): cocoa/%.o: lexers/%.cxx
$(cocoa_src_objs) $(cocoa_lexlib_objs) $(cocoa_lexer_objs):
$(CROSS_OSX)$(CXX) -c $(CXXFLAGS) $< -o $@
$(cocoa_plat_objs): cocoa/%.o: cocoa/%.mm
$(CROSS_OSX)$(CXX)-gstdc++ -c $(CXXFLAGS) $< -o $@
# GTK platform objects.
bin/scintilla_gtk.a: $(gtk_src_objs) $(gtk_lexlib_objs) $(gtk_lexer_objs) \
$(gtk_plat_cc_objs) $(gtk_plat_cxx_objs)
bin/clang-scintilla_gtk.a: $(gtk_src_objs_clang) $(gtk_lexlib_objs_clang) \
$(gtk_lexer_objs_clang) $(gtk_plat_cc_objs_clang) \
$(gtk_plat_cxx_objs_clang)
$(gtk_src_objs): gtk/%.o: src/%.cxx
$(gtk_lexlib_objs): gtk/%.o: lexlib/%.cxx
$(gtk_lexer_objs): gtk/%.o: lexers/%.cxx
$(gtk_src_objs_clang): gtk/clang-%.o: src/%.cxx
$(gtk_lexlib_objs_clang): gtk/clang-%.o: lexlib/%.cxx
$(gtk_lexer_objs_clang): gtk/clang-%.o: lexers/%.cxx
$(gtk_plat_cc_objs): gtk/%.o: gtk/%.c
$(gtk_plat_cc_objs_clang): gtk/clang-%.o: gtk/%.c
$(gtk_plat_cxx_objs): gtk/%.o: gtk/%.cxx
$(gtk_plat_cxx_objs_clang): gtk/clang-%.o: gtk/%.cxx
$(gtk_src_objs) $(gtk_lexlib_objs) $(gtk_lexer_objs) $(gtk_plat_cxx_objs): CXX := $(LINUX_CXX)
$(gtk_plat_cc_objs): CC := $(LINUX_CC)
$(gtk_src_objs_clang) $(gtk_lexlib_objs_clang) $(gtk_lexer_objs_clang) $(gtk_plat_cxx_objs_clang): CXX := $(CLANG_CXX)
$(gtk_plat_cc_objs_clang): CC := $(CLANG_CC)
bin/scintilla_gtk.a bin/clang-scintilla_gtk.a:
$(AR) rc $@ $^
touch $@
$(gtk_src_objs) $(gtk_lexlib_objs) $(gtk_lexer_objs) \
$(gtk_src_objs_clang) $(gtk_lexlib_objs_clang) $(gtk_lexer_objs_clang):
$(CXX) -c $(CXXFLAGS) -DGTK $< -o $@
$(gtk_plat_cc_objs) $(gtk_plat_cc_objs_clang):
$(CC) -c $(CFLAGS) $(GTK_CFLAGS) $< -o $@
$(gtk_plat_cxx_objs) $(gtk_plat_cxx_objs_clang):
$(CXX) -c $(CXXFLAGS) -DGTK $(GTK_CFLAGS) $< -o $@
# Curses platform objects.
bin/scintilla_curses.a: $(curses_src_objs) $(curses_lexlib_objs) \
$(curses_lexer_objs) $(curses_plat_objs)
bin/clang-scintilla_curses.a: $(curses_src_objs_clang) \
$(curses_lexlib_objs_clang) \
$(curses_lexer_objs_clang) \
$(curses_plat_objs_clang)
$(curses_src_objs): curses/%.o: src/%.cxx
$(curses_lexlib_objs): curses/%.o: lexlib/%.cxx
$(curses_lexer_objs): curses/%.o: lexers/%.cxx
$(curses_src_objs_clang): curses/clang-%.o: src/%.cxx
$(curses_lexlib_objs_clang): curses/clang-%.o: lexlib/%.cxx
$(curses_lexer_objs_clang): curses/clang-%.o: lexers/%.cxx
$(curses_plat_objs): curses/%.o: curses/%.cxx
$(curses_plat_objs_clang): curses/clang-%.o: curses/%.cxx
$(curses_src_objs) $(curses_lexlib_objs) $(curses_lexer_objs): CXX := $(LINUX_CXX)
$(curses_src_objs_clang) $(curses_lexlib_objs_clang) $(curses_lexer_objs_clang) $(curses_plat_objs_clang): CXX := $(CLANG_CXX)
bin/scintilla_curses.a bin/clang-scintilla_curses.a:
ar rc $@ $^
touch $@
$(curses_src_objs) $(curses_lexlib_objs) $(curses_lexer_objs) \
$(curses_src_objs_clang) $(curses_lexlib_objs_clang) $(curses_lexer_objs_clang):
$(CXX) -c $(CXXFLAGS) -DCURSES -DLPEG_LEXER $< -o $@
$(curses_plat_objs) $(curses_plat_objs_clang):
$(CXX) -c $(CXXFLAGS) -DCURSES -Wno-unused-parameter $< -o $@
# Qt platform objects. (Note: requires libqt4-dev qt4-qmake.)
.PHONY: qt qt-clang
qt: qt/ScintillaEditBase/Makefile
qt-clang: qt-clang/ScintillaEditBase/Makefile
qt qt-clang: ; $(MAKE) -C $(dir $<) -j8
qt/ScintillaEditBase/Makefile: ; cd qt/ScintillaEditBase && qmake
qt-clang/ScintillaEditBase/Makefile:
cd $(dir $@) && qmake QMAKE_CC="$(CLANG_CC)" \
QMAKE_CXX="$(CLANG_CXX)"
sed -i -e 's/libScintillaEditBase/clang-libScintillaEditBase/;' $@
deps: win32_deps cocoa_deps gtk_deps curses_deps
win32_deps: src/*.cxx lexlib/*.cxx lexers/*.cxx win32/*.cxx
$(CROSS_WIN32)$(CXX) -MM $(CXXFLAGS) $^ | \
sed -e 's|^\([[:alnum:]-]\+\.o:\)|win32/\1|;' > checkdeps.mak
cocoa_deps: src/*.cxx lexlib/*.cxx lexers/*.cxx #cocoa/*.cxx
$(CROSS_OSX)$(CXX) -MM $(CXXFLAGS) $^ | \
sed -e 's|^\([[:alnum:]-]\+\.o:\)|cocoa/\1|;' >> checkdeps.mak
gtk_deps: src/*.cxx lexlib/*.cxx lexers/*.cxx gtk/*.cxx
$(CXX) -MM $(CXXFLAGS) $^ | \
sed -e 's|^\([[:alnum:]-]\+\.o:\)|gtk/\1|;' >> checkdeps.mak
curses_deps: src/*.cxx lexlib/*.cxx lexers/*.cxx curses/*.cxx
$(CXX) -MM $(CXXFLAGS) $^ | \
sed -e 's|^\([[:alnum:]-]\+\.o:\)|curses/\1|;' >> checkdeps.mak
include checkdeps.mak
clean:
rm -f bin/*.a bin/*.dll win32/*.o cocoa/*.o gtk/*.o curses/*.o
make -f qt/ScintillaEditBase/Makefile clean
make -f qt-clang/ScintillaEditBase/Makefile clean
rm -rf /tmp/scintilla
.PHONY: test
test: | /tmp/scintilla
make -C $|/test/unit CXX=$(LINUX_CXX) clean test
cd $|/test && lua5.1 test_lexlua.lua
releasedir = /tmp/scintilla$(shell grep -o '[0-9]\+' version.txt)
$(releasedir): ; hg archive $@
zip: $(releasedir)
cd /tmp && tar czf $<.tgz $(notdir $<)
cd /tmp && zip -r $<.zip $(notdir $<)
rm -r $<
upload: LongTermDownload.html doc/ScintillaHistory.html doc/ScintillaDoc.html \
doc/StyleMetadata.html doc/LPegLexer.html
scp $^ foicica@web.sourceforge.net:/home/project-web/scintilla/htdocs/

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,8 @@
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#include <cmath>
#import "InfoBar.h"
//--------------------------------------------------------------------------------------------------
@ -36,7 +38,7 @@
if (heightDelta > 0)
{
newRect.size.height -= heightDelta;
newRect.origin.y += ceil(heightDelta / 2);
newRect.origin.y += std::ceil(heightDelta / 2);
}
}
@ -88,6 +90,10 @@
NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]];
NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"tiff" inDirectory: nil];
// macOS 10.13 introduced bug where pathForResource: fails on SMB share
if (path == nil) {
path = [[bundle bundlePath] stringByAppendingPathComponent: @"Resources/info_bar_bg.tiff"];
}
mBackground = [[NSImage alloc] initWithContentsOfFile: path];
if (![mBackground isValid])
NSLog(@"Background image for info bar is invalid.");
@ -154,7 +160,7 @@ static float BarFontSize = 10.0;
unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);
// Create the popup button.
mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];
mZoomPopup = [[NSPopUpButton alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];
// No border or background please.
[[mZoomPopup cell] setBordered: NO];
@ -242,11 +248,13 @@ static float BarFontSize = 10.0;
{
// Since the background is seamless, we don't need to take care for the proper offset.
// Simply tile the background over the invalid rectangle.
NSPoint target = {rect.origin.x, 0};
while (target.x < rect.origin.x + rect.size.width)
{
[mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
target.x += mBackground.size.width;
if (mBackground.size.width != 0) {
NSPoint target = {rect.origin.x, 0};
while (target.x < rect.origin.x + rect.size.width)
{
[mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
target.x += mBackground.size.width;
}
}
// Draw separator lines between items.
@ -346,7 +354,7 @@ static float BarFontSize = 10.0;
{
mDisplayMask = display;
[self positionSubViews];
[self needsDisplay];
[self setNeedsDisplay: YES];
}
}
@ -384,7 +392,7 @@ static float BarFontSize = 10.0;
// We only work with some preset zoom values. If the given value does not correspond
// to one then show no selection.
while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
while (count < numberOfDefaultItems && (std::abs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
count++;
if (count == numberOfDefaultItems)
[mZoomPopup selectItemAtIndex: -1];

View File

@ -7,21 +7,21 @@
#ifndef PLATCOCOA_H
#define PLATCOCOA_H
#include <assert.h>
#include <sys/time.h>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <cstdio>
#include <sys/time.h>
#include <Cocoa/Cocoa.h>
#include "QuartzTextLayout.h"
#include "Platform.h"
#include "Scintilla.h"
NSRect PRectangleToNSRect(Scintilla::PRectangle& rc);
#include "QuartzTextLayout.h"
NSRect PRectangleToNSRect(const Scintilla::PRectangle& rc);
Scintilla::PRectangle NSRectToPRectangle(NSRect& rc);
CFStringEncoding EncodingFromCharacterSet(bool unicode, int characterSet);
@ -47,12 +47,12 @@ private:
CGContextRef gc;
/** The text layout instance */
QuartzTextLayout* textLayout;
std::unique_ptr<QuartzTextLayout> textLayout;
int codePage;
int verticalDeviceResolution;
/** If the surface is a bitmap context, contains a reference to the bitmap data. */
uint8_t* bitmapData;
std::unique_ptr<uint8_t[]> bitmapData;
/** If the surface is a bitmap context, stores the dimensions of the bitmap. */
int bitmapWidth;
int bitmapHeight;
@ -65,57 +65,59 @@ private:
static const int BITS_PER_COMPONENT = 8;
static const int BITS_PER_PIXEL = BITS_PER_COMPONENT * 4;
static const int BYTES_PER_PIXEL = BITS_PER_PIXEL / 8;
void Clear();
public:
SurfaceImpl();
~SurfaceImpl();
~SurfaceImpl() override;
void Init(WindowID wid);
void Init(SurfaceID sid, WindowID wid);
void InitPixMap(int width, int height, Surface *surface_, WindowID wid);
void Init(WindowID wid) override;
void Init(SurfaceID sid, WindowID wid) override;
void InitPixMap(int width, int height, Surface *surface_, WindowID wid) override;
CGContextRef GetContext() { return gc; }
void Release();
bool Initialised();
void PenColour(ColourDesired fore);
void Release() override;
bool Initialised() override;
void PenColour(ColourDesired fore) override;
/** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */
CGImageRef GetImage();
void CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect);
int LogPixelsY();
int DeviceHeightFont(int points);
void MoveTo(int x_, int y_);
void LineTo(int x_, int y_);
void Polygon(Scintilla::Point *pts, int npts, ColourDesired fore, ColourDesired back);
void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back);
void FillRectangle(PRectangle rc, ColourDesired back);
void FillRectangle(PRectangle rc, Surface &surfacePattern);
void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back);
int LogPixelsY() override;
int DeviceHeightFont(int points) override;
void MoveTo(int x_, int y_) override;
void LineTo(int x_, int y_) override;
void Polygon(Scintilla::Point *pts, size_t npts, ColourDesired fore, ColourDesired back) override;
void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) override;
void FillRectangle(PRectangle rc, ColourDesired back) override;
void FillRectangle(PRectangle rc, Surface &surfacePattern) override;
void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back) override;
void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
ColourDesired outline, int alphaOutline, int flags);
void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage);
void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back);
void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);
ColourDesired outline, int alphaOutline, int flags) override;
void GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;
void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;
void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) override;
void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource) override;
void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
ColourDesired back);
ColourDesired back) override;
void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore,
ColourDesired back);
void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore);
void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions);
XYPOSITION WidthText(Font &font_, const char *s, int len);
XYPOSITION WidthChar(Font &font_, char ch);
XYPOSITION Ascent(Font &font_);
XYPOSITION Descent(Font &font_);
XYPOSITION InternalLeading(Font &font_);
XYPOSITION ExternalLeading(Font &font_);
XYPOSITION Height(Font &font_);
XYPOSITION AverageCharWidth(Font &font_);
ColourDesired back) override;
void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) override;
void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions) override;
XYPOSITION WidthText(Font &font_, const char *s, int len) override;
XYPOSITION Ascent(Font &font_) override;
XYPOSITION Descent(Font &font_) override;
XYPOSITION InternalLeading(Font &font_) override;
XYPOSITION Height(Font &font_) override;
XYPOSITION AverageCharWidth(Font &font_) override;
void SetClip(PRectangle rc);
void FlushCachedState();
void SetClip(PRectangle rc) override;
void FlushCachedState() override;
void SetUnicodeMode(bool unicodeMode_);
void SetDBCSMode(int codePage_);
void SetUnicodeMode(bool unicodeMode_) override;
void SetDBCSMode(int codePage_) override;
}; // SurfaceImpl class
} // Scintilla namespace

View File

@ -19,13 +19,9 @@
class QuartzTextLayout
{
public:
/** Create a text layout for drawing on the specified context. */
explicit QuartzTextLayout( CGContextRef context )
/** Create a text layout for drawing. */
QuartzTextLayout() : mString(NULL), mLine(NULL), stringLength(0)
{
mString = NULL;
mLine = NULL;
stringLength = 0;
setContext(context);
}
~QuartzTextLayout()
@ -42,9 +38,9 @@ public:
}
}
inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r )
{
CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );
void setText(const char *buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle &r) {
const UInt8 *puiBuffer = reinterpret_cast<const UInt8 *>(buffer);
CFStringRef str = CFStringCreateWithBytes(NULL, puiBuffer, byteLength, encoding, false);
if (!str)
return;
@ -63,12 +59,13 @@ public:
CFRelease( str );
}
/** Draw the text layout into the current CGContext at the specified position.
/** Draw the text layout into a CGContext at the specified position.
* @param gc The CGContext in which to draw the text.
* @param x The x axis position to draw the baseline in the current CGContext.
* @param y The y axis position to draw the baseline in the current CGContext. */
void draw( float x, float y )
void draw( CGContextRef gc, float x, float y )
{
if (mLine == NULL)
if (!mLine)
return;
::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0));
@ -96,13 +93,7 @@ public:
return stringLength;
}
inline void setContext (CGContextRef context)
{
gc = context;
}
private:
CGContextRef gc;
CFAttributedStringRef mString;
CTLineRef mLine;
CFIndex stringLength;

View File

@ -54,9 +54,9 @@ public:
return styleDict;
}
void setCTStyleColor(CGColor *inColor)
void setCTStyleColour(CGColor *inColour)
{
CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, inColor);
CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, inColour);
}
float getAscent() const

View File

@ -13,16 +13,18 @@
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <ctype.h>
#include <cstddef>
#include <cstdlib>
#include <cstdio>
#include <ctime>
#include <stdexcept>
#include <string>
#include <vector>
#include <map>
#include <memory>
#include "ILoader.h"
#include "ILexer.h"
#ifdef SCI_LEXER
@ -30,7 +32,9 @@
#include "PropSetSimple.h"
#endif
#include "CharacterCategory.h"
#include "Position.h"
#include "UniqueString.h"
#include "SplitVector.h"
#include "Partitioning.h"
#include "RunStyles.h"
@ -39,7 +43,6 @@
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
@ -48,6 +51,8 @@
#include "CaseFolder.h"
#include "Document.h"
#include "CaseConvert.h"
#include "UniConversion.h"
#include "DBCS.h"
#include "Selection.h"
#include "PositionCache.h"
#include "EditModel.h"
@ -88,6 +93,7 @@ namespace Scintilla {
class ScintillaCocoa : public ScintillaBase
{
private:
ScintillaView* sciView;
TimerTarget* timerTarget;
NSEvent* lastMouseEvent;
@ -100,45 +106,42 @@ private:
bool enteredSetScrollingSize;
// Private so ScintillaCocoa objects can not be copied
ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}
ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }
bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);
void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);
int TargetAsUTF8(char *text);
int EncodedFromUTF8(char *utf8, char *encoded) const;
Sci::Position TargetAsUTF8(char *text) const;
Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;
int scrollSpeed;
int scrollTicks;
NSTimer* tickTimer;
NSTimer* idleTimer;
CFRunLoopObserverRef observer;
FindHighlightLayer *layerFindIndicator;
protected:
Point GetVisibleOriginInMain() const;
PRectangle GetClientRectangle() const;
virtual PRectangle GetClientDrawingRectangle();
Point GetVisibleOriginInMain() const override;
PRectangle GetClientRectangle() const override;
PRectangle GetClientDrawingRectangle() override;
Point ConvertPoint(NSPoint point);
virtual void RedrawRect(PRectangle rc);
virtual void DiscardOverdraw();
virtual void Redraw();
void RedrawRect(PRectangle rc) override;
void DiscardOverdraw() override;
void Redraw() override;
virtual void Initialise();
virtual void Finalise();
virtual CaseFolder *CaseFolderForEncoding();
virtual std::string CaseMapString(const std::string &s, int caseMapping);
virtual void CancelModes();
void Init();
CaseFolder *CaseFolderForEncoding() override;
std::string CaseMapString(const std::string &s, int caseMapping) override;
void CancelModes() override;
public:
ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin);
virtual ~ScintillaCocoa();
ScintillaCocoa(ScintillaView* sciView_, SCIContentView* viewContent, SCIMarginView* viewMargin);
// Deleted so ScintillaCocoa objects can not be copied.
ScintillaCocoa(const ScintillaCocoa &) = delete;
ScintillaCocoa &operator=(const ScintillaCocoa &) = delete;
~ScintillaCocoa() override;
void Finalise() override;
void SetDelegate(id<ScintillaNotificationProtocol> delegate_);
void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override;
NSScrollView* ScrollContainer() const;
SCIContentView* ContentView();
@ -147,43 +150,42 @@ public:
bool Draw(NSRect rect, CGContextRef gc);
void PaintMargin(NSRect aRect);
virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void TickFor(TickReason reason);
bool FineTickerAvailable();
bool FineTickerRunning(TickReason reason);
void FineTickerStart(TickReason reason, int millis, int tolerance);
void FineTickerCancel(TickReason reason);
bool SetIdle(bool on);
void SetMouseCapture(bool on);
bool HaveMouseCapture();
sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override;
void TickFor(TickReason reason) override;
bool FineTickerRunning(TickReason reason) override;
void FineTickerStart(TickReason reason, int millis, int tolerance) override;
void FineTickerCancel(TickReason reason) override;
bool SetIdle(bool on) override;
void SetMouseCapture(bool on) override;
bool HaveMouseCapture() override;
void WillDraw(NSRect rect);
void ScrollText(int linesToMove);
void SetVerticalScrollPos();
void SetHorizontalScrollPos();
bool ModifyScrollBars(int nMax, int nPage);
void ScrollText(Sci::Line linesToMove) override;
void SetVerticalScrollPos() override;
void SetHorizontalScrollPos() override;
bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;
bool SetScrollingSize(void);
void Resize();
void UpdateForScroll();
// Notifications for the owner.
void NotifyChange();
void NotifyFocus(bool focus);
void NotifyParent(SCNotification scn);
void NotifyChange() override;
void NotifyFocus(bool focus) override;
void NotifyParent(SCNotification scn) override;
void NotifyURIDropped(const char *uri);
bool HasSelection();
bool CanUndo();
bool CanRedo();
virtual void CopyToClipboard(const SelectionText &selectedText);
virtual void Copy();
virtual bool CanPaste();
virtual void Paste();
virtual void Paste(bool rectangular);
void CopyToClipboard(const SelectionText &selectedText) override;
void Copy() override;
bool CanPaste() override;
void Paste() override;
void Paste(bool rectangular);
void CTPaint(void* gc, NSRect rc);
void CallTipMouseDown(NSPoint pt);
virtual void CreateCallTipWindow(PRectangle rc);
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
virtual void ClaimSelection();
void CreateCallTipWindow(PRectangle rc) override;
void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;
void ClaimSelection() override;
NSPoint GetCaretPosition();
@ -195,21 +197,27 @@ public:
static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci);
void ObserverAdd();
void ObserverRemove();
virtual void IdleWork();
virtual void QueueIdleWork(WorkNeeded::workItems items, int upTo);
int InsertText(NSString* input);
NSRange PositionsFromCharacters(NSRange range) const;
NSRange CharactersFromPositions(NSRange range) const;
void IdleWork() override;
void QueueIdleWork(WorkNeeded::workItems items, Sci::Position upTo) override;
ptrdiff_t InsertText(NSString *input);
NSRange PositionsFromCharacters(NSRange rangeCharacters) const;
NSRange CharactersFromPositions(NSRange rangePositions) const;
NSString *RangeTextAsString(NSRange rangePositions) const;
NSInteger VisibleLineForIndex(NSInteger index);
NSRange RangeForVisibleLine(NSInteger lineVisible);
NSRect FrameForRange(NSRange rangeCharacters);
NSRect GetBounds() const;
void SelectOnlyMainSelection();
void ConvertSelectionVirtualSpace();
bool ClearAllSelections();
void CompositionStart();
void CompositionCommit();
void CompositionUndo();
virtual void SetDocPointer(Document *document);
void SetDocPointer(Document *document) override;
bool KeyboardInput(NSEvent* event);
void MouseDown(NSEvent* event);
void RightMouseDown(NSEvent* event);
void MouseMove(NSEvent* event);
void MouseUp(NSEvent* event);
void MouseEntered(NSEvent* event);
@ -217,7 +225,7 @@ public:
void MouseWheel(NSEvent* event);
// Drag and drop
void StartDrag();
void StartDrag() override;
bool GetDragData(id <NSDraggingInfo> info, NSPasteboard &pasteBoard, SelectionText* selectedText);
NSDragOperation DraggingEntered(id <NSDraggingInfo> info);
NSDragOperation DraggingUpdated(id <NSDraggingInfo> info);
@ -226,16 +234,18 @@ public:
void DragScroll();
// Promote some methods needed for NSResponder actions.
virtual void SelectAll();
void SelectAll() override;
void DeleteBackward();
virtual void Cut();
virtual void Undo();
virtual void Redo();
void Cut() override;
void Undo() override;
void Redo() override;
virtual NSMenu* CreateContextMenu(NSEvent* event);
bool ShouldDisplayPopupOnMargin();
bool ShouldDisplayPopupOnText();
NSMenu* CreateContextMenu(NSEvent* event);
void HandleCommand(NSInteger command);
virtual void ActiveStateChanged(bool isActive);
void ActiveStateChanged(bool isActive);
void WindowWillMove();
// Find indicator

View File

@ -9,17 +9,19 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.sun.${PRODUCT_NAME:identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.10.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>3.10.6</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>

View File

@ -7,11 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 577F46B88F633198B56D088D /* LexCIL.cxx */; };
0ED84236A703D57578EBFD2F /* LexNim.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 47814937A6B72D2B0F065B61 /* LexNim.cxx */; };
1100F1EB178E393200105727 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E6178E393200105727 /* CaseConvert.cxx */; };
1100F1EC178E393200105727 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E7178E393200105727 /* CaseConvert.h */; };
1100F1ED178E393200105727 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1100F1E8178E393200105727 /* CaseFolder.cxx */; };
1100F1EE178E393200105727 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1E9178E393200105727 /* CaseFolder.h */; };
1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 1100F1EA178E393200105727 /* UnicodeFromUTF8.h */; };
1102C31C169FB49300DC16AB /* LexLaTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1102C31B169FB49300DC16AB /* LexLaTeX.cxx */; };
11126B8214CD3A6200803C49 /* LexAVS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11126B8114CD3A6200803C49 /* LexAVS.cxx */; };
1114D6CB1602A951001DC345 /* LexPO.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1114D6CA1602A951001DC345 /* LexPO.cxx */; };
@ -125,7 +126,7 @@
114B6F9D11FA75BE004FB6AB /* PropSetSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6F9411FA75BE004FB6AB /* PropSetSimple.cxx */; };
114B6F9E11FA75BE004FB6AB /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6F9511FA75BE004FB6AB /* StyleContext.cxx */; };
114B6F9F11FA75BE004FB6AB /* WordList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 114B6F9611FA75BE004FB6AB /* WordList.cxx */; };
114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FA011FA75DB004FB6AB /* ILexer.h */; };
114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FA011FA75DB004FB6AB /* ILexer.h */; settings = {ATTRIBUTES = (Public, ); }; };
114B6FBD11FA7623004FB6AB /* AutoComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FA211FA7623004FB6AB /* AutoComplete.h */; };
114B6FBE11FA7623004FB6AB /* CallTip.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FA311FA7623004FB6AB /* CallTip.h */; };
114B6FBF11FA7623004FB6AB /* Catalogue.h in Headers */ = {isa = PBXBuildFile; fileRef = 114B6FA411FA7623004FB6AB /* Catalogue.h */; };
@ -199,6 +200,9 @@
280056FC188DDD2C00F200AE /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056F9188DDD2C00F200AE /* StringCopy.h */; };
280056FD188DDD2C00F200AE /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 280056FA188DDD2C00F200AE /* SubStyles.h */; };
28064A05190F12E100E6E47F /* LexDMIS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28064A04190F12E100E6E47F /* LexDMIS.cxx */; };
281225362256DD2D00AFE50C /* UniqueString.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 281225352256DD2D00AFE50C /* UniqueString.cxx */; };
282D4A961F53FE270082E4D3 /* ILoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 282D4A951F53FE270082E4D3 /* ILoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
28804B2C1EEE232E00C0D154 /* DBCS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28804B2B1EEE232E00C0D154 /* DBCS.cxx */; };
28A067111A36B42600B4966A /* LexHex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28A067101A36B42600B4966A /* LexHex.cxx */; };
28A1DD51196BE0CA006EFCDD /* EditModel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28A1DD4E196BE0CA006EFCDD /* EditModel.cxx */; };
28A1DD52196BE0CA006EFCDD /* EditView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28A1DD4F196BE0CA006EFCDD /* EditView.cxx */; };
@ -213,24 +217,33 @@
28B6470F1B54C0720009DC49 /* LexMake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28B647091B54C0720009DC49 /* LexMake.cxx */; };
28B647101B54C0720009DC49 /* LexNull.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28B6470A1B54C0720009DC49 /* LexNull.cxx */; };
28B647111B54C0720009DC49 /* LexProps.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28B6470B1B54C0720009DC49 /* LexProps.cxx */; };
28BC38EC1B74C6AD008BF9EB /* Sci_Position.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BC38EB1B74C6AD008BF9EB /* Sci_Position.h */; settings = {ATTRIBUTES = (Public, ); }; };
28BDA1221EFB8F7C00EBD3F3 /* DefaultLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BDA1211EFB8F7C00EBD3F3 /* DefaultLexer.cxx */; };
28BDA1241EFB8FB200EBD3F3 /* DefaultLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BDA1231EFB8FB200EBD3F3 /* DefaultLexer.h */; };
28C40CA81CB7321200B089F2 /* LexJSON.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28C40CA71CB7321200B089F2 /* LexJSON.cxx */; };
28D191A21DEA72C800159938 /* LexEDIFACT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28D191A11DEA72C800159938 /* LexEDIFACT.cxx */; };
28D516D81830FFCA0047C93D /* info_bar_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */; };
28D516D91830FFCA0047C93D /* mac_cursor_busy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */; };
28D516DA1830FFCA0047C93D /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */; };
28FDA42119B6967B00BE27D7 /* LexBibTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28FDA42019B6967B00BE27D7 /* LexBibTeX.cxx */; };
3D994BD7A5EAC4FA5B3CFBDF /* LexMaxima.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 29B042978C1F93EF42F9E4AB /* LexMaxima.cxx */; };
5F804AA6B60FE695863A39FE /* LexStata.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7623427695416AB1270EE023 /* LexStata.cxx */; };
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
F437405F9F32C7DEFCA38C11 /* LexIndent.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */; };
FDC7442CAD70B9A67EF1639D /* LexSAS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */; };
AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */ = {isa = PBXBuildFile; fileRef = ADA64364A443F3E3F02D294E /* LexX12.cxx */; };
4D0C4365AB6DF998CD48B1FC /* LexLPeg.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 5EB3467789767C0ACE40A46A /* LexLPeg.cxx */; }; */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
1100F1E6178E393200105727 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = "<group>"; };
1100F1E7178E393200105727 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = "<group>"; };
1100F1E8178E393200105727 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = "<group>"; };
1100F1E9178E393200105727 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = "<group>"; };
1100F1EA178E393200105727 /* UnicodeFromUTF8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnicodeFromUTF8.h; path = ../../src/UnicodeFromUTF8.h; sourceTree = "<group>"; };
1102C31B169FB49300DC16AB /* LexLaTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLaTeX.cxx; path = ../../lexers/LexLaTeX.cxx; sourceTree = "<group>"; };
11126B8114CD3A6200803C49 /* LexAVS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVS.cxx; path = ../../lexers/LexAVS.cxx; sourceTree = "<group>"; };
1114D6CA1602A951001DC345 /* LexPO.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPO.cxx; path = ../../lexers/LexPO.cxx; sourceTree = "<group>"; };
@ -418,6 +431,10 @@
280056F9188DDD2C00F200AE /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = "<group>"; };
280056FA188DDD2C00F200AE /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = "<group>"; };
28064A04190F12E100E6E47F /* LexDMIS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMIS.cxx; path = ../../lexers/LexDMIS.cxx; sourceTree = "<group>"; };
281225352256DD2D00AFE50C /* UniqueString.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniqueString.cxx; path = ../../src/UniqueString.cxx; sourceTree = "<group>"; };
282D4A951F53FE270082E4D3 /* ILoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILoader.h; path = ../../include/ILoader.h; sourceTree = "<group>"; };
282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexIndent.cxx; path = ../../lexers/LexIndent.cxx; sourceTree = SOURCE_ROOT; };
28804B2B1EEE232E00C0D154 /* DBCS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DBCS.cxx; path = ../../src/DBCS.cxx; sourceTree = "<group>"; };
28A067101A36B42600B4966A /* LexHex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHex.cxx; path = ../../lexers/LexHex.cxx; sourceTree = "<group>"; };
28A1DD4E196BE0CA006EFCDD /* EditModel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditModel.cxx; path = ../../src/EditModel.cxx; sourceTree = "<group>"; };
28A1DD4F196BE0CA006EFCDD /* EditView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditView.cxx; path = ../../src/EditView.cxx; sourceTree = "<group>"; };
@ -432,14 +449,28 @@
28B647091B54C0720009DC49 /* LexMake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMake.cxx; path = ../../lexers/LexMake.cxx; sourceTree = "<group>"; };
28B6470A1B54C0720009DC49 /* LexNull.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNull.cxx; path = ../../lexers/LexNull.cxx; sourceTree = "<group>"; };
28B6470B1B54C0720009DC49 /* LexProps.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProps.cxx; path = ../../lexers/LexProps.cxx; sourceTree = "<group>"; };
28BC38EB1B74C6AD008BF9EB /* Sci_Position.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sci_Position.h; path = ../../include/Sci_Position.h; sourceTree = "<group>"; };
28BDA1211EFB8F7C00EBD3F3 /* DefaultLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DefaultLexer.cxx; path = ../../lexlib/DefaultLexer.cxx; sourceTree = "<group>"; };
28BDA1231EFB8FB200EBD3F3 /* DefaultLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefaultLexer.h; path = ../../lexlib/DefaultLexer.h; sourceTree = "<group>"; };
28C40CA71CB7321200B089F2 /* LexJSON.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexJSON.cxx; path = ../../lexers/LexJSON.cxx; sourceTree = "<group>"; };
28D1919E1DE69FC100159938 /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
28D191A11DEA72C800159938 /* LexEDIFACT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEDIFACT.cxx; path = ../../lexers/LexEDIFACT.cxx; sourceTree = "<group>"; };
28D516D51830FFCA0047C93D /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info_bar_bg@2x.png"; sourceTree = "<group>"; };
28D516D61830FFCA0047C93D /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_busy@2x.png"; sourceTree = "<group>"; };
28D516D71830FFCA0047C93D /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mac_cursor_flipped@2x.png"; sourceTree = "<group>"; };
28F2653B224C30D7000CF4A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
28FDA42019B6967B00BE27D7 /* LexBibTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBibTeX.cxx; path = ../../lexers/LexBibTeX.cxx; sourceTree = "<group>"; };
29B042978C1F93EF42F9E4AB /* LexMaxima.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMaxima.cxx; path = ../../lexers/LexMaxima.cxx; sourceTree = SOURCE_ROOT; };
32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; };
47814937A6B72D2B0F065B61 /* LexNim.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNim.cxx; path = ../../lexers/LexNim.cxx; sourceTree = SOURCE_ROOT; };
577F46B88F633198B56D088D /* LexCIL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCIL.cxx; path = ../../lexers/LexCIL.cxx; sourceTree = SOURCE_ROOT; };
7623427695416AB1270EE023 /* LexStata.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexStata.cxx; path = ../../lexers/LexStata.cxx; sourceTree = SOURCE_ROOT; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSAS.cxx; path = ../../lexers/LexSAS.cxx; sourceTree = SOURCE_ROOT; };
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
ADA64364A443F3E3F02D294E /* LexX12.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexX12.cxx; path = ../../lexers/LexX12.cxx; sourceTree = SOURCE_ROOT; };
5EB3467789767C0ACE40A46A /* LexLPeg.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLPeg.cxx; path = ../../lexers/LexLPeg.cxx; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -499,6 +530,7 @@
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
28D1919E1DE69FC100159938 /* module.modulemap */,
2744E4980FC167ED00E85C33 /* Source Files */,
2744E4970FC167E400E85C33 /* Header Files */,
);
@ -553,6 +585,7 @@
28FDA42019B6967B00BE27D7 /* LexBibTeX.cxx */,
114B6EC911FA7526004FB6AB /* LexBullant.cxx */,
114B6ECA11FA7526004FB6AB /* LexCaml.cxx */,
577F46B88F633198B56D088D /* LexCIL.cxx */,
114B6ECB11FA7526004FB6AB /* LexCLW.cxx */,
114B6ECC11FA7526004FB6AB /* LexCmake.cxx */,
114B6ECD11FA7526004FB6AB /* LexCOBOL.cxx */,
@ -567,6 +600,7 @@
11FF3FE11810EB3900E13F13 /* LexDMAP.cxx */,
28064A04190F12E100E6E47F /* LexDMIS.cxx */,
11BEB6A114EF189600BDE92A /* LexECL.cxx */,
28D191A11DEA72C800159938 /* LexEDIFACT.cxx */,
114B6ED411FA7526004FB6AB /* LexEiffel.cxx */,
114B6ED511FA7526004FB6AB /* LexErlang.cxx */,
28B647081B54C0720009DC49 /* LexErrorList.cxx */,
@ -579,23 +613,28 @@
114B6EDC11FA7526004FB6AB /* LexHaskell.cxx */,
28A067101A36B42600B4966A /* LexHex.cxx */,
114B6EDD11FA7526004FB6AB /* LexHTML.cxx */,
282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */,
114B6EDE11FA7526004FB6AB /* LexInno.cxx */,
28C40CA71CB7321200B089F2 /* LexJSON.cxx */,
114B6EDF11FA7526004FB6AB /* LexKix.cxx */,
11FDD0DF17C480D4001541B9 /* LexKVIrc.cxx */,
1102C31B169FB49300DC16AB /* LexLaTeX.cxx */,
114B6EE011FA7526004FB6AB /* LexLisp.cxx */,
114B6EE111FA7526004FB6AB /* LexLout.cxx */,
5EB3467789767C0ACE40A46A /* LexLPeg.cxx */,
114B6EE211FA7526004FB6AB /* LexLua.cxx */,
114B6EE311FA7526004FB6AB /* LexMagik.cxx */,
28B647091B54C0720009DC49 /* LexMake.cxx */,
114B6EE411FA7526004FB6AB /* LexMarkdown.cxx */,
114B6EE511FA7526004FB6AB /* LexMatlab.cxx */,
29B042978C1F93EF42F9E4AB /* LexMaxima.cxx */,
114B6EE611FA7526004FB6AB /* LexMetapost.cxx */,
114B6EE711FA7526004FB6AB /* LexMMIXAL.cxx */,
11BB124C12FF9C1300F6BCF7 /* LexModula.cxx */,
114B6EE811FA7526004FB6AB /* LexMPT.cxx */,
114B6EE911FA7526004FB6AB /* LexMSSQL.cxx */,
114B6EEA11FA7526004FB6AB /* LexMySQL.cxx */,
47814937A6B72D2B0F065B61 /* LexNim.cxx */,
114B6EEB11FA7526004FB6AB /* LexNimrod.cxx */,
114B6EEC11FA7526004FB6AB /* LexNsis.cxx */,
28B6470A1B54C0720009DC49 /* LexNull.cxx */,
@ -618,6 +657,7 @@
28A7D6041995E47D0062D204 /* LexRegistry.cxx */,
114B6EFB11FA7526004FB6AB /* LexRuby.cxx */,
1160E0371803651C00BCEBCB /* LexRust.cxx */,
A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */,
114B6EFC11FA7526004FB6AB /* LexScriptol.cxx */,
114B6EFD11FA7526004FB6AB /* LexSmalltalk.cxx */,
114B6EFE11FA7526004FB6AB /* LexSML.cxx */,
@ -625,6 +665,7 @@
114B6F0011FA7526004FB6AB /* LexSpecman.cxx */,
114B6F0111FA7526004FB6AB /* LexSpice.cxx */,
114B6F0211FA7526004FB6AB /* LexSQL.cxx */,
7623427695416AB1270EE023 /* LexStata.cxx */,
11FDAEB6174E1A9700FA161B /* LexSTTXT.cxx */,
114B6F0311FA7526004FB6AB /* LexTACL.cxx */,
114B6F0411FA7526004FB6AB /* LexTADS3.cxx */,
@ -637,6 +678,7 @@
114B6F0A11FA7526004FB6AB /* LexVerilog.cxx */,
114B6F0B11FA7526004FB6AB /* LexVHDL.cxx */,
11594BE8155B91DF0099E1FA /* LexVisualProlog.cxx */,
ADA64364A443F3E3F02D294E /* LexX12.cxx */,
114B6F0C11FA7526004FB6AB /* LexYAML.cxx */,
);
name = Lexers;
@ -657,6 +699,7 @@
114B6FA611FA7623004FB6AB /* CharClassify.h */,
114B6FA711FA7623004FB6AB /* ContractionState.h */,
114B6FA811FA7623004FB6AB /* Decoration.h */,
28BDA1231EFB8FB200EBD3F3 /* DefaultLexer.h */,
114B6FA911FA7623004FB6AB /* Document.h */,
28A1DD54196BE0ED006EFCDD /* EditModel.h */,
114B6FAA11FA7623004FB6AB /* Editor.h */,
@ -664,6 +707,7 @@
114B6FAB11FA7623004FB6AB /* ExternalLexer.h */,
114B6FAC11FA7623004FB6AB /* FontQuality.h */,
114B6FA011FA75DB004FB6AB /* ILexer.h */,
282D4A951F53FE270082E4D3 /* ILoader.h */,
114B6FAD11FA7623004FB6AB /* Indicator.h */,
114B6FAE11FA7623004FB6AB /* KeyMap.h */,
114B6FDA11FA7645004FB6AB /* LexAccessor.h */,
@ -688,7 +732,6 @@
114B6FB811FA7623004FB6AB /* Style.h */,
114B6FE111FA7645004FB6AB /* StyleContext.h */,
280056FA188DDD2C00F200AE /* SubStyles.h */,
1100F1EA178E393200105727 /* UnicodeFromUTF8.h */,
114B6FBA11FA7623004FB6AB /* UniConversion.h */,
114B6FBB11FA7623004FB6AB /* ViewStyle.h */,
114B6FE211FA7645004FB6AB /* WordList.h */,
@ -711,7 +754,9 @@
114B6F8F11FA75BE004FB6AB /* CharacterSet.cxx */,
114B6F6411FA7597004FB6AB /* CharClassify.cxx */,
114B6F6511FA7597004FB6AB /* ContractionState.cxx */,
28804B2B1EEE232E00C0D154 /* DBCS.cxx */,
114B6F6611FA7597004FB6AB /* Decoration.cxx */,
28BDA1211EFB8F7C00EBD3F3 /* DefaultLexer.cxx */,
114B6F6711FA7597004FB6AB /* Document.cxx */,
28A1DD4E196BE0CA006EFCDD /* EditModel.cxx */,
114B6F6811FA7597004FB6AB /* Editor.cxx */,
@ -735,6 +780,7 @@
114B6F7311FA7598004FB6AB /* Style.cxx */,
114B6F9511FA75BE004FB6AB /* StyleContext.cxx */,
114B6F7411FA7598004FB6AB /* UniConversion.cxx */,
281225352256DD2D00AFE50C /* UniqueString.cxx */,
114B6F7511FA7598004FB6AB /* ViewStyle.cxx */,
114B6F9611FA75BE004FB6AB /* WordList.cxx */,
114B6F7611FA7598004FB6AB /* XPM.cxx */,
@ -752,6 +798,7 @@
2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */,
119FF1BE13C9D1820007CE42 /* QuartzTextStyle.h */,
2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */,
28BC38EB1B74C6AD008BF9EB /* Sci_Position.h */,
2744E4870FC1678600E85C33 /* SciLexer.h */,
2744E4880FC1678600E85C33 /* Scintilla.h */,
2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */,
@ -800,9 +847,12 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
28BC38EC1B74C6AD008BF9EB /* Sci_Position.h in Headers */,
114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */,
2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */,
2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */,
2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */,
28BDA1241EFB8FB200EBD3F3 /* DefaultLexer.h in Headers */,
280056FB188DDD2C00F200AE /* SparseState.h in Headers */,
2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */,
2791F3C60FC19F71009DBCF9 /* PlatCocoa.h in Headers */,
@ -811,7 +861,6 @@
2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */,
2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */,
2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */,
114B6FA111FA75DB004FB6AB /* ILexer.h in Headers */,
114B6FBD11FA7623004FB6AB /* AutoComplete.h in Headers */,
114B6FBE11FA7623004FB6AB /* CallTip.h in Headers */,
114B6FBF11FA7623004FB6AB /* Catalogue.h in Headers */,
@ -819,6 +868,7 @@
114B6FC111FA7623004FB6AB /* CharClassify.h in Headers */,
114B6FC211FA7623004FB6AB /* ContractionState.h in Headers */,
114B6FC311FA7623004FB6AB /* Decoration.h in Headers */,
282D4A961F53FE270082E4D3 /* ILoader.h in Headers */,
114B6FC411FA7623004FB6AB /* Document.h in Headers */,
114B6FC511FA7623004FB6AB /* Editor.h in Headers */,
114B6FC611FA7623004FB6AB /* ExternalLexer.h in Headers */,
@ -858,7 +908,6 @@
11FBA39E17817DA00048C071 /* CharacterCategory.h in Headers */,
1100F1EC178E393200105727 /* CaseConvert.h in Headers */,
1100F1EE178E393200105727 /* CaseFolder.h in Headers */,
1100F1EF178E393200105727 /* UnicodeFromUTF8.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -890,7 +939,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */;
compatibilityVersion = "Xcode 3.2";
@ -901,6 +950,7 @@
Japanese,
French,
German,
Base,
);
mainGroup = 0867D691FE84028FC02AAC07 /* Scintilla */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
@ -938,6 +988,9 @@
2744E5B30FC168C500E85C33 /* PlatCocoa.mm in Sources */,
2744E5B50FC168C500E85C33 /* ScintillaCocoa.mm in Sources */,
2744E5B60FC168C500E85C33 /* ScintillaView.mm in Sources */,
28D191A21DEA72C800159938 /* LexEDIFACT.cxx in Sources */,
28BDA1221EFB8F7C00EBD3F3 /* DefaultLexer.cxx in Sources */,
281225362256DD2D00AFE50C /* UniqueString.cxx in Sources */,
114B6F0D11FA7526004FB6AB /* LexAbaqus.cxx in Sources */,
114B6F0E11FA7526004FB6AB /* LexAda.cxx in Sources */,
28B6470C1B54C0720009DC49 /* LexBatch.cxx in Sources */,
@ -955,6 +1008,7 @@
114B6F1911FA7526004FB6AB /* LexCaml.cxx in Sources */,
114B6F1A11FA7526004FB6AB /* LexCLW.cxx in Sources */,
114B6F1B11FA7526004FB6AB /* LexCmake.cxx in Sources */,
28C40CA81CB7321200B089F2 /* LexJSON.cxx in Sources */,
114B6F1C11FA7526004FB6AB /* LexCOBOL.cxx in Sources */,
114B6F1D11FA7526004FB6AB /* LexConf.cxx in Sources */,
28B647101B54C0720009DC49 /* LexNull.cxx in Sources */,
@ -993,6 +1047,7 @@
114B6F3911FA7526004FB6AB /* LexMySQL.cxx in Sources */,
114B6F3A11FA7526004FB6AB /* LexNimrod.cxx in Sources */,
114B6F3B11FA7526004FB6AB /* LexNsis.cxx in Sources */,
28804B2C1EEE232E00C0D154 /* DBCS.cxx in Sources */,
114B6F3C11FA7526004FB6AB /* LexOpal.cxx in Sources */,
114B6F3E11FA7526004FB6AB /* LexPascal.cxx in Sources */,
28B6470D1B54C0720009DC49 /* LexDiff.cxx in Sources */,
@ -1078,6 +1133,14 @@
11FDD0E017C480D4001541B9 /* LexKVIrc.cxx in Sources */,
1160E0381803651C00BCEBCB /* LexRust.cxx in Sources */,
11FF3FE21810EB3900E13F13 /* LexDMAP.cxx in Sources */,
F437405F9F32C7DEFCA38C11 /* LexIndent.cxx in Sources */,
4D0C4365AB6DF998CD48B1FC /* LexLPeg.cxx in Sources */,
3D994BD7A5EAC4FA5B3CFBDF /* LexMaxima.cxx in Sources */,
FDC7442CAD70B9A67EF1639D /* LexSAS.cxx in Sources */,
5F804AA6B60FE695863A39FE /* LexStata.cxx in Sources */,
0ED84236A703D57578EBFD2F /* LexNim.cxx in Sources */,
00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */,
AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1102,6 +1165,7 @@
CLANG_CXX_LIBRARY = "libc++";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = ".bzr *.nib *.lproj *.framework *.gch (*) CVS .svn *.xcodeproj *.xcode *.pbproj *.pbxproj";
@ -1112,7 +1176,6 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_NAMESPACE,
SCI_LEXER,
);
GCC_WARN_UNINITIALIZED_AUTOS = NO;
@ -1122,6 +1185,8 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7;
MODULEMAP_FILE = module.modulemap;
PRODUCT_BUNDLE_IDENTIFIER = "com.sun.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = Scintilla;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = framework;
@ -1135,6 +1200,7 @@
CLANG_CXX_LIBRARY = "libc++";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
@ -1142,7 +1208,6 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_NAMESPACE,
SCI_LEXER,
);
GCC_WARN_UNINITIALIZED_AUTOS = NO;
@ -1152,6 +1217,8 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7;
MODULEMAP_FILE = module.modulemap;
PRODUCT_BUNDLE_IDENTIFIER = "com.sun.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = Scintilla;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = framework;
@ -1161,10 +1228,27 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../../include,
@ -1180,9 +1264,25 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../../include,

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ScintillaFramework.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "Scintilla.framework"
BlueprintName = "Scintilla"
ReferencedContainer = "container:ScintillaFramework.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
enableAddressSanitizer = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "Scintilla.framework"
BlueprintName = "Scintilla"
ReferencedContainer = "container:ScintillaFramework.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,10 @@
framework module Scintilla {
umbrella header "ScintillaView.h"
module InfoBar {
header "InfoBar.h"
}
// ILexer.h is not included as Swift doesn't yet interoperate with C++
exclude header "ILexer.h"
export *
module * { export * }
}

View File

@ -15,10 +15,12 @@
@interface AppController : NSObject {
IBOutlet NSBox *mEditHost;
ScintillaView* mEditor;
ScintillaView* sciExtra; // For testing Scintilla tear-down
}
- (void) awakeFromNib;
- (void) setupEditor;
- (IBAction) searchText: (id) sender;
- (IBAction) addRemoveExtra: (id) sender;
@end

View File

@ -72,20 +72,30 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
[mEditor setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
// Let's load some text for the editor, as initial content.
NSError* error = nil;
NSString* path = [[NSBundle mainBundle] pathForResource: @"TestData"
ofType: @"sql" inDirectory: nil];
NSString* sql = [NSString stringWithContentsOfFile: path
encoding: NSUTF8StringEncoding
error: &error];
if (error && [[error domain] isEqual: NSCocoaErrorDomain])
NSLog(@"%@", error);
NSString *sql = [self exampleText];
[mEditor setString: sql];
[self setupEditor];
sciExtra = nil;
}
- (NSString *) exampleText
{
NSError* error = nil;
NSString* path = [[NSBundle mainBundle] pathForResource: @"TestData"
ofType: @"sql" inDirectory: nil];
NSString *sql = [NSString stringWithContentsOfFile: path
encoding: NSUTF8StringEncoding
error: &error];
if (error && [[error domain] isEqual: NSCocoaErrorDomain])
NSLog(@"%@", error);
return sql;
}
//--------------------------------------------------------------------------------------------------
@ -99,9 +109,6 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
[mEditor setGeneralProperty: SCI_SETLEXER parameter: SCLEX_MYSQL value: 0];
// alternatively: [mEditor setEditorProperty: SCI_SETLEXERLANGUAGE parameter: nil value: (sptr_t) "mysql"];
// Number of styles we use with this lexer.
[mEditor setGeneralProperty: SCI_SETSTYLEBITS value: [mEditor getGeneralProperty: SCI_GETSTYLEBITSNEEDED]];
// Keywords to highlight. Indices are:
// 0 - Major keywords (reserved keywords)
// 1 - Normal keywords (everything not reserved but integral part of the language)
@ -271,6 +278,26 @@ static const char * box_xpm[] = {
[self showAutocompletion];
}
- (IBAction) addRemoveExtra: (id) sender
{
if (sciExtra) {
[sciExtra removeFromSuperview];
sciExtra = nil;
} else {
NSRect newFrame = mEditHost.frame;
newFrame.origin.x += newFrame.size.width + 5;
newFrame.origin.y += 46;
newFrame.size.width = 96;
newFrame.size.height -= 60;
sciExtra = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];
[[[mEditHost window]contentView] addSubview: sciExtra];
[sciExtra setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 1];
NSString *sql = [self exampleText];
[sciExtra setString: sql];
}
}
-(IBAction) setFontQuality: (id) sender
{
[ScintillaView directCall:mEditor message:SCI_SETFONTQUALITY wParam:[sender tag] lParam:0];

View File

@ -0,0 +1,609 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/>
<capability name="box content view" minToolsVersion="7.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<menu title="AMainMenu" systemMenu="main" id="29" userLabel="MainMenu">
<items>
<menuItem title="NewApplication" id="56">
<menu key="submenu" title="NewApplication" systemMenu="apple" id="57">
<items>
<menuItem title="About NewApplication" id="58">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="236">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Preferences…" keyEquivalent="," id="129" userLabel="121"/>
<menuItem isSeparatorItem="YES" id="143">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Services" id="131">
<menu key="submenu" title="Services" systemMenu="services" id="130"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="144">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Hide NewApplication" keyEquivalent="h" id="134">
<connections>
<action selector="hide:" target="-1" id="367"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="145">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="-1" id="368"/>
</connections>
</menuItem>
<menuItem title="Show All" id="150">
<connections>
<action selector="unhideAllApplications:" target="-1" id="370"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="149">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Quit NewApplication" keyEquivalent="q" id="136" userLabel="1111">
<connections>
<action selector="terminate:" target="-3" id="449"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="File" id="83">
<menu key="submenu" title="File" id="81">
<items>
<menuItem title="New" keyEquivalent="n" id="82" userLabel="9">
<connections>
<action selector="newDocument:" target="-1" id="373"/>
</connections>
</menuItem>
<menuItem title="Open…" keyEquivalent="o" id="72">
<connections>
<action selector="openDocument:" target="-1" id="374"/>
</connections>
</menuItem>
<menuItem title="Open Recent" id="124">
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
<items>
<menuItem title="Clear Menu" id="126">
<connections>
<action selector="clearRecentDocuments:" target="-1" id="127"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="79" userLabel="7">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Close" keyEquivalent="w" id="73" userLabel="1">
<connections>
<action selector="performClose:" target="-1" id="193"/>
</connections>
</menuItem>
<menuItem title="Save" keyEquivalent="s" id="75" userLabel="3">
<connections>
<action selector="saveDocument:" target="-1" id="362"/>
</connections>
</menuItem>
<menuItem title="Save As…" keyEquivalent="S" id="80" userLabel="8">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="saveDocumentAs:" target="-1" id="363"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" id="112" userLabel="10">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="revertDocumentToSaved:" target="-1" id="364"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="74" userLabel="2">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Page Setup..." keyEquivalent="P" id="77" userLabel="5">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="-1" id="87"/>
</connections>
</menuItem>
<menuItem title="Print…" keyEquivalent="p" id="78" userLabel="6">
<connections>
<action selector="print:" target="-1" id="86"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="217">
<menu key="submenu" title="Edit" id="205">
<items>
<menuItem title="Undo" keyEquivalent="z" id="207">
<connections>
<action selector="undo:" target="-1" id="223"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="215">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="redo:" target="-1" id="231"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="206">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Cut" keyEquivalent="x" id="199">
<connections>
<action selector="cut:" target="-1" id="228"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="197">
<connections>
<action selector="copy:" target="-1" id="224"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="203">
<connections>
<action selector="paste:" target="-1" id="226"/>
</connections>
</menuItem>
<menuItem title="Delete" id="202">
<connections>
<action selector="delete:" target="-1" id="235"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="198">
<connections>
<action selector="selectAll:" target="-1" id="232"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="214">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Find" id="218">
<menu key="submenu" title="Find" id="220">
<items>
<menuItem title="Find…" tag="1" keyEquivalent="f" id="209">
<connections>
<action selector="performFindPanelAction:" target="-1" id="241"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="208"/>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221"/>
<menuItem title="Jump to Selection" keyEquivalent="j" id="210">
<connections>
<action selector="centerSelectionInVisibleArea:" target="-1" id="245"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="216">
<menu key="submenu" title="Spelling and Grammar" id="200">
<items>
<menuItem title="Show Spelling…" keyEquivalent=":" id="204">
<connections>
<action selector="showGuessPanel:" target="-1" id="230"/>
</connections>
</menuItem>
<menuItem title="Check Spelling" keyEquivalent=";" id="201">
<connections>
<action selector="checkSpelling:" target="-1" id="225"/>
</connections>
</menuItem>
<menuItem title="Check Spelling While Typing" id="219">
<connections>
<action selector="toggleContinuousSpellChecking:" target="-1" id="222"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="346">
<connections>
<action selector="toggleGrammarChecking:" target="-1" id="347"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="348">
<menu key="submenu" title="Substitutions" id="349">
<items>
<menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350">
<connections>
<action selector="toggleSmartInsertDelete:" target="-1" id="355"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351">
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="356"/>
</connections>
</menuItem>
<menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="-1" id="357"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="211">
<menu key="submenu" title="Speech" id="212">
<items>
<menuItem title="Start Speaking" id="196">
<connections>
<action selector="startSpeaking:" target="-1" id="233"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="195">
<connections>
<action selector="stopSpeaking:" target="-1" id="227"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Format" id="375">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Format" id="376">
<items>
<menuItem title="Font" id="377">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font" systemMenu="font" id="388">
<items>
<menuItem title="Show Fonts" keyEquivalent="t" id="389">
<connections>
<action selector="orderFrontFontPanel:" target="420" id="424"/>
</connections>
</menuItem>
<menuItem title="Bold" tag="2" keyEquivalent="b" id="390">
<connections>
<action selector="addFontTrait:" target="420" id="421"/>
</connections>
</menuItem>
<menuItem title="Italic" tag="1" keyEquivalent="i" id="391">
<connections>
<action selector="addFontTrait:" target="420" id="422"/>
</connections>
</menuItem>
<menuItem title="Underline" keyEquivalent="u" id="392">
<connections>
<action selector="underline:" target="-1" id="432"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="393"/>
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="394">
<connections>
<action selector="modifyFont:" target="420" id="425"/>
</connections>
</menuItem>
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="395">
<connections>
<action selector="modifyFont:" target="420" id="423"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="396"/>
<menuItem title="Kern" id="397">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Kern" id="415">
<items>
<menuItem title="Use Default" id="416">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardKerning:" target="-1" id="438"/>
</connections>
</menuItem>
<menuItem title="Use None" id="417">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffKerning:" target="-1" id="441"/>
</connections>
</menuItem>
<menuItem title="Tighten" id="418">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="tightenKerning:" target="-1" id="431"/>
</connections>
</menuItem>
<menuItem title="Loosen" id="419">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="loosenKerning:" target="-1" id="435"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Ligature" id="398">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Ligature" id="411">
<items>
<menuItem title="Use Default" id="412">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardLigatures:" target="-1" id="439"/>
</connections>
</menuItem>
<menuItem title="Use None" id="413">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffLigatures:" target="-1" id="440"/>
</connections>
</menuItem>
<menuItem title="Use All" id="414">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useAllLigatures:" target="-1" id="434"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Baseline" id="399">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Baseline" id="405">
<items>
<menuItem title="Use Default" id="406">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unscript:" target="-1" id="437"/>
</connections>
</menuItem>
<menuItem title="Superscript" id="407">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="superscript:" target="-1" id="430"/>
</connections>
</menuItem>
<menuItem title="Subscript" id="408">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="subscript:" target="-1" id="429"/>
</connections>
</menuItem>
<menuItem title="Raise" id="409">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="raiseBaseline:" target="-1" id="426"/>
</connections>
</menuItem>
<menuItem title="Lower" id="410">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowerBaseline:" target="-1" id="427"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Font Quality" id="469">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font Quality" id="470">
<items>
<menuItem title="Default" id="471">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="475"/>
</connections>
</menuItem>
<menuItem title="Non-antialiased" tag="1" id="472">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="476"/>
</connections>
</menuItem>
<menuItem title="Antialiased" tag="2" id="473">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="477"/>
</connections>
</menuItem>
<menuItem title="LCD Optimized" tag="3" id="474">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="478"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="400"/>
<menuItem title="Show Colors" keyEquivalent="C" id="401">
<connections>
<action selector="orderFrontColorPanel:" target="-1" id="433"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="402"/>
<menuItem title="Copy Style" keyEquivalent="c" id="403">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="copyFont:" target="-1" id="428"/>
</connections>
</menuItem>
<menuItem title="Paste Style" keyEquivalent="v" id="404">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteFont:" target="-1" id="436"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Text" id="378">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Text" id="379">
<items>
<menuItem title="Align Left" keyEquivalent="{" id="380">
<connections>
<action selector="alignLeft:" target="-1" id="442"/>
</connections>
</menuItem>
<menuItem title="Center" keyEquivalent="|" id="381">
<connections>
<action selector="alignCenter:" target="-1" id="445"/>
</connections>
</menuItem>
<menuItem title="Justify" id="382">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="alignJustified:" target="-1" id="443"/>
</connections>
</menuItem>
<menuItem title="Align Right" keyEquivalent="}" id="383">
<connections>
<action selector="alignRight:" target="-1" id="447"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="384"/>
<menuItem title="Show Ruler" id="385">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleRuler:" target="-1" id="446"/>
</connections>
</menuItem>
<menuItem title="Copy Ruler" keyEquivalent="c" id="386">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="copyRuler:" target="-1" id="444"/>
</connections>
</menuItem>
<menuItem title="Paste Ruler" keyEquivalent="v" id="387">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="pasteRuler:" target="-1" id="448"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="295">
<menu key="submenu" title="View" id="296">
<items>
<menuItem title="Show Toolbar" keyEquivalent="t" id="297">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="toggleToolbarShown:" target="-1" id="366"/>
</connections>
</menuItem>
<menuItem title="Customize Toolbar…" id="298">
<connections>
<action selector="runToolbarCustomizationPalette:" target="-1" id="365"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="K3d-cY-vZn"/>
<menuItem title="Add or Remove Extra Scintilla" keyEquivalent="d" id="zQU-z1-l5t">
<connections>
<action selector="addRemoveExtra:" target="450" id="9HG-Le-GbA"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="19">
<menu key="submenu" title="Window" systemMenu="window" id="24">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="23">
<connections>
<action selector="performMiniaturize:" target="-1" id="37"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="239">
<connections>
<action selector="performZoom:" target="-1" id="240"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="92">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Bring All to Front" id="5">
<connections>
<action selector="arrangeInFront:" target="-1" id="39"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="103" userLabel="1">
<menu key="submenu" title="Help" id="106" userLabel="2">
<items>
<menuItem title="NewApplication Help" keyEquivalent="?" id="111">
<connections>
<action selector="showHelp:" target="-1" id="360"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="58" width="982" height="692"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="982" height="692"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<box autoresizesSubviews="NO" borderType="line" title="Scintilla Editor" id="451">
<rect key="frame" x="17" y="16" width="844" height="606"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<view key="contentView" id="e8h-ir-tqU">
<rect key="frame" x="1" y="1" width="842" height="590"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
</box>
<button verticalHuggingPriority="750" id="452">
<rect key="frame" x="872" y="12" width="96" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Quit" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="453">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="terminate:" target="-3" id="455"/>
</connections>
</button>
<searchField wantsLayer="YES" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" id="466">
<rect key="frame" x="20" y="630" width="287" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" bezelStyle="round" id="467">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
<connections>
<action selector="searchText:" target="450" id="468"/>
</connections>
</searchField>
</subviews>
</view>
</window>
<customObject id="420" customClass="NSFontManager"/>
<customObject id="450" customClass="AppController">
<connections>
<outlet property="mEditHost" destination="451" id="454"/>
</connections>
</customObject>
</objects>
</document>

View File

@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.sun.${PRODUCT_NAME:identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@ -191,7 +191,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
LastUpgradeCheck = 0830;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
compatibilityVersion = "Xcode 3.2";
@ -202,6 +202,7 @@
Japanese,
French,
German,
Base,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;
projectDirPath = "";
@ -295,13 +296,13 @@
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_LEXER,
SCI_NAMESPACE,
);
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.sun.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = ScintillaTest;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "";
@ -320,13 +321,13 @@
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_LEXER,
SCI_NAMESPACE,
);
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.sun.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = ScintillaTest;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "";
@ -336,14 +337,18 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@ -363,11 +368,14 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ScintillaTest.xcodeproj">
</FileRef>
</Workspace>

View File

@ -23,7 +23,6 @@
#define WM_COMMAND 1001
#define WM_NOTIFY 1002
namespace Scintilla {
/**
* On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
* back to the parent. Therefore, there must be a callback handler that acts
@ -37,32 +36,16 @@ namespace Scintilla {
*/
typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
class ScintillaCocoa;
}
@class ScintillaView;
extern NSString *const SCIUpdateUINotification;
@protocol ScintillaNotificationProtocol
- (void)notification: (Scintilla::SCNotification*)notification;
- (void)notification: (SCNotification*)notification;
@end
/**
* SCIMarginView draws line numbers and other margins next to the text view.
*/
@interface SCIMarginView : NSRulerView
{
@private
int marginWidth;
ScintillaView *owner;
NSMutableArray *currentCursors;
}
@property (assign) int marginWidth;
@property (assign) ScintillaView *owner;
- (id)initWithScrollView:(NSScrollView *)aScrollView;
@interface SCIMarginView : NSRulerView;
@end
@ -74,49 +57,20 @@ extern NSString *const SCIUpdateUINotification;
NSTextInputClient,
NSUserInterfaceValidations,
NSDraggingSource,
NSDraggingDestination>
{
@private
ScintillaView* mOwner;
NSCursor* mCurrentCursor;
NSTrackingArea *trackingArea;
NSDraggingDestination,
NSAccessibilityStaticText>;
// Set when we are in composition mode and partial input is displayed.
NSRange mMarkedTextRange;
}
@property (nonatomic, assign) ScintillaView* owner;
- (void) setCursor: (int) cursor;
- (BOOL) canUndo;
- (BOOL) canRedo;
- (void) setCursor: (int) cursor; // Needed by ScintillaCocoa
@end
@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol>
{
@private
// The back end is kind of a controller and model in one.
// It uses the content view for display.
Scintilla::ScintillaCocoa* mBackend;
/**
* ScintillaView is the class instantiated by client code.
* It contains an NSScrollView which contains a SCIMarginView and a SCIContentView.
* It is responsible for providing an API and communicating to a delegate.
*/
@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol>;
// This is the actual content to which the backend renders itself.
SCIContentView* mContent;
NSScrollView *scrollView;
SCIMarginView *marginView;
CGFloat zoomDelta;
// Area to display additional controls (e.g. zoom info, caret position, status info).
NSView <InfoBarCommunicator>* mInfoBar;
BOOL mInfoBarAtTop;
id<ScintillaNotificationProtocol> mDelegate;
}
@property (nonatomic, readonly) Scintilla::ScintillaCocoa* backend;
@property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;
@property (nonatomic, readonly) NSScrollView *scrollView;
@ -127,7 +81,9 @@ extern NSString *const SCIUpdateUINotification;
- (void) setCallback: (id <InfoBarCommunicator>) callback;
- (void) suspendDrawing: (BOOL) suspend;
- (void) notification: (Scintilla::SCNotification*) notification;
- (void) notification: (SCNotification*) notification;
- (void) updateIndicatorIME;
// Scroller handling
- (void) setMarginWidth: (int) width;
@ -141,6 +97,7 @@ extern NSString *const SCIUpdateUINotification;
- (void) setEditable: (BOOL) editable;
- (BOOL) isEditable;
- (NSRange) selectedRange;
- (NSRange) selectedRangePositions;
- (NSString*) selectedString;
@ -177,7 +134,7 @@ extern NSString *const SCIUpdateUINotification;
- (NSString*) getLexerProperty: (NSString*) name;
// The delegate property should be used instead of registerNotifyCallback which is deprecated.
- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback __attribute__((deprecated));
- (void) registerNotifyCallback: (intptr_t) windowid value: (SciNotifyFunc) callback __attribute__((deprecated));
- (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;
- (void) setStatusText: (NSString*) text;

View File

@ -9,12 +9,22 @@
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#include <cmath>
#include <vector>
#import "Platform.h"
#import "ScintillaView.h"
#import "ScintillaCocoa.h"
using namespace Scintilla;
// Add backend property to ScintillaView as a private category.
// Specified here as backend accessed by SCIMarginView and SCIContentView.
@interface ScintillaView ()
@property (nonatomic, readonly) Scintilla::ScintillaCocoa* backend;
@end
// Two additional cursors we need, which aren't provided by Cocoa.
static NSCursor* reverseArrowCursor;
static NSCursor* waitCursor;
@ -46,8 +56,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
}
}
// Add marginWidth and owner properties as a private category.
@interface SCIMarginView ()
@property (assign) int marginWidth;
@property (nonatomic, assign) ScintillaView* owner;
@end
@implementation SCIMarginView
@implementation SCIMarginView {
int marginWidth;
ScintillaView *owner;
NSMutableArray *currentCursors;
}
@synthesize marginWidth, owner;
@ -64,6 +83,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
[currentCursors addObject: [reverseArrowCursor retain]];
}
[self setClientView:[aScrollView documentView]];
if ([self respondsToSelector: @selector(setAccessibilityLabel:)])
self.accessibilityLabel = @"Scintilla Margin";
}
return self;
}
@ -100,6 +121,21 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
}
}
/**
* Called by the framework if it wants to show a context menu for the margin.
*/
- (NSMenu*) menuForEvent: (NSEvent*) theEvent
{
NSMenu *menu = [owner menuForEvent: theEvent];
if (menu) {
return menu;
} else if (owner.backend->ShouldDisplayPopupOnMargin()) {
return owner.backend->CreateContextMenu(theEvent);
} else {
return nil;
}
}
- (void) mouseDown: (NSEvent *) theEvent
{
NSClipView *textView = [[self scrollView] contentView];
@ -107,6 +143,13 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
owner.backend->MouseDown(theEvent);
}
- (void) rightMouseDown: (NSEvent *) theEvent
{
[NSMenu popUpContextMenu:[self menuForEvent: theEvent] withEvent:theEvent forView:self];
owner.backend->RightMouseDown(theEvent);
}
- (void) mouseDragged: (NSEvent *) theEvent
{
owner.backend->MouseMove(theEvent);
@ -122,6 +165,12 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
owner.backend->MouseUp(theEvent);
}
// Not a simple button so return failure
- (BOOL)accessibilityPerformPress
{
return NO;
}
/**
* This method is called to give us the opportunity to define our mouse sensitive rectangle.
*/
@ -148,7 +197,19 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
@end
@implementation SCIContentView
// Add owner property as a private category.
@interface SCIContentView ()
@property (nonatomic, assign) ScintillaView* owner;
@end
@implementation SCIContentView {
ScintillaView* mOwner;
NSCursor* mCurrentCursor;
NSTrackingArea *trackingArea;
// Set when we are in composition mode and partial input is displayed.
NSRange mMarkedTextRange;
}
@synthesize owner = mOwner;
@ -167,6 +228,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
[self registerForDraggedTypes: [NSArray arrayWithObjects:
NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]];
// Set up accessibility in the text role
if ([self respondsToSelector: @selector(setAccessibilityElement:)])
{
self.accessibilityElement = TRUE;
self.accessibilityEnabled = TRUE;
self.accessibilityLabel = NSLocalizedString(@"Scintilla", nil); // No real localization
self.accessibilityRoleDescription = @"source code editor";
self.accessibilityRole = NSAccessibilityTextAreaRole;
self.accessibilityIdentifier = @"Scintilla";
}
}
return self;
@ -180,8 +252,11 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (void) updateTrackingAreas
{
if (trackingArea)
{
[self removeTrackingArea:trackingArea];
[trackingArea release];
}
int opts = (NSTrackingActiveAlways | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved);
trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]
options:opts
@ -199,7 +274,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (void) setFrame: (NSRect) frame
{
[super setFrame: frame];
mOwner.backend->Resize();
}
@ -230,7 +305,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
[super resetCursorRects];
// We only have one cursor rect: our bounds.
[self addCursorRect: [self bounds] cursor: mCurrentCursor];
const NSRect visibleBounds = mOwner.backend->GetBounds();
[self addCursorRect: visibleBounds cursor: mCurrentCursor];
[mCurrentCursor setOnMouseEntered: YES];
}
@ -241,6 +317,11 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
*/
- (void) viewWillDraw
{
if (!mOwner) {
[super viewWillDraw];
return;
}
const NSRect *rects;
NSInteger nRects = 0;
[self getRectsBeingDrawn:&rects count:&nRects];
@ -261,7 +342,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
*/
- (void) prepareContentInRect: (NSRect) rect
{
mOwner.backend->WillDraw(rect);
if (mOwner)
mOwner.backend->WillDraw(rect);
#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080
[super prepareContentInRect: rect];
#endif
@ -332,10 +414,14 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
*/
- (NSMenu*) menuForEvent: (NSEvent*) theEvent
{
if (![mOwner respondsToSelector: @selector(menuForEvent:)])
NSMenu *menu = [mOwner menuForEvent: theEvent];
if (menu) {
return menu;
} else if (mOwner.backend->ShouldDisplayPopupOnText()) {
return mOwner.backend->CreateContextMenu(theEvent);
else
return [mOwner menuForEvent: theEvent];
} else {
return nil;
}
}
//--------------------------------------------------------------------------------------------------
@ -344,6 +430,10 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
{
const NSInteger lengthCharacters = self.accessibilityNumberOfCharacters;
if (aRange.location > lengthCharacters) {
return nil;
}
const NSRange posRange = mOwner.backend->PositionsFromCharacters(aRange);
// The backend validated aRange and may have removed characters beyond the end of the document.
const NSRange charRange = mOwner.backend->CharactersFromPositions(posRange);
@ -355,11 +445,14 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
[mOwner message: SCI_SETTARGETRANGE wParam: posRange.location lParam: NSMaxRange(posRange)];
std::string text([mOwner message: SCI_TARGETASUTF8] + 1, 0);
[mOwner message: SCI_TARGETASUTF8 wParam: 0 lParam: reinterpret_cast<sptr_t>(&text[0])];
text = FixInvalidUTF8(text);
NSString *result = [NSString stringWithUTF8String: text.c_str()];
NSMutableAttributedString *asResult = [[[NSMutableAttributedString alloc] initWithString:result] autorelease];
const NSRange rangeAS = NSMakeRange(0, [asResult length]);
const long style = [mOwner message: SCI_GETSTYLEAT wParam:posRange.location];
// SCI_GETSTYLEAT reports a signed byte but want an unsigned to index into styles
const char styleByte = static_cast<char>([mOwner message: SCI_GETSTYLEAT wParam:posRange.location]);
const long style = static_cast<unsigned char>(styleByte);
std::string fontName([mOwner message: SCI_STYLEGETFONT wParam:style lParam:0] + 1, 0);
[mOwner message: SCI_STYLEGETFONT wParam:style lParam:(sptr_t)&fontName[0]];
const CGFloat fontSize = [mOwner message: SCI_STYLEGETSIZEFRACTIONAL wParam:style] / 100.0f;
@ -396,7 +489,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (void) doCommandBySelector: (SEL) selector
{
if ([self respondsToSelector: @selector(selector)])
if ([self respondsToSelector: selector])
[self performSelector: selector withObject: nil];
}
@ -404,6 +497,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (NSRect) firstRectForCharacterRange: (NSRange) aRange actualRange: (NSRangePointer) actualRange
{
#pragma unused(actualRange)
const NSRange posRange = mOwner.backend->PositionsFromCharacters(aRange);
NSRect rect;
@ -483,9 +577,21 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (NSRange) selectedRange
{
const long positionBegin = [mOwner message: SCI_GETSELECTIONSTART];
const long positionEnd = [mOwner message: SCI_GETSELECTIONEND];
NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);
const NSRange posRangeSel = [mOwner selectedRangePositions];
if (posRangeSel.length == 0)
{
NSTextInputContext *tic = [NSTextInputContext currentInputContext];
// Chinese input causes malloc crash when empty selection returned with actual
// position so return NSNotFound.
// If this is applied to European input, it stops the accented character
// chooser from appearing.
// May need to add more input source names.
if ([tic.selectedKeyboardInputSource
isEqualToString:@"com.apple.inputmethod.TCIM.Cangjie"])
{
return NSMakeRange(NSNotFound, 0);
}
}
return mOwner.backend->CharactersFromPositions(posRangeSel);
}
@ -530,7 +636,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
// Must perform deletion before entering composition mode or else
// both document and undo history will not contain the deleted text
// leading to an inaccurate and unusable undo history.
// Convert selection virtual space into real space
mOwner.backend->ConvertSelectionVirtualSpace();
@ -549,7 +655,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
}
// Ensure only a single selection.
mOwner.backend->SelectOnlyMainSelection();
replacementRange = [self selectedRange];
const NSRange posRangeSel = [mOwner selectedRangePositions];
replacementRange = mOwner.backend->CharactersFromPositions(posRangeSel);
}
}
@ -561,11 +668,11 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
{
// Switching into composition.
mOwner.backend->CompositionStart();
NSRange posRangeCurrent = mOwner.backend->PositionsFromCharacters(NSMakeRange(replacementRange.location, 0));
// Note: Scintilla internally works almost always with bytes instead chars, so we need to take
// this into account when determining selection ranges and such.
int lengthInserted = mOwner.backend->InsertText(newText);
ptrdiff_t lengthInserted = mOwner.backend->InsertText(newText);
posRangeCurrent.length = lengthInserted;
mMarkedTextRange = mOwner.backend->CharactersFromPositions(posRangeCurrent);
// Mark the just inserted text. Keep the marked range for later reset.
@ -606,7 +713,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (NSArray*) validAttributesForMarkedText
{
return nil;
return @[];
}
// End of the NSTextInputClient protocol adoption.
@ -620,10 +727,13 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
*/
- (void) keyDown: (NSEvent *) theEvent
{
bool handled = false;
if (mMarkedTextRange.length == 0)
mOwner.backend->KeyboardInput(theEvent);
NSArray* events = [NSArray arrayWithObject: theEvent];
[self interpretKeyEvents: events];
handled = mOwner.backend->KeyboardInput(theEvent);
if (!handled) {
NSArray* events = [NSArray arrayWithObject: theEvent];
[self interpretKeyEvents: events];
}
}
//--------------------------------------------------------------------------------------------------
@ -671,21 +781,21 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
//--------------------------------------------------------------------------------------------------
/**
* Mouse wheel with command key magnifies text.
* Enabling this code causes visual garbage to appear when scrolling
* horizontally on OS X 10.9 with a retina display.
* Pinch gestures and key commands can be used for magnification.
* Implementing scrollWheel makes scrolling work better even if just
* calling super.
* Mouse wheel with command key may magnify text if enabled.
* Pinch gestures and key commands can also be used for magnification.
*/
#ifdef SCROLL_WHEEL_MAGNIFICATION
- (void) scrollWheel: (NSEvent *) theEvent
{
#ifdef SCROLL_WHEEL_MAGNIFICATION
if (([theEvent modifierFlags] & NSCommandKeyMask) != 0) {
mOwner.backend->MouseWheel(theEvent);
} else {
[super scrollWheel:theEvent];
return;
}
}
#endif
[super scrollWheel:theEvent];
}
//--------------------------------------------------------------------------------------------------
@ -694,6 +804,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
*/
- (NSRect)adjustScroll:(NSRect)proposedVisibleRect
{
if (!mOwner)
return proposedVisibleRect;
NSRect rc = proposedVisibleRect;
// Snap to lines
NSRect contentRect = [self bounds];
@ -703,6 +815,13 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
long lineHeight = mOwner.backend->WndProc(SCI_TEXTHEIGHT, 0, 0);
rc.origin.y = roundf(static_cast<XYPOSITION>(rc.origin.y) / lineHeight) * lineHeight;
}
// Snap to whole points - on retina displays this avoids visual debris
// when scrolling horizontally.
if ((rc.origin.x > 0) && (NSMaxX(rc) < contentRect.size.width)) {
// Only snap for positions inside the document - allow outside
// for overshoot.
rc.origin.x = roundf(static_cast<XYPOSITION>(rc.origin.x));
}
return rc;
}
@ -737,11 +856,12 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (NSDragOperation)draggingSession: (NSDraggingSession *) session
sourceOperationMaskForDraggingContext: (NSDraggingContext) context
{
#pragma unused(session)
switch(context)
{
case NSDraggingContextOutsideApplication:
return NSDragOperationCopy | NSDragOperationMove | NSDragOperationDelete;
case NSDraggingContextWithinApplication:
default:
return NSDragOperationCopy | NSDragOperationMove | NSDragOperationDelete;
@ -751,12 +871,14 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
- (void)draggingSession:(NSDraggingSession *)session
movedToPoint:(NSPoint)screenPoint
{
#pragma unused(session, screenPoint)
}
- (void)draggingSession:(NSDraggingSession *)session
endedAtPoint:(NSPoint)screenPoint
operation:(NSDragOperation)operation
{
#pragma unused(session, screenPoint)
if (operation == NSDragOperationDelete)
{
mOwner.backend->WndProc(SCI_CLEAR, 0, 0);
@ -919,11 +1041,228 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
return mOwner.backend->WndProc(SCI_GETREADONLY, 0, 0) == 0;
}
#pragma mark - NSAccessibility
//--------------------------------------------------------------------------------------------------
// Adoption of NSAccessibility protocol.
// NSAccessibility wants to pass ranges in UTF-16 code units, not bytes (like Scintilla)
// or characters.
// Needs more testing with non-ASCII and non-BMP text.
// Needs to take account of folding and wraping.
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Text of the whole document as a string.
*/
- (id) accessibilityValue {
const sptr_t length = [mOwner message: SCI_GETLENGTH];
return mOwner.backend->RangeTextAsString(NSMakeRange(0, length));
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Line of the caret.
*/
- (NSInteger) accessibilityInsertionPointLineNumber {
const Sci::Position caret = [mOwner message: SCI_GETCURRENTPOS];
const NSRange rangeCharactersCaret = mOwner.backend->CharactersFromPositions(NSMakeRange(caret, 0));
return mOwner.backend->VisibleLineForIndex(rangeCharactersCaret.location);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Not implemented and not called by VoiceOver.
*/
- (NSRange)accessibilityRangeForPosition:(NSPoint)point {
return NSMakeRange(0,0);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Number of characters in the whole document.
*/
- (NSInteger) accessibilityNumberOfCharacters {
sptr_t length = [mOwner message: SCI_GETLENGTH];
const NSRange posRange = mOwner.backend->CharactersFromPositions(NSMakeRange(length, 0));
return posRange.location;
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : The selection text as a string.
*/
- (NSString *) accessibilitySelectedText {
const sptr_t positionBegin = [mOwner message: SCI_GETSELECTIONSTART];
const sptr_t positionEnd = [mOwner message: SCI_GETSELECTIONEND];
const NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);
return mOwner.backend->RangeTextAsString(posRangeSel);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : The character range of the main selection.
*/
- (NSRange) accessibilitySelectedTextRange {
const sptr_t positionBegin = [mOwner message: SCI_GETSELECTIONSTART];
const sptr_t positionEnd = [mOwner message: SCI_GETSELECTIONEND];
const NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);
return mOwner.backend->CharactersFromPositions(posRangeSel);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : The setter for accessibilitySelectedTextRange.
* This method is the only setter required for reasonable VoiceOver behaviour.
*/
- (void) setAccessibilitySelectedTextRange: (NSRange) range {
NSRange rangePositions = mOwner.backend->PositionsFromCharacters(range);
[mOwner message: SCI_SETSELECTION wParam: rangePositions.location lParam:NSMaxRange(rangePositions)];
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Range of the glyph at a character index.
* Currently doesn't try to handle composite characters.
*/
- (NSRange) accessibilityRangeForIndex: (NSInteger)index {
sptr_t length = [mOwner message: SCI_GETLENGTH];
const NSRange rangeLength = mOwner.backend->CharactersFromPositions(NSMakeRange(length, 0));
NSRange rangePositions = NSMakeRange(length, 0);
if (index < rangeLength.location) {
rangePositions = mOwner.backend->PositionsFromCharacters(NSMakeRange(index, 1));
}
return mOwner.backend->CharactersFromPositions(rangePositions);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : All the text ranges.
* Currently only returns the main selection.
*/
- (NSArray<NSValue *>*) accessibilitySelectedTextRanges {
const sptr_t positionBegin = [mOwner message: SCI_GETSELECTIONSTART];
const sptr_t positionEnd = [mOwner message: SCI_GETSELECTIONEND];
const NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);
NSRange rangeCharacters = mOwner.backend->CharactersFromPositions(posRangeSel);
NSValue *valueRange = [NSValue valueWithRange:(NSRange)rangeCharacters];
return @[valueRange];
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Character range currently visible.
*/
- (NSRange) accessibilityVisibleCharacterRange {
const sptr_t lineTopVisible = [mOwner message: SCI_GETFIRSTVISIBLELINE];
const sptr_t lineTop = [mOwner message:SCI_DOCLINEFROMVISIBLE wParam:lineTopVisible];
const sptr_t lineEndVisible = lineTopVisible + [mOwner message: SCI_LINESONSCREEN] - 1;
const sptr_t lineEnd = [mOwner message:SCI_DOCLINEFROMVISIBLE wParam:lineEndVisible];
const sptr_t posStartView = [mOwner message: SCI_POSITIONFROMLINE wParam: lineTop];
const sptr_t posEndView = [mOwner message: SCI_GETLINEENDPOSITION wParam: lineEnd];
const NSRange posRangeSel = NSMakeRange(posStartView, posEndView-posStartView);
return mOwner.backend->CharactersFromPositions(posRangeSel);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Character range of a line.
*/
- (NSRange)accessibilityRangeForLine:(NSInteger)line {
return mOwner.backend->RangeForVisibleLine(line);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Line number of a text position in characters.
*/
- (NSInteger)accessibilityLineForIndex:(NSInteger)index {
return mOwner.backend->VisibleLineForIndex(index);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : A rectangle that covers a range which will be shown as the
* VoiceOver cursor.
* Producing a nice rectangle is a little tricky particularly when including new
* lines. Needs to improve the case where parts of two lines are included.
*/
- (NSRect)accessibilityFrameForRange:(NSRange)range {
const NSRect rectInView = mOwner.backend->FrameForRange(range);
const NSRect rectInWindow = [[[self superview] superview] convertRect:rectInView toView:nil];
return [self.window convertRectToScreen:rectInWindow];
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : A range of text as a string.
*/
- (NSString *) accessibilityStringForRange:(NSRange)range {
const NSRange posRange = mOwner.backend->PositionsFromCharacters(range);
return mOwner.backend->RangeTextAsString(posRange);
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : A range of text as an attributed string.
* Currently no attributes are set.
*/
- (NSAttributedString *) accessibilityAttributedStringForRange:(NSRange)range {
const NSRange posRange = mOwner.backend->PositionsFromCharacters(range);
NSString *result = mOwner.backend->RangeTextAsString(posRange);
return [[[NSMutableAttributedString alloc] initWithString:result] autorelease];
}
//--------------------------------------------------------------------------------------------------
/**
* NSAccessibility : Show the context menu at the caret.
*/
- (BOOL)accessibilityPerformShowMenu {
const sptr_t caret = [mOwner message: SCI_GETCURRENTPOS];
NSRect rect;
rect.origin.x = [mOwner message: SCI_POINTXFROMPOSITION wParam: 0 lParam: caret];
rect.origin.y = [mOwner message: SCI_POINTYFROMPOSITION wParam: 0 lParam: caret];
rect.origin.y += [mOwner message: SCI_TEXTHEIGHT wParam: 0 lParam: 0];
rect.size.width = 1.0;
rect.size.height = 1.0;
NSRect rectInWindow = [[[self superview] superview] convertRect:rect toView:nil];
NSPoint pt = rectInWindow.origin;
NSEvent *event = [NSEvent mouseEventWithType: NSRightMouseDown
location: pt
modifierFlags: 0
timestamp: 0
windowNumber: [[self window] windowNumber]
context: nil
eventNumber: 0
clickCount: 1
pressure: 0.0];
NSMenu *menu = mOwner.backend->CreateContextMenu(event);
[NSMenu popUpContextMenu:menu withEvent:event forView:self];
return YES;
}
//--------------------------------------------------------------------------------------------------
- (void) dealloc
{
[mCurrentCursor release];
[trackingArea release];
[super dealloc];
}
@ -931,7 +1270,25 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
//--------------------------------------------------------------------------------------------------
@implementation ScintillaView
@implementation ScintillaView {
// The back end is kind of a controller and model in one.
// It uses the content view for display.
Scintilla::ScintillaCocoa* mBackend;
// This is the actual content to which the backend renders itself.
SCIContentView* mContent;
NSScrollView *scrollView;
SCIMarginView *marginView;
CGFloat zoomDelta;
// Area to display additional controls (e.g. zoom info, caret position, status info).
NSView <InfoBarCommunicator>* mInfoBar;
BOOL mInfoBarAtTop;
id<ScintillaNotificationProtocol> mDelegate;
}
@synthesize backend = mBackend;
@synthesize delegate = mDelegate;
@ -960,7 +1317,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
path = [bundle pathForResource: @"mac_cursor_flipped" ofType: @"tiff" inDirectory: nil];
image = [[[NSImage alloc] initWithContentsOfFile: path] autorelease];
reverseArrowCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(12, 2)];
reverseArrowCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(15, 2)];
}
}
@ -985,7 +1342,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
zoomDelta += event.magnification * 10.0;
if (fabs(zoomDelta)>=1.0) {
if (std::abs(zoomDelta)>=1.0) {
long zoomFactor = static_cast<long>([self getGeneralProperty: SCI_GETZOOM] + zoomDelta);
[self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value:0];
zoomDelta = 0.0;
@ -1072,7 +1429,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
* A delegate can be set to receive all notifications. If set no handling takes place here, except
* for action pertaining to internal stuff (like the info bar).
*/
- (void) notification: (Scintilla::SCNotification*)scn
- (void) notification: (SCNotification*)scn
{
// Parent notification. Details are passed as SCNotification structure.
@ -1135,6 +1492,21 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
//--------------------------------------------------------------------------------------------------
/**
* Setup a special indicator used in the editor to provide visual feedback for
* input composition, depending on language, keyboard etc.
*/
- (void) updateIndicatorIME
{
[self setColorProperty: SCI_INDICSETFORE parameter: INDIC_IME fromHTML: @"#FF0000"];
const bool drawInBackground = [self message: SCI_GETPHASESDRAW] != 0;
[self setGeneralProperty: SCI_INDICSETUNDER parameter: INDIC_IME value: drawInBackground];
[self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDIC_IME value: INDIC_PLAIN];
[self setGeneralProperty: SCI_INDICSETALPHA parameter: INDIC_IME value: 100];
}
//--------------------------------------------------------------------------------------------------
/**
* Initialization of the view. Used to setup a few other things we need.
*/
@ -1168,18 +1540,13 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
[scrollView setHasVerticalRuler:YES];
[scrollView setRulersVisible:YES];
mBackend = new ScintillaCocoa(mContent, marginView);
mBackend = new ScintillaCocoa(self, mContent, marginView);
// Establish a connection from the back end to this container so we can handle situations
// which require our attention.
mBackend->SetDelegate(self);
// Setup a special indicator used in the editor to provide visual feedback for
// input composition, depending on language, keyboard etc.
[self setColorProperty: SCI_INDICSETFORE parameter: INDIC_IME fromHTML: @"#FF0000"];
[self setGeneralProperty: SCI_INDICSETUNDER parameter: INDIC_IME value: 1];
[self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDIC_IME value: INDIC_PLAIN];
[self setGeneralProperty: SCI_INDICSETALPHA parameter: INDIC_IME value: 100];
[self updateIndicatorIME];
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self
@ -1196,7 +1563,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
selector:@selector(windowWillMove:)
name:NSWindowWillMoveNotification
object:[self window]];
[[scrollView contentView] setPostsBoundsChangedNotifications:YES];
[center addObserver:self
selector:@selector(scrollerAction:)
@ -1211,7 +1578,12 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
- (void) dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
mBackend->Finalise();
delete mBackend;
mBackend = NULL;
mContent.owner = nil;
[marginView setClientView:nil];
[scrollView removeFromSuperview];
[marginView release];
[super dealloc];
}
@ -1310,6 +1682,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
*/
- (void) scrollerAction: (id) sender
{
#pragma unused(sender)
mBackend->UpdateForScroll();
}
@ -1695,7 +2068,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
/**
* Sets the notification callback
*/
- (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback
- (void) registerNotifyCallback: (intptr_t) windowid value: (SciNotifyFunc) callback
{
mBackend->RegisterNotifyCallback(windowid, callback);
}
@ -1744,6 +2117,21 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context
return [mContent selectedRange];
}
//--------------------------------------------------------------------------------------------------
/**
* Return the main selection as an NSRange of positions (not characters).
* Unlike selectedRange, this can return empty ranges inside the document.
*/
- (NSRange) selectedRangePositions
{
const sptr_t positionBegin = [self message: SCI_GETSELECTIONSTART];
const sptr_t positionEnd = [self message: SCI_GETSELECTIONEND];
return NSMakeRange(positionBegin, positionEnd-positionBegin);
}
//--------------------------------------------------------------------------------------------------
- (void)insertText: (id) aString

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,81 @@
// File to suppress cppcheck warnings for files that will not be fixed.
// Does not suppress warnings where an additional occurrence of the warning may be of interest.
// Coding style is to use assignments in constructor when there are many
// members to initialize or the initialization is complex or has comments.
useInitializationList
// These may be interesting but its not clear without examining each instance closely
// Would have to ensure that any_of/all_of has same early/late exits as current code and
// produces same result on empty collections
useStlAlgorithm
// The two sections are for different purposes: C1 control set and UTF-8 invalid bytes
duplicateCondition:scintilla/src/Editor.cxx
// Some non-explicit constructors are used for conversions or are private to lexers
noExplicitConstructor
// Document is checking for a change by called methods and cppcheck isn't considering escape
knownConditionTrueFalse:scintilla/src/Document.cxx
// ScintillaDocument is providing an API and there are no consumers of the API inside Scintilla
unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp
// moc_ files are not understood by cppcheck
noValidConfiguration
// The performance cost of by-value passing is often small and using a reference decreases
// code legibility.
passedByValue
// Suppress most lexer warnings since the lexers are maintained by others
redundantCondition:scintilla/lexers/LexA68k.cxx
shadowVar:scintilla/lexers/LexAU3.cxx
unreadVariable:scintilla/lexers/LexBaan.cxx
uninitMemberVar:scintilla/lexers/LexBash.cxx
variableScope:scintilla/lexers/LexBash.cxx
variableScope:scintilla/lexers/LexBatch.cxx
variableScope:scintilla/lexers/LexCmake.cxx
variableScope:scintilla/lexers/LexCSS.cxx
variableScope:scintilla/lexers/LexErlang.cxx
variableScope:scintilla/lexers/LexGui4Cli.cxx
variableScope:scintilla/lexers/LexInno.cxx
variableScope:scintilla/lexers/LexLaTeX.cxx
unreadVariable:scintilla/lexers/LexMatlab.cxx
variableScope:scintilla/lexers/LexMetapost.cxx
variableScope:scintilla/lexers/LexModula.cxx
variableScope:scintilla/lexers/LexMSSQL.cxx
variableScope:scintilla/lexers/LexNimrod.cxx
variableScope:scintilla/lexers/LexNsis.cxx
variableScope:scintilla/lexers/LexOpal.cxx
variableScope:scintilla/lexers/LexPB.cxx
shadowVar:scintilla/lexers/LexPowerPro.cxx
variableScope:scintilla/lexers/LexProgress.cxx
redundantAssignment:scintilla/lexers/LexRegistry.cxx
variableScope:scintilla/lexers/LexRuby.cxx
uninitMemberVar:scintilla/lexers/LexRuby.cxx
variableScope:scintilla/lexers/LexSpecman.cxx
unreadVariable:scintilla/lexers/LexSpice.cxx
clarifyCalculation:scintilla/lexers/LexTADS3.cxx
invalidscanf:scintilla/lexers/LexTCMD.cxx
knownConditionTrueFalse:scintilla/lexers/LexTCMD.cxx
variableScope:scintilla/lexers/LexTeX.cxx
knownConditionTrueFalse:scintilla/lexers/LexVerilog.cxx
constArgument:scintilla/lexers/LexVerilog.cxx
shadowVar:scintilla/lexers/LexVHDL.cxx
unreadVariable:scintilla/lexers/LexVHDL.cxx
variableScope:scintilla/lexers/LexVHDL.cxx
unreadVariable:scintilla/lexers/LexVisualProlog.cxx
// bp.itBracket not actually redundant as needed by return statements
redundantAssignment:scintilla/lexers/LexCPP.cxx
// safety initializations at start of GetCharacterExtents
redundantAssignment:scintilla/gtk/ScintillaGTKAccessible.cxx
// Suppress everything in catch.hpp as won't be changing
*:scintilla/test/unit/catch.hpp
// For now, suppress all test source files as, since Catch 2, cppcheck shows many warnings showing
// it doesn't understand the REQUIRE macro
*:scintilla/test/unit/*.cxx

View File

@ -0,0 +1,52 @@
# Copyright 2012-2019 Mitchell mitchell.att.foicica.com. See License.txt.
.SUFFIXES: .cxx .c .o .h .a
AR = ar
CC = gcc
CXX = g++
INCLUDEDIRS = -I ../include -I ../src -I ../lexlib
CFLAGS = -std=c99 -pedantic -Wall
CXXFLAGS = -std=c++11 -pedantic -DCURSES -DSCI_LEXER $(INCLUDEDIRS) -Wall
ifdef DEBUG
CXXFLAGS += -DDEBUG -g
else
CXXFLAGS += -DNDEBUG -Os
endif
CURSES_FLAGS =
scintilla = ../bin/scintilla.a
sci = AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o Catalogue.o \
CellBuffer.o CharacterCategory.o CharClassify.o ContractionState.o \
DBCS.o Decoration.o Document.o EditModel.o Editor.o EditView.o \
ExternalLexer.o Indicator.o KeyMap.o LineMarker.o MarginView.o PerLine.o \
PositionCache.o RESearch.o RunStyles.o ScintillaBase.o Selection.o \
Style.o UniConversion.o UniqueString.o ViewStyle.o XPM.o \
Accessor.o CharacterSet.o DefaultLexer.o LexerBase.o LexerModule.o \
LexerNoExceptions.o LexerSimple.o PropSetSimple.o StyleContext.o \
WordList.o
lexers = $(addsuffix .o,$(basename $(sort $(notdir $(wildcard ../lexers/Lex*.cxx)))))
ifdef LPEG_LEXER
CXXFLAGS += -DLPEG_LEXER -I ../lua/src
LUA_CFLAGS = -I ../lua/src -DLUA_USE_POSIX -DLUA_USE_DLOPEN
lua = lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o linit.o \
llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o \
ltable.o ltm.o lundump.o lvm.o lzio.o \
lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o \
loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o \
lpcap.o lpcode.o lpprint.o lptree.o lpvm.o
endif
vpath %.h ../src ../include ../lexlib
vpath %.cxx ../src ../lexlib ../lexers
all: $(scintilla)
$(sci) $(lexers) ScintillaCurses.o: %.o: %.cxx
$(CXX) $(CXXFLAGS) $(CURSES_FLAGS) -c $<
$(lua): %.o: ../lua/src/%.c
$(CC) $(CFLAGS) $(LUA_CFLAGS) -c $<
$(scintilla): $(sci) $(lexers) $(lua) ScintillaCurses.o
$(AR) rc $@ $^
touch $@
clean:
rm -f *.o $(scintilla)

View File

@ -0,0 +1,78 @@
# Scintilla curses
## Overview
This is an implementation of [Scintilla][] for curses platforms including:
* [ncurses][]
* [PDCurses][]
* X/Open Curses
[Scintilla]: http://scintilla.org
[ncurses]: http://invisible-island.net/ncurses/
[PDCurses]: http://pdcurses.sourceforge.net/
## Compiling
Simply run `make` to build the usual `../bin/scintilla.a`.
## Usage
It is highly recommended to use Scintilla curses in a UTF-8-aware terminal with
a font that supports many UTF-8 characters ("DejaVu Sans Mono" is one of them)
because Scintilla curses makes use of UTF-8 characters when drawing wrap
symbols, some marker symbols, and call tip arrows.
Note: `setlocale(LC_CTYPE, "")` must be called before initializing curses in
order to display UTF-8 characters properly in ncursesw.
## Curses Compatibility
Scintilla curses lacks some Scintilla features due to the terminal's
constraints:
* Any settings with alpha values are not supported.
* Autocompletion lists cannot show images (pixmap surfaces are not supported).
Instead, they show the first character in the string passed to
[`SCI_REGISTERIMAGE`][].
* Buffered and two-phase drawing is not supported.
* Caret settings like period, line style, and width are not supported
(terminals use block carets with their own period definitions).
* Code pages other than UTF-8 have not been tested and it is possible some
curses implementations do not support them.
* Drag and drop is not supported.
* Edge lines are not displayed properly (the line is drawn over by text lines).
* Extra ascent and descent for lines is not supported.
* Fold lines cannot be drawn above or below lines.
* Hotspot underlines are not drawn on mouse hover (`surface->FillRectangle()` is
not supported).
* Indicators other than `INDIC_ROUNDBOX` and `INDIC_STRAIGHTBOX` are not drawn
(`surface->LineTo()` and `surface->FillRectangle()` are not supported for
drawing indicator shapes and pixmap surfaces are not supported). Translucent
drawing and rounded corners are not supported either.
* Some complex marker types are not drawn properly or at all (pixmap surfaces
are not supported and `surface->LineTo()` is not supported for drawing some
marker shapes).
* Mouse cursor types are not supported.
* Up to 16 colors are supported, regardless of how many colors the terminal
supports. They are (in "0xBBGGRR" format): black (`0x000000`), red
(`0x000080`), green (`0x008000`), yellow (`0x008080`), blue (`0x800000`),
magenta (`0x800080`), cyan (`0x808000`), white (`0xC0C0C0`), light black
(`0x404040`), light red (`0x0000FF`), light green (`0x00FF00`), light yellow
(`0x00FFFF`), light blue (`0xFF0000`), light magenta (`0xFF00FF`), light cyan
(`0xFFFF00`), and light white (`0xFFFFFF`). Even if your terminal uses a
different color map, you must use these color values with Scintilla;
unrecognized colors are set to white by default. For some terminals, you may
need to set a lexer style's `bold` attribute in order to use the light color
variant.
* Some styles settings like font name, font size, and italic do not display
properly (terminals use one only font, size and variant).
* X selections (primary and secondary) are not integrated into the clipboard.
* Zoom is not supported (terminal font size is fixed).
[`SCI_REGISTERIMAGE`]: http://scintilla.org/ScintillaDoc.html#SCI_REGISTERIMAGE
## `jinx`
`jinx` is an example of using Scintilla with curses. You can build it by going
into `jinx/` and running `make`.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,128 @@
// Copyright 2012-2019 Mitchell mitchell.att.foicica.com. See License.txt.
// Header for Scintilla in a curses (terminal) environment.
#ifndef SCINTILLACURSES_H
#define SCINTILLACURSES_H
#include <curses.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Creates a new Scintilla window.
* Curses does not have to be initialized before calling this function.
* @param callback A callback function for Scintilla notifications.
*/
void *scintilla_new(void (*callback)(void *sci, int iMessage, void *wParam,
void *lParam));
/**
* Returns the curses `WINDOW` associated with the given Scintilla window.
* Curses must have been initialized prior to calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
* @return curses `WINDOW`.
*/
WINDOW *scintilla_get_window(void *sci);
/**
* Sends the given message with parameters to the given Scintilla window.
* Curses does not have to be initialized before calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
* @param iMessage The message ID.
* @param wParam The first parameter.
* @param lParam The second parameter.
*/
sptr_t scintilla_send_message(void *sci, unsigned int iMessage, uptr_t wParam,
sptr_t lParam);
/**
* Sends the specified key to the given Scintilla window for processing.
* If it is not consumed, an SCNotification will be emitted.
* Curses does not have to be initialized before calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
* @param key The keycode of the key.
* @param shift Flag indicating whether or not the shift modifier key is
* pressed.
* @param ctrl Flag indicating whether or not the control modifier key is
* pressed.
* @param alt Flag indicating whether or not the alt modifier key is pressed.
*/
void scintilla_send_key(void *sci, int key, bool shift, bool ctrl, bool alt);
/**
* Sends the specified mouse event to the given Scintilla window for processing.
* Curses must have been initialized prior to calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
* @param event The mouse event (`SCM_CLICK`, `SCM_DRAG`, or `SCM_RELEASE`).
* @param time The time in milliseconds of the mouse event. This is only needed
* if double and triple clicks need to be detected.
* @param button The button number pressed, or `0` if none.
* @param y The absolute y coordinate of the mouse event.
* @param x The absolute x coordinate of the mouse event.
* @param shift Flag indicating whether or not the shift modifier key is
* pressed.
* @param ctrl Flag indicating whether or not the control modifier key is
* pressed.
* @param alt Flag indicating whether or not the alt modifier key is pressed.
* @return whether or not Scintilla handled the mouse event
*/
bool scintilla_send_mouse(void *sci, int event, unsigned int time, int button,
int y, int x, bool shift, bool ctrl, bool alt);
/**
* Copies the text of Scintilla's internal clipboard, not the primary and/or
* secondary X selections, into the given buffer and returns the size of the
* clipboard text.
* Call with a `null` buffer first to get the size of the buffer needed to store
* clipboard text.
* Keep in mind clipboard text may contain null bytes.
* Curses does not have to be initialized before calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
* @param buffer The buffer to copy clipboard text to.
* @return size of the clipboard text.
*/
int scintilla_get_clipboard(void *sci, char *buffer);
/**
* Refreshes the Scintilla window on the virtual screen.
* This should be done along with the normal curses `noutrefresh()`, as the
* virtual screen is updated when calling this function.
* Curses must have been initialized prior to calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
*/
void scintilla_noutrefresh(void *sci);
/**
* Refreshes the Scintilla window on the physical screen.
* This should be done along with the normal curses `refresh()`, as the physical
* screen is updated when calling this function.
* Curses must have been initialized prior to calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
*/
void scintilla_refresh(void *sci);
/**
* Deletes the given Scintilla window.
* Curses must have been initialized prior to calling this function.
* @param sci The Scintilla window returned by `scintilla_new()`.
*/
void scintilla_delete(void *sci);
/**
* Returns the curses `COLOR_PAIR` for the given curses foreground and
* background `COLOR`s.
* This is used simply to enumerate every possible color combination.
* Note: only 256 combinations are possible due to curses portability.
* Note: This references the global curses variable `COLORS` and is
* not a constant expression.
* @param f The curses foreground `COLOR`.
* @param b The curses background `COLOR`.
* @return int number for defining a curses `COLOR_PAIR`.
*/
#define SCI_COLOR_PAIR(f, b) ((b) * ((COLORS < 16) ? 8 : 16) + (f) + 1)
#define IMAGE_MAX 31
#define SCM_PRESS 1
#define SCM_DRAG 2
#define SCM_RELEASE 3
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,14 @@
# Thanks
Thank you everyone for your contributions and feedback. They have helped improve
Scintilla curses.
## Code Contributors
* Chad Voegele
* Chris Emerson
* Neil Hodgson
* Paul Evans
* Peter Kazmier
* Robin Haberkorn
* Valere Monseur

View File

@ -0,0 +1,17 @@
# Copyright 2012-2019 Mitchell mitchell.att.foicica.com. See License.txt.
CC = gcc
CXX = g++
INCLUDEDIRS = -I ../../include -I ../../src -I ../../lexlib -I ../
CFLAGS = -DCURSES -DSCI_LEXER -Wall $(INCLUDEDIRS)
CXXFLAGS = $(CFLAGS)
ifdef LPEG_LEXER
CFLAGS += -DLPEG_LEXER -I ../src/lua
endif
scintilla = ../../bin/scintilla.a
all: jinx
jinx.o: jinx.c ; $(CC) $(CFLAGS) -c $<
jinx: jinx.o $(scintilla) ; $(CXX) $^ -o $@ -lncursesw
clean: ; rm -f jinx *.o

View File

@ -0,0 +1,118 @@
// Copyright 2012-2019 Mitchell mitchell.att.foicica.com. See License.txt.
#include <locale.h>
#include <sys/time.h>
#include <curses.h>
#include "Scintilla.h"
#include "SciLexer.h"
#include "ScintillaCurses.h"
#define SSM(m, w, l) scintilla_send_message(sci, m, w, l)
typedef void Scintilla;
void scnotification(Scintilla *view, int msg, void *lParam, void *wParam) {
//struct SCNotification *scn = (struct SCNotification *)lParam;
//printw("SCNotification received: %i", scn->nmhdr.code);
}
int main(int argc, char **argv) {
setlocale(LC_CTYPE, ""); // for displaying UTF-8 characters properly
initscr(), raw(), cbreak(), noecho(), start_color();
Scintilla *sci = scintilla_new(scnotification);
curs_set(0); // Scintilla draws its own cursor
SSM(SCI_STYLESETFORE, STYLE_DEFAULT, 0xFFFFFF);
SSM(SCI_STYLESETBACK, STYLE_DEFAULT, 0);
SSM(SCI_STYLECLEARALL, 0, 0);
#if !LPEG_LEXER
SSM(SCI_SETLEXER, SCLEX_CPP, 0);
SSM(SCI_SETKEYWORDS, 0, (sptr_t)"int char");
SSM(SCI_STYLESETFORE, SCE_C_COMMENT, 0x00FF00);
SSM(SCI_STYLESETFORE, SCE_C_COMMENTLINE, 0x00FF00);
SSM(SCI_STYLESETFORE, SCE_C_NUMBER, 0xFFFF00);
SSM(SCI_STYLESETFORE, SCE_C_WORD, 0xFF0000);
SSM(SCI_STYLESETFORE, SCE_C_STRING, 0xFF00FF);
SSM(SCI_STYLESETBOLD, SCE_C_OPERATOR, 1);
#else
SSM(SCI_SETLEXER, SCLEX_LPEG, 0);
SSM(SCI_SETPROPERTY, (uptr_t)"lexer.lpeg.home", (sptr_t)"../../lexlua");
SSM(SCI_SETPROPERTY, (uptr_t)"lexer.lpeg.color.theme", (sptr_t)"curses");
SSM(SCI_PRIVATELEXERCALL, SCI_GETDIRECTFUNCTION,
SSM(SCI_GETDIRECTFUNCTION, 0, 0));
SSM(SCI_PRIVATELEXERCALL, SCI_SETDOCPOINTER, SSM(SCI_GETDIRECTPOINTER, 0, 0));
SSM(SCI_PRIVATELEXERCALL, SCI_SETLEXERLANGUAGE, (sptr_t)"ansi_c");
#endif
SSM(SCI_INSERTTEXT, 0, (sptr_t)
"int main(int argc, char **argv) {\n"
" // Start up the gnome\n"
" gnome_init(\"stest\", \"1.0\", argc, argv);\n}");
SSM(SCI_SETPROPERTY, (uptr_t)"fold", (sptr_t)"1");
SSM(SCI_SETMARGINWIDTHN, 2, 1);
SSM(SCI_SETMARGINMASKN, 2, SC_MASK_FOLDERS);
SSM(SCI_SETMARGINSENSITIVEN, 2, 1);
SSM(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_CLICK, 0);
SSM(SCI_SETFOCUS, 1, 0);
scintilla_refresh(sci);
printf("\033[?1000h"); // enable mouse press and release events
//printf("\033[?1002h"); // enable mouse press, drag, and release events
//printf("\033[?1003h"); // enable mouse move, press, drag, and release events
mousemask(ALL_MOUSE_EVENTS, NULL);
mouseinterval(0);
// Non-UTF8 input.
int c = 0;
MEVENT mouse;
WINDOW *win = scintilla_get_window(sci);
while ((c = wgetch(win)) != 'q') {
if (c != KEY_MOUSE) {
if (c == KEY_UP) c = SCK_UP;
else if (c == KEY_DOWN) c = SCK_DOWN;
else if (c == KEY_LEFT) c = SCK_LEFT;
else if (c == KEY_RIGHT) c = SCK_RIGHT;
scintilla_send_key(sci, c, FALSE, FALSE, FALSE);
} else if (getmouse(&mouse) == OK) {
int event = SCM_DRAG, button = 0;
if (mouse.bstate & BUTTON1_PRESSED)
event = SCM_PRESS, button = 1;
else if (mouse.bstate & BUTTON1_RELEASED)
event = SCM_RELEASE, button = 1;
struct timeval time = {0, 0};
gettimeofday(&time, NULL);
int millis = time.tv_sec * 1000 + time.tv_usec / 1000;
scintilla_send_mouse(sci, event, millis, button, mouse.y, mouse.x,
mouse.bstate & BUTTON_SHIFT,
mouse.bstate & BUTTON_CTRL,
mouse.bstate & BUTTON_ALT);
}
scintilla_refresh(sci);
}
// UTF-8 input.
//SSM(SCI_SETCODEPAGE, SC_CP_UTF8, 0);
//wint_t c = {0};
//WINDOW *win = scintilla_get_window(sci);
//while (c != 'q') {
// int status = wget_wch(win, &c);
// if (status == ERR)
// continue;
// else if (status == KEY_CODE_YES) {
// if (c == KEY_UP) c = SCK_UP;
// else if (c == KEY_DOWN) c = SCK_DOWN;
// else if (c == KEY_LEFT) c = SCK_LEFT;
// else if (c == KEY_RIGHT) c = SCK_RIGHT;
// }
// scintilla_send_key(sci, c, FALSE, FALSE, FALSE);
// scintilla_refresh(sci);
//}
printf("\033[?1000l"); // disable mouse press and release events
//printf("\033[?1002l"); // disable mouse press, drag, and release events
//printf("\033[?1003l"); // disable mouse move, press, drag, and release
scintilla_delete(sci);
endwin();
return 0;
}

View File

@ -0,0 +1 @@
@del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.pdb *.plg *.res *.sbr *.tds *.exp *.tlog >NUL:

View File

@ -0,0 +1,30 @@
Some of the build files adapt to adding and removing source code files but most
must be modified by hand. Here is a list of directories and the build files that
must be modified or possibly need to be modified.
The Cocoa project.pbxproj file is complex and should be modified with Xcode.
The other build files can be edited manually.
src:
cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj
gtk/makefile
qt/ScintillaEdit/ScintillaEdit.pro
qt/ScintillaEditBase/ScintillaEditBase.pro
win32/makefile
win32/scintilla.mak
-- possibly:
test/unit/makefile
test/unit/test.mak
cocoa:
cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj
gtk:
gtk/makefile
qt:
qt/ScintillaEdit/ScintillaEdit.pro
qt/ScintillaEditBase/ScintillaEditBase.pro
win32:
win32/makefile
win32/scintilla.mak

View File

@ -6,6 +6,7 @@
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla and SciTE
</title>
@ -48,14 +49,14 @@
library and with limited use of templates.
</p>
<p>
The currently supported platforms, Windows, GTK+/Linux and wxWindows are fairly similar in
The currently supported platforms, Windows, GTK/Linux, Cocoa and wxWidgets are fairly similar in
many ways.
Each has windows, menus and bitmaps. These features generally work in similar ways so each
has a way to move a window or draw a red line. Sometimes one platform requires a sequence of
calls rather than a single call. At other times, the differences are more profound. Reading
the Windows clipboard occurs synchronously but reading the GTK+ clipboard requires a request
the Windows clipboard occurs synchronously but reading the GTK clipboard requires a request
call that will be asynchronously answered with a message containing the clipboard data.
The wxWindows platform is available from the <a href="http://wxwindows.org/">wxWindows site</a>
The wxWidgets platform is available from the <a href="http://wxwidgets.org/">wxWidgets site</a>
</p>
<br />
<h3>
@ -66,7 +67,7 @@
</p>
<p>
The portability library is defined in Platform.h and is implemented once for each platform.
PlatWin.cxx defines the Windows variants of the methods and PlatGTK.cxx the GTK+ variants.
PlatWin.cxx defines the Windows variants of the methods and PlatGTK.cxx the GTK variants.
</p>
<p>
Several of the classes here hold platform specific object identifiers and act as proxies to
@ -82,29 +83,25 @@
<p>
These are simple classes provided to hold the commonly used geometric primitives. A
PRectangle follows the Mac / Windows convention of not including its bottom and right sides
instead of including all its sides as is normal in GTK+. It is not called Rectangle as this may be
instead of including all its sides as is normal in GTK. It is not called Rectangle as this may be
the name of a macro on Windows.
</p>
<h4>
Colour, ColourPair, Palette
ColourDesired
</h4>
<p>
Colour holds a platform specific colour identifier - COLORREF for Windows and GdkColor for
GTK+. The red, green and blue components that make up the colour are limited to the 8 bits of
precision available on Windows. ColourPairs are used because not all possible colours are
always available. Using an 8 bit colour mode, which is a common setting for both Windows and
GTK+, only 256 colours are possible on the display. Thus when an application asks for a dull
red, say #400000, it may only be allocated an already available colour such as #800000 or
#330000. With 16 or 2 colour modes even less choice is available and the application will
have to use the limited set of already available colours.
This is a simple class holding an expected colour. It is internally represented as a single
32 bit integer in BGR format with 8 bits per colour, but also provides a convenient API to fetch
each component separately.
As a platform might not be able to represent the exact desired colour if it doesn't have 24 bit
depth available, it might not actually represent the exact desired colour but select a best fit
that it can actually render.
</p>
A Palette object holds a set of colour pairs and can make the appropriate calls to ask to
allocate these colours and to see what the platform has decided will be allowed.
<h4>
Font
</h4>
<p>
Font holds a platform specific font identifier - HFONT for Windows, GdkFont* for GTK+. It
Font holds a platform specific font identifier - HFONT for Windows, PangoFontDescription* for GTK. It
does not own the identifier and so will not delete the platform font object in its
destructor. Client code should call Destroy at appropriate times.
</p>
@ -115,8 +112,8 @@
Surface is an abstraction over each platform's concept of somewhere that graphical drawing
operations can be done. It may wrap an already created drawing place such as a window or be
used to create a bitmap that can be drawn into and later copied onto another surface. On
Windows it wraps a HDC and possibly a HBITMAP. On GTK+ it wraps a GdkDrawable* and possibly a
GdkPixmap*. Other platform specific objects are created (and correctly destroyed) whenever
Windows it wraps a HDC and possibly a HBITMAP. On GTK it wraps a cairo_surface_t*.
Other platform specific objects are created (and correctly destroyed) whenever
required to perform drawing actions.
</p>
<p>
@ -132,7 +129,7 @@
<p>
Window acts as a proxy to a platform window allowing operations such as showing, moving,
redrawing, and destroying to be performed. It contains a platform specific window identifier
- HWND for Windows, GtkWidget* for GTK+.
- HWND for Windows, GtkWidget* for GTK.
</p>
<h4>
ListBox
@ -146,7 +143,7 @@
</h4>
<p>
Menu is a small helper class for constructing popup menus. It contains the platform specific
menu identifier - HMENU for Windows, GtkItemFactory* for GTK+. Most of the work in
menu identifier - HMENU for Windows, GtkMenu* for GTK. Most of the work in
constructing menus requires access to platform events and so is done in the Platform Events
and API layer.
</p>
@ -163,7 +160,7 @@
</h3>
<p>
The bulk of Scintilla's code is platform independent. This is made up of the CellBuffer,
ContractionState, Document, Editor, Indicator, LineMarker, Style, ViewStyle, KeyMap,
ContractionState, Document, Editor, Indicator, LineMarker, Style, ViewStyle, KeyMap,
ScintillaBase, CallTip,
and AutoComplete primary classes.
</p>
@ -203,14 +200,14 @@
</h4>
<p>
The Editor object is central to Scintilla. It is responsible for displaying a document and
responding to user actions and requests from the container. It uses ContractionState, Indicator,
LineMarker, Style, and ViewStyle objects to display the document and a KeyMap class to
map key presses to functions.
The visibility of each line is kept in the ContractionState which is also responsible for mapping
responding to user actions and requests from the container. It uses ContractionState, Indicator,
LineMarker, Style, and ViewStyle objects to display the document and a KeyMap class to
map key presses to functions.
The visibility of each line is kept in the ContractionState which is also responsible for mapping
from display lines to documents lines and vice versa.
</p>
<p>
There may be multiple Editor objects attached to one Document object. Changes to a
There may be multiple Editor objects attached to one Document object. Changes to a
document are broadcast to the editors through the DocWatcher mechanism.
</p>
<h4>
@ -227,20 +224,20 @@
</h3>
<p>
Each platform uses different mechanisms for receiving events. On Windows, events are
received through messages and COM. On GTK+, callback functions are used.
received through messages and COM. On GTK, callback functions are used.
</p>
<p>
For each platform, a class is derived from ScintillaBase (and thus from Editor). This is
ScintillaWin on Windows and ScintillaGTK on GTK+. These classes are responsible for
ScintillaWin on Windows and ScintillaGTK on GTK. These classes are responsible for
connecting to the platforms event mechanism and also to implement some virtual methods in
Editor and ScintillaBase which are different on the platforms. For example, this layer has to
support this difference between the synchronous Windows clipboard and the asynchronous GTK+
support this difference between the synchronous Windows clipboard and the asynchronous GTK
clipboard.
</p>
<p>
The external API is defined in this layer as each platform has different preferred styles of
API - messages on Windows and function calls on GTK+. This also allows multiple APIs to be
defined on a platform. The currently available API on GTK+ is similar to the Windows API and
API - messages on Windows and function calls on GTK. This also allows multiple APIs to be
defined on a platform. The currently available API on GTK is similar to the Windows API and
does not follow platform conventions well. A second API could be implemented here that did
follow platform conventions.
</p>

View File

@ -6,6 +6,7 @@
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla icons
</title>
@ -26,10 +27,10 @@
Icons
</h2>
<p>
These images may be used under the same license as Scintilla.
These images may be used under the same license as Scintilla.
</p>
<p>
Drawn by Iago Rubio, Philippe Lhoste, and Neil Hodgson.
Drawn by Iago Rubio, Philippe Lhoste, and Neil Hodgson.
</p>
<p>
<a href="http://prdownloads.sourceforge.net/scintilla/icons1.zip?download">zip format</a> (70K)

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ The task of a lexer can be summarized briefly: for each range r of
characters that are to be colored the same, the lexer should call
styler.ColourTo(i, state)
where i is the position of the last character of the range r. The lexer
should set the state variable to the coloring state of the character at
position i and continue until the entire text has been colored.
@ -139,8 +139,8 @@ characters in ASCII for operators, comment markers, etc.
Special case: Folding
Folding may be performed in the lexer function. It is better to use a
separate folder function as that avoids some troublesome interaction
Folding may be performed in the lexer function. It is better to use a
separate folder function as that avoids some troublesome interaction
between styling and folding. The folder function will be run after the
lexer function if folding is enabled. The rest of this section explains
how to perform folding within the lexer function.
@ -148,15 +148,15 @@ how to perform folding within the lexer function.
During initialization, lexers that support folding set
bool fold = styler.GetPropertyInt("fold");
If folding is enabled in the editor, fold will be TRUE and the lexer
should call:
styler.SetLevel(line, level);
at the end of each line and just before exiting.
The line parameter is simply the count of the number of newlines seen.
The line parameter is simply the count of the number of newlines seen.
It's initial value is styler.GetLine(startPos) and it is incremented
(after calling styler.SetLevel) whenever a newline is seen.
@ -169,7 +169,7 @@ comments, of course).
The following flag bits, defined in Scintilla.h, may be set or cleared
in the flags parameter. The SC_FOLDLEVELWHITEFLAG flag is set if the
lexer considers that the line contains nothing but whitespace. The
SC_FOLDLEVELHEADERFLAG flag indicates that the line is a fold point.
SC_FOLDLEVELHEADERFLAG flag indicates that the line is a fold point.
This normally means that the next line has a greater level than present
line. However, the lexer may have some other basis for determining a
fold point. For example, a lexer might create a header line for the
@ -193,7 +193,7 @@ seen:
if ((levelCurrent > levelPrev) && (visChars > 0))
lev |= SC_FOLDLEVELHEADERFLAG;
styler.SetLevel(lineCurrent, lev);
// reinitialize the folding vars describing the present line.
lineCurrent++;
visChars = 0; // Number of non-whitespace characters on the line.
@ -210,7 +210,7 @@ The following code appears in the C++ lexer just before exit:
flagsNext &= ~SC_FOLDLEVELNUMBERMASK;
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
}
Don't worry about performance

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -5,6 +5,7 @@
<head>
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Privacy Policy
</title>

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -5,6 +5,7 @@
<head>
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla and SciTE Code Style Preferences
</title>
@ -123,6 +124,8 @@
compilers on diverse platforms with high performance and low resource usage.
Scintilla has stricter portability requirements to SciTE as it may be ported to
low capability platforms.
Scintilla code must build with C++03 which can be checked with "g++ --std=gnu++03".
SciTE can use C++11 features that are widely available from g++ 4.6, MSVC 2012 and clang 3.4 compilers.
</p>
<p>
To achieve portability, only a subset of C++ features are used.
@ -130,22 +133,28 @@
C++, exceptions may not be thrown out of Scintilla and all exceptions should be caught
before returning from Scintilla.
Run-time type information adds to memory use so is turned off.
A 'Scintilla' name spaces is optionally used based on the SCI_NAMESPACE
definition. This helps with name clashes on OS X.
A 'Scintilla' name space is used. This helps with name clashes on OS X.
</p>
<p>
The goto statement is not used because of bad memories from my first job
maintaining FORTRAN programs. The union feature is not used as it can lead to
non-type-safe value access.
</p>
<p>
The SCI_METHOD preprocessor definition should be used when implementing
interfaces which include it like ILexer and only there.
</p>
<p>
Headers should always be included in the same order as given by the
scripts/HeaderOrder.txt file.
</p>
<h3>
Casting
</h3>
<p>
Do not use old C style casts like (char *)s. Instead use the most strict form of C++
cast possible like const_cast&lt;char *&gt;(s). Use static_cast and const_cast
where possible rather than reinterpret_cast. Because the code is compiled with
run-time type information turned off, dynamic_cast will not work.
where possible rather than reinterpret_cast.
</p>
<p>
The benefit to using the new style casts is that they explicitly detail what evil is
@ -255,5 +264,31 @@
<p>Ensure there are no warnings under the compiler you use. Warnings from other compilers
will be noted on the feature request.</p>
<p>sc.ch is an int: do not pass this around as a char.</p>
<p>The ctype functions like isalnum and isdigit only work on ASCII (0..127) and may cause
undefined behaviour including crashes if used on other values. Check with IsASCII before calling is*.</p>
<p>Functions, structs and classes in lexers should be in an unnamed namespace (see LexCPP)
or be marked "static" so they will not leak into other lexers.</p>
<p>If you copy from an existing lexer, remove any code that is not needed since it makes it
more difficult to maintain and review.</p>
<p>When modifying an existing lexer, try to maintain as much compatibility as possible.
Do not renumber lexical styles as current client code may be built against the earlier values.</p>
<h4>
Properties
</h4>
<p>
Properties provided by a new lexer should follow the naming conventions
and should include a comment suitable for showing to end users.
The convention is for properties that control styling to be named
lexer.&lt;lexername&gt;.* and those that control folding to be named
fold.&lt;lexername&gt;.*.
Examples are "lexer.python.literals.binary" and "fold.haskell.imports".
</p>
<p>
The properties "fold" and "fold.comment" are generic and can be used by
any lexer.
</p>
<p>
See LexPython for examples of properties in an object lexer and LexHTML for a functional lexer.
</p>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -6,6 +6,7 @@
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Download Scintilla
</title>
@ -25,10 +26,10 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="http://www.scintilla.org/scintilla360.zip">
<font size="4"> <a href="https://www.scintilla.org/scintilla3106.zip">
Windows</a>&nbsp;&nbsp;
<a href="http://www.scintilla.org/scintilla360.tgz">
GTK+/Linux</a>&nbsp;&nbsp;
<a href="https://www.scintilla.org/scintilla3106.tgz">
GTK/Linux</a>&nbsp;&nbsp;
</font>
</td>
</tr>
@ -41,7 +42,7 @@
containing very few restrictions.
</p>
<h3>
Release 3.6.0
Release 3.10.6
</h3>
<h4>
Source Code
@ -49,8 +50,8 @@
The source code package contains all of the source code for Scintilla but no binary
executable code and is available in
<ul>
<li><a href="http://www.scintilla.org/scintilla360.zip">zip format</a> (1500K) commonly used on Windows</li>
<li><a href="http://www.scintilla.org/scintilla360.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
<li><a href="https://www.scintilla.org/scintilla3106.zip">zip format</a> (1600K) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/scintilla3106.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<h4>

View File

@ -6,6 +6,7 @@
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla and SciTE Related Sites
</title>
@ -28,16 +29,12 @@
<h3>
Ports and Bindings of Scintilla
</h3>
<p>
<a href="http://foicica.com/scinterm/">Scinterm</a>
is an implementation of Scintilla for the ncurses platform.
</p>
<p>
<a href="http://www.morphos-team.net/releasenotes/3.0">Scintilla.mcc</a>
is a port to MorphOS.
</p>
<p>
<a href="https://metacpan.org/module/Wx::Scintilla">Wx::Scintilla</a>
<a href="https://metacpan.org/pod/Wx::Scintilla">Wx::Scintilla</a>
is a Perl Binding for Scintilla on wxWidgets.
</p>
<p>
@ -49,7 +46,7 @@
these programs, using all the typical GObject conventions.
</p>
<p>
<a href="http://mewsoft.com/cgi-bin/forum/forum.cgi?action=ViewTopic&Topic=1494&Forum=1&Page=1&Period=0a&Lang=English">Editawy</a>
<a href="http://www.mewsoft.com/forums/source-code-editor-activex-control-released-scintilla-activex-wrapper-control&amp;action=ViewTopic&amp;Topic=1494&amp;Forum=1&amp;Page=1&amp;Period=0a&amp;Lang=English">Editawy</a>
is an ActiveX Control wrapper that support all Scintilla functions and additional high level functions.
</p>
<p>
@ -75,7 +72,7 @@
</a> is an encapsulation of Scintilla for use within the .NET framework.
</p>
<p>
<a href="http://www.riverbankcomputing.co.uk/software/qscintilla/intro">QScintilla
<a href="https://riverbankcomputing.com/software/qscintilla/intro">QScintilla
</a> is a port of Scintilla to the Qt platform. It has a similar license to Qt: GPL for use in
free software and commercial for use in close-source applications.
</p>
@ -127,7 +124,24 @@
Projects using Scintilla
</h3>
<p>
<a href="http://rhaberkorn.github.com/sciteco/">SciTECO</a>
<a href="https://github.com/martinrotter/textilosaurus">Textilosaurus</a>
is simple cross-platform UTF-8 text editor based on Qt and Scintilla.
</p>
<p>
<a href="http://stefanstools.sourceforge.net/BowPad.html">BowPad</a>
is a small and fast text editor with a modern ribbon user interface (Windows7 or later).
</p>
<p>
<a href="http://studio.zerobrane.com">ZeroBrane Studio Lua IDE</a>
is a lightweight Lua IDE with code completion, syntax highlighting, live
coding, remote debugger, and code analyzer (Windows, OSX, and Linux).
</p>
<p>
<a href="http://www.xml-buddy.com/">XML Validator Buddy</a>
is an XML/JSON editor and XML validator for Windows.
</p>
<p>
<a href="http://sciteco.sf.net/">SciTECO</a>
is an advanced TECO dialect and interactive screen editor based on Scintilla.
</p>
<p>
@ -153,7 +167,7 @@
is a cross-platform, visual database design, sql coding and administration tool.
</p>
<p>
<a href="http://liveditor.com/index.html">LIVEditor</a>
<a href="http://liveditor.com/index.php">LIVEditor</a>
is for web front end coders editing html/css/js code.
</p>
<p>
@ -161,8 +175,8 @@
is a wxWidgets-based Perl IDE.
</p>
<p>
<a href="http://manoscoder.gr/CoderStudio/CoderStudio.asp">CoderStudio</a>
is an IDE for Assembly programming similar to Visual Studio 6.0.
<a href="http://www.manoscoder.gr/wintools/viewtopic.php?f=20&t=84">CoderStudio</a>
is an IDE for plain C and Assembly programming similar to Visual Studio.
</p>
<p>
<a href="http://www.sparxsystems.com/products/ea/index.html">Enterprise Architect</a>
@ -170,14 +184,14 @@
</p>
<p>
<a href="https://launchpad.net/codeassistor">The CodeAssistor Editor</a>
is a small and simple MacOSX source code editor.
is a small and simple source code editor for MacOSX, Windows, and GTK/Linux.
</p>
<p>
<a href="http://www.topwizprogramming.com/freecode_pbeditor.html">PBEditor</a>
is a text editor for PowerBuilder.
</p>
<p>
<a href="http://www.cryptool.org/">CrypTool</a>
<a href="https://www.cryptool.org/en/">CrypTool</a>
is an application for applying and analyzing cryptographic algorithms.
</p>
<p>
@ -190,34 +204,22 @@
is a simple programming language with a Visual Basic like syntax.
</p>
<p>
<a href="http://www.daansystems.com/lispide">LispIDE</a>
<a href="http://www.daansystems.com/lispide/">LispIDE</a>
is a basic Lisp editor for Windows 2000, XP and Vista.
</p>
<p>
<a href="http://www.flexsoft.cc/download.htm">FlexEdit</a>
is Free Text/Hex Editor for Windows.
</p>
<p>
<a href="http://www.assembla.com/wiki/show/FileWorkbench">File Workbench:</a>
<a href="https://www.assembla.com/wiki/show/FileWorkbench">File Workbench:</a>
a file manager / text editor environment with Squirrel scripting.
</p>
<p>
<a href="http://kephra.sf.net">Kephra</a>
is a free, easy and comfortable cross-platform editor written in Perl.
</p>
<p>
<a href="http://top.gresham-computing.com">TOP</a>
is an interface to HP's NonStop servers which run a proprietary OS.
</p>
<p>
<a href="http://universalindent.sourceforge.net/">UniversalIndentGUI</a>
is a cross platform GUI for several code formatters, beautifiers and indenters
like GreatCode, AStyle (Artistic Styler), GNU Indent, BCPP and so on.
</p>
<p>
<a href="http://scitools.com/products/trackback/product.php">TrackBack</a>
watches and backs up every change made in your source code.
</p>
<p>
<a href="http://elementaryreports.com/">Elementary Reports</a>
is designed to reduce the time to compose detailed and professional primary school reports.
@ -233,12 +235,12 @@
class diagrams.
</p>
<p>
The <a href="http://www.adobe.com/devnet/bridge/">ExtendScript Toolkit</a>
The <a href="http://www.adobe.com/devnet/bridge.html">ExtendScript Toolkit</a>
is a development and debugging tool for JavaScript
scripts included with Adobe CS3 Suites.
</p>
<p>
<a href="http://tortoisesvn.net/">TortoiseSVN</a>
<a href="https://tortoisesvn.net/">TortoiseSVN</a>
is a Windows GUI client for the Subversion source control software.
</p>
<p>
@ -263,7 +265,7 @@
is a graphical user interface for changing SciTE properties files.
</p>
<p>
<a href="http://www.totalcmd.net/plugring/SciLister.html">Scintilla Lister</a>
<a href="http://totalcmd.net/plugring/SciLister.html">Scintilla Lister</a>
is a plugin for Total Commander allowing viewing all documents with syntax highlighting
inside Total Commander.
</p>
@ -279,7 +281,7 @@
Code::Blocks</a> is an open source, cross platform free C++ IDE.
</p>
<p>
<a href="http://notepad-plus.sourceforge.net/uk/site.htm">
<a href="https://notepad-plus-plus.org/">
Notepad++</a> is a free source code editor under Windows.
</p>
<p>
@ -291,7 +293,7 @@
LSW DotNet-Lab</a> is a development environment for the .NET platform.
</p>
<p>
<a href="http://glintercept.nutty.org/">
<a href="https://github.com/dtrebilco/glintercept">
GLIntercept</a> is an OpenGL function call interceptor that uses SciTE as a
run-time shader editor.
</p>
@ -308,7 +310,7 @@
PyCrash Viewer</a> can examine crash dumps of Python programs.
</p>
<p>
<a href="http://www.cabletest.com/mpt-wa-software-discovery.shtml">
<a href="http://www.cabletest.com/en/featured_products_MPT2.aspx">
MPT series Wire Analyzers</a> use Scintilla and SciTE.
</p>
<p>
@ -330,18 +332,14 @@
is a user-friendly source code editor easily extended using Python.
</p>
<p>
<a href="http://www.spaceblue.com/venis/">
<a href="http://www.spaceblue.com/products/venis/index.html">
Venis IX</a>,
the Visual Environment for NSIS (Nullsoft Scriptable Install System).
</p>
<p>
<a href="http://www.die-offenbachs.de/detlev/eric.html">Eric3</a>
<a href="http://eric-ide.python-projects.org/">Eric3</a>
is a Python IDE written using PyQt and QScintilla.
</p>
<p>
<a href="http://www.bomberstudios.com/sciteflash/">SciTE|Flash</a>
is a free Scintilla-based ActionScript editor for Windows.
</p>
<p>
<a href="http://www.computersciencelab.com/CppIde.htm">CPPIDE</a>
is part of some commercial high-school oriented programming course software.
@ -358,26 +356,18 @@
<a href="http://wxbasic.sourceforge.net/">wxBasic</a> is an open source
Basic interpreter that uses the wxWidgets toolkit. A small IDE is under construction.
</p>
<p>
<a href="http://freeride.rubyforge.org/wiki/wiki.pl">FreeRIDE</a> will be a
cross-platform IDE for the Ruby programming language.
</p>
<p>
<a href="http://visual-mingw.sourceforge.net/">Visual MinGW</a> is an
IDE for the MinGW compiler system.This runs on Windows with gcc.
</p>
<p>
The <a href="http://archaeopteryx.com/wingide">Wing IDE</a> is a
The <a href="http://archaeopteryx.com/">Wing IDE</a> is a
complete integrated development environment for the Python programming
language.
Available on Intel based Linux and Windows and on MacOS X through XDarwin.
</p>
<p>
<a href="http://www.gorlice.net.pl/~rybak/luaide/">LuaIDE</a>
is an IDE for Lua on Windows.
</p>
<p>
<a href="http://www.aegisknight.org/sphere/">Sphere</a>
<a href="http://www.spheredev.org/">Sphere</a>
is 2D RPG engine with a development environment.
</p>
<p>
@ -398,20 +388,10 @@
is a Python debugger that can run on one Windows machine debugging a Python program running
on either the same or another machine.
</p>
<p>
<a href="http://www.rexx.com/~dkuhlman/">pyeditor and wxEditor</a>
are scriptable editors implemented in Python. pyeditor is based on GTK+ and
the pyscintilla wrapper. wxEditor is based on wxWidgets, wxPython and
wxStyledTextControl.
</p>
<p>
<a href="http://sourceforge.net/projects/pycrust/">PyCrust</a> is an interactive
Python shell based on wxPython.
</p>
<p>
<a href="http://www.thekompany.com/products/blackadder/">Black Adder</a> is a
Qt based development environment for Python and Ruby.
</p>
<p>
<a href="http://www.activestate.com/Products/Komodo/">Komodo</a>
is a cross-platform multi-language development environment built
@ -424,16 +404,16 @@
will be of interest to others wanting to control SciTE.
</p>
<p>
<a href="http://anjuta.sourceforge.net/">Anjuta</a>
<a href="http://anjuta.org/">Anjuta</a>
is an open source C/C++ IDE for Linux/GNOME.
</p>
<p>
A <a href="http://www.burgaud.com">version of SciTE for Win32</a> enhanced
A <a href="https://www.burgaud.com">version of SciTE for Win32</a> enhanced
with a tab control to allow easy movement between buffers.
Go to the "Goodies" area on this site.
</p>
<p>
<a href="http://www.suneido.com">
<a href="http://suneido.com">
Suneido</a> is an integrated application platform currently available for Win32 that includes an
object-oriented language, client-server database, and user interface and reporting frameworks.
</p>
@ -448,7 +428,7 @@
wxStyledTextCtrl used as its editor.
</p>
<p>
<a href="http://www.python.org/download/windows/">PythonWin</a>, a Win32 IDE for Python, uses
<a href="https://www.python.org/download/windows/">PythonWin</a>, a Win32 IDE for Python, uses
Scintilla for both its editing and interactive windows.
</p>
<h3>
@ -463,7 +443,7 @@
is a Unicode aware syntax editor control for Delphi and C++ Builder.
</p>
<p>
<a href="http://projects.gnome.org/gtksourceview/">GtkSourceView</a>
<a href="https://wiki.gnome.org/Projects/GtkSourceView">GtkSourceView</a>
is a text widget that extends the standard GTK+ 2.x text widget and improves it
by implementing syntax highlighting and other features typical of a source editor.
</p>
@ -472,7 +452,7 @@
is a free source code editing component implemented in Ruby.
</p>
<p>
<a href="http://www.actiprosoftware.com/Products/DotNet/SyntaxEditor/Default.aspx">SyntaxEditor</a>
<a href="http://www.actiprosoftware.com/products/controls/wpf/syntaxeditor">SyntaxEditor</a>
is a commercial native .Net source code editing component.
</p>
<p>
@ -482,7 +462,7 @@
<p>
<a href="http://www.gtk.org/">GTK+</a>, the GIMP Toolkit, contains a rich text editing
widget.<br />
<a href="http://gedit.sourceforge.net/">Gedit</a> is an editor for GTK+/GNOME.<br />
<a href="https://wiki.gnome.org/Apps/Gedit">Gedit</a> is an editor for GTK+/GNOME.<br />
<!--
<a href="http://www.daimi.au.dk/~mailund/gtk.html">GtkEditor</a> is a source code editing
widget based on the GTK+ text widget.<br />
@ -495,15 +475,12 @@
<a href="http://www.codeguru.com/">CodeGuru</a> has source code for several Win32 MFC based
editors.
</p>
<a href="http://synedit.sourceforge.net/">SynEdit</a> is a Win32 edit control written
<a href="http://sourceforge.net/projects/synedit/">SynEdit</a> is a Win32 edit control written
in Delphi.
<p>
<a href="http://www.tetradyne.com/srcvwax.htm">SourceView</a> is a commercial editing
component for Win32.
</p>
<p>
<a href="http://www.winmain.com/">CodeMax</a> is another commercial component for Win32.
</p>
<h3>
Documents
</h3>
@ -539,9 +516,9 @@
WinMerge over the files to work out how to merge.
</p>
<p>
<a href="http://www.python.org">Python</a> is my favourite programming language. Scintilla
<a href="https://www.python.org">Python</a> is my favourite programming language. Scintilla
was started after I tried to improve the editor built into <a
href="http://www.python.org/download/windows/">PythonWin</a>, but was frustrated by the limitations of
href="https://www.python.org/download/windows/">PythonWin</a>, but was frustrated by the limitations of
the Windows Richedit control which PythonWin used.
</p>
<p>
@ -549,7 +526,7 @@
implementation of regular expression pattern matching used in Scintilla.
</p>
<p>
Inspirational coding soundscapes by <a href="http://www.davidbridie.com.au">David Bridie</a>.
Inspirational coding soundscapes by <a href="http://www.davidbridie.com/">David Bridie</a>.
</p>
</body>
</html>

View File

@ -6,6 +6,7 @@
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla and SciTE To Do
</title>
@ -29,8 +30,8 @@
Feedback
</h3>
<p>
Issues can be reported on the <a href="http://sourceforge.net/p/scintilla/bugs/">Bug Tracker</a>
and features requested on the <a href="http://sourceforge.net/p/scintilla/feature-requests/">Feature Request Tracker</a>.
Issues can be reported on the <a href="https://sourceforge.net/p/scintilla/bugs/">Bug Tracker</a>
and features requested on the <a href="https://sourceforge.net/p/scintilla/feature-requests/">Feature Request Tracker</a>.
</p>
<h3>
Scintilla Bugs

View File

@ -6,6 +6,7 @@
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla Usage Notes
</title>
@ -190,7 +191,7 @@ SPAN {
class='S11'>linebuf</span><span class='S10'>)));</span><span class='S0'><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S10'>}</span><span class='S0'><br />
</span> <span class='S10'>}</span><br />
<p style="margin-bottom: 0in">
Of course, fancier handling could be implemented. For example, if the previous line was the
start of a control construct, the next line could be automatically indented one tab further.
@ -248,7 +249,7 @@ SPAN {
class='S11'>endStyled</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span
class='S11'>notification</span><span class='S10'>-&gt;</span><span
class='S11'>position</span><span class='S10'>);</span><br />
<p>
Colourize(start, end) retrieves the specified range of text and then calls ColourizeDoc in
keywords.cxx. It starts the process by calling:
@ -258,7 +259,7 @@ SPAN {
class='S11'>SCI_STARTSTYLING</span><span class='S10'>,</span><span class='S0'>&nbsp;</span>
<span class='S11'>startPos</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span
class='S4'>31</span><span class='S10'>);</span><br />
<p>
and then for each token of the text, calling:
</p>
@ -267,7 +268,7 @@ SPAN {
class='S11'>SCI_SETSTYLING</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span
class='S11'>length</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span
class='S11'>style</span><span class='S10'>);</span><br />
<p>
where style is a number from 0 to 31 whose appearance has been defined using the
SCI_STYLESET... messages.
@ -323,7 +324,7 @@ SPAN {
class='S10'>=</span><span class='S0'>&nbsp;</span> <span class='S11'>linebuf</span><span
class='S0'>&nbsp;</span> <span class='S10'>+</span><span class='S0'>&nbsp;</span> <span
class='S11'>startword</span><span class='S10'>;</span><br />
<p>
Then if a calltip is available it can be displayed. The calltip appears immediately below
the position specified. The calltip can be multiple lines separated by newlines (\n).
@ -343,7 +344,7 @@ SPAN {
class='S11'>wordLen</span><span class='S0'>&nbsp;</span> <span class='S10'>-</span><span
class='S0'>&nbsp;</span> <span class='S4'>1</span><span class='S10'>,</span><span
class='S0'>&nbsp;</span> <span class='S11'>calltip</span><span class='S10'>);</span><br />
<p>
The calltip can be removed when a closing parenthesis is entered:
</p>
@ -359,7 +360,7 @@ SPAN {
SCI_CALLTIPCANCEL</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span
class='S4'>0</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S4'>
0</span><span class='S10'>);</span><br />
<p>
Obviously, it is up the application to look after supplying the appropriate calltip text.
</p>

View File

@ -0,0 +1,204 @@
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Scintilla Style Metadata
</title>
<style type="text/css">
<!--
/*<![CDATA[*/
CODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
/*]]>*/
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<img src="SciTEIco.png" border="3" height="64" width="64" alt="Scintilla icon" />
</td>
<td>
<a href="index.html" style="color:white;text-decoration:none"><font size="5">Scintilla</font></a>
</td>
</tr>
</table>
<h2>
Language Types
</h2>
<p>
Scintilla contains lexers for various types of languages:
<ul>
<li>Programming languages like C++, Java, and Python.</li>
<li>Assembler languages are low-level programming languages which may additionally include instructions and registers.</li>
<li>Markup languages like HTML, TeX, and Markdown.</li>
<li>Data languages like EDIFACT and YAML.</li>
</ul>
</p>
<p>
Some languages can be used in different ways. JavaScript is a programming language but also
the basis of JSON data files. Similarly,
<a href="https://en.wikipedia.org/wiki/S-expression">Lisp s expressions</a> can be used for both source code and data.
</p>
<p>
Each language type has common elements such as identifiers in programming languages.
These common elements should be identified so that languages can be displayed with common
styles for these elements.
Style tags are used for this purpose in Scintilla.
</p>
<h2>
Style Tags
</h2>
<p>
Every style has a list of tags where a tag is a lower-case word containing only the common ASCII letters 'a'-'z'
such as "comment" or "operator".
</p>
<p>
Tags are ordered from most important to least important.
</p>
<p>
While applications may assign visual attributes for tag lists in many different ways, one reasonable technique is to
apply tag-specific attributes in reverse order so that earlier and more important tags override less important tags.
For example, the tag list <code>"error comment documentation keyword"</code> with
a set of tag attributes <br />
<code>{ comment=fore:green,back:very-light-green,font:Serif documentation=fore:light-green error=strikethrough keyword=bold }</code><br />
could be rendered as <br />
<code>bold,fore:light-green,back:very-light-green,font:Serif,strikethrough</code>.
</p>
<p>
Alternative renderings could check for multi-tag combinations like
<code>{ comment.documentation=fore:light-green comment.line=dark-green comment=green }.</code>
</p>
<p>
Commonly, a tag list will contain an optional embedded language; optional statuses; a base type; and a set of type modifiers:<br />
<code>embedded-language? status* base-type modifiers*</code>
</p>
<h3>Embedded language</h3>
<p>
The embedded language may be a source <code>(client | server)</code> followed by a language name
<code>(javascript | php | python | basic)</code>.
This may be extended in the future with other programming languages and style-definition languages like CSS.
</p>
<h3>Status</h3>
<p>
The statuses may be <code>(error | unused | predefined | inactive)</code>.<br />
The <code>error</code> status is used for lexical statuses that indicate errors in the source code such as unterminated quoted strings.<br />
The <code>unused</code> status may indicate a gap in the lexical states, possibly because an old lexical class is no longer used or an upcoming lexical class may fill that position.<br />
The <code>predefined</code> status indicates a style in the range 32.39 that is used for non-lexical purposes in Scintilla.<br />
The <code>inactive</code> status is used for text that is not currently interpreted such as C++ code that is contained within a '#if 0' preprocessor block.
</p>
<h3>Basic Types</h3>
<p>
The basic types for programming languages are <code>(default | operator | keyword | identifier | literal | comment | preprocessor | label)</code>.<br />
The <code>default</code> type is commonly used for spaces and tabs between tokens although it may cover other characters in some languages.
</p>
<p>
Assembler languages add <code>(instruction | register)</code>. to the basic types from programming languages.<br />
</p>
<p>
The basic types for markup languages are <code>(default | tag | attribute | comment | preprocessor)</code>.<br />
</p>
<p>
The basic types for data languages are <code>(default | key | data | comment)</code>.<br />
</p>
<h3>Comments</h3>
<p>
Programming languages may differentiate between line and stream comments and treat documentation comments as distinct from other comments.
Documentation comments may be marked up with documentation keywords.<br />
The additional attributes commonly used are <code>(line | documentation | keyword | taskmarker)</code>.
</p>
<h3>Literals</h3>
<p>
Programming and assembler languages contain a rich set of literals including numbers like <code>7</code> and <code>3.89e23</code>; <code>"string\n"</code>; and <code>nullptr</code>
and differentiating between these is often wanted.<br />
The common literal types are <code>(numeric | boolean | string | regex | date | time | uuid | nil | compound)</code>.<br />
Numeric literal types are subdivided into <code>(integer | real)</code>.<br />
String literal types may add (perhaps multiple) further attributes from <code> (heredoc | character | escapesequence | interpolated | multiline | raw)</code>.<br />
</p>
<p>
An escape sequence within an interpolated heredoc may thus be <code>literal string heredoc escapesequence</code>.
</p>
<h3>
List of known tags
</h3>
<table>
<tr><td><code>attribute</code></td><td>Markup attribute</td></tr>
<tr><td><code>basic</code></td><td>Embedded Basic</td></tr>
<tr><td><code>boolean</code></td><td>True or false literal</td></tr>
<tr><td><code>character</code></td><td>Single character literal as opposed to a string literal</td></tr>
<tr><td><code>client</code></td><td>Script executed on client</td></tr>
<tr><td><code>comment</code></td><td>The standard comment type in a language: may be stream or line</td></tr>
<tr><td><code>compound</code></td><td>Literal containing multiple subliterals such as a tuple or complex number</td></tr>
<tr><td><code>data</code></td><td>A value in a data file</td></tr>
<tr><td><code>date</code></td><td>Literal representing a data such as '19/November/1975'</td></tr>
<tr><td><code>default</code></td><td>Starting state commonly also used for white space</td></tr>
<tr><td><code>documentation</code></td><td>Comment that can be extracted into documentation</td></tr>
<tr><td><code>error</code></td><td>State indicating an invalid or erroneous element</td></tr>
<tr><td><code>escapesequence</code></td><td>Parts of a string that are not literal such as '\t' for tab in C</td></tr>
<tr><td><code>heredoc</code></td><td>Lengthy text literal marked by a word at both ends</td></tr>
<tr><td><code>identifier</code></td><td>Name that identifies an object or class of object</td></tr>
<tr><td><code>inactive</code></td><td>Code that is not currently interpreted</td></tr>
<tr><td><code>instruction</code></td><td>Mnemonic in assembler languages like 'addc'</td></tr>
<tr><td><code>integer</code></td><td>Numeric literal with no fraction or exponent like '738'</td></tr>
<tr><td><code>interpolated</code></td><td>String that can contain expressions</td></tr>
<tr><td><code>javascript</code></td><td>Embedded Javascript</td></tr>
<tr><td><code>key</code></td><td>Element which allows finding associated data</td></tr>
<tr><td><code>keyword</code></td><td>Reserved word with special meaning like 'while'</td></tr>
<tr><td><code>label</code></td><td>Destination for jumps in programming and assembler languages</td></tr>
<tr><td><code>line</code></td><td>Differentiates between stream comments and line comments in languages that have both</td></tr>
<tr><td><code>literal</code></td><td>Fixed value in source code</td></tr>
<tr><td><code>multiline</code></td><td>Differentiates between single line and multiline elements, commonly strings</td></tr>
<tr><td><code>nil</code></td><td>Literal for the null pointer such as nullptr in C++ or NULL in C</td></tr>
<tr><td><code>numeric</code></td><td>Literal number like '16'</td></tr>
<tr><td><code>operator</code></td><td>Punctuation character such as '&amp;' or '['</td></tr>
<tr><td><code>php</code></td><td>Embedded PHP</td></tr>
<tr><td><code>predefined</code></td><td>Style in the range 32.39 that is used for non-lexical purposes</td></tr>
<tr><td><code>preprocessor</code></td><td>Element that is recognized in an early stage of translation</td></tr>
<tr><td><code>python</code></td><td>Embedded Python</td></tr>
<tr><td><code>raw</code></td><td>String type that avoids interpretation: may be used for regular expressions in languages without a specific regex type</td></tr>
<tr><td><code>real</code></td><td>Numeric literal which may have a fraction or exponent like '3.84e-15'</td></tr>
<tr><td><code>regex</code></td><td>Regular expression literal like '^[a-z]+'</td></tr>
<tr><td><code>register</code></td><td>CPU register in assembler languages</td></tr>
<tr><td><code>server</code></td><td>Script executed on server</td></tr>
<tr><td><code>string</code></td><td>Sequence of characters</td></tr>
<tr><td><code>tag</code></td><td>Markup tag like '&lt;br /&gt;'</td></tr>
<tr><td><code>taskmarker</code></td><td>Word in comment that marks future work like 'FIXME'</td></tr>
<tr><td><code>time</code></td><td>Literal representing a time such as '9:34:31'</td></tr>
<tr><td><code>unused</code></td><td>Style that is not currently used</td></tr>
<tr><td><code>uuid</code></td><td>Universally unique identifier often used in interface definition files which may look like '{098f2470-bae0-11cd-b579-08002b30bfeb}'</td></tr>
</table>
<h2>
Extension
</h2>
<p>
Each element in this scheme may be extended in the future. This may be done by revising this document to provide a common approach to new features.
Individual lexers may also choose to expose unique language features through new tags.
</p>
<h2>
Translation
</h2>
<p>
Tags could be exposed directly in user interfaces or configuration languages.
However, an application may also translate these to match its naming schema.
Capitalization and punctuation could be different (like <code>Here-Doc</code> instead of <code>heredoc</code>),
terminology changed ("constant" instead of "literal"),
or human language changed from English to Chinese or Spanish.
</p>
<p>
Starting from a common set of tags makes these modifications tractable.
</p>
<h2>
Open issues
</h2>
<p>
The C++ lexer (for example) has inactive states and dynamically allocated substyles.
These should be exposed through the metadata mechanism but are not currently.
</p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -9,7 +9,8 @@
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
<meta name="Description"
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
<meta name="Date.Modified" content="20150803" />
<meta name="Date.Modified" content="20180212" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
#versionlist {
margin: 0;
@ -37,7 +38,7 @@
<script type="text/javascript">
function IsRemote() {
var loc = '' + window.location;
return loc.indexOf('http:') != -1;
return (loc.indexOf('http:')) != -1 || (loc.indexOf('https:') != -1);
}
</script>
<title>
@ -52,11 +53,11 @@
</td>
<td width="40%" align="left">
<font color="#FFCC99" size="4"> A free source code editing component for Win32,
GTK+, and OS X</font>
GTK, and OS X</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3"> Release version 3.6.0<br />
Site last modified August 3 2015</font>
<font color="#FFCC99" size="3"> Release version 3.10.6<br />
Site last modified February 12 2018</font>
</td>
<td width="20%">
&nbsp;
@ -65,30 +66,30 @@
</table>
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="100%" style="background: url(http://www.scintilla.org/SciBreak.jpg) no-repeat;height:150px;">
<td width="100%" style="background: url(https://www.scintilla.org/SciBreak.jpg) no-repeat;height:150px;">
&nbsp;
</td>
</tr>
</table>
<ul id="versionlist">
<li>Version 3.6.0 implements more multiple selection operations.
Type definitions Sci_Position, Sci_PositionU, and Sci_PositionCR allow client
code to prepare for a future change allowing larger than 2 GB documents.</li>
<li>Version 3.5.7 fixes a crash on Cocoa with drag and drop and adds commands to add the next or each occurrence of the
main selection to the set of selections.</li>
<li>Version 3.5.6 fixes a bug with undo on Cocoa that could lose data.</li>
<li>Version 3.5.5 improves IME on Qt and fixes minor bugs.</li>
<li>Version 3.5.4 improves indicators to be able to change appearance on mouse-over and to use a wide variety of colours together.</li>
<li>Version 3.7.5 adds a Reverse Selected Lines command.
MSVC 2013 is no longer supported.</li>
<li>Version 3.7.4 restores performance on GTK+.
C++11 now required to build and Windows NT 4 is no longer supported.</li>
<li>Version 3.7.3 fixes problems with GTK+ on Wayland.</li>
<li>Version 3.7.2 fixes some crashes on GTK+ and Cocoa, commonly at destruction.</li>
<li>Version 3.7.1 supports accessibility on GTK+ and Cocoa.
The Scintilla namespace is not exposed in Scintilla.h and some deprecated APIs were removed.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="http://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
<li id="remote2"><a href="http://www.scintilla.org/ScintillaDownload.html">Download</a></li>
<li><a href="http://www.scintilla.org/ScintillaDoc.html">Documentation</a></li>
<li><a href="http://www.scintilla.org/ScintillaToDo.html">Bugs</a></li>
<li id="remote3"><a href="http://www.scintilla.org/SciTE.html">SciTE</a></li>
<li><a href="http://www.scintilla.org/ScintillaHistory.html">History</a></li>
<li><a href="http://www.scintilla.org/ScintillaRelated.html">Related</a></li>
<li id="remote4"><a href="http://www.scintilla.org/Privacy.html">Privacy</a></li>
<li id="remote1"><a href="https://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
<li id="remote2"><a href="https://www.scintilla.org/ScintillaDownload.html">Download</a></li>
<li><a href="https://www.scintilla.org/ScintillaDoc.html">Documentation</a></li>
<li><a href="https://www.scintilla.org/ScintillaToDo.html">Bugs</a></li>
<li id="remote3"><a href="https://www.scintilla.org/SciTE.html">SciTE</a></li>
<li><a href="https://www.scintilla.org/ScintillaHistory.html">History</a></li>
<li><a href="https://www.scintilla.org/ScintillaRelated.html">Related</a></li>
<li id="remote4"><a href="https://www.scintilla.org/Privacy.html">Privacy</a></li>
</ul>
<script type="text/javascript" language="JavaScript"><!--
if (!IsRemote()) { //if NOT remote...
@ -99,8 +100,8 @@ if (!IsRemote()) { //if NOT remote...
}
//--></script>
<p>
<a href="http://www.scintilla.org/ScintillaDoc.html">Scintilla</a> is a free source code editing component.
It comes with complete source code and a <a href="http://www.scintilla.org/License.txt">license</a> that
<a href="https://www.scintilla.org/ScintillaDoc.html">Scintilla</a> is a free source code editing component.
It comes with complete source code and a <a href="https://www.scintilla.org/License.txt">license</a> that
permits use in any free project or commercial product.
</p>
<p>
@ -113,7 +114,8 @@ if (!IsRemote()) { //if NOT remote...
colours and multiple fonts.
</p>
<p>
<a href="http://www.scintilla.org/SciTE.html">SciTE</a> is a SCIntilla based Text Editor. Originally built to
<p>
<a href="https://www.scintilla.org/SciTE.html">SciTE</a> is a SCIntilla based Text Editor. Originally built to
demonstrate Scintilla, it has grown to be a generally useful editor with facilities for
building and running programs. It is best used for jobs with simple configurations - I use it
for building test and demonstration programs as well as SciTE and Scintilla, themselves.
@ -128,32 +130,36 @@ if (!IsRemote()) { //if NOT remote...
</p>
<p>
Scintilla and SciTE are currently available for Intel Win32, OS X, and Linux compatible operating
systems with GTK+. They have been run on Windows XP, Windows 7, OS X 10.6+, and on Ubuntu 10.10
with GTK+ 2.20. <a href="http://www.scintilla.org/SciTEImage.html">Here is a screenshot of
systems with GTK. They have been run on Windows XP, Windows 7, OS X 10.7+, and on Ubuntu 14.04
with GTK 2.24. <a href="https://www.scintilla.org/SciTEImage.html">Here is a screenshot of
SciTE.</a><br />
</p>
<p>
You can <a href="http://www.scintilla.org/ScintillaDownload.html">download Scintilla.</a>
You can <a href="https://www.scintilla.org/ScintillaDownload.html">download Scintilla.</a>
</p>
<p>
The source code can be downloaded via Mercurial at the Source Forge
<a href="http://sourceforge.net/projects/scintilla/">Scintilla project page</a>.
<a href="https://sourceforge.net/projects/scintilla/">Scintilla project page</a>.
</p>
<p>
<a href="http://www.scintilla.org/ScintillaRelated.html">Related sites.</a>
<a href="https://www.scintilla.org/ScintillaRelated.html">Related sites.</a>
</p>
<p>
<a href="http://www.scintilla.org/ScintillaToDo.html">Bugs and To Do list.</a>
<a href="https://www.scintilla.org/ScintillaToDo.html">Bugs and To Do list.</a>
</p>
<p>
<a href="http://www.scintilla.org/ScintillaHistory.html">History and contribution credits.</a>
<a href="https://www.scintilla.org/ScintillaHistory.html">History and contribution credits.</a>
</p>
<p>
<a href="http://www.scintilla.org/Icons.html">Icons that can be used with Scintilla.</a>
<a href="https://www.scintilla.org/Icons.html">Icons that can be used with Scintilla.</a>
</p>
<p>
The <a href="https://scintilla.sourceforge.io/LongTermDownload.html">LongTerm3</a>
branch of Scintilla avoids using features from C++14 or later in order to support older systems.
</p>
<p>
Questions and comments about Scintilla should be directed to the
<a href="http://groups.google.com/group/scintilla-interest">scintilla-interest</a>
<a href="https://groups.google.com/forum/#!forum/scintilla-interest">scintilla-interest</a>
mailing list,
which is for discussion of Scintilla and related projects, their bugs and future features.
This is a low traffic list, averaging less than 20 messages per week.
@ -165,21 +171,21 @@ if (!IsRemote()) { //if NOT remote...
may receive no response.
<br />
</p>
There is a <a href="http://sourceforge.net/projects/scintilla/">Scintilla project page</a>
There is a <a href="https://sourceforge.net/projects/scintilla/">Scintilla project page</a>
hosted on
<script type="text/javascript" language="JavaScript">
<!--
if (IsRemote()) {
document.write('<a href="http://sourceforge.net/projects/scintilla/">');
document.write('<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> ');
document.write('<a href="https://sourceforge.net/projects/scintilla/">');
document.write('<img src="https://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> ');
} else {
document.write('<a href="http://sourceforge.net/projects/scintilla/">SourceForge<\/a>');
document.write('<a href="https://sourceforge.net/projects/scintilla/">SourceForge<\/a>');
}
//-->
</script>
<noscript>
<a href="http://sourceforge.net/projects/scintilla">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
<a href="https://sourceforge.net/projects/scintilla/">
<img src="https://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
</noscript>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,70 @@
// Scintilla source code edit control
// Converter.h - Encapsulation of iconv
// Copyright 2004 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef CONVERTER_H
#define CONVERTER_H
namespace Scintilla {
const GIConv iconvhBad = (GIConv)(-1);
const gsize sizeFailure = static_cast<gsize>(-1);
/**
* Encapsulate g_iconv safely.
*/
class Converter {
GIConv iconvh;
void OpenHandle(const char *fullDestination, const char *charSetSource) noexcept {
iconvh = g_iconv_open(fullDestination, charSetSource);
}
bool Succeeded() const noexcept {
return iconvh != iconvhBad;
}
public:
Converter() noexcept {
iconvh = iconvhBad;
}
Converter(const char *charSetDestination, const char *charSetSource, bool transliterations) {
iconvh = iconvhBad;
Open(charSetDestination, charSetSource, transliterations);
}
~Converter() {
Close();
}
operator bool() const noexcept {
return Succeeded();
}
void Open(const char *charSetDestination, const char *charSetSource, bool transliterations) {
Close();
if (*charSetSource) {
// Try allowing approximate transliterations
if (transliterations) {
std::string fullDest(charSetDestination);
fullDest.append("//TRANSLIT");
OpenHandle(fullDest.c_str(), charSetSource);
}
if (!Succeeded()) {
// Transliterations failed so try basic name
OpenHandle(charSetDestination, charSetSource);
}
}
}
void Close() noexcept {
if (Succeeded()) {
g_iconv_close(iconvh);
iconvh = iconvhBad;
}
}
gsize Convert(char **src, gsize *srcleft, char **dst, gsize *dstleft) const noexcept {
if (!Succeeded()) {
return sizeFailure;
} else {
return g_iconv(iconvh, src, srcleft, dst, dstleft);
}
}
};
}
#endif

View File

@ -0,0 +1,23 @@
#!/usr/bin/env python
# DepGen.py - produce a make dependencies file for Scintilla
# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# Requires Python 2.7 or later
import sys
sys.path.append("../")
import scripts.Dependencies as Dependencies
topComment = "# Created by DepGen.py. To recreate, run 'python DepGen.py'.\n"
def Generate():
sources = ["../src/*.cxx", "../lexlib/*.cxx", "../lexers/*.cxx"]
includes = ["../include", "../src", "../lexlib"]
deps = Dependencies.FindDependencies(["../gtk/*.cxx"] + sources, ["../gtk"] + includes, ".o", "../gtk/")
Dependencies.UpdateDependencies("../gtk/deps.mak", deps, topComment)
if __name__ == "__main__":
Generate()

View File

@ -0,0 +1,295 @@
// Scintilla source code edit control
// ScintillaGTK.h - GTK+ specific subclass of ScintillaBase
// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef SCINTILLAGTK_H
#define SCINTILLAGTK_H
namespace Scintilla {
class ScintillaGTKAccessible;
#define OBJECT_CLASS GObjectClass
class ScintillaGTK : public ScintillaBase {
friend class ScintillaGTKAccessible;
_ScintillaObject *sci;
Window wText;
Window scrollbarv;
Window scrollbarh;
GtkAdjustment *adjustmentv;
GtkAdjustment *adjustmenth;
Window wSelection;
int verticalScrollBarWidth;
int horizontalScrollBarHeight;
SelectionText primary;
GdkEvent *evbtn;
guint buttonMouse;
bool capturedMouse;
bool dragWasDropped;
int lastKey;
int rectangularSelectionModifier;
GtkWidgetClass *parentClass;
static GdkAtom atomUTF8;
static GdkAtom atomString;
static GdkAtom atomUriList;
static GdkAtom atomDROPFILES_DND;
GdkAtom atomSought;
#if PLAT_GTK_WIN32
CLIPFORMAT cfColumnSelect;
#endif
Window wPreedit;
Window wPreeditDraw;
GtkIMContext *im_context;
PangoScript lastNonCommonScript;
// Wheel mouse support
unsigned int linesPerScroll;
GTimeVal lastWheelMouseTime;
gint lastWheelMouseDirection;
gint wheelMouseIntensity;
gdouble smoothScrollY;
gdouble smoothScrollX;
#if GTK_CHECK_VERSION(3,0,0)
cairo_rectangle_list_t *rgnUpdate;
#else
GdkRegion *rgnUpdate;
#endif
bool repaintFullWindow;
guint styleIdleID;
int accessibilityEnabled;
AtkObject *accessible;
public:
explicit ScintillaGTK(_ScintillaObject *sci_);
// Deleted so ScintillaGTK objects can not be copied.
ScintillaGTK(const ScintillaGTK &) = delete;
ScintillaGTK(ScintillaGTK &&) = delete;
ScintillaGTK &operator=(const ScintillaGTK &) = delete;
ScintillaGTK &operator=(ScintillaGTK &&) = delete;
virtual ~ScintillaGTK();
static ScintillaGTK *FromWidget(GtkWidget *widget);
static void ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class);
private:
void Init();
void Finalise() override;
bool AbandonPaint() override;
void DisplayCursor(Window::Cursor c) override;
bool DragThreshold(Point ptStart, Point ptNow) override;
void StartDrag() override;
Sci::Position TargetAsUTF8(char *text) const;
Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;
bool ValidCodePage(int codePage) const override;
public: // Public for scintilla_send_message
sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override;
private:
sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override;
struct TimeThunk {
TickReason reason;
ScintillaGTK *scintilla;
guint timer;
TimeThunk() noexcept : reason(tickCaret), scintilla(nullptr), timer(0) {}
};
TimeThunk timers[tickDwell+1];
bool FineTickerRunning(TickReason reason) override;
void FineTickerStart(TickReason reason, int millis, int tolerance) override;
void FineTickerCancel(TickReason reason) override;
bool SetIdle(bool on) override;
void SetMouseCapture(bool on) override;
bool HaveMouseCapture() override;
bool PaintContains(PRectangle rc) override;
void FullPaint();
PRectangle GetClientRectangle() const override;
void ScrollText(Sci::Line linesToMove) override;
void SetVerticalScrollPos() override;
void SetHorizontalScrollPos() override;
bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;
void ReconfigureScrollBars() override;
void NotifyChange() override;
void NotifyFocus(bool focus) override;
void NotifyParent(SCNotification scn) override;
void NotifyKey(int key, int modifiers);
void NotifyURIDropped(const char *list);
const char *CharacterSetID() const;
CaseFolder *CaseFolderForEncoding() override;
std::string CaseMapString(const std::string &s, int caseMapping) override;
int KeyDefault(int key, int modifiers) override;
void CopyToClipboard(const SelectionText &selectedText) override;
void Copy() override;
void RequestSelection(GdkAtom atomSelection);
void Paste() override;
void CreateCallTipWindow(PRectangle rc) override;
void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;
bool OwnPrimarySelection();
void ClaimSelection() override;
void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText);
void InsertSelection(GtkSelectionData *selectionData);
public: // Public for SelectionReceiver
GObject *MainObject() const noexcept;
void ReceivedClipboard(GtkSelectionData *selection_data) noexcept;
private:
void ReceivedSelection(GtkSelectionData *selection_data);
void ReceivedDrop(GtkSelectionData *selection_data);
static void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text);
void StoreOnClipboard(SelectionText *clipText);
static void ClipboardGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, void *data);
static void ClipboardClearSelection(GtkClipboard *clip, void *data);
void UnclaimSelection(GdkEventSelection *selection_event);
static void PrimarySelection(GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time_stamp, ScintillaGTK *sciThis);
static gboolean PrimaryClear(GtkWidget *widget, GdkEventSelection *event, ScintillaGTK *sciThis);
void Resize(int width, int height);
// Callback functions
void RealizeThis(GtkWidget *widget);
static void Realize(GtkWidget *widget);
void UnRealizeThis(GtkWidget *widget);
static void UnRealize(GtkWidget *widget);
void MapThis();
static void Map(GtkWidget *widget);
void UnMapThis();
static void UnMap(GtkWidget *widget);
gint FocusInThis(GtkWidget *widget);
static gint FocusIn(GtkWidget *widget, GdkEventFocus *event);
gint FocusOutThis(GtkWidget *widget);
static gint FocusOut(GtkWidget *widget, GdkEventFocus *event);
static void SizeRequest(GtkWidget *widget, GtkRequisition *requisition);
#if GTK_CHECK_VERSION(3,0,0)
static void GetPreferredWidth(GtkWidget *widget, gint *minimalWidth, gint *naturalWidth);
static void GetPreferredHeight(GtkWidget *widget, gint *minimalHeight, gint *naturalHeight);
#endif
static void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation);
#if GTK_CHECK_VERSION(3,0,0)
gboolean DrawTextThis(cairo_t *cr);
static gboolean DrawText(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis);
gboolean DrawThis(cairo_t *cr);
static gboolean DrawMain(GtkWidget *widget, cairo_t *cr);
#else
gboolean ExposeTextThis(GtkWidget *widget, GdkEventExpose *ose);
static gboolean ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis);
gboolean Expose(GtkWidget *widget, GdkEventExpose *ose);
static gboolean ExposeMain(GtkWidget *widget, GdkEventExpose *ose);
#endif
void ForAll(GtkCallback callback, gpointer callback_data);
static void MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
static void ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);
static void ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);
gint PressThis(GdkEventButton *event);
static gint Press(GtkWidget *widget, GdkEventButton *event);
static gint MouseRelease(GtkWidget *widget, GdkEventButton *event);
static gint ScrollEvent(GtkWidget *widget, GdkEventScroll *event);
static gint Motion(GtkWidget *widget, GdkEventMotion *event);
gboolean KeyThis(GdkEventKey *event);
static gboolean KeyPress(GtkWidget *widget, GdkEventKey *event);
static gboolean KeyRelease(GtkWidget *widget, GdkEventKey *event);
#if GTK_CHECK_VERSION(3,0,0)
gboolean DrawPreeditThis(GtkWidget *widget, cairo_t *cr);
static gboolean DrawPreedit(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis);
#else
gboolean ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose);
static gboolean ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis);
#endif
AtkObject *GetAccessibleThis(GtkWidget *widget);
static AtkObject *GetAccessible(GtkWidget *widget);
bool KoreanIME();
void CommitThis(char *commitStr);
static void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis);
void PreeditChangedInlineThis();
void PreeditChangedWindowedThis();
static void PreeditChanged(GtkIMContext *context, ScintillaGTK *sciThis);
void MoveImeCarets(int pos);
void DrawImeIndicator(int indicator, int len);
void SetCandidateWindowPos();
static void StyleSetText(GtkWidget *widget, GtkStyle *previous, void *);
static void RealizeText(GtkWidget *widget, void *);
static void Dispose(GObject *object);
static void Destroy(GObject *object);
static void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data,
guint time);
static void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data,
guint info, guint time);
static gint SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event);
gboolean DragMotionThis(GdkDragContext *context, gint x, gint y, guint dragtime);
static gboolean DragMotion(GtkWidget *widget, GdkDragContext *context,
gint x, gint y, guint dragtime);
static void DragLeave(GtkWidget *widget, GdkDragContext *context,
guint time);
static void DragEnd(GtkWidget *widget, GdkDragContext *context);
static gboolean Drop(GtkWidget *widget, GdkDragContext *context,
gint x, gint y, guint time);
static void DragDataReceived(GtkWidget *widget, GdkDragContext *context,
gint x, gint y, GtkSelectionData *selection_data, guint info, guint time);
static void DragDataGet(GtkWidget *widget, GdkDragContext *context,
GtkSelectionData *selection_data, guint info, guint time);
static gboolean TimeOut(gpointer ptt);
static gboolean IdleCallback(gpointer pSci);
static gboolean StyleIdle(gpointer pSci);
void IdleWork() override;
void QueueIdleWork(WorkNeeded::workItems items, Sci::Position upTo) override;
void SetDocPointer(Document *document) override;
static void PopUpCB(GtkMenuItem *menuItem, ScintillaGTK *sciThis);
#if GTK_CHECK_VERSION(3,0,0)
static gboolean DrawCT(GtkWidget *widget, cairo_t *cr, CallTip *ctip);
#else
static gboolean ExposeCT(GtkWidget *widget, GdkEventExpose *ose, CallTip *ctip);
#endif
static gboolean PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis);
static sptr_t DirectFunction(sptr_t ptr,
unsigned int iMessage, uptr_t wParam, sptr_t lParam);
};
// helper class to watch a GObject lifetime and get notified when it dies
class GObjectWatcher {
GObject *weakRef;
void WeakNotifyThis(GObject *obj G_GNUC_UNUSED) {
PLATFORM_ASSERT(obj == weakRef);
Destroyed();
weakRef = nullptr;
}
static void WeakNotify(gpointer data, GObject *obj) {
static_cast<GObjectWatcher *>(data)->WeakNotifyThis(obj);
}
public:
GObjectWatcher(GObject *obj) :
weakRef(obj) {
g_object_weak_ref(weakRef, WeakNotify, this);
}
virtual ~GObjectWatcher() {
if (weakRef) {
g_object_weak_unref(weakRef, WeakNotify, this);
}
}
virtual void Destroyed() {}
bool IsDestroyed() const {
return weakRef != nullptr;
}
};
std::string ConvertText(const char *s, size_t len, const char *charSetDest,
const char *charSetSource, bool transliterations, bool silent=false);
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,194 @@
/* Scintilla source code edit control */
/* ScintillaGTKAccessible.h - GTK+ accessibility for ScintillaGTK */
/* Copyright 2016 by Colomban Wendling <colomban@geany.org>
* The License.txt file describes the conditions under which this software may be distributed. */
#ifndef SCINTILLAGTKACCESSIBLE_H
#define SCINTILLAGTKACCESSIBLE_H
namespace Scintilla {
#ifndef ATK_CHECK_VERSION
# define ATK_CHECK_VERSION(x, y, z) 0
#endif
class ScintillaGTKAccessible {
private:
// weak references to related objects
GtkAccessible *accessible;
ScintillaGTK *sci;
// local state for comparing
Sci::Position old_pos;
std::vector<SelectionRange> old_sels;
bool Enabled() const;
void UpdateCursor();
void Notify(GtkWidget *widget, gint code, SCNotification *nt);
static void SciNotify(GtkWidget *widget, gint code, SCNotification *nt, gpointer data) {
try {
static_cast<ScintillaGTKAccessible*>(data)->Notify(widget, code, nt);
} catch (...) {}
}
Sci::Position ByteOffsetFromCharacterOffset(Sci::Position startByte, int characterOffset) {
if (!(sci->pdoc->LineCharacterIndex() & SC_LINECHARACTERINDEX_UTF32)) {
return startByte + characterOffset;
}
if (characterOffset > 0) {
// Try and reduce the range by reverse-looking into the character offset cache
Sci::Line lineStart = sci->pdoc->LineFromPosition(startByte);
Sci::Position posStart = sci->pdoc->IndexLineStart(lineStart, SC_LINECHARACTERINDEX_UTF32);
Sci::Line line = sci->pdoc->LineFromPositionIndex(posStart + characterOffset, SC_LINECHARACTERINDEX_UTF32);
if (line != lineStart) {
startByte += sci->pdoc->LineStart(line) - sci->pdoc->LineStart(lineStart);
characterOffset -= sci->pdoc->IndexLineStart(line, SC_LINECHARACTERINDEX_UTF32) - posStart;
}
}
Sci::Position pos = sci->pdoc->GetRelativePosition(startByte, characterOffset);
if (pos == INVALID_POSITION) {
// clamp invalid positions inside the document
if (characterOffset > 0) {
return sci->pdoc->Length();
} else {
return 0;
}
}
return pos;
}
Sci::Position ByteOffsetFromCharacterOffset(Sci::Position characterOffset) {
return ByteOffsetFromCharacterOffset(0, characterOffset);
}
Sci::Position CharacterOffsetFromByteOffset(Sci::Position byteOffset) {
if (!(sci->pdoc->LineCharacterIndex() & SC_LINECHARACTERINDEX_UTF32)) {
return byteOffset;
}
const Sci::Line line = sci->pdoc->LineFromPosition(byteOffset);
const Sci::Position lineStart = sci->pdoc->LineStart(line);
return sci->pdoc->IndexLineStart(line, SC_LINECHARACTERINDEX_UTF32) + sci->pdoc->CountCharacters(lineStart, byteOffset);
}
void CharacterRangeFromByteRange(Sci::Position startByte, Sci::Position endByte, int *startChar, int *endChar) {
*startChar = CharacterOffsetFromByteOffset(startByte);
*endChar = *startChar + sci->pdoc->CountCharacters(startByte, endByte);
}
void ByteRangeFromCharacterRange(int startChar, int endChar, Sci::Position& startByte, Sci::Position& endByte) {
startByte = ByteOffsetFromCharacterOffset(startChar);
endByte = ByteOffsetFromCharacterOffset(startByte, endChar - startChar);
}
Sci::Position PositionBefore(Sci::Position pos) {
return sci->pdoc->MovePositionOutsideChar(pos - 1, -1, true);
}
Sci::Position PositionAfter(Sci::Position pos) {
return sci->pdoc->MovePositionOutsideChar(pos + 1, 1, true);
}
int StyleAt(Sci::Position position, bool ensureStyle = false) {
if (ensureStyle)
sci->pdoc->EnsureStyledTo(position);
return sci->pdoc->StyleAt(position);
}
// For AtkText
gchar *GetTextRangeUTF8(Sci::Position startByte, Sci::Position endByte);
gchar *GetText(int startChar, int endChar);
gchar *GetTextAfterOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);
gchar *GetTextBeforeOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);
gchar *GetTextAtOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);
#if ATK_CHECK_VERSION(2, 10, 0)
gchar *GetStringAtOffset(int charOffset, AtkTextGranularity granularity, int *startChar, int *endChar);
#endif
gunichar GetCharacterAtOffset(int charOffset);
gint GetCharacterCount();
gint GetCaretOffset();
gboolean SetCaretOffset(int charOffset);
gint GetOffsetAtPoint(gint x, gint y, AtkCoordType coords);
void GetCharacterExtents(int charOffset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords);
AtkAttributeSet *GetAttributesForStyle(unsigned int styleNum);
AtkAttributeSet *GetRunAttributes(int charOffset, int *startChar, int *endChar);
AtkAttributeSet *GetDefaultAttributes();
gint GetNSelections();
gchar *GetSelection(gint selection_num, int *startChar, int *endChar);
gboolean AddSelection(int startChar, int endChar);
gboolean RemoveSelection(int selection_num);
gboolean SetSelection(gint selection_num, int startChar, int endChar);
// for AtkEditableText
bool InsertStringUTF8(Sci::Position bytePos, const gchar *utf8, Sci::Position lengthBytes);
void SetTextContents(const gchar *contents);
void InsertText(const gchar *text, int lengthBytes, int *charPosition);
void CopyText(int startChar, int endChar);
void CutText(int startChar, int endChar);
void DeleteText(int startChar, int endChar);
void PasteText(int charPosition);
public:
ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWidget *widget_);
~ScintillaGTKAccessible();
static ScintillaGTKAccessible *FromAccessible(GtkAccessible *accessible);
static ScintillaGTKAccessible *FromAccessible(AtkObject *accessible) {
return FromAccessible(GTK_ACCESSIBLE(accessible));
}
// So ScintillaGTK can notify us
void ChangeDocument(Document *oldDoc, Document *newDoc);
void NotifyReadOnly();
void SetAccessibility(bool enabled);
// Helper GtkWidget methods
static AtkObject *WidgetGetAccessibleImpl(GtkWidget *widget, AtkObject **cache, gpointer widget_parent_class);
// ATK methods
class AtkTextIface {
public:
static void init(::AtkTextIface *iface);
private:
AtkTextIface();
static gchar *GetText(AtkText *text, int start_offset, int end_offset);
static gchar *GetTextAfterOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset);
static gchar *GetTextBeforeOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset);
static gchar *GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset);
#if ATK_CHECK_VERSION(2, 10, 0)
static gchar *GetStringAtOffset(AtkText *text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset);
#endif
static gunichar GetCharacterAtOffset(AtkText *text, gint offset);
static gint GetCharacterCount(AtkText *text);
static gint GetCaretOffset(AtkText *text);
static gboolean SetCaretOffset(AtkText *text, gint offset);
static gint GetOffsetAtPoint(AtkText *text, gint x, gint y, AtkCoordType coords);
static void GetCharacterExtents(AtkText *text, gint offset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords);
static AtkAttributeSet *GetRunAttributes(AtkText *text, gint offset, gint *start_offset, gint *end_offset);
static AtkAttributeSet *GetDefaultAttributes(AtkText *text);
static gint GetNSelections(AtkText *text);
static gchar *GetSelection(AtkText *text, gint selection_num, gint *start_pos, gint *end_pos);
static gboolean AddSelection(AtkText *text, gint start, gint end);
static gboolean RemoveSelection(AtkText *text, gint selection_num);
static gboolean SetSelection(AtkText *text, gint selection_num, gint start, gint end);
};
class AtkEditableTextIface {
public:
static void init(::AtkEditableTextIface *iface);
private:
AtkEditableTextIface();
static void SetTextContents(AtkEditableText *text, const gchar *contents);
static void InsertText(AtkEditableText *text, const gchar *contents, gint length, gint *position);
static void CopyText(AtkEditableText *text, gint start, gint end);
static void CutText(AtkEditableText *text, gint start, gint end);
static void DeleteText(AtkEditableText *text, gint start, gint end);
static void PasteText(AtkEditableText *text, gint position);
};
};
}
#endif /* SCINTILLAGTKACCESSIBLE_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,139 @@
# Make file for Scintilla on Linux or compatible OS
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# This makefile assumes GCC 4.3 is used and changes will be needed to use other compilers.
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
# Builds for GTK+ 2 and no longer supports GTK+ 1.
# Also works with ming32-make on Windows.
.SUFFIXES: .cxx .c .o .h .a .list
srcdir ?= .
ifdef CLANG
CXX = clang++
CXXWARNFLAGS = -Wall -pedantic -Wno-deprecated-register -Wno-missing-braces
CC = clang
# Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for
# thread also need to create Position Independent Executable -> search online documentation
SANITIZE = address
#SANITIZE = undefined
else
CXXWARNFLAGS = -Wall -pedantic
endif
ARFLAGS = rc
RANLIB = touch
ifdef GTK3
GTKVERSION=gtk+-3.0
else
GTKVERSION=gtk+-2.0
endif
# Environment variable windir always defined on Win32
ifndef windir
ifeq ($(shell uname),Darwin)
RANLIB = ranlib
endif
endif
# Enable Position Independent Code except on Windows where it is the default so the flag produces a warning
ifndef windir
PICFLAGS = -fPIC
endif
ifdef windir
CC = gcc
DEL = del /q
COMPLIB=$(srcdir)\..\bin\scintilla.a
else
DEL = rm -f
COMPLIB=$(srcdir)/../bin/scintilla.a
endif
vpath %.h $(srcdir) $(srcdir)/../src $(srcdir)/../include $(srcdir)/../lexlib
vpath %.c $(srcdir)
vpath %.cxx $(srcdir) $(srcdir)/../src $(srcdir)/../lexlib $(srcdir)/../lexers
INCLUDEDIRS=-I $(srcdir)/../include -I $(srcdir)/../src -I $(srcdir)/../lexlib
ifdef CHECK_DEPRECATED
DEPRECATED=-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DDISABLE_GDK_FONT
endif
CXXBASEFLAGS=$(CXXWARNFLAGS) $(PICFLAGS) -DGTK -DSCI_LEXER $(INCLUDEDIRS) $(DEPRECATED)
ifdef NOTHREADS
THREADFLAGS=-DG_THREADS_IMPL_NONE
else
THREADFLAGS=
endif
ifdef NO_CXX11_REGEX
REFLAGS=-DNO_CXX11_REGEX
endif
ifdef DEBUG
ifdef CLANG
CTFLAGS=-DDEBUG -g -fsanitize=$(SANITIZE) $(CXXBASEFLAGS) $(THREADFLAGS)
else
CTFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
endif
else
CTFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
endif
CXXTFLAGS:=--std=gnu++0x $(CTFLAGS) $(REFLAGS)
ifdef LPEG_LEXER
CXXTFLAGS+=-DLPEG_LEXER -I ../src/lua
LUA_CFLAGS:=-std=c99 -pedantic -Wall -I ../src/lua -DLUA_USE_POSIX -DLUA_USE_DLOPEN
LUAOBJS:=lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o linit.o \
llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o \
ltable.o ltm.o lundump.o lvm.o lzio.o \
lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \
lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o \
lpcap.o lpcode.o lpprint.o lptree.o lpvm.o
endif
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
MARSHALLER=scintilla-marshal.o
all: $(COMPLIB)
clean:
$(DEL) *.o $(COMPLIB) *.plist
.cxx.o:
$(CXX) $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) -c $<
$(MARSHALLER): scintilla-marshal.c
$(CC) $(CONFIGFLAGS) $(CTFLAGS) $(CFLAGS) -w -c $<
$(LUAOBJS): %.o: ../lua/src/%.c
$(CC) $(LUA_CFLAGS) $(CFLAGS) -c $<
GLIB_GENMARSHAL = glib-genmarshal
GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal
.list.h:
$(GLIB_GENMARSHAL) --header $(GLIB_GENMARSHAL_FLAGS) $< > $@
.list.c:
$(GLIB_GENMARSHAL) --body $(GLIB_GENMARSHAL_FLAGS) $< > $@
LEXOBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard $(srcdir)/../lexers/Lex*.cxx)))))
analyze:
clang --analyze $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) $(srcdir)/*.cxx $(srcdir)/../src/*.cxx $(srcdir)/../lexlib/*.cxx $(srcdir)/../lexers/*.cxx
depend deps.mak:
python DepGen.py
$(COMPLIB): Accessor.o CharacterSet.o DefaultLexer.o LexerBase.o LexerModule.o LexerSimple.o StyleContext.o WordList.o \
CharClassify.o Decoration.o Document.o PerLine.o Catalogue.o CallTip.o CaseConvert.o CaseFolder.o \
ScintillaBase.o ContractionState.o EditModel.o Editor.o EditView.o ExternalLexer.o MarginView.o \
PropSetSimple.o PlatGTK.o \
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o ScintillaGTKAccessible.o CellBuffer.o CharacterCategory.o ViewStyle.o \
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o UniqueString.o XPM.o \
$(MARSHALLER) $(LEXOBJS) $(LUAOBJS)
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
# Automatically generate header dependencies with "make deps"
include deps.mak

View File

@ -1,10 +1,8 @@
#include <glib-object.h>
#include <glib-object.h>
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
#define g_marshal_value_peek_char(v) g_value_get_char (v)
#define g_marshal_value_peek_char(v) g_value_get_schar (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
@ -21,6 +19,7 @@
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
#define g_marshal_value_peek_object(v) g_value_get_object (v)
#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
* Do not access GValues directly in your code. Instead, use the
@ -35,8 +34,8 @@
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
#define g_marshal_value_peek_enum(v) (v)->data[0].v_int
#define g_marshal_value_peek_flags(v) (v)->data[0].v_uint
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_float(v) (v)->data[0].v_float
#define g_marshal_value_peek_double(v) (v)->data[0].v_double
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
@ -44,25 +43,25 @@
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */
/* NONE:INT,POINTER (scintilla-marshal.list:1) */
/* VOID:INT,OBJECT (scintilla-marshal.list:1) */
void
scintilla_marshal_VOID__INT_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
scintilla_marshal_VOID__INT_OBJECT (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__INT_POINTER) (gpointer data1,
gint arg_1,
gpointer arg_2,
gpointer data2);
register GMarshalFunc_VOID__INT_POINTER callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
typedef void (*GMarshalFunc_VOID__INT_OBJECT) (gpointer data1,
gint arg1,
gpointer arg2,
gpointer data2);
GCClosure *cc = (GCClosure *) closure;
gpointer data1, data2;
GMarshalFunc_VOID__INT_OBJECT callback;
g_return_if_fail (n_param_values == 3);
@ -76,11 +75,48 @@ scintilla_marshal_VOID__INT_POINTER (GClosure *closure,
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__INT_POINTER) (marshal_data ? marshal_data : cc->callback);
callback = (GMarshalFunc_VOID__INT_OBJECT) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_int (param_values + 1),
g_marshal_value_peek_pointer (param_values + 2),
g_marshal_value_peek_object (param_values + 2),
data2);
}
/* VOID:INT,BOXED (scintilla-marshal.list:2) */
void
scintilla_marshal_VOID__INT_BOXED (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__INT_BOXED) (gpointer data1,
gint arg1,
gpointer arg2,
gpointer data2);
GCClosure *cc = (GCClosure *) closure;
gpointer data1, data2;
GMarshalFunc_VOID__INT_BOXED callback;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__INT_BOXED) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_int (param_values + 1),
g_marshal_value_peek_boxed (param_values + 2),
data2);
}

View File

@ -0,0 +1,30 @@
/* This file is generated, all changes will be lost */
#ifndef __SCINTILLA_MARSHAL_MARSHAL_H__
#define __SCINTILLA_MARSHAL_MARSHAL_H__
#include <glib-object.h>
G_BEGIN_DECLS
/* VOID:INT,OBJECT (scintilla-marshal.list:1) */
extern
void scintilla_marshal_VOID__INT_OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:INT,BOXED (scintilla-marshal.list:2) */
extern
void scintilla_marshal_VOID__INT_BOXED (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
G_END_DECLS
#endif /* __SCINTILLA_MARSHAL_MARSHAL_H__ */

View File

@ -0,0 +1,2 @@
VOID:INT,OBJECT
VOID:INT,BOXED

View File

@ -10,15 +10,7 @@
#include "Sci_Position.h"
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
#ifdef _WIN32
#define SCI_METHOD __stdcall
#else
#define SCI_METHOD
#endif
enum { dvOriginal=0, dvLineEnd=1 };
@ -54,7 +46,7 @@ public:
virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0;
};
enum { lvOriginal=0, lvSubStyles=1 };
enum { lvOriginal=0, lvSubStyles=1, lvMetaData=2 };
class ILexer {
public:
@ -85,16 +77,14 @@ public:
virtual const char * SCI_METHOD GetSubStyleBases() = 0;
};
class ILoader {
class ILexerWithMetaData : public ILexerWithSubStyles {
public:
virtual int SCI_METHOD Release() = 0;
// Returns a status code from SC_STATUS_*
virtual int SCI_METHOD AddData(char *data, Sci_Position length) = 0;
virtual void * SCI_METHOD ConvertToDocument() = 0;
virtual int SCI_METHOD NamedStyles() = 0;
virtual const char * SCI_METHOD NameOfStyle(int style) = 0;
virtual const char * SCI_METHOD TagsOfStyle(int style) = 0;
virtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0;
};
#ifdef SCI_NAMESPACE
}
#endif
#endif

View File

@ -0,0 +1,21 @@
// Scintilla source code edit control
/** @file ILoader.h
** Interface for loading into a Scintilla document from a background thread.
**/
// Copyright 1998-2017 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef ILOADER_H
#define ILOADER_H
#include "Sci_Position.h"
class ILoader {
public:
virtual int SCI_METHOD Release() = 0;
// Returns a status code from SC_STATUS_*
virtual int SCI_METHOD AddData(const char *data, Sci_Position length) = 0;
virtual void * SCI_METHOD ConvertToDocument() = 0;
};
#endif

View File

@ -25,6 +25,7 @@
#define PLAT_FOX 0
#define PLAT_CURSES 0
#define PLAT_TK 0
#define PLAT_HAIKU 0
#if defined(FOX)
#undef PLAT_FOX
@ -38,6 +39,10 @@
#undef PLAT_CURSES
#define PLAT_CURSES 1
#elif defined(__HAIKU__)
#undef PLAT_HAIKU
#define PLAT_HAIKU 1
#elif defined(SCINTILLA_QT)
#undef PLAT_QT
#define PLAT_QT 1
@ -71,15 +76,10 @@
#endif
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
typedef float XYPOSITION;
typedef double XYACCUMULATOR;
inline int RoundXYPosition(XYPOSITION xyPos) {
return int(xyPos + 0.5);
}
// Underlying the implementation of the platform classes are platform specific types.
// Sometimes these need to be passed around by client code so they are defined here
@ -101,21 +101,31 @@ public:
XYPOSITION x;
XYPOSITION y;
explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) : x(x_), y(y_) {
constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) {
}
static Point FromInts(int x_, int y_) {
static Point FromInts(int x_, int y_) noexcept {
return Point(static_cast<XYPOSITION>(x_), static_cast<XYPOSITION>(y_));
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
bool operator!=(Point other) const noexcept {
return (x != other.x) || (y != other.y);
}
static Point FromLong(long lpoint);
Point operator+(Point other) const noexcept {
return Point(x + other.x, y + other.y);
}
Point operator-(Point other) const noexcept {
return Point(x - other.x, y - other.y);
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
};
/**
* A geometric rectangle class.
* PRectangle is similar to the Win32 RECT.
* PRectangle is similar to Win32 RECT.
* PRectangles contain their top and left sides, but not their right and bottom sides.
*/
class PRectangle {
@ -125,113 +135,147 @@ public:
XYPOSITION right;
XYPOSITION bottom;
explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) :
constexpr explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) noexcept :
left(left_), top(top_), right(right_), bottom(bottom_) {
}
static PRectangle FromInts(int left_, int top_, int right_, int bottom_) {
static PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept {
return PRectangle(static_cast<XYPOSITION>(left_), static_cast<XYPOSITION>(top_),
static_cast<XYPOSITION>(right_), static_cast<XYPOSITION>(bottom_));
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
bool operator==(PRectangle &rc) const {
bool operator==(const PRectangle &rc) const noexcept {
return (rc.left == left) && (rc.right == right) &&
(rc.top == top) && (rc.bottom == bottom);
}
bool Contains(Point pt) const {
bool Contains(Point pt) const noexcept {
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
bool ContainsWholePixel(Point pt) const {
// Does the rectangle contain all of the pixel to left/below the point
bool ContainsWholePixel(Point pt) const noexcept {
// Does the rectangle contain all of the pixel to left/below the point
return (pt.x >= left) && ((pt.x+1) <= right) &&
(pt.y >= top) && ((pt.y+1) <= bottom);
}
bool Contains(PRectangle rc) const {
bool Contains(PRectangle rc) const noexcept {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);
}
bool Intersects(PRectangle other) const {
bool Intersects(PRectangle other) const noexcept {
return (right > other.left) && (left < other.right) &&
(bottom > other.top) && (top < other.bottom);
}
void Move(XYPOSITION xDelta, XYPOSITION yDelta) {
void Move(XYPOSITION xDelta, XYPOSITION yDelta) noexcept {
left += xDelta;
top += yDelta;
right += xDelta;
bottom += yDelta;
}
XYPOSITION Width() const { return right - left; }
XYPOSITION Height() const { return bottom - top; }
bool Empty() const {
XYPOSITION Width() const noexcept { return right - left; }
XYPOSITION Height() const noexcept { return bottom - top; }
bool Empty() const noexcept {
return (Height() <= 0) || (Width() <= 0);
}
};
/**
* Holds a desired RGB colour.
* Holds an RGB colour with 8 bits for each component.
*/
constexpr const float componentMaximum = 255.0f;
class ColourDesired {
long co;
int co;
public:
ColourDesired(long lcol=0) {
co = lcol;
explicit ColourDesired(int co_=0) noexcept : co(co_) {
}
ColourDesired(unsigned int red, unsigned int green, unsigned int blue) {
Set(red, green, blue);
ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept :
co(red | (green << 8) | (blue << 16)) {
}
bool operator==(const ColourDesired &other) const {
bool operator==(const ColourDesired &other) const noexcept {
return co == other.co;
}
void Set(long lcol) {
co = lcol;
}
void Set(unsigned int red, unsigned int green, unsigned int blue) {
co = red | (green << 8) | (blue << 16);
}
static inline unsigned int ValueOfHex(const char ch) {
if (ch >= '0' && ch <= '9')
return ch - '0';
else if (ch >= 'A' && ch <= 'F')
return ch - 'A' + 10;
else if (ch >= 'a' && ch <= 'f')
return ch - 'a' + 10;
else
return 0;
}
void Set(const char *val) {
if (*val == '#') {
val++;
}
unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]);
unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]);
unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]);
Set(r, g, b);
}
long AsLong() const {
int AsInteger() const noexcept {
return co;
}
unsigned int GetRed() const {
// Red, green and blue values as bytes 0..255
unsigned char GetRed() const noexcept {
return co & 0xff;
}
unsigned int GetGreen() const {
unsigned char GetGreen() const noexcept {
return (co >> 8) & 0xff;
}
unsigned int GetBlue() const {
unsigned char GetBlue() const noexcept {
return (co >> 16) & 0xff;
}
// Red, green and blue values as float 0..1.0
float GetRedComponent() const noexcept {
return GetRed() / componentMaximum;
}
float GetGreenComponent() const noexcept {
return GetGreen() / componentMaximum;
}
float GetBlueComponent() const noexcept {
return GetBlue() / componentMaximum;
}
};
/**
* Holds an RGBA colour.
*/
class ColourAlpha : public ColourDesired {
public:
explicit ColourAlpha(int co_ = 0) noexcept : ColourDesired(co_) {
}
ColourAlpha(unsigned int red, unsigned int green, unsigned int blue) noexcept :
ColourDesired(red | (green << 8) | (blue << 16)) {
}
ColourAlpha(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) noexcept :
ColourDesired(red | (green << 8) | (blue << 16) | (alpha << 24)) {
}
ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept :
ColourDesired(cd.AsInteger() | (alpha << 24)) {
}
ColourDesired GetColour() const noexcept {
return ColourDesired(AsInteger() & 0xffffff);
}
unsigned char GetAlpha() const noexcept {
return (AsInteger() >> 24) & 0xff;
}
float GetAlphaComponent() const noexcept {
return GetAlpha() / componentMaximum;
}
ColourAlpha MixedWith(ColourAlpha other) const noexcept {
const unsigned int red = (GetRed() + other.GetRed()) / 2;
const unsigned int green = (GetGreen() + other.GetGreen()) / 2;
const unsigned int blue = (GetBlue() + other.GetBlue()) / 2;
const unsigned int alpha = (GetAlpha() + other.GetAlpha()) / 2;
return ColourAlpha(red, green, blue, alpha);
}
};
/**
* Holds an element of a gradient with an RGBA colour and a relative position.
*/
class ColourStop {
public:
float position;
ColourAlpha colour;
ColourStop(float position_, ColourAlpha colour_) noexcept :
position(position_), colour(colour_) {
}
};
/**
@ -254,7 +298,7 @@ struct FontParameters {
bool italic_=false,
int extraFontFlag_=0,
int technology_=0,
int characterSet_=0) :
int characterSet_=0) noexcept :
faceName(faceName_),
size(size_),
@ -271,19 +315,21 @@ struct FontParameters {
class Font {
protected:
FontID fid;
// Private so Font objects can not be copied
Font(const Font &);
Font &operator=(const Font &);
public:
Font();
Font() noexcept;
// Deleted so Font objects can not be copied
Font(const Font &) = delete;
Font(Font &&) = delete;
Font &operator=(const Font &) = delete;
Font &operator=(Font &&) = delete;
virtual ~Font();
virtual void Create(const FontParameters &fp);
virtual void Release();
FontID GetID() { return fid; }
FontID GetID() const noexcept { return fid; }
// Alias another font - caller guarantees not to Release
void SetID(FontID fid_) { fid = fid_; }
void SetID(FontID fid_) noexcept { fid = fid_; }
friend class Surface;
friend class SurfaceImpl;
};
@ -292,12 +338,12 @@ public:
* A surface abstracts a place to draw.
*/
class Surface {
private:
// Private so Surface objects can not be copied
Surface(const Surface &) {}
Surface &operator=(const Surface &) { return *this; }
public:
Surface() {}
Surface() noexcept = default;
Surface(const Surface &) = delete;
Surface(Surface &&) = delete;
Surface &operator=(const Surface &) = delete;
Surface &operator=(Surface &&) = delete;
virtual ~Surface() {}
static Surface *Allocate(int technology);
@ -312,13 +358,15 @@ public:
virtual int DeviceHeightFont(int points)=0;
virtual void MoveTo(int x_, int y_)=0;
virtual void LineTo(int x_, int y_)=0;
virtual void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back)=0;
virtual void Polygon(Point *pts, size_t npts, ColourDesired fore, ColourDesired back)=0;
virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
virtual void FillRectangle(PRectangle rc, ColourDesired back)=0;
virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0;
virtual void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
ColourDesired outline, int alphaOutline, int flags)=0;
enum class GradientOptions { leftToRight, topToBottom };
virtual void GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options)=0;
virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0;
virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0;
@ -328,11 +376,9 @@ public:
virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore)=0;
virtual void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions)=0;
virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0;
virtual XYPOSITION WidthChar(Font &font_, char ch)=0;
virtual XYPOSITION Ascent(Font &font_)=0;
virtual XYPOSITION Descent(Font &font_)=0;
virtual XYPOSITION InternalLeading(Font &font_)=0;
virtual XYPOSITION ExternalLeading(Font &font_)=0;
virtual XYPOSITION Height(Font &font_)=0;
virtual XYPOSITION AverageCharWidth(Font &font_)=0;
@ -343,11 +389,6 @@ public:
virtual void SetDBCSMode(int codePage)=0;
};
/**
* A simple callback action passing one piece of untyped user data.
*/
typedef void (*CallBackAction)(void*);
/**
* Class to hide the details of window manipulation.
* Does not own the window which will normally have a longer life than this object.
@ -356,30 +397,31 @@ class Window {
protected:
WindowID wid;
public:
Window() : wid(0), cursorLast(cursorInvalid) {
Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) {
}
Window(const Window &source) : wid(source.wid), cursorLast(cursorInvalid) {
}
virtual ~Window();
Window &operator=(WindowID wid_) {
Window(const Window &source) = delete;
Window(Window &&) = delete;
Window &operator=(WindowID wid_) noexcept {
wid = wid_;
cursorLast = cursorInvalid;
return *this;
}
WindowID GetID() const { return wid; }
bool Created() const { return wid != 0; }
Window &operator=(const Window &) = delete;
Window &operator=(Window &&) = delete;
virtual ~Window();
WindowID GetID() const noexcept { return wid; }
bool Created() const noexcept { return wid != nullptr; }
void Destroy();
bool HasFocus();
PRectangle GetPosition();
PRectangle GetPosition() const;
void SetPosition(PRectangle rc);
void SetPositionRelative(PRectangle rc, Window relativeTo);
PRectangle GetClientPosition();
void SetPositionRelative(PRectangle rc, const Window *relativeTo);
PRectangle GetClientPosition() const;
void Show(bool show=true);
void InvalidateAll();
void InvalidateRectangle(PRectangle rc);
virtual void SetFont(Font &font);
enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand };
void SetCursor(Cursor curs);
void SetTitle(const char *s);
PRectangle GetMonitorRect(Point pt);
private:
Cursor cursorLast;
@ -389,13 +431,26 @@ private:
* Listbox management.
*/
// ScintillaBase implements IListBoxDelegate to receive ListBoxEvents from a ListBox
struct ListBoxEvent {
enum class EventType { selectionChange, doubleClick } event;
ListBoxEvent(EventType event_) noexcept : event(event_) {
}
};
class IListBoxDelegate {
public:
virtual void ListNotify(ListBoxEvent *plbe)=0;
};
class ListBox : public Window {
public:
ListBox();
virtual ~ListBox();
ListBox() noexcept;
~ListBox() override;
static ListBox *Allocate();
virtual void SetFont(Font &font)=0;
void SetFont(Font &font) override =0;
virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0;
virtual void SetAverageCharWidth(int width)=0;
virtual void SetVisibleRows(int rows)=0;
@ -412,7 +467,7 @@ public:
virtual void RegisterImage(int type, const char *xpm_data)=0;
virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) = 0;
virtual void ClearRegisteredImages()=0;
virtual void SetDoubleClickAction(CallBackAction, void *)=0;
virtual void SetDelegate(IListBoxDelegate *lbDelegate)=0;
virtual void SetList(const char* list, char separator, char typesep)=0;
};
@ -422,27 +477,19 @@ public:
class Menu {
MenuID mid;
public:
Menu();
MenuID GetID() { return mid; }
Menu() noexcept;
MenuID GetID() const noexcept { return mid; }
void CreatePopUp();
void Destroy();
void Show(Point pt, Window &w);
};
class ElapsedTime {
long bigBit;
long littleBit;
public:
ElapsedTime();
double Duration(bool reset=false);
};
/**
* Dynamic Library (DLL/SO/...) loading
*/
class DynamicLibrary {
public:
virtual ~DynamicLibrary() {}
virtual ~DynamicLibrary() = default;
/// @return Pointer to function "name", or NULL on failure.
virtual Function FindFunction(const char *name) = 0;
@ -469,65 +516,34 @@ public:
* and chrome colour. Not a creatable object, more of a module with several functions.
*/
class Platform {
// Private so Platform objects can not be copied
Platform(const Platform &) {}
Platform &operator=(const Platform &) { return *this; }
public:
// Should be private because no new Platforms are ever created
// but gcc warns about this
Platform() {}
~Platform() {}
Platform() = default;
Platform(const Platform &) = delete;
Platform(Platform &&) = delete;
Platform &operator=(const Platform &) = delete;
Platform &operator=(Platform &&) = delete;
~Platform() = default;
static ColourDesired Chrome();
static ColourDesired ChromeHighlight();
static const char *DefaultFont();
static int DefaultFontSize();
static unsigned int DoubleClickTime();
static bool MouseButtonBounce();
static void DebugDisplay(const char *s);
static bool IsKeyDown(int key);
static long SendScintilla(
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
static long SendScintillaPointer(
WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0);
static bool IsDBCSLeadByte(int codePage, char ch);
static int DBCSCharLength(int codePage, const char *s);
static int DBCSCharMaxLength();
// These are utility functions not really tied to a platform
static int Minimum(int a, int b);
static int Maximum(int a, int b);
// Next three assume 16 bit shorts and 32 bit longs
static long LongFromTwoShorts(short a,short b) {
static constexpr long LongFromTwoShorts(short a,short b) noexcept {
return (a) | ((b) << 16);
}
static short HighShortFromLong(long x) {
return static_cast<short>(x >> 16);
}
static short LowShortFromLong(long x) {
return static_cast<short>(x & 0xffff);
}
static void DebugPrintf(const char *format, ...);
static bool ShowAssertionPopUps(bool assertionPopUps_);
static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN;
static int Clamp(int val, int minVal, int maxVal);
};
#ifdef NDEBUG
#define PLATFORM_ASSERT(c) ((void)0)
#else
#ifdef SCI_NAMESPACE
#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__))
#else
#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__))
#endif
#endif
#ifdef SCI_NAMESPACE
}
#endif
#if defined(__GNUC__) && defined(SCINTILLA_QT)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More