From 57f1824df1f02040ceac404a07b29cfbbcb2b45f Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Fri, 16 Aug 2024 16:15:28 +0300 Subject: [PATCH 01/52] Optimize build process with Qt6 in mind. --- CMakeLists-legacy.txt | 661 +++++++++++++++++++++++++ CMakeLists.txt | 509 +++---------------- config/3dparty.cmake | 19 + config/options.cmake | 9 + config/platform.cmake | 15 + config/platform_apple.cmake | 4 + config/platform_win.cmake | 51 ++ config/translations.cmake | 31 ++ libs/qcustomplot-source/CMakeLists.txt | 2 +- libs/qhexedit/CMakeLists.txt | 2 +- libs/qscintilla/Qt4Qt5/CMakeLists.txt | 2 +- 11 files changed, 862 insertions(+), 443 deletions(-) create mode 100644 CMakeLists-legacy.txt create mode 100644 config/3dparty.cmake create mode 100644 config/options.cmake create mode 100644 config/platform.cmake create mode 100644 config/platform_apple.cmake create mode 100644 config/platform_win.cmake create mode 100644 config/translations.cmake diff --git a/CMakeLists-legacy.txt b/CMakeLists-legacy.txt new file mode 100644 index 000000000..c0c4c1e0f --- /dev/null +++ b/CMakeLists-legacy.txt @@ -0,0 +1,661 @@ +cmake_minimum_required(VERSION 3.15) +project(sqlitebrowser + VERSION 3.13.99 + DESCRIPTION "GUI editor for SQLite databases" +) + +# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS. +if(POLICY CMP0025) + # https://cmake.org/cmake/help/latest/policy/CMP0025.html + cmake_policy(SET CMP0025 NEW) +endif() + +# Fix warning of AUTOMOC behavior +if(POLICY CMP0071) + # https://cmake.org/cmake/help/latest/policy/CMP0071.html + cmake_policy(SET CMP0071 NEW) +endif() + +# Fix warning of Cached Variables +if(POLICY CMP0102) + # https://cmake.org/cmake/help/latest/policy/CMP0102.html + cmake_policy(SET CMP0102 NEW) +endif() + +include(GNUInstallDirs) + +OPTION(BUILD_STABLE_VERSION "Don't build the stable version by default" OFF) # Choose between building a stable version or nightly (the default), depending on whether '-DBUILD_STABLE_VERSION=1' is passed on the command line or not. +OPTION(ENABLE_TESTING "Enable the unit tests" OFF) +OPTION(FORCE_INTERNAL_QSCINTILLA "Don't use the distribution's QScintilla library even if there is one" OFF) +OPTION(FORCE_INTERNAL_QCUSTOMPLOT "Don't use distribution's QCustomPlot even if available" ON) +OPTION(FORCE_INTERNAL_QHEXEDIT "Don't use distribution's QHexEdit even if available" ON) +OPTION(ALL_WARNINGS "Enable some useful warning flags" OFF) +OPTION(sqlcipher "Build with SQLCipher library" OFF) +OPTION(customTap "Using SQLCipher, SQLite and Qt installed through our custom Homebrew tap" OFF) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +if(APPLE) + add_executable(${PROJECT_NAME} MACOSX_BUNDLE) +elseif(WIN32) + add_executable(${PROJECT_NAME} WIN32) +else() + add_executable(${PROJECT_NAME}) +endif() + +# Determine the git commit hash +execute_process( + COMMAND git -C ${CMAKE_CURRENT_SOURCE_DIR} rev-parse --short --verify HEAD + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET +) + +if (GIT_COMMIT_HASH STREQUAL "") + MESSAGE(WARNING "Could not determine git commit hash") + set(GIT_COMMIT_HASH "Unknown") +endif() + +add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") + +if(NOT BUILD_STABLE_VERSION) + # BUILD_VERSION is the current date in YYYYMMDD format. It is only + # used by the nightly version to add the date of the build. + # Default defined in Version.h.in + string(TIMESTAMP BUILD_VERSION "%Y%m%d") + target_compile_definitions(${PROJECT_NAME} PRIVATE BUILD_VERSION=${BUILD_VERSION}) +endif() + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") +endif() + +if(MSVC) + if(CMAKE_CL_64) + # Paths for 64-bit windows builds + set(OPENSSL_PATH "C:/dev/OpenSSL-Win64" CACHE PATH "OpenSSL Path") + set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017_64" CACHE PATH "Qt5 Path") + + # Choose between SQLCipher or SQLite, depending whether + # -Dsqlcipher=on is passed on the command line + if(sqlcipher) + set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win64" CACHE PATH "SQLCipher Path") + else() + set(SQLITE3_PATH "C:/dev/SQLite-Win64" CACHE PATH "SQLite Path") + endif() + else() + # Paths for 32-bit windows builds + set(OPENSSL_PATH "C:/dev/OpenSSL-Win32" CACHE PATH "OpenSSL Path") + set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017" CACHE PATH "Qt5 Path") + + # Choose between SQLCipher or SQLite, depending whether + # -Dsqlcipher=on is passed on the command line + if(sqlcipher) + set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win32" CACHE PATH "SQLCipher Path") + else() + set(SQLITE3_PATH "C:/dev/SQLite-Win32" CACHE PATH "SQLite Path") + endif() + endif() + + list(PREPEND CMAKE_PREFIX_PATH ${QT5_PATH} ${SQLITE3_PATH}) +endif() + + +if(APPLE) + # For Intel Mac's + if(EXISTS /usr/local/opt/qt5) + list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5") + endif() + + # For Apple Silicon Mac's + if(EXISTS /opt/homebrew/opt/qt5) + list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/qt5") + endif() + if(EXISTS /opt/homebrew/opt/sqlitefts5) + list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlitefts5") + endif() + + # For Apple Silicon Mac's and install dependencies via our Homebrew tap(sqlitebrowser/homebrew-tap) + if(customTap AND EXISTS /opt/homebrew/opt/) + list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlb-qt@5") + list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlb-sqlite") + + if(sqlcipher) + list(APPEND SQLCIPHER_INCLUDE_DIR "/opt/homebrew/include") + list(APPEND SQLCIPHER_LIBRARY "/opt/homebrew/opt/sqlb-sqlcipher/lib/libsqlcipher.0.dylib") + endif() + endif() +endif() + +find_package(Qt5 REQUIRED COMPONENTS Concurrent Gui LinguistTools Network PrintSupport Test Widgets Xml) + +if(NOT FORCE_INTERNAL_QSCINTILLA) + find_package(QScintilla 2.8.10) +endif() +if(NOT FORCE_INTERNAL_QCUSTOMPLOT) + find_package(QCustomPlot) +endif() +if(NOT FORCE_INTERNAL_QHEXEDIT) + find_package(QHexEdit) +endif() + +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libs/json) + +if(NOT QSCINTILLA_FOUND) + add_subdirectory(libs/qscintilla/Qt4Qt5) +endif() +if(NOT QHexEdit_FOUND) + add_subdirectory(libs/qhexedit) +endif() +if(NOT QCustomPlot_FOUND) + add_subdirectory(libs/qcustomplot-source) +endif() + +if(ENABLE_TESTING) + enable_testing() +endif() + +# generate file with version information +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/version.h +) + +target_sources(${PROJECT_NAME} + PRIVATE + src/sql/sqlitetypes.h + src/sql/Query.h + src/sql/ObjectIdentifier.h + src/csvparser.h + src/sqlite.h + src/Data.h + src/IconCache.h + src/sql/parser/ParserDriver.h + src/sql/parser/sqlite3_lexer.h + src/sql/parser/sqlite3_location.h + src/sql/parser/sqlite3_parser.hpp +) + +target_sources(${PROJECT_NAME} + PRIVATE + src/sqlitedb.h + src/AboutDialog.h + src/EditIndexDialog.h + src/EditDialog.h + src/EditTableDialog.h + src/AddRecordDialog.h + src/ExportDataDialog.h + src/ExtendedTableWidget.h + src/FilterTableHeader.h + src/ImportCsvDialog.h + src/MainWindow.h + src/Settings.h + src/PreferencesDialog.h + src/SqlExecutionArea.h + src/VacuumDialog.h + src/sqlitetablemodel.h + src/RowLoader.h + src/RowCache.h + src/sqltextedit.h + src/docktextedit.h + src/DbStructureModel.h + src/dbstructureqitemviewfacade.h + src/Application.h + src/CipherDialog.h + src/ExportSqlDialog.h + src/SqlUiLexer.h + src/FileDialog.h + src/ColumnDisplayFormatDialog.h + src/FilterLineEdit.h + src/RemoteDatabase.h + src/ForeignKeyEditorDelegate.h + src/PlotDock.h + src/RemoteDock.h + src/RemoteModel.h + src/RemotePushDialog.h + src/FindReplaceDialog.h + src/ExtendedScintilla.h + src/FileExtensionManager.h + src/CondFormatManager.h + src/CipherSettings.h + src/Palette.h + src/CondFormat.h + src/RunSql.h + src/ProxyDialog.h + src/SelectItemsPopup.h + src/TableBrowser.h + src/ImageViewer.h + src/RemoteLocalFilesModel.h + src/RemoteCommitsModel.h + src/RemoteNetwork.h + src/TableBrowserDock.h +) + +target_sources(${PROJECT_NAME} + PRIVATE + src/AboutDialog.cpp + src/EditIndexDialog.cpp + src/EditDialog.cpp + src/EditTableDialog.cpp + src/AddRecordDialog.cpp + src/ExportDataDialog.cpp + src/ExtendedTableWidget.cpp + src/FilterTableHeader.cpp + src/ImportCsvDialog.cpp + src/MainWindow.cpp + src/Settings.cpp + src/PreferencesDialog.cpp + src/SqlExecutionArea.cpp + src/VacuumDialog.cpp + src/sqlitedb.cpp + src/sqlitetablemodel.cpp + src/RowLoader.cpp + src/sql/sqlitetypes.cpp + src/sql/Query.cpp + src/sql/ObjectIdentifier.cpp + src/sqltextedit.cpp + src/docktextedit.cpp + src/csvparser.cpp + src/DbStructureModel.cpp + src/dbstructureqitemviewfacade.cpp + src/main.cpp + src/Application.cpp + src/CipherDialog.cpp + src/ExportSqlDialog.cpp + src/SqlUiLexer.cpp + src/FileDialog.cpp + src/ColumnDisplayFormatDialog.cpp + src/FilterLineEdit.cpp + src/RemoteDatabase.cpp + src/ForeignKeyEditorDelegate.cpp + src/PlotDock.cpp + src/RemoteDock.cpp + src/RemoteModel.cpp + src/RemotePushDialog.cpp + src/FindReplaceDialog.cpp + src/ExtendedScintilla.cpp + src/FileExtensionManager.cpp + src/CondFormatManager.cpp + src/Data.cpp + src/CipherSettings.cpp + src/Palette.cpp + src/CondFormat.cpp + src/RunSql.cpp + src/ProxyDialog.cpp + src/IconCache.cpp + src/SelectItemsPopup.cpp + src/TableBrowser.cpp + src/sql/parser/ParserDriver.cpp + src/sql/parser/sqlite3_lexer.cpp + src/sql/parser/sqlite3_parser.cpp + src/ImageViewer.cpp + src/RemoteLocalFilesModel.cpp + src/RemoteCommitsModel.cpp + src/RemoteNetwork.cpp + src/TableBrowserDock.cpp +) + +set(SQLB_FORMS + src/AboutDialog.ui + src/EditIndexDialog.ui + src/EditDialog.ui + src/EditTableDialog.ui + src/AddRecordDialog.ui + src/ExportDataDialog.ui + src/ImportCsvDialog.ui + src/MainWindow.ui + src/PreferencesDialog.ui + src/SqlExecutionArea.ui + src/VacuumDialog.ui + src/CipherDialog.ui + src/ExportSqlDialog.ui + src/ColumnDisplayFormatDialog.ui + src/PlotDock.ui + src/RemoteDock.ui + src/RemotePushDialog.ui + src/FindReplaceDialog.ui + src/FileExtensionManager.ui + src/CondFormatManager.ui + src/ProxyDialog.ui + src/SelectItemsPopup.ui + src/TableBrowser.ui + src/ImageViewer.ui +) + +set(SQLB_RESOURCES + src/icons/icons.qrc + src/translations/flags/flags.qrc + src/translations/translations.qrc + src/certs/CaCerts.qrc + src/qdarkstyle/dark/darkstyle.qrc + src/qdarkstyle/light/lightstyle.qrc +) + +set(SQLB_MISC + src/sql/parser/sqlite3_parser.yy + src/sql/parser/sqlite3_lexer.ll +) + +# Translation files +set(SQLB_TSS + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ar_SA.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_cs.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh_TW.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_de.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_es_ES.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_fr.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ru.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pl.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pt_BR.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_en_GB.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ko_KR.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_tr.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_uk_UA.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_it.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ja.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_nl.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_sv.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_id.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ro.ts" +) + +# Windows image format plugin files +set(WIN_IMG_PLUGINS + "${QT5_PATH}/plugins/imageformats/qgif.dll" + "${QT5_PATH}/plugins/imageformats/qicns.dll" + "${QT5_PATH}/plugins/imageformats/qico.dll" + "${QT5_PATH}/plugins/imageformats/qjpeg.dll" + "${QT5_PATH}/plugins/imageformats/qsvg.dll" + "${QT5_PATH}/plugins/imageformats/qtga.dll" + "${QT5_PATH}/plugins/imageformats/qtiff.dll" + "${QT5_PATH}/plugins/imageformats/qwbmp.dll" + "${QT5_PATH}/plugins/imageformats/qwebp.dll" +) +set(WIN_IMG_PLUGINS_DEBUG + "${QT5_PATH}/plugins/imageformats/qgifd.dll" + "${QT5_PATH}/plugins/imageformats/qicnsd.dll" + "${QT5_PATH}/plugins/imageformats/qicod.dll" + "${QT5_PATH}/plugins/imageformats/qjpegd.dll" + "${QT5_PATH}/plugins/imageformats/qsvgd.dll" + "${QT5_PATH}/plugins/imageformats/qtgad.dll" + "${QT5_PATH}/plugins/imageformats/qtiffd.dll" + "${QT5_PATH}/plugins/imageformats/qwbmpd.dll" + "${QT5_PATH}/plugins/imageformats/qwebpd.dll" +) + +# License files +set(LICENSE_FILES + LICENSE + LICENSE-PLUGINS +) + +qt5_wrap_ui(SQLB_FORM_HDR ${SQLB_FORMS}) +if(SQLB_TSS) + # add translations + foreach(SQLB_TS ${SQLB_TSS}) + set_source_files_properties("${SQLB_TS}" PROPERTIES OUTPUT_LOCATION "${CMAKE_SOURCE_DIR}/src/translations") + endforeach() + qt5_add_translation(SQLB_QMS ${SQLB_TSS}) +endif() +qt5_add_resources(SQLB_RESOURCES_RCC ${SQLB_RESOURCES}) + +#icon and correct libs/subsystem for windows +if(WIN32) + #enable version check for windows + add_definitions(-DCHECKNEWVERSION) + + if(MINGW) + # resource compilation for MinGW + add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" + COMMAND windres "-I${CMAKE_CURRENT_BINARY_DIR}" "-i${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc" -o "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" VERBATIM + ) + target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") + set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) + set(ADDITIONAL_LIBS lzma) + else() + target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") + endif() +else() + set(LPTHREAD pthread) +endif() + +#enable version check for macOS +if(APPLE) + add_definitions(-DCHECKNEWVERSION) +endif() + +# SQLCipher option +if(sqlcipher) + add_definitions(-DENABLE_SQLCIPHER) + set(LIBSQLITE_NAME SQLCipher) +else() + set(LIBSQLITE_NAME SQLite3) +endif() + +# add extra library path for MacOS and FreeBSD +set(EXTRAPATH APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") +if(EXTRAPATH) + list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlite/lib) + list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlitefts5/lib) +endif() + +find_package(${LIBSQLITE_NAME}) +if (sqlcipher) + target_link_libraries(${PROJECT_NAME} SQLCipher::SQLCipher) +else() + target_link_libraries(${PROJECT_NAME} SQLite::SQLite3) +endif() + +if(MSVC) + if(sqlcipher) + find_file(SQLITE3_DLL sqlcipher.dll) + else() + find_file(SQLITE3_DLL sqlite3.dll) + endif() +endif() + +target_include_directories(${PROJECT_NAME} PRIVATE src) + +target_sources(${PROJECT_NAME} + PRIVATE + ${SQLB_FORM_HDR} + ${SQLB_MOC} + ${SQLB_RESOURCES_RCC} + ${SQLB_MISC} +) + +# Warnings +if(ALL_WARNINGS AND CMAKE_COMPILER_IS_GNUCC) + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion) + target_compile_options(${PROJECT_NAME} PRIVATE -Wdouble-promotion -Wformat=2 -Wlogical-op -Wuseless-cast) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0) + target_compile_options(${PROJECT_NAME} PRIVATE -Wnull-dereference -Wduplicated-cond -Wduplicated-branches) + endif() +endif() + +set(QT_LIBS Qt5::Gui Qt5::Test Qt5::PrintSupport Qt5::Widgets Qt5::Network Qt5::Concurrent Qt5::Xml) + +target_link_libraries(${PROJECT_NAME} + ${LPTHREAD} + ${QT_LIBS} + ${WIN32_STATIC_LINK} + ${ADDITIONAL_LIBS} +) + +target_link_libraries(${PROJECT_NAME} + QHexEdit::QHexEdit + QCustomPlot::QCustomPlot + QScintilla::QScintilla +) + +if(MSVC) + set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") + set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") + set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") + if(CMAKE_CL_64) + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.02 /ENTRY:mainCRTStartup") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.02") + else() + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.01 /ENTRY:mainCRTStartup") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.01") + endif() +endif() + +if((NOT WIN32 AND NOT APPLE) OR MINGW) + install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() + +if(UNIX) + target_link_libraries(${PROJECT_NAME} dl) +endif() + +if(ENABLE_TESTING) + add_subdirectory(src/tests) +endif() + +if(UNIX) + install(FILES src/icons/${PROJECT_NAME}.png + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps/ + ) + + install(FILES images/logo.svg + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/ + RENAME ${PROJECT_NAME}.svg + ) + + install(FILES distri/${PROJECT_NAME}.desktop + DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/ + ) + + install(FILES distri/${PROJECT_NAME}.desktop.appdata.xml + DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo/ + ) +endif() + +if(WIN32 AND MSVC) + install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION "/" + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + + set(QT5_BIN_PATH ${QT5_PATH}/bin) + + # The Qt5 Debug configuration library files have a 'd' postfix + install(FILES + ${QT5_BIN_PATH}/Qt5Cored.dll + ${QT5_BIN_PATH}/Qt5Guid.dll + ${QT5_BIN_PATH}/Qt5Networkd.dll + ${QT5_BIN_PATH}/Qt5PrintSupportd.dll + ${QT5_BIN_PATH}/Qt5Widgetsd.dll + ${QT5_BIN_PATH}/Qt5Concurrentd.dll + ${QT5_BIN_PATH}/Qt5Svgd.dll + DESTINATION "/" + CONFIGURATIONS Debug + ) + + # The Qt5 Release configuration files don't have a postfix + install(FILES + ${QT5_BIN_PATH}/Qt5Core.dll + ${QT5_BIN_PATH}/Qt5Gui.dll + ${QT5_BIN_PATH}/Qt5Network.dll + ${QT5_BIN_PATH}/Qt5PrintSupport.dll + ${QT5_BIN_PATH}/Qt5Widgets.dll + ${QT5_BIN_PATH}/Qt5Concurrent.dll + ${QT5_BIN_PATH}/Qt5Svg.dll + DESTINATION "/" + CONFIGURATIONS Release + ) + + # The files below are common to all configurations + install(FILES + ${SQLITE3_DLL} + ${OPENSSL_PATH}/libeay32.dll + ${OPENSSL_PATH}/ssleay32.dll + DESTINATION "/" + ) + + install(FILES + ${QT5_PATH}/plugins/platforms/qwindows.dll + DESTINATION platforms + ) + + # The XML dll + install(FILES + "${QT5_PATH}/bin/Qt5Xmld.dll" + DESTINATION "/" + CONFIGURATIONS Debug + ) + + install(FILES + "${QT5_PATH}/bin/Qt5Xml.dll" + DESTINATION "/" + CONFIGURATIONS Release + ) + + # The image format plugins + install(FILES + ${WIN_IMG_PLUGINS_DEBUG} + DESTINATION imageformats + CONFIGURATIONS Debug + ) + + install(FILES + ${WIN_IMG_PLUGINS} + DESTINATION imageformats + CONFIGURATIONS Release + ) + + # The license files + install(FILES + ${LICENSE_FILES} + DESTINATION licenses + ) + + # The batch file launcher + install(FILES + distri/winlaunch.bat + DESTINATION "/" + ) +endif() + +if(APPLE) + set_target_properties(${PROJECT_NAME} PROPERTIES + BUNDLE True + OUTPUT_NAME "DB Browser for SQLite" + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/app.plist + ) +endif() + +# CPack configuration +set(CPACK_STRIP_FILES ON) +set(CPACK_DEBIAN_PACKAGE_PRIORITY optional) +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tristan Stenner ") +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) +if(APPLE) + set(CPACK_DEFAULT_GEN TBZ2) +elseif(WIN32) + set(CPACK_DEFAULT_GEN ZIP) + set(CPACK_NSIS_MODIFY_PATH ON) + set(CPACK_WIX_CMAKE_PACKAGE_REGISTRY ON) + set(CPACK_WIX_UPGRADE_GUID "78c885a7-e9c8-4ded-9b62-9abe47466950") +elseif(UNIX) + set(CPACK_DEFAULT_GEN DEB) + set(CPACK_SET_DESTDIR 1) + set(CPACK_INSTALL_PREFIX "/usr") +endif() +set(CPACK_GENERATOR ${CPACK_DEFAULT_GEN} CACHE STRING "CPack pkg type(s) to generate") +include(CPack) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0c4c1e0f..11e04fcf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,53 +1,42 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16) + project(sqlitebrowser VERSION 3.13.99 DESCRIPTION "GUI editor for SQLite databases" + LANGUAGES CXX ) -# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS. -if(POLICY CMP0025) - # https://cmake.org/cmake/help/latest/policy/CMP0025.html - cmake_policy(SET CMP0025 NEW) -endif() +include(GNUInstallDirs) -# Fix warning of AUTOMOC behavior -if(POLICY CMP0071) - # https://cmake.org/cmake/help/latest/policy/CMP0071.html - cmake_policy(SET CMP0071 NEW) -endif() +include(config/options.cmake) -# Fix warning of Cached Variables -if(POLICY CMP0102) - # https://cmake.org/cmake/help/latest/policy/CMP0102.html - cmake_policy(SET CMP0102 NEW) +if("${QT_MAJOR}" STREQUAL "Qt5") + set(CMAKE_CXX_STANDARD 14) +elseif("${QT_MAJOR}" STREQUAL "Qt6") + set(CMAKE_CXX_STANDARD 17) + message(FATAL_ERROR "Qt6 is not supported yet") +else() + message(FATAL_ERROR "Uknown Qt Version: ${QT_MAJOR}") endif() -include(GNUInstallDirs) - -OPTION(BUILD_STABLE_VERSION "Don't build the stable version by default" OFF) # Choose between building a stable version or nightly (the default), depending on whether '-DBUILD_STABLE_VERSION=1' is passed on the command line or not. -OPTION(ENABLE_TESTING "Enable the unit tests" OFF) -OPTION(FORCE_INTERNAL_QSCINTILLA "Don't use the distribution's QScintilla library even if there is one" OFF) -OPTION(FORCE_INTERNAL_QCUSTOMPLOT "Don't use distribution's QCustomPlot even if available" ON) -OPTION(FORCE_INTERNAL_QHEXEDIT "Don't use distribution's QHexEdit even if available" ON) -OPTION(ALL_WARNINGS "Enable some useful warning flags" OFF) -OPTION(sqlcipher "Build with SQLCipher library" OFF) -OPTION(customTap "Using SQLCipher, SQLite and Qt installed through our custom Homebrew tap" OFF) - -set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_AUTOMOC ON) -set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -if(APPLE) - add_executable(${PROJECT_NAME} MACOSX_BUNDLE) -elseif(WIN32) - add_executable(${PROJECT_NAME} WIN32) -else() - add_executable(${PROJECT_NAME}) +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") endif() -# Determine the git commit hash +add_executable(${PROJECT_NAME}) +set_target_properties(${PROJECT_NAME} PROPERTIES + WIN32_EXECUTABLE ON + MACOSX_BUNDLE ON +) + execute_process( COMMAND git -C ${CMAKE_CURRENT_SOURCE_DIR} rev-parse --short --verify HEAD OUTPUT_VARIABLE GIT_COMMIT_HASH @@ -61,7 +50,6 @@ if (GIT_COMMIT_HASH STREQUAL "") endif() add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") - if(NOT BUILD_STABLE_VERSION) # BUILD_VERSION is the current date in YYYYMMDD format. It is only # used by the nightly version to add the date of the build. @@ -70,98 +58,37 @@ if(NOT BUILD_STABLE_VERSION) target_compile_definitions(${PROJECT_NAME} PRIVATE BUILD_VERSION=${BUILD_VERSION}) endif() -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") -endif() - -if(MSVC) - if(CMAKE_CL_64) - # Paths for 64-bit windows builds - set(OPENSSL_PATH "C:/dev/OpenSSL-Win64" CACHE PATH "OpenSSL Path") - set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017_64" CACHE PATH "Qt5 Path") - - # Choose between SQLCipher or SQLite, depending whether - # -Dsqlcipher=on is passed on the command line - if(sqlcipher) - set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win64" CACHE PATH "SQLCipher Path") - else() - set(SQLITE3_PATH "C:/dev/SQLite-Win64" CACHE PATH "SQLite Path") - endif() - else() - # Paths for 32-bit windows builds - set(OPENSSL_PATH "C:/dev/OpenSSL-Win32" CACHE PATH "OpenSSL Path") - set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017" CACHE PATH "Qt5 Path") - - # Choose between SQLCipher or SQLite, depending whether - # -Dsqlcipher=on is passed on the command line - if(sqlcipher) - set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win32" CACHE PATH "SQLCipher Path") - else() - set(SQLITE3_PATH "C:/dev/SQLite-Win32" CACHE PATH "SQLite Path") - endif() - endif() - - list(PREPEND CMAKE_PREFIX_PATH ${QT5_PATH} ${SQLITE3_PATH}) -endif() - - -if(APPLE) - # For Intel Mac's - if(EXISTS /usr/local/opt/qt5) - list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5") - endif() - - # For Apple Silicon Mac's - if(EXISTS /opt/homebrew/opt/qt5) - list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/qt5") - endif() - if(EXISTS /opt/homebrew/opt/sqlitefts5) - list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlitefts5") - endif() - - # For Apple Silicon Mac's and install dependencies via our Homebrew tap(sqlitebrowser/homebrew-tap) - if(customTap AND EXISTS /opt/homebrew/opt/) - list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlb-qt@5") - list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlb-sqlite") - - if(sqlcipher) - list(APPEND SQLCIPHER_INCLUDE_DIR "/opt/homebrew/include") - list(APPEND SQLCIPHER_LIBRARY "/opt/homebrew/opt/sqlb-sqlcipher/lib/libsqlcipher.0.dylib") - endif() - endif() -endif() - -find_package(Qt5 REQUIRED COMPONENTS Concurrent Gui LinguistTools Network PrintSupport Test Widgets Xml) +find_package(${QT_MAJOR} REQUIRED COMPONENTS Concurrent Gui LinguistTools Network PrintSupport Test Widgets Xml) +set(QT_LIBS + ${QT_MAJOR}::Gui + ${QT_MAJOR}::Test + ${QT_MAJOR}::PrintSupport + ${QT_MAJOR}::Widgets + ${QT_MAJOR}::Network + ${QT_MAJOR}::Concurrent + ${QT_MAJOR}::Xml +) -if(NOT FORCE_INTERNAL_QSCINTILLA) - find_package(QScintilla 2.8.10) -endif() -if(NOT FORCE_INTERNAL_QCUSTOMPLOT) - find_package(QCustomPlot) -endif() -if(NOT FORCE_INTERNAL_QHEXEDIT) - find_package(QHexEdit) -endif() +target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libs/json) +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} src) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libs/json) +include(config/3dparty.cmake) +include(config/platform.cmake) -if(NOT QSCINTILLA_FOUND) - add_subdirectory(libs/qscintilla/Qt4Qt5) -endif() -if(NOT QHexEdit_FOUND) - add_subdirectory(libs/qhexedit) -endif() -if(NOT QCustomPlot_FOUND) - add_subdirectory(libs/qcustomplot-source) +# SQLCipher option +if(sqlcipher) + add_definitions(-DENABLE_SQLCIPHER) + set(SQLCipher REQUIRED) + set(LIBSQLITE_NAME SQLCipher::SQLCipher) +else() + find_package(SQLite3 REQUIRED) + set(LIBSQLITE_NAME SQLite::SQLite3) endif() if(ENABLE_TESTING) enable_testing() endif() -# generate file with version information configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h ) @@ -300,7 +227,9 @@ target_sources(${PROJECT_NAME} src/TableBrowserDock.cpp ) -set(SQLB_FORMS +source_group("Qt UI" "src/.*\.ui$") +target_sources(${PROJECT_NAME} + PRIVATE src/AboutDialog.ui src/EditIndexDialog.ui src/EditDialog.ui @@ -327,335 +256,35 @@ set(SQLB_FORMS src/ImageViewer.ui ) -set(SQLB_RESOURCES - src/icons/icons.qrc - src/translations/flags/flags.qrc - src/translations/translations.qrc - src/certs/CaCerts.qrc - src/qdarkstyle/dark/darkstyle.qrc - src/qdarkstyle/light/lightstyle.qrc -) +include(config/translations.cmake) -set(SQLB_MISC +source_group("Qt Resources" "src/.*\.qrc$") +target_sources(${PROJECT_NAME} + PRIVATE + + # General + src/certs/CaCerts.qrc src/sql/parser/sqlite3_parser.yy src/sql/parser/sqlite3_lexer.ll -) - -# Translation files -set(SQLB_TSS - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ar_SA.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_cs.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh_TW.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_de.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_es_ES.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_fr.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ru.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pl.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pt_BR.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_en_GB.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ko_KR.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_tr.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_uk_UA.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_it.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ja.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_nl.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_sv.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_id.ts" - "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ro.ts" -) - -# Windows image format plugin files -set(WIN_IMG_PLUGINS - "${QT5_PATH}/plugins/imageformats/qgif.dll" - "${QT5_PATH}/plugins/imageformats/qicns.dll" - "${QT5_PATH}/plugins/imageformats/qico.dll" - "${QT5_PATH}/plugins/imageformats/qjpeg.dll" - "${QT5_PATH}/plugins/imageformats/qsvg.dll" - "${QT5_PATH}/plugins/imageformats/qtga.dll" - "${QT5_PATH}/plugins/imageformats/qtiff.dll" - "${QT5_PATH}/plugins/imageformats/qwbmp.dll" - "${QT5_PATH}/plugins/imageformats/qwebp.dll" -) -set(WIN_IMG_PLUGINS_DEBUG - "${QT5_PATH}/plugins/imageformats/qgifd.dll" - "${QT5_PATH}/plugins/imageformats/qicnsd.dll" - "${QT5_PATH}/plugins/imageformats/qicod.dll" - "${QT5_PATH}/plugins/imageformats/qjpegd.dll" - "${QT5_PATH}/plugins/imageformats/qsvgd.dll" - "${QT5_PATH}/plugins/imageformats/qtgad.dll" - "${QT5_PATH}/plugins/imageformats/qtiffd.dll" - "${QT5_PATH}/plugins/imageformats/qwbmpd.dll" - "${QT5_PATH}/plugins/imageformats/qwebpd.dll" -) - -# License files -set(LICENSE_FILES - LICENSE - LICENSE-PLUGINS -) -qt5_wrap_ui(SQLB_FORM_HDR ${SQLB_FORMS}) -if(SQLB_TSS) - # add translations - foreach(SQLB_TS ${SQLB_TSS}) - set_source_files_properties("${SQLB_TS}" PROPERTIES OUTPUT_LOCATION "${CMAKE_SOURCE_DIR}/src/translations") - endforeach() - qt5_add_translation(SQLB_QMS ${SQLB_TSS}) -endif() -qt5_add_resources(SQLB_RESOURCES_RCC ${SQLB_RESOURCES}) - -#icon and correct libs/subsystem for windows -if(WIN32) - #enable version check for windows - add_definitions(-DCHECKNEWVERSION) - - if(MINGW) - # resource compilation for MinGW - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" - COMMAND windres "-I${CMAKE_CURRENT_BINARY_DIR}" "-i${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc" -o "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" VERBATIM - ) - target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") - set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) - set(ADDITIONAL_LIBS lzma) - else() - target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") - endif() -else() - set(LPTHREAD pthread) -endif() - -#enable version check for macOS -if(APPLE) - add_definitions(-DCHECKNEWVERSION) -endif() - -# SQLCipher option -if(sqlcipher) - add_definitions(-DENABLE_SQLCIPHER) - set(LIBSQLITE_NAME SQLCipher) -else() - set(LIBSQLITE_NAME SQLite3) -endif() - -# add extra library path for MacOS and FreeBSD -set(EXTRAPATH APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") -if(EXTRAPATH) - list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlite/lib) - list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlitefts5/lib) -endif() - -find_package(${LIBSQLITE_NAME}) -if (sqlcipher) - target_link_libraries(${PROJECT_NAME} SQLCipher::SQLCipher) -else() - target_link_libraries(${PROJECT_NAME} SQLite::SQLite3) -endif() + # Graphics + src/icons/icons.qrc -if(MSVC) - if(sqlcipher) - find_file(SQLITE3_DLL sqlcipher.dll) - else() - find_file(SQLITE3_DLL sqlite3.dll) - endif() -endif() + # Translations + src/translations/flags/flags.qrc + src/translations/translations.qrc -target_include_directories(${PROJECT_NAME} PRIVATE src) + # Styles + src/qdarkstyle/dark/darkstyle.qrc + src/qdarkstyle/light/lightstyle.qrc -target_sources(${PROJECT_NAME} - PRIVATE - ${SQLB_FORM_HDR} - ${SQLB_MOC} - ${SQLB_RESOURCES_RCC} - ${SQLB_MISC} + # Platform dependant files (e.g. winapp.rc) + ${ADDITIONAL_PLATFORM_FILES} ) -# Warnings -if(ALL_WARNINGS AND CMAKE_COMPILER_IS_GNUCC) - target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion) - target_compile_options(${PROJECT_NAME} PRIVATE -Wdouble-promotion -Wformat=2 -Wlogical-op -Wuseless-cast) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0) - target_compile_options(${PROJECT_NAME} PRIVATE -Wnull-dereference -Wduplicated-cond -Wduplicated-branches) - endif() -endif() - -set(QT_LIBS Qt5::Gui Qt5::Test Qt5::PrintSupport Qt5::Widgets Qt5::Network Qt5::Concurrent Qt5::Xml) - target_link_libraries(${PROJECT_NAME} - ${LPTHREAD} + PRIVATE ${QT_LIBS} - ${WIN32_STATIC_LINK} - ${ADDITIONAL_LIBS} -) - -target_link_libraries(${PROJECT_NAME} - QHexEdit::QHexEdit - QCustomPlot::QCustomPlot - QScintilla::QScintilla + QHexEdit::QHexEdit QCustomPlot::QCustomPlot QScintilla::QScintilla + ${LIBSQLITE_NAME} ) - -if(MSVC) - set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") - set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") - set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") - if(CMAKE_CL_64) - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.02 /ENTRY:mainCRTStartup") - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.02") - else() - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.01 /ENTRY:mainCRTStartup") - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.01") - endif() -endif() - -if((NOT WIN32 AND NOT APPLE) OR MINGW) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -endif() - -if(UNIX) - target_link_libraries(${PROJECT_NAME} dl) -endif() - -if(ENABLE_TESTING) - add_subdirectory(src/tests) -endif() - -if(UNIX) - install(FILES src/icons/${PROJECT_NAME}.png - DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps/ - ) - - install(FILES images/logo.svg - DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/ - RENAME ${PROJECT_NAME}.svg - ) - - install(FILES distri/${PROJECT_NAME}.desktop - DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/ - ) - - install(FILES distri/${PROJECT_NAME}.desktop.appdata.xml - DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo/ - ) -endif() - -if(WIN32 AND MSVC) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION "/" - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) - - set(QT5_BIN_PATH ${QT5_PATH}/bin) - - # The Qt5 Debug configuration library files have a 'd' postfix - install(FILES - ${QT5_BIN_PATH}/Qt5Cored.dll - ${QT5_BIN_PATH}/Qt5Guid.dll - ${QT5_BIN_PATH}/Qt5Networkd.dll - ${QT5_BIN_PATH}/Qt5PrintSupportd.dll - ${QT5_BIN_PATH}/Qt5Widgetsd.dll - ${QT5_BIN_PATH}/Qt5Concurrentd.dll - ${QT5_BIN_PATH}/Qt5Svgd.dll - DESTINATION "/" - CONFIGURATIONS Debug - ) - - # The Qt5 Release configuration files don't have a postfix - install(FILES - ${QT5_BIN_PATH}/Qt5Core.dll - ${QT5_BIN_PATH}/Qt5Gui.dll - ${QT5_BIN_PATH}/Qt5Network.dll - ${QT5_BIN_PATH}/Qt5PrintSupport.dll - ${QT5_BIN_PATH}/Qt5Widgets.dll - ${QT5_BIN_PATH}/Qt5Concurrent.dll - ${QT5_BIN_PATH}/Qt5Svg.dll - DESTINATION "/" - CONFIGURATIONS Release - ) - - # The files below are common to all configurations - install(FILES - ${SQLITE3_DLL} - ${OPENSSL_PATH}/libeay32.dll - ${OPENSSL_PATH}/ssleay32.dll - DESTINATION "/" - ) - - install(FILES - ${QT5_PATH}/plugins/platforms/qwindows.dll - DESTINATION platforms - ) - - # The XML dll - install(FILES - "${QT5_PATH}/bin/Qt5Xmld.dll" - DESTINATION "/" - CONFIGURATIONS Debug - ) - - install(FILES - "${QT5_PATH}/bin/Qt5Xml.dll" - DESTINATION "/" - CONFIGURATIONS Release - ) - - # The image format plugins - install(FILES - ${WIN_IMG_PLUGINS_DEBUG} - DESTINATION imageformats - CONFIGURATIONS Debug - ) - - install(FILES - ${WIN_IMG_PLUGINS} - DESTINATION imageformats - CONFIGURATIONS Release - ) - - # The license files - install(FILES - ${LICENSE_FILES} - DESTINATION licenses - ) - - # The batch file launcher - install(FILES - distri/winlaunch.bat - DESTINATION "/" - ) -endif() - -if(APPLE) - set_target_properties(${PROJECT_NAME} PROPERTIES - BUNDLE True - OUTPUT_NAME "DB Browser for SQLite" - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/app.plist - ) -endif() - -# CPack configuration -set(CPACK_STRIP_FILES ON) -set(CPACK_DEBIAN_PACKAGE_PRIORITY optional) -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tristan Stenner ") -set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) -if(APPLE) - set(CPACK_DEFAULT_GEN TBZ2) -elseif(WIN32) - set(CPACK_DEFAULT_GEN ZIP) - set(CPACK_NSIS_MODIFY_PATH ON) - set(CPACK_WIX_CMAKE_PACKAGE_REGISTRY ON) - set(CPACK_WIX_UPGRADE_GUID "78c885a7-e9c8-4ded-9b62-9abe47466950") -elseif(UNIX) - set(CPACK_DEFAULT_GEN DEB) - set(CPACK_SET_DESTDIR 1) - set(CPACK_INSTALL_PREFIX "/usr") -endif() -set(CPACK_GENERATOR ${CPACK_DEFAULT_GEN} CACHE STRING "CPack pkg type(s) to generate") -include(CPack) diff --git a/config/3dparty.cmake b/config/3dparty.cmake new file mode 100644 index 000000000..64b13c51a --- /dev/null +++ b/config/3dparty.cmake @@ -0,0 +1,19 @@ +if(NOT FORCE_INTERNAL_QSCINTILLA) + find_package(QScintilla 2.8.10) +endif() +if(NOT FORCE_INTERNAL_QCUSTOMPLOT) + find_package(QCustomPlot) +endif() +if(NOT FORCE_INTERNAL_QHEXEDIT) + find_package(QHexEdit) +endif() + +if(NOT QSCINTILLA_FOUND) + add_subdirectory(libs/qscintilla/Qt4Qt5) +endif() +if(NOT QHexEdit_FOUND) + add_subdirectory(libs/qhexedit) +endif() +if(NOT QCustomPlot_FOUND) + add_subdirectory(libs/qcustomplot-source) +endif() diff --git a/config/options.cmake b/config/options.cmake new file mode 100644 index 000000000..179fe0c23 --- /dev/null +++ b/config/options.cmake @@ -0,0 +1,9 @@ +set(QT_MAJOR Qt5 CACHE STRING "Major QT version") +OPTION(BUILD_STABLE_VERSION "Don't build the stable version by default" OFF) # Choose between building a stable version or nightly (the default), depending on whether '-DBUILD_STABLE_VERSION=1' is passed on the command line or not. +OPTION(ENABLE_TESTING "Enable the unit tests" OFF) +OPTION(FORCE_INTERNAL_QSCINTILLA "Don't use the distribution's QScintilla library even if there is one" OFF) +OPTION(FORCE_INTERNAL_QCUSTOMPLOT "Don't use distribution's QCustomPlot even if available" ON) +OPTION(FORCE_INTERNAL_QHEXEDIT "Don't use distribution's QHexEdit even if available" ON) +OPTION(ALL_WARNINGS "Enable some useful warning flags" OFF) +OPTION(sqlcipher "Build with SQLCipher library" OFF) +OPTION(customTap "Using SQLCipher, SQLite and Qt installed through our custom Homebrew tap" OFF) diff --git a/config/platform.cmake b/config/platform.cmake new file mode 100644 index 000000000..eaa86767b --- /dev/null +++ b/config/platform.cmake @@ -0,0 +1,15 @@ +set(ADDITIONAL_PLATFORM_FILES) +if(WIN32) + include(platform_win.cmake) + add_definitions(-DCHECKNEWVERSION) +elseif(APPLE) + include(platform_apple.cmake) + add_definitions(-DCHECKNEWVERSION) +endif() + +# add extra library path for MacOS and FreeBSD +set(EXTRAPATH APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") +if(EXTRAPATH) + list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlite/lib) + list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlitefts5/lib) +endif() diff --git a/config/platform_apple.cmake b/config/platform_apple.cmake new file mode 100644 index 000000000..3680ecb1f --- /dev/null +++ b/config/platform_apple.cmake @@ -0,0 +1,4 @@ +set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME "DB Browser for SQLite" + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/app.plist +) diff --git a/config/platform_win.cmake b/config/platform_win.cmake new file mode 100644 index 000000000..595a88fe2 --- /dev/null +++ b/config/platform_win.cmake @@ -0,0 +1,51 @@ +if(MSVC) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # Paths for 64-bit windows builds + set(OPENSSL_PATH "C:/dev/OpenSSL-Win64" CACHE PATH "OpenSSL Path") + set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017_64" CACHE PATH "Qt5 Path") + + # Choose between SQLCipher or SQLite, depending whether + # -Dsqlcipher=on is passed on the command line + if(sqlcipher) + set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win64" CACHE PATH "SQLCipher Path") + else() + set(SQLITE3_PATH "C:/dev/SQLite-Win64" CACHE PATH "SQLite Path") + endif() + + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.02 /ENTRY:mainCRTStartup") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.02") + else() + # Paths for 32-bit windows builds + set(OPENSSL_PATH "C:/dev/OpenSSL-Win32" CACHE PATH "OpenSSL Path") + set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017" CACHE PATH "Qt5 Path") + + # Choose between SQLCipher or SQLite, depending whether + # -Dsqlcipher=on is passed on the command line + if(sqlcipher) + set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win32" CACHE PATH "SQLCipher Path") + else() + set(SQLITE3_PATH "C:/dev/SQLite-Win32" CACHE PATH "SQLite Path") + endif() + + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.01 /ENTRY:mainCRTStartup") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.01") + endif() + + set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") + set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") + set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") + + list(PREPEND CMAKE_PREFIX_PATH ${QT5_PATH} ${SQLITE3_PATH}) + list(APPEND ADDITIONAL_PLATFORM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") +elseif(MINGW) + # resource compilation for MinGW + add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" + COMMAND windres "-I${CMAKE_CURRENT_BINARY_DIR}" "-i${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc" -o "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" VERBATIM + ) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") + set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) + set(ADDITIONAL_LIBS lzma) + list(APPEND ADDITIONAL_PLATFORM_FILES ""${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o"") +endif() diff --git a/config/translations.cmake b/config/translations.cmake new file mode 100644 index 000000000..8219ae0a0 --- /dev/null +++ b/config/translations.cmake @@ -0,0 +1,31 @@ +# Translation files +set(SQLB_TSS + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ar_SA.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_cs.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh_TW.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_de.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_es_ES.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_fr.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ru.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pl.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pt_BR.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_en_GB.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ko_KR.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_tr.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_uk_UA.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_it.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ja.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_nl.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_sv.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_id.ts" + "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ro.ts" +) + +if(SQLB_TSS) + # add translations + foreach(SQLB_TS ${SQLB_TSS}) + set_source_files_properties("${SQLB_TS}" PROPERTIES OUTPUT_LOCATION "${CMAKE_SOURCE_DIR}/src/translations") + endforeach() + qt_add_translation(SQLB_QMS ${SQLB_TSS}) +endif() diff --git a/libs/qcustomplot-source/CMakeLists.txt b/libs/qcustomplot-source/CMakeLists.txt index 3f2cf5a28..4f1aec7d1 100644 --- a/libs/qcustomplot-source/CMakeLists.txt +++ b/libs/qcustomplot-source/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12.2) +cmake_minimum_required(VERSION 3.5) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/libs/qhexedit/CMakeLists.txt b/libs/qhexedit/CMakeLists.txt index 91ad8888c..ebdfead13 100644 --- a/libs/qhexedit/CMakeLists.txt +++ b/libs/qhexedit/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12.2) +cmake_minimum_required(VERSION 3.5) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/libs/qscintilla/Qt4Qt5/CMakeLists.txt b/libs/qscintilla/Qt4Qt5/CMakeLists.txt index 2309795aa..c647c5955 100644 --- a/libs/qscintilla/Qt4Qt5/CMakeLists.txt +++ b/libs/qscintilla/Qt4Qt5/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12.2) +cmake_minimum_required(VERSION 3.5) # Disable AUTOMOC because it cannot be made to work with QScintilla set(CMAKE_AUTOMOC OFF) From a587785e0b2b54948d63854ca80fea617fb3e28e Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Fri, 16 Aug 2024 16:41:14 +0300 Subject: [PATCH 02/52] Fix platform include --- config/platform.cmake | 4 ++-- config/platform_win.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/platform.cmake b/config/platform.cmake index eaa86767b..7d015f1be 100644 --- a/config/platform.cmake +++ b/config/platform.cmake @@ -1,9 +1,9 @@ set(ADDITIONAL_PLATFORM_FILES) if(WIN32) - include(platform_win.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/platform_win.cmake) add_definitions(-DCHECKNEWVERSION) elseif(APPLE) - include(platform_apple.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/platform_apple.cmake) add_definitions(-DCHECKNEWVERSION) endif() diff --git a/config/platform_win.cmake b/config/platform_win.cmake index 595a88fe2..a535b0383 100644 --- a/config/platform_win.cmake +++ b/config/platform_win.cmake @@ -47,5 +47,5 @@ elseif(MINGW) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) set(ADDITIONAL_LIBS lzma) - list(APPEND ADDITIONAL_PLATFORM_FILES ""${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o"") + list(APPEND ADDITIONAL_PLATFORM_FILES "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") endif() From 4e60663d6fd0739a85056a7aef7ae26c28c68121 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Fri, 16 Aug 2024 16:51:53 +0300 Subject: [PATCH 03/52] Update --- CMakeLists.txt | 3 --- config/platform.cmake | 1 - config/platform_win.cmake | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11e04fcf2..49c3e3c18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,9 +277,6 @@ target_sources(${PROJECT_NAME} # Styles src/qdarkstyle/dark/darkstyle.qrc src/qdarkstyle/light/lightstyle.qrc - - # Platform dependant files (e.g. winapp.rc) - ${ADDITIONAL_PLATFORM_FILES} ) target_link_libraries(${PROJECT_NAME} diff --git a/config/platform.cmake b/config/platform.cmake index 7d015f1be..416218f0a 100644 --- a/config/platform.cmake +++ b/config/platform.cmake @@ -1,4 +1,3 @@ -set(ADDITIONAL_PLATFORM_FILES) if(WIN32) include(${CMAKE_CURRENT_LIST_DIR}/platform_win.cmake) add_definitions(-DCHECKNEWVERSION) diff --git a/config/platform_win.cmake b/config/platform_win.cmake index a535b0383..34c5695e2 100644 --- a/config/platform_win.cmake +++ b/config/platform_win.cmake @@ -38,7 +38,7 @@ if(MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") list(PREPEND CMAKE_PREFIX_PATH ${QT5_PATH} ${SQLITE3_PATH}) - list(APPEND ADDITIONAL_PLATFORM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") + target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") elseif(MINGW) # resource compilation for MinGW add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" @@ -47,5 +47,5 @@ elseif(MINGW) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) set(ADDITIONAL_LIBS lzma) - list(APPEND ADDITIONAL_PLATFORM_FILES "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") + target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") endif() From 04cde9c317e595c57420912dc6ed4d0cb05837e2 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Tue, 20 Aug 2024 11:21:42 +0300 Subject: [PATCH 04/52] CMake: add tests --- CMakeLists.txt | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49c3e3c18..4815b1d21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,10 +85,6 @@ else() set(LIBSQLITE_NAME SQLite::SQLite3) endif() -if(ENABLE_TESTING) - enable_testing() -endif() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h ) @@ -285,3 +281,30 @@ target_link_libraries(${PROJECT_NAME} QHexEdit::QHexEdit QCustomPlot::QCustomPlot QScintilla::QScintilla ${LIBSQLITE_NAME} ) + +if(ENABLE_TESTING) + enable_testing() + add_subdirectory(src/tests) +endif() + +# CPack configuration +set(CPACK_STRIP_FILES ON) +set(CPACK_DEBIAN_PACKAGE_PRIORITY optional) +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tristan Stenner ") +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) +if(APPLE) + set(CPACK_DEFAULT_GEN TBZ2) +elseif(WIN32) + set(CPACK_DEFAULT_GEN ZIP) + set(CPACK_NSIS_MODIFY_PATH ON) + set(CPACK_WIX_CMAKE_PACKAGE_REGISTRY ON) + set(CPACK_WIX_UPGRADE_GUID "78c885a7-e9c8-4ded-9b62-9abe47466950") +elseif(UNIX) + set(CPACK_DEFAULT_GEN DEB) + set(CPACK_SET_DESTDIR 1) + set(CPACK_INSTALL_PREFIX "/usr") +endif() +set(CPACK_GENERATOR ${CPACK_DEFAULT_GEN} CACHE STRING "CPack pkg type(s) to generate") +include(CPack) From 2a7205131e82dd40159243eebaf155f1d9f7e7eb Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Tue, 20 Aug 2024 12:42:12 +0300 Subject: [PATCH 05/52] CMake: add install --- CMakeLists.txt | 2 + config/install.cmake | 113 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 config/install.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 4815b1d21..bdafe75f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -282,6 +282,8 @@ target_link_libraries(${PROJECT_NAME} ${LIBSQLITE_NAME} ) +include(config/install.cmake) + if(ENABLE_TESTING) enable_testing() add_subdirectory(src/tests) diff --git a/config/install.cmake b/config/install.cmake new file mode 100644 index 000000000..92e43346a --- /dev/null +++ b/config/install.cmake @@ -0,0 +1,113 @@ +if((NOT WIN32 AND NOT APPLE) OR MINGW) + install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() + +if(UNIX) + install(FILES src/icons/${PROJECT_NAME}.png + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps/ + ) + + install(FILES images/logo.svg + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/ + RENAME ${PROJECT_NAME}.svg + ) + + install(FILES distri/${PROJECT_NAME}.desktop + DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/ + ) + + install(FILES distri/${PROJECT_NAME}.desktop.appdata.xml + DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo/ + ) +endif() + + +if(WIN32 AND MSVC) + install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION "/" + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + + set(QT5_BIN_PATH ${QT5_PATH}/bin) + + # The Qt5 Debug configuration library files have a 'd' postfix + install(FILES + ${QT5_BIN_PATH}/Qt5Cored.dll + ${QT5_BIN_PATH}/Qt5Guid.dll + ${QT5_BIN_PATH}/Qt5Networkd.dll + ${QT5_BIN_PATH}/Qt5PrintSupportd.dll + ${QT5_BIN_PATH}/Qt5Widgetsd.dll + ${QT5_BIN_PATH}/Qt5Concurrentd.dll + ${QT5_BIN_PATH}/Qt5Svgd.dll + DESTINATION "/" + CONFIGURATIONS Debug + ) + + # The Qt5 Release configuration files don't have a postfix + install(FILES + ${QT5_BIN_PATH}/Qt5Core.dll + ${QT5_BIN_PATH}/Qt5Gui.dll + ${QT5_BIN_PATH}/Qt5Network.dll + ${QT5_BIN_PATH}/Qt5PrintSupport.dll + ${QT5_BIN_PATH}/Qt5Widgets.dll + ${QT5_BIN_PATH}/Qt5Concurrent.dll + ${QT5_BIN_PATH}/Qt5Svg.dll + DESTINATION "/" + CONFIGURATIONS Release + ) + + # The files below are common to all configurations + install(FILES + ${SQLITE3_DLL} + ${OPENSSL_PATH}/libeay32.dll + ${OPENSSL_PATH}/ssleay32.dll + DESTINATION "/" + ) + + install(FILES + ${QT5_PATH}/plugins/platforms/qwindows.dll + DESTINATION platforms + ) + + # The XML dll + install(FILES + "${QT5_PATH}/bin/Qt5Xmld.dll" + DESTINATION "/" + CONFIGURATIONS Debug + ) + + install(FILES + "${QT5_PATH}/bin/Qt5Xml.dll" + DESTINATION "/" + CONFIGURATIONS Release + ) + + # The image format plugins + install(FILES + ${WIN_IMG_PLUGINS_DEBUG} + DESTINATION imageformats + CONFIGURATIONS Debug + ) + + install(FILES + ${WIN_IMG_PLUGINS} + DESTINATION imageformats + CONFIGURATIONS Release + ) + + # The license files + install(FILES + LICENSE + LICENSE-PLUGINS + DESTINATION licenses + ) + + # The batch file launcher + install(FILES + distri/winlaunch.bat + DESTINATION "/" + ) +endif() From 8e6b7de1c03706a40397e9cf90d809410c20909c Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Wed, 21 Aug 2024 12:54:59 +0300 Subject: [PATCH 06/52] Cleanup windows platform --- config/platform_win.cmake | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/config/platform_win.cmake b/config/platform_win.cmake index 34c5695e2..bf0dcb4bc 100644 --- a/config/platform_win.cmake +++ b/config/platform_win.cmake @@ -1,43 +1,19 @@ +set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") +find_package(OpenSSL 1.1.0 REQUIRED) if(MSVC) if(CMAKE_SIZEOF_VOID_P EQUAL 8) - # Paths for 64-bit windows builds - set(OPENSSL_PATH "C:/dev/OpenSSL-Win64" CACHE PATH "OpenSSL Path") - set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017_64" CACHE PATH "Qt5 Path") - - # Choose between SQLCipher or SQLite, depending whether - # -Dsqlcipher=on is passed on the command line - if(sqlcipher) - set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win64" CACHE PATH "SQLCipher Path") - else() - set(SQLITE3_PATH "C:/dev/SQLite-Win64" CACHE PATH "SQLite Path") - endif() - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.02 /ENTRY:mainCRTStartup") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.02") else() - # Paths for 32-bit windows builds - set(OPENSSL_PATH "C:/dev/OpenSSL-Win32" CACHE PATH "OpenSSL Path") - set(QT5_PATH "C:/dev/Qt/5.12.12/msvc2017" CACHE PATH "Qt5 Path") - - # Choose between SQLCipher or SQLite, depending whether - # -Dsqlcipher=on is passed on the command line - if(sqlcipher) - set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win32" CACHE PATH "SQLCipher Path") - else() - set(SQLITE3_PATH "C:/dev/SQLite-Win32" CACHE PATH "SQLite Path") - endif() - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.01 /ENTRY:mainCRTStartup") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.01") endif() - set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") - list(PREPEND CMAKE_PREFIX_PATH ${QT5_PATH} ${SQLITE3_PATH}) target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") elseif(MINGW) # resource compilation for MinGW @@ -45,7 +21,5 @@ elseif(MINGW) COMMAND windres "-I${CMAKE_CURRENT_BINARY_DIR}" "-i${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc" -o "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" VERBATIM ) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") - set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) - set(ADDITIONAL_LIBS lzma) target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") endif() From e5a09d4e0915795f9e98fd562f62d75e973b99c4 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Wed, 21 Aug 2024 12:55:46 +0300 Subject: [PATCH 07/52] Windows install now use windeployqt --- config/install.cmake | 93 ++++++++++---------------------------------- 1 file changed, 21 insertions(+), 72 deletions(-) diff --git a/config/install.cmake b/config/install.cmake index 92e43346a..9f7b7a7b0 100644 --- a/config/install.cmake +++ b/config/install.cmake @@ -1,4 +1,4 @@ -if((NOT WIN32 AND NOT APPLE) OR MINGW) +if(NOT WIN32 AND NOT APPLE) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -25,89 +25,38 @@ if(UNIX) endif() -if(WIN32 AND MSVC) +if(WIN32) install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION "/" + RUNTIME DESTINATION "." LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) - set(QT5_BIN_PATH ${QT5_PATH}/bin) - - # The Qt5 Debug configuration library files have a 'd' postfix - install(FILES - ${QT5_BIN_PATH}/Qt5Cored.dll - ${QT5_BIN_PATH}/Qt5Guid.dll - ${QT5_BIN_PATH}/Qt5Networkd.dll - ${QT5_BIN_PATH}/Qt5PrintSupportd.dll - ${QT5_BIN_PATH}/Qt5Widgetsd.dll - ${QT5_BIN_PATH}/Qt5Concurrentd.dll - ${QT5_BIN_PATH}/Qt5Svgd.dll - DESTINATION "/" - CONFIGURATIONS Debug - ) - - # The Qt5 Release configuration files don't have a postfix - install(FILES - ${QT5_BIN_PATH}/Qt5Core.dll - ${QT5_BIN_PATH}/Qt5Gui.dll - ${QT5_BIN_PATH}/Qt5Network.dll - ${QT5_BIN_PATH}/Qt5PrintSupport.dll - ${QT5_BIN_PATH}/Qt5Widgets.dll - ${QT5_BIN_PATH}/Qt5Concurrent.dll - ${QT5_BIN_PATH}/Qt5Svg.dll - DESTINATION "/" - CONFIGURATIONS Release - ) - - # The files below are common to all configurations - install(FILES - ${SQLITE3_DLL} - ${OPENSSL_PATH}/libeay32.dll - ${OPENSSL_PATH}/ssleay32.dll - DESTINATION "/" - ) - - install(FILES - ${QT5_PATH}/plugins/platforms/qwindows.dll - DESTINATION platforms - ) - - # The XML dll - install(FILES - "${QT5_PATH}/bin/Qt5Xmld.dll" - DESTINATION "/" - CONFIGURATIONS Debug - ) - - install(FILES - "${QT5_PATH}/bin/Qt5Xml.dll" - DESTINATION "/" - CONFIGURATIONS Release - ) - - # The image format plugins - install(FILES - ${WIN_IMG_PLUGINS_DEBUG} - DESTINATION imageformats - CONFIGURATIONS Debug - ) - install(FILES - ${WIN_IMG_PLUGINS} - DESTINATION imageformats - CONFIGURATIONS Release + "$/../bin/sqlite3.dll" + "$/../bin/libcrypto-1_1-x64.dll" + "$/../bin/libssl-1_1-x64.dll" + DESTINATION "." ) # The license files install(FILES LICENSE + LICENSE-GPL-3.0 + LICENSE-MIT + LICENSE-MPL-2.0 LICENSE-PLUGINS DESTINATION licenses ) - # The batch file launcher - install(FILES - distri/winlaunch.bat - DESTINATION "/" - ) + find_file(QT_DEPLOY windeployqt.exe HINTS ${${QT_MAJOR}_DIR}/../../../bin) + if(NOT ${QT_DEPLOY} STREQUAL "QT_DEPLOY-NOTFOUND") + install (CODE + "execute_process(COMMAND_ECHO STDOUT COMMAND ${QT_DEPLOY} + --no-system-d3d-compiler + --no-angle + --no-opengl-sw + \"${CMAKE_INSTALL_PREFIX}\" + )" + ) + endif() endif() From 1a183cdf020836be972889f027722d0295b9ac33 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Wed, 21 Aug 2024 15:19:05 +0300 Subject: [PATCH 08/52] SQLCipher: fix find_package --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bdafe75f4..d71d25e12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,8 @@ include(config/platform.cmake) # SQLCipher option if(sqlcipher) add_definitions(-DENABLE_SQLCIPHER) - set(SQLCipher REQUIRED) + find_package(SQLCipher REQUIRED) + include_directories(SYSTEM "${SQLCIPHER_INCLUDE_DIR}/sqlcipher") set(LIBSQLITE_NAME SQLCipher::SQLCipher) else() find_package(SQLite3 REQUIRED) From cc98ee58ebe8701192749bb86d09d0fb4cf58f5c Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Wed, 21 Aug 2024 15:20:34 +0300 Subject: [PATCH 09/52] Windows: set correct name for SQLCipher build --- config/platform_win.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/platform_win.cmake b/config/platform_win.cmake index bf0dcb4bc..3d19af2bf 100644 --- a/config/platform_win.cmake +++ b/config/platform_win.cmake @@ -1,5 +1,10 @@ -set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") -find_package(OpenSSL 1.1.0 REQUIRED) +if(sqlcipher) + set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLCipher") +else() + set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") +endif() + +find_package(OpenSSL 1.1.1 REQUIRED) if(MSVC) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.02 /ENTRY:mainCRTStartup") From e168d50e387c796c4c9f6dabf8abd89b10654c07 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Wed, 21 Aug 2024 15:22:21 +0300 Subject: [PATCH 10/52] Windows install: fix runtime libraries installation --- config/install.cmake | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/config/install.cmake b/config/install.cmake index 9f7b7a7b0..77f717983 100644 --- a/config/install.cmake +++ b/config/install.cmake @@ -24,17 +24,26 @@ if(UNIX) ) endif() - if(WIN32) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "." LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + if(sqlcipher) + set(DLL_NAME "sqlcipher.dll") + else() + set(DLL_NAME "sqlite3.dll") + endif() + + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(SSL_SUFIX "-x64") + endif() + install(FILES - "$/../bin/sqlite3.dll" - "$/../bin/libcrypto-1_1-x64.dll" - "$/../bin/libssl-1_1-x64.dll" + "$/../bin/${DLL_NAME}" + "$/../bin/libcrypto-1_1${SSL_SUFIX}.dll" + "$/../bin/libssl-1_1${SSL_SUFIX}.dll" DESTINATION "." ) From c4e9dd4ca07473e302b977c58842f7d9f66105fb Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Wed, 21 Aug 2024 23:26:13 +0300 Subject: [PATCH 11/52] CMake install: runtime libraries installation on Windows --- config/install.cmake | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/config/install.cmake b/config/install.cmake index 77f717983..e19c883ea 100644 --- a/config/install.cmake +++ b/config/install.cmake @@ -31,19 +31,24 @@ if(WIN32) ) if(sqlcipher) - set(DLL_NAME "sqlcipher.dll") + find_file(DLL_NAME sqlcipher.dll PATH_SUFFIXES bin ../bin ../../bin) else() - set(DLL_NAME "sqlite3.dll") + find_file(DLL_NAME sqlite3.dll PATH_SUFFIXES bin ../bin ../../bin) endif() - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(SSL_SUFIX "-x64") - endif() + find_file(DLL_CRYPTO + NAMES libcrypto-1_1-x64.dll libcrypto-1_1.dll + PATH_SUFFIXES bin ../bin ../../bin + ) + find_file(DLL_SSL + NAMES libssl-1_1-x64.dll libssl-1_1.dll + PATH_SUFFIXES bin ../bin ../../bin + ) install(FILES - "$/../bin/${DLL_NAME}" - "$/../bin/libcrypto-1_1${SSL_SUFIX}.dll" - "$/../bin/libssl-1_1${SSL_SUFIX}.dll" + ${DLL_NAME} + ${DLL_CRYPTO} + ${DLL_SSL} DESTINATION "." ) @@ -64,7 +69,7 @@ if(WIN32) --no-system-d3d-compiler --no-angle --no-opengl-sw - \"${CMAKE_INSTALL_PREFIX}\" + \"${CMAKE_INSTALL_PREFIX}/$\" )" ) endif() From 2ad5f85d970c3d744035e0664e838d614aed7411 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 10:13:28 +0300 Subject: [PATCH 12/52] CMake Windows install: OpenSSL runtime libraries A more robust method for finding OpenSSL runtime libraries, now we search with version patterns **MAJOR**, **MAJOR_MINOR**, and **-x64**. This should help with Qt6 requirements for OpenSSL-3. --- config/install.cmake | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/config/install.cmake b/config/install.cmake index e19c883ea..c67ff25f8 100644 --- a/config/install.cmake +++ b/config/install.cmake @@ -36,15 +36,24 @@ if(WIN32) find_file(DLL_NAME sqlite3.dll PATH_SUFFIXES bin ../bin ../../bin) endif() - find_file(DLL_CRYPTO - NAMES libcrypto-1_1-x64.dll libcrypto-1_1.dll - PATH_SUFFIXES bin ../bin ../../bin + string(REGEX MATCH "^([0-9]+)\.([0-9]+)" SSL_OUT "${OPENSSL_VERSION}") + set(DLL_CRYPTO_NAMES + "libcrypto-${CMAKE_MATCH_1}_${CMAKE_MATCH_2}-x64.dll" + "libcrypto-${CMAKE_MATCH_1}-x64.dll" + "libcrypto-${CMAKE_MATCH_1}_${CMAKE_MATCH_2}.dll" + "libcrypto-${CMAKE_MATCH_1}.dll" ) - find_file(DLL_SSL - NAMES libssl-1_1-x64.dll libssl-1_1.dll - PATH_SUFFIXES bin ../bin ../../bin + + set(DLL_SSL_NAMES + "libssl-${CMAKE_MATCH_1}_${CMAKE_MATCH_2}-x64.dll" + "libssl-${CMAKE_MATCH_1}-x64.dll" + "libssl-${CMAKE_MATCH_1}_${CMAKE_MATCH_2}.dll" + "libssl-${CMAKE_MATCH_1}.dll" ) + find_file(DLL_CRYPTO NAMES ${DLL_CRYPTO_NAMES} PATH_SUFFIXES bin ../bin ../../bin) + find_file(DLL_SSL NAMES ${DLL_SSL_NAMES} PATH_SUFFIXES bin ../bin ../../bin) + install(FILES ${DLL_NAME} ${DLL_CRYPTO} From 708354d0840afc326689fab03df9f78c24c3b38e Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 13:43:37 +0300 Subject: [PATCH 13/52] Qt6 xml: fix string literals comparisons --- src/MainWindow.cpp | 113 +++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index fee3fede1..9e9dd8986 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -2560,13 +2560,14 @@ void MainWindow::openLinkDonatePatreon() const static void loadCondFormatMap(BrowseDataTableSettings::CondFormatMap& condFormats, QXmlStreamReader& xml, const QString& encoding) { - const QStringRef name = xml.name(); + // using auto solves Qt 5/6 difference, QStringRef vs QStringView + const auto name = xml.name(); while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != name) { - if (xml.name() == "column") { + if (xml.name() == QT_UNICODE_LITERAL("column")) { size_t index = xml.attributes().value("index").toUInt(); - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "column") { - if(xml.name() == "format") { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("column")) { + if(xml.name() == QT_UNICODE_LITERAL("format")) { QFont font; if (xml.attributes().hasAttribute("font")) font.fromString(xml.attributes().value("font").toString()); @@ -2599,12 +2600,12 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, sqlb: if(xml.attributes().hasAttribute("freeze_columns")) settings.frozenColumns = xml.attributes().value("freeze_columns").toUInt(); - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "table") { - if(xml.name() == "sort") + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("table")) { + if(xml.name() == QT_UNICODE_LITERAL("sort")) { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "sort") + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("sort")) { - if(xml.name() == "column") + if(xml.name() == QT_UNICODE_LITERAL("column")) { int index = xml.attributes().value("index").toInt(); int mode = xml.attributes().value("mode").toInt(); @@ -2613,17 +2614,17 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, sqlb: xml.skipCurrentElement(); } } - } else if(xml.name() == "column_widths") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "column_widths") { - if (xml.name() == "column") { + } else if(xml.name() == QT_UNICODE_LITERAL("column_widths")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("column_widths")) { + if (xml.name() == QT_UNICODE_LITERAL("column")) { int index = xml.attributes().value("index").toInt(); settings.columnWidths[index] = xml.attributes().value("value").toInt(); xml.skipCurrentElement(); } } - } else if(xml.name() == "filter_values") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "filter_values") { - if (xml.name() == "column") { + } else if(xml.name() == QT_UNICODE_LITERAL("filter_values")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("filter_values")) { + if (xml.name() == QT_UNICODE_LITERAL("column")) { size_t index = xml.attributes().value("index").toUInt(); QString value = xml.attributes().value("value").toString(); if(!value.isEmpty()) @@ -2631,33 +2632,33 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, sqlb: xml.skipCurrentElement(); } } - } else if(xml.name() == "conditional_formats") { + } else if(xml.name() == QT_UNICODE_LITERAL("conditional_formats")) { loadCondFormatMap(settings.condFormats, xml, settings.encoding); - } else if(xml.name() == "row_id_formats") { + } else if(xml.name() == QT_UNICODE_LITERAL("row_id_formats")) { loadCondFormatMap(settings.rowIdFormats, xml, settings.encoding); - } else if(xml.name() == "display_formats") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "display_formats") { - if (xml.name() == "column") { + } else if(xml.name() == QT_UNICODE_LITERAL("display_formats")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("display_formats")) { + if (xml.name() == QT_UNICODE_LITERAL("column")) { size_t index = xml.attributes().value("index").toUInt(); settings.displayFormats[index] = xml.attributes().value("value").toString(); xml.skipCurrentElement(); } } - } else if(xml.name() == "hidden_columns") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "hidden_columns") { - if (xml.name() == "column") { + } else if(xml.name() == QT_UNICODE_LITERAL("hidden_columns")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("hidden_columns")) { + if (xml.name() == QT_UNICODE_LITERAL("column")) { int index = xml.attributes().value("index").toInt(); settings.hiddenColumns[index] = xml.attributes().value("value").toInt(); xml.skipCurrentElement(); } } - } else if(xml.name() == "plot_y_axes") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "plot_y_axes") { + } else if(xml.name() == QT_UNICODE_LITERAL("plot_y_axes")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("plot_y_axes")) { QString y1AxisName; QString y2AxisName; PlotDock::PlotSettings y1AxisSettings; PlotDock::PlotSettings y2AxisSettings; - if (xml.name() == "y_axis") { + if (xml.name() == QT_UNICODE_LITERAL("y_axis")) { y1AxisName = xml.attributes().value("name").toString(); y1AxisSettings.lineStyle = xml.attributes().value("line_style").toInt(); y1AxisSettings.pointShape = xml.attributes().value("point_shape").toInt(); @@ -2666,7 +2667,7 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, sqlb: xml.skipCurrentElement(); } settings.plotYAxes[0][y1AxisName] = y1AxisSettings; - if (xml.name() == "y2_axis") { + if (xml.name() == QT_UNICODE_LITERAL("y2_axis")) { y2AxisName = xml.attributes().value("name").toString(); y2AxisSettings.lineStyle = xml.attributes().value("line_style").toInt(); y2AxisSettings.pointShape = xml.attributes().value("point_shape").toInt(); @@ -2676,10 +2677,10 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, sqlb: } settings.plotYAxes[1][y2AxisName] = y2AxisSettings; } - } else if(xml.name() == "global_filter") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "global_filter") + } else if(xml.name() == QT_UNICODE_LITERAL("global_filter")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("global_filter")) { - if(xml.name() == "filter") + if(xml.name() == QT_UNICODE_LITERAL("filter")) { QString value = xml.attributes().value("value").toString(); settings.globalFilters.push_back(value); @@ -2709,7 +2710,7 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read QXmlStreamReader xml(&file); xml.readNext(); // token == QXmlStreamReader::StartDocument xml.readNext(); // name == sqlb_project - if(xml.name() != "sqlb_project") + if(xml.name() != QT_UNICODE_LITERAL("sqlb_project")) return NotValidFormat; // We are going to open a new project, so close the possible current one before opening another. @@ -2728,7 +2729,7 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read // Handle element start if(token == QXmlStreamReader::StartElement) { - if(xml.name() == "db") + if(xml.name() == QT_UNICODE_LITERAL("db")) { // Read only? if(xml.attributes().hasAttribute("readonly") && xml.attributes().value("readonly").toInt()) @@ -2758,43 +2759,43 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read if(xml.attributes().hasAttribute("synchronous")) db.setPragma("synchronous", xml.attributes().value("synchronous").toString()); loadPragmas(); - } else if(xml.name() == "attached") { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "attached") + } else if(xml.name() == QT_UNICODE_LITERAL("attached")) { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("attached")) { - if(xml.name() == "db") + if(xml.name() == QT_UNICODE_LITERAL("db")) { db.attach(xml.attributes().value("path").toString(), xml.attributes().value("schema").toString()); xml.skipCurrentElement(); } } - } else if(xml.name() == "window") { + } else if(xml.name() == QT_UNICODE_LITERAL("window")) { // Window settings - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "window") + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("window")) { - if(xml.name() == "main_tabs") { + if(xml.name() == QT_UNICODE_LITERAL("main_tabs")) { // Currently open tabs restoreOpenTabs(xml.attributes().value("open").toString()); // Currently selected open tab ui->mainTab->setCurrentIndex(xml.attributes().value("current").toString().toInt()); xml.skipCurrentElement(); - } else if(xml.name() == "current_tab") { + } else if(xml.name() == QT_UNICODE_LITERAL("current_tab")) { // Currently selected tab (3.11 or older format, first restore default open tabs) restoreOpenTabs(defaultOpenTabs); ui->mainTab->setCurrentIndex(xml.attributes().value("id").toString().toInt()); xml.skipCurrentElement(); } } - } else if(xml.name() == "tab_structure") { + } else if(xml.name() == QT_UNICODE_LITERAL("tab_structure")) { // Database Structure tab settings - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "tab_structure") + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("tab_structure")) { - if(xml.name() == "column_width") + if(xml.name() == QT_UNICODE_LITERAL("column_width")) { // Tree view column widths ui->dbTreeWidget->setColumnWidth(xml.attributes().value("id").toString().toInt(), xml.attributes().value("width").toString().toInt()); xml.skipCurrentElement(); - } else if(xml.name() == "expanded_item") { + } else if(xml.name() == QT_UNICODE_LITERAL("expanded_item")) { // Tree view expanded items int parent = xml.attributes().value("parent").toString().toInt(); QModelIndex idx; @@ -2806,16 +2807,16 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read xml.skipCurrentElement(); } } - } else if(xml.name() == "tab_browse") { + } else if(xml.name() == QT_UNICODE_LITERAL("tab_browse")) { // Close all open tabs first. We call delete here to avoid the // closed() signal being emitted which would open a new dock. for(auto d : allTableBrowserDocks()) delete d; // Browse Data tab settings - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "tab_browse") + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("tab_browse")) { - if(xml.name() == "current_table") + if(xml.name() == QT_UNICODE_LITERAL("current_table")) { // TODO This attribute was only created until version 3.12.0 which means we can remove support for this // in the future. @@ -2845,7 +2846,7 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read newTableBrowserTab(currentTable); xml.skipCurrentElement(); - } else if(xml.name() == "table") { + } else if(xml.name() == QT_UNICODE_LITERAL("table")) { // New browser tab sqlb::ObjectIdentifier table; table.fromSerialised(xml.attributes().value("table").toString().toStdString()); @@ -2860,16 +2861,16 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read dock->setProperty("custom_title", true); xml.skipCurrentElement(); - } else if(xml.name() == "dock_state") { + } else if(xml.name() == QT_UNICODE_LITERAL("dock_state")) { // Dock state ui->tabBrowsers->restoreState(QByteArray::fromHex(xml.attributes().value("state").toString().toUtf8())); xml.skipCurrentElement(); - } else if(xml.name() == "default_encoding") { + } else if(xml.name() == QT_UNICODE_LITERAL("default_encoding")) { // Default text encoding TableBrowser::setDefaultEncoding(xml.attributes().value("codec").toString()); xml.skipCurrentElement(); - } else if(xml.name() == "browsetable_info") { + } else if(xml.name() == QT_UNICODE_LITERAL("browsetable_info")) { // This tag is only found in old project files. In newer versions (>= 3.11) it is replaced by a new implementation. // 3.12 is the last version to support loading this file format, so just show a warning here. if(!Settings::getValue("idontcare", "projectBrowseTable").toBool()) @@ -2888,10 +2889,10 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read } xml.skipCurrentElement(); - } else if(xml.name() == "browse_table_settings") { + } else if(xml.name() == QT_UNICODE_LITERAL("browse_table_settings")) { - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "browse_table_settings") { - if (xml.name() == "table") { + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("browse_table_settings")) { + if (xml.name() == QT_UNICODE_LITERAL("table")) { sqlb::ObjectIdentifier tableIdentifier = sqlb::ObjectIdentifier (xml.attributes().value("schema").toString().toStdString(), @@ -2912,15 +2913,15 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read } } - } else if(xml.name() == "tab_sql") { + } else if(xml.name() == QT_UNICODE_LITERAL("tab_sql")) { // Close all open tabs first for(int i=ui->tabSqlAreas->count()-1;i>=0;i--) closeSqlTab(i, true); // Execute SQL tab data - while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "tab_sql") + while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != QT_UNICODE_LITERAL("tab_sql")) { - if(xml.name() == "sql") + if(xml.name() == QT_UNICODE_LITERAL("sql")) { // SQL editor tab int index = openSqlTab(); @@ -2936,7 +2937,7 @@ MainWindow::LoadAttempResult MainWindow::loadProject(QString filename, bool read sqlEditor->setText(xml.readElementText()); sqlEditor->setModified(false); } - } else if(xml.name() == "current_tab") { + } else if(xml.name() == QT_UNICODE_LITERAL("current_tab")) { // Currently selected tab ui->tabSqlAreas->setCurrentIndex(xml.attributes().value("id").toString().toInt()); xml.skipCurrentElement(); From 457b1fd65ebe39ac0432486d9022e42ff8fbfb78 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 13:46:51 +0300 Subject: [PATCH 14/52] FileDialog: explicit cast to QChar --- src/FileDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FileDialog.cpp b/src/FileDialog.cpp index bd5b51702..a3b611747 100644 --- a/src/FileDialog.cpp +++ b/src/FileDialog.cpp @@ -48,7 +48,7 @@ QString FileDialog::getFileDialogPath(const FileDialogTypes dialogType) case 2: { // Remember last location for current session only QHash lastLocations = Settings::getValue("db", "lastlocations").toHash(); - return lastLocations[QString(dialogType)].toString(); + return lastLocations[QString(QChar(dialogType))].toString(); } case 1: // Always use this locations return Settings::getValue("db", "defaultlocation").toString(); @@ -62,7 +62,7 @@ void FileDialog::setFileDialogPath(const FileDialogTypes dialogType, const QStri QString dir = QFileInfo(new_path).absolutePath(); QHash lastLocations = Settings::getValue("db", "lastlocations").toHash(); - lastLocations[QString(dialogType)] = dir; + lastLocations[QString(QChar(dialogType))] = dir; switch(Settings::getValue("db", "savedefaultlocation").toInt()) { From 81d98adf2864fcc225d18a1c01a6e26ca5f7c8c6 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 13:48:51 +0300 Subject: [PATCH 15/52] qcustomplot internal: Add support for Qt5 and Qt6 --- libs/qcustomplot-source/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/qcustomplot-source/CMakeLists.txt b/libs/qcustomplot-source/CMakeLists.txt index 4f1aec7d1..022126a50 100644 --- a/libs/qcustomplot-source/CMakeLists.txt +++ b/libs/qcustomplot-source/CMakeLists.txt @@ -1,9 +1,11 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -find_package(Qt5 REQUIRED COMPONENTS Widgets PrintSupport) +set(QT_MAJOR Qt5 CACHE STRING "Major QT version") + +find_package(${QT_MAJOR} REQUIRED COMPONENTS Widgets PrintSupport) set(QCUSTOMPLOT_SRC qcustomplot.cpp @@ -16,6 +18,6 @@ set(QCUSTOMPLOT_MOC_HDR add_library(qcustomplot ${QCUSTOMPLOT_SRC} ${QCUSTOMPLOT_MOC_HDR} ${QCUSTOMPLOT_MOC}) target_include_directories(qcustomplot INTERFACE ${CMAKE_CURRENT_LIST_DIR}) -target_link_libraries(qcustomplot Qt5::Widgets Qt5::PrintSupport) +target_link_libraries(qcustomplot ${QT_MAJOR}::Widgets ${QT_MAJOR}::PrintSupport) add_library(QCustomPlot::QCustomPlot ALIAS qcustomplot) From 18822a678f27d97546f9afb14301e382aa44c40a Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 13:51:28 +0300 Subject: [PATCH 16/52] qcustomplot internal: update to version 2.1.1 for better Qt6 support --- libs/qcustomplot-source/GPL.txt | 1348 +++++++++++------------ libs/qcustomplot-source/changelog.txt | 18 + libs/qcustomplot-source/qcustomplot.cpp | 197 ++-- libs/qcustomplot-source/qcustomplot.h | 181 +-- 4 files changed, 916 insertions(+), 828 deletions(-) mode change 100644 => 100755 libs/qcustomplot-source/changelog.txt diff --git a/libs/qcustomplot-source/GPL.txt b/libs/qcustomplot-source/GPL.txt index 818433ecc..94a9ed024 100755 --- a/libs/qcustomplot-source/GPL.txt +++ b/libs/qcustomplot-source/GPL.txt @@ -1,674 +1,674 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/libs/qcustomplot-source/changelog.txt b/libs/qcustomplot-source/changelog.txt old mode 100644 new mode 100755 index cc0fede3f..de330e754 --- a/libs/qcustomplot-source/changelog.txt +++ b/libs/qcustomplot-source/changelog.txt @@ -1,3 +1,21 @@ +#### Version 2.1.1 released on 06.11.22 #### + +Added features: + - Qt6.4 Compatibility + +Bugfixes: + - dynamically changing device pixel ratios (e.g. when moving between different DPI screens) is handled properly + - bugfix Colormap autoscaling: recalculateDataBounds() if (0, 0) data point is NaN. + - minor bugfix in getMantissa for certain values due to rounding errors + - Graphs with line style lsImpulse properly ignore NaN data points + - fixed issue where QCP wasn't greyed out together with the rest of the UI on embedded systems when a modal dialog is shown + (QCustomPlot no longer has the Qt::WA_OpaquePaintEvent attribute enabled by default) + +Other: + - in QCPAxisPainterPrivate::getTickLabelData, don't use fixed 'e', but locale aware character of parent plot locale + - Axis rescaling now ignores +/- Inf in data values + - slight performance improvements of QCPColorMap colorization and fills. + #### Version 2.1.0 released on 29.03.21 #### Added features: diff --git a/libs/qcustomplot-source/qcustomplot.cpp b/libs/qcustomplot-source/qcustomplot.cpp index 04f3147dd..72b5bfb8b 100644 --- a/libs/qcustomplot-source/qcustomplot.cpp +++ b/libs/qcustomplot-source/qcustomplot.cpp @@ -1,7 +1,7 @@ /*************************************************************************** ** ** ** QCustomPlot, an easy to use, modern plotting widget for Qt ** -** Copyright (C) 2011-2021 Emanuel Eichhammer ** +** Copyright (C) 2011-2022 Emanuel Eichhammer ** ** ** ** This program is free software: you can redistribute it and/or modify ** ** it under the terms of the GNU General Public License as published by ** @@ -18,16 +18,16 @@ ** ** **************************************************************************** ** Author: Emanuel Eichhammer ** -** Website/Contact: http://www.qcustomplot.com/ ** -** Date: 29.03.21 ** -** Version: 2.1.0 ** +** Website/Contact: https://www.qcustomplot.com/ ** +** Date: 06.11.22 ** +** Version: 2.1.1 ** ****************************************************************************/ #include "qcustomplot.h" /* including file 'src/vector2d.cpp' */ -/* modified 2021-03-29T02:30:44, size 7973 */ +/* modified 2022-11-06T12:45:56, size 7973 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPVector2D @@ -272,7 +272,7 @@ QCPVector2D &QCPVector2D::operator-=(const QCPVector2D &vector) /* including file 'src/painter.cpp' */ -/* modified 2021-03-29T02:30:44, size 8656 */ +/* modified 2022-11-06T12:45:56, size 8656 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPainter @@ -489,7 +489,7 @@ void QCPPainter::makeNonCosmetic() /* including file 'src/paintbuffer.cpp' */ -/* modified 2021-03-29T02:30:44, size 18915 */ +/* modified 2022-11-06T12:45:56, size 18915 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractPaintBuffer @@ -976,7 +976,7 @@ void QCPPaintBufferGlFbo::reallocateBuffer() /* including file 'src/layer.cpp' */ -/* modified 2021-03-29T02:30:44, size 37615 */ +/* modified 2022-11-06T12:45:56, size 37615 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayer @@ -1836,7 +1836,7 @@ void QCPLayerable::wheelEvent(QWheelEvent *event) /* including file 'src/axis/range.cpp' */ -/* modified 2021-03-29T02:30:44, size 12221 */ +/* modified 2022-11-06T12:45:56, size 12221 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPRange @@ -2158,7 +2158,7 @@ bool QCPRange::validRange(const QCPRange &range) /* including file 'src/selection.cpp' */ -/* modified 2021-03-29T02:30:44, size 21837 */ +/* modified 2022-11-06T12:45:56, size 21837 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPDataRange @@ -2759,7 +2759,7 @@ QCPDataSelection QCPDataSelection::inverse(const QCPDataRange &outerRange) const /* including file 'src/selectionrect.cpp' */ -/* modified 2021-03-29T02:30:44, size 9215 */ +/* modified 2022-11-06T12:45:56, size 9215 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPSelectionRect @@ -2988,7 +2988,7 @@ void QCPSelectionRect::draw(QCPPainter *painter) /* including file 'src/layout.cpp' */ -/* modified 2021-03-29T02:30:44, size 78863 */ +/* modified 2022-11-06T12:45:56, size 78863 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPMarginGroup @@ -5161,7 +5161,7 @@ void QCPLayoutInset::addElement(QCPLayoutElement *element, const QRectF &rect) /* including file 'src/lineending.cpp' */ -/* modified 2021-03-29T02:30:44, size 11189 */ +/* modified 2022-11-06T12:45:56, size 11189 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLineEnding @@ -5455,7 +5455,7 @@ void QCPLineEnding::draw(QCPPainter *painter, const QCPVector2D &pos, double ang /* including file 'src/axis/labelpainter.cpp' */ -/* modified 2021-03-29T02:30:44, size 27296 */ +/* modified 2022-11-06T12:45:56, size 27519 */ //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -5653,8 +5653,8 @@ QByteArray QCPLabelPainterPrivate::generateLabelParameterHash() const QByteArray result; result.append(QByteArray::number(mParentPlot->bufferDevicePixelRatio())); result.append(QByteArray::number(mRotation)); - //result.append(QByteArray::number((int)tickLabelSide)); TODO: check whether this is really a cache-invalidating property - result.append(QByteArray::number((int)mSubstituteExponent)); + //result.append(QByteArray::number(int(tickLabelSide))); TODO: check whether this is really a cache-invalidating property + result.append(QByteArray::number(int(mSubstituteExponent))); result.append(QString(mMultiplicationSymbol).toUtf8()); result.append(mColor.name().toLatin1()+QByteArray::number(mColor.alpha(), 16)); result.append(mFont.toString().toLatin1()); @@ -5757,9 +5757,12 @@ QPointF QCPLabelPainterPrivate::getAnchorPos(const QPointF &tickPos) case asTopRight: return tickPos+QPointF(-mPadding*M_SQRT1_2, mPadding*M_SQRT1_2); case asBottomRight: return tickPos+QPointF(-mPadding*M_SQRT1_2, -mPadding*M_SQRT1_2); case asBottomLeft: return tickPos+QPointF(mPadding*M_SQRT1_2, -mPadding*M_SQRT1_2); + default: qDebug() << Q_FUNC_INFO << "invalid mode for anchor side: " << mAnchorSide; break; } + break; } case amSkewedUpright: + // fall through case amSkewedRotated: { QCPVector2D anchorNormal(tickPos-mAnchorReference); @@ -5768,6 +5771,7 @@ QPointF QCPLabelPainterPrivate::getAnchorPos(const QPointF &tickPos) anchorNormal.normalize(); return tickPos+(anchorNormal*mPadding).toPointF(); } + default: qDebug() << Q_FUNC_INFO << "invalid mode for anchor mode: " << mAnchorMode; break; } return tickPos; } @@ -5985,8 +5989,8 @@ QByteArray QCPLabelPainterPrivate::cacheKey(const QString &text, const QColor &c { return text.toUtf8()+ QByteArray::number(color.red()+256*color.green()+65536*color.blue(), 36)+ - QByteArray::number(color.alpha()+256*(int)side, 36)+ - QByteArray::number((int)(rotation*100)%36000, 36); + QByteArray::number(color.alpha()+256*int(side), 36)+ + QByteArray::number(int(rotation*100), 36); } QCPLabelPainterPrivate::AnchorSide QCPLabelPainterPrivate::skewedAnchorSide(const QPointF &tickPos, double sideExpandHorz, double sideExpandVert) const @@ -6054,7 +6058,7 @@ void QCPLabelPainterPrivate::analyzeFontMetrics() /* including file 'src/axis/axisticker.cpp' */ -/* modified 2021-03-29T02:30:44, size 18688 */ +/* modified 2022-11-06T12:45:56, size 18693 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTicker @@ -6438,7 +6442,7 @@ double QCPAxisTicker::pickClosest(double target, const QVector &candidat */ double QCPAxisTicker::getMantissa(double input, double *magnitude) const { - const double mag = qPow(10.0, qFloor(qLn(input)/qLn(10.0))); + const double mag = std::pow(10.0, std::floor(std::log10(input))); if (magnitude) *magnitude = mag; return input/mag; } @@ -6474,7 +6478,7 @@ double QCPAxisTicker::cleanMantissa(double input) const /* including file 'src/axis/axistickerdatetime.cpp' */ -/* modified 2021-03-29T02:30:44, size 18829 */ +/* modified 2022-11-06T12:45:56, size 18829 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerDateTime @@ -6831,7 +6835,7 @@ double QCPAxisTickerDateTime::dateTimeToKey(const QDate &date, Qt::TimeSpec time /* including file 'src/axis/axistickertime.cpp' */ -/* modified 2021-03-29T02:30:44, size 11745 */ +/* modified 2022-11-06T12:45:56, size 11745 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerTime @@ -7080,7 +7084,7 @@ void QCPAxisTickerTime::replaceUnit(QString &text, QCPAxisTickerTime::TimeUnit u /* including file 'src/axis/axistickerfixed.cpp' */ -/* modified 2021-03-29T02:30:44, size 5575 */ +/* modified 2022-11-06T12:45:56, size 5575 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerFixed @@ -7182,7 +7186,7 @@ double QCPAxisTickerFixed::getTickStep(const QCPRange &range) /* including file 'src/axis/axistickertext.cpp' */ -/* modified 2021-03-29T02:30:44, size 8742 */ +/* modified 2022-11-06T12:45:56, size 8742 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerText @@ -7399,7 +7403,7 @@ QVector QCPAxisTickerText::createTickVector(double tickStep, const QCPRa /* including file 'src/axis/axistickerpi.cpp' */ -/* modified 2021-03-29T02:30:44, size 11177 */ +/* modified 2022-11-06T12:45:56, size 11177 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerPi @@ -7686,7 +7690,7 @@ QString QCPAxisTickerPi::unicodeSubscript(int number) const /* including file 'src/axis/axistickerlog.cpp' */ -/* modified 2021-03-29T02:30:44, size 7890 */ +/* modified 2022-11-06T12:45:56, size 7890 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerLog @@ -7827,7 +7831,7 @@ QVector QCPAxisTickerLog::createTickVector(double tickStep, const QCPRan /* including file 'src/axis/axis.cpp' */ -/* modified 2021-03-29T02:30:44, size 99883 */ +/* modified 2022-11-06T12:45:56, size 99911 */ //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -10348,7 +10352,7 @@ QCPAxisPainterPrivate::TickLabelData QCPAxisPainterPrivate::getTickLabelData(con int eLast = -1; // last index of exponent part, rest of text after this will be suffixPart if (substituteExponent) { - ePos = text.indexOf(QLatin1Char('e')); + ePos = text.indexOf(QString(mParentPlot->locale().exponential())); if (ePos > 0 && text.at(ePos-1).isDigit()) { eLast = ePos; @@ -10545,7 +10549,7 @@ void QCPAxisPainterPrivate::getMaxTickLabelSize(const QFont &font, const QString /* including file 'src/scatterstyle.cpp' */ -/* modified 2021-03-29T02:30:44, size 17466 */ +/* modified 2022-11-06T12:45:56, size 17466 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPScatterStyle @@ -11018,7 +11022,7 @@ void QCPScatterStyle::drawShape(QCPPainter *painter, double x, double y) const /* including file 'src/plottable.cpp' */ -/* modified 2021-03-29T02:30:44, size 38818 */ +/* modified 2022-11-06T12:45:56, size 38818 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPSelectionDecorator @@ -11989,7 +11993,7 @@ void QCPAbstractPlottable::deselectEvent(bool *selectionStateChanged) /* including file 'src/item.cpp' */ -/* modified 2021-03-29T02:30:44, size 49486 */ +/* modified 2022-11-06T12:45:56, size 49486 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemAnchor @@ -13261,7 +13265,7 @@ QCP::Interaction QCPAbstractItem::selectionCategory() const /* including file 'src/core.cpp' */ -/* modified 2021-03-29T02:30:44, size 127198 */ +/* modified 2022-11-06T12:45:56, size 127625 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCustomPlot @@ -13273,7 +13277,7 @@ QCP::Interaction QCPAbstractItem::selectionCategory() const interacts with the user. For tutorials on how to use QCustomPlot, see the website\n - http://www.qcustomplot.com/ + https://www.qcustomplot.com/ */ /* start of documentation of inline functions */ @@ -13597,7 +13601,7 @@ QCustomPlot::QCustomPlot(QWidget *parent) : xAxis2(nullptr), yAxis2(nullptr), legend(nullptr), - mBufferDevicePixelRatio(1.0), // will be adapted to primary screen below + mBufferDevicePixelRatio(1.0), // will be adapted to true value below mPlotLayout(nullptr), mAutoAddPlottableToLegend(true), mAntialiasedElements(QCP::aeNone), @@ -13626,7 +13630,6 @@ QCustomPlot::QCustomPlot(QWidget *parent) : mOpenGlCacheLabelsBackup(true) { setAttribute(Qt::WA_NoMousePropagation); - setAttribute(Qt::WA_OpaquePaintEvent); setFocusPolicy(Qt::ClickFocus); setMouseTracking(true); QLocale currentLocale = locale(); @@ -15466,6 +15469,22 @@ QSize QCustomPlot::sizeHint() const void QCustomPlot::paintEvent(QPaintEvent *event) { Q_UNUSED(event) + + // detect if the device pixel ratio has changed (e.g. moving window between different DPI screens), and adapt buffers if necessary: +#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED +# ifdef QCP_DEVICEPIXELRATIO_FLOAT + double newDpr = devicePixelRatioF(); +# else + double newDpr = devicePixelRatio(); +# endif + if (!qFuzzyCompare(mBufferDevicePixelRatio, newDpr)) + { + setBufferDevicePixelRatio(newDpr); + replot(QCustomPlot::rpQueuedRefresh); + return; + } +#endif + QCPPainter painter(this); if (painter.isActive()) { @@ -16480,7 +16499,7 @@ void QCustomPlot::toPainter(QCPPainter *painter, int width, int height) /* including file 'src/colorgradient.cpp' */ -/* modified 2021-03-29T02:30:44, size 25278 */ +/* modified 2022-11-06T12:45:56, size 25408 */ //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -16710,10 +16729,10 @@ void QCPColorGradient::colorize(const double *data, const QCPRange &range, QRgb const double value = data[dataIndexFactor*i]; if (skipNanCheck || !std::isnan(value)) { - int index = int((!logarithmic ? value-range.lower : qLn(value/range.lower)) * posToIndexFactor); + qint64 index = qint64((!logarithmic ? value-range.lower : qLn(value/range.lower)) * posToIndexFactor); if (!mPeriodic) { - index = qBound(0, index, mLevelCount-1); + index = qBound(qint64(0), index, qint64(mLevelCount-1)); } else { index %= mLevelCount; @@ -16771,10 +16790,10 @@ void QCPColorGradient::colorize(const double *data, const unsigned char *alpha, const double value = data[dataIndexFactor*i]; if (skipNanCheck || !std::isnan(value)) { - int index = int((!logarithmic ? value-range.lower : qLn(value/range.lower)) * posToIndexFactor); + qint64 index = qint64((!logarithmic ? value-range.lower : qLn(value/range.lower)) * posToIndexFactor); if (!mPeriodic) { - index = qBound(0, index, mLevelCount-1); + index = qBound(qint64(0), index, qint64(mLevelCount-1)); } else { index %= mLevelCount; @@ -17017,7 +17036,7 @@ void QCPColorGradient::updateColorBuffer() for (int i=0; i::const_iterator it = mColorStops.lowerBound(position); + QMap::const_iterator it = const_cast*>(&mColorStops)->lowerBound(position); // force using the const lowerBound method if (it == mColorStops.constEnd()) // position is on or after last stop, use color of last stop { if (useAlpha) @@ -17115,7 +17134,7 @@ void QCPColorGradient::updateColorBuffer() /* including file 'src/selectiondecorator-bracket.cpp' */ -/* modified 2021-03-29T02:30:44, size 12308 */ +/* modified 2022-11-06T12:45:56, size 12308 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPSelectionDecoratorBracket @@ -17401,7 +17420,7 @@ QPointF QCPSelectionDecoratorBracket::getPixelCoordinates(const QCPPlottableInte /* including file 'src/layoutelements/layoutelement-axisrect.cpp' */ -/* modified 2021-03-29T02:30:44, size 47193 */ +/* modified 2022-11-06T12:45:56, size 47193 */ //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -18686,7 +18705,7 @@ void QCPAxisRect::wheelEvent(QWheelEvent *event) /* including file 'src/layoutelements/layoutelement-legend.cpp' */ -/* modified 2021-03-29T02:30:44, size 31762 */ +/* modified 2022-11-06T12:45:56, size 31762 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractLegendItem @@ -19610,7 +19629,7 @@ void QCPLegend::parentPlotInitialized(QCustomPlot *parentPlot) /* including file 'src/layoutelements/layoutelement-textelement.cpp' */ -/* modified 2021-03-29T02:30:44, size 12925 */ +/* modified 2022-11-06T12:45:56, size 12925 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPTextElement @@ -20016,7 +20035,7 @@ QColor QCPTextElement::mainTextColor() const /* including file 'src/layoutelements/layoutelement-colorscale.cpp' */ -/* modified 2021-03-29T02:30:44, size 26531 */ +/* modified 2022-11-06T12:45:56, size 26531 */ //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -20700,7 +20719,7 @@ void QCPColorScaleAxisRectPrivate::axisSelectableChanged(QCPAxis::SelectablePart /* including file 'src/plottables/plottable-graph.cpp' */ -/* modified 2021-03-29T02:30:44, size 74518 */ +/* modified 2022-11-06T12:45:57, size 74926 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPGraphData @@ -21530,21 +21549,37 @@ QVector QCPGraph::dataToImpulseLines(const QVector &data) { for (int i=0; icoordToPixel(data.at(i).key); - result[i*2+0].setX(valueAxis->coordToPixel(0)); - result[i*2+0].setY(key); - result[i*2+1].setX(valueAxis->coordToPixel(data.at(i).value)); - result[i*2+1].setY(key); + const QCPGraphData ¤t = data.at(i); + if (!qIsNaN(current.value)) + { + const double key = keyAxis->coordToPixel(current.key); + result[i*2+0].setX(valueAxis->coordToPixel(0)); + result[i*2+0].setY(key); + result[i*2+1].setX(valueAxis->coordToPixel(current.value)); + result[i*2+1].setY(key); + } else + { + result[i*2+0] = QPointF(0, 0); + result[i*2+1] = QPointF(0, 0); + } } } else // key axis is horizontal { for (int i=0; icoordToPixel(data.at(i).key); - result[i*2+0].setX(key); - result[i*2+0].setY(valueAxis->coordToPixel(0)); - result[i*2+1].setX(key); - result[i*2+1].setY(valueAxis->coordToPixel(data.at(i).value)); + const QCPGraphData ¤t = data.at(i); + if (!qIsNaN(current.value)) + { + const double key = keyAxis->coordToPixel(data.at(i).key); + result[i*2+0].setX(key); + result[i*2+0].setY(valueAxis->coordToPixel(0)); + result[i*2+1].setX(key); + result[i*2+1].setY(valueAxis->coordToPixel(data.at(i).value)); + } else + { + result[i*2+0] = QPointF(0, 0); + result[i*2+1] = QPointF(0, 0); + } } } return result; @@ -22458,7 +22493,7 @@ int QCPGraph::findIndexBelowY(const QVector *data, double y) const /* including file 'src/plottables/plottable-curve.cpp' */ -/* modified 2021-03-29T02:30:44, size 63851 */ +/* modified 2022-11-06T12:45:56, size 63851 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPCurveData @@ -23916,7 +23951,7 @@ double QCPCurve::pointDistance(const QPointF &pixelPoint, QCPCurveDataContainer: /* including file 'src/plottables/plottable-bars.cpp' */ -/* modified 2021-03-29T02:30:44, size 43907 */ +/* modified 2022-11-06T12:45:56, size 43907 */ //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -25092,7 +25127,7 @@ void QCPBars::connectBars(QCPBars *lower, QCPBars *upper) /* including file 'src/plottables/plottable-statisticalbox.cpp' */ -/* modified 2021-03-29T02:30:44, size 28951 */ +/* modified 2022-11-06T12:45:57, size 28951 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPStatisticalBoxData @@ -25754,7 +25789,7 @@ QVector QCPStatisticalBox::getWhiskerBarLines(QCPStatisticalBoxDataConta /* including file 'src/plottables/plottable-colormap.cpp' */ -/* modified 2021-03-29T02:30:44, size 48149 */ +/* modified 2022-11-06T12:45:56, size 48189 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPColorMapData @@ -26124,8 +26159,8 @@ void QCPColorMapData::recalculateDataBounds() { if (mKeySize > 0 && mValueSize > 0) { - double minHeight = mData[0]; - double maxHeight = mData[0]; + double minHeight = std::numeric_limits::max(); + double maxHeight = -std::numeric_limits::max(); const int dataCount = mValueSize*mKeySize; for (int i=0; i= 0x060200 // don't use QT_VERSION_CHECK here, some moc versions don't understand it namespace QCP { -#else -class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q_ENUMS/Q_FLAGS features in namespace + Q_NAMESPACE // this is how to add the staticMetaObject to namespaces in newer Qt versions +#else // Qt version older than 6.2.0 +# ifndef Q_MOC_RUN +namespace QCP { +# else // not in moc run +class QCP { Q_GADGET Q_ENUMS(ExportPen) Q_ENUMS(ResolutionUnit) Q_ENUMS(SignDomain) Q_ENUMS(MarginSide) - Q_FLAGS(MarginSides) Q_ENUMS(AntialiasedElement) - Q_FLAGS(AntialiasedElements) Q_ENUMS(PlottingHint) - Q_FLAGS(PlottingHints) Q_ENUMS(Interaction) - Q_FLAGS(Interactions) Q_ENUMS(SelectionRectMode) Q_ENUMS(SelectionType) + + Q_FLAGS(AntialiasedElements) + Q_FLAGS(PlottingHints) + Q_FLAGS(MarginSides) + Q_FLAGS(Interactions) public: +# endif #endif + /*! Defines the different units in which the image resolution can be specified in the export functions. @@ -378,14 +387,39 @@ inline int getMarginValue(const QMargins &margins, QCP::MarginSide side) return 0; } - -extern const QMetaObject staticMetaObject; // in moc-run we create a static meta object for QCP "fake" object. This line is the link to it via QCP::staticMetaObject in normal operation as namespace +// for newer Qt versions we have to declare the enums/flags as metatypes inside the namespace using Q_ENUM_NS/Q_FLAG_NS: +// if you change anything here, don't forget to change it for older Qt versions below, too, +// and at the start of the namespace in the fake moc-run class +#if QT_VERSION >= 0x060200 +Q_ENUM_NS(ExportPen) +Q_ENUM_NS(ResolutionUnit) +Q_ENUM_NS(SignDomain) +Q_ENUM_NS(MarginSide) +Q_ENUM_NS(AntialiasedElement) +Q_ENUM_NS(PlottingHint) +Q_ENUM_NS(Interaction) +Q_ENUM_NS(SelectionRectMode) +Q_ENUM_NS(SelectionType) + +Q_FLAG_NS(AntialiasedElements) +Q_FLAG_NS(PlottingHints) +Q_FLAG_NS(MarginSides) +Q_FLAG_NS(Interactions) +#else +extern const QMetaObject staticMetaObject; +#endif } // end of namespace QCP + Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements) Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::PlottingHints) Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::MarginSides) Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::Interactions) + +// for older Qt versions we have to declare the enums/flags as metatypes outside the namespace using Q_DECLARE_METATYPE: +// if you change anything here, don't forget to change it for newer Qt versions above, too, +// and at the start of the namespace in the fake moc-run class +#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0) Q_DECLARE_METATYPE(QCP::ExportPen) Q_DECLARE_METATYPE(QCP::ResolutionUnit) Q_DECLARE_METATYPE(QCP::SignDomain) @@ -395,12 +429,13 @@ Q_DECLARE_METATYPE(QCP::PlottingHint) Q_DECLARE_METATYPE(QCP::Interaction) Q_DECLARE_METATYPE(QCP::SelectionRectMode) Q_DECLARE_METATYPE(QCP::SelectionType) +#endif /* end of 'src/global.h' */ /* including file 'src/vector2d.h' */ -/* modified 2021-03-29T02:30:44, size 4988 */ +/* modified 2022-11-06T12:45:56, size 4988 */ class QCP_LIB_DECL QCPVector2D { @@ -475,7 +510,7 @@ inline QDebug operator<< (QDebug d, const QCPVector2D &vec) /* including file 'src/painter.h' */ -/* modified 2021-03-29T02:30:44, size 4035 */ +/* modified 2022-11-06T12:45:56, size 4035 */ class QCP_LIB_DECL QCPPainter : public QPainter { @@ -534,7 +569,7 @@ Q_DECLARE_METATYPE(QCPPainter::PainterMode) /* including file 'src/paintbuffer.h' */ -/* modified 2021-03-29T02:30:44, size 5006 */ +/* modified 2022-11-06T12:45:56, size 5006 */ class QCP_LIB_DECL QCPAbstractPaintBuffer { @@ -642,7 +677,7 @@ class QCP_LIB_DECL QCPPaintBufferGlFbo : public QCPAbstractPaintBuffer /* including file 'src/layer.h' */ -/* modified 2021-03-29T02:30:44, size 7038 */ +/* modified 2022-11-06T12:45:56, size 7038 */ class QCP_LIB_DECL QCPLayer : public QObject { @@ -791,7 +826,7 @@ class QCP_LIB_DECL QCPLayerable : public QObject /* including file 'src/axis/range.h' */ -/* modified 2021-03-29T02:30:44, size 5280 */ +/* modified 2022-11-06T12:45:56, size 5280 */ class QCP_LIB_DECL QCPRange { @@ -909,7 +944,7 @@ inline const QCPRange operator/(const QCPRange& range, double value) /* including file 'src/selection.h' */ -/* modified 2021-03-29T02:30:44, size 8569 */ +/* modified 2022-11-06T12:45:56, size 8569 */ class QCP_LIB_DECL QCPDataRange { @@ -1113,7 +1148,7 @@ inline QDebug operator<< (QDebug d, const QCPDataSelection &selection) /* including file 'src/selectionrect.h' */ -/* modified 2021-03-29T02:30:44, size 3354 */ +/* modified 2022-11-06T12:45:56, size 3354 */ class QCP_LIB_DECL QCPSelectionRect : public QCPLayerable { @@ -1167,7 +1202,7 @@ class QCP_LIB_DECL QCPSelectionRect : public QCPLayerable /* including file 'src/layout.h' */ -/* modified 2021-03-29T02:30:44, size 14279 */ +/* modified 2022-11-06T12:45:56, size 14279 */ class QCP_LIB_DECL QCPMarginGroup : public QObject { @@ -1488,7 +1523,7 @@ Q_DECLARE_METATYPE(QCPLayoutInset::InsetPlacement) /* including file 'src/lineending.h' */ -/* modified 2021-03-29T02:30:44, size 4426 */ +/* modified 2022-11-06T12:45:56, size 4426 */ class QCP_LIB_DECL QCPLineEnding { @@ -1552,7 +1587,7 @@ Q_DECLARE_METATYPE(QCPLineEnding::EndingStyle) /* including file 'src/axis/labelpainter.h' */ -/* modified 2021-03-29T02:30:44, size 7086 */ +/* modified 2022-11-06T12:45:56, size 7086 */ class QCPLabelPainterPrivate { @@ -1692,7 +1727,7 @@ Q_DECLARE_METATYPE(QCPLabelPainterPrivate::AnchorSide) /* including file 'src/axis/axisticker.h' */ -/* modified 2021-03-29T02:30:44, size 4230 */ +/* modified 2022-11-06T12:45:56, size 4230 */ class QCP_LIB_DECL QCPAxisTicker { @@ -1757,7 +1792,7 @@ Q_DECLARE_METATYPE(QSharedPointer) /* including file 'src/axis/axistickerdatetime.h' */ -/* modified 2021-03-29T02:30:44, size 3600 */ +/* modified 2022-11-06T12:45:56, size 3600 */ class QCP_LIB_DECL QCPAxisTickerDateTime : public QCPAxisTicker { @@ -1806,7 +1841,7 @@ class QCP_LIB_DECL QCPAxisTickerDateTime : public QCPAxisTicker /* including file 'src/axis/axistickertime.h' */ -/* modified 2021-03-29T02:30:44, size 3542 */ +/* modified 2022-11-06T12:45:56, size 3542 */ class QCP_LIB_DECL QCPAxisTickerTime : public QCPAxisTicker { @@ -1858,7 +1893,7 @@ Q_DECLARE_METATYPE(QCPAxisTickerTime::TimeUnit) /* including file 'src/axis/axistickerfixed.h' */ -/* modified 2021-03-29T02:30:44, size 3308 */ +/* modified 2022-11-06T12:45:56, size 3308 */ class QCP_LIB_DECL QCPAxisTickerFixed : public QCPAxisTicker { @@ -1900,7 +1935,7 @@ Q_DECLARE_METATYPE(QCPAxisTickerFixed::ScaleStrategy) /* including file 'src/axis/axistickertext.h' */ -/* modified 2021-03-29T02:30:44, size 3090 */ +/* modified 2022-11-06T12:45:56, size 3090 */ class QCP_LIB_DECL QCPAxisTickerText : public QCPAxisTicker { @@ -1938,7 +1973,7 @@ class QCP_LIB_DECL QCPAxisTickerText : public QCPAxisTicker /* including file 'src/axis/axistickerpi.h' */ -/* modified 2021-03-29T02:30:44, size 3911 */ +/* modified 2022-11-06T12:45:56, size 3911 */ class QCP_LIB_DECL QCPAxisTickerPi : public QCPAxisTicker { @@ -1997,7 +2032,7 @@ Q_DECLARE_METATYPE(QCPAxisTickerPi::FractionStyle) /* including file 'src/axis/axistickerlog.h' */ -/* modified 2021-03-29T02:30:44, size 2594 */ +/* modified 2022-11-06T12:45:56, size 2594 */ class QCP_LIB_DECL QCPAxisTickerLog : public QCPAxisTicker { @@ -2029,7 +2064,7 @@ class QCP_LIB_DECL QCPAxisTickerLog : public QCPAxisTicker /* including file 'src/axis/axis.h' */ -/* modified 2021-03-29T02:30:44, size 20913 */ +/* modified 2022-11-06T12:45:56, size 20913 */ class QCP_LIB_DECL QCPGrid :public QCPLayerable { @@ -2457,7 +2492,7 @@ class QCPAxisPainterPrivate /* including file 'src/scatterstyle.h' */ -/* modified 2021-03-29T02:30:44, size 7275 */ +/* modified 2022-11-06T12:45:56, size 7275 */ class QCP_LIB_DECL QCPScatterStyle { @@ -2564,7 +2599,7 @@ Q_DECLARE_METATYPE(QCPScatterStyle::ScatterShape) /* including file 'src/datacontainer.h' */ -/* modified 2021-03-29T02:30:44, size 34070 */ +/* modified 2022-11-06T12:45:56, size 34305 */ /*! \relates QCPDataContainer Returns whether the sort key of \a a is less than the sort key of \a b. @@ -3233,6 +3268,8 @@ QCPRange QCPDataContainer::keyRange(bool &foundRange, QCP::SignDomain output parameter \a foundRange indicates whether a sensible range was found. If this is false, you should not use the returned QCPRange (e.g. the data container is empty or all points have the same value). + + Inf and -Inf data values are ignored. If \a inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys. @@ -3270,12 +3307,12 @@ QCPRange QCPDataContainer::valueRange(bool &foundRange, QCP::SignDomai if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper)) continue; current = it->valueRange(); - if ((current.lower < range.lower || !haveLower) && !qIsNaN(current.lower)) + if ((current.lower < range.lower || !haveLower) && !qIsNaN(current.lower) && std::isfinite(current.lower)) { range.lower = current.lower; haveLower = true; } - if ((current.upper > range.upper || !haveUpper) && !qIsNaN(current.upper)) + if ((current.upper > range.upper || !haveUpper) && !qIsNaN(current.upper) && std::isfinite(current.upper)) { range.upper = current.upper; haveUpper = true; @@ -3288,12 +3325,12 @@ QCPRange QCPDataContainer::valueRange(bool &foundRange, QCP::SignDomai if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper)) continue; current = it->valueRange(); - if ((current.lower < range.lower || !haveLower) && current.lower < 0 && !qIsNaN(current.lower)) + if ((current.lower < range.lower || !haveLower) && current.lower < 0 && !qIsNaN(current.lower) && std::isfinite(current.lower)) { range.lower = current.lower; haveLower = true; } - if ((current.upper > range.upper || !haveUpper) && current.upper < 0 && !qIsNaN(current.upper)) + if ((current.upper > range.upper || !haveUpper) && current.upper < 0 && !qIsNaN(current.upper) && std::isfinite(current.upper)) { range.upper = current.upper; haveUpper = true; @@ -3306,12 +3343,12 @@ QCPRange QCPDataContainer::valueRange(bool &foundRange, QCP::SignDomai if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper)) continue; current = it->valueRange(); - if ((current.lower < range.lower || !haveLower) && current.lower > 0 && !qIsNaN(current.lower)) + if ((current.lower < range.lower || !haveLower) && current.lower > 0 && !qIsNaN(current.lower) && std::isfinite(current.lower)) { range.lower = current.lower; haveLower = true; } - if ((current.upper > range.upper || !haveUpper) && current.upper > 0 && !qIsNaN(current.upper)) + if ((current.upper > range.upper || !haveUpper) && current.upper > 0 && !qIsNaN(current.upper) && std::isfinite(current.upper)) { range.upper = current.upper; haveUpper = true; @@ -3406,7 +3443,7 @@ void QCPDataContainer::performAutoSqueeze() /* including file 'src/plottable.h' */ -/* modified 2021-03-29T02:30:44, size 8461 */ +/* modified 2022-11-06T12:45:56, size 8461 */ class QCP_LIB_DECL QCPSelectionDecorator { @@ -3563,7 +3600,7 @@ class QCP_LIB_DECL QCPAbstractPlottable : public QCPLayerable /* including file 'src/item.h' */ -/* modified 2021-03-29T02:30:44, size 9425 */ +/* modified 2022-11-06T12:45:56, size 9425 */ class QCP_LIB_DECL QCPItemAnchor { @@ -3748,7 +3785,7 @@ class QCP_LIB_DECL QCPAbstractItem : public QCPLayerable /* including file 'src/core.h' */ -/* modified 2021-03-29T02:30:44, size 19304 */ +/* modified 2022-11-06T12:45:56, size 19304 */ class QCP_LIB_DECL QCustomPlot : public QWidget { @@ -4118,7 +4155,7 @@ ItemType *QCustomPlot::itemAt(const QPointF &pos, bool onlySelectable) const /* including file 'src/plottable1d.h' */ -/* modified 2021-03-29T02:30:44, size 25638 */ +/* modified 2022-11-06T12:45:56, size 25638 */ class QCPPlottableInterface1D { @@ -4710,7 +4747,7 @@ void QCPAbstractPlottable1D::drawPolyline(QCPPainter *painter, const Q /* including file 'src/colorgradient.h' */ -/* modified 2021-03-29T02:30:44, size 7262 */ +/* modified 2022-11-06T12:45:56, size 7262 */ class QCP_LIB_DECL QCPColorGradient { @@ -4813,7 +4850,7 @@ Q_DECLARE_METATYPE(QCPColorGradient::GradientPreset) /* including file 'src/selectiondecorator-bracket.h' */ -/* modified 2021-03-29T02:30:44, size 4458 */ +/* modified 2022-11-06T12:45:56, size 4458 */ class QCP_LIB_DECL QCPSelectionDecoratorBracket : public QCPSelectionDecorator { @@ -4882,7 +4919,7 @@ Q_DECLARE_METATYPE(QCPSelectionDecoratorBracket::BracketStyle) /* including file 'src/layoutelements/layoutelement-axisrect.h' */ -/* modified 2021-03-29T02:30:44, size 7529 */ +/* modified 2022-11-06T12:45:56, size 7529 */ class QCP_LIB_DECL QCPAxisRect : public QCPLayoutElement { @@ -5008,7 +5045,7 @@ class QCP_LIB_DECL QCPAxisRect : public QCPLayoutElement /* including file 'src/layoutelements/layoutelement-legend.h' */ -/* modified 2021-03-29T02:30:44, size 10425 */ +/* modified 2022-11-06T12:45:56, size 10425 */ class QCP_LIB_DECL QCPAbstractLegendItem : public QCPLayoutElement { @@ -5226,7 +5263,7 @@ Q_DECLARE_METATYPE(QCPLegend::SelectablePart) /* including file 'src/layoutelements/layoutelement-textelement.h' */ -/* modified 2021-03-29T02:30:44, size 5359 */ +/* modified 2022-11-06T12:45:56, size 5359 */ class QCP_LIB_DECL QCPTextElement : public QCPLayoutElement { @@ -5313,7 +5350,7 @@ class QCP_LIB_DECL QCPTextElement : public QCPLayoutElement /* including file 'src/layoutelements/layoutelement-colorscale.h' */ -/* modified 2021-03-29T02:30:44, size 5939 */ +/* modified 2022-11-06T12:45:56, size 5939 */ class QCPColorScaleAxisRectPrivate : public QCPAxisRect @@ -5421,7 +5458,7 @@ class QCP_LIB_DECL QCPColorScale : public QCPLayoutElement /* including file 'src/plottables/plottable-graph.h' */ -/* modified 2021-03-29T02:30:44, size 9316 */ +/* modified 2022-11-06T12:45:56, size 9316 */ class QCP_LIB_DECL QCPGraphData { @@ -5560,7 +5597,7 @@ Q_DECLARE_METATYPE(QCPGraph::LineStyle) /* including file 'src/plottables/plottable-curve.h' */ -/* modified 2021-03-29T02:30:44, size 7434 */ +/* modified 2022-11-06T12:45:56, size 7434 */ class QCP_LIB_DECL QCPCurveData { @@ -5675,7 +5712,7 @@ Q_DECLARE_METATYPE(QCPCurve::LineStyle) /* including file 'src/plottables/plottable-bars.h' */ -/* modified 2021-03-29T02:30:44, size 8955 */ +/* modified 2022-11-06T12:45:56, size 8955 */ class QCP_LIB_DECL QCPBarsGroup : public QObject { @@ -5863,7 +5900,7 @@ Q_DECLARE_METATYPE(QCPBars::WidthType) /* including file 'src/plottables/plottable-statisticalbox.h' */ -/* modified 2021-03-29T02:30:44, size 7522 */ +/* modified 2022-11-06T12:45:56, size 7522 */ class QCP_LIB_DECL QCPStatisticalBoxData { @@ -5980,7 +6017,7 @@ class QCP_LIB_DECL QCPStatisticalBox : public QCPAbstractPlottable1D Date: Thu, 22 Aug 2024 13:53:03 +0300 Subject: [PATCH 17/52] qhexedit internal: Add support for Qt5 and Qt6 --- libs/qhexedit/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/qhexedit/CMakeLists.txt b/libs/qhexedit/CMakeLists.txt index ebdfead13..53f939011 100644 --- a/libs/qhexedit/CMakeLists.txt +++ b/libs/qhexedit/CMakeLists.txt @@ -1,9 +1,11 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -find_package(Qt5 REQUIRED COMPONENTS Widgets) +set(QT_MAJOR Qt5 CACHE STRING "Major QT version") + +find_package(${QT_MAJOR} REQUIRED COMPONENTS Widgets) set(QHEXEDIT_SRC src/qhexedit.cpp @@ -23,6 +25,6 @@ set(QHEXEDIT_MOC_HDR add_library(qhexedit ${QHEXEDIT_SRC} ${QHEXEDIT_HDR} ${QHEXEDIT_MOC_HDR} ${QHEXEDIT_MOC}) target_include_directories(qhexedit INTERFACE src) -target_link_libraries(qhexedit Qt5::Widgets) +target_link_libraries(qhexedit ${QT_MAJOR}::Widgets) add_library(QHexEdit::QHexEdit ALIAS qhexedit) From 970ebc7928dd489f1b229b68a4097820c675ac56 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 13:55:09 +0300 Subject: [PATCH 18/52] qhexedit internal: replace obsolete method "width()" --- libs/qhexedit/src/qhexedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/qhexedit/src/qhexedit.cpp b/libs/qhexedit/src/qhexedit.cpp index 5ac480fb8..1909e69ca 100644 --- a/libs/qhexedit/src/qhexedit.cpp +++ b/libs/qhexedit/src/qhexedit.cpp @@ -432,7 +432,7 @@ QString QHexEdit::selectedData() void QHexEdit::setFont(const QFont &font) { QWidget::setFont(font); - _pxCharWidth = fontMetrics().width(QLatin1Char('2')); + _pxCharWidth = fontMetrics().horizontalAdvance(QLatin1Char('2')); _pxCharHeight = fontMetrics().height(); _pxGapAdr = _pxCharWidth / 2; _pxGapAdrHex = _pxCharWidth; From fc69efbc7dd9e94c4e01d4b59469435f7f2af6f1 Mon Sep 17 00:00:00 2001 From: Nikolay Zlatev Date: Thu, 22 Aug 2024 19:26:55 +0300 Subject: [PATCH 19/52] qscintilla: update to version 2.14.1 with Qt5Qt6 support --- libs/qscintilla_2.14.1/ChangeLog | 6853 ++++++++++++++ libs/qscintilla_2.14.1/LICENSE | 674 ++ libs/qscintilla_2.14.1/NEWS | 604 ++ libs/qscintilla_2.14.1/Qt5Qt6/CMakeLists.txt | 325 + libs/qscintilla_2.14.1/Qt5Qt6/InputMethod.cpp | 273 + libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.cpp | 367 + libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.h | 76 + .../Qt5Qt6/MacPasteboardMime.cpp | 111 + libs/qscintilla_2.14.1/Qt5Qt6/PlatQt.cpp | 990 ++ .../Qt5Qt6/Qsci/qsciabstractapis.h | 90 + libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciapis.h | 213 + .../Qt5Qt6/Qsci/qscicommand.h | 408 + .../Qt5Qt6/Qsci/qscicommandset.h | 89 + .../Qt5Qt6/Qsci/qscidocument.h | 61 + .../Qt5Qt6/Qsci/qsciglobal.h | 54 + .../qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexer.h | 356 + .../Qt5Qt6/Qsci/qscilexerasm.h | 201 + .../Qt5Qt6/Qsci/qscilexeravs.h | 174 + .../Qt5Qt6/Qsci/qscilexerbash.h | 178 + .../Qt5Qt6/Qsci/qscilexerbatch.h | 115 + .../Qt5Qt6/Qsci/qscilexercmake.h | 160 + .../Qt5Qt6/Qsci/qscilexercoffeescript.h | 264 + .../Qt5Qt6/Qsci/qscilexercpp.h | 398 + .../Qt5Qt6/Qsci/qscilexercsharp.h | 77 + .../Qt5Qt6/Qsci/qscilexercss.h | 252 + .../Qt5Qt6/Qsci/qscilexercustom.h | 100 + .../Qt5Qt6/Qsci/qscilexerd.h | 242 + .../Qt5Qt6/Qsci/qscilexerdiff.h | 107 + .../Qt5Qt6/Qsci/qscilexeredifact.h | 96 + .../Qt5Qt6/Qsci/qscilexerfortran.h | 59 + .../Qt5Qt6/Qsci/qscilexerfortran77.h | 168 + .../Qt5Qt6/Qsci/qscilexerhex.h | 120 + .../Qt5Qt6/Qsci/qscilexerhtml.h | 532 ++ .../Qt5Qt6/Qsci/qscilexeridl.h | 64 + .../Qt5Qt6/Qsci/qscilexerintelhex.h | 60 + .../Qt5Qt6/Qsci/qscilexerjava.h | 55 + .../Qt5Qt6/Qsci/qscilexerjavascript.h | 81 + .../Qt5Qt6/Qsci/qscilexerjson.h | 184 + .../Qt5Qt6/Qsci/qscilexerlua.h | 194 + .../Qt5Qt6/Qsci/qscilexermakefile.h | 105 + .../Qt5Qt6/Qsci/qscilexermarkdown.h | 148 + .../Qt5Qt6/Qsci/qscilexermasm.h | 54 + .../Qt5Qt6/Qsci/qscilexermatlab.h | 104 + .../Qt5Qt6/Qsci/qscilexernasm.h | 54 + .../Qt5Qt6/Qsci/qscilexeroctave.h | 60 + .../Qt5Qt6/Qsci/qscilexerpascal.h | 227 + .../Qt5Qt6/Qsci/qscilexerperl.h | 312 + .../Qt5Qt6/Qsci/qscilexerpo.h | 163 + .../Qt5Qt6/Qsci/qscilexerpostscript.h | 204 + .../Qt5Qt6/Qsci/qscilexerpov.h | 203 + .../Qt5Qt6/Qsci/qscilexerproperties.h | 150 + .../Qt5Qt6/Qsci/qscilexerpython.h | 333 + .../Qt5Qt6/Qsci/qscilexerruby.h | 240 + .../Qt5Qt6/Qsci/qscilexerspice.h | 106 + .../Qt5Qt6/Qsci/qscilexersql.h | 286 + .../Qt5Qt6/Qsci/qscilexersrec.h | 59 + .../Qt5Qt6/Qsci/qscilexertcl.h | 189 + .../Qt5Qt6/Qsci/qscilexertekhex.h | 60 + .../Qt5Qt6/Qsci/qscilexertex.h | 163 + .../Qt5Qt6/Qsci/qscilexerverilog.h | 257 + .../Qt5Qt6/Qsci/qscilexervhdl.h | 221 + .../Qt5Qt6/Qsci/qscilexerxml.h | 106 + .../Qt5Qt6/Qsci/qscilexeryaml.h | 147 + .../qscintilla_2.14.1/Qt5Qt6/Qsci/qscimacro.h | 98 + .../Qt5Qt6/Qsci/qsciprinter.h | 120 + .../Qt5Qt6/Qsci/qsciscintilla.h | 2313 +++++ .../Qt5Qt6/Qsci/qsciscintillabase.h | 3888 ++++++++ .../qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyle.h | 204 + .../Qt5Qt6/Qsci/qscistyledtext.h | 61 + .../Qt5Qt6/SciAccessibility.cpp | 739 ++ .../Qt5Qt6/SciAccessibility.h | 119 + libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.cpp | 189 + libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.h | 103 + libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.cpp | 768 ++ libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.h | 151 + .../Qt5Qt6/features/qscintilla2.prf | 25 + .../Qt5Qt6/features_staticlib/qscintilla2.prf | 23 + .../Qt5Qt6/qsciabstractapis.cpp | 51 + libs/qscintilla_2.14.1/Qt5Qt6/qsciapis.cpp | 995 ++ libs/qscintilla_2.14.1/Qt5Qt6/qscicommand.cpp | 143 + .../Qt5Qt6/qscicommandset.cpp | 987 ++ .../qscintilla_2.14.1/Qt5Qt6/qscidocument.cpp | 151 + libs/qscintilla_2.14.1/Qt5Qt6/qscilexer.cpp | 749 ++ .../qscintilla_2.14.1/Qt5Qt6/qscilexerasm.cpp | 575 ++ .../qscintilla_2.14.1/Qt5Qt6/qscilexeravs.cpp | 414 + .../Qt5Qt6/qscilexerbash.cpp | 350 + .../Qt5Qt6/qscilexerbatch.cpp | 212 + .../Qt5Qt6/qscilexercmake.cpp | 304 + .../Qt5Qt6/qscilexercoffeescript.cpp | 454 + .../qscintilla_2.14.1/Qt5Qt6/qscilexercpp.cpp | 801 ++ .../Qt5Qt6/qscilexercsharp.cpp | 118 + .../qscintilla_2.14.1/Qt5Qt6/qscilexercss.cpp | 440 + .../Qt5Qt6/qscilexercustom.cpp | 101 + libs/qscintilla_2.14.1/Qt5Qt6/qscilexerd.cpp | 450 + .../Qt5Qt6/qscilexerdiff.cpp | 143 + .../Qt5Qt6/qscilexeredifact.cpp | 122 + .../Qt5Qt6/qscilexerfortran.cpp | 109 + .../Qt5Qt6/qscilexerfortran77.cpp | 296 + .../qscintilla_2.14.1/Qt5Qt6/qscilexerhex.cpp | 156 + .../Qt5Qt6/qscilexerhtml.cpp | 1181 +++ .../qscintilla_2.14.1/Qt5Qt6/qscilexeridl.cpp | 100 + .../Qt5Qt6/qscilexerintelhex.cpp | 59 + .../Qt5Qt6/qscilexerjava.cpp | 57 + .../Qt5Qt6/qscilexerjavascript.cpp | 120 + .../Qt5Qt6/qscilexerjson.cpp | 298 + .../qscintilla_2.14.1/Qt5Qt6/qscilexerlua.cpp | 368 + .../Qt5Qt6/qscilexermakefile.cpp | 158 + .../Qt5Qt6/qscilexermarkdown.cpp | 289 + .../Qt5Qt6/qscilexermasm.cpp | 48 + .../Qt5Qt6/qscilexermatlab.cpp | 161 + .../Qt5Qt6/qscilexernasm.cpp | 48 + .../Qt5Qt6/qscilexeroctave.cpp | 68 + .../Qt5Qt6/qscilexerpascal.cpp | 432 + .../Qt5Qt6/qscilexerperl.cpp | 658 ++ libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpo.cpp | 223 + .../Qt5Qt6/qscilexerpostscript.cpp | 448 + .../qscintilla_2.14.1/Qt5Qt6/qscilexerpov.cpp | 464 + .../Qt5Qt6/qscilexerproperties.cpp | 213 + .../Qt5Qt6/qscilexerpython.cpp | 507 + .../Qt5Qt6/qscilexerruby.cpp | 445 + .../Qt5Qt6/qscilexerspice.cpp | 194 + .../qscintilla_2.14.1/Qt5Qt6/qscilexersql.cpp | 521 ++ .../Qt5Qt6/qscilexersrec.cpp | 62 + .../qscintilla_2.14.1/Qt5Qt6/qscilexertcl.cpp | 438 + .../Qt5Qt6/qscilexertekhex.cpp | 59 + .../qscintilla_2.14.1/Qt5Qt6/qscilexertex.cpp | 308 + .../Qt5Qt6/qscilexerverilog.cpp | 572 ++ .../Qt5Qt6/qscilexervhdl.cpp | 418 + .../qscintilla_2.14.1/Qt5Qt6/qscilexerxml.cpp | 252 + .../Qt5Qt6/qscilexeryaml.cpp | 269 + libs/qscintilla_2.14.1/Qt5Qt6/qscimacro.cpp | 313 + libs/qscintilla_2.14.1/Qt5Qt6/qscintilla.pro | 445 + .../qscintilla_2.14.1/Qt5Qt6/qscintilla_cs.qm | Bin 0 -> 44424 bytes .../qscintilla_2.14.1/Qt5Qt6/qscintilla_cs.ts | 4227 +++++++++ .../qscintilla_2.14.1/Qt5Qt6/qscintilla_de.qm | Bin 0 -> 82744 bytes .../qscintilla_2.14.1/Qt5Qt6/qscintilla_de.ts | 4227 +++++++++ .../qscintilla_2.14.1/Qt5Qt6/qscintilla_es.qm | Bin 0 -> 81850 bytes .../qscintilla_2.14.1/Qt5Qt6/qscintilla_es.ts | 4227 +++++++++ .../qscintilla_2.14.1/Qt5Qt6/qscintilla_fr.qm | Bin 0 -> 53842 bytes .../qscintilla_2.14.1/Qt5Qt6/qscintilla_fr.ts | 4227 +++++++++ .../Qt5Qt6/qscintilla_pt_br.qm | Bin 0 -> 49459 bytes .../Qt5Qt6/qscintilla_pt_br.ts | 4227 +++++++++ libs/qscintilla_2.14.1/Qt5Qt6/qsciprinter.cpp | 196 + .../Qt5Qt6/qsciscintilla.cpp | 4569 +++++++++ .../Qt5Qt6/qsciscintillabase.cpp | 867 ++ libs/qscintilla_2.14.1/Qt5Qt6/qscistyle.cpp | 184 + .../Qt5Qt6/qscistyledtext.cpp | 54 + .../scintilla/include/ILexer.h | 90 + .../scintilla/include/ILoader.h | 21 + .../scintilla/include/License.txt | 20 + .../scintilla/include/Platform.h | 553 ++ .../scintilla/include/SciLexer.h | 1861 ++++ .../scintilla/include/Sci_Position.h | 29 + .../scintilla/include/Scintilla.h | 1239 +++ .../scintilla/include/Scintilla.iface | 4990 ++++++++++ .../scintilla/include/ScintillaWidget.h | 72 + .../scintilla/lexers/LexA68k.cpp | 345 + .../scintilla/lexers/LexAPDL.cpp | 257 + .../scintilla/lexers/LexASY.cpp | 269 + .../scintilla/lexers/LexAU3.cpp | 908 ++ .../scintilla/lexers/LexAVE.cpp | 229 + .../scintilla/lexers/LexAVS.cpp | 291 + .../scintilla/lexers/LexAbaqus.cpp | 603 ++ .../scintilla/lexers/LexAda.cpp | 513 + .../scintilla/lexers/LexAsm.cpp | 466 + .../scintilla/lexers/LexAsn1.cpp | 186 + .../scintilla/lexers/LexBaan.cpp | 988 ++ .../scintilla/lexers/LexBash.cpp | 907 ++ .../scintilla/lexers/LexBasic.cpp | 565 ++ .../scintilla/lexers/LexBatch.cpp | 498 + .../scintilla/lexers/LexBibTeX.cpp | 308 + .../scintilla/lexers/LexBullant.cpp | 231 + .../scintilla/lexers/LexCLW.cpp | 680 ++ .../scintilla/lexers/LexCOBOL.cpp | 379 + .../scintilla/lexers/LexCPP.cpp | 1725 ++++ .../scintilla/lexers/LexCSS.cpp | 567 ++ .../scintilla/lexers/LexCaml.cpp | 460 + .../scintilla/lexers/LexCmake.cpp | 455 + .../scintilla/lexers/LexCoffeeScript.cpp | 483 + .../scintilla/lexers/LexConf.cpp | 190 + .../scintilla/lexers/LexCrontab.cpp | 224 + .../scintilla/lexers/LexCsound.cpp | 212 + .../scintilla/lexers/LexD.cpp | 567 ++ .../scintilla/lexers/LexDMAP.cpp | 226 + .../scintilla/lexers/LexDMIS.cpp | 354 + .../scintilla/lexers/LexDiff.cpp | 161 + .../scintilla/lexers/LexECL.cpp | 519 ++ .../scintilla/lexers/LexEDIFACT.cpp | 336 + .../scintilla/lexers/LexEScript.cpp | 274 + .../scintilla/lexers/LexEiffel.cpp | 239 + .../scintilla/lexers/LexErlang.cpp | 624 ++ .../scintilla/lexers/LexErrorList.cpp | 393 + .../scintilla/lexers/LexFlagship.cpp | 352 + .../scintilla/lexers/LexForth.cpp | 168 + .../scintilla/lexers/LexFortran.cpp | 721 ++ .../scintilla/lexers/LexGAP.cpp | 264 + .../scintilla/lexers/LexGui4Cli.cpp | 311 + .../scintilla/lexers/LexHTML.cpp | 2469 +++++ .../scintilla/lexers/LexHaskell.cpp | 1110 +++ .../scintilla/lexers/LexHex.cpp | 1045 +++ .../scintilla/lexers/LexIndent.cpp | 71 + .../scintilla/lexers/LexInno.cpp | 288 + .../scintilla/lexers/LexJSON.cpp | 498 + .../scintilla/lexers/LexKVIrc.cpp | 471 + .../scintilla/lexers/LexKix.cpp | 134 + .../scintilla/lexers/LexLPeg.cpp | 799 ++ .../scintilla/lexers/LexLaTeX.cpp | 538 ++ .../scintilla/lexers/LexLisp.cpp | 283 + .../scintilla/lexers/LexLout.cpp | 213 + .../scintilla/lexers/LexLua.cpp | 502 + .../scintilla/lexers/LexMMIXAL.cpp | 188 + .../scintilla/lexers/LexMPT.cpp | 191 + .../scintilla/lexers/LexMSSQL.cpp | 352 + .../scintilla/lexers/LexMagik.cpp | 446 + .../scintilla/lexers/LexMake.cpp | 142 + .../scintilla/lexers/LexMarkdown.cpp | 419 + .../scintilla/lexers/LexMatlab.cpp | 389 + .../scintilla/lexers/LexMaxima.cpp | 222 + .../scintilla/lexers/LexMetapost.cpp | 400 + .../scintilla/lexers/LexModula.cpp | 741 ++ .../scintilla/lexers/LexMySQL.cpp | 574 ++ .../scintilla/lexers/LexNimrod.cpp | 431 + .../scintilla/lexers/LexNsis.cpp | 660 ++ .../scintilla/lexers/LexNull.cpp | 38 + .../scintilla/lexers/LexOScript.cpp | 546 ++ .../scintilla/lexers/LexOpal.cpp | 523 ++ .../scintilla/lexers/LexPB.cpp | 363 + .../scintilla/lexers/LexPLM.cpp | 199 + .../scintilla/lexers/LexPO.cpp | 211 + .../scintilla/lexers/LexPOV.cpp | 317 + .../scintilla/lexers/LexPS.cpp | 331 + .../scintilla/lexers/LexPascal.cpp | 613 ++ .../scintilla/lexers/LexPerl.cpp | 1811 ++++ .../scintilla/lexers/LexPowerPro.cpp | 628 ++ .../scintilla/lexers/LexPowerShell.cpp | 252 + .../scintilla/lexers/LexProgress.cpp | 564 ++ .../scintilla/lexers/LexProps.cpp | 187 + .../scintilla/lexers/LexPython.cpp | 984 ++ .../scintilla/lexers/LexR.cpp | 214 + .../scintilla/lexers/LexRebol.cpp | 323 + .../scintilla/lexers/LexRegistry.cpp | 415 + .../scintilla/lexers/LexRuby.cpp | 1879 ++++ .../scintilla/lexers/LexRust.cpp | 839 ++ .../scintilla/lexers/LexSAS.cpp | 220 + .../scintilla/lexers/LexSML.cpp | 226 + .../scintilla/lexers/LexSQL.cpp | 967 ++ .../scintilla/lexers/LexSTTXT.cpp | 404 + .../scintilla/lexers/LexScriptol.cpp | 379 + .../scintilla/lexers/LexSmalltalk.cpp | 324 + .../scintilla/lexers/LexSorcus.cpp | 206 + .../scintilla/lexers/LexSpecman.cpp | 290 + .../scintilla/lexers/LexSpice.cpp | 204 + .../scintilla/lexers/LexStata.cpp | 203 + .../scintilla/lexers/LexTACL.cpp | 398 + .../scintilla/lexers/LexTADS3.cpp | 901 ++ .../scintilla/lexers/LexTAL.cpp | 397 + .../scintilla/lexers/LexTCL.cpp | 368 + .../scintilla/lexers/LexTCMD.cpp | 504 + .../scintilla/lexers/LexTeX.cpp | 495 + .../scintilla/lexers/LexTxt2tags.cpp | 478 + .../scintilla/lexers/LexVB.cpp | 317 + .../scintilla/lexers/LexVHDL.cpp | 585 ++ .../scintilla/lexers/LexVerilog.cpp | 1077 +++ .../scintilla/lexers/LexVisualProlog.cpp | 510 + .../scintilla/lexers/LexYAML.cpp | 351 + .../scintilla/lexers/License.txt | 20 + .../scintilla/lexlib/Accessor.cpp | 73 + .../scintilla/lexlib/Accessor.h | 31 + .../scintilla/lexlib/CharacterCategory.cpp | 3966 ++++++++ .../scintilla/lexlib/CharacterCategory.h | 33 + .../scintilla/lexlib/CharacterSet.cpp | 52 + .../scintilla/lexlib/CharacterSet.h | 194 + .../scintilla/lexlib/DefaultLexer.cpp | 125 + .../scintilla/lexlib/DefaultLexer.h | 51 + .../scintilla/lexlib/LexAccessor.h | 208 + .../scintilla/lexlib/LexerBase.cpp | 144 + .../scintilla/lexlib/LexerBase.h | 53 + .../scintilla/lexlib/LexerModule.cpp | 126 + .../scintilla/lexlib/LexerModule.h | 87 + .../scintilla/lexlib/LexerNoExceptions.cpp | 62 + .../scintilla/lexlib/LexerNoExceptions.h | 28 + .../scintilla/lexlib/LexerSimple.cpp | 53 + .../scintilla/lexlib/LexerSimple.h | 26 + .../scintilla/lexlib/License.txt | 20 + .../scintilla/lexlib/OptionSet.h | 138 + .../scintilla/lexlib/PropSetSimple.cpp | 157 + .../scintilla/lexlib/PropSetSimple.h | 28 + .../scintilla/lexlib/SparseState.h | 106 + .../scintilla/lexlib/StringCopy.h | 32 + .../scintilla/lexlib/StyleContext.cpp | 69 + .../scintilla/lexlib/StyleContext.h | 212 + .../scintilla/lexlib/SubStyles.h | 196 + .../scintilla/lexlib/WordList.cpp | 295 + .../scintilla/lexlib/WordList.h | 38 + .../scintilla/src/AutoComplete.cpp | 293 + .../scintilla/src/AutoComplete.h | 91 + .../scintilla/src/CallTip.cpp | 332 + .../qscintilla_2.14.1/scintilla/src/CallTip.h | 91 + .../scintilla/src/CaseConvert.cpp | 819 ++ .../scintilla/src/CaseConvert.h | 46 + .../scintilla/src/CaseFolder.cpp | 66 + .../scintilla/src/CaseFolder.h | 41 + .../scintilla/src/Catalogue.cpp | 204 + .../scintilla/src/Catalogue.h | 24 + .../scintilla/src/CellBuffer.cpp | 1204 +++ .../scintilla/src/CellBuffer.h | 215 + .../scintilla/src/CharClassify.cpp | 59 + .../scintilla/src/CharClassify.h | 31 + .../scintilla/src/ContractionState.cpp | 418 + .../scintilla/src/ContractionState.h | 52 + libs/qscintilla_2.14.1/scintilla/src/DBCS.cpp | 42 + libs/qscintilla_2.14.1/scintilla/src/DBCS.h | 17 + .../scintilla/src/Decoration.cpp | 316 + .../scintilla/src/Decoration.h | 59 + .../scintilla/src/Document.cpp | 3250 +++++++ .../scintilla/src/Document.h | 584 ++ .../scintilla/src/EditModel.cpp | 77 + .../scintilla/src/EditModel.h | 68 + .../scintilla/src/EditView.cpp | 2403 +++++ .../scintilla/src/EditView.h | 186 + .../scintilla/src/Editor.cpp | 8234 +++++++++++++++++ libs/qscintilla_2.14.1/scintilla/src/Editor.h | 650 ++ .../scintilla/src/ElapsedPeriod.h | 35 + .../scintilla/src/ExternalLexer.cpp | 135 + .../scintilla/src/ExternalLexer.h | 80 + .../scintilla/src/FontQuality.h | 27 + .../scintilla/src/Indicator.cpp | 223 + .../scintilla/src/Indicator.h | 56 + .../scintilla/src/IntegerRectangle.h | 29 + .../scintilla/src/KeyMap.cpp | 164 + libs/qscintilla_2.14.1/scintilla/src/KeyMap.h | 64 + .../scintilla/src/License.txt | 20 + .../scintilla/src/LineMarker.cpp | 436 + .../scintilla/src/LineMarker.h | 48 + .../scintilla/src/MarginView.cpp | 470 + .../scintilla/src/MarginView.h | 46 + .../scintilla/src/Partitioning.h | 204 + .../scintilla/src/PerLine.cpp | 499 + .../qscintilla_2.14.1/scintilla/src/PerLine.h | 164 + .../scintilla/src/Position.h | 31 + .../scintilla/src/PositionCache.cpp | 719 ++ .../scintilla/src/PositionCache.h | 247 + .../scintilla/src/RESearch.cpp | 960 ++ .../scintilla/src/RESearch.h | 70 + .../scintilla/src/RunStyles.cpp | 314 + .../scintilla/src/RunStyles.h | 64 + .../scintilla/src/SciTE.properties | 6 + .../scintilla/src/ScintillaBase.cpp | 1165 +++ .../scintilla/src/ScintillaBase.h | 103 + .../scintilla/src/Selection.cpp | 436 + .../scintilla/src/Selection.h | 192 + .../scintilla/src/SparseVector.h | 156 + .../scintilla/src/SplitVector.h | 332 + .../qscintilla_2.14.1/scintilla/src/Style.cpp | 168 + libs/qscintilla_2.14.1/scintilla/src/Style.h | 92 + .../scintilla/src/UniConversion.cpp | 368 + .../scintilla/src/UniConversion.h | 86 + .../scintilla/src/UniqueString.h | 30 + .../scintilla/src/ViewStyle.cpp | 613 ++ .../scintilla/src/ViewStyle.h | 224 + libs/qscintilla_2.14.1/scintilla/src/XPM.cpp | 448 + libs/qscintilla_2.14.1/scintilla/src/XPM.h | 130 + 362 files changed, 171588 insertions(+) create mode 100644 libs/qscintilla_2.14.1/ChangeLog create mode 100644 libs/qscintilla_2.14.1/LICENSE create mode 100644 libs/qscintilla_2.14.1/NEWS create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/CMakeLists.txt create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/InputMethod.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/MacPasteboardMime.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/PlatQt.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciabstractapis.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciapis.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommand.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommandset.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscidocument.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciglobal.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexer.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerasm.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeravs.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbash.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbatch.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercmake.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercoffeescript.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercpp.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercsharp.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercss.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercustom.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerd.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerdiff.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeredifact.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran77.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhex.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhtml.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeridl.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerintelhex.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjava.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjavascript.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjson.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerlua.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermakefile.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermarkdown.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermasm.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermatlab.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexernasm.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeroctave.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpascal.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerperl.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpo.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpostscript.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpov.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerproperties.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpython.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerruby.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerspice.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersql.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersrec.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertcl.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertekhex.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertex.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerverilog.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexervhdl.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerxml.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeryaml.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscimacro.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciprinter.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintilla.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintillabase.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyle.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyledtext.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.h create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/features/qscintilla2.prf create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/features_staticlib/qscintilla2.prf create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qsciabstractapis.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qsciapis.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscicommand.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscicommandset.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscidocument.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexer.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerasm.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexeravs.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbash.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbatch.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexercmake.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexercoffeescript.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexercpp.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexercsharp.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexercss.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexercustom.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerd.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerdiff.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexeredifact.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran77.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhex.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhtml.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexeridl.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerintelhex.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjava.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjavascript.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjson.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerlua.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexermakefile.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexermarkdown.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexermasm.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexermatlab.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexernasm.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexeroctave.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpascal.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerperl.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpo.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpostscript.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpov.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerproperties.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpython.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerruby.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerspice.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexersql.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexersrec.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexertcl.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexertekhex.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexertex.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerverilog.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexervhdl.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexerxml.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscilexeryaml.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscimacro.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla.pro create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_cs.qm create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_cs.ts create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_de.qm create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_de.ts create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.qm create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.ts create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_fr.qm create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_fr.ts create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.qm create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.ts create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qsciprinter.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qsciscintilla.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qsciscintillabase.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscistyle.cpp create mode 100644 libs/qscintilla_2.14.1/Qt5Qt6/qscistyledtext.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/include/ILexer.h create mode 100644 libs/qscintilla_2.14.1/scintilla/include/ILoader.h create mode 100644 libs/qscintilla_2.14.1/scintilla/include/License.txt create mode 100644 libs/qscintilla_2.14.1/scintilla/include/Platform.h create mode 100644 libs/qscintilla_2.14.1/scintilla/include/SciLexer.h create mode 100644 libs/qscintilla_2.14.1/scintilla/include/Sci_Position.h create mode 100644 libs/qscintilla_2.14.1/scintilla/include/Scintilla.h create mode 100644 libs/qscintilla_2.14.1/scintilla/include/Scintilla.iface create mode 100644 libs/qscintilla_2.14.1/scintilla/include/ScintillaWidget.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexA68k.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAPDL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexASY.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAU3.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAVE.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAVS.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAbaqus.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAda.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAsm.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexAsn1.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexBaan.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexBash.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexBasic.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexBatch.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexBibTeX.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexBullant.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCLW.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCOBOL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCPP.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCSS.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCaml.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCmake.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCoffeeScript.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexConf.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCrontab.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexCsound.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexD.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexDMAP.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexDMIS.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexDiff.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexECL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexEDIFACT.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexEScript.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexEiffel.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexErlang.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexErrorList.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexFlagship.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexForth.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexFortran.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexGAP.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexGui4Cli.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexHTML.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexHaskell.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexHex.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexIndent.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexInno.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexJSON.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexKVIrc.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexKix.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexLPeg.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexLaTeX.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexLisp.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexLout.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexLua.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMMIXAL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMPT.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMSSQL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMagik.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMake.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMarkdown.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMatlab.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMaxima.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMetapost.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexModula.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexMySQL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexNimrod.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexNsis.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexNull.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexOScript.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexOpal.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPB.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPLM.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPO.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPOV.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPS.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPascal.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPerl.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPowerPro.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPowerShell.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexProgress.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexProps.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexPython.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexR.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexRebol.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexRegistry.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexRuby.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexRust.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSAS.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSML.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSQL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSTTXT.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexScriptol.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSmalltalk.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSorcus.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSpecman.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexSpice.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexStata.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTACL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTADS3.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTAL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTCL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTCMD.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTeX.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexTxt2tags.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexVB.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexVHDL.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexVerilog.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexVisualProlog.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/LexYAML.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexers/License.txt create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/Accessor.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/Accessor.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/CharacterCategory.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/CharacterCategory.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/CharacterSet.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/CharacterSet.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/DefaultLexer.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/DefaultLexer.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexAccessor.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerBase.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerBase.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerModule.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerModule.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerNoExceptions.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerNoExceptions.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerSimple.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/LexerSimple.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/License.txt create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/OptionSet.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/PropSetSimple.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/PropSetSimple.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/SparseState.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/StringCopy.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/StyleContext.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/StyleContext.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/SubStyles.h create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/WordList.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/lexlib/WordList.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/AutoComplete.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/AutoComplete.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CallTip.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CallTip.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CaseConvert.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CaseConvert.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CaseFolder.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CaseFolder.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Catalogue.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Catalogue.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CellBuffer.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CellBuffer.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CharClassify.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/CharClassify.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ContractionState.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ContractionState.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/DBCS.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/DBCS.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Decoration.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Decoration.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Document.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Document.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/EditModel.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/EditModel.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/EditView.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/EditView.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Editor.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Editor.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ElapsedPeriod.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ExternalLexer.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ExternalLexer.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/FontQuality.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Indicator.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Indicator.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/IntegerRectangle.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/KeyMap.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/KeyMap.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/License.txt create mode 100644 libs/qscintilla_2.14.1/scintilla/src/LineMarker.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/LineMarker.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/MarginView.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/MarginView.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Partitioning.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/PerLine.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/PerLine.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Position.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/PositionCache.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/PositionCache.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/RESearch.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/RESearch.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/RunStyles.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/RunStyles.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/SciTE.properties create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ScintillaBase.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ScintillaBase.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Selection.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Selection.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/SparseVector.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/SplitVector.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Style.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/Style.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/UniConversion.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/UniConversion.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/UniqueString.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ViewStyle.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/ViewStyle.h create mode 100644 libs/qscintilla_2.14.1/scintilla/src/XPM.cpp create mode 100644 libs/qscintilla_2.14.1/scintilla/src/XPM.h diff --git a/libs/qscintilla_2.14.1/ChangeLog b/libs/qscintilla_2.14.1/ChangeLog new file mode 100644 index 000000000..19a51c732 --- /dev/null +++ b/libs/qscintilla_2.14.1/ChangeLog @@ -0,0 +1,6853 @@ +2023-06-07 Phil Thompson + + * NEWS, Python/project.py: + Rolled back the explicit setting of the minimum GLIBC version now + that we have changed the build platform. + [4ea73206e689] [2.14.1] <2.14-maint> + +2023-05-22 Phil Thompson + + * NEWS, qt/InputMethod.cpp, qt/qscintilla.pro: + Fixed a pointer truncation in the handling of input method queries. + [e3a47ebe8c93] <2.14-maint> + +2023-05-14 Phil Thompson + + * NEWS, Python/project.py: + Fixed the manylinux wheel tag when building on Ubuntu 22.04. + [77c97572f18c] <2.14-maint> + +2023-04-27 Phil Thompson + + * .hgtags: + Added tag 2.14.0 for changeset b748338e45bb + [670c1fb1beeb] + +2023-04-24 Phil Thompson + + * NEWS, qt/qsciscintilla.cpp: + Fixed a regression in QSciScintilla::text(). + [b748338e45bb] [2.14.0] + +2023-04-20 Phil Thompson + + * qt/qsciscintilla.cpp: + Use SCI_ADDTEXT rather than SCI_SETTEXT to set the text so tht + embedded zero bytes can be loaded. + [774bcbca48b9] + + * NEWS, qt/InputMethod.cpp, qt/SciAccessibility.cpp, + qt/SciAccessibility.h, qt/qscilexer.cpp, qt/qscilexer.h, + qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Refactored the conversions from bytes to a QString to allow for + embedded zero bytes and to remove duplicated code. + [c8eb0d943c07] + +2023-03-31 Phil Thompson + + * NEWS, qt/qscintilla_cs.ts, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Fixed the .ts files. + [5d000fe9301e] + +2023-03-28 Phil Thompson + + * Python/sip/qscilexerasm.sip, Python/sip/qscilexermasm.sip, + Python/sip/qscilexernasm.sip, Python/sip/qscimodcommon.sip, + Python/sip/qsciscintillabase.sip: + Implemented the Python wrappers for the assembler lexers. + [0030fcf7a208] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Updated the translation source files. + [0fb2491bb039] + + * qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerasm.cpp, + qt/qscilexerasm.h, qt/qsciscintillabase.h: + Completed the implementation of the assember lexers. Note we choose + not to support explicit fold points. + [629503d9342b] + + * NEWS, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Removed a Qt4 compatibility macro. + [4b23653f3e5c] + + * qt/qscilexerasm.cpp, qt/qscilexerasm.h: + Added the support for compact and multi-line comment folding to + QsciLexerAsm. + [708bed0e9e2d] + +2023-03-27 Phil Thompson + + * NEWS, qt/qscilexerasm.cpp, qt/qscilexerasm.h, + qt/qscilexerintelhex.cpp, qt/qscilexermasm.cpp, qt/qscilexermasm.h, + qt/qscilexernasm.cpp, qt/qscilexernasm.h, qt/qscilexertekhex.cpp, + qt/qscintilla.pro: + Initial implementation of the QsciLexerAsm, QsciLexerMASM and + QsciLexerNASM classes. + [f216dfe8a7a9] + +2023-03-26 Phil Thompson + + * Python/sip/qscilexerintelhex.sip, Python/sip/qscilexersrec.sip, + Python/sip/qscilexertekhex.sip, Python/sip/qscimodcommon.sip, + Python/sip/qsciscintillabase.sip: + Completed the new Python wrappers. + [9acd96c733d2] + + * Python/sip/qscilexerhex.sip, Python/sip/qscilexerintelhex.sip, + Python/sip/qscilexersrec.sip, Python/sip/qscilexertekhex.sip: + Added the Python bindings for the new lexer classes. + [7882938747c0] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Updated the translation source files. + [ee55692ee907] + + * NEWS, qt/qscilexerhex.cpp, qt/qscilexerhex.h, + qt/qscilexerintelhex.cpp, qt/qscilexerintelhex.h, + qt/qscilexersrec.cpp, qt/qscilexersrec.h, qt/qscilexertekhex.cpp, + qt/qscilexertekhex.h, qt/qscintilla.pro: + Added the QsciLexerHex, QsciLexerIntelHex, QsciLexerSRec and + QsciLexerTekHex classes. + [5e1cb8b52206] + + * Merged the 2.13-maint branch. + [a9480b2f6bdb] + +2023-03-02 Phil Thompson + + * NEWS, lexlib/LexAccessor.h: + Disabled an assert() in the lexer library as the following code + handles the case anyway. The real bug is probably in the HTML lexer + triggered when the HTML has embedded DTD. + [6452e3b634b6] <2.13-maint> + +2023-01-15 Phil Thompson + + * .hgtags: + Added tag 2.13.4 for changeset b2c87a81f0c3 + [d2bc1ac10aa3] <2.13-maint> + +2022-12-06 Phil Thompson + + * NEWS, src/EditView.cxx: + Fixed horizontally scrolled text overwriting margins when EOLs are + visible. + [b2c87a81f0c3] [2.13.4] <2.13-maint> + +2022-06-17 Phil Thompson + + * NEWS, qsci/api/python/Python-3.11.api: + Added the .api file for Python v3.11. + [96eca4a41bcb] <2.13-maint> + +2022-05-24 Phil Thompson + + * NEWS, lib/gen_python3_api.py, lib/gen_python_api.py, + qsci/api/python/Python-3.10.api, qsci/api/python/Python-3.8.api, + qsci/api/python/Python-3.9.api: + Added the .api file for Python v3.10. Removed the script that + generates .api files for Python v2. Updated the .api file for Python + v3.8 and v3.9 removing non-stdlib stuff. + [048961f449ea] <2.13-maint> + +2022-05-13 Phil Thompson + + * .hgtags: + Added tag 2.13.3 for changeset 5b8465ba3664 + [f37eea15e210] <2.13-maint> + +2022-04-25 Phil Thompson + + * NEWS, qt/InputMethod.cpp: + Updates to the input method code to fix a problem with KDE on + Wayland. + [5b8465ba3664] [2.13.3] <2.13-maint> + +2022-03-15 Phil Thompson + + * .hgtags: + Added tag 2.13.2 for changeset bb61ba6bf385 + [6cdbcd2c2dad] <2.13-maint> + + * NEWS, Python/project.py: + Fixed building from an sdist for iOS. + [bb61ba6bf385] [2.13.2] <2.13-maint> + +2021-10-14 Phil Thompson + + * .hgtags: + Added tag 2.13.1 for changeset 0763a2d7a8c2 + [90c834cc462d] <2.13-maint> + +2021-10-12 Phil Thompson + + * NEWS, designer/designer.pro, example/application.pro, + lib/README.doc, qt/qscintilla.pro: + Updated the .pro files and docs to cover multiple architecture + builds on macOS. + [0763a2d7a8c2] [2.13.1] <2.13-maint> + +2021-09-08 Phil Thompson + + * NEWS, qt/qscintilla.pro, qt/qsciscintilla.cpp: + Fixed the target used by findNext() after a call to replace(). + [6d59f97850d7] <2.13-maint> + +2021-06-26 Phil Thompson + + * .hgtags: + Added tag 2.13.0 for changeset 84da33178802 + [95ec8d681eae] + +2021-06-13 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip: + Fixed the Python bindings of SendScintilla() so that a negative + value can be passed as the wParam argument (specifically + SC_CURSORNORMAL). + [84da33178802] [2.13.0] + +2021-06-03 Phil Thompson + + * NEWS, Python/sip/qsciprinter.sip, qt/qscintilla.pro, + qt/qsciprinter.cpp, qt/qsciprinter.h: + Added the new QsciPrinter::printRange() overload. The library + version number is now v15.1.0. + [4b18dcfe67c4] + + * Merged the 2.12-maint branch. + [a33fcd321f79] + +2021-05-20 Phil Thompson + + * qt/PlatQt.cpp: + Fixed the handling of explicit Qt font weights for Qt6. + [1dbb97147333] <2.12-maint> + +2021-05-06 Phil Thompson + + * qt/qscintilla.pro: + Bumped the version number of the shared library. + [7b3f97fa852f] <2.12-maint> + + * NEWS, qt/ListBoxQt.cpp: + Improved the appearence of the auto-completion popup. + [6d05cdc2c9c9] <2.12-maint> + +2021-03-04 Phil Thompson + + * .hgtags: + Added tag 2.12.1 for changeset c1e9b5f091d6 + [0e8a95ee3197] <2.12-maint> + + * NEWS: + Released as v2.12.1. + [c1e9b5f091d6] [2.12.1] <2.12-maint> + + * rb-product.toml: + Fixed the PyQt dependencies. + [c7af7dfff891] <2.12-maint> + +2021-03-02 Phil Thompson + + * NEWS: + Updated the NEWS file. + [811ff4c9ffb2] <2.12-maint> + +2021-02-27 Phil Thompson + + * Python/pyproject-qt5.toml, Python/pyproject-qt6.toml: + Fixed the project dependencies. + [f84410807305] <2.12-maint> + + * rb-product, rb-product.toml: + Updated the product file. + [266fa5c4525a] <2.12-maint> + +2021-02-22 Phil Thompson + + * .hgtags: + Added tag 2.12.0 for changeset 1cfa1f74a2a6 + [a3df8b831652] + + * NEWS: + Released as v2.12.0. + [1cfa1f74a2a6] [2.12.0] + + * NEWS: + Updated the NEWS file. + [15c838b76bbb] + +2021-02-21 Phil Thompson + + * Python/project.py: + Fixed project.py so that it will use an embedded QScintilla library + when being built from an sdist. + [71cc17f4adb2] + + * qt/qscintilla.pro: + Added missing .h files from qscintilla.pro. + [c932fdd83a5e] + +2021-02-19 Phil Thompson + + * Python/pyproject-qt5.toml: + Reverted the name of the Qt5 Python bindings PyPI project because a + new name would cause significant problems. + [c318f3bd3474] + +2021-02-18 Phil Thompson + + * Python/pyproject-qt5.toml, Python/pyproject-qt6.toml, + Python/sip/qsciscintillabase.sip: + Fixed the Python bindings for PyQt6. + [e48e4f400215] + + * lib/README.doc: + Re-ordered the section in the main page of the docs. + [35fd189ea5da] + +2021-02-17 Phil Thompson + + * Python/project.py, Python/pyproject-qt5.toml, Python/pyproject- + qt6.toml, Python/pyproject.toml, Python/sip/qscimod5.sip, + Python/sip/qscimod6.sip, Python/sip/qscimodcommon.sip, + lib/README.doc, qt/features/qscintilla2.prf, + qt/features_staticlib/qscintilla2.prf: + Update the building of the Python bindings from a full source + package. + [124c17880e06] + +2021-02-15 Phil Thompson + + * lib/README.doc, lib/qscintilla.dxy: + Some documentation fixes. + [81cc3ac8a8df] + + * qt/PlatQt.cpp: + Fixed a regression in building against Qt5. + [4e87186ec216] + + * qt/InputMethod.cpp, qt/MacPasteboardMime.cpp, qt/PlatQt.cpp, + qt/SciAccessibility.cpp, qt/qsciapis.cpp, qt/qscicommandset.cpp, + qt/qsciglobal.h, qt/qscilexer.cpp, qt/qscimacro.cpp, + qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciprinter.h, + qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp: + Initial port to Qt6. + [b88e78ec2ca3] + +2021-02-14 Phil Thompson + + * Python/configure-old.py, Python/configure.py, Python/pyproject.toml, + Python/sip/qscimod4.sip, designer-Qt4Qt5/designer.pro, designer- + Qt4Qt5/qscintillaplugin.cpp, designer-Qt4Qt5/qscintillaplugin.h, + designer/designer.pro, designer/qscintillaplugin.cpp, + designer/qscintillaplugin.h, example-Qt4Qt5/application.pro, + example-Qt4Qt5/application.qrc, example-Qt4Qt5/images/copy.png, + example-Qt4Qt5/images/cut.png, example-Qt4Qt5/images/new.png, + example-Qt4Qt5/images/open.png, example-Qt4Qt5/images/paste.png, + example-Qt4Qt5/images/save.png, example-Qt4Qt5/main.cpp, example- + Qt4Qt5/mainwindow.cpp, example-Qt4Qt5/mainwindow.h, + example/application.pro, example/application.qrc, + example/images/copy.png, example/images/cut.png, + example/images/new.png, example/images/open.png, + example/images/paste.png, example/images/save.png, example/main.cpp, + example/mainwindow.cpp, example/mainwindow.h, lib/README.doc, + lib/ed.py, lib/pyproject.toml, qt/InputMethod.cpp, qt/ListBoxQt.cpp, + qt/MacPasteboardMime.cpp, qt/PlatQt.cpp, qt/SciClasses.cpp, + qt/ScintillaQt.cpp, qt/qsciglobal.h, qt/qscintilla.pro, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Removed support for Qt4. + [dad7e9b4d62e] + + * Merged the 2.11-maint branch. + [8c1814ec889a] + +2020-11-23 Phil Thompson + + * .hgtags: + Added tag 2.11.6 for changeset c262a7a02f6d + [a12ce93c13bf] <2.11-maint> + + * NEWS: + Released as v2.11.6. + [c262a7a02f6d] [2.11.6] <2.11-maint> + + * NEWS: + Updated the NEWS file. + [0f32bcb43dd3] <2.11-maint> + +2020-10-22 Phil Thompson + + * qt/features/qscintilla2.prf, qt/features_staticlib/qscintilla2.prf, + qt/qscintilla.pro: + Fixes for building for iOS with recent versions of Qt. + [aea84882d372] <2.11-maint> + +2020-10-20 Phil Thompson + + * Python/project.py: + Added the --qsci-translations-dir option to sip-wheel. + [df77754750b3] <2.11-maint> + +2020-10-19 Phil Thompson + + * qsci/api/python/Python-3.9.api: + Added the .api file for Python v3.9. + [bff51b8043e2] <2.11-maint> + + * .hgignore: + Updated .hgignore for the current build naming convention. + [b659680b3f24] <2.11-maint> + +2020-10-11 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed the display of non-latin1 call tips. + [f9fa57df2fbb] <2.11-maint> + +2020-09-17 Phil Thompson + + * Python/project.py, lib/pyproject.toml: + Require PyQt-builder v1.6 as we no longer specify the sip module and + ABI. + [0e989cce12ea] <2.11-maint> + +2020-08-22 Phil Thompson + + * Python/project.py: + Set the name of the sip module explicitly. + [a6b6fd548cf3] <2.11-maint> + +2020-06-30 Phil Thompson + + * example-Qt4Qt5/main.cpp, example-Qt4Qt5/mainwindow.cpp, example- + Qt4Qt5/mainwindow.h: + Updated the copyright notices on the example. + [8937c1d51479] <2.11-maint> + +2020-06-09 Phil Thompson + + * .hgtags: + Added tag 2.11.5 for changeset 36bf61975fe2 + [7e336947e75e] <2.11-maint> + + * NEWS: + Released as v2.11.5. + [36bf61975fe2] [2.11.5] <2.11-maint> + + * NEWS, Python/sip/qsciabstractapis.sip, Python/sip/qsciapis.sip: + Fixed the Python signatures of the QsciAbstractAPIs and QsciAPIs + ctors. + [80aeec9058bf] <2.11-maint> + +2020-05-09 Phil Thompson + + * Python/project.py, lib/pyproject.toml: + The minimum ABI version is 12.8 which requires SIP v5.3. + [c0e8e2e7e485] <2.11-maint> + +2020-04-11 Phil Thompson + + * lib/pyproject.toml: + We know that The Python binding swill be able to use SIP v6. + [4f1f5381fb69] <2.11-maint> + +2020-04-10 Phil Thompson + + * NEWS: + Updated the NEWS file. + [2ef898e42a1e] <2.11-maint> + + * Python/project.py, lib/pyproject.toml: + Include the bundled .api files in wheels. + [ded23cd63255] <2.11-maint> + +2020-02-08 Phil Thompson + + * lib/pyproject.toml: + Fixed METADATA for commercial wheels. + [efc053939949] <2.11-maint> + +2019-12-18 Phil Thompson + + * .hgtags: + Added tag 2.11.4 for changeset b9eb589b0dab + [3f3722aac2ad] <2.11-maint> + + * NEWS: + Released as v2.11.4. + [b9eb589b0dab] [2.11.4] <2.11-maint> + + * lib/pyproject.toml: + Fixed requires-dist for commercial wheels. + [53c08faf43ff] <2.11-maint> + +2019-11-02 Phil Thompson + + * .hgtags: + Added tag 2.11.3 for changeset 989462577f67 + [3f6d7cf0fc4b] <2.11-maint> + + * NEWS: + Released as v2.11.3. + [989462577f67] [2.11.3] <2.11-maint> + + * NEWS: + Updated the NEWS file. + [2075344b2124] <2.11-maint> + +2019-10-03 Phil Thompson + + * lib/pyproject.toml: + Fixed the name of PEP 566. + [e435d3af1587] <2.11-maint> + + * lib/pyproject.toml: + Requires PyQt-builder v1. + [9502a2b46a2b] <2.11-maint> + +2019-10-01 Phil Thompson + + * lib/pyproject.toml: + Fixed the name of the PyQt-builder project. + [efe96da72b1f] <2.11-maint> + +2019-09-23 Phil Thompson + + * Python/project.py: + Fixes for changes in the sip v5 API. + [a79acd2cdd94] <2.11-maint> + +2019-09-14 Phil Thompson + + * lib/pyproject.toml: + Added the requires-dist meta-data. + [941784a50fad] <2.11-maint> + +2019-09-07 Phil Thompson + + * NEWS: + Updated the NEWS file. + [6c83ad469a4e] <2.11-maint> + + * lib/pyproject.toml: + Temporarily set the version of PyQt-builder required to be v0.1. + [734461946ff0] <2.11-maint> + +2019-09-06 Phil Thompson + + * Python/project.py: + Fixes for relative path options. + [e7bc21d4cb25] <2.11-maint> + +2019-09-05 Phil Thompson + + * Python/project.py: + Added the options to build the bindings from a locally installed + copy of the library. + [54094e26d201] <2.11-maint> + +2019-09-04 Phil Thompson + + * Python/configure-old.py, Python/configure.py, Python/project.py, + designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, + qt/qscintilla.pro: + Removed the code to change the install_name on macOS. + [c88922cb4dee] <2.11-maint> + + * Python/configure.py, qt/qscintilla.pro: + Fixed the install_name of the .dylib on macOS so that it is relative + to @rpath. + [010c78f5da88] <2.11-maint> + + * Python/config-tests/cfgtest_Qsci.cpp: + Fixed the configuration test. + [c00c4195e8fc] <2.11-maint> + + * METADATA.in, Python/README, Python/config-tests/cfgtest_Qsci.cpp, + Python/configure-old.py, Python/configure.py, Python/project.py, + lib/README, lib/pyproject.toml, qt/qscintilla.pro: + Added support for sip-build. + [20e39552153c] <2.11-maint> + +2019-08-30 Phil Thompson + + * METADATA.in, lib/README: + Updated the meta-data description. + [7681c13103f2] <2.11-maint> + +2019-08-21 Phil Thompson + + * METADATA.in: + Updated the link to the docs for PyPI. + [ab14aecc07de] <2.11-maint> + +2019-07-04 Phil Thompson + + * qt/qscilexercss.cpp: + Fixed the styling of CSS comments. + [9b2dd132b868] <2.11-maint> + +2019-06-25 Phil Thompson + + * .hgtags: + Added tag 2.11.2 for changeset 9a9bab556970 + [e39e215312b4] <2.11-maint> + + * NEWS: + Released as v2.11.2. + [9a9bab556970] [2.11.2] <2.11-maint> + + * qsci/api/python/Python-3.8.api: + Added the .api file for Python v3.8. + [4bc9c6baa011] <2.11-maint> + + * NEWS: + Updated the NEWS file. + [38685401d592] <2.11-maint> + +2019-05-31 Phil Thompson + + * qt/PlatQt.cpp: + Fixes to allow compilation with WASM. + [71be3fd818c8] <2.11-maint> + +2019-05-15 Phil Thompson + + * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Fixed selection-related issues on macOS (and probably Windows) + triggered by the use of additional selections. + [47aaec2fa37c] <2.11-maint> + +2019-05-09 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + QsciScintilla::findMatchingBrace() is now part of the public API. + [b1973ad12f82] <2.11-maint> + +2019-03-13 Phil Thompson + + * NEWS, qt/qsciscintilla.cpp: + QsciScintilla::clear() now clears the undo history to be consistent + with Qt and setText(). + [b013bbaed4a5] <2.11-maint> + +2019-02-12 Phil Thompson + + * .hgtags: + Added tag 2.11.1 for changeset bebf741baff8 + [c09e91f304b8] <2.11-maint> + + * NEWS: + Released as v2.11.1. + [bebf741baff8] [2.11.1] <2.11-maint> + + * NEWS: + Updated the NEWS file. + [9f2dd3438ac3] <2.11-maint> + + * Python/configure-old.py, Python/configure.py, designer- + Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, + qt/qscintilla.pro: + Bumped the major version number of the library because of the + SendScintilla() signature change. + [c2fe34e11899] <2.11-maint> + + * Python/sip/qsciscintillabase.sip, qt/qscimacro.cpp, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Fixed a regression in QsciScintilla::insert(). The signature of + QsciScintillaBase::SendScintilla(unigned int, unsigned long, const + char *) has changed so that the second argument is now uintptr_t. + This may require code changes. + [b62eb7f29de4] <2.11-maint> + +2019-02-11 Phil Thompson + + * NEWS: + Updated the NEWS file. + [9768dbe05f64] <2.11-maint> + + * qt/qsciscintillabase.cpp: + Fixed the marginRightClicked() signal. + [6a6efafbefd6] <2.11-maint> + + * qt/qscintilla.pro: + Bumped the library version number. + [a4ee797a9df9] <2.11-maint> + +2019-02-04 Phil Thompson + + * .hgtags: + Added tag 2.11 for changeset 2610e30b0914 + [f83b4fbdd928] + + * NEWS: + Released as v2.11. + [2610e30b0914] [2.11] + +2018-12-21 Phil Thompson + + * METADATA.in: + Corrected the wheel meta-data version. + [593a629d46f5] + +2018-12-15 Phil Thompson + + * NEWS: + Updated the NEWS file. + [992f3cb597c4] + +2018-11-24 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts: + Updated German translations from Detlev. + [f293bafecde8] + +2018-11-17 Phil Thompson + + * qt/ScintillaQt.h: + Fixed the Linux build. + [3ec0608d1744] + + * qt/SciClasses.cpp, qt/SciClasses.h: + Removed the redundant explicit handling of the Esc key in popup + lists. + [a3d596e37561] + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciScintilla::cancelFind(). + [520cda104a4b] + +2018-11-13 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added support for Cxx11 regular expressions to findFirst() and + findFirstInSelection(). + [9c022f775241] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added the remaining new API calls. + [03f9682f7d6c] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Added the new wrap indent mode. + [4a786cbfd975] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added the style metadata messages. + [e3e38b577a1f] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintillabase.h: + Added the SCN_AUTOCSELECTIONCHANGE() signal. + [156c8e0c6fb7] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintillabase.h: + Added the new SCN_USERLISTSELECTION() signal overload. + [031270944f93] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qscilexer.cpp, + qt/qsciscintillabase.h: + Added the character/code unit functions. + [ff2e92ed2890] + + * qt/qscilexer.cpp, qt/qscilexer.h, qt/qscintilla.pro, + qt/qsciscintilla.cpp: + Don't use the deprecated style bits API calls. + [2d1cf2b1019f] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Added support for the new gradient indicators. + [02e7b6ba2fdb] + +2018-11-12 Phil Thompson + + * NEWS, Python/sip/qscilexerdiff.sip, qt/qscilexerdiff.cpp, + qt/qscilexerdiff.h, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, + qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Updates to the diff lexer. + [fb8a0cb48593] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added the symbolic names for the new lexers. + [b8d4fab81221] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Implemented the SCN_URIDROPPED signal. + [242bb09d23ea] + + * qt/qsciscintillabase.h: + Documented SCN_DWELLSTART and SCN_DWELLEND. + [8750296d855d] + + * qt/PlatQt.cpp: + Removed some unused platform methods. + [70c01135aa8d] + + * qt/InputMethod.cpp, qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, + qt/SciClasses.cpp, qt/SciNamespace.h, qt/ScintillaQt.cpp, + qt/ScintillaQt.h, qt/qscintilla.pro, qt/qsciscintillabase.cpp: + Removed the support for the optional Scintilla namespace. + [33998bb1d26a] + +2018-11-11 Phil Thompson + + * BACKPORTING, License.txt, LongTermDownload.html, NEWS, README, + check.mak, checkdeps.mak, cocoa/InfoBar.mm, cocoa/PlatCocoa.h, + cocoa/PlatCocoa.mm, cocoa/QuartzTextLayout.h, + cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, + cocoa/ScintillaFramework/Info.plist, cocoa/ScintillaFramework/Scinti + llaFramework.xcodeproj/project.pbxproj, + cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, + cocoa/ScintillaView.mm, cppcheck.suppress, curses/Makefile, + curses/README.md, curses/ScintillaCurses.cxx, + curses/ScintillaCurses.h, curses/THANKS.md, curses/jinx/Makefile, + curses/jinx/jinx.c, delbin.bat, doc/Design.html, doc/LPegLexer.html, + doc/SciCoding.html, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/ScintillaToDo.html, + doc/StyleMetadata.html, doc/index.html, gtk/Converter.h, + gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/ScintillaGTK.h, + gtk/ScintillaGTKAccessible.cxx, gtk/ScintillaGTKAccessible.h, + gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- + marshal.h, gtk/scintilla-marshal.list, include/ILexer.h, + include/ILoader.h, include/Platform.h, include/SciLexer.h, + include/Sci_Position.h, include/Scintilla.h, + include/Scintilla.iface, lexers/LexA68k.cxx, lexers/LexAPDL.cxx, + lexers/LexASY.cxx, lexers/LexAU3.cxx, lexers/LexAVE.cxx, + lexers/LexAVS.cxx, lexers/LexAbaqus.cxx, lexers/LexAda.cxx, + lexers/LexAsm.cxx, lexers/LexAsn1.cxx, lexers/LexBaan.cxx, + lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexBatch.cxx, + lexers/LexBibTeX.cxx, lexers/LexBullant.cxx, lexers/LexCLW.cxx, + lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, lexers/LexCSS.cxx, + lexers/LexCaml.cxx, lexers/LexCmake.cxx, lexers/LexCoffeeScript.cxx, + lexers/LexConf.cxx, lexers/LexCrontab.cxx, lexers/LexCsound.cxx, + lexers/LexD.cxx, lexers/LexDMAP.cxx, lexers/LexDMIS.cxx, + lexers/LexDiff.cxx, lexers/LexECL.cxx, lexers/LexEDIFACT.cxx, + lexers/LexEScript.cxx, lexers/LexEiffel.cxx, lexers/LexErlang.cxx, + lexers/LexErrorList.cxx, lexers/LexFlagship.cxx, + lexers/LexForth.cxx, lexers/LexFortran.cxx, lexers/LexGAP.cxx, + lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, + lexers/LexHex.cxx, lexers/LexIndent.cxx, lexers/LexInno.cxx, + lexers/LexJSON.cxx, lexers/LexKVIrc.cxx, lexers/LexKix.cxx, + lexers/LexLPeg.cxx, lexers/LexLaTeX.cxx, lexers/LexLisp.cxx, + lexers/LexLout.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, + lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, lexers/LexMagik.cxx, + lexers/LexMake.cxx, lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, + lexers/LexMaxima.cxx, lexers/LexMetapost.cxx, lexers/LexModula.cxx, + lexers/LexMySQL.cxx, lexers/LexNimrod.cxx, lexers/LexNsis.cxx, + lexers/LexNull.cxx, lexers/LexOScript.cxx, lexers/LexOpal.cxx, + lexers/LexPB.cxx, lexers/LexPLM.cxx, lexers/LexPO.cxx, + lexers/LexPOV.cxx, lexers/LexPS.cxx, lexers/LexPascal.cxx, + lexers/LexPerl.cxx, lexers/LexPowerPro.cxx, + lexers/LexPowerShell.cxx, lexers/LexProgress.cxx, + lexers/LexProps.cxx, lexers/LexPython.cxx, lexers/LexR.cxx, + lexers/LexRebol.cxx, lexers/LexRegistry.cxx, lexers/LexRuby.cxx, + lexers/LexRust.cxx, lexers/LexSAS.cxx, lexers/LexSML.cxx, + lexers/LexSQL.cxx, lexers/LexSTTXT.cxx, lexers/LexScriptol.cxx, + lexers/LexSmalltalk.cxx, lexers/LexSorcus.cxx, + lexers/LexSpecman.cxx, lexers/LexSpice.cxx, lexers/LexStata.cxx, + lexers/LexTACL.cxx, lexers/LexTADS3.cxx, lexers/LexTAL.cxx, + lexers/LexTCL.cxx, lexers/LexTCMD.cxx, lexers/LexTeX.cxx, + lexers/LexTxt2tags.cxx, lexers/LexVB.cxx, lexers/LexVHDL.cxx, + lexers/LexVerilog.cxx, lexers/LexVisualProlog.cxx, + lexers/LexYAML.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, + lexlib/CharacterCategory.cxx, lexlib/CharacterCategory.h, + lexlib/CharacterSet.cxx, lexlib/CharacterSet.h, + lexlib/DefaultLexer.cxx, lexlib/DefaultLexer.h, + lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerBase.h, + lexlib/LexerModule.cxx, lexlib/LexerModule.h, + lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, + lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, lexlib/OptionSet.h, + lexlib/PropSetSimple.cxx, lexlib/PropSetSimple.h, + lexlib/SparseState.h, lexlib/StringCopy.h, lexlib/StyleContext.cxx, + lexlib/StyleContext.h, lexlib/SubStyles.h, lexlib/WordList.cxx, + lexlib/WordList.h, lib/README.doc, qt/InputMethod.cpp, + qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/SciClasses.cpp, + qt/SciClasses.h, qt/SciNamespace.h, qt/ScintillaQt.cpp, + qt/ScintillaQt.h, qt/qscintilla.pro, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h, scripts/Face.py, scripts/FileGenerator.py, + scripts/GenerateCaseConvert.py, scripts/HFacer.py, + scripts/HeaderCheck.py, scripts/HeaderOrder.txt, scripts/LexGen.py, + scripts/ScintillaData.py, src/AutoComplete.cxx, src/AutoComplete.h, + src/CallTip.cxx, src/CallTip.h, src/CaseConvert.cxx, + src/CaseConvert.h, src/CaseFolder.cxx, src/CaseFolder.h, + src/Catalogue.cxx, src/Catalogue.h, src/CellBuffer.cxx, + src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, + src/ContractionState.cxx, src/ContractionState.h, src/DBCS.cxx, + src/DBCS.h, src/Decoration.cxx, src/Decoration.h, src/Document.cxx, + src/Document.h, src/EditModel.cxx, src/EditModel.h, + src/EditView.cxx, src/EditView.h, src/Editor.cxx, src/Editor.h, + src/ElapsedPeriod.h, src/ExternalLexer.cxx, src/ExternalLexer.h, + src/FontQuality.h, src/Indicator.cxx, src/Indicator.h, + src/IntegerRectangle.h, src/KeyMap.cxx, src/KeyMap.h, + src/LineMarker.cxx, src/LineMarker.h, src/MarginView.cxx, + src/MarginView.h, src/Partitioning.h, src/PerLine.cxx, + src/PerLine.h, src/Position.h, src/PositionCache.cxx, + src/PositionCache.h, src/RESearch.cxx, src/RESearch.h, + src/RunStyles.cxx, src/RunStyles.h, src/ScintillaBase.cxx, + src/ScintillaBase.h, src/Selection.cxx, src/Selection.h, + src/SparseVector.h, src/SplitVector.h, src/Style.cxx, src/Style.h, + src/UniConversion.cxx, src/UniConversion.h, src/UnicodeFromUTF8.h, + src/UniqueString.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, + src/XPM.h, test/README, test/ScintillaCallable.py, test/XiteWin.py, + test/lexTests.py, test/performanceTests.py, test/simpleTests.py, + test/test_lexlua.lua, test/unit/Sci.natvis, + test/unit/UnitTester.cxx, test/unit/UnitTester.vcxproj, + test/unit/catch.hpp, test/unit/makefile, test/unit/test.mak, + test/unit/testCellBuffer.cxx, test/unit/testCharClassify.cxx, + test/unit/testContractionState.cxx, test/unit/testDecoration.cxx, + test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, + test/unit/testSparseState.cxx, test/unit/testSparseVector.cxx, + test/unit/testSplitVector.cxx, test/unit/testUniConversion.cxx, + test/unit/testUnicodeFromUTF8.cxx, test/unit/testWordList.cxx, + test/unit/unitTest.cxx, version.txt, win32/CheckD2D.cxx, + win32/HanjaDic.cxx, win32/HanjaDic.h, win32/PlatWin.cxx, + win32/PlatWin.h, win32/SciLexer.vcxproj, win32/ScintRes.rc, + win32/ScintillaDLL.cxx, win32/ScintillaWin.cxx, + win32/ScintillaWin.h, win32/deps.mak, win32/makefile, + win32/scintilla.mak: + The v3.10.1 based code will now build - otherwise untested. + [cb6d486795ec] + +2018-11-05 Phil Thompson + + * NEWS: + Updated the NEWS file. + [a99dfcd91f84] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, + qt/qscintilla_pt_br.ts: + Updated the translation files. + [1529479f8a31] + + * Python/configure.py, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qscilexerpython.cpp, + qt/qscintilla.pro, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, + qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: + Merged the 2.10-maint branch with the trunk. + [5fcc66abfca0] + +2018-10-01 Phil Thompson + + * .hgtags: + Added tag 2.10.8 for changeset 57c8b6076899 + [b565980f962b] <2.10-maint> + + * NEWS: + Released as v2.10.8. + [57c8b6076899] [2.10.8] <2.10-maint> + +2018-09-30 Phil Thompson + + * NEWS: + Updated the NEWS file. + [345f597a4a90] <2.10-maint> + +2018-08-02 Phil Thompson + + * qt/SciAccessibility.cpp: + More accessibility fixes. + [2cc2d6865762] <2.10-maint> + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h, qt/qscintilla.pro: + Refactored the accessibility support to use less of the Qt stuff + which doesn't handle CR-LF end-of-lines. + [8b2d6e3e73d8] <2.10-maint> + +2018-07-15 Phil Thompson + + * NEWS: + Updated the NEWS file. + [fc1deaccc716] <2.10-maint> + +2018-06-29 Phil Thompson + + * .hgtags: + Added tag 2.10.7 for changeset 60598a703fd4 + [8828f9ad7dc6] <2.10-maint> + + * NEWS: + Released as v2.10.7. + [60598a703fd4] [2.10.7] <2.10-maint> + + * NEWS: + Updated the NEWS file. + [92edf18019ec] <2.10-maint> + +2018-06-25 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip: + Tweaked the signature of the QscoScintillaBase::SCN_MACRORECORD() + signal so that it matches what Qt uses so that the signal test + passes. + [bfcd9319329a] <2.10-maint> + +2018-06-23 Phil Thompson + + * .hgtags: + Added tag 2.10.6 for changeset dc0993c72a05 + [9c774d0a9694] <2.10-maint> + + * NEWS: + Released as v2.10.6. + [dc0993c72a05] [2.10.6] <2.10-maint> + +2018-06-22 Phil Thompson + + * .hgtags: + Added tag 2.10.5 for changeset f35b3a43a241 + [8cf5694ca328] <2.10-maint> + + * NEWS: + Released as v2.10.5. + [f35b3a43a241] [2.10.5] <2.10-maint> + +2018-06-21 Phil Thompson + + * NEWS: + Updated the NEWS file. + [12cb1a2f5ec6] <2.10-maint> + +2018-06-19 Phil Thompson + + * NEWS, Python/sip/qscistyle.sip, qt/qscistyle.cpp, qt/qscistyle.h: + Added setStyle() to QsciStyle. + [cf5281041224] <2.10-maint> + +2018-06-16 Phil Thompson + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [a479b9f5436f] <2.10-maint> + +2018-06-09 Phil Thompson + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm: + Updated German translations from Detlev. + [f69379899fb3] <2.10-maint> + +2018-06-04 Phil Thompson + + * NEWS, Python/configure.py: + Implemented support for the .dist-info directory. + [387aa9bf6ad8] <2.10-maint> + +2018-06-03 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, + qt/ScintillaQt.cpp, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Fixes for font changes caused by dragging to a different display. + [27b1f435e27a] <2.10-maint> + +2018-05-29 Phil Thompson + + * qt/PlatQt.cpp: + Disable to macOS use of integer font metrics for Qt5 as it is + (probably) specific to Qt4. + [c32fe0c4e55d] <2.10-maint> + + * qt/PlatQt.cpp: + Fixed cursor positioning when using a secondary display with + different scaling to the primary. + [20420b7c4a4d] <2.10-maint> + +2018-05-22 Phil Thompson + + * qt/qscilexerverilog.cpp: + Fix the handling of the 'fold.verilog.flags' property in the Verilog + lexer. + [9b698ba38c2b] <2.10-maint> + +2018-05-16 Phil Thompson + + * qt/qscilexerverilog.cpp, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, + qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Added the missing descriptions of inactive styles in the Verilog + lexer. + [4be691232e03] <2.10-maint> + +2018-05-15 Phil Thompson + + * qt/qscilexer.h: + Updated the QsciLexer::keywords() documentation to point out that + sets are numbered from 1. + [5954b91e7ec1] <2.10-maint> + +2018-04-26 Phil Thompson + + * Python/sip/qscilexeredifact.sip, qt/qscilexeredifact.cpp, + qt/qscilexeredifact.h: + Added some default colours to the EDIFACT lexer. + [175598286833] <2.10-maint> + +2018-04-20 Phil Thompson + + * NEWS, Python/sip/qscilexeredifact.sip, qt/qscilexeredifact.cpp, + qt/qscilexeredifact.h, qt/qscintilla.pro, qt/qscintilla_cs.ts, + qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, + qt/qscintilla_pt_br.ts: + Added the QsciLexerEDIFACT class. + [c1e31857f3e7] <2.10-maint> + + * qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + If the context menu is invoked when the cursor is outside the + selection then the selection is cleared and the cursor moved to + where the mouse was clicked. + [7d230dad9379] <2.10-maint> + +2018-04-19 Phil Thompson + + * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Control-wheel up/down will now zoom in and out. + [ba0049fe03b6] <2.10-maint> + +2018-04-11 Phil Thompson + + * qt/PlatQt.cpp, qt/qsciabstractapis.cpp, qt/qscilexerpython.cpp, + qt/qscilexerxml.cpp, qt/qsciscintilla.cpp: + Removed warning messages about unused variables. + [c2008ef93ee0] <2.10-maint> + + * qt/qscicommandset.cpp: + Fixed the saving of alternative keys in the settings. + [687470e937c1] <2.10-maint> + + * qt/ScintillaQt.cpp, qt/qsciapis.cpp, qt/qsciscintilla.cpp: + Various stylistic changes to eliminate some warning messages. + [dc753169870e] <2.10-maint> + +2018-04-10 Phil Thompson + + * .hgtags: + Added tag 2.10.4 for changeset 24cb0edc89a9 + [05ada666e2cf] <2.10-maint> + + * NEWS: + Released as v2.10.4. + [24cb0edc89a9] [2.10.4] <2.10-maint> + + * qt/SciAccessibility.cpp: + Fixed the retrieval of accessibility attributes. + [e430a7dd7818] <2.10-maint> + +2018-04-07 Phil Thompson + + * qt/qscilexer.cpp: + Use STYLE_MAX to define the maximum number of styles. + [23ca0cad0227] <2.10-maint> + +2018-03-11 Phil Thompson + + * qt/qscintilla.pro: + Force QT_NO_ACCESSIBILITY when building against Qt4. + [b65f48ec1852] <2.10-maint> + +2018-02-27 Phil Thompson + + * .hgtags: + Added tag 2.10.3 for changeset bc769d6fcf53 + [279625f1d8c9] <2.10-maint> + + * NEWS: + Released as v2.10.3. + [bc769d6fcf53] [2.10.3] <2.10-maint> + + * rb-product: + Updated the PyQt5 wheel dependency. + [7cef6e297ddf] <2.10-maint> + + * NEWS: + Updated the NEWS file. + [1e073e29eca4] <2.10-maint> + +2018-02-10 Phil Thompson + + * qsci/api/python/Python-3.7.api: + Added the API file for Python v3.70b1. + [6d0032674462] <2.10-maint> + +2018-02-07 Phil Thompson + + * qt/qsciscintilla.cpp: + Fix the hotspot active background colour. + [45cfd8c68394] <2.10-maint> + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h: + Completed the accessibility support. + [2af3a5b045fa] <2.10-maint> + +2018-02-06 Phil Thompson + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h: + Implemented all of the accessible interface except for attributes(). + [434539a243dc] <2.10-maint> + + * qt/SciAccessibility.cpp: + Implemented more of the accessible interface. + [e8f3df5442cc] <2.10-maint> + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h, qt/ScintillaQt.cpp: + Implemented more of the accessible interface. + [fb26d9fdba27] <2.10-maint> + +2018-02-05 Phil Thompson + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h, qt/ScintillaQt.cpp, + qt/qsciscintillabase.cpp: + More accessibility progress. + [ea2432348b49] <2.10-maint> + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h, qt/ScintillaQt.cpp: + Some progress on accessibility. + [055345b62d7b] <2.10-maint> + + * qt/qscintilla.pro: + Updated the version of the shared library. + [fb50133f8770] <2.10-maint> + +2018-02-04 Phil Thompson + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h, qt/qscintilla.pro, + qt/qsciscintillabase.cpp: + Added the stubs for accessibility support. + [61e00a4f944f] <2.10-maint> + + * qt/SciAccessibility.cpp, qt/SciAccessibility.h, qt/qscintilla.pro, + qt/qsciscintillabase.cpp: + Added the stubs for accessibility support. + [8f2f20b663f1] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Updated the .ts files. + [7630e7c16a42] + + * Python/sip/qscilexerpython.sip, qt/qscilexerpython.cpp, + qt/qscilexerpython.h: + Added the DoubleQuotedFString, SingleQuotedFString, + TripleSingleQuotedFString and TripleDoubleQuotedFString styles to + QsciLexerPython. + [69a152791250] + + * Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciScintilla::setCaretLineFrameWidth(). + [61ed51375157] + + * Python/sip/qscicommand.sip: + Added ReverseLines to the Python bindings. + [132758b054dc] + + * qt/qscicommand.h: + Added ReverseLines to QsciCommand::Command. + [1cecbd08c177] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added SCLEX_INDENT, SCI_GETCARETLINEFRAME, SCI_SETCARETLINEFRAME, + SCI_SETACCESSIBILITY, SCI_GETACCESSIBILITY and SCI_LINEREVERSE. + [4a5c2bea7d34] + +2018-02-03 Phil Thompson + + * Python/configure-old.py, Python/configure.py, designer- + Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, + qt/ScintillaQt.h, qt/qscintilla.pro: + Fixes to build with the latest code. + [262ad022e5b6] + + * README, cocoa/InfoBar.mm, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, + cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, + cocoa/ScintillaFramework/Info.plist, cocoa/ScintillaFramework/Scinti + llaFramework.xcodeproj/project.pbxproj, + cocoa/ScintillaTest/AppController.h, + cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/English.lproj/MainMenu.xib, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, + cocoa/ScintillaView.mm, cppcheck.suppress, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/ScintillaGTK.h, + gtk/ScintillaGTKAccessible.cxx, gtk/ScintillaGTKAccessible.h, + gtk/deps.mak, gtk/makefile, include/Platform.h, include/SciLexer.h, + include/Scintilla.h, include/Scintilla.iface, lexers/LexAsm.cxx, + lexers/LexBaan.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, + lexers/LexCPP.cxx, lexers/LexD.cxx, lexers/LexDMIS.cxx, + lexers/LexDiff.cxx, lexers/LexEDIFACT.cxx, lexers/LexErrorList.cxx, + lexers/LexFortran.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, + lexers/LexIndent.cxx, lexers/LexJSON.cxx, lexers/LexLaTeX.cxx, + lexers/LexLua.cxx, lexers/LexMatlab.cxx, lexers/LexPerl.cxx, + lexers/LexPowerShell.cxx, lexers/LexProgress.cxx, + lexers/LexProps.cxx, lexers/LexPython.cxx, lexers/LexRegistry.cxx, + lexers/LexRust.cxx, lexers/LexSQL.cxx, lexers/LexVHDL.cxx, + lexers/LexVerilog.cxx, lexers/LexVisualProlog.cxx, + lexers/LexYAML.cxx, lexlib/Accessor.cxx, + lexlib/CharacterCategory.cxx, lexlib/CharacterCategory.h, + lexlib/CharacterSet.cxx, lexlib/CharacterSet.h, + lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerModule.cxx, + lexlib/LexerModule.h, lexlib/LexerNoExceptions.cxx, + lexlib/LexerSimple.cxx, lexlib/PropSetSimple.cxx, + lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/WordList.cxx, + scripts/FileGenerator.py, scripts/HeaderOrder.txt, + scripts/LexGen.py, scripts/ScintillaData.py, src/AutoComplete.cxx, + src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, + src/CaseConvert.cxx, src/CaseFolder.h, src/Catalogue.cxx, + src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, + src/CharClassify.h, src/ContractionState.cxx, + src/ContractionState.h, src/Decoration.cxx, src/Decoration.h, + src/Document.cxx, src/Document.h, src/EditModel.cxx, + src/EditModel.h, src/EditView.cxx, src/EditView.h, src/Editor.cxx, + src/Editor.h, src/ExternalLexer.cxx, src/ExternalLexer.h, + src/Indicator.cxx, src/KeyMap.cxx, src/LineMarker.cxx, + src/LineMarker.h, src/MarginView.cxx, src/MarginView.h, + src/Partitioning.h, src/PerLine.cxx, src/PerLine.h, src/Position.h, + src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, + src/RESearch.h, src/RunStyles.cxx, src/RunStyles.h, + src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, + src/Selection.h, src/SparseVector.h, src/SplitVector.h, + src/Style.cxx, src/Style.h, src/UniConversion.cxx, + src/UniConversion.h, src/UniqueString.h, src/ViewStyle.cxx, + src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/gi/Scintilla- + filtered.h, test/unit/testCellBuffer.cxx, + test/unit/testCharClassify.cxx, test/unit/testContractionState.cxx, + test/unit/testDecoration.cxx, test/unit/testPartitioning.cxx, + test/unit/testRunStyles.cxx, test/unit/testSparseState.cxx, + test/unit/testSparseVector.cxx, test/unit/testSplitVector.cxx, + test/unit/testUnicodeFromUTF8.cxx, version.txt, win32/HanjaDic.cxx, + win32/PlatWin.cxx, win32/SciLexer.vcxproj, win32/ScintRes.rc, + win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, + win32/scintilla.mak: + Rebased on Scintilla v3.7.6. + [4822c10e2b59] + + * Merged the 2.10-maint branch into the trunk. + [64e6e4c3471d] + +2017-11-23 Phil Thompson + + * .hgtags: + Added tag 2.10.2 for changeset bdfb9584af36 + [d127fc44d4c4] <2.10-maint> + + * NEWS: + Released as v2.10.2. + [bdfb9584af36] [2.10.2] <2.10-maint> + + * qt/qscintilla.pro: + Bumed the .so minor version. + [4bb28057d3c2] <2.10-maint> + +2017-11-13 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added setScrollWidth() , scrollWidth, setScrollWidthTracking() and + scrollWidthTracking() to QsciScintilla. + [c6e64e99cb12] <2.10-maint> + +2017-11-01 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed the handling of UTF8 call tips. + [7aa9b863f330] <2.10-maint> + +2017-07-04 Phil Thompson + + * qt/qscintilla.pro: + Fixed case sensitivity of a couple of file names. + [e9d9b80fd61b] <2.10-maint> + + * .hgignore: + Ignore the new-style build directory. + [6c20c6b41705] <2.10-maint> + +2017-07-03 Phil Thompson + + * .hgtags: + Added tag 2.10.1 for changeset 20e0e2d419ba + [d6eba6c9e5ce] <2.10-maint> + + * NEWS: + Released as v2.10.1. + [20e0e2d419ba] [2.10.1] <2.10-maint> + + * rb-product: + Updated the PyQt5 dependency to v5.9. + [83200ee6b295] <2.10-maint> + +2017-05-24 Phil Thompson + + * lib/README.doc: + Updated the docs regarding use of build options supported by + Scintilla. + [fe6e73057d9e] <2.10-maint> + +2017-05-15 Phil Thompson + + * Python/sip/qscilexer.sip, Python/sip/qscilexeravs.sip, + Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, + Python/sip/qscilexercoffeescript.sip, Python/sip/qscilexercpp.sip, + Python/sip/qscilexercss.sip, Python/sip/qscilexerd.sip, + Python/sip/qscilexerfortran77.sip, Python/sip/qscilexerhtml.sip, + Python/sip/qscilexerlua.sip, Python/sip/qscilexerpascal.sip, + Python/sip/qscilexerperl.sip, Python/sip/qscilexerpostscript.sip, + Python/sip/qscilexerpov.sip, Python/sip/qscilexerpython.sip, + Python/sip/qscilexerruby.sip, Python/sip/qscilexerspice.sip, + Python/sip/qscilexersql.sip, Python/sip/qscilexertcl.sip, + Python/sip/qscilexerverilog.sip, Python/sip/qscilexervhdl.sip: + Added the lexer-specific re-implementations of previously internal + methods to the Python bindings. + [e8402392cedc] <2.10-maint> + +2017-03-22 Phil Thompson + + * qt/qscintilla.pro: + Enabled explicit C++11 support for Linux for old versions of GCC. + [e0e0b344ccf1] <2.10-maint> + +2017-03-16 Phil Thompson + + * qt/qscilexer.cpp: + Changed the default macOS font to Menlo 12pt as it has bold etc. + [39d69e37d352] <2.10-maint> + + * qt/qscilexer.cpp: + Changed the default font on macOS to Monaco 12pt. + [9030535e2457] <2.10-maint> + + * Python/configure.py: + Fixed the rpath change of the Python bindings on macOS. + [dd45e695812a] <2.10-maint> + +2017-02-22 Phil Thompson + + * qt/qscintilla.pro: + Fixed the .pro file so that debug builds match the features file. + [1aedd0c6eeda] <2.10-maint> + +2017-02-20 Phil Thompson + + * .hgtags: + Added tag 2.10 for changeset 6c07847b2835 + [2442f8d2df34] + + * NEWS: + Released as v2.10. + [6c07847b2835] [2.10] + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_es.qm, + qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm: + Updated the .qm files. + [3b3c5924e746] + + * qt/qscintilla_fr.ts: + Partial updated French translations from Alan Garny. + [ca2d6917015e] + +2017-02-17 Phil Thompson + + * Python/sip/qsciscintillabase.sip: + Added /Transfer/ to the scroll bar replacement functions. + [49cf7181402a] + +2017-02-15 Phil Thompson + + * qt/qscintilla_de.ts: + Updated German translations from Detlev. + [51cca6073075] + +2017-02-14 Phil Thompson + + * qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [0e30abdd0907] + +2017-02-13 Phil Thompson + + * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, + qt/qscintilla.pro: + Removed the 'release' option from all CONFIG lines. + [0901267a8e49] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Added replaceHorizontalScrollBar() and replaceVerticalScrollBar() to + QsciScintillaBase. + [bb7efd26b8b3] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Updated the translation files. + [76c23d751930] + +2017-01-21 Phil Thompson + + * Python/sip/qscilexermarkdown.sip, qt/qscilexerjson.cpp, + qt/qscilexermarkdown.cpp, qt/qscilexermarkdown.h: + Updated the Markdown lexer with the latest settings from Detlev. + [9e9992a4e9f7] + +2017-01-17 Phil Thompson + + * qt/qsciapis.cpp: + Fixed problems with auto-completion lists where contexts and image + identifiers were getting lost. + [039599ba1b85] + +2017-01-16 Phil Thompson + + * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: + Fixed the example and designer plugin .pro files for the change + library name. + [d6c564089958] + + * lib/README.doc: + Updated website links to https. + [18a7013d4f8b] + + * qt/qsciabstractapis.h, qt/qsciapis.h, qt/qscicommand.h, + qt/qscicommandset.h, qt/qscidocument.h, qt/qsciglobal.h, + qt/qscilexer.h, qt/qscilexeravs.h, qt/qscilexerbash.h, + qt/qscilexerbatch.h, qt/qscilexercmake.h, + qt/qscilexercoffeescript.h, qt/qscilexercpp.h, qt/qscilexercsharp.h, + qt/qscilexercss.h, qt/qscilexercustom.h, qt/qscilexerd.h, + qt/qscilexerdiff.h, qt/qscilexerfortran.h, qt/qscilexerfortran77.h, + qt/qscilexerhtml.h, qt/qscilexeridl.h, qt/qscilexerjava.h, + qt/qscilexerjavascript.h, qt/qscilexerjson.h, qt/qscilexerlua.h, + qt/qscilexermakefile.h, qt/qscilexermarkdown.h, + qt/qscilexermatlab.h, qt/qscilexeroctave.h, qt/qscilexerpascal.h, + qt/qscilexerperl.h, qt/qscilexerpo.h, qt/qscilexerpostscript.h, + qt/qscilexerpov.h, qt/qscilexerproperties.h, qt/qscilexerpython.h, + qt/qscilexerruby.h, qt/qscilexerspice.h, qt/qscilexersql.h, + qt/qscilexertcl.h, qt/qscilexertex.h, qt/qscilexerverilog.h, + qt/qscilexervhdl.h, qt/qscilexerxml.h, qt/qscilexeryaml.h, + qt/qscimacro.h, qt/qsciprinter.h, qt/qsciscintilla.h, + qt/qsciscintillabase.h, qt/qscistyle.h, qt/qscistyledtext.h: + Removed all the __APPLE__ C++ linkages. + [ecd39912cb9b] + + * NEWS, Python/sip/qscilexer.sip, qt/qscilexer.h: + The previously internal methods of QsciLexer are now part of the + public API and are exposed to Python. + [4791eae227c6] + + * NEWS, Python/configure.py, qt/features/qscintilla2.prf, + qt/features_staticlib/qscintilla2.prf, qt/qscintilla.pro: + The name of the library now embeds the major version of Qt so that + Qt4 and Qt5 libraries can be installed in the same directory. + [b501dcc67049] + + * NEWS, Python/sip/qsciscintilla.sip, qt/qscilexercustom.h, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Implemented QscScintilla::bytes() and a corresponding text() + overload mainly for the use of QsciLexerCustom::styleText() + implementations. + [ed7a5a072695] + +2017-01-15 Phil Thompson + + * Python/sip/qsciscintillabase.sip: + Updated the sub-class convertor code. + [ee4e6efa0576] + + * NEWS, Python/sip/qscilexermarkdown.sip, + Python/sip/qscimodcommon.sip, qt/qscilexermarkdown.cpp, + qt/qscilexermarkdown.h, qt/qscintilla.pro: + Added the QsciLexerMarkdown class. + [0b5e03e0b64f] + +2017-01-11 Phil Thompson + + * NEWS, Python/sip/qscilexerjson.sip, Python/sip/qscimodcommon.sip, + qt/qscilexerjson.cpp, qt/qscilexerjson.h, qt/qscintilla.pro: + Implemented QsciLexerJSON. + [bb5118a2b0cb] + +2017-01-05 Phil Thompson + + * NEWS, Python/sip/qscilexercoffeescript.sip, + qt/qscilexercoffeescript.cpp, qt/qscilexercoffeescript.h: + Added InstanceProperty to QsciLexerCoffeeScript. + [2a6987f4c3c3] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: + Implemented the new notifications. + [12ba81979751] + +2017-01-04 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added the low-level popup options. + [6a6fccaf8adf] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added support for multiple edge columns. + [761b940d39c6] + +2017-01-03 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added the low-level idle styling support. + [fe8c747abb81] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added the low-level support for fold text. + [3afaaf7830c6] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Updates to the low-level target support. + [709bfb578a28] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Added support for the additional indicators. + [fb7bcbfc6c96] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added some more low-level constants. + [d19d12e79c31] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added support for setting the margin background colour. Added + support for setting the number of margins. + [407db46c80a6] + + * qt/qscilexercustom.cpp, qt/qscilexercustom.h: + Fixed QsciLexerCustom::startStyling() now that the 2nd argument + isn't used. + [2d4cc3cdb123] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added support for visible whitespace in indentations only. Added + support for tab drawing modes. + [1ef385e510b8] + + * qt/InputMethod.cpp: + Updated the inputMethodEvent() implementation. + [f0060458bd73] + +2017-01-02 Phil Thompson + + * qt/InputMethod.cpp, qt/ScintillaQt.cpp, qt/ScintillaQt.h: + Fixed compilation bugs with SCI_NAMESPACE defined. + [ef072ff5da5e] + + * lib/README.doc: + Minor documentation updates. + [f89ceb95b9c5] + + * qt/qsciscintillabase.cpp: + Fixed compilation bugs. + [8fdfb9bca00d] + + * CONTRIBUTING, Python/configure-old.py, Python/configure.py, README, + cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/Info.plist, cocoa/ + ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj, coc + oa/ScintillaFramework/ScintillaFramework.xcodeproj/project.xcworkspa + ce/contents.xcworkspacedata, cocoa/ScintillaFramework/ScintillaFrame + work.xcodeproj/xcshareddata/xcschemes/Scintilla.xcscheme, + cocoa/ScintillaFramework/module.modulemap, + cocoa/ScintillaTest/AppController.h, + cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/English.lproj/MainMenu.xib, + cocoa/ScintillaTest/Info.plist, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, cocoa/S + cintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/contents.xc + workspacedata, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, + cocoa/checkbuildosx.sh, cppcheck.suppress, delcvs.bat, designer- + Qt4Qt5/designer.pro, doc/Design.html, doc/Icons.html, doc/Lexer.txt, + doc/Privacy.html, doc/SciCoding.html, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/ScintillaToDo.html, + doc/ScintillaUsage.html, doc/index.html, example- + Qt4Qt5/application.pro, gtk/Converter.h, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/ScintillaGTK.h, + gtk/ScintillaGTKAccessible.cxx, gtk/ScintillaGTKAccessible.h, + gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- + marshal.h, gtk/scintilla-marshal.list, include/ILexer.h, + include/Platform.h, include/SciLexer.h, include/Sci_Position.h, + include/Scintilla.h, include/Scintilla.iface, + include/ScintillaWidget.h, lexers/LexA68k.cxx, lexers/LexAPDL.cxx, + lexers/LexASY.cxx, lexers/LexAU3.cxx, lexers/LexAVE.cxx, + lexers/LexAVS.cxx, lexers/LexAbaqus.cxx, lexers/LexAda.cxx, + lexers/LexAsm.cxx, lexers/LexAsn1.cxx, lexers/LexBaan.cxx, + lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexBatch.cxx, + lexers/LexBibTeX.cxx, lexers/LexBullant.cxx, lexers/LexCLW.cxx, + lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, lexers/LexCSS.cxx, + lexers/LexCaml.cxx, lexers/LexCmake.cxx, lexers/LexCoffeeScript.cxx, + lexers/LexConf.cxx, lexers/LexCrontab.cxx, lexers/LexCsound.cxx, + lexers/LexD.cxx, lexers/LexDMAP.cxx, lexers/LexDMIS.cxx, + lexers/LexDiff.cxx, lexers/LexECL.cxx, lexers/LexEDIFACT.cxx, + lexers/LexEScript.cxx, lexers/LexEiffel.cxx, lexers/LexErlang.cxx, + lexers/LexErrorList.cxx, lexers/LexFlagship.cxx, + lexers/LexForth.cxx, lexers/LexFortran.cxx, lexers/LexGAP.cxx, + lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, + lexers/LexHex.cxx, lexers/LexInno.cxx, lexers/LexJSON.cxx, + lexers/LexKVIrc.cxx, lexers/LexKix.cxx, lexers/LexLaTeX.cxx, + lexers/LexLisp.cxx, lexers/LexLout.cxx, lexers/LexLua.cxx, + lexers/LexMMIXAL.cxx, lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, + lexers/LexMagik.cxx, lexers/LexMake.cxx, lexers/LexMarkdown.cxx, + lexers/LexMatlab.cxx, lexers/LexMetapost.cxx, lexers/LexModula.cxx, + lexers/LexMySQL.cxx, lexers/LexNimrod.cxx, lexers/LexNsis.cxx, + lexers/LexNull.cxx, lexers/LexOScript.cxx, lexers/LexOpal.cxx, + lexers/LexOthers.cxx, lexers/LexPB.cxx, lexers/LexPLM.cxx, + lexers/LexPO.cxx, lexers/LexPOV.cxx, lexers/LexPS.cxx, + lexers/LexPascal.cxx, lexers/LexPerl.cxx, lexers/LexPowerPro.cxx, + lexers/LexPowerShell.cxx, lexers/LexProgress.cxx, + lexers/LexProps.cxx, lexers/LexPython.cxx, lexers/LexR.cxx, + lexers/LexRebol.cxx, lexers/LexRegistry.cxx, lexers/LexRuby.cxx, + lexers/LexRust.cxx, lexers/LexSML.cxx, lexers/LexSQL.cxx, + lexers/LexSTTXT.cxx, lexers/LexScriptol.cxx, + lexers/LexSmalltalk.cxx, lexers/LexSorcus.cxx, + lexers/LexSpecman.cxx, lexers/LexSpice.cxx, lexers/LexTACL.cxx, + lexers/LexTADS3.cxx, lexers/LexTAL.cxx, lexers/LexTCL.cxx, + lexers/LexTCMD.cxx, lexers/LexTeX.cxx, lexers/LexTxt2tags.cxx, + lexers/LexVB.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, + lexers/LexVisualProlog.cxx, lexers/LexYAML.cxx, lexlib/Accessor.cxx, + lexlib/Accessor.h, lexlib/CharacterSet.cxx, lexlib/CharacterSet.h, + lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerBase.h, + lexlib/LexerModule.cxx, lexlib/LexerModule.h, + lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, + lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, + lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, + lexlib/WordList.cxx, lexlib/WordList.h, qt/qscintilla.pro, + scripts/Face.py, scripts/FileGenerator.py, + scripts/GenerateCaseConvert.py, scripts/HeaderCheck.py, + scripts/HeaderOrder.txt, scripts/LexGen.py, + scripts/ScintillaData.py, src/AutoComplete.cxx, src/CallTip.cxx, + src/CaseConvert.cxx, src/CaseConvert.h, src/CaseFolder.cxx, + src/Catalogue.cxx, src/CellBuffer.cxx, src/CellBuffer.h, + src/CharClassify.cxx, src/CharClassify.h, src/ContractionState.cxx, + src/ContractionState.h, src/Decoration.cxx, src/Document.cxx, + src/Document.h, src/EditModel.cxx, src/EditModel.h, + src/EditView.cxx, src/EditView.h, src/Editor.cxx, src/Editor.h, + src/ExternalLexer.cxx, src/Indicator.cxx, src/Indicator.h, + src/KeyMap.cxx, src/KeyMap.h, src/LineMarker.cxx, + src/MarginView.cxx, src/PerLine.cxx, src/Position.h, + src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, + src/RESearch.h, src/RunStyles.cxx, src/ScintillaBase.cxx, + src/ScintillaBase.h, src/Selection.cxx, src/Selection.h, + src/SparseVector.h, src/SplitVector.h, src/Style.cxx, src/Style.h, + src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, + src/ViewStyle.h, src/XPM.cxx, test/ScintillaCallable.py, + test/XiteQt.py, test/XiteWin.py, test/examples/perl-test- + 5220delta.pl, test/examples/perl-test-5220delta.pl.styled, + test/examples/perl-test-sub-prototypes.pl, test/examples/perl-test- + sub-prototypes.pl.styled, test/gi/Scintilla-0.1.gir.good, test/gi + /Scintilla-filtered.h, test/gi/filter-scintilla-h.py, test/gi/gi- + test.py, test/gi/makefile, test/lexTests.py, test/simpleTests.py, + test/unit/Sci.natvis, test/unit/UnitTester.cxx, + test/unit/UnitTester.vcxproj, test/unit/makefile, + test/unit/test.mak, test/unit/testCellBuffer.cxx, + test/unit/testContractionState.cxx, test/unit/testDecoration.cxx, + test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, + test/unit/testSparseState.cxx, test/unit/testSparseVector.cxx, + test/unit/testSplitVector.cxx, test/unit/testWordList.cxx, + version.txt, win32/HanjaDic.cxx, win32/HanjaDic.h, + win32/PlatWin.cxx, win32/SciLexer.vcxproj, win32/ScintRes.rc, + win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, + win32/scintilla.mak: + Initial merge of Scintilla v3.7.2. + [abbfc844caaa] + + * lib/LICENSE.commercial.short, lib/LICENSE.gpl, + lib/LICENSE.gpl.short: + Updated the copyright notices. + [10d2ba70b9d0] + + * Makefile, build.py: + Merged the v2.9 maintenance branch. + [8c0c0a19a3c8] + +2016-12-25 Phil Thompson + + * .hgtags: + Added tag 2.9.4 for changeset 06e486532f86 + [a0e7ce41b57a] <2.9-maint> + + * NEWS: + Released as v2.9.4. + [06e486532f86] [2.9.4] <2.9-maint> + +2016-12-24 Phil Thompson + + * qsci/api/python/Python-3.6.api: + Added the .api file for Python v3.6. + [4af5841ab5d2] <2.9-maint> + +2016-11-07 Phil Thompson + + * qt/qsciscintillabase.cpp: + Updated a comment to explain why setting custom scrollbars doesn't + work. + [757ca3bbc419] <2.9-maint> + +2016-10-25 Phil Thompson + + * Python/configure.py: + Fixed configure.py for Python v2. + [6d784269a812] <2.9-maint> + +2016-10-23 Phil Thompson + + * Python/sip/qscimod4.sip, Python/sip/qscimod5.sip: + Explicitly %Import the QtCore module so that it is imported in the + .pyi file. + [fec61f546e2b] <2.9-maint> + +2016-09-26 Phil Thompson + + * lib/README.doc: + Removed some (possibly out of date) information about installation + on macOS. + [c793591a8192] <2.9-maint> + + * qt/InputMethod.cpp: + Disable the hack for handling null input method method events on + Windows as there are reports that this breaks character composition. + [42977285ae81] <2.9-maint> + +2016-09-25 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed a Qt warning about a too large red value in a QColor. + [f9af82c24301] <2.9-maint> + +2016-09-23 Phil Thompson + + * rb-product: + Added the minimum PyQt5 wheel version to the product file. + [11d2fb4dc51a] <2.9-maint> + +2016-09-10 Phil Thompson + + * Python/configure.py, rb-product: + Updated the handling of the minimum SIP version. + [1e50ffa9dac1] <2.9-maint> + +2016-09-09 Phil Thompson + + * Python/sip/qscimod5.sip: + The limited API is now used for the Python bindings. + [a2b8118a4483] <2.9-maint> + +2016-08-08 Phil Thompson + + * Makefile, build.py: + Removed the old internal build system. + [522e8b386eef] <2.9-maint> + +2016-07-25 Phil Thompson + + * METADATA.in: + Removed the Obsoletes tag from METADATA. + [fbf9aa05d0b4] <2.9-maint> + + * .hgtags: + Added tag 2.9.3 for changeset 19c9752958b7 + [fb5cd006685f] <2.9-maint> + + * NEWS: + Released as v2.9.3. + [19c9752958b7] [2.9.3] <2.9-maint> + +2016-07-19 Phil Thompson + + * METADATA.in: + Updated METADATA. + [aa51b27d9baf] <2.9-maint> + +2016-06-21 Phil Thompson + + * build.py, lib/qscintilla.dxy: + Simplify the generation of the doxygen documentation. + [12575460cd55] <2.9-maint> + + * rb-product, rbproduct.py: + Replaced the product plugin with a product file. + [846ad54d791e] <2.9-maint> + +2016-06-10 Phil Thompson + + * qt/ScintillaQt.cpp, qt/qscintilla.pro: + Fixed a flicker problem on OS X. + [c1482a759dc0] <2.9-maint> + +2016-05-12 Phil Thompson + + * METADATA.in, rbproduct.py: + Try to prevent the GPL and commercial versions being installed at + the same time. (Although it doesn't seem to work.) + [826424d291a2] <2.9-maint> + + * METADATA.in, rbproduct.py: + Configure the PKG-INFO meta-data according to the license. + [e3243207aa15] <2.9-maint> + +2016-05-10 Phil Thompson + + * rbproduct.py: + More changes to the product plugin required by rbtools. + [437e6032e4df] <2.9-maint> + +2016-05-09 Phil Thompson + + * rbproduct.py: + Updated the product plugin for the latest rbtools changes. + [393cae59af91] <2.9-maint> + +2016-04-22 Phil Thompson + + * METADATA.in: + Updated the meta-data now that Linux wheels are available from PyPI. + [40f18e066c6f] <2.9-maint> + +2016-04-18 Phil Thompson + + * .hgtags: + Added tag 2.9.2 for changeset 15888f3e91ce + [5cd132938309] <2.9-maint> + + * NEWS: + Released as v2.9.2. + [15888f3e91ce] [2.9.2] <2.9-maint> + + * Python/sip/qsciscintillabase.sip: + Remove all deprecated /DocType/ annotations. + [b9d570ab642a] <2.9-maint> + +2016-04-17 Phil Thompson + + * rbproduct.py: + Locate the static library on Windows. + [dd8c14dace83] <2.9-maint> + + * rbproduct.py: + Fixed a typo. + [baf5c942f528] <2.9-maint> + + * rbproduct.py: + Add any pre-installed .api files to the wheel. + [cf7b6302ae83] <2.9-maint> + + * rbproduct.py: + Exploit verbose mode in the product plugin. + [da743c037880] <2.9-maint> + + * rbproduct.py: + Fixed permissions of the product plugin. + [6fac075e0b88] <2.9-maint> + +2016-04-16 Phil Thompson + + * Makefile: + Updated the clean target. + [692b14f48ade] <2.9-maint> + + * rbproduct.py: + The wheel now includes translations and API files. + [bf911094e537] <2.9-maint> + + * METADATA.in, Makefile, Python/configure.py, build.py, rbproduct.py: + Added the initial support for creating wheels. + [da0a5d22e864] <2.9-maint> + + * Makefile, build.py: + Added the --omit-license-tag option to build.py. Added the dist- + wheel-gpl target to the master Makefile. + [a63c245de735] <2.9-maint> + +2016-04-15 Phil Thompson + + * Python/configure-old.py, Python/configure.py, build.py, + qt/features/qscintilla2.prf, qt/features_staticlib/qscintilla2.prf, + qt/qsciglobal.h, qt/qscintilla.pro: + Symbols are now hidden if possible on all platforms. Improved the + handling of QSCINTILLA_DLL so it should be completely automatic. + Removed the --no-dll option to configure.py. + [e35caca29dd6] <2.9-maint> + +2016-03-25 Phil Thompson + + * Python/configure-old.py, build.py: + Use the new naming standards for development versions. + [21d2f882320a] <2.9-maint> + +2016-03-14 Phil Thompson + + * Python/configure.py, build.py: + The configure.py boilerplate code is applied automatically. + [848f3fca41c0] <2.9-maint> + +2016-03-13 Phil Thompson + + * Python/configure.py: + Updated the configure.py boilerplate. + [b3fd404a1134] <2.9-maint> + +2016-03-07 Phil Thompson + + * Python/configure.py: + Added support for PEP 484 stub files to configure.py. + [9316fed27503] <2.9-maint> + +2015-12-15 Phil Thompson + + * Makefile: + Switched the internal build system to Python v3.5. + [5215e7f3116e] <2.9-maint> + +2015-10-28 Phil Thompson + + * Python/configure.py: + Handle PATH components that are enclosed in quotes. + [d0f19b69ce26] <2.9-maint> + +2015-10-24 Phil Thompson + + * .hgtags: + Added tag 2.9.1 for changeset 9bd39be91ef8 + [c71bd22d6ccf] <2.9-maint> + + * NEWS: + Released as v2.9.1. + [9bd39be91ef8] [2.9.1] <2.9-maint> + +2015-10-17 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed the handling of the keypad modifier. + [e363cc2c347f] <2.9-maint> + +2015-09-18 Phil Thompson + + * qsci/api/python/Python-3.5.api: + Added the .api file for Python v3.5. + [5b4e58de4663] <2.9-maint> + +2015-09-10 Phil Thompson + + * Python/sip/qsciabstractapis.sip, Python/sip/qsciapis.sip: + Fixed the Python binding for + QsciAbstractAPIs::updateAutoCompletionList(). + [53f2939a3b29] <2.9-maint> + +2015-09-08 Phil Thompson + + * Python/configure.py: + Use win32-msvc2015 for Python v3.5 and later. + [2f264662e2c7] <2.9-maint> + +2015-09-01 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed the restyling of a document displayed in multiple editors. + [9309f264ab57] <2.9-maint> + +2015-08-24 Phil Thompson + + * qt/qscintilla.pro, qt/qsciscintilla.cpp: + Fixed a problem starting a call tip when the auto-completion list is + displayed. Bumped the library version. + [2ec2115ea4d2] <2.9-maint> + +2015-07-12 Phil Thompson + + * designer-Qt4Qt5/qscintillaplugin.h: + Fixed a warning message when compiling against Qt v5.5.0. + [3ff05a0ef88d] <2.9-maint> + +2015-07-09 Phil Thompson + + * Python/configure.py: + Update QMAKE_RPATHDIR rather than set it. + [045c64a7e65c] <2.9-maint> + +2015-06-24 Phil Thompson + + * Python/configure.py: + Set QMAKE_RPATHDIR for Qt v5.5 on OS X. + [b83394e4a676] <2.9-maint> + +2015-05-26 Phil Thompson + + * Python/configure.py: + Fixed the backstop handling in the Python bindings configuration + script and bumped the version number. + [1ab1dd7ea495] <2.9-maint> + +2015-05-02 Phil Thompson + + * qt/qscintilla.pro: + Use QT_HOST_DATA for the .prf destination with Qt v5. Removed all Qt + v3 support from the .pro file. + [63c0391624a8] <2.9-maint> + +2015-04-20 Phil Thompson + + * .hgtags: + Added tag 2.9 for changeset 41ee8162fa81 + [9817b0a7a4f7] + + * NEWS: + Released as v2.9. + [41ee8162fa81] [2.9] + +2015-04-14 Phil Thompson + + * qt/qsciscintillabase.cpp: + Fixed a problem notifying when focus is lost to another application + widget. + [41734678234e] + +2015-04-06 Phil Thompson + + * qt/qsciscintillabase.cpp: + Fixed a crash when deleting an instance. + [eb936ad1f826] + +2015-04-05 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed a problem applying a lexer's styles that manifested itself by + the wrong style being applied to line numbers when using a custom + lexer. + [c91009909b8e] + +2015-04-04 Phil Thompson + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime. + [d94218e7d47d] + + * qt/ScintillaQt.h: + Fixed some header file dependencies. + [f246e863957f] + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm: + Updated German translations from Detlev. + [01f3be277e14] + +2015-04-03 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: + Updated the .ts translation files. + [659fb035d1c4] + +2015-04-02 Phil Thompson + + * qt/qsciapis.cpp: + Fixed a problem displaying call-tips when auto-completion is + enabled. + [82ec45421a3d] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Exposed the remaining new features. + [6e84b61268c5] + +2015-04-01 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Exposing new Scintilla functionality. + [e0965dc46693] + +2015-03-31 Phil Thompson + + * qt/qscilexerverilog.cpp, qt/qscilexerverilog.h: + Enabled the new styling features of QsciLexerVerilog. + [5be65189b15f] + + * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, + qt/qscilexercpp.h: + Completed the updates to QsciLexerCPP. + [a8e24b727d82] + + * NEWS, Python/sip/qscilexercpp.sip, Python/sip/qscilexersql.sip, + Python/sip/qscilexerverilog.sip, Python/sip/qscilexervhdl.sip, + Python/sip/qsciscintillabase.sip, qt/qscilexercpp.cpp, + qt/qscilexercpp.h, qt/qscilexersql.cpp, qt/qscilexersql.h, + qt/qscilexerverilog.cpp, qt/qscilexerverilog.h, + qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, qt/qsciscintillabase.h: + Updated existing lexers with new styles. + [768f8ff280e1] + +2015-03-30 Phil Thompson + + * qt/qsciapis.cpp: + Make sure call tips don't include image types. + [d0830816cda4] + + * qt/ScintillaQt.cpp, qt/ScintillaQt.h: + Fixed the horizontal scrollbar issues, particularly with long lines. + [db8501c0803f] + +2015-03-29 Phil Thompson + + * qt/ScintillaQt.cpp: + Updated the paste support. + [42ad3657d52e] + + * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp: + Added support for idle processing. + [ff277e910df7] + +2015-03-27 Phil Thompson + + * NEWS: + Updated the NEWS file. + [64766fb4c800] + + * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Add support for fine tickers. + [3e9b89430dc0] + +2015-03-26 Phil Thompson + + * Makefile, Python/sip/qsciabstractapis.sip, Python/sip/qsciapis.sip, + Python/sip/qscicommandset.sip, Python/sip/qscilexer.sip, + Python/sip/qscilexeravs.sip, Python/sip/qscilexerbash.sip, + Python/sip/qscilexerbatch.sip, Python/sip/qscilexercmake.sip, + Python/sip/qscilexercoffeescript.sip, Python/sip/qscilexercpp.sip, + Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, + Python/sip/qscilexercustom.sip, Python/sip/qscilexerd.sip, + Python/sip/qscilexerdiff.sip, Python/sip/qscilexerfortran.sip, + Python/sip/qscilexerfortran77.sip, Python/sip/qscilexerhtml.sip, + Python/sip/qscilexeridl.sip, Python/sip/qscilexerjava.sip, + Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, + Python/sip/qscilexermakefile.sip, Python/sip/qscilexermatlab.sip, + Python/sip/qscilexeroctave.sip, Python/sip/qscilexerpascal.sip, + Python/sip/qscilexerperl.sip, Python/sip/qscilexerpo.sip, + Python/sip/qscilexerpostscript.sip, Python/sip/qscilexerpov.sip, + Python/sip/qscilexerproperties.sip, Python/sip/qscilexerpython.sip, + Python/sip/qscilexerruby.sip, Python/sip/qscilexerspice.sip, + Python/sip/qscilexersql.sip, Python/sip/qscilexertcl.sip, + Python/sip/qscilexertex.sip, Python/sip/qscilexerverilog.sip, + Python/sip/qscilexervhdl.sip, Python/sip/qscilexerxml.sip, + Python/sip/qscilexeryaml.sip, Python/sip/qscimacro.sip, + Python/sip/qscimod3.sip, Python/sip/qscimod4.sip, + Python/sip/qscimod5.sip, Python/sip/qscimodcommon.sip, + Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, + build.py, designer-Qt3/designer.pro, designer- + Qt3/qscintillaplugin.cpp, example-Qt3/application.cpp, example- + Qt3/application.h, example-Qt3/application.pro, example- + Qt3/fileopen.xpm, example-Qt3/fileprint.xpm, example- + Qt3/filesave.xpm, example-Qt3/main.cpp, lib/README, lib/README.doc, + lib/qscintilla.dxy, qt/InputMethod.cpp, qt/ListBoxQt.cpp, + qt/PlatQt.cpp, qt/SciClasses.cpp, qt/SciClasses.h, + qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciabstractapis.cpp, + qt/qsciabstractapis.h, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qscilexer.cpp, + qt/qscilexer.h, qt/qscilexeravs.cpp, qt/qscilexeravs.h, + qt/qscilexerbash.cpp, qt/qscilexerbash.h, qt/qscilexerbatch.cpp, + qt/qscilexerbatch.h, qt/qscilexercmake.cpp, qt/qscilexercmake.h, + qt/qscilexercoffeescript.cpp, qt/qscilexercoffeescript.h, + qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.cpp, + qt/qscilexercsharp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, + qt/qscilexercustom.cpp, qt/qscilexercustom.h, qt/qscilexerd.cpp, + qt/qscilexerd.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, + qt/qscilexerfortran.cpp, qt/qscilexerfortran.h, + qt/qscilexerfortran77.cpp, qt/qscilexerfortran77.h, + qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.cpp, + qt/qscilexeridl.h, qt/qscilexerjava.cpp, qt/qscilexerjava.h, + qt/qscilexerjavascript.cpp, qt/qscilexerjavascript.h, + qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexermakefile.cpp, + qt/qscilexermakefile.h, qt/qscilexermatlab.cpp, + qt/qscilexermatlab.h, qt/qscilexeroctave.cpp, qt/qscilexeroctave.h, + qt/qscilexerpascal.cpp, qt/qscilexerpascal.h, qt/qscilexerperl.cpp, + qt/qscilexerperl.h, qt/qscilexerpo.cpp, qt/qscilexerpo.h, + qt/qscilexerpostscript.cpp, qt/qscilexerpostscript.h, + qt/qscilexerpov.cpp, qt/qscilexerpov.h, qt/qscilexerproperties.cpp, + qt/qscilexerproperties.h, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, + qt/qscilexerspice.cpp, qt/qscilexerspice.h, qt/qscilexersql.cpp, + qt/qscilexersql.h, qt/qscilexertcl.cpp, qt/qscilexertcl.h, + qt/qscilexertex.cpp, qt/qscilexertex.h, qt/qscilexerverilog.cpp, + qt/qscilexerverilog.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, + qt/qscilexerxml.cpp, qt/qscilexerxml.h, qt/qscilexeryaml.cpp, + qt/qscilexeryaml.h, qt/qscimacro.cpp, qt/qscimacro.h, + qt/qsciprinter.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, qt/qscistyle.cpp, + qt/qscistyledtext.h: + Removed all support for Qt3 and PyQt3. + [b33b2f06716e] + + * Python/configure-old.py, Python/configure.py, designer- + Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, + qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro: + The updated code now compiles. + [35d05076c62f] + + * cocoa/InfoBar.h, cocoa/InfoBar.mm, cocoa/InfoBarCommunicator.h, + cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/QuartzTextLayout.h, + cocoa/QuartzTextStyle.h, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework + .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.h, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, + cocoa/ScintillaView.h, cocoa/ScintillaView.mm, + cocoa/checkbuildosx.sh, cppcheck.suppress, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/index.html, gtk/Converter.h, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, + include/Platform.h, include/SciLexer.h, include/Scintilla.h, + include/Scintilla.iface, lexers/LexAbaqus.cxx, lexers/LexAsm.cxx, + lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexBibTeX.cxx, + lexers/LexCPP.cxx, lexers/LexCmake.cxx, lexers/LexCoffeeScript.cxx, + lexers/LexDMAP.cxx, lexers/LexDMIS.cxx, lexers/LexECL.cxx, + lexers/LexEScript.cxx, lexers/LexForth.cxx, lexers/LexFortran.cxx, + lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, + lexers/LexHex.cxx, lexers/LexKix.cxx, lexers/LexLua.cxx, + lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, lexers/LexModula.cxx, + lexers/LexMySQL.cxx, lexers/LexOthers.cxx, lexers/LexPS.cxx, + lexers/LexPerl.cxx, lexers/LexRegistry.cxx, lexers/LexRuby.cxx, + lexers/LexRust.cxx, lexers/LexSQL.cxx, lexers/LexScriptol.cxx, + lexers/LexSpecman.cxx, lexers/LexTCL.cxx, lexers/LexTCMD.cxx, + lexers/LexTxt2tags.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, + lexers/LexVisualProlog.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, + lexlib/CharacterCategory.cxx, lexlib/CharacterSet.cxx, + lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerModule.cxx, + lexlib/LexerModule.h, lexlib/LexerNoExceptions.cxx, + lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, + lexlib/PropSetSimple.cxx, lexlib/SparseState.h, lexlib/StringCopy.h, + lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, + lexlib/WordList.cxx, lexlib/WordList.h, lib/README.doc, + qt/qscintilla.pro, scripts/GenerateCaseConvert.py, + scripts/GenerateCharacterCategory.py, scripts/HFacer.py, + scripts/HeaderOrder.txt, scripts/LexGen.py, + scripts/ScintillaData.py, src/AutoComplete.cxx, src/AutoComplete.h, + src/CallTip.cxx, src/CaseConvert.cxx, src/CaseFolder.cxx, + src/Catalogue.cxx, src/CellBuffer.cxx, src/CellBuffer.h, + src/CharClassify.cxx, src/ContractionState.cxx, + src/ContractionState.h, src/Decoration.cxx, src/Decoration.h, + src/Document.cxx, src/Document.h, src/EditModel.cxx, + src/EditModel.h, src/EditView.cxx, src/EditView.h, src/Editor.cxx, + src/Editor.h, src/ExternalLexer.cxx, src/ExternalLexer.h, + src/FontQuality.h, src/Indicator.cxx, src/Indicator.h, + src/KeyMap.cxx, src/KeyMap.h, src/LineMarker.cxx, src/LineMarker.h, + src/MarginView.cxx, src/MarginView.h, src/Partitioning.h, + src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, + src/PositionCache.h, src/RESearch.cxx, src/RESearch.h, + src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, + src/Selection.h, src/SplitVector.h, src/Style.cxx, src/Style.h, + src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, + src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/XiteQt.py, + test/XiteWin.py, test/lexTests.py, test/simpleTests.py, + test/unit/LICENSE_1_0.txt, test/unit/README, + test/unit/SciTE.properties, test/unit/catch.hpp, test/unit/makefile, + test/unit/test.mak, test/unit/testCellBuffer.cxx, + test/unit/testCharClassify.cxx, test/unit/testContractionState.cxx, + test/unit/testDecoration.cxx, test/unit/testPartitioning.cxx, + test/unit/testRunStyles.cxx, test/unit/testSparseState.cxx, + test/unit/testSplitVector.cxx, test/unit/testUnicodeFromUTF8.cxx, + test/unit/unitTest.cxx, version.txt, win32/HanjaDic.cxx, + win32/HanjaDic.h, win32/PlatWin.cxx, win32/PlatWin.h, + win32/SciLexer.vcxproj, win32/ScintRes.rc, win32/ScintillaWin.cxx, + win32/deps.mak, win32/makefile, win32/scintilla.mak: + Added the initial import of Scintilla v3.5.4. + [025db9484942] + + * lib/GPL_EXCEPTION.TXT, lib/GPL_EXCEPTION_ADDENDUM.TXT, + lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/OPENSOURCE-NOTICE.TXT, + qt/qscintilla_ru.qm, qt/qscintilla_ru.ts: + Merged the 2.8-maint branch into the default. + [efe1067a091a] + +2015-03-19 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed QsciScintilla::clearMarginText(). + [885b972e38df] <2.8-maint> + +2015-02-14 Phil Thompson + + * Makefile, Python/configure.py: + Installing into a virtual env should now work. The internal build + system supports sip5. + [62d128cc92de] <2.8-maint> + +2015-02-08 Phil Thompson + + * Python/configure.py: + Use sip5 if available. + [6f5e4b0dae8f] <2.8-maint> + +2015-01-02 Phil Thompson + + * Python/configure.py, lib/LICENSE.commercial.short, lib/LICENSE.gpl, + lib/LICENSE.gpl.short, qt/InputMethod.cpp: + Updated the copyright notices. + [50b9b459dc48] <2.8-maint> + + * Python/configure-old.py: + Fixed configure-old.py for previews. + [7ff9140391e4] <2.8-maint> + +2014-12-22 Phil Thompson + + * build.py, lib/LICENSE.GPL3, lib/LICENSE.commercial.short, + lib/LICENSE.gpl, lib/LICENSE.gpl.short: + More license tweaks. + [f3e84d697877] <2.8-maint> + + * build.py, lib/GPL_EXCEPTION.TXT, lib/GPL_EXCEPTION_ADDENDUM.TXT, + lib/LICENSE.GPL2, lib/LICENSE.gpl.short, lib/OPENSOURCE-NOTICE.TXT, + lib/README.doc: + Aligned the GPL licensing with Qt. + [aa58ba575cac] <2.8-maint> + +2014-12-21 Phil Thompson + + * lib/LICENSE.commercial: + Updated the commercial license to v4.0. + [fd91beaa78dd] <2.8-maint> + +2014-11-16 Phil Thompson + + * build.py: + A source package now includes a full ChangeLog. + [ba92c1d5c839] <2.8-maint> + +2014-09-11 Phil Thompson + + * .hgtags: + Added tag 2.8.4 for changeset e18756e8cf86 + [e7f7a594518d] <2.8-maint> + + * .hgignore, NEWS: + Released as v2.8.4. + [e18756e8cf86] [2.8.4] <2.8-maint> + +2014-09-04 Phil Thompson + + * NEWS: + Updated the NEWS file. + [e4e3562b54cb] <2.8-maint> + +2014-09-03 Phil Thompson + + * Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, + qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Added the missing SCI_SETHOTSPOTSINGLELINE to QsciScintillaBase. + Added resetHotspotForegroundColor(), resetHotspotBackgroundColor(), + setHotspotForegroundColor(), setHotspotBackgroundColor(), + setHotspotUnderline() and setHotspotWrap() to QsciScintilla. + [2da018f7e48c] <2.8-maint> + +2014-07-31 Phil Thompson + + * qt/qsciscintilla.cpp: + Attempted to improve the auto-indentation behaviour so that the + indentation of a line is maintained if a new line has been inserted + above by pressing enter at the start of the line. + [aafc4a7247fb] <2.8-maint> + +2014-07-11 Phil Thompson + + * Python/configure.py: + Fixed the installation of the .api file. + [aae8494847ff] <2.8-maint> + +2014-07-10 Phil Thompson + + * Python/configure.py, designer-Qt4Qt5/designer.pro, + qt/qscintilla.pro: + Fixes to work around QTBUG-39300. Fix when building with a + configuration file. + [1051e8c260fd] <2.8-maint> + +2014-07-03 Phil Thompson + + * .hgtags: + Added tag 2.8.3 for changeset e9cb8530f97f + [bb531051c8f3] <2.8-maint> + + * NEWS: + Released as v2.8.3. + [e9cb8530f97f] [2.8.3] <2.8-maint> + +2014-07-01 Phil Thompson + + * Python/configure.py: + Fixed a cut-and-paste bug in configure.py. + [5f7c4c6c9a29] <2.8-maint> + + * Python/configure.py: + Updated to the latest build system boilerplate. + [ee0b9a647e7a] <2.8-maint> + +2014-06-30 Phil Thompson + + * Makefile, Python/configure.py: + Updates to the build system and the latest boilerplate configure.py. + [8485111172c7] <2.8-maint> + +2014-06-19 Phil Thompson + + * qt/qscilexercoffeescript.cpp, qt/qscintilla.pro, + qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_es.ts, qt/qscintilla_fr.qm, + qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm, qt/qscintilla_ru.ts: + Updated CoffeeScript keywords and German translations from Detlev. + Updated Spanish translations from Jaime. Removed the Russian + translations as none were current. + [978fe16935c4] <2.8-maint> + +2014-06-15 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the translation source files. + [440ab56f1863] <2.8-maint> + +2014-06-09 Phil Thompson + + * Python/sip/qscilexercoffeescript.sip, Python/sip/qscimodcommon.sip, + Python/sip/qsciscintillabase.sip: + Added QsciLexerCoffeeScript to the Python bindings. + [36a6e2123a69] <2.8-maint> + + * qt/qscilexercoffeescript.h: + QsciLexerCoffeeScript property setters are no longer virtual slots. + [eef97550eb16] <2.8-maint> + + * qt/qscilexercoffeescript.cpp, qt/qscilexercoffeescript.h, + qt/qscintilla.pro: + Added the QsciLexerCoffeeScript class. + [0cf56e9cd32a] <2.8-maint> + +2014-06-03 Phil Thompson + + * Python/configure.py: + Fixes for Python v2.6. + [9b7b5393f228] <2.8-maint> + +2014-06-01 Phil Thompson + + * Python/configure.py: + Fixed a regression in configure.py when using the -n or -o options. + [f7b1c9821894] <2.8-maint> + +2014-05-29 Phil Thompson + + * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: + Fixes for Qt3. + [4d0a54024b52] <2.8-maint> + + * qt/PlatQt.cpp, qt/qscilexer.cpp, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qscistyle.cpp: + Font sizes are now handled as floating point values rather than + integers. + [ea017cc2b198] <2.8-maint> + +2014-05-26 Phil Thompson + + * .hgtags: + Added tag 2.8.2 for changeset 5aab3ae01e0e + [6cc6eec7c440] <2.8-maint> + + * NEWS: + Released as v2.8.2. + [5aab3ae01e0e] [2.8.2] <2.8-maint> + + * Python/sip/qsciscintillabase.sip: + Updated the sub-class converter code. + [9b276dae576d] <2.8-maint> + + * Makefile: + Internal build system fixes. + [b29b24829b0b] <2.8-maint> + +2014-05-24 Phil Thompson + + * Makefile, Python/configure.py: + Fixed some build regressions with PyQt4. + [175b657ad031] <2.8-maint> + +2014-05-18 Phil Thompson + + * Makefile: + Updates to the top-level Makefile for the latest Android tools. + [405fb3eb5473] <2.8-maint> + +2014-05-17 Phil Thompson + + * Makefile: + Added the PyQt4 against Qt5 on the iPhone simulator build target. + [c31ae5795eec] <2.8-maint> + +2014-05-16 Phil Thompson + + * Makefile, Python/configure.py: + Use the PyQt .sip files in sysroot when cross-compiling. + [5d8e8b8ddfe5] <2.8-maint> + + * Makefile, Python/configure.py: + Replaced pyqt_sip_flags with pyqt_disabled_features in the + configuration file. + [f209403c183b] <2.8-maint> + +2014-05-15 Phil Thompson + + * Makefile, Python/sip/qscimod5.sip: + The PyQt5 bindings now run on the iOS simulator. + [056871b18335] <2.8-maint> + + * Makefile, Python/configure.py: + Building the Python bindings for the iOS simulator now works. + [9dfcea4447b8] <2.8-maint> + + * Makefile: + Updated the main Makefile for the Qt v5.2 iOS support. + [a619fd411878] <2.8-maint> + +2014-05-14 Phil Thompson + + * Python/configure.py: + Don't create the .api file if it isn't going to be installed. + [79db1145e882] <2.8-maint> + +2014-05-12 Phil Thompson + + * Python/configure.py: + Added the --sysroot, --no-sip-files and --no-qsci-api options to + configure.py. + [10642d7deba9] <2.8-maint> + +2014-05-05 Phil Thompson + + * Makefile: + Updated the internal build system for the combined iOS/Android Qt + installation. + [9097d3096b70] <2.8-maint> + +2014-05-04 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts: + Updated German translations from Detlev. + [d4f631ee3aaf] <2.8-maint> + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [51350008c8a4] <2.8-maint> + +2014-04-30 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the .ts files. + [4c5f88b22952] <2.8-maint> + +2014-04-29 Phil Thompson + + * Python/sip/qscilexerpo.sip, Python/sip/qscimodcommon.sip, + qt/qscilexerpo.cpp, qt/qscilexerpo.h, qt/qscintilla.pro: + Added the QsciLexerPO class. + [d42e44550d80] <2.8-maint> + + * Python/sip/qscilexeravs.sip, Python/sip/qscimodcommon.sip, + qt/qscilexeravs.cpp, qt/qscilexeravs.h, qt/qscintilla.pro: + Added the QsciLexerAVS class. + [ed6edb6ec205] <2.8-maint> + +2014-04-27 Phil Thompson + + * Python/configure.py: + Fixes for the refactored configure.py. + [21b9fa66338e] <2.8-maint> + + * Python/configure.py: + Initial refactoring of configure.py so that it is implemented as + configurable (and reusable) boilerplate. + [615d75a88db9] <2.8-maint> + +2014-04-24 Phil Thompson + + * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + setEnabled() now implements the expected visual effects. + [3e4254394b08] <2.8-maint> + +2014-03-22 Phil Thompson + + * Python/configure.py: + Fixed the handling of the --pyqt-sip-flags option. Restored the + specification of the Python library directory for Windows. + [3ea496d62b9f] <2.8-maint> + + * Python/configure.py, qt/features/qscintilla2.prf, qt/qscintilla.pro: + Added the --pyqt-sip-flags to configure.py to avoid having to + introspect PyQt. Fixed the .prf file for OS/X. Tweaks to + configure.py so that a configuration file will use the same names as + PyQt5. + [77ff3a21d00a] <2.8-maint> + +2014-03-21 Phil Thompson + + * Makefile, lib/README.doc, qt/qscintilla.pro: + Changes to the .pro file to build a static library without having to + edit it. + [f82637449276] <2.8-maint> + +2014-03-17 Phil Thompson + + * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: + Fixed building against Qt v5.0.x. + [d68e28068b67] <2.8-maint> + +2014-03-14 Phil Thompson + + * .hgtags: + Added tag 2.8.1 for changeset 6bb7ab27c958 + [dfd473e8336b] <2.8-maint> + + * NEWS: + Released as v2.8.1. + [6bb7ab27c958] [2.8.1] <2.8-maint> + + * qt/SciClasses.cpp: + Fixed the display of UTF-8 call tips. + [3f0ca7ba60a0] <2.8-maint> + +2014-03-12 Phil Thompson + + * qsci/api/python/Python-3.4.api: + Added the .api file for Python v3.4. + [3db067b6dcec] <2.8-maint> + +2014-03-05 Phil Thompson + + * qt/PlatQt.cpp: + Revised attempt at the outline of alpha rectangles in case Qt ignore + the alpha of the pen. + [86ab8898503e] <2.8-maint> + + * qt/PlatQt.cpp: + Fixed the setting of the pen when drawing alpha rectangles. + [3f4ff2e8aca3] <2.8-maint> + +2014-02-09 Phil Thompson + + * Python/configure.py: + The Python module now has the correct install name on OS/X. + [eec8c704418a] <2.8-maint> + +2014-02-04 Phil Thompson + + * qt/qscicommand.cpp, qt/qscicommand.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Fixed a problem entering non-ASCII characters that clashed with + Scintilla's SCK_* values. Key_Enter, Key_Backtab, Key_Super_L, + Key_Super_R and Key_Menu are now valid QsciCommand keys. + [94aec4f075df] <2.8-maint> + +2014-01-31 Phil Thompson + + * qt/qsciscintilla.cpp: + Make sure the editor is active after a selection of a user list + entry. + [e0f2106777d0] <2.8-maint> + +2014-01-23 Phil Thompson + + * qt/SciClasses.cpp: + On Linux, single clicking on an item in an auto-completion list now + just selects the itemm (rather than inserting the item) to be + consistent with other platforms. + [d916bbbf6517] <2.8-maint> + + * qt/qsciscintillabase.cpp: + Fix the handling of the auto-completion list when losing focus. + [a67b51ac8611] <2.8-maint> + +2014-01-22 Phil Thompson + + * qt/InputMethod.cpp, qt/qsciscintillabase.cpp: + Fixed building against Qt4. + [bf0a5f984fc1] <2.8-maint> + +2014-01-19 Phil Thompson + + * NEWS: + Updated the NEWS file. + [da2a76da712e] <2.8-maint> + +2014-01-18 Phil Thompson + + * qt/InputMethod.cpp: + Another attempt to fix input events on losing focus. + [6de3ab62fade] <2.8-maint> + + * lib/README.doc: + Added the qmake integration section to the docs. + [2918e4760c36] <2.8-maint> + +2014-01-07 Phil Thompson + + * Makefile: + Added Android to the internal build system. + [3be74b3e89e9] <2.8-maint> + +2014-01-06 Phil Thompson + + * qt/InputMethod.cpp, qt/qsciscintillabase.cpp: + Newlines can now be entered on iOS. + [8d23447dbd4d] <2.8-maint> + +2014-01-05 Phil Thompson + + * qt/InputMethod.cpp: + See if we can detect a input methdo event generated when losing + focus and not to clear the selection. + [8e4216289efe] <2.8-maint> + +2014-01-04 Phil Thompson + + * Python/sip/qsciprinter.sip: + The Python bindings now respect the PyQt_Printer feature. + [c3106f715803] <2.8-maint> + +2014-01-03 Phil Thompson + + * qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Added support for software input panels with Qt v5. + [d4499b61ff04] <2.8-maint> + + * qt/qsciscintilla.cpp: + Disable input methods when read-only (rather than non-UTF8) to be + consistent with Qt. + [f8817d4a47e3] <2.8-maint> + + * qt/qscintilla.pro, qt/qsciprinter.h: + Fixed the .pro file so that QT_NO_PRINTER is set properly and + removed the workaround. + [b5a6709d814a] <2.8-maint> + +2014-01-02 Phil Thompson + + * qt/PlatQt.cpp: + Finally fixed buffered drawing on retina displays. + [f8d23103df70] <2.8-maint> + + * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: + Fixes for buffered drawing on retina displays. (Not yet correct, but + close.) + [a3b36be44112] <2.8-maint> + + * Makefile: + Changed the build system for the example on the iOS simulator so + that qmake is only used to generate the .xcodeproj file. + [179dbf5ba385] <2.8-maint> + + * Makefile: + Added the building of the example to the main Makefile. + [aec2ac3ac591] <2.8-maint> + + * Makefile: + Added iOS simulator targets to the build system. + [72af8241b261] <2.8-maint> + + * Makefile, build.py, lib/LICENSE.GPL2, lib/LICENSE.GPL3, + lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, + qt/InputMethod.cpp: + Updated copyright notices. + [f21e016499fe] <2.8-maint> + + * qt/MacPasteboardMime.cpp, qt/qsciprinter.cpp, qt/qsciprinter.h, + qt/qsciscintillabase.cpp: + Fixes for building for iOS. + [46d25e648b4a] <2.8-maint> + +2013-12-31 Phil Thompson + + * Python/configure.py, build.py, designer-Qt4Qt5/designer.pro, + example-Qt4Qt5/application.pro, lib/README.doc, + qt/features/qscintilla2.prf, qt/qscintilla.pro: + Implemented the qscintilla2.prf feature file and updated everything + to use it. + [c3bfef1a55ad] <2.8-maint> + +2013-12-29 Phil Thompson + + * qt/ScintillaQt.h: + Added some additional header file dependencies. + [7ec67eced9de] <2.8-maint> + +2013-12-21 Phil Thompson + + * qt/MacPasteboardMime.cpp, qt/ScintillaQt.cpp: + Fixes for building against Qt3. + [f25cbda736fd] <2.8-maint> + +2013-12-16 Phil Thompson + + * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: + Updated the plugin and example .pro files to work around the qmake + incompatibilities introduced in Qt v5.2.0. + [a14729b2702d] <2.8-maint> + +2013-12-15 Phil Thompson + + * qt/qsciscintillabase.cpp: + Fixed the previous fix. + [6c322fa1b20f] <2.8-maint> + +2013-12-14 Phil Thompson + + * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: + Backed out the attempted fix for retina displays at it needs more + work. As a workaround buffered writes are disabled if a retina + display is detected. + [a1f648d1025e] <2.8-maint> + +2013-12-13 Phil Thompson + + * qt/qscintilla.pro: + Enabled exceptions in the .pro file. + [6e07131f6741] <2.8-maint> + +2013-12-12 Phil Thompson + + * qt/PlatQt.cpp: + Create pixmaps for buffered drawing using the same pixel ratio as + the actual device. + [f4f706006071] <2.8-maint> + +2013-12-09 Phil Thompson + + * qt/qscilexeroctave.cpp: + Updated the keywords defined for the Octave lexer. + [9ccf1c74f266] <2.8-maint> + +2013-12-06 Phil Thompson + + * qt/ScintillaQt.cpp: + More scrollbar fixes. + [194a2142c9b6] <2.8-maint> + +2013-12-05 Phil Thompson + + * qt/ScintillaQt.cpp, qt/qscintilla.pro: + Fixes to the scrollbar visibility handling. + [5e8a96258ab0] <2.8-maint> + +2013-12-04 Phil Thompson + + * qt/PlatQt.cpp: + Fixed the implementation of SurfaceImpl::LogPixelsY() (even though + it is never called). + [9ef0387cfc08] <2.8-maint> + +2013-11-08 Phil Thompson + + * .hgtags: + Added tag 2.8 for changeset 562785a5f685 + [fc52bfaa75c4] + + * NEWS: + Released as v2.8. + [562785a5f685] [2.8] + +2013-11-05 Phil Thompson + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [e7a128a28157] + +2013-11-04 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qscilexerpascal.cpp, qt/qsciscintillabase.h: + Added support for the new v3.3.6 features to the low-level API. + [e553c1263387] + + * Makefile, NEWS, cocoa/Framework.mk, cocoa/InfoBar.mm, + cocoa/PlatCocoa.mm, cocoa/SciTest.mk, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework + .xcodeproj/project.pbxproj, cocoa/ScintillaView.h, + cocoa/ScintillaView.mm, cocoa/checkbuildosx.sh, cocoa/common.mk, + doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/index.html, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/makefile, include/ILexer.h, + include/Platform.h, include/SciLexer.h, include/Scintilla.h, + include/Scintilla.iface, lexers/LexCPP.cxx, + lexers/LexCoffeeScript.cxx, lexers/LexOthers.cxx, + lexers/LexPascal.cxx, lexers/LexPerl.cxx, lexers/LexRust.cxx, + lexers/LexSQL.cxx, lexers/LexVisualProlog.cxx, + lexlib/StyleContext.h, lexlib/SubStyles.h, lexlib/WordList.cxx, + lib/README.doc, qt/qscintilla.pro, src/Catalogue.cxx, + src/Document.cxx, src/Editor.cxx, src/ScintillaBase.cxx, + src/ScintillaBase.h, src/ViewStyle.cxx, src/ViewStyle.h, + test/XiteQt.py, test/simpleTests.py, version.txt, win32/PlatWin.cxx, + win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, + win32/scintilla.mak: + Merged Scintilla v3.3.6. + [ada0941dec52] + +2013-10-07 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts: + Updated German translations from Detlev. + [6c0af6af651c] + + * Makefile, build.py, qt/MacPasteboardMime.cpp, qt/qscintilla.pro, + qt/qsciscintillabase.cpp: + Reinstated support for rectangular selections on OS/X for Qt v5.2 + and later. + [dbfdf7be4793] + +2013-10-04 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the translation source files. + [7ed4bf7ed4e7] + + * qt/qscilexercpp.cpp: + Added missing descriptions to the C++ lexer settings. + [55d7627bb129] + +2013-10-01 Phil Thompson + + * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: + Fixed the building of the Designer plugin and the example for OS/X. + [a67f71b06d3c] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/InputMethod.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added the remaining non-provisional Scintilla v3.3.5 features to the + low-level API. + [4e8d0b46ebc0] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the translation source files. + [4beefc0d95ec] + + * NEWS, Python/sip/qscilexercpp.sip, Python/sip/qsciscintillabase.sip, + qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qsciscintillabase.h: + Updated the lexers for Scintilla v3.3.5. + [fc901a2a491f] + +2013-09-30 Phil Thompson + + * Python/configure-old.py, Python/configure.py, README, + cocoa/InfoBar.mm, cocoa/PlatCocoa.mm, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework + .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/English.lproj/MainMenu.xib, + cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cppcheck.suppress, + delbin.bat, designer-Qt4Qt5/designer.pro, doc/Lexer.txt, + doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/ScintillaRelated.html, + doc/ScintillaToDo.html, doc/index.html, example- + Qt4Qt5/application.pro, gtk/Converter.h, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, include/Face.py, + include/HFacer.py, include/ILexer.h, include/Platform.h, + include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, + lexers/LexA68k.cxx, lexers/LexAU3.cxx, lexers/LexAVE.cxx, + lexers/LexAda.cxx, lexers/LexAsm.cxx, lexers/LexAsn1.cxx, + lexers/LexBash.cxx, lexers/LexBullant.cxx, lexers/LexCOBOL.cxx, + lexers/LexCPP.cxx, lexers/LexCoffeeScript.cxx, lexers/LexConf.cxx, + lexers/LexCrontab.cxx, lexers/LexCsound.cxx, lexers/LexD.cxx, + lexers/LexECL.cxx, lexers/LexForth.cxx, lexers/LexGAP.cxx, + lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, + lexers/LexInno.cxx, lexers/LexKVIrc.cxx, lexers/LexLaTeX.cxx, + lexers/LexLisp.cxx, lexers/LexLout.cxx, lexers/LexLua.cxx, + lexers/LexMMIXAL.cxx, lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, + lexers/LexMatlab.cxx, lexers/LexModula.cxx, lexers/LexMySQL.cxx, + lexers/LexNsis.cxx, lexers/LexOpal.cxx, lexers/LexOthers.cxx, + lexers/LexPO.cxx, lexers/LexPerl.cxx, lexers/LexPowerShell.cxx, + lexers/LexPython.cxx, lexers/LexR.cxx, lexers/LexRuby.cxx, + lexers/LexSTTXT.cxx, lexers/LexScriptol.cxx, lexers/LexSpice.cxx, + lexers/LexTCMD.cxx, lexers/LexYAML.cxx, lexlib/Accessor.cxx, + lexlib/Accessor.h, lexlib/CharacterCategory.cxx, + lexlib/CharacterCategory.h, lexlib/CharacterSet.cxx, + lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerModule.cxx, + lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, + lexlib/LexerSimple.cxx, lexlib/OptionSet.h, + lexlib/PropSetSimple.cxx, lexlib/PropSetSimple.h, + lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, + lexlib/WordList.cxx, lexlib/WordList.h, lib/README.doc, + qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, + qt/qsciscintillabase.cpp, scripts/Face.py, scripts/FileGenerator.py, + scripts/GenerateCaseConvert.py, + scripts/GenerateCharacterCategory.py, scripts/HFacer.py, + scripts/LexGen.py, scripts/ScintillaData.py, src/AutoComplete.cxx, + src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, + src/CaseConvert.cxx, src/CaseConvert.h, src/CaseFolder.cxx, + src/CaseFolder.h, src/Catalogue.cxx, src/CellBuffer.cxx, + src/CellBuffer.h, src/ContractionState.cxx, src/Decoration.cxx, + src/Decoration.h, src/Document.cxx, src/Document.h, src/Editor.cxx, + src/Editor.h, src/ExternalLexer.cxx, src/FontQuality.h, + src/Indicator.cxx, src/KeyMap.cxx, src/KeyMap.h, src/LexGen.py, + src/LineMarker.cxx, src/LineMarker.h, src/Partitioning.h, + src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, + src/PositionCache.h, src/RESearch.cxx, src/RESearch.h, + src/RunStyles.cxx, src/RunStyles.h, src/SVector.h, + src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, + src/SplitVector.h, src/Style.cxx, src/Style.h, + src/UniConversion.cxx, src/UniConversion.h, src/UnicodeFromUTF8.h, + src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, src/XPM.h, + test/README, test/ScintillaCallable.py, test/XiteQt.py, + test/XiteWin.py, test/examples/x.lua, test/examples/x.lua.styled, + test/examples/x.pl, test/examples/x.pl.styled, test/examples/x.rb, + test/examples/x.rb.styled, test/lexTests.py, + test/performanceTests.py, test/simpleTests.py, + test/unit/testCharClassify.cxx, test/unit/testContractionState.cxx, + test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, + test/unit/testSplitVector.cxx, version.txt, win32/PlatWin.cxx, + win32/PlatWin.h, win32/ScintRes.rc, win32/ScintillaWin.cxx, + win32/deps.mak, win32/makefile, win32/scintilla.mak, + win32/scintilla_vc6.mak: + Initial merge of Scintilla v3.3.5. + [40933b62f5ed] + +2013-09-14 Phil Thompson + + * Python/configure-ng.py, Python/configure.py, designer- + Qt4/designer.pro, designer-Qt4/qscintillaplugin.cpp, designer- + Qt4/qscintillaplugin.h: + Merged the 2.7-maint branch with the trunk. + [7288d97c54b0] + +2013-08-17 Phil Thompson + + * Python/sip/qsciscintillabase.sip: + Fixed a missing const in the .sip files. + [8b0425b87953] <2.7-maint> + +2013-06-27 Phil Thompson + + * NEWS, Python/configure-old.py, Python/configure.py, + Python/sip/qsciscintillabase.sip, designer-Qt4Qt5/designer.pro, + example-Qt4Qt5/application.pro, qt/InputMethod.cpp, + qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Added support for input methods. + [b97af619044b] <2.7-maint> + +2013-06-16 Phil Thompson + + * .hgtags: + Added tag 2.7.2 for changeset 9ecd14550589 + [2b1f187f29c6] <2.7-maint> + + * NEWS: + Released as v2.7.2. + [9ecd14550589] [2.7.2] <2.7-maint> + +2013-06-12 Phil Thompson + + * Python/configure.py: + Fixed a configure.py bug. + [cb062c6f9189] <2.7-maint> + +2013-05-07 Phil Thompson + + * Makefile, Python/configure.py: + Fixes for the PyQt5 support. + [0714ef531ead] <2.7-maint> + + * Makefile, NEWS, Python/configure.py, Python/sip/qscimod5.sip, + lib/README.doc: + Added support for building against PyQt5. + [c982ff1b86f7] <2.7-maint> + +2013-05-05 Phil Thompson + + * build.py: + Changed the format of the name of a snapshot to match other + packages. + [d1f87bbc8377] <2.7-maint> + +2013-05-04 Phil Thompson + + * qt/PlatQt.cpp: + Significantly improved the performance of measuring the width of + text so that very long lines (100,000 characters) can be handled. + [5c88dc344f69] <2.7-maint> + +2013-04-08 Phil Thompson + + * Python/configure.py: + configure.py now issues a more explicit error message if QtCore + cannot be imported. + [4d0097b1ff05] <2.7-maint> + + * Python/configure.py: + Fixed a qmake warning message from configure.py. + [2363c96edeb0] <2.7-maint> + +2013-04-02 Phil Thompson + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + The default EOL mode on OS/X is now EolUnix. Clarified the + documentation for EolMode. + [a436460d0300] <2.7-maint> + +2013-03-15 Phil Thompson + + * Python/configure.py: + Further fixes for configure.py. + [78fa6fef2c76] <2.7-maint> + +2013-03-13 Phil Thompson + + * qt/qscilexer.h: + Clarified the description of QSciLexer::description(). + [688b482379e3] <2.7-maint> + + * Python/configure.py: + Fixed the last (trivial) change. + [0a3494ba669a] <2.7-maint> + +2013-03-12 Phil Thompson + + * Python/configure.py: + configure.py now gives the user more information about the copy of + sip being used. + [5c3be581d62b] <2.7-maint> + +2013-03-07 Phil Thompson + + * Python/configure.py: + On OS/X configure.py will explicitly set the qmake spec to macx-g++ + (Qt4) or macx-clang (Qt5) if the default might be macx-xcode. Added + the --spec option to configure.py. + [36a9bf2fbebd] <2.7-maint> + +2013-03-05 Phil Thompson + + * Python/configure.py: + Minor cosmetic tweaks to configure.py. + [296cd10747b7] <2.7-maint> + + * qt/PlatQt.cpp, qt/SciClasses.cpp, qt/qscicommandset.cpp, + qt/qscintilla.pro, qt/qsciscintillabase.cpp: + Removed the remaining uses of Q_WS_* for Qt v5. + [7fafd5c09eea] <2.7-maint> + +2013-03-01 Phil Thompson + + * .hgtags: + Added tag 2.7.1 for changeset 2583dc3dbc8d + [0674c291eab4] <2.7-maint> + + * NEWS: + Released as v2.7.1. + [2583dc3dbc8d] [2.7.1] <2.7-maint> + +2013-02-28 Phil Thompson + + * lexlib/CharacterSet.h: + Re-applied a fix to the underlying code thay got lost when Scintilla + v3.23 was merged. + [ee9eeec7d796] <2.7-maint> + +2013-02-26 Phil Thompson + + * qt/qsciapis.cpp: + A fix for the regression introduced with the previous fix. + [154428cebb5e] <2.7-maint> + +2013-02-19 Phil Thompson + + * NEWS, qt/qsciapis.cpp, qt/qscintilla.pro: + Fixed an autocompletion bug where there are entries Foo.* and + FooBar. + [620d72d86980] <2.7-maint> + +2013-02-06 Phil Thompson + + * Python/configure.py: + configure.py fixes for Linux. + [031b5b767926] <2.7-maint> + + * Python/configure.py: + Added the --sip-incdir and --pyqt-sipdir options to configure.py and + other fixes for building on Windows. + [517a3d0243fd] <2.7-maint> + + * Makefile, NEWS: + Updated the NEWS file. + [eb00e08e1950] <2.7-maint> + + * Makefile, Python/configure.py: + Fixed configure.py for Qt5. + [7ddb5bf2030c] <2.7-maint> + + * Python/configure-ng.py, Python/configure-old.py, + Python/configure.py, build.py, lib/README.doc: + Completed configure-ng.py and renamed it configure.py. The old + configure.py is now called configure-old.py. + [8d58b2899080] <2.7-maint> + +2013-02-05 Phil Thompson + + * Python/configure-ng.py: + configure-ng.py now uses -fno-exceptions on Linux and OS/X. + configure-ng.py now hides unneeded symbols on Linux. + [391e4f56b009] <2.7-maint> + + * Python/configure-ng.py: + configure-ng.py will now install the .sip and .api files. + [e228d58a670c] <2.7-maint> + + * Python/configure-ng.py: + configure-ng.py will now create a Makefile that will build the + Python module. + [cb47ace62a70] <2.7-maint> + +2013-02-02 Phil Thompson + + * qt/qsciglobal.h: + Use Q_OS_WIN for compatibility for Qt5. + [da752cf4510a] <2.7-maint> + +2013-01-29 Phil Thompson + + * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: + Use macx rather than mac in the .pro files. + [ee818a367df7] <2.7-maint> + +2012-12-21 Phil Thompson + + * Python/configure-ng.py, Python/configure.py, designer- + Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, lib/README.doc, + qt/qscintilla.pro: + Various OS/X fixes so that setting DYLD_LIBRARY_PATH isn't + necessary. + [e7854b8b01e3] <2.7-maint> + +2012-12-19 Phil Thompson + + * build.py, designer-Qt4/designer.pro, designer- + Qt4/qscintillaplugin.cpp, designer-Qt4/qscintillaplugin.h, designer- + Qt4Qt5/designer.pro, designer-Qt4Qt5/qscintillaplugin.cpp, designer- + Qt4Qt5/qscintillaplugin.h, lib/README.doc: + Updated the Designer plugin for Qt5. + [77f575c87ebb] <2.7-maint> + +2012-12-08 Phil Thompson + + * .hgtags: + Added tag 2.7 for changeset 9bab1e7b02e3 + [5600138109ce] + + * NEWS: + Released as v2.7. + [9bab1e7b02e3] [2.7] + +2012-12-07 Phil Thompson + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime. + [b188c942422c] + + * NEWS: + Updated the NEWS file regarding Qt v5-rc1. + [be9e6b928921] + +2012-12-02 Phil Thompson + + * qt/qsciscintilla.cpp: + A final(?) fix for scroll bars and annotations. + [378f28e5b4b2] + + * Python/configure-ng.py: + More build system changes. + [f53fc8743ff1] + +2012-11-29 Phil Thompson + + * Python/configure-ng.py: + More configure script changes. + [434c9b3185a5] + + * Python/configure-ng.py: + More work on the new configure script. + [3a044732b799] + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, + qt/qscintilla_ru.qm: + Updated German translations from Detlev. + [9dab221845ca] + +2012-11-28 Phil Thompson + + * Python/configure-ng.py, build.py: + Added the start of the SIP v5 compatible build script. + [781d2af60cfc] + +2012-11-27 Phil Thompson + + * Python/configure.py: + Fixed the handling of the 'linux' platform in the Python bindings. + [835d5e3be69e] + +2012-11-26 Phil Thompson + + * qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Worked around Scintilla bugs related to scroll bars and annotations. + [edc190ecc6fc] + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the translation files. + [ec754f87a735] + + * NEWS, Python/sip/qscilexercss.sip, qt/qscilexercss.cpp, + qt/qscilexercss.h: + Updated the CSS lexer for Scintilla v3.23. + [011fba6d668d] + + * qt/qscilexercpp.h: + Fixed a couple of documentation typos. + [7c2d04c76bd6] + + * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, + qt/qscilexercpp.h: + Updated the C++ lexer for Scintilla v3.23. + [ad93ee355639] + +2012-11-24 Phil Thompson + + * Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h: + Updated the styles for the C++ lexer. + [153429503998] + +2012-11-23 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/PlatQt.cpp, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added CallTipsPosition, callTipsPosition() and + setCallTipsPosition(). + [7e5602869fee] + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.h: + Added SquigglePixmapIndicator to QsciScintilla::IndicatorStyle. + [ad98a5396151] + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added WrapFlagInMargin to QsciScintilla::WrapVisualFlag. + [a38c75c45fb3] + + * NEWS, qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qscistyle.cpp: + Created a back door to pass the Qt weight of a font avoiding lossy + conversions between Qt weights and Scintilla weights. The default + behaviour is now SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE which is a + change but reflects what people really expect. + [78ce86e97ad3] + +2012-11-21 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Updated the constants from Scintilla v3.23. + [a3a0768af999] + + * NEWS, Python/configure.py, include/Platform.h, lib/README.doc, + qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/SciClasses.cpp, + qt/ScintillaQt.cpp, qt/qscintilla.pro, src/ExternalLexer.h, + src/XPM.cxx, src/XPM.h: + Updated the platform support so that it compiles (but untested). + [abae8e56a6ea] + +2012-11-20 Phil Thompson + + * cocoa/InfoBar.h, cocoa/InfoBar.mm, cocoa/PlatCocoa.h, + cocoa/PlatCocoa.mm, cocoa/QuartzTextStyle.h, + cocoa/QuartzTextStyleAttribute.h, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, + cocoa/ScintillaFramework/English.lproj/InfoPlist.strings, cocoa/Scin + tillaFramework/ScintillaFramework.xcodeproj/project.pbxproj, + cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/English.lproj/InfoPlist.strings, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, + cocoa/ScintillaView.h, cocoa/ScintillaView.mm, + cocoa/checkbuildosx.sh, delbin.bat, delcvs.bat, + doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/ScintillaRelated.html, + doc/ScintillaToDo.html, doc/annotations.png, doc/index.html, + doc/styledmargin.png, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, + gtk/makefile, include/Face.py, include/ILexer.h, include/Platform.h, + include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, + include/ScintillaWidget.h, lexers/LexAVS.cxx, lexers/LexAda.cxx, + lexers/LexAsm.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, + lexers/LexCPP.cxx, lexers/LexCSS.cxx, lexers/LexCoffeeScript.cxx, + lexers/LexD.cxx, lexers/LexECL.cxx, lexers/LexFortran.cxx, + lexers/LexHTML.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, + lexers/LexMPT.cxx, lexers/LexNsis.cxx, lexers/LexOScript.cxx, + lexers/LexOthers.cxx, lexers/LexPO.cxx, lexers/LexPascal.cxx, + lexers/LexPerl.cxx, lexers/LexRuby.cxx, lexers/LexSQL.cxx, + lexers/LexScriptol.cxx, lexers/LexSpice.cxx, lexers/LexTADS3.cxx, + lexers/LexTCL.cxx, lexers/LexTCMD.cxx, lexers/LexVHDL.cxx, + lexers/LexVisualProlog.cxx, lexers/LexYAML.cxx, + lexlib/CharacterSet.h, lexlib/LexAccessor.h, + lexlib/PropSetSimple.cxx, macosx/ExtInput.cxx, macosx/ExtInput.h, + macosx/PlatMacOSX.cxx, macosx/PlatMacOSX.h, + macosx/QuartzTextLayout.h, macosx/QuartzTextStyle.h, + macosx/QuartzTextStyleAttribute.h, + macosx/SciTest/English.lproj/InfoPlist.strings, + macosx/SciTest/English.lproj/main.xib, macosx/SciTest/Info.plist, + macosx/SciTest/SciTest.xcode/project.pbxproj, + macosx/SciTest/SciTest_Prefix.pch, macosx/SciTest/main.cpp, + macosx/SciTest/version.plist, macosx/ScintillaCallTip.cxx, + macosx/ScintillaCallTip.h, macosx/ScintillaListBox.cxx, + macosx/ScintillaListBox.h, macosx/ScintillaMacOSX.cxx, + macosx/ScintillaMacOSX.h, macosx/TCarbonEvent.cxx, + macosx/TCarbonEvent.h, macosx/TRect.h, macosx/TView.cxx, + macosx/TView.h, macosx/deps.mak, macosx/makefile, + src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, + src/CallTip.h, src/Catalogue.cxx, src/CellBuffer.cxx, + src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, + src/Decoration.cxx, src/Document.cxx, src/Document.h, + src/Editor.cxx, src/Editor.h, src/ExternalLexer.h, + src/FontQuality.h, src/Indicator.cxx, src/Indicator.h, + src/LexGen.py, src/LineMarker.cxx, src/LineMarker.h, + src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, + src/PositionCache.h, src/RESearch.cxx, src/RunStyles.cxx, + src/SciTE.properties, src/ScintillaBase.cxx, src/ScintillaBase.h, + src/SplitVector.h, src/Style.cxx, src/Style.h, + src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, + src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/README, + test/examples/x.cxx, test/examples/x.cxx.styled, test/lexTests.py, + test/simpleTests.py, test/unit/makefile, + test/unit/testCharClassify.cxx, test/unit/testRunStyles.cxx, tgzsrc, + version.txt, win32/CheckD2D.cxx, win32/PlatWin.cxx, win32/PlatWin.h, + win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, + win32/scintilla.mak, win32/scintilla_vc6.mak, zipsrc.bat: + Initial merge of Scintilla v3.23. + [b116f361ac01] + + * example-Qt4/application.pro, example-Qt4/application.qrc, example- + Qt4/images/copy.png, example-Qt4/images/cut.png, example- + Qt4/images/new.png, example-Qt4/images/open.png, example- + Qt4/images/paste.png, example-Qt4/images/save.png, example- + Qt4/main.cpp, example-Qt4/mainwindow.cpp, example-Qt4/mainwindow.h: + Merged the 2.6 maintenance branch with the trunk. + [0bf4f7453c68] + +2012-11-14 Phil Thompson + + * Makefile, example-Qt4Qt5/application.pro, qt/qsciscintillabase.cpp: + Fixed the linking of the example on OS/X. + [e1d1f43fae71] <2.6-maint> + +2012-11-12 Phil Thompson + + * Makefile, qt/PlatQt.cpp, qt/qscimacro.cpp, qt/qsciscintilla.cpp, + qt/qscistyle.cpp: + Removed all calls that are deprecated in Qt5. The build system now + supports cross-compilation to the Raspberry Pi. + [afef9d2b3ab1] <2.6-maint> + +2012-11-02 Phil Thompson + + * qt/qscilexersql.h: + Added comments to the QsciLexerSQL documentation stating that + additional keywords must be defined using lower case. + [79a9274b77c3] <2.6-maint> + +2012-10-09 Phil Thompson + + * NEWS, lib/ed.py, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added a replace option to the test editor's find commands. Finished + implementing findFirstInSelection(). + [80df6cc89bae] <2.6-maint> + + * lib/ed.py: + Added the Find, Find in Selection and Find Next actions to the test + editor. + [4aad56aedbea] <2.6-maint> + +2012-10-03 Phil Thompson + + * lib/ed.py: + Added an internal copy of the hackable Python test editor. + [a67a6fe99937] <2.6-maint> + +2012-09-27 Phil Thompson + + * lib/gen_python3_api.py, qsci/api/python/Python-3.3.api: + Fixed the gen_python3_api.py script to be able to exclude module + hierachies. Added the API file for Python v3.3. + [06bbb2d1c227] <2.6-maint> + +2012-09-22 Phil Thompson + + * qt/ListBoxQt.cpp: + Fixed a problem building against versions of Qt4 prior to v4.7. + [7bf93d60a50b] <2.6-maint> + +2012-09-18 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added setOverwriteMode() and overwriteMode() to QsciScintilla. + [1affc53d2d88] <2.6-maint> + +2012-09-14 Phil Thompson + + * qt/qsciscintillabase.cpp: + Disable the use of QMacPasteboardMime for Qt v5-beta1. + [a6625d5928c6] <2.6-maint> + +2012-08-24 Phil Thompson + + * qt/qscilexerperl.cpp, qt/qscilexerperl.h: + Fixed auto-indentation for Perl. + [5eb1d97f95d6] <2.6-maint> + +2012-08-13 Phil Thompson + + * lexlib/CharacterSet.h: + Removed an incorrect assert() in the main Scintilla code. + [1aaf5e09d4b2] <2.6-maint> + +2012-08-09 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added QsciScintilla::wordAtLineIndex(). + [0c5d77aef4f7] <2.6-maint> + +2012-07-19 Phil Thompson + + * qt/qscintilla.pro, qt/qsciscintillabase.cpp: + Fixed key handling on Linux with US international layout which + generates non-ASCII sequences for quote characters. + [061ab2c5bea3] <2.6-maint> + +2012-06-20 Phil Thompson + + * .hgtags: + Added tag 2.6.2 for changeset f9d3d982c20f + [a5bb033cd9e0] <2.6-maint> + + * NEWS: + Released as v2.6.2. + [f9d3d982c20f] [2.6.2] <2.6-maint> + +2012-06-19 Phil Thompson + + * qt/qsciscintillabase.cpp: + Fixed pasting of text in UTF8 mode (and hopefully Latin1 mode as + well). + [6df653daef18] <2.6-maint> + + * qt/qsciscintillabase.cpp: + Rectangular selections are now always encoded as plain/text with an + explicit, and separate, marker to indicate that it is rectangular. + [012a0b2ca89f] <2.6-maint> + +2012-06-09 Phil Thompson + + * qt/qsciscintillabase.cpp: + Used the Mac method of marking rectangular selections as the '\0' + Scintilla hack just doesn't work with Qt. + [75020a35b5eb] <2.6-maint> + + * qt/qscintilla.pro: + Bumped the library version number. + [12f21729e254] <2.6-maint> + +2012-06-07 Phil Thompson + + * qt/qsciscintillabase.cpp: + Improved the support for rectangular selections and the + interoperability with other Scintilla based editors. + [a42942b57fb7] <2.6-maint> + + * qt/qsciscintillabase.cpp: + Fixed the middle button pasting of rectangular selections. + [db58aa6c6d7d] <2.6-maint> + + * qt/qscidocument.cpp: + Fixed a bug that seemed to mean the initial EOL mode was always + UNIX. + [88561cd29a60] <2.6-maint> + + * qt/qsciscintillabase.cpp: + Line endings are properly translated when dropping text. + [d21994584e87] <2.6-maint> + +2012-06-04 Phil Thompson + + * Makefile, qt/qsciprinter.h: + The Python bindings now build against Qt5. + [ff2a74e5aec2] <2.6-maint> + +2012-04-04 Phil Thompson + + * Makefile, NEWS, build.py, example-Qt4/application.pro, example- + Qt4/application.qrc, example-Qt4/images/copy.png, example- + Qt4/images/cut.png, example-Qt4/images/new.png, example- + Qt4/images/open.png, example-Qt4/images/paste.png, example- + Qt4/images/save.png, example-Qt4/main.cpp, example- + Qt4/mainwindow.cpp, example-Qt4/mainwindow.h, example- + Qt4Qt5/application.pro, example-Qt4Qt5/application.qrc, example- + Qt4Qt5/images/copy.png, example-Qt4Qt5/images/cut.png, example- + Qt4Qt5/images/new.png, example-Qt4Qt5/images/open.png, example- + Qt4Qt5/images/paste.png, example-Qt4Qt5/images/save.png, example- + Qt4Qt5/main.cpp, example-Qt4Qt5/mainwindow.cpp, example- + Qt4Qt5/mainwindow.h, lib/LICENSE.GPL2, lib/LICENSE.GPL3, + lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, lib/README, + lib/README.doc, lib/qscintilla.dxy, qt/PlatQt.cpp, + qt/qscintilla.pro: + Ported to Qt v5. + [ff3710487c3e] <2.6-maint> + +2012-04-02 Phil Thompson + + * qt/qsciapis.cpp: + Worked around an obscure Qt (or compiler) bug when handling call + tips. + [e6c7edcfdfb9] <2.6-maint> + +2012-03-04 Phil Thompson + + * Python/sip/qscilexer.sip, Python/sip/qscilexerbash.sip, + Python/sip/qscilexerbatch.sip, Python/sip/qscilexercpp.sip, + Python/sip/qscilexercss.sip, Python/sip/qscilexerd.sip, + Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, + Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, + Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, + Python/sip/qscilexertex.sip, Python/sip/qscilexerverilog.sip, + qt/qscilexer.h, qt/qscilexerbash.h, qt/qscilexerbatch.h, + qt/qscilexercpp.h, qt/qscilexercss.h, qt/qscilexerd.h, + qt/qscilexerdiff.h, qt/qscilexerhtml.h, qt/qscilexermakefile.h, + qt/qscilexerperl.h, qt/qscilexerpov.h, qt/qscilexerproperties.h, + qt/qscilexertex.h, qt/qscilexerverilog.h: + QSciLexer::wordCharacters() is now part of the public API. + [933ef6a11ee6] <2.6-maint> + +2012-02-23 Phil Thompson + + * qt/qscilexercpp.h: + Updated the documentation for QsciLexerCpp::keywords() so that it + describes which sets are supported. + [4e0cb0250dad] <2.6-maint> + +2012-02-21 Phil Thompson + + * qt/qscintilla.pro, src/Document.cxx: + Some Scintilla fixes for the SCI_NAMESPACE support. + [611ffd016585] <2.6-maint> + +2012-02-10 Phil Thompson + + * .hgtags: + Added tag 2.6.1 for changeset 47d8fdf44946 + [aa843f471972] <2.6-maint> + + * NEWS: + Updated the NEWS file. Released as v2.6.1. + [47d8fdf44946] [2.6.1] <2.6-maint> + +2012-01-26 Phil Thompson + + * qt/qsciscintilla.cpp: + Don't implement shortcut overrides for the standard context menu + shortcuts. Instead leave it to the check against bound keys. + [e8ccaf398640] <2.6-maint> + +2012-01-19 Phil Thompson + + * qt/qsciapis.cpp: + APIs now allow for whitespace between the end of a word and the + opening parenthesis of the argument list. + [b09b25f38411] <2.6-maint> + +2012-01-11 Phil Thompson + + * qt/SciClasses.cpp: + Fixed the handling of auto-completion lists on Windows. + [131138b43c85] <2.6-maint> + +2011-12-07 Phil Thompson + + * Python/sip/qscicommandset.sip, qt/qscicommandset.cpp, + qt/qscicommandset.h, qt/qscintilla.pro: + Improved the Qt v3 port so that the signatures don't need to be + changed. Bumped the .so version number. + [3171bb05b1d8] <2.6-maint> + +2011-12-06 Phil Thompson + + * Makefile, NEWS, Python/sip/qscicommandset.sip, include/Platform.h, + qt/ListBoxQt.cpp, qt/qscicommandset.cpp, qt/qscicommandset.h, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, src/XPM.cxx: + Fixed building against Qt v3. + [74df75a62f5c] <2.6-maint> + +2011-11-21 Phil Thompson + + * NEWS, include/Platform.h, qt/ListBoxQt.cpp, qt/ListBoxQt.h, + qt/PlatQt.cpp, qt/SciClasses.cpp, qt/SciClasses.h, + qt/SciNamespace.h, qt/ScintillaQt.cpp, qt/ScintillaQt.h, + qt/qscintilla.pro, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Added support for SCI_NAMESPACE to allow all internal Scintilla + classes to be placed in the Scintilla namespace. + [ab7857131e35] <2.6-maint> + +2011-11-11 Phil Thompson + + * .hgtags: + Added tag 2.6 for changeset 8b119c4f69d0 + [1a5dd31e773e] + + * NEWS, lib/README.doc: + Updated the NEWS file. Updated the introductory documentation. + Released as v2.6. + [8b119c4f69d0] [2.6] + +2011-11-07 Phil Thompson + + * NEWS, Python/sip/qscicommandset.sip, Python/sip/qsciscintilla.sip, + qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciCommandSet::boundTo(). Ordinary keys and those bound to + commands now override any shortcuts. + [ba98bc555aca] + +2011-10-28 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts: + More updated German translations from Detlev. + [9ff20df1997b] + +2011-10-27 Phil Thompson + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_es.ts, qt/qscintilla_fr.qm, + qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: + Updated Spanish translations from Jaime. Updated German translations + from Detlev. + [4903315d96b1] + +2011-10-23 Phil Thompson + + * Python/sip/qscicommand.sip: + Fixed SelectAll in the Python bindings. + [b6f0a46e0eac] + + * qt/ScintillaQt.cpp, qt/qsciscintillabase.cpp: + Fixed drag and drop (specifically so that copying works on OS/X + again). + [6ab90cb63b2b] + +2011-10-22 Phil Thompson + + * qt/PlatQt.cpp: + Fixed a display bug with kerned fonts. + [a746e319d9cd] + + * qt/qsciscintilla.cpp: + The foreground and background colours of selected text are now taken + from the application palette. + [7f6c34ad8d27] + + * NEWS: + Updated the NEWS file. + [1717c6d59b12] + + * Python/sip/qsciscintilla.sip, qt/qscicommand.h, + qt/qscicommandset.cpp, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, + qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, + qt/qscintilla_ru.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Renamed QsciCommand::SelectDocument to SelectAll. Added + QsciScintilla::createStandardContextMenu(). + [c42fa7e83b07] + +2011-10-21 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the .ts files. + [92d0b6ddf371] + + * qt/qscicommandset.cpp: + Completed the OS/X specific key bindings. + [964fa889b807] + +2011-10-20 Phil Thompson + + * qt/qscicommandset.cpp, qt/qsciscintillabase.cpp: + Fixed the support for SCMOD_META. Started to add the correct OS/X + key bindings as the default. + [0073fa86a5a0] + + * Python/sip/qscicommand.sip, qt/qscicommand.h, qt/qscicommandset.cpp: + All available commands are now defined in the standard command set. + [7c7b81b55f0e] + + * Python/sip/qscicommand.sip, qt/qscicommand.h: + Completed the QsciCommand::Command documentation. Added the members + to QsciCommand.Command in the Python bindings. + [0ca6ff576c21] + +2011-10-18 Phil Thompson + + * NEWS, Python/sip/qscicommandset.sip, qt/qscicommand.h, + qt/qscicommandset.cpp, qt/qscicommandset.h: + Added QsciCommandSet::find(). + [e75565018b90] + + * NEWS, Python/sip/qscicommand.sip, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qscicommand.cpp, + qt/qscicommand.h, qt/qscicommandset.cpp, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added Command, command() and execute() to QsciCommand. Backed out + the high level support for moving the selection up and down. + [4852ee57353e] + +2011-10-17 Phil Thompson + + * qt/qscilexersql.cpp: + Fix for the changed fold at else property in the SQL lexer. + [e65a458cd9d8] + + * NEWS, Python/sip/qscilexerpython.sip, qt/qscilexerpython.cpp, + qt/qscilexerpython.h: + Added highlightSubidentifiers() and setHighlightSubidentifiers() to + the Python lexer. + [b397695bc2ab] + + * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, + qt/qscilexercpp.h: + Added support for triple quoted strings to the C++ lexer. + [687d04948c5d] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added low level support for identifiers, scrolling to the start and + end. Added low and hight level support for moving the selection up + and down. + [3ac1ccfad039] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added low and high level support for margin options. + [f3cd3244cecd] + +2011-10-14 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Updated the brace matching support to handle indicators. + [7e4a4d3529a8] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added SCI_SETEMPTYSELECTION. + [879b97c676a4] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Updated the support for indicators. + [b3643569a827] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added SCI_MARKERSETBACKSELECTED and SCI_MARKERENABLEHIGHLIGHT. + [7127ee82d128] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Added low and high-level support for RGBA images (ie. QImage). + [7707052913ef] + +2011-10-13 Phil Thompson + + * NEWS, Python/sip/qscilexerlua.sip, qt/qscilexerlua.cpp, + qt/qscilexerlua.h: + Updated the Lua lexer. + [710e50d5692c] + + * NEWS, Python/sip/qscilexerperl.sip, qt/qscilexerperl.cpp, + qt/qscilexerperl.h: + Updated the Perl lexer. + [6d16e2e9354b] + +2011-10-11 Phil Thompson + + * Python/configure.py, cocoa/ScintillaCallTip.h, + cocoa/ScintillaCallTip.mm, cocoa/ScintillaListBox.h, + cocoa/ScintillaListBox.mm, cocoa/res/info_bar_bg.png, + cocoa/res/mac_cursor_busy.png, cocoa/res/mac_cursor_flipped.png, + macosx/SciTest/English.lproj/InfoPlist.strings, + macosx/SciTest/English.lproj/main.nib/classes.nib, + macosx/SciTest/English.lproj/main.nib/info.nib, + macosx/SciTest/English.lproj/main.nib/objects.xib, + macosx/SciTest/English.lproj/main.xib, qt/ListBoxQt.cpp, + qt/ListBoxQt.h, qt/PlatQt.cpp, qt/qscintilla.pro, src/XPM.cxx, + src/XPM.h: + Some fixes left over from the merge of v2.29. Added support for RGBA + images so that the merged version compiles. + [16c6831c337f] + + * cocoa/InfoBar.mm, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, + cocoa/QuartzTextLayout.h, cocoa/QuartzTextStyle.h, + cocoa/QuartzTextStyleAttribute.h, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework + .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, + cocoa/ScintillaView.h, cocoa/ScintillaView.mm, doc/SciCoding.html, + doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/ScintillaRelated.html, + doc/ScintillaToDo.html, doc/index.html, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/makefile, include/Platform.h, + include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, + lexers/LexAU3.cxx, lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, + lexers/LexConf.cxx, lexers/LexHTML.cxx, lexers/LexInno.cxx, + lexers/LexLua.cxx, lexers/LexMagik.cxx, lexers/LexMarkdown.cxx, + lexers/LexMatlab.cxx, lexers/LexModula.cxx, lexers/LexOthers.cxx, + lexers/LexPerl.cxx, lexers/LexPowerPro.cxx, lexers/LexPython.cxx, + lexers/LexSQL.cxx, lexers/LexTeX.cxx, lexers/LexVHDL.cxx, + lexers/LexVerilog.cxx, lexlib/Accessor.cxx, lexlib/CharacterSet.h, + lexlib/PropSetSimple.cxx, lexlib/SparseState.h, + lexlib/StyleContext.h, lexlib/WordList.cxx, macosx/PlatMacOSX.cxx, + macosx/PlatMacOSX.h, macosx/SciTest/SciTest.xcode/project.pbxproj, + macosx/ScintillaMacOSX.h, macosx/makefile, src/CallTip.cxx, + src/ContractionState.cxx, src/ContractionState.h, + src/Decoration.cxx, src/Document.cxx, src/Document.h, + src/Editor.cxx, src/Editor.h, src/Indicator.cxx, src/Indicator.h, + src/KeyMap.cxx, src/KeyMap.h, src/LexGen.py, src/LineMarker.cxx, + src/LineMarker.h, src/PerLine.cxx, src/PositionCache.cxx, + src/PositionCache.h, src/RESearch.cxx, src/RunStyles.cxx, + src/RunStyles.h, src/ScintillaBase.cxx, src/Style.cxx, src/Style.h, + src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, src/XPM.h, + test/XiteMenu.py, test/XiteWin.py, test/examples/x.html, + test/examples/x.html.styled, test/performanceTests.py, + test/simpleTests.py, test/unit/testContractionState.cxx, + test/unit/testRunStyles.cxx, version.txt, win32/PlatWin.cxx, + win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/scintilla.mak: + Merged Scintilla v2.29. + [750c2c3cef72] + + * Merged the v2.5 maintenance branch back into the trunk. + [eab39863675f] + +2011-06-24 Phil Thompson + + * qt/qscilexer.cpp, qt/qscilexerbash.cpp, qt/qscilexerbatch.cpp, + qt/qscilexercmake.cpp, qt/qscilexercpp.cpp, qt/qscilexercsharp.cpp, + qt/qscilexercss.cpp, qt/qscilexerd.cpp, qt/qscilexerfortran77.cpp, + qt/qscilexerhtml.cpp, qt/qscilexerjavascript.cpp, + qt/qscilexerlua.cpp, qt/qscilexermakefile.cpp, + qt/qscilexermatlab.cpp, qt/qscilexerpascal.cpp, + qt/qscilexerperl.cpp, qt/qscilexerpostscript.cpp, + qt/qscilexerpov.cpp, qt/qscilexerproperties.cpp, + qt/qscilexerpython.cpp, qt/qscilexerruby.cpp, qt/qscilexerspice.cpp, + qt/qscilexersql.cpp, qt/qscilexertcl.cpp, qt/qscilexerverilog.cpp, + qt/qscilexervhdl.cpp, qt/qscilexerxml.cpp, qt/qscilexeryaml.cpp: + Changed the default fonts for MacOS so that they are larger and + similar to the Windows defaults. + [9c37c180ba8d] <2.5-maint> + + * build.py: + Fixed the build system for MacOS as the development platform. + [3352479980c5] <2.5-maint> + +2011-05-13 Phil Thompson + + * lib/README.doc: + Updated the licensing information in the main documentation. + [d31c561e0b7c] <2.5-maint> + + * lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/LICENSE.gpl.short: + Removed some out of date links from the license information. Updated + the dates of some copyright notices. + [a84451464396] <2.5-maint> + +2011-05-10 Phil Thompson + + * Makefile, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added the optional posix flag to QsciScintilla::findFirst(). + [ad6064227d06] <2.5-maint> + +2011-04-29 Phil Thompson + + * Python/configure.py, qt/qscintilla.pro, qt/qsciscintilla.cpp, + qt/qscistyle.cpp, qt/qscistyle.h, qt/qscistyledtext.cpp, + qt/qscistyledtext.h: + Fixed problems with QsciStyle and QsciStyledText when used with more + than one QsciScintilla instance. + [8bac389fb7ae] <2.5-maint> + +2011-04-22 Phil Thompson + + * qt/qsciglobal.h: + Changed the handling of QT_BEGIN_NAMESPACE etc. as it isn't defined + in early versions of Qt v4. + [595c8c6cdfd2] <2.5-maint> + +2011-04-17 Phil Thompson + + * .hgtags: + Added tag 2.5.1 for changeset c8648c2c0c7f + [298153b3d40e] <2.5-maint> + + * NEWS: + Released as v2.5.1. + [c8648c2c0c7f] [2.5.1] <2.5-maint> + +2011-04-16 Phil Thompson + + * qt/qscintilla_de.ts, qt/qscintilla_es.ts: + Updated translations from Detlev and Jaime. + [9436bea546c9] <2.5-maint> + +2011-04-14 Phil Thompson + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_es.qm, + qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: + Updated the compiled translation files. + [c5d39aca8f51] <2.5-maint> + +2011-04-13 Phil Thompson + + * Python/sip/qscilexermatlab.sip, Python/sip/qscilexeroctave.sip, + Python/sip/qscimodcommon.sip: + Added Python bindings for QsciLexerMatlab abd QsciLexerOctave. + [22d0ed0fab2a] <2.5-maint> + + * NEWS, qt/qscilexermatlab.cpp, qt/qscilexermatlab.h, + qt/qscilexeroctave.cpp, qt/qscilexeroctave.h, qt/qscintilla.pro, + qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Added QsciLexerMatlab and QsciLexerOctave. + [40d3053334de] <2.5-maint> + +2011-04-09 Phil Thompson + + * Merged the font strategy fix from the trunk. + [d270e1b107d2] <2.5-maint> + + * NEWS: + Updated the NEWS file. + [8f32ff4cdd1f] <2.5-maint> + +2011-04-07 Phil Thompson + + * qt/PlatQt.cpp, qt/qscintilla.pro: + Fixed the handling of the font quality setting so that the default + behavior (particularly on Windows) is the same as earlier versions. + [87ae98d2674b] + +2011-03-29 Phil Thompson + + * .hgtags: + Added tag 2.5 for changeset 9d94a76f783e + [e4807fd91f6c] + + * NEWS: + Released as v2.5. + [9d94a76f783e] [2.5] + +2011-03-28 Phil Thompson + + * NEWS, Python/configure.py: + Added support for the protected-is-public hack to configure.py. + [beee52b8e10a] + +2011-03-27 Phil Thompson + + * qt/PlatQt.cpp: + Fixed an OS/X build problem. + [ac7f1d3c9abe] + +2011-03-26 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added replaceSelectedText() to QsciScintilla. + [3c00a19d6571] + +2011-03-25 Phil Thompson + + * Python/configure.py, Python/sip/qsciapis.sip, + Python/sip/qscilexer.sip, Python/sip/qscilexercustom.sip, + Python/sip/qscimod4.sip, Python/sip/qsciprinter.sip, + Python/sip/qsciscintilla.sip, Python/sip/qscistyle.sip, + qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexercustom.cpp, + qt/qscilexercustom.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qscistyle.cpp, qt/qscistyle.h: + Went through the API making sure all optional arguments had + consistent and meaningful names. Enabled keyword support in the + Python bindings. + [d60fa45e40b7] + +2011-03-23 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, + qt/qscintilla_es.ts: + Updated German translations from Detlev. Updated Spanish + translations from Jaime. + [f64c97749375] + +2011-03-21 Phil Thompson + + * lexers/LexModula.cxx, lexlib/SparseState.h, qt/qscintilla_cs.ts, + qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, + qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts, + test/unit/testSparseState.cxx, vcbuild/SciLexer.dsp: + Updated the translation files. Updated the repository for the new + and removed Scintilla v2.25 files. + [6eb77ba7c57c] + + * NEWS, Python/sip/qscilexercpp.sip, Python/sip/qsciscintillabase.sip, + qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscintilla.pro, + qt/qsciscintillabase.h: + Added support for raw string to the C++ lexer. + [f83112ced877] + + * NEWS, cocoa/Framework.mk, cocoa/PlatCocoa.mm, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework + .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaView.h, cocoa/ScintillaView.mm, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, + gtk/makefile, include/Platform.h, include/SciLexer.h, + include/Scintilla.iface, lexers/LexAsm.cxx, lexers/LexBasic.cxx, + lexers/LexCPP.cxx, lexers/LexD.cxx, lexers/LexFortran.cxx, + lexers/LexOthers.cxx, lexlib/CharacterSet.h, lib/README.doc, + macosx/SciTest/main.cpp, src/AutoComplete.cxx, src/Catalogue.cxx, + src/Document.cxx, src/Editor.cxx, src/LexGen.py, test/unit/makefile, + version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, + win32/scintilla.mak, win32/scintilla_vc6.mak: + Merged Scintilla v2.25. + [e01dec109182] + +2011-03-14 Phil Thompson + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [b83a3ca4f3e6] + +2011-03-12 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts: + Updated German translations from Detlev. + [e5729134a47b] + +2011-03-11 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the translation source files. + [51e8ee8b1ba9] + + * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, + qt/qscilexercpp.h: + Added support for the inactive styles of QsciLexerCPP. + [59b566d322af] + + * qt/qscilexercpp.cpp, qt/qscilexercpp.h: + Inlined all existing property getters in QsciLexerCPP. + [1117e5105e5e] + +2011-03-10 Phil Thompson + + * qt/qsciscintilla.cpp: + Fixed QsciScintilla::setContractedFolds() so that it actually + updates the display to show the new state. + [5079f59a0103] + + * NEWS, Python/sip/qscilexerhtml.sip, qt/qscilexerhtml.cpp, + qt/qscilexerhtml.h: + Updated QsciLexerHTML. + [0707f4bc7855] + + * NEWS, Python/sip/qscilexerproperties.sip, + qt/qscilexerproperties.cpp, qt/qscilexerproperties.h: + Updated QsciLexerProperties. + [1dfe5e2d4913] + + * NEWS, Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, + Python/sip/qscilexersql.sip, Python/sip/qscilexertcl.sip, + Python/sip/qscilexertex.sip, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscilexerruby.h, qt/qscilexersql.h, + qt/qscilexertcl.h, qt/qscilexertex.cpp, qt/qscilexertex.h: + Updated QsciLexerPython. + [bc96868a1a6f] + + * NEWS, Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, + Python/sip/qscilexertcl.sip, Python/sip/qscilexertex.sip, + qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexersql.h, + qt/qscilexertcl.h, qt/qscilexertex.h: + The new lexer property setters are no longer virtual slots. + [c3e88383e8d3] + + * qt/qscilexersql.cpp, qt/qscilexersql.h: + Restored the default behaviour of setFoldCompact() for QsciLexerSQL. + [c74aef0f7eb4] + + * NEWS, Python/sip/qscilexertcl.sip, qt/qscilexersql.h, + qt/qscilexertcl.cpp, qt/qscilexertcl.h: + Updated QsciLexerTCL. + [43a150bb40d5] + + * NEWS, Python/sip/qscilexertex.sip, qt/qscilexertex.cpp, + qt/qscilexertex.h: + Updated QsciLexerTeX. + [1457935cee44] + + * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, + qt/qscintilla_ru.qm: + Updated German translations from Detlev. + [ad4a4bd4855b] + +2011-03-08 Phil Thompson + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the .ts translation files. + [8d70033d07e2] + + * NEWS, Python/sip/qscilexersql.sip, qt/qscilexersql.cpp, + qt/qscilexersql.h: + Updated QsciLexerSQL. + [8bc79d109c88] + + * NEWS, Python/sip/qscilexercss.sip, qt/qscilexercss.cpp, + qt/qscilexercss.h: + Updated QsciLexerCSS. + [f3adcb31b1a9] + + * NEWS, Python/sip/qscilexerd.sip, qt/qscilexerd.cpp, qt/qscilexerd.h: + Updated QsciLexerD. + [82d8a6561943] + + * Python/sip/qscilexerlua.sip, qt/qscilexerlua.cpp, qt/qscilexerlua.h: + Updated QsciLexerLua. + [103f5881c642] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintillabase.h: + Added support for the QsciScintillaBase::SCN_HOTSPOTRELEASECLICK() + signal. + [1edd56e105cd] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for SCLEX_MARKDOWN, SCLEX_TXT2TAGS and + SCLEX_A68K. + [de92a613cea7] + + * Python/sip/qsciscintillabase.sip, qt/qscicommand.cpp, + qt/qsciscintilla.cpp, qt/qsciscintillabase.h: + Added support for SCMOD_SUPER as the Qt Meta key modifier. + [24e745cddeea] + + * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: + Updated the QsciScintillaBase::SCN_UPDATEUI() signal. Added low- + level support for SC_MOD_LEXERSTATE. + [0a341fcb0545] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for the updated property functions. + [f33d9c271992] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for SCI_GETLEXERLANGUAGE and + SCI_PRIVATELEXERCALL. + [ac69f8c2ef3b] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for the new stick caret options. + [693ac6c68e6f] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for SCI_AUTOCGETCURRENTTEXT. + [2634827cdb4e] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for SC_SEL_THIN. + [4225a944dc14] + + * qt/qsciscintilla.cpp: + Folding now works again. + [3972053c646e] + +2011-03-07 Phil Thompson + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for SCI_VERTICALCENTRECARET. + [92d5ecb154d1] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added setContractedFolds() and contractedFolds() to QsciScintilla. + [46eb254c6200] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for SCI_CHANGELEXERSTATE. + [edd899d77aa7] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Added low-level support for SCI_CHARPOSITIONFROMPOINT and + SCI_CHARPOSITIONFROMPOINTCLOSE. + [5a000cf4bfba] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added low-level support for multiple selections. + [dedda8cbf413] + + * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: + Added SCI_GETTAG. + [775d0058f00e] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added QsciScintilla::setFirstVisibleLine(). + [8b662ffe3fb6] + + * Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, + qt/qsciscintillabase.h: + Added low-level support for setting the font quality. + [933e8b01eda6] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added high-level support for line wrap indentation modes. + [1faa3b2fa31e] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added high-level support for extra ascent and descent space. Added + high-level support for whitespace size, foreground and background. + [537c551a79ef] + + * Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, + qt/qsciscintillabase.h: + Updated the low level support for cursors. + [2ce685a89697] + + * NEWS, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, + qt/qsciscintillabase.h: + Updated the support for markers and added FullRectangle, + LeftRectangle and Underline to the MarkerSymbol enum. + [4c626f8189bf] + +2011-03-06 Phil Thompson + + * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/ScintillaQt.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Rectangular selections are now fully supported. The signatures of + toMimeData() and fromMimeData() have changed. + [397948f42b2e] + + * NEWS: + Updated the NEWS file. + [bc75b98210f2] + + * .hgignore: + Added the .hgignore file. + [77312a36220e] + + * qt/qsciscintilla.cpp: + Removed the workaround for the broken annotations in Scintilla + v1.78. + [70ab4c4b7c66] + + * qt/ListBoxQt.cpp: + Fixed a regression when displaying an auto-completion list. + [c38d4b97a1ca] + +2011-03-04 Phil Thompson + + * qt/ListBoxQt.cpp, qt/PlatQt.cpp, qt/ScintillaQt.cpp, + qt/ScintillaQt.h, qt/qsciscintillabase.cpp: + Completed the merge of Scintilla v2.24. + [6890939e2da6] + + * build.py, qt/qscintilla.pro: + More build system changes. + [3e9deec76c02] + + * qt/qscintilla.pro, qt/qsciscintilla.cpp: + Updated the .pro file for the changed files and directory structure + in v2.24. + [274cb7017857] + + * License.txt, README, bin/empty.txt, cocoa/Framework.mk, + cocoa/InfoBar.h, cocoa/InfoBar.mm, cocoa/InfoBarCommunicator.h, + cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/QuartzTextLayout.h, + cocoa/QuartzTextStyle.h, cocoa/QuartzTextStyleAttribute.h, + cocoa/SciTest.mk, cocoa/ScintillaCallTip.h, + cocoa/ScintillaCallTip.mm, cocoa/ScintillaCocoa.h, + cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/Info.plist, cocoa/ + ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj, + cocoa/ScintillaFramework/Scintilla_Prefix.pch, + cocoa/ScintillaListBox.h, cocoa/ScintillaListBox.mm, + cocoa/ScintillaTest/AppController.h, + cocoa/ScintillaTest/AppController.mm, + cocoa/ScintillaTest/English.lproj/MainMenu.xib, + cocoa/ScintillaTest/Info.plist, cocoa/ScintillaTest/Scintilla- + Info.plist, + cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, + cocoa/ScintillaTest/ScintillaTest_Prefix.pch, + cocoa/ScintillaTest/TestData.sql, cocoa/ScintillaTest/main.m, + cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cocoa/common.mk, + delbin.bat, delcvs.bat, doc/Design.html, doc/Lexer.txt, + doc/SciBreak.jpg, doc/SciCoding.html, doc/SciRest.jpg, + doc/SciTEIco.png, doc/SciWord.jpg, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/ScintillaToDo.html, + doc/ScintillaUsage.html, doc/Steps.html, doc/index.html, + gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, + gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- + marshal.h, gtk/scintilla-marshal.list, gtk/scintilla.mak, + include/Accessor.h, include/Face.py, include/HFacer.py, + include/ILexer.h, include/KeyWords.h, include/Platform.h, + include/PropSet.h, include/SString.h, include/SciLexer.h, + include/Scintilla.h, include/Scintilla.iface, + include/ScintillaWidget.h, include/WindowAccessor.h, + lexers/LexA68k.cxx, lexers/LexAPDL.cxx, lexers/LexASY.cxx, + lexers/LexAU3.cxx, lexers/LexAVE.cxx, lexers/LexAbaqus.cxx, + lexers/LexAda.cxx, lexers/LexAsm.cxx, lexers/LexAsn1.cxx, + lexers/LexBaan.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, + lexers/LexBullant.cxx, lexers/LexCLW.cxx, lexers/LexCOBOL.cxx, + lexers/LexCPP.cxx, lexers/LexCSS.cxx, lexers/LexCaml.cxx, + lexers/LexCmake.cxx, lexers/LexConf.cxx, lexers/LexCrontab.cxx, + lexers/LexCsound.cxx, lexers/LexD.cxx, lexers/LexEScript.cxx, + lexers/LexEiffel.cxx, lexers/LexErlang.cxx, lexers/LexFlagship.cxx, + lexers/LexForth.cxx, lexers/LexFortran.cxx, lexers/LexGAP.cxx, + lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, + lexers/LexInno.cxx, lexers/LexKix.cxx, lexers/LexLisp.cxx, + lexers/LexLout.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, + lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, lexers/LexMagik.cxx, + lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, + lexers/LexMetapost.cxx, lexers/LexMySQL.cxx, lexers/LexNimrod.cxx, + lexers/LexNsis.cxx, lexers/LexOpal.cxx, lexers/LexOthers.cxx, + lexers/LexPB.cxx, lexers/LexPLM.cxx, lexers/LexPOV.cxx, + lexers/LexPS.cxx, lexers/LexPascal.cxx, lexers/LexPerl.cxx, + lexers/LexPowerPro.cxx, lexers/LexPowerShell.cxx, + lexers/LexProgress.cxx, lexers/LexPython.cxx, lexers/LexR.cxx, + lexers/LexRebol.cxx, lexers/LexRuby.cxx, lexers/LexSML.cxx, + lexers/LexSQL.cxx, lexers/LexScriptol.cxx, lexers/LexSmalltalk.cxx, + lexers/LexSorcus.cxx, lexers/LexSpecman.cxx, lexers/LexSpice.cxx, + lexers/LexTACL.cxx, lexers/LexTADS3.cxx, lexers/LexTAL.cxx, + lexers/LexTCL.cxx, lexers/LexTeX.cxx, lexers/LexTxt2tags.cxx, + lexers/LexVB.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, + lexers/LexYAML.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, + lexlib/CharacterSet.cxx, lexlib/CharacterSet.h, + lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerBase.h, + lexlib/LexerModule.cxx, lexlib/LexerModule.h, + lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, + lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, lexlib/OptionSet.h, + lexlib/PropSetSimple.cxx, lexlib/PropSetSimple.h, + lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/WordList.cxx, + lexlib/WordList.h, lib/README.doc, macosx/PlatMacOSX.cxx, + macosx/SciTest/SciTest.xcode/project.pbxproj, + macosx/ScintillaMacOSX.cxx, macosx/ScintillaMacOSX.h, + macosx/deps.mak, macosx/makefile, src/AutoComplete.cxx, + src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, + src/Catalogue.cxx, src/Catalogue.h, src/CellBuffer.cxx, + src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, + src/CharacterSet.h, src/ContractionState.cxx, + src/ContractionState.h, src/Decoration.h, src/Document.cxx, + src/Document.h, src/DocumentAccessor.cxx, src/DocumentAccessor.h, + src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, + src/ExternalLexer.h, src/FontQuality.h, src/Indicator.cxx, + src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/KeyWords.cxx, + src/LexAPDL.cxx, src/LexASY.cxx, src/LexAU3.cxx, src/LexAVE.cxx, + src/LexAbaqus.cxx, src/LexAda.cxx, src/LexAsm.cxx, src/LexAsn1.cxx, + src/LexBaan.cxx, src/LexBash.cxx, src/LexBasic.cxx, + src/LexBullant.cxx, src/LexCLW.cxx, src/LexCOBOL.cxx, + src/LexCPP.cxx, src/LexCSS.cxx, src/LexCaml.cxx, src/LexCmake.cxx, + src/LexConf.cxx, src/LexCrontab.cxx, src/LexCsound.cxx, + src/LexD.cxx, src/LexEScript.cxx, src/LexEiffel.cxx, + src/LexErlang.cxx, src/LexFlagship.cxx, src/LexForth.cxx, + src/LexFortran.cxx, src/LexGAP.cxx, src/LexGen.py, + src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexHaskell.cxx, + src/LexInno.cxx, src/LexKix.cxx, src/LexLisp.cxx, src/LexLout.cxx, + src/LexLua.cxx, src/LexMMIXAL.cxx, src/LexMPT.cxx, src/LexMSSQL.cxx, + src/LexMagik.cxx, src/LexMatlab.cxx, src/LexMetapost.cxx, + src/LexMySQL.cxx, src/LexNimrod.cxx, src/LexNsis.cxx, + src/LexOpal.cxx, src/LexOthers.cxx, src/LexPB.cxx, src/LexPLM.cxx, + src/LexPOV.cxx, src/LexPS.cxx, src/LexPascal.cxx, src/LexPerl.cxx, + src/LexPowerPro.cxx, src/LexPowerShell.cxx, src/LexProgress.cxx, + src/LexPython.cxx, src/LexR.cxx, src/LexRebol.cxx, src/LexRuby.cxx, + src/LexSML.cxx, src/LexSQL.cxx, src/LexScriptol.cxx, + src/LexSmalltalk.cxx, src/LexSorcus.cxx, src/LexSpecman.cxx, + src/LexSpice.cxx, src/LexTACL.cxx, src/LexTADS3.cxx, src/LexTAL.cxx, + src/LexTCL.cxx, src/LexTeX.cxx, src/LexVB.cxx, src/LexVHDL.cxx, + src/LexVerilog.cxx, src/LexYAML.cxx, src/LineMarker.cxx, + src/LineMarker.h, src/Partitioning.h, src/PerLine.cxx, + src/PerLine.h, src/PositionCache.cxx, src/PositionCache.h, + src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, + src/RunStyles.cxx, src/SVector.h, src/SciTE.properties, + src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, + src/Selection.h, src/SplitVector.h, src/Style.cxx, src/Style.h, + src/StyleContext.cxx, src/StyleContext.h, src/UniConversion.cxx, + src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, + src/WindowAccessor.cxx, src/XPM.cxx, src/XPM.h, + test/MessageNumbers.py, test/README, test/XiteMenu.py, + test/XiteWin.py, test/examples/x.asp, test/examples/x.asp.styled, + test/examples/x.cxx, test/examples/x.cxx.styled, test/examples/x.d, + test/examples/x.d.styled, test/examples/x.html, + test/examples/x.html.styled, test/examples/x.php, + test/examples/x.php.styled, test/examples/x.py, + test/examples/x.py.styled, test/examples/x.vb, + test/examples/x.vb.styled, test/lexTests.py, + test/performanceTests.py, test/simpleTests.py, test/unit/README, + test/unit/SciTE.properties, test/unit/makefile, + test/unit/testContractionState.cxx, test/unit/testPartitioning.cxx, + test/unit/testRunStyles.cxx, test/unit/testSplitVector.cxx, + test/unit/unitTest.cxx, test/xite.py, vcbuild/SciLexer.dsp, + version.txt, win32/Margin.cur, win32/PlatWin.cxx, + win32/PlatformRes.h, win32/SciTE.properties, win32/ScintRes.rc, + win32/Scintilla.def, win32/ScintillaWin.cxx, win32/deps.mak, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak, + zipsrc.bat: + Merged Scintilla v2.24. + [59ca27407fd9] + +2011-03-03 Phil Thompson + + * Python/configure.py, qt/qscintilla.pro: + Updated the .so version number to 6.0.0. + [8ebe3f1fccd4] + + * Makefile: + Switched the build system to Qt v4.7.2. + [47f653394ef0] + + * .hgtags, lib/README.svn: + Merged the v2.4 maintenance branch. + [d00b7d9115d1] + + * qsci/api/python/Python-3.2.api: + Added an API file for Python v3.2. + [8cc94408b710] <2.4-maint> + +2011-02-23 Phil Thompson + + * qt/qsciscintillabase.cpp: + On X11 the control modifier is now used (instead of alt) to trigger + a rectangular selection. + [4bea3b8b8271] <2.4-maint> + +2011-02-22 Phil Thompson + + * qt/qscimacro.cpp: + Fixed a bug with Qt4 when loading a macro that meant that a macro + may not have a terminating '\0'. + [bbec6ef96cd2] <2.4-maint> + +2011-02-06 Phil Thompson + + * lib/LICENSE.commercial.short, lib/LICENSE.gpl.short: + Updated the copyright notices. + [f386964f3853] <2.4-maint> + + * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Deprecated setAutoCompletionShowSingle(), added + setAutoCompletionUseSingle(). Deprecated autoCompletionShowSingle(), + added autoCompletionUseSingle(). + [7dae1a33b74b] <2.4-maint> + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + QsciScintilla::setAutoCompletionCaseSensitivity() is no longer + ignored if a lexer has been set. + [92d3c5f7b825] <2.4-maint> + + * qt/qscintilla.pro, qt/qsciscintillabase.cpp: + Translate Key_Backtab to Shift-Key_Tab before passing to Scintilla. + [fc2d75b26ef8] <2.4-maint> + +2011-01-06 Phil Thompson + + * qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [8921e85723a1] <2.4-maint> + +2010-12-24 Phil Thompson + + * qt/qsciscintilla.h: + Fixed a documentation typo. + [1b951cf8838a] <2.4-maint> + +2010-12-23 Phil Thompson + + * .hgtags: + Added tag 2.4.6 for changeset 1884d76f35b0 + [696037b84e26] <2.4-maint> + + * NEWS: + Released as v2.4.6. + [1884d76f35b0] [2.4.6] <2.4-maint> + +2010-12-21 Phil Thompson + + * qt/qsciscintilla.cpp: + Auto-completion words from documents are now ignored if they are + already included from APIs. + [db48fbf19e7c] <2.4-maint> + + * qt/SciClasses.cpp: + Make sure call tips are redrawn afer being clicked on. + [497ad4605ae3] <2.4-maint> + +2010-11-23 Phil Thompson + + * NEWS, Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added support for indicators to the high-level API. See the NEWS + file for the details. + [8673b7890874] <2.4-maint> + +2010-11-15 Phil Thompson + + * Python/configure.py: + Added the --no-timestamp option to configure.py. + [61d1b5d28e21] <2.4-maint> + + * qsci/api/python/Python-2.7.api: + Added the API file for Python v2.7. + [5b2c77e7150a] <2.4-maint> + +2010-11-09 Phil Thompson + + * Makefile, qt/PlatQt.cpp: + Applied a fix for calculating character widths under OS/X. Switched + the build system to Qt v4.7.1. + [47a4eff86efa] <2.4-maint> + +2010-11-08 Phil Thompson + + * qt/qscilexercpp.h: + Fixed a bug in the documentation of QsciLexerCPP.GlobalClass. + [3cada289b329] <2.4-maint> + +2010-10-24 Phil Thompson + + * qt/SciClasses.h, qt/ScintillaQt.h, qt/qscicommandset.h, + qt/qsciglobal.h, qt/qscilexer.h, qt/qsciprinter.h, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Added support for QT_BEGIN_NAMESPACE and QT_END_NAMESPACE. + [a80f0df49f6c] <2.4-maint> + +2010-10-23 Phil Thompson + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts: + Updated German translations from Detlev. + [693d3adf3c3f] <2.4-maint> + +2010-10-21 Phil Thompson + + * Makefile, Python/sip/qscilexerproperties.sip, + qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, + qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Added support for the Key style to QsciLexerProperties. + [0b2e86015862] <2.4-maint> + +2010-08-31 Phil Thompson + + * .hgtags: + Added tag 2.4.5 for changeset f3f3936e5b86 + [84bb1b0d0674] <2.4-maint> + + * NEWS: + Released as v2.4.5. + [f3f3936e5b86] [2.4.5] <2.4-maint> + +2010-08-21 Phil Thompson + + * NEWS: + Updated the NEWS file. + [80afe6b1504a] <2.4-maint> + +2010-08-20 Phil Thompson + + * Python/sip/qsciscintillabase.sip: + With Python v3, the QsciScintillaBase.SendScintilla() overloads that + take char * arguments now require them to be bytes objects and no + longer allow them to be str objects. + [afa9ac3c487d] <2.4-maint> + +2010-08-14 Phil Thompson + + * Python/sip/qsciscintillabase.sip: + Reverted the addition of the /Encoding/ annotations to + SendScintilla() as it is (probably) not the right solution. + [4cb625284e4f] <2.4-maint> + + * qt/qsciscintilla.cpp: + The entries in user and auto-completion lists should now support + UTF-8. + [112d71cec57a] <2.4-maint> + + * Python/sip/qsciscintillabase.sip: + The QsciScintillaBase.SendScintilla() Python overloads will now + accept unicode strings that can be encoded to UTF-8. + [2f21b97985f2] <2.4-maint> + +2010-07-22 Phil Thompson + + * qt/qscilexerhtml.cpp, qt/qscilexerhtml.h: + Implemented QsciLexerHTML::autoCompletionFillups() to change the + fillups to "/>". + [8d9c1aad1349] <2.4-maint> + + * qt/qsciscintilla.cpp: + Fixed a regression, and the original bug, in + QsciScintilla::clearAnnotations(). + [fd8746ae2198] <2.4-maint> + + * qt/qscistyle.cpp: + QsciStyle now auto-allocates style numbers from 63 rather than + STYLE_MAX because Scintilla only initially creates enough storage + for that number of styles. + [7c69b0a4ee5b] <2.4-maint> + +2010-07-15 Phil Thompson + + * qt/qscilexerverilog.cpp, qt/qscintilla.pro: + Fixed a bug in QsciLexerVerilog that meant that the Keyword style + was being completely ignored. + [09e28404476a] <2.4-maint> + +2010-07-12 Phil Thompson + + * .hgtags: + Added tag 2.4.4 for changeset c61a49005995 + [4c98368d9bea] <2.4-maint> + + * NEWS: + Released as v2.4.4. + [c61a49005995] [2.4.4] <2.4-maint> + +2010-06-08 Phil Thompson + + * Makefile, qt/qsciscintillabase.cpp: + Pop-lists now get removed when the main widget loses focus. + [169fa07f52ab] <2.4-maint> + +2010-06-05 Phil Thompson + + * qt/ScintillaQt.cpp: + Changed SCN_MODIFIED to deal with text being NULL. + [68148fa857ab] <2.4-maint> + +2010-06-03 Phil Thompson + + * qt/ScintillaQt.cpp: + The SCN_MODIFIED signal now tries to make sure that the text passed + is valid. + [90e3461f410f] <2.4-maint> + +2010-04-22 Phil Thompson + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + QsciScintilla::markerDefine() now allows existing markers to be + redefined if an explicit marker number is given. + [63f1a7a1d8e2] <2.4-maint> + + * qt/ScintillaQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Fixed the drag and drop behaviour so that a move automatically turns + into a copy when the mouse leaves the widget. + [4dab09799716] <2.4-maint> + +2010-04-21 Phil Thompson + + * qt/PlatQt.cpp, qt/ScintillaQt.cpp: + Fixed build problems against Qt v3. + [71168072ac9b] <2.4-maint> + + * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Added QsciScintillaBase::fromMimeData(). + [b86a15672079] <2.4-maint> + + * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Renamed QsciScintillaBase::createMimeData() to toMimeData(). + [6f5837334dde] <2.4-maint> + +2010-04-20 Phil Thompson + + * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Added QsciScintillaBase::canInsertFromMimeData(). + [bbba2c1799ef] <2.4-maint> + + * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, + qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Added QsciScintillaBase::createMimeData(). + [b2c3e3a9b43d] <2.4-maint> + +2010-03-17 Phil Thompson + + * .hgtags: + Added tag 2.4.3 for changeset 786429e0227d + [1931843aec48] <2.4-maint> + + * NEWS, build.py: + Fixed the generation of the change log after tagging a release. + Updated the NEWS file. Released as v2.4.3. + [786429e0227d] [2.4.3] <2.4-maint> + +2010-02-23 Phil Thompson + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Reverted the setting of the alpha component in + setMarkerForegroundColor() (at least until SC_MARK_UNDERLINE is + supported). + [111da2e01c5e] <2.4-maint> + + * qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Fixed the very broken support for the alpha component with Qt4. + [b1d73c7f447b] <2.4-maint> + + * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added QsciScintilla::clearFolds() to clear all current folds + (typically prior to disabling folding). + [4f4266da1962] <2.4-maint> + +2010-02-15 Phil Thompson + + * Makefile: + Switched the build system to Qt v4.6.2. + [f023013b79e4] <2.4-maint> + +2010-02-07 Phil Thompson + + * qt/qscidocument.cpp: + Fixed a bug in the handling of multiple views of a document. + [8b4aa000df1c] <2.4-maint> + +2010-01-31 Phil Thompson + + * Makefile, build.py: + Minor tidy ups for the internal build system. + [c3a41d195b8a] <2.4-maint> + +2010-01-30 Phil Thompson + + * Makefile, Python/configure.py, build.py, lib/README.doc, + lib/README.svn, lib/qscintilla.dxy, qt/qsciglobal.h: + Changes to the internal build system required by the migration to + Mercurial. + [607e474dfd28] <2.4-maint> + +2010-01-29 phil + + * .hgtags: + Import from SVN. + [49d5a0d80211] + +2010-01-20 phil + + * Makefile, NEWS: + Updated the build system to Qt v4.6.1. Released as v2.4.2. + [73732e5bae08] [2.4.2] <2.4-maint> + +2010-01-18 phil + + * qt/qscintilla_es.qm, qt/qscintilla_es.ts: + Updated Spanish translations from Jaime Seuma. + [3b911e69696d] <2.4-maint> + +2010-01-15 phil + + * Python/configure.py: + The Python bindings now check for SIP v4.10. + [8d5f4957a07c] <2.4-maint> + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the .ts files. + [15c647ac0c42] <2.4-maint> + + * NEWS, build.py: + Fixed the build system for Qt v3 and v4 prior to v4.5. + [1b5bea85a3bf] <2.4-maint> + +2010-01-14 phil + + * NEWS, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short: + Released as v2.4.1. + [a04b69746aa6] [2.4.1] <2.4-maint> + +2009-12-22 phil + + * lib/gen_python3_api.py, qsci/api/python/Python-3.1.api: + Added the API file for Python v3.1. + [116c24ab58b2] <2.4-maint> + + * NEWS, Python/configure.py: + Added support for automatically generated docstrings. + [3d316b4f222b] <2.4-maint> + +2009-12-11 phil + + * Makefile, qt/PlatQt.cpp: + Fixed a performance problem when displaying very long lines. + [d3fe67ad2eb5] <2.4-maint> + +2009-11-01 phil + + * qt/qsciapis.cpp: + Fixed a possible crash in the handling of call tips. + [6248caa24fec] <2.4-maint> + + * qt/SciClasses.cpp: + Applied the workaround for the autocomplete focus bug under Gnome's + window manager which (appears) to work with current versions of Qt + across all platforms. + [f709f1518e70] <2.4-maint> + + * Makefile, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Make sure a lexer is fully detached when a QScintilla instance is + destroyed. + [db47764231d2] <2.4-maint> + +2009-08-19 phil + + * lib/LICENSE.gpl.short, qt/qscintilla_de.qm, qt/qscintilla_de.ts: + Updated German translations from Detlev. + [458b60ec031e] <2.4-maint> + +2009-08-09 phil + + * Python/sip/qscilexerverilog.sip, Python/sip/qscimodcommon.sip, + qt/qscilexerverilog.cpp, qt/qscilexerverilog.h, qt/qscintilla.pro: + Added the QsciLexerVerilog class. + [86b2aceac88c] <2.4-maint> + + * Makefile, Python/sip/qscilexerspice.sip, + Python/sip/qscimodcommon.sip, lib/LICENSE.commercial, lib + /OPENSOURCE-NOTICE.TXT, lib/README.doc, qt/qscilexerspice.cpp, + qt/qscilexerspice.h, qt/qscintilla.pro: + Added the QsciLexerSpice class. + [56532ec00839] <2.4-maint> + +2009-06-05 phil + + * NEWS, lib/LICENSE.commercial: + Released as v2.4. + [612b1bcb8223] [2.4] + +2009-06-03 phil + + * NEWS, qt/qscistyledtext.h: + Fixed a bug building on Qt v3. + [88ebc67fdff4] + +2009-05-30 phil + + * qt/ScintillaQt.cpp: + Applied a fix for copying UTF-8 text to the X clipboard from Lars + Reichelt. + [e59fa72c2e2d] + +2009-05-27 phil + + * qt/qscilexercustom.h: + Fixed a missing forward declaration in qscilexercustom.h. + [0018449ee6aa] + +2009-05-25 phil + + * qt/qscilexercustom.cpp: + Don't ask the custom lexer to style zero characters. + [6ae021232f4f] + +2009-05-19 phil + + * NEWS, qt/qscintilla.pro, qt/qscintilla_cs.qm, qt/qscintilla_es.qm, + qt/qscintilla_es.ts, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, + qt/qscintilla_ru.qm: + Added Spanish translations from Jaime Seuma. + [0cdbee8db9af] + + * qt/qsciscintilla.cpp: + A minor fix for ancient C++ compilers. + [0523c3a0e0aa] + +2009-05-18 phil + + * NEWS, Python/sip/qscilexer.sip, Python/sip/qscilexercustom.sip, + Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, + qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexercustom.cpp, + qt/qscilexercustom.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciScintilla::annotation(). Added QsciLexerCustom (completely + untested) and supporting changes to QsciLexer. + [382d5b86f600] + +2009-05-17 phil + + * qt/qscintilla_cs.ts, qt/qscintilla_de.qm, qt/qscintilla_de.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated translations from Detlev. + [0b8c8438e464] + +2009-05-09 phil + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added support for text margins. + [be9db7d41b50] + + * qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qscistyledtext.cpp, qt/qscistyledtext.h: + Debugged the support for annotations. Tidied up the QString to + Scintilla string conversions. + [573199665222] + +2009-05-08 phil + + * NEWS, Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, + Python/sip/qscistyle.sip, Python/sip/qscistyledtext.sip, + qt/qscicommand.h, qt/qscimacro.h, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qscistyle.cpp, + qt/qscistyle.h, qt/qscistyledtext.cpp, qt/qscistyledtext.h: + Implemented the rest of the annotation API - still needs debugging. + [7f23400d2416] + +2009-05-07 phil + + * NEWS, qt/qscintilla.pro, qt/qscistyle.cpp, qt/qscistyle.h: + Added the QsciStyle class. + [bf8e3e02071e] + +2009-05-06 phil + + * qt/qsciscintillabase.cpp: + Fixed the key event handling when the text() is empty and the key() + should be used - only seems to happen with OS/X. + [868a146b019f] + +2009-05-03 phil + + * Makefile, NEWS, Python/configure.py, Python/sip/qscicommand.sip, + Python/sip/qscicommandset.sip, Python/sip/qscilexer.sip, + Python/sip/qscilexercpp.sip, Python/sip/qscilexercss.sip, + Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, + Python/sip/qscilexerpascal.sip, Python/sip/qscilexerperl.sip, + Python/sip/qscilexerpython.sip, Python/sip/qscilexerxml.sip, + Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, + README, UTF-8-demo.txt, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/ScintillaToDo.html, + doc/annotations.png, doc/index.html, doc/styledmargin.png, + gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, + gtk/scintilla.mak, include/Face.py, include/HFacer.py, + include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, + include/ScintillaWidget.h, lib/LICENSE.commercial, + macosx/PlatMacOSX.cxx, macosx/makefile, qt/PlatQt.cpp, + qt/ScintillaQt.cpp, qt/qsciapis.cpp, qt/qscidocument.cpp, + qt/qscidocument.h, qt/qscilexer.cpp, qt/qscilexer.h, + qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercss.cpp, + qt/qscilexercss.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, + qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexerpascal.cpp, + qt/qscilexerpascal.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, + qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerxml.cpp, + qt/qscilexerxml.h, qt/qscintilla.pro, qt/qscintilla_cs.ts, + qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, + qt/qscintilla_ru.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qsciscintillabase.h, src/CellBuffer.cxx, src/CellBuffer.h, + src/Document.cxx, src/Document.h, src/Editor.cxx, src/Editor.h, + src/ExternalLexer.cxx, src/Indicator.cxx, src/Indicator.h, + src/KeyWords.cxx, src/LexAU3.cxx, src/LexAbaqus.cxx, src/LexAsm.cxx, + src/LexBash.cxx, src/LexCOBOL.cxx, src/LexCPP.cxx, src/LexCSS.cxx, + src/LexD.cxx, src/LexFortran.cxx, src/LexGen.py, src/LexHTML.cxx, + src/LexHaskell.cxx, src/LexInno.cxx, src/LexLua.cxx, + src/LexMySQL.cxx, src/LexNimrod.cxx, src/LexNsis.cxx, + src/LexOthers.cxx, src/LexPascal.cxx, src/LexPerl.cxx, + src/LexPowerPro.cxx, src/LexProgress.cxx, src/LexPython.cxx, + src/LexRuby.cxx, src/LexSML.cxx, src/LexSQL.cxx, src/LexSorcus.cxx, + src/LexTACL.cxx, src/LexTADS3.cxx, src/LexTAL.cxx, src/LexTeX.cxx, + src/LexVerilog.cxx, src/LexYAML.cxx, src/PerLine.cxx, src/PerLine.h, + src/PositionCache.cxx, src/RESearch.cxx, src/RESearch.h, + src/RunStyles.h, src/SciTE.properties, src/ScintillaBase.cxx, + src/SplitVector.h, src/UniConversion.cxx, src/ViewStyle.cxx, + src/ViewStyle.h, vcbuild/SciLexer.dsp, version.txt, + win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: + Merged the v2.3 branch onto the trunk. + [1bb3d2b01123] + +2008-09-20 phil + + * Makefile, NEWS, lib/README.doc: + Released as v2.3. + [8fd73a9a9d66] [2.3] + +2008-09-17 phil + + * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciScintilla::apiContext() for further open up the auto- + completion and call tips support. + [a6291ea6dd37] + +2008-09-16 phil + + * Python/configure.py, lib/gen_python_api.py, + qsci/api/python/Python-2.6.api, qt/qsciapis.h: + Added the API file for Python v2.6rc1. Fixed a typo in the help for + the Python bindings configure.py. + [ac10be3cc7fb] + +2008-09-03 phil + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, + qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the i18n .ts files. + [b73beac06e0f] + +2008-09-01 phil + + * lib/README.doc: + Updated the Windows installation notes to cover the need to manually + install the DLL when using Qt3. + [17019ebfab36] + + * lib/README.doc, qt/qsciscintilla.cpp: + Fixed a regression in the highlighting of call tip arguments. + Updated the Windows installation notes to say that any header files + installed from a previous build should first be removed. + [cb3f27b93323] + +2008-08-31 phil + + * NEWS, Python/configure.py, Python/sip/qsciabstractapis.sip, + Python/sip/qsciapis.sip, Python/sip/qscilexer.sip, + Python/sip/qscimodcommon.sip, Python/sip/qsciscintillabase.sip, + qt/qsciabstractapis.cpp, qt/qsciabstractapis.h, qt/qsciapis.cpp, + qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added the QsciAbstractAPIs class to allow applications to provide + their own implementation of APIs. + [eb5a8a602e5d] + + * Makefile, Python/configure.py, Python/sip/qscilexerfortran.sip, + Python/sip/qscilexerfortran77.sip, Python/sip/qscilexerpascal.sip, + Python/sip/qscilexerpostscript.sip, Python/sip/qscilexertcl.sip, + Python/sip/qscilexerxml.sip, Python/sip/qscilexeryaml.sip, + Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase.sip, build.py, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/makefile, gtk/scintilla.mak, + include/Platform.h, include/SciLexer.h, include/Scintilla.h, + include/Scintilla.iface, lib/LICENSE.commercial, lib/README.doc, + lib/qscintilla.dxy, macosx/ExtInput.cxx, macosx/ExtInput.h, + macosx/PlatMacOSX.cxx, macosx/PlatMacOSX.h, + macosx/QuartzTextLayout.h, macosx/QuartzTextStyle.h, + macosx/QuartzTextStyleAttribute.h, macosx/ScintillaMacOSX.cxx, + macosx/ScintillaMacOSX.h, macosx/TView.cxx, macosx/makefile, + qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/qscilexerfortran.cpp, + qt/qscilexerfortran.h, qt/qscilexerfortran77.cpp, + qt/qscilexerfortran77.h, qt/qscilexerhtml.cpp, qt/qscilexerlua.cpp, + qt/qscilexerlua.h, qt/qscilexerpascal.cpp, qt/qscilexerpascal.h, + qt/qscilexerperl.cpp, qt/qscilexerperl.h, + qt/qscilexerpostscript.cpp, qt/qscilexerpostscript.h, + qt/qscilexertcl.cpp, qt/qscilexertcl.h, qt/qscilexerxml.cpp, + qt/qscilexerxml.h, qt/qscilexeryaml.cpp, qt/qscilexeryaml.h, + qt/qscimacro.cpp, qt/qscimacro.h, qt/qscintilla.pro, + qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.h, src/CellBuffer.cxx, + src/Editor.cxx, src/Editor.h, src/KeyWords.cxx, src/LexCPP.cxx, + src/LexGen.py, src/LexMagik.cxx, src/LexMatlab.cxx, src/LexPerl.cxx, + src/LexPowerShell.cxx, src/LineMarker.cxx, src/RunStyles.cxx, + src/RunStyles.h, vcbuild/SciLexer.dsp, version.txt, + win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: + Merged the v2.2 maintenance branch. + [cd784c60bcc7] + +2008-02-27 phil + + * NEWS, build.py, lib/GPL_EXCEPTION.TXT, lib/LICENSE.GPL2, + lib/LICENSE.GPL3, lib/LICENSE.commercial, + lib/LICENSE.commercial.short, lib/LICENSE.gpl, + lib/LICENSE.gpl.short, lib/OPENSOURCE-NOTICE.TXT: + Updated the licenses to be in line with the the current Qt licenses, + including GPL v3. Released as v2.2. + [a039ca791129] [2.2] + +2008-02-23 phil + + * Makefile, qt/PlatQt.cpp: + Switched to Qt v4.3.4. Further tweaks for Windows64 support. + [3ae9686f38e6] + +2008-02-22 phil + + * Makefile, NEWS, Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, + qt/ScintillaQt.cpp, qt/qscidocument.cpp, qt/qscimacro.cpp, + qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Several fixes for Windows64 support based on a patch from Randall + Frank. + [2c753ee01c42] + +2008-02-09 phil + + * Python/configure.py, lib/README.doc, qt/qscintilla.pro: + It's no longer necessary to set DYLD_LIBRARY_PATH when using the + Python bindings. + [d1098424aed1] + +2008-02-03 phil + + * Python/sip/qscilexerruby.sip: + Added the missing QsciLexerRuby.Error to the Python bindings. + [0b4f06a30251] + +2008-01-20 phil + + * designer-Qt4/qscintillaplugin.cpp, designer-Qt4/qscintillaplugin.h: + Fixed a problem with the Qt4 Designer plugin on Leopard. + [5450a1bc62df] + +2008-01-11 phil + + * qt/SciClasses.cpp, qt/qsciscintillabase.cpp: + Hopefully fixed shortcuts and accelerators when the autocompletion + list is displayed. + [8304a1f4e36b] + +2008-01-06 phil + + * qt/SciClasses.cpp: + Hopefully fixed a bug stopping normal typing when the autocompletion + list is being displayed. + [2db0cc8fa158] + +2008-01-03 phil + + * lib/LICENSE.commercial.short, lib/LICENSE.gpl, + lib/LICENSE.gpl.short, lib/README.doc, qt/qsciscintillabase.cpp: + Fixed a Qt3 compilation bug. Updated the copyright notices. + [cf238f41fb54] + +2007-12-30 phil + + * qt/SciClasses.cpp, qt/SciClasses.h, qt/qsciscintillabase.cpp: + Hopefully fixed the problems with the auto-completion popup on all + platforms (not tested on Mac). + [585aa7e4e59f] + +2007-12-29 phil + + * qt/SciClasses.cpp: + Remove the use of the internal Tooltip widget flag so that the X11 + auto-completion list now has the same problems as the Windows + version. (Prior to fixing the problem properly.) + [93d584d099db] + +2007-12-23 phil + + * qt/ScintillaQt.cpp: + Fixed DND problems with Qt4. + [23f8c1a7c4c7] + + * qt/qsciscintilla.cpp: + Fix from Detlev for an infinite loop caused by calling + getCursorPosition() when Scintilla reports a position past the end + of the text. + [dd99ade93fa6] + +2007-12-05 phil + + * qt/qscilexerperl.cpp, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Fixed a silly typo in the updated Perl lexer. + [0e290eb71572] + + * qt/qscintilla_de.qm: + Updated German translations from Detlev. + [e820d3c167f5] + + * Makefile: + Switched the internal build system to Qt v4.3.3. + [df2d877e2422] + +2007-12-04 phil + + * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, + qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the translation source files. + [1fb11f16d750] + + * Python/sip/qscilexerperl.sip, Python/sip/qsciscintillabase.sip, + doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/ScintillaRelated.html, + doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, + gtk/scintilla.mak, include/Platform.h, include/PropSet.h, + include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, + lib/README.svn, macosx/PlatMacOSX.cxx, macosx/ScintillaMacOSX.h, + macosx/makefile, qt/PlatQt.cpp, qt/qscilexer.cpp, qt/qscilexer.h, + qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, + qt/qsciscintillabase.h, src/CellBuffer.cxx, src/CellBuffer.h, + src/ContractionState.cxx, src/ContractionState.h, src/Document.cxx, + src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, + src/Editor.h, src/KeyWords.cxx, src/LexAPDL.cxx, src/LexASY.cxx, + src/LexAU3.cxx, src/LexAbaqus.cxx, src/LexBash.cxx, src/LexCPP.cxx, + src/LexGen.py, src/LexHTML.cxx, src/LexHaskell.cxx, + src/LexMetapost.cxx, src/LexOthers.cxx, src/LexPerl.cxx, + src/LexPython.cxx, src/LexR.cxx, src/LexSQL.cxx, src/LexTeX.cxx, + src/LexYAML.cxx, src/Partitioning.h, src/PositionCache.cxx, + src/PositionCache.h, src/PropSet.cxx, src/RunStyles.cxx, + src/RunStyles.h, src/ScintillaBase.cxx, src/SplitVector.h, + src/ViewStyle.cxx, src/ViewStyle.h, vcbuild/SciLexer.dsp, + version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, + win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, + win32/scintilla_vc6.mak: + Merged Scintilla v1.75. + [8009a4d7275a] + +2007-11-17 phil + + * qt/SciClasses.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Bug fixes for selectAll() and getCursorPosition() from Baz Walter. + [80eecca239b4] + +2007-10-24 phil + + * qt/qsciscintilla.cpp: + Fixed folding for HTML. + [bb6fb6065e30] + +2007-10-14 phil + + * build.py, lib/GPL_EXCEPTION.TXT, lib/GPL_EXCEPTION_ADDENDUM.TXT, + lib/LICENSE.gpl, lib/OPENSOURCE-NOTICE.TXT, qt/qscicommandset.cpp: + Control characters that are not bound to commands (or shortcuts) now + default to doing nothing (rather than inserting the character into + the text). Aligned the GPL license with Trolltech's exceptions. + [148432c68762] + +2007-10-12 phil + + * src/LexHTML.cxx: + Fixed the Scintilla HTML lexer's handling of characters >= 0x80. + [c4e271ce8e96] + +2007-10-05 phil + + * qt/qsciscintillabase.cpp: + Used NoSystemBackground rather than OpaquePaintEvent to eliminate + flicker. + [01a22c66304d] + +2007-10-04 phil + + * Makefile, qt/qsciscintillabase.cpp: + Fixed a flashing effect visible with a non-standard background. + Switched to Qt v4.3.2. + [781c58fcba96] + +2007-09-23 phil + + * qt/qsciapis.h, qt/qscicommand.h, qt/qscicommandset.h, + qt/qscidocument.h, qt/qsciglobal.h, qt/qscilexer.h, + qt/qscilexerbash.h, qt/qscilexerbatch.h, qt/qscilexercmake.h, + qt/qscilexercpp.h, qt/qscilexercsharp.h, qt/qscilexercss.h, + qt/qscilexerd.h, qt/qscilexerdiff.h, qt/qscilexerhtml.h, + qt/qscilexeridl.h, qt/qscilexerjava.h, qt/qscilexerjavascript.h, + qt/qscilexerlua.h, qt/qscilexermakefile.h, qt/qscilexerperl.h, + qt/qscilexerpov.h, qt/qscilexerproperties.h, qt/qscilexerpython.h, + qt/qscilexerruby.h, qt/qscilexersql.h, qt/qscilexertex.h, + qt/qscilexervhdl.h, qt/qscimacro.h, qt/qsciprinter.h, + qt/qsciscintilla.h, qt/qsciscintillabase.h: + Made the recent portabilty changes Mac specific as AIX has a problem + with them. + [0de605d4079f] + +2007-09-16 phil + + * qt/qscilexer.cpp: + A lexer's default colour, paper and font are now written to and read + from the settings. + [45277fc76ace] + +2007-09-15 phil + + * lib/README.doc, qt/qsciapis.h, qt/qscicommand.h, + qt/qscicommandset.h, qt/qscidocument.h, qt/qsciglobal.h, + qt/qscilexer.h, qt/qscilexerbash.h, qt/qscilexerbatch.h, + qt/qscilexercmake.h, qt/qscilexercpp.h, qt/qscilexercsharp.h, + qt/qscilexercss.h, qt/qscilexerd.h, qt/qscilexerdiff.h, + qt/qscilexerhtml.h, qt/qscilexeridl.h, qt/qscilexerjava.h, + qt/qscilexerjavascript.h, qt/qscilexerlua.h, qt/qscilexermakefile.h, + qt/qscilexerperl.h, qt/qscilexerpov.h, qt/qscilexerproperties.h, + qt/qscilexerpython.h, qt/qscilexerruby.h, qt/qscilexersql.h, + qt/qscilexertex.h, qt/qscilexervhdl.h, qt/qscimacro.h, + qt/qsciprinter.h, qt/qsciscintilla.h, qt/qsciscintillabase.h: + Fixed the MacOS build problems when using the binary installer + version of Qt. + [e059a923a447] + + * lib/LICENSE.commercial.short, qt/PlatQt.cpp: + Added the missing WaitMouseMoved() implementation on MacOS. + [78d1c8fc37c0] + +2007-09-10 phil + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + QsciScintilla::setFont() now calls QWidget::setFont() so that font() + returns the expected value. + [fd4f577c60ea] + +2007-09-02 phil + + * qt/qsciscintilla.cpp: + Fixed problems which the font size of STYLE_DEFAULT not being + updated when the font of style 0 was changed. Hopefully this fixes + the problems with edge columns and indentation guides. + [ddeccb6f64a0] + +2007-08-12 phil + + * Makefile, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, + qt/qscintilla.pro: + Applied .pro file fix from Dirk Mueller to add a proper install + rule. + [a3a2e49f1042] + +2007-07-22 phil + + * qt/qscilexer.cpp: + Made sure that the backgound colour of areas of the widget with no + text is updated when QsciLexer.setDefaultPaper() is called. + [065558d2430b] + +2007-07-09 phil + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Explicitly set the style for STYLE_DEFAULT when setting a lexer. + [a95fc3357771] + +2007-06-30 phil + + * Python/sip/qsciscintillabase.sip, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, gtk/scintilla.mak, + include/Accessor.h, include/HFacer.py, include/KeyWords.h, + include/Platform.h, include/PropSet.h, include/SString.h, + include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, + include/WindowAccessor.h, macosx/PlatMacOSX.cxx, + macosx/PlatMacOSX.h, macosx/QuartzTextLayout.h, + macosx/QuartzTextStyle.h, macosx/QuartzTextStyleAttribute.h, + macosx/SciTest/English.lproj/InfoPlist.strings, + macosx/SciTest/English.lproj/main.nib/classes.nib, + macosx/SciTest/English.lproj/main.nib/info.nib, + macosx/SciTest/English.lproj/main.nib/objects.xib, + macosx/SciTest/Info.plist, + macosx/SciTest/SciTest.xcode/project.pbxproj, + macosx/SciTest/SciTest_Prefix.pch, macosx/SciTest/main.cpp, + macosx/SciTest/version.plist, macosx/ScintillaCallTip.cxx, + macosx/ScintillaCallTip.h, macosx/ScintillaListBox.cxx, + macosx/ScintillaListBox.h, macosx/ScintillaMacOSX.cxx, + macosx/ScintillaMacOSX.h, macosx/TCarbonEvent.cxx, + macosx/TCarbonEvent.h, macosx/TRect.h, macosx/TView.cxx, + macosx/TView.h, macosx/deps.mak, macosx/makefile, + qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, + qt/qsciscintillabase.h, src/AutoComplete.cxx, src/AutoComplete.h, + src/CallTip.cxx, src/CallTip.h, src/CellBuffer.cxx, + src/CellBuffer.h, src/CharacterSet.h, src/ContractionState.cxx, + src/ContractionState.h, src/Decoration.cxx, src/Decoration.h, + src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, + src/DocumentAccessor.h, src/Editor.cxx, src/Editor.h, + src/ExternalLexer.cxx, src/ExternalLexer.h, src/Indicator.cxx, + src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/KeyWords.cxx, + src/LexAPDL.cxx, src/LexAU3.cxx, src/LexAVE.cxx, src/LexAda.cxx, + src/LexAsm.cxx, src/LexAsn1.cxx, src/LexBaan.cxx, src/LexBash.cxx, + src/LexBasic.cxx, src/LexBullant.cxx, src/LexCLW.cxx, + src/LexCPP.cxx, src/LexCSS.cxx, src/LexCaml.cxx, src/LexCmake.cxx, + src/LexConf.cxx, src/LexCrontab.cxx, src/LexCsound.cxx, + src/LexD.cxx, src/LexEScript.cxx, src/LexEiffel.cxx, + src/LexErlang.cxx, src/LexFlagship.cxx, src/LexForth.cxx, + src/LexFortran.cxx, src/LexGAP.cxx, src/LexGen.py, + src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexHaskell.cxx, + src/LexInno.cxx, src/LexKix.cxx, src/LexLisp.cxx, src/LexLout.cxx, + src/LexLua.cxx, src/LexMMIXAL.cxx, src/LexMPT.cxx, src/LexMSSQL.cxx, + src/LexMatlab.cxx, src/LexMetapost.cxx, src/LexNsis.cxx, + src/LexOpal.cxx, src/LexOthers.cxx, src/LexPB.cxx, src/LexPLM.cxx, + src/LexPOV.cxx, src/LexPS.cxx, src/LexPascal.cxx, src/LexPerl.cxx, + src/LexProgress.cxx, src/LexPython.cxx, src/LexRebol.cxx, + src/LexRuby.cxx, src/LexSQL.cxx, src/LexScriptol.cxx, + src/LexSmalltalk.cxx, src/LexSpecman.cxx, src/LexSpice.cxx, + src/LexTADS3.cxx, src/LexTCL.cxx, src/LexTeX.cxx, src/LexVB.cxx, + src/LexVHDL.cxx, src/LexVerilog.cxx, src/LexYAML.cxx, + src/LineMarker.cxx, src/LineMarker.h, src/Partitioning.h, + src/PositionCache.cxx, src/PositionCache.h, src/PropSet.cxx, + src/RESearch.cxx, src/RESearch.h, src/RunStyles.cxx, + src/RunStyles.h, src/SVector.h, src/ScintillaBase.cxx, + src/ScintillaBase.h, src/SplitVector.h, src/Style.cxx, src/Style.h, + src/StyleContext.cxx, src/StyleContext.h, src/UniConversion.cxx, + src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, + src/WindowAccessor.cxx, src/XPM.cxx, src/XPM.h, + vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, + win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak, + zipsrc.bat: + Merged Scintilla v1.74. + [04dee9c2424f] + + * Python/sip/qscilexerpython.sip, build.py, qt/qscilexer.cpp, + qt/qscilexerbash.cpp, qt/qscilexerpython.cpp, qt/qscilexerpython.h, + qt/qscintilla.pro: + Fixed comment folding in the Bash lexer. A style is properly + restored when read from QSettings. Removed ./Qsci from the qmake + INCLUDEPATH. Removed the Scintilla version number from generated + filenames. Used fully qualified enum names in the Python lexer so + that the QMetaObject is correct. + [6b27a5b211e0] + +2007-06-01 phil + + * NEWS: + Released as v2.1. + [9976edafc5c1] [2.1] + +2007-05-30 phil + + * Makefile: + Switched the internal build system to Qt v4.3.0. + [49284aa376ef] + + * NEWS, Python/configure.py, Python/sip/qscilexer.sip, + Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, + Python/sip/qscilexercmake.sip, Python/sip/qscilexercpp.sip, + Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, + Python/sip/qscilexerd.sip, Python/sip/qscilexerdiff.sip, + Python/sip/qscilexerhtml.sip, Python/sip/qscilexeridl.sip, + Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, + Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, + Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, + Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, + Python/sip/qscilexersql.sip, Python/sip/qscilexertex.sip, + Python/sip/qscilexervhdl.sip, Python/sip/qscimodcommon.sip, + build.py, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerbash.cpp, + qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, + qt/qscilexercmake.cpp, qt/qscilexercmake.h, qt/qscilexercpp.cpp, + qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, + qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerd.cpp, + qt/qscilexerd.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, + qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.cpp, + qt/qscilexeridl.h, qt/qscilexerjavascript.cpp, + qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, + qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, + qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, + qt/qscilexerpov.h, qt/qscilexerproperties.cpp, + qt/qscilexerproperties.h, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, + qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, + qt/qscilexertex.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, + qt/qscintilla.pro: + Lexers now remember their style settings. A lexer no longer has to + be the current lexer when changing a style's color, end-of-line + fill, font or paper. The color(), eolFill(), font() and paper() + methods of QsciLexer now return the current values for a style + rather than the default values. The setDefaultColor(), + setDefaultFont() and setDefaultPaper() methods of QsciLexer are no + longer slots and no longer virtual. The defaultColor(), + defaultFont() and defaultPaper() methods of QsciLexer are no longer + virtual. The color(), eolFill(), font() and paper() methods of all + QsciLexer derived classes (except for QsciLexer itself) have been + renamed defaultColor(), defaultEolFill(), defaultFont() and + defaultPaper() respectively. + [38aeee2a5a36] + +2007-05-28 phil + + * qt/qsciscintilla.cpp: + Set the number of style bits after we've set the lexer. + [84cda9af5b00] + + * Python/configure.py: + Fixed the handling of the %Timeline in the Python bindings. + [4b3146d1a236] + +2007-05-27 phil + + * Python/sip/qsciscintillabase.sip: + Updated the sub-class convertor code in the Python bindings for the + Cmake and VHDL lexers. + [6ab6570728a2] + +2007-05-26 phil + + * NEWS: + Updated the NEWS file. Released as v2.0. + [eec9914d8211] [2.0] + +2007-05-19 phil + + * Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Added basic input method support for Qt4 so that accented characters + now work. (Although there is still a font problem - at least a text + colour problem.) + [6b41f3694999] + + * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintillabase.cpp: + Fixed building against Qt v3. + [9e9ba05de0fb] + +2007-05-17 phil + + * qt/qsciscintilla.cpp: + Fixed an autocompletion problem where an empty list was being + displayed. + [c7214274017c] + +2007-05-16 phil + + * qt/qsciscintilla.cpp: + Fixed a bug where autocompleting from the document was looking for + preceeding non-word characters as well. + [3ee6fd746d49] + + * qt/qsciscintilla.cpp: + Fixed silly typo that broke call tips. + [05213a8933c2] + +2007-05-09 phil + + * qt/qsciscintilla.cpp: + Fiex an autocompletion bug for words that only had preceding + whitespace. + [a8f3339e02c6] + + * Python/configure.py, lib/gen_python_api.py, + qsci/api/python/Python-2.4.api, qsci/api/python/Python-2.5.api, + qt/qsciapis.cpp, qt/qsciapis.h: + Call tips shouldn't now get confused with commas in the text after + the argument list. The included API files for Python should now be + complete and properly exclude anything beginning with an underscore. + The Python bindings configure.py can now install the API file in a + user supplied directory. + [c7e93dc918de] + + * qt/qscintilla_cs.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, + qt/qscintilla_ru.qm: + Ran lrelease on the project. + [c3ce60078221] + + * Makefile, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, + qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: + Updated the internal build system to Qt v4.3.0rc1. Ran lupdate on + the project. + [6a86e71a4e26] + +2007-05-08 phil + + * Python/sip/qsciscintilla.sip, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Call tips will now show all the tips for a function (in all scopes) + if the current context/scope isn't known. + [cbebccc205c7] + + * Python/sip/qsciscintilla.sip, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added callTipsStyle() and setCallTipsStyle() to QsciScintilla. + [59d453b5da8c] + +2007-05-07 phil + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Autocompletion from documents should now work the same as QScintilla + v1. The only difference is that the list does not contain the + preceding context so it is consistent with autocompletion from APIs. + [46de719d325e] + + * qt/qscintilla.pro, qt/qscintilla_cs.qm, qt/qscintilla_cs.ts: + Added the Czech translations from Zdenek Bohm. + [139fd9aee405] + +2007-04-30 phil + + * Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciScintilla::wordCharacters(). + [d6e56986a031] + +2007-04-29 phil + + * Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Added lots of consts to QsciScintilla getter methods. + [4aaffa8611ba] + + * Python/configure.py, Python/sip/qsciscintilla.sip, + qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, + qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added caseSensitive() and isWordCharacter() to QsciScintilla. + Updated translations from Detlev. + [64223bf97266] + +2007-04-10 phil + + * Python/sip/qscilexercmake.sip, Python/sip/qscilexervhdl.sip, + Python/sip/qscimodcommon.sip, qt/qscilexercmake.cpp, + qt/qscilexercmake.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, + qt/qscintilla.pro: + Added the QsciLexerVHDL class. + [10029339786f] + + * Python/sip/qscilexercmake.sip, Python/sip/qscimodcommon.sip, + qt/qscilexercmake.cpp, qt/qscilexercmake.h, qt/qscintilla.pro: + Added the QsciLexerCmake class. + [c1c911246f75] + +2007-04-09 phil + + * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Finished call tip support. + [b8c717297392] + +2007-04-07 phil + + * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Some refactoring in preparation for getting call tips working. + [6cb925653a80] + +2007-04-06 phil + + * qt/qsciscintilla.cpp: + Fixed autoindenting. + [8d7b93ee4d9e] + +2007-04-05 phil + + * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp: + Fixed autocompletion so that it works with lexers that don't define + word separators, and lexers that are case insensitive. + [66634cf13685] + +2007-04-04 phil + + * qt/ScintillaQt.cpp, qt/qsciscintilla.cpp: + Fixed the horizontal scrollbar when word wrapping. + [021ea1fe8468] + +2007-04-03 phil + + * Python/configure.py, Python/sip/qsciscintillabase.sip, delcvs.bat, + doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/ScintillaRelated.html, + doc/index.html, gtk/makefile, gtk/scintilla.mak, include/SciLexer.h, + include/Scintilla.h, include/Scintilla.iface, qt/ScintillaQt.cpp, + qt/qscintilla.pro, qt/qsciscintillabase.h, src/Document.cxx, + src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, + src/Editor.h, src/ExternalLexer.h, src/KeyWords.cxx, src/LexAU3.cxx, + src/LexBash.cxx, src/LexCmake.cxx, src/LexHTML.cxx, src/LexLua.cxx, + src/LexMSSQL.cxx, src/LexOthers.cxx, src/LexTADS3.cxx, + src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, + src/SplitVector.h, vcbuild/SciLexer.dsp, version.txt, + win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: + Merged Scintilla v1.73. + [2936af6fc62d] + +2007-03-18 phil + + * Makefile, Python/sip/qscilexerd.sip, Python/sip/qscimodcommon.sip, + Python/sip/qsciscintillabase.sip, qt/qscilexerd.cpp, + qt/qscilexerd.h, qt/qscintilla.pro, qt/qscintilla_de.qm, + qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, + qt/qscintilla_ru.ts: + Switched the internal build system to Qt v4.2.3. Added the D lexer + support from Detlev. + [667e9b81ab4f] + +2007-03-04 phil + + * Makefile, example-Qt4/mainwindow.cpp, qt/PlatQt.cpp, + qt/qsciscintilla.cpp: + Fixed a bug in default font handling. Removed use of QIODevice::Text + in the example as it is unnecessary and a performance hog. Moved the + internal Qt3 build system to Qt v3.3.8. Auto-indentation should now + work (as badly) as it did with QScintilla v1. + [4d3ad4d1f295] + +2007-01-17 phil + + * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: + Added defaultPreparedName() to QsciAPIs. + [2a3c872122dd] + + * designer-Qt4/qscintillaplugin.cpp: + Fixed the Qt4 Designer plugin include file value. + [ea7cb8634ad2] + +2007-01-16 phil + + * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: + Added cancelPreparation() and apiPreparationCancelled() to QsciAPIs. + [2d7dd00e3bc0] + + * Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, + build.py, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, + qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Updated the copyright notices. Added selectionToEol() and + setSelectionToEol() to QsciScintilla. Added the other 1.72 changes + to the low level API. + [ddcf2d43cf31] + + * doc/SciBreak.jpg, doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/ScintillaRelated.html, + doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, + gtk/scintilla.mak, include/SciLexer.h, include/Scintilla.h, + include/Scintilla.iface, qt/ScintillaQt.h, src/CellBuffer.cxx, + src/CellBuffer.h, src/ContractionState.cxx, src/Document.cxx, + src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, + src/Editor.h, src/KeyWords.cxx, src/LexCPP.cxx, src/LexD.cxx, + src/LexGen.py, src/LexHTML.cxx, src/LexInno.cxx, src/LexLua.cxx, + src/LexMatlab.cxx, src/LexNsis.cxx, src/LexOthers.cxx, + src/LexRuby.cxx, src/LexTADS3.cxx, src/Partitioning.h, + src/ScintillaBase.cxx, src/SplitVector.h, src/StyleContext.h, + src/ViewStyle.cxx, src/ViewStyle.h, vcbuild/SciLexer.dsp, + version.txt, win32/ScintRes.rc, win32/ScintillaWin.cxx, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: + Merged Scintilla v1.72, but any new features are not yet exploited. + [dcdfde9050a2] + +2007-01-09 phil + + * Python/configure.py: + Fixed bug in configure.py when the -p flag wasn't specified. + [50dc69f2b20d] + +2007-01-04 phil + + * Python/configure.py, Python/sip/qscilexer.sip, qt/qsciapis.cpp, + qt/qsciapis.h, qt/qsciscintilla.cpp: + Backported to Qt v3. Note that this will probably break again in the + future when call tips are redone. + [3bcc4826fc73] + +2007-01-02 phil + + * Python/configure.py, lib/gen_python_api.py, + qsci/api/python/Python-2.4.api, qsci/api/python/Python-2.5.api, + qt/qsciapis.cpp: + Added the Python v2.4 and v2.5 API files. Added the generation of + the QScintilla2.api file. + [49beb92ca721] + +2007-01-01 phil + + * Python/sip/qsciscintilla.sip, qt/qscilexer.h, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added autoCompletionFillupsEnabled() and + setAutoCompletionFillupsEnabled() to QsciScintilla. Updated the + Python bindings. + [7aa946010e9d] + + * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: + Implemented loadPrepared() and savePrepared() in QsciAPIs. Added + isPrepared() to QsciAPIs. Updated the Python bindings. + [4c5e3d80fec7] + + * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: + Added installAPIFiles() and stubs for loadPrepared() and + savePrepared() to QsciAPIs. + [93f4dd7222a1] + + * Python/sip/qsciapis.sip: + Added the missing qsciapis.sip file. + [064b524acc93] + + * Python/sip/qscilexer.sip, Python/sip/qscimodcommon.sip, + lib/qscintilla.dxy, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qscilexer.cpp, qt/qscilexer.h: + Fixed the generation of the API documentation. Added apis() and + setAPIs() to QsciLexer. Removed apiAdd(), apiClear(), apiLoad(), + apiRemove(), apiProcessingStarted() and apiProcessingFinished() from + QsciLexer. Added apiPreparationStarted() and + apiPreparationFinished() to QsciAPIs. Made QsciAPIs part of the API + again. Updated the Python bindings. + [851d133b12ff] + +2006-12-20 phil + + * Makefile, qt/qsciapis.cpp, qt/qsciapis.h: + Updated the internal build system to Qt v4.2.2. More work on auto- + completion. + [d4542220e7a2] + +2006-11-26 phil + + * qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + More work on the auto-completion code. + [37b2d0d2b154] + +2006-11-22 phil + + * qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h, + qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Changed the handling of case sensitivity in auto-completion lists. + Lexers now say if they are case sensitive. + [b1932fba61ec] + +2006-11-17 phil + + * Makefile, Python/configure.py, Python/sip/qscicommand.sip, + Python/sip/qscicommandset.sip, Python/sip/qscidocument.sip, + Python/sip/qscilexer.sip, Python/sip/qscilexerbash.sip, + Python/sip/qscilexerbatch.sip, Python/sip/qscilexercpp.sip, + Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, + Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, + Python/sip/qscilexeridl.sip, Python/sip/qscilexerjava.sip, + Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, + Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, + Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, + Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, + Python/sip/qscilexersql.sip, Python/sip/qscilexertex.sip, + Python/sip/qscimacro.sip, Python/sip/qsciprinter.sip, + Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, + TODO, build.py, designer-Qt3/qscintillaplugin.cpp, designer- + Qt4/qscintillaplugin.cpp, example-Qt3/application.cpp, example- + Qt4/mainwindow.cpp, qt/PlatQt.cpp, qt/ScintillaQt.cpp, + qt/qsciapis.cpp, qt/qsciapis.h, qt/qscicommand.cpp, + qt/qscicommand.h, qt/qscicommandset.cpp, qt/qscicommandset.h, + qt/qscidocument.cpp, qt/qscidocument.h, qt/qscilexer.cpp, + qt/qscilexer.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, + qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercpp.cpp, + qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, + qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, + qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, + qt/qscilexeridl.cpp, qt/qscilexeridl.h, qt/qscilexerjava.cpp, + qt/qscilexerjava.h, qt/qscilexerjavascript.cpp, + qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, + qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, + qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, + qt/qscilexerpov.h, qt/qscilexerproperties.cpp, + qt/qscilexerproperties.h, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, + qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, + qt/qscilexertex.h, qt/qscimacro.cpp, qt/qscimacro.h, + qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciprinter.h, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h: + Fixed the name of the generated source packages. Reorganised so that + the header files are in a separate sub-directory. Updated the + designer plugins and examples for the changing in header file + structure. More work on autocompletion. Basic functionality is + there, but no support for the "current context" yet. + [312e74140bb8] + +2006-11-04 phil + + * designer-Qt4/qscintillaplugin.cpp: + Designer plugin fixes for Qt4 from DavidB. + [920f7af8bec6] + +2006-11-03 phil + + * qt/qscilexer.cpp: + Fixed QsciLexer::setPaper() so that it also sets the background + colour of the default style. + [fcab00732d97] + +2006-10-21 phil + + * Makefile, qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp: + Switched the internal build system to Qt v3.3.7 and v4.2.1. + Portability fixes for Qt3. + [512b57958ea4] + +2006-10-20 phil + + * Makefile, build.py, include/Platform.h, lib/README.doc, + qt/PlatQt.cpp, qt/qscimacro.cpp, qt/qscintilla.pro, + qt/qsciscintilla.cpp: + Renamed the base package QScintilla2. Platform portability fixes + from Ulli. The qsci data directory is now installed (where API files + will be kept). + [2a61d65842fb] + +2006-10-13 phil + + * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, + qt/qscintilla_pt_br.qm, qt/qscintilla_pt_br.ts, + qt/qscintilla_ptbr.qm, qt/qscintilla_ptbr.ts, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added QsciScintilla::linesChanged() from Detlev. Removed + QsciScintilla::markerChanged(). Renamed the Brazilian Portugese + translation files. + [5b23de72e063] + + * Makefile, Python/sip/qscilexer.sip, qt/ListBoxQt.cpp, + qt/ListBoxQt.h, qt/ScintillaQt.cpp, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qscilexer.cpp, qt/qscilexer.h, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + Added apiRemove(), apiProcessingStarted() and + apiProcessingFinished() to QsciLexer. + [ef2cb95b868a] + +2006-10-08 phil + + * qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Reset the text and paper colours and font when removing a lexer. + [08ac85b34d80] + + * qt/qsciscintilla.cpp: + Fixed Qt3 specific problem with most recent changes. + [e4ba06e01a1e] + +2006-10-06 phil + + * Python/sip/qsciapis.sip, Python/sip/qscilexer.sip, + Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, + qt/ListBoxQt.cpp, qt/SciClasses.cpp, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerbash.cpp, + qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, + qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.h, + qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, + qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, + qt/qscilexeridl.h, qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, + qt/qscilexerlua.h, qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, + qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, + qt/qscilexerpov.h, qt/qscilexerproperties.cpp, + qt/qscilexerproperties.h, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, + qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, + qt/qscilexertex.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Made QsciAPIs an internal class and instead added apiAdd(), + apiClear() and apiLoad() to QsciLexer. Replaced + setAutoCompletionStartCharacters() with + setAutoCompletionWordSeparators() in QsciScintilla. Removed + autoCompletionFillupsEnabled(), setAutoCompletionFillupsEnabled(), + setAutoCompletionAPIs() and setCallTipsAPIs() from QsciScintilla. + Added AcsNone to QsciScintilla::AutoCompletionSource. Horizontal + scrollbars are displayed as needed in autocompletion lists. Added + QsciScintilla::lexer(). Fixed setFont(), setColor(), setEolFill() + and setPaper() in QsciLexer so that they handle all styles as + documented. Removed all occurences of QString::null. Fixed the + problem with indentation guides not changing when the size of a + space changed. Added the QsciScintilla::markerChanged() signal. + Updated the Python bindings. + [9ae22e152365] + +2006-10-01 phil + + * qt/PlatQt.cpp: + Fixed a silly line drawing bug. + [0f9f5c22421a] + +2006-09-30 phil + + * qt/qscintilla.pro: + Fixes for building on Windows and MacOS/X. + [c16bc6aeba20] + +2006-09-29 phil + + * example-Qt4/application.pro, qt/PlatQt.cpp, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.cpp: + Fixed the documentation bug in QsciScintilla::insert(). Fixed the + mouse shape changing properly. Fixed the drawing of fold markers. + [08af64d93094] + +2006-09-23 phil + + * lib/README: + Improved the README for the pedants amongst us. + [683bdb9a84fc] + + * designer-Qt4/designer.pro, designer-Qt4/qscintillaplugin.cpp, + designer-Qt4/qscintillaplugin.h: + The Qt4 Designer plugin now loads - thanks to DavidB. + [feb5a3618df6] + +2006-09-16 phil + + * build.py, designer-Qt3/designer.pro, designer- + Qt3/qscintillaplugin.cpp, designer-Qt4/designer.pro, designer- + Qt4/qscintillaplugin.cpp, designer/designer.pro, + designer/qscintillaplugin.cpp, lib/README.doc, qt/qsciscintilla.h: + Fixed the Qt3 designer plugin. Added the Qt4 designer plugin based + on Andrius Ozelis's work. (But it doesn't load for me - does anybody + else have a problem?) + [3a0873ed5ff0] + +2006-09-09 phil + + * Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, + qt/qsciscintilla.h: + QsciScintilla's setFont(), setColor() and setPaper() now work as + expected when there is no lexer (and have no effect if there is a + lexer). + [65cc713d9ecb] + +2006-08-28 phil + + * qt/ListBoxQt.cpp, qt/PlatQt.cpp: + Fixed a crash when double-clicking on an auto-completion list entry. + [d8eecfc59ca2] + +2006-08-27 phil + + * Python/sip/qsciscintillabase.sip, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/index.html, gtk/Converter.h, gtk/PlatGTK.cxx, + gtk/ScintillaGTK.cxx, qt/ScintillaQt.cpp, qt/qsciscintillabase.h, + src/Editor.cxx, src/LexCPP.cxx, src/LexPerl.cxx, src/LexVB.cxx, + src/StyleContext.h, version.txt, win32/ScintRes.rc, + win32/ScintillaWin.cxx: + Merged Scintilla v1.71. The SCN_DOUBLECLICK() signal now passes the + line and position of the click. + [81c852fed943] + +2006-08-17 phil + + * Python/sip/qsciscintilla.sip, qt/ScintillaQt.cpp: + Fixed pasting when Unicode mode is set. + [9d4a7ccef6f4] + + * build.py: + Fixed the internal build system leaving SVN remnants around. + [96c36a0e94ac] + +2006-07-30 phil + + * NEWS, Python/sip/qsciscintilla.sip, qt/qscicommand.h, + qt/qscicommandset.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: + Added autoCompletionFillupsEnabled() and + setAutoCompletionFillupsEnabled() to QsciScintilla. Don't auto- + complete numbers. Removed QsciCommandList. + [e9886e5da7c3] + +2006-07-29 phil + + * lib/README.doc, qt/PlatQt.cpp: + Debugged the Qt3 backport - all seems to work. + [1e743e050599] + + * Python/configure.py, Python/sip/qscimod3.sip, + Python/sip/qsciscintillabase.sip, Python/sip/qsciscintillabase4.sip, + build.py, lib/README, lib/README.doc, lib/qscintilla.dxy, + qt/qsciscintillabase.h: + The PyQt3 bindings now work. Updated the documentation and build + system for both Qt3 and Qt4. + [f4fa8a9a35c0] + +2006-07-28 phil + + * Python/sip/qscimodcommon.sip, Python/sip/qsciscintillabase4.sip, + Python/sip/qscitypes.sip, example-Qt3/application.cpp, example- + Qt3/application.h, example-Qt3/application.pro, qt/qscicommand.cpp, + qt/qscicommandset.cpp, qt/qscidocument.cpp, qt/qscimacro.cpp, + qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciscintilla.cpp, + qt/qsciscintilla.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h, qt/qscitypes.h: + Backed out the QscoTypes namespace now that the Qt3/4 source code + has been consolidated. + [372c37fa8b9c] + + * qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_ptbr.ts, + qt/qscintilla_ru.ts, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h, qt/qsciscintillabase3.cpp, + qt/qsciscintillabase3.h, qt/qsciscintillabase4.cpp, + qt/qsciscintillabase4.h: + Integated the Qt3 and Qt4 source files. + [4ee1fcf04cd9] + + * Makefile, build.py, lib/README.doc, lib/qscintilla.dxy, + qt/qscintilla.pro, qt/qsciscintillabase.h, + qt/qsciscintillabase3.cpp, qt/qsciscintillabase3.h, + qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: + The Qt3 port now compiles, but otherwise untested. + [da227e07e729] + + * Python/sip/qscimacro.sip, lib/README.doc, lib/qscintilla.dxy, + qt/PlatQt.cpp, qt/qscilexermakefile.cpp, qt/qscimacro.cpp, + qt/qscimacro.h, qt/qscintilla.pro, qt/qsciscintillabase.h, + qt/qsciscintillabase3.cpp, qt/qsciscintillabase3.h, + qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: + Changes to QsciMacro so that it has a more consistent API across Qt3 + and Qt4. Backported to Qt3 - doesn't yet build because Qt3 qmake + doesn't understand the preprocessor. + [910b415ec4a8] + +2006-07-27 phil + + * build.py, designer/qscintillaplugin.cpp, example-Qt3/README, + example-Qt4/README, lib/README, lib/README.doc, lib/qscintilla.dxy, + qt/qscintilla.pro: + Updated the documentation. + [7774f3e87003] + +2006-07-26 phil + + * Makefile, Python/configure.py, Python/qsciapis.sip, + Python/qscicommand.sip, Python/qscicommandset.sip, + Python/qscidocument.sip, Python/qscilexer.sip, + Python/qscilexerbash.sip, Python/qscilexerbatch.sip, + Python/qscilexercpp.sip, Python/qscilexercsharp.sip, + Python/qscilexercss.sip, Python/qscilexerdiff.sip, + Python/qscilexerhtml.sip, Python/qscilexeridl.sip, + Python/qscilexerjava.sip, Python/qscilexerjavascript.sip, + Python/qscilexerlua.sip, Python/qscilexermakefile.sip, + Python/qscilexerperl.sip, Python/qscilexerpov.sip, + Python/qscilexerproperties.sip, Python/qscilexerpython.sip, + Python/qscilexerruby.sip, Python/qscilexersql.sip, + Python/qscilexertex.sip, Python/qscimacro.sip, Python/qscimod4.sip, + Python/qscimodcommon.sip, Python/qsciprinter.sip, + Python/qsciscintilla.sip, Python/qsciscintillabase4.sip, + Python/qscitypes.sip, Python/sip/qsciapis.sip, + Python/sip/qscicommand.sip, Python/sip/qscicommandset.sip, + Python/sip/qscidocument.sip, Python/sip/qscilexer.sip, + Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, + Python/sip/qscilexercpp.sip, Python/sip/qscilexercsharp.sip, + Python/sip/qscilexercss.sip, Python/sip/qscilexerdiff.sip, + Python/sip/qscilexerhtml.sip, Python/sip/qscilexeridl.sip, + Python/sip/qscilexerjava.sip, Python/sip/qscilexerjavascript.sip, + Python/sip/qscilexerlua.sip, Python/sip/qscilexermakefile.sip, + Python/sip/qscilexerperl.sip, Python/sip/qscilexerpov.sip, + Python/sip/qscilexerproperties.sip, Python/sip/qscilexerpython.sip, + Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, + Python/sip/qscilexertex.sip, Python/sip/qscimacro.sip, + Python/sip/qscimod4.sip, Python/sip/qscimodcommon.sip, + Python/sip/qsciprinter.sip, Python/sip/qsciscintilla.sip, + Python/sip/qsciscintillabase4.sip, Python/sip/qscitypes.sip, + build.py, lib/LICENSE.edu, lib/LICENSE.edu.short, lib/README.MacOS: + Changed the build system to add the Python bindings. + [8a56c38c418b] + + * Python/configure.py, Python/qscicommandset.sip, + Python/qscilexerruby.sip, Python/qscilexertex.sip, + Python/qscimod4.sip, Python/qsciscintilla.sip, + Python/qsciscintillabase4.sip, Python/qscitypes.sip: + Debugged the Python bindings - not yet part of the snapshots. + [8e348d9c7d38] + +2006-07-25 phil + + * Python/qsciapis.sip, Python/qscicommand.sip, + Python/qscicommandset.sip, Python/qscidocument.sip, + Python/qscilexer.sip, Python/qscilexerbash.sip, + Python/qscilexerbatch.sip, Python/qscilexercpp.sip, + Python/qscilexercsharp.sip, Python/qscilexercss.sip, + Python/qscilexerdiff.sip, Python/qscilexerhtml.sip, + Python/qscilexeridl.sip, Python/qscilexerjava.sip, + Python/qscilexerjavascript.sip, Python/qscilexerlua.sip, + Python/qscilexermakefile.sip, Python/qscilexerperl.sip, + Python/qscilexerpov.sip, Python/qscilexerproperties.sip, + Python/qscilexerpython.sip, Python/qscilexerruby.sip, + Python/qscilexersql.sip, Python/qscilexertex.sip, + Python/qscimacro.sip, Python/qscimod4.sip, Python/qscimodcommon.sip, + Python/qsciprinter.sip, Python/qsciscintilla.sip, + Python/qsciscintillabase4.sip, Python/qscitypes.sip, qt/qsciapis.h, + qt/qsciglobal.h, qt/qscilexer.h, qt/qscilexerbash.h, + qt/qscilexercpp.h, qt/qscilexerperl.h, qt/qscilexerpython.h, + qt/qscilexersql.h, qt/qsciprinter.h, qt/qsciscintilla.h: + Ported the .sip files from v1. (Not yet part of the snapshot.) + [c03807f9fbab] + + * Makefile, qt/qscintilla-Qt4.pro, qt/qscintilla.pro: + The .pro file should now work with both Qt v3 and v4. + [c99aec4ce73d] + + * Makefile, qt/qscintilla-Qt4.pro, qt/qscintilla.pro, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, + qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: + Some file reorganisation for when the backport to Qt3 is done. + [c97fb1bdc0e5] + + * qt/qscicommand.cpp, qt/qscicommandset.cpp, qt/qscidocument.cpp, + qt/qscimacro.cpp, qt/qscintilla.pro, qt/qsciprinter.cpp, + qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, + qt/qsciscintillabase.h, qt/qscitypes.h: + Moved the Scintilla API enums out of QsciScintillaBase and into the + new QsciTypes namespace. + [6de0ac19e4df] + + * qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Triple clicking now works. + [8ef632d89147] + +2006-07-23 phil + + * qt/qsciscintillabase.cpp: + Fixed incorrect selection after dropping text. + [4c62275c39f4] + + * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp: + Dropping text seems (mostly) to work. + [7acc97948229] + +2006-07-22 phil + + * qt/PlatQt.cpp, qt/ScintillaQt.cpp, qt/ScintillaQt.h, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Scrollbars now work. The context menu now works. The clipboard and + mouse selection now works. Dragging to external windows now works + (but not dropping). + [73995ec258cd] + +2006-07-18 phil + + * example-Qt4/mainwindow.cpp, example-Qt4/mainwindow.h, qt/PlatQt.cpp, + qt/qextscintillalexerbash.cxx, qt/qextscintillalexerbash.h, + qt/qextscintillalexerbatch.cxx, qt/qextscintillalexerbatch.h, + qt/qextscintillalexercpp.cxx, qt/qextscintillalexercpp.h, + qt/qextscintillalexercsharp.cxx, qt/qextscintillalexercsharp.h, + qt/qextscintillalexercss.cxx, qt/qextscintillalexercss.h, + qt/qextscintillalexerdiff.cxx, qt/qextscintillalexerdiff.h, + qt/qextscintillalexerhtml.cxx, qt/qextscintillalexerhtml.h, + qt/qextscintillalexeridl.cxx, qt/qextscintillalexeridl.h, + qt/qextscintillalexerjava.cxx, qt/qextscintillalexerjava.h, + qt/qextscintillalexerjavascript.cxx, + qt/qextscintillalexerjavascript.h, qt/qextscintillalexerlua.cxx, + qt/qextscintillalexerlua.h, qt/qextscintillalexermakefile.cxx, + qt/qextscintillalexermakefile.h, qt/qextscintillalexerperl.cxx, + qt/qextscintillalexerperl.h, qt/qextscintillalexerpov.cxx, + qt/qextscintillalexerpov.h, qt/qextscintillalexerproperties.cxx, + qt/qextscintillalexerproperties.h, qt/qextscintillalexerpython.cxx, + qt/qextscintillalexerpython.h, qt/qextscintillalexerruby.cxx, + qt/qextscintillalexerruby.h, qt/qextscintillalexersql.cxx, + qt/qextscintillalexersql.h, qt/qextscintillalexertex.cxx, + qt/qextscintillalexertex.h, qt/qextscintillamacro.cxx, + qt/qextscintillamacro.h, qt/qextscintillaprinter.cxx, + qt/qextscintillaprinter.h, qt/qsciapis.h, qt/qscicommand.h, + qt/qscilexer.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, + qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercpp.cpp, + qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, + qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, + qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, + qt/qscilexeridl.cpp, qt/qscilexeridl.h, qt/qscilexerjava.cpp, + qt/qscilexerjava.h, qt/qscilexerjavascript.cpp, + qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, + qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, + qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, + qt/qscilexerpov.h, qt/qscilexerproperties.cpp, + qt/qscilexerproperties.h, qt/qscilexerpython.cpp, + qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, + qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, + qt/qscilexertex.h, qt/qscimacro.cpp, qt/qscimacro.h, + qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciprinter.h, + qt/qsciscintilla.h: + Ported the rest of the API to Qt4. Finished porting the example to + Qt4. + [de0ede6bbcf5] + +2006-07-17 phil + + * qt/qextscintilla.cxx, qt/qextscintilla.h, qt/qextscintillaapis.cxx, + qt/qextscintillaapis.h, qt/qextscintillacommand.cxx, + qt/qextscintillacommand.h, qt/qextscintillacommandset.cxx, + qt/qextscintillacommandset.h, qt/qextscintilladocument.cxx, + qt/qextscintilladocument.h, qt/qextscintillalexer.cxx, + qt/qextscintillalexer.h, qt/qsciapis.cpp, qt/qsciapis.h, + qt/qscicommand.cpp, qt/qscicommand.h, qt/qscicommandset.cpp, + qt/qscicommandset.h, qt/qscidocument.cpp, qt/qscidocument.h, + qt/qscilexer.cpp, qt/qscilexer.h, qt/qscintilla.pro, + qt/qsciscintilla.cpp, qt/qsciscintilla.h: + More porting to Qt4 - just the lexers remaining. + [07158797bcf2] + + * qt/ListBoxQt.cpp, qt/PlatQt.cpp, qt/SciClasses.cpp, + qt/ScintillaQt.cpp, qt/qscintilla.pro, qt/qsciscintillabase.cpp: + Further Qt4 changes so that Q3Support is no longer needed. + [cb3ca2aee49e] + + * qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/SciClasses.cpp, + qt/SciClasses.h, qt/SciListBox.cxx, qt/SciListBox.h, + qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Ported the auto-completion list implementation to Qt4. + [1d0d07f7ba3b] + +2006-07-16 phil + + * qt/PlatQt.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Drawing now seems Ok. Keyboard support now seems Ok. Start of the + mouse support. + [20a223c3f57e] + +2006-07-12 phil + + * include/Platform.h, qt/PlatQt.cpp, qt/ScintillaQt.cpp: + Painting now seems to happen only within paint events - but + incorrectly. + [a60a10298391] + + * qt/PlatQt.cpp, qt/PlatQt.cxx, qt/ScintillaQt.cpp, + qt/ScintillaQt.cxx, qt/ScintillaQt.h, qt/qscintilla.pro: + Recoded the implementation of surfaces so that painters are only + active during paint events. Not yet debugged. + [d0d91ae8e514] + + * build.py, qt/PlatQt.cxx, qt/ScintillaQt.cxx, qt/ScintillaQt.h, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Recoded the handling of key presses so that it doesn't use any Qt3 + specific features and should be backported to QScintilla v1. It also + should work better in Unicode mode. + [c2b96d686ee6] + +2006-07-11 phil + + * Makefile, build.py, example-Qt3/README, example-Qt3/application.cpp, + example-Qt3/application.h, example-Qt3/application.pro, example- + Qt3/fileopen.xpm, example-Qt3/fileprint.xpm, example- + Qt3/filesave.xpm, example-Qt3/main.cpp, example-Qt4/README, example- + Qt4/application.pro, example-Qt4/application.qrc, example- + Qt4/images/copy.png, example-Qt4/images/cut.png, example- + Qt4/images/new.png, example-Qt4/images/open.png, example- + Qt4/images/paste.png, example-Qt4/images/save.png, example- + Qt4/main.cpp, example-Qt4/mainwindow.cpp, example-Qt4/mainwindow.h, + example/README, example/application.cpp, example/application.h, + example/application.pro, example/fileopen.xpm, + example/fileprint.xpm, example/filesave.xpm, example/main.cpp, + qt/PlatQt.cxx, qt/SciListBox.cxx, qt/SciListBox.h, + qt/ScintillaQt.cxx, qt/ScintillaQt.h, qt/qextscintilla.cxx, + qt/qextscintillabase.cxx, qt/qextscintillabase.h, + qt/qextscintillaglobal.h, qt/qsciglobal.h, qt/qscintilla.pro, + qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: + Whole raft of changes starting QScintilla2. + [7f0bd20f2f83] + +2006-07-09 phil + + * qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, + qt/qscintilla_ptbr.ts, qt/qscintilla_ru.ts: + Updated translations from Detlev. + [c04c167d802e] + +2006-07-08 phil + + * NEWS, qt/qextscintilla.cxx, qt/qextscintilla.h: + Added QextScintilla::isCallTipActive(). + [1f7dcb40db25] + + * lib/LICENSE.commercial.short, lib/LICENSE.edu.short, + lib/LICENSE.gpl.short, qt/qextscintilla.cxx: + Changed the autoindentation to be slightly cleverer when handling + Python. If a lexer does not define block end words then a block + start word is ignored unless it is the last significant word in a + line. + [d5813c13f5da] + +2006-07-02 phil + + * qt/PlatQt.cxx: + Possibly fixed a possible problem with double clicking under + Windows. + [271141bb2b43] + + * NEWS, qt/ScintillaQt.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h: + Added setWrapVisualFlags(), WrapMode::WrapCharacter, WrapVisualFlag + to QextScintilla. The layout cache is now set according to the wrap + mode. Setting a wrap mode now disables the horizontal scrollbar. + [a498b86e7999] + +2006-07-01 phil + + * NEWS, qt/qextscintilla.cxx, qt/qextscintilla.h: + Added cancelList(), firstVisibleLine(), isListActive(), + showUserList(), textHeight() and userListActivated() to + QextScintilla. + [058c7be4bdfe] + + * qt/qextscintilla.cxx: + Auto-completion changed so that subsequent start characters cause + the list to be re-created (containing a subset of the previous one). + [5b534658e638] + +2006-06-28 phil + + * NEWS, qt/SciListBox.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h, + qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, + qt/qextscintillalexer.cxx, qt/qextscintillalexer.h, + qt/qextscintillalexerpython.cxx, qt/qextscintillalexerpython.h: + Handle Key_Enter the same as Key_Return. QextScintilla::foldAll() + can now optionally fold all child fold points. Added + autoCompleteFromAll() and setAutoCompletionStartCharacters() to + QextScintilla. Vastly improved the way auto-completion and call tips + work. + [8b0472aaed61] + +2006-06-25 phil + + * qt/qextscintilla.cxx, qt/qextscintillabase.cxx, + qt/qextscintillalexer.cxx: + The default fore and background colours now default to the + application palette rather than being hardcoded to black and white. + [6cb6b5bef5fc] + + * NEWS, qt/qextscintilla.cxx, qt/qextscintilla.h, + qt/qextscintillalexer.cxx, qt/qextscintillalexer.h: + Added defaultColor() and setDefaultColor() to QextScintillaLexer. + Added color() and setColor() to QextScintilla. Renamed eraseColor() + and setEraseColor() to paper() and setPaper() in QextScintilla. + [c1fbfc192235] + + * NEWS, qt/SciListBox.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h, + qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, + qt/qextscintillabase.h, qt/qextscintillalexer.cxx, + qt/qextscintillalexer.h: + Added a couple of extra SendScintilla overloads. One is needed for + PyQt because of the change in SIP's handling of unsigned values. The + other is needed to solve C++ problems caused by the first. + Autocompletion list entries from APIs may now contain spaces. Added + defaultPaper() and setDefaultPaper() to QextScintillaLexer. Added + eraseColor() and setEraseColor() to QextScintilla. + [34f527ca0f99] + +2006-06-21 phil + + * qt/qextscintilla.cxx, qt/qextscintillalexer.cxx, + qt/qextscintillalexer.h, qt/qextscintillalexerhtml.cxx, + qt/qextscintillalexerhtml.h: + Removed QextScintillaLexer::styleBits() now that + SCI_GETSTYLEBITSNEEDED is available. + [1c6837500560] + + * NEWS, qt/PlatQt.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h: + QextScintilla::setSelectionBackgroundColor(), + QextScintilla::setMarkerBackgroundColor() and + QextScintilla::setCaretLineBackgroundColor() now respect the alpha + component. + [48bae1fffe85] + +2006-06-20 phil + + * NEWS, doc/ScintillaDoc.html, doc/ScintillaDownload.html, + doc/ScintillaHistory.html, doc/index.html, gtk/Converter.h, + gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, include/Scintilla.h, + include/Scintilla.iface, qt/qextscintillabase.h, + qt/qextscintillalexerpython.h, src/Editor.cxx, src/Editor.h, + src/ViewStyle.cxx, src/ViewStyle.h, version.txt, win32/ScintRes.rc, + win32/ScintillaWin.cxx: + Merged Scintilla v1.70. + [03ac3edd5dd2] + +2006-06-19 phil + + * qt/qextscintillabase.h, qt/qextscintillalexerlua.h, + qt/qextscintillalexerruby.cxx, qt/qextscintillalexerruby.h, + qt/qextscintillalexersql.h: + Significant, and incompatible, updates to the QextScintillaLexerRuby + class. + [0484fe132d0c] + + * src/PropSet.cxx: + Fix for qsort helpers linkage from Ulli. (Patch sent upstream.) + [2307adf67045] + +2006-06-18 phil + + * qt/qextscintillalexerpython.cxx, qt/qextscintillalexerpython.h: + Ctrl-D is now duplicate selection rather than duplicate line. + Updated the Python lexer to add support for hightlighted identifiers + and decorators. + [52ca24a722ac] + + * qt/qextscintillabase.h, qt/qextscintillacommandset.cxx, + qt/qextscintillalexer.h, qt/qextscintillalexerbash.h, + qt/qextscintillalexerbatch.h, qt/qextscintillalexercpp.h, + qt/qextscintillalexercsharp.h, qt/qextscintillalexercss.h, + qt/qextscintillalexerhtml.h, qt/qextscintillalexeridl.h, + qt/qextscintillalexerjava.h, qt/qextscintillalexerjavascript.h, + qt/qextscintillalexerlua.h, qt/qextscintillalexerperl.h, + qt/qextscintillalexerpov.h, qt/qextscintillalexerpython.h, + qt/qextscintillalexerruby.h, qt/qextscintillalexersql.h, + qt/qextscintillalexertex.h, qt/qscintilla.pro: + Added the Scintilla 1.69 extensions to the low level API. + [e89b98aaaa33] + + * .repoman, build.py, doc/Icons.html, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/index.html, + gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, + gtk/scintilla.mak, include/HFacer.py, include/KeyWords.h, + include/Platform.h, include/PropSet.h, include/SciLexer.h, + include/Scintilla.h, include/Scintilla.iface, + include/ScintillaWidget.h, qt/PlatQt.cxx, qt/ScintillaQt.h, + qt/qscintilla.pro, src/CallTip.cxx, src/CallTip.h, + src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, + src/CharClassify.h, src/ContractionState.cxx, src/Document.cxx, + src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, + src/Editor.h, src/ExternalLexer.cxx, src/Indicator.cxx, + src/KeyMap.cxx, src/KeyWords.cxx, src/LexAU3.cxx, src/LexBash.cxx, + src/LexBasic.cxx, src/LexCPP.cxx, src/LexCaml.cxx, + src/LexCsound.cxx, src/LexEiffel.cxx, src/LexGen.py, + src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexInno.cxx, + src/LexLua.cxx, src/LexMSSQL.cxx, src/LexOpal.cxx, + src/LexOthers.cxx, src/LexPOV.cxx, src/LexPython.cxx, + src/LexRuby.cxx, src/LexSQL.cxx, src/LexSpice.cxx, src/LexTCL.cxx, + src/LexVB.cxx, src/LineMarker.h, src/PropSet.cxx, src/RESearch.cxx, + src/RESearch.h, src/ScintillaBase.cxx, src/StyleContext.h, + src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, + vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, + win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, + win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: + Removed the redundant .repoman file. Synced with Scintilla v1.69 + with only the minimal changes needed to compile it. + [6774f137c5a1] + +2006-06-17 phil + + * .repoman, License.txt, Makefile, NEWS, README, TODO, bin/empty.txt, + build.py, delbin.bat, delcvs.bat, designer/designer.pro, + designer/qscintillaplugin.cpp, doc/Design.html, doc/Lexer.txt, + doc/SciBreak.jpg, doc/SciCoding.html, doc/SciRest.jpg, + doc/SciTEIco.png, doc/SciWord.jpg, doc/ScintillaDoc.html, + doc/ScintillaDownload.html, doc/ScintillaHistory.html, + doc/ScintillaRelated.html, doc/ScintillaToDo.html, + doc/ScintillaUsage.html, doc/Steps.html, doc/index.html, + example/README, example/application.cpp, example/application.h, + example/application.pro, example/fileopen.xpm, + example/fileprint.xpm, example/filesave.xpm, example/main.cpp, + gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, + gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- + marshal.h, gtk/scintilla-marshal.list, gtk/scintilla.mak, + include/Accessor.h, include/Face.py, include/HFacer.py, + include/KeyWords.h, include/Platform.h, include/PropSet.h, + include/SString.h, include/SciLexer.h, include/Scintilla.h, + include/Scintilla.iface, include/ScintillaWidget.h, + include/WindowAccessor.h, lib/LICENSE.commercial, + lib/LICENSE.commercial.short, lib/LICENSE.edu, + lib/LICENSE.edu.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short, + lib/README, lib/README.MacOS, lib/qscintilla.dxy, qt/PlatQt.cxx, + qt/SciListBox.cxx, qt/SciListBox.h, qt/ScintillaQt.cxx, + qt/ScintillaQt.h, qt/qextscintilla.cxx, qt/qextscintilla.h, + qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, + qt/qextscintillabase.cxx, qt/qextscintillabase.h, + qt/qextscintillacommand.cxx, qt/qextscintillacommand.h, + qt/qextscintillacommandset.cxx, qt/qextscintillacommandset.h, + qt/qextscintilladocument.cxx, qt/qextscintilladocument.h, + qt/qextscintillaglobal.h, qt/qextscintillalexer.cxx, + qt/qextscintillalexer.h, qt/qextscintillalexerbash.cxx, + qt/qextscintillalexerbash.h, qt/qextscintillalexerbatch.cxx, + qt/qextscintillalexerbatch.h, qt/qextscintillalexercpp.cxx, + qt/qextscintillalexercpp.h, qt/qextscintillalexercsharp.cxx, + qt/qextscintillalexercsharp.h, qt/qextscintillalexercss.cxx, + qt/qextscintillalexercss.h, qt/qextscintillalexerdiff.cxx, + qt/qextscintillalexerdiff.h, qt/qextscintillalexerhtml.cxx, + qt/qextscintillalexerhtml.h, qt/qextscintillalexeridl.cxx, + qt/qextscintillalexeridl.h, qt/qextscintillalexerjava.cxx, + qt/qextscintillalexerjava.h, qt/qextscintillalexerjavascript.cxx, + qt/qextscintillalexerjavascript.h, qt/qextscintillalexerlua.cxx, + qt/qextscintillalexerlua.h, qt/qextscintillalexermakefile.cxx, + qt/qextscintillalexermakefile.h, qt/qextscintillalexerperl.cxx, + qt/qextscintillalexerperl.h, qt/qextscintillalexerpov.cxx, + qt/qextscintillalexerpov.h, qt/qextscintillalexerproperties.cxx, + qt/qextscintillalexerproperties.h, qt/qextscintillalexerpython.cxx, + qt/qextscintillalexerpython.h, qt/qextscintillalexerruby.cxx, + qt/qextscintillalexerruby.h, qt/qextscintillalexersql.cxx, + qt/qextscintillalexersql.h, qt/qextscintillalexertex.cxx, + qt/qextscintillalexertex.h, qt/qextscintillamacro.cxx, + qt/qextscintillamacro.h, qt/qextscintillaprinter.cxx, + qt/qextscintillaprinter.h, qt/qscintilla.pro, qt/qscintilla_de.qm, + qt/qscintilla_de.ts, qt/qscintilla_fr.qm, qt/qscintilla_fr.ts, + qt/qscintilla_ptbr.qm, qt/qscintilla_ptbr.ts, qt/qscintilla_ru.qm, + qt/qscintilla_ru.ts, src/AutoComplete.cxx, src/AutoComplete.h, + src/CallTip.cxx, src/CallTip.h, src/CellBuffer.cxx, + src/CellBuffer.h, src/ContractionState.cxx, src/ContractionState.h, + src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, + src/DocumentAccessor.h, src/Editor.cxx, src/Editor.h, + src/ExternalLexer.cxx, src/ExternalLexer.h, src/Indicator.cxx, + src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/KeyWords.cxx, + src/LexAPDL.cxx, src/LexAU3.cxx, src/LexAVE.cxx, src/LexAda.cxx, + src/LexAsm.cxx, src/LexAsn1.cxx, src/LexBaan.cxx, src/LexBash.cxx, + src/LexBasic.cxx, src/LexBullant.cxx, src/LexCLW.cxx, + src/LexCPP.cxx, src/LexCSS.cxx, src/LexCaml.cxx, src/LexConf.cxx, + src/LexCrontab.cxx, src/LexCsound.cxx, src/LexEScript.cxx, + src/LexEiffel.cxx, src/LexErlang.cxx, src/LexFlagship.cxx, + src/LexForth.cxx, src/LexFortran.cxx, src/LexGen.py, + src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexHaskell.cxx, + src/LexKix.cxx, src/LexLisp.cxx, src/LexLout.cxx, src/LexLua.cxx, + src/LexMMIXAL.cxx, src/LexMPT.cxx, src/LexMSSQL.cxx, + src/LexMatlab.cxx, src/LexMetapost.cxx, src/LexNsis.cxx, + src/LexOthers.cxx, src/LexPB.cxx, src/LexPOV.cxx, src/LexPS.cxx, + src/LexPascal.cxx, src/LexPerl.cxx, src/LexPython.cxx, + src/LexRebol.cxx, src/LexRuby.cxx, src/LexSQL.cxx, + src/LexScriptol.cxx, src/LexSmalltalk.cxx, src/LexSpecman.cxx, + src/LexTADS3.cxx, src/LexTeX.cxx, src/LexVB.cxx, src/LexVHDL.cxx, + src/LexVerilog.cxx, src/LexYAML.cxx, src/LineMarker.cxx, + src/LineMarker.h, src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, + src/SVector.h, src/SciTE.properties, src/ScintillaBase.cxx, + src/ScintillaBase.h, src/Style.cxx, src/Style.h, + src/StyleContext.cxx, src/StyleContext.h, src/UniConversion.cxx, + src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, + src/WindowAccessor.cxx, src/XPM.cxx, src/XPM.h, tgzsrc, + vcbuild/SciLexer.dsp, version.txt, win32/Margin.cur, + win32/PlatWin.cxx, win32/PlatformRes.h, win32/SciTE.properties, + win32/ScintRes.rc, win32/Scintilla.def, win32/ScintillaWin.cxx, + win32/deps.mak, win32/makefile, win32/scintilla.mak, + win32/scintilla_vc6.mak, zipsrc.bat: + First import of QScintilla + [0521804cd44a] diff --git a/libs/qscintilla_2.14.1/LICENSE b/libs/qscintilla_2.14.1/LICENSE new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/libs/qscintilla_2.14.1/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/libs/qscintilla_2.14.1/NEWS b/libs/qscintilla_2.14.1/NEWS new file mode 100644 index 000000000..ccd6e00d1 --- /dev/null +++ b/libs/qscintilla_2.14.1/NEWS @@ -0,0 +1,604 @@ +v2.14.1 7th June 2023 + - Bug fixes. + +v2.14.0 24th April 2023 + - Added the QsciLexerAsm, QsciLexerMASM and QsciLexerNASM classes. + - Added the QsciLexerHex, QsciLexerIntelHex, QsciLexerSRec and + QsciLexerTekHex classes. + - Bug fixes. + +v2.13.4 6th December 2022 + - Added the .api files for Python v3.10 and v3.11. + - Bug fixes. + +v2.13.3 25th April 2022 + - Bug fixes. + +v2.13.2 15th March 2022 + - Bug fixes that only affect iOS. + +v2.13.1 12th October 2021 + - Documented how to build for multiple architectures on macOS. + - Bug fixes. + +v2.13.0 13th June 2021 + - Added the QsciPrinter::printRange() overload that uses a supplied QPainter + to render the pages. + - Improved the appearence of the auto-completion popup. + - Bug fixes. + +v2.12.1 4th March 2021 + - Packaging bug fixes. + +v2.12.0 23rd February 2021 + - Added support for Qt6. + - Removed support for Qt4 and Qt5 earlier than v5.11.0. + - sdists are now provided. + +v2.11.6 23rd November 2020 + - Added the --qsci-translations-dir option to sip-wheel. + - Added the .api file for Python v3.9. + - Build system changes. + - Bug fixes. + +v2.11.5 10th June 2020 + - The bundled .api files are now included in Python wheels if the + QScintilla.api file is enabled. + - Bug fixes. + +v2.11.4 19th December 2019 + - An administrative release with no code changes. + +v2.11.3 3rd November 2019 + - Added support for SIP v5. + - On macOS the install name of the C++ library is now relative to @rpath. + +v2.11.2 26th June 2019 + - Added QsciScintilla::findMatchingBrace(). + - QsciScintiila::clear() is no longer undoable and instead clears the undo + history. + - Added support for building with WASM. + - Added the .api file for Python v3.8. + - Bug fixes. + +v2.11.1 14th February 2019 + - There is a small (but potentially incompatible) change to the signature of + a QsciScintillaBase::SendScintilla() overload which may require an explicit + cast to be added. + - Bug fixes. + +v2.11 10th February 2019 + - Based on Scintilla v3.10.1. + - Added setCaretLineFrameWidth() to QsciScintilla. + - The findFirst() and findFirstInSelection() methods of QsciScintilla now + support Cxx11 regular expressions. + - Added cancelFind() to QsciScintilla. + - Added GradientIndicator and CentreGradientIndicator to + QsciScintilla::IndicatorStyle. + - Added WrapIndentDeeplyIndented to QsciScintilla::WrapIndentMode. + - Added ReverseLines to QsciCommand::Command. + - Deprecated QsciLexer::styleBitsNeeded(). + - Added the AddingPatchAdded, RemovingPatchAdded, AddingPatchRemoved and + RemovingPatchRemoved styles to QsciLexerDiff. + - Added the DoubleQuotedFString, SingleQuotedFString, + TripleSingleQuotedFString and TripleDoubleQuotedFString styles to + QsciLexerPython. + - Added SCLEX_INDENT, SCLEX_MAXIMA and SCLEX_STATA to QsciScintillaBase. + - Added SCI_SETACCESSIBILITY, SCI_GETACCESSIBILITY, SCI_GETCARETLINEFRAME, + SCI_SETCARETLINEFRAME, SCI_SETCOMMANDEVENTS, SCI_GETCOMMANDEVENTS, + SCI_LINEREVERSE and SCI_GETMOVEEXTENDSSELECTION to QsciScintillaBase. + - Added SCI_GETLINECHARACTERINDEX, SCI_ALLOCATELINECHARACTERINDEX, + SCI_RELEASELINECHARACTERINDEX, SCI_LINEFROMINDEXPOSITION, + SCI_INDEXPOSITIONFROMLINE, SCI_COUNTCODEUNITS and + SCI_POSITIONRELATIVECODEUNITS to QsciScintillaBase. + - Added SC_LINECHARACTERINDEX_NONE, SC_LINECHARACTERINDEX_UTF32 and + SC_LINECHARACTERINDEX_UTF16 to QsciScintillaBase. + - Added SCI_GETNAMEDSTYLES, SCI_NAMEOFSTYLE, SCI_TAGSOFSTYLE and + SCI_DESCRIPTIONOFSTYLE to QsciScintillaBase. + - Added the SCN_AUTOCSELECTIONCHANGE and SCN_URIDROPPED() signals to + QsciScintillaBase. + - Added the overloaded SCN_USERLISTSELECTION() signal to QsciScintillaBase. + - Added INDIC_GRADIENT and INDIC_GRADIENTCENTRE to QsciScintillaBase. + - Added SC_PRINT_SCREENCOLOURS to QsciScintillaBase. + - Added SC_WRAPINDENT_DEEPINDENT to QsciScintillaBase. + - Added SCI_GETDOCUMENTOPTIONS, SC_DOCUMENTOPTION_DEFAULT, + SC_DOCUMENTOPTION_STYLES_NONE and SC_DOCUMENTOPTION_TEXT_LARGE to + QsciScintillaBase. + +v2.10.8 1st October 2018 + - Bug fixes. + +v2.10.7 2nd July 2018 + - Bug fixes. + +v2.10.6 24th June 2018 + - A pseudo-release to create a version number for updated Python wheels. + +v2.10.5 23rd June 2018 + - Added the QsciLexerEDIFACT class. + - Added setStyle() to QsciStyle. + - Control-wheel scroll will now zoom in and out of the document. + - Buffered drawing is now disabled by default. + - The Python bindings create a PEP 376 .dist-info directory on installation + that provides version information for dependent packages and allows pip to + uninstall. + - Added the --no-dist-info option to the Python bindings' configure.py. + - Bug fixes. + +v2.10.4 10th April 2018 + - Bug fixes. + +v2.10.3 26th February 2018 + - Added accessibility support. + - Added the API file for Python v3.7. + +v2.10.2 23rd November 2017 + - Added setScrollWidth() , scrollWidth, setScrollWidthTracking() and + scrollWidthTracking() to QsciScintilla. + - Bug fixes. + +v2.10.1 3rd July 2017 + - Changed the default font on macOS to Menlo 12pt. + - Added previously internal lexer methods to the Python bindings. + +v2.10 20th February 2017 + - Based on Scintilla v3.7.2. + - Added the QsciLexerJSON class. + - Added the QsciLexerMarkdown class. + - Added replaceHorizontalScrollBar() and replaceVerticalScrollBar() to + QsciScintillaBase. + - Added bytes() and a corresponding text() overload to QsciScintilla. + - Added EdgeMultipleLines to QsciScintilla::EdgeMode. + - Added addEdgeColumn() and clearEdgeColumns() to QsciScintilla. + - Added the marginRightClicked() signal to QsciScintilla. + - Added SymbolMarginColor to QsciScintilla::MarginType. + - Added setMarginBackgroundColor() and marginBackgroundColor() to + QsciScintilla. + - Added setMargins() and margins() to QsciScintilla. + - Added TriangleIndicator and TriangleCharacterIndicator to + QsciScintilla::IndicatorStyle. + - Added WsVisibleOnlyInIndent to QsciScintilla::WhitespaceVisibility. + - Added TabDrawMode, setTabDrawMode() and tabDrawMode() to QsciScintilla. + - Added InstanceProperty to QsciLexerCoffeeScript. + - Added EDGE_MULTILINE to QsciScintillaBase. + - Added INDIC_POINT and INDIC_POINTCHARACTER to QsciScintillaBase. + - Added SC_AC_FILLUP, SC_AC_DOUBLECLICK, SC_AC_TAB, SC_AC_NEWLINE and + SC_AC_COMMAND to QsciScintillaBase. + - Added SC_CASE_CAMEL to QsciScintillaBase. + - Added SC_CHARSET_CYRILLIC and SC_CHARSET_OEM866 to QsciScintillaBase. + - Added SC_FOLDDISPLAYTEXT_HIDDEN, SC_FOLDDISPLAYTEXT_STANDARD and + SC_FOLDDISPLAYTEXT_BOXED to QsciScintillaBase. + - Added SC_IDLESTYLING_NONE, SC_IDLESTYLING_TOVISIBLE, + SC_IDLESTYLING_AFTERVISIBLE and SC_IDLESTYLING_ALL to QsciScintillaBase. + - Added SC_MARGIN_COLOUR to QsciScintillaBase. + - Added SC_POPUP_NEVER, SC_POPUP_ALL and SC_POPUP_TEXT to QsciScintillaBase. + - Added SCI_FOLDDISPLAYTEXTSETSTYLE and SCI_TOGGLEFOLDSHOWTEXT to + QsciScintillaBase. + - Added SCI_GETIDLESTYLING and SCI_SETIDLESTYLING to QsciScintillaBase. + - Added SCI_GETMARGINBACKN and SCI_SETMARGINBACKN to QsciScintillaBase. + - Added SCI_GETMARGINS and SCI_SETMARGINS to QsciScintillaBase. + - Added SCI_GETMOUSEWHEELCAPTURES and SCI_SETMOUSEWHEELCAPTURES to + QsciScintillaBase. + - Added SCI_GETTABDRAWMODE and SCI_SETTABDRAWMODE to QsciScintillaBase. + - Added SCI_ISRANGEWORD to QsciScintillaBase. + - Added SCI_MULTIEDGEADDLINE and SCI_MULTIEDGECLEARALL to QsciScintillaBase. + - Added SCI_MULTIPLESELECTADDNEXT and SCI_MULTIPLESELECTADDEACH to + QsciScintillaBase. + - Added SCI_TARGETWHOLEDOCUMENT to QsciScintillaBase. + - Added SCLEX_JSON and SCLEX_EDIFACT to QsciScintillaBase. + - Added SCTD_LONGARROW and SCTD_STRIKEOUT to QsciScintillaBase. + - Added SCVS_NOWRAPLINESTART to QsciScintillaBase. + - Added SCWS_VISIBLEONLYININDENT to QsciScintillaBase. + - Added STYLE_FOLDDISPLAYTEXT to QsciScintillaBase. + - Added the SCN_AUTOCCOMPLETED() signal to QsciScintillaBase. + - Added the overloaded SCN_AUTOCSELECTION() and SCN_USERLISTSELECTION() + signals to QsciScintillaBase. + - Added the SCN_MARGINRIGHTCLICK() signal to QsciScintillaBase. + - Renamed SCI_GETTARGETRANGE to SCI_GETTARGETTEXT in QsciScintillaBase. + - Removed SCI_GETKEYSUNICODE and SCI_SETKEYSUNICODE to QsciScintillaBase. + - The autoCompletionFillups(), autoCompletionWordSeparators(), blockEnd(), + blockLookback(), blockStart(), blockStartKeyword(), braceStyle(), + caseSensitive(), indentationGuideView() and defaultStyle() methods of + QsciLexer are no longer marked as internal and are exposed to Python so + that they may be used by QsciLexerCustom sub-classes. + - The name of the library has been changed to include the major version + number of the version of Qt it is built against (ie. 4 or 5). + +v2.9.4 25th December 2016 + - Added the .api file for Python v3.6. + - Bug fixes. + +v2.9.3 25th July 2016 + - Bug fixes. + +v2.9.2 18th April 2016 + - Added support for a PEP 484 stub file for the Python extension module. + +v2.9.1 24th October 2015 + - Added the .api file for Python v3.5. + - Bug fixes. + +v2.9 20th April 2015 + - Based on Scintilla v3.5.4. + - Added UserLiteral, InactiveUserLiteral, TaskMarker, InactiveTaskMarker, + EscapeSequence, InactiveEscapeSequence, setHighlightBackQuotedStrings(), + highlightBackQuotedStrings(), setHighlightEscapeSequences(), + highlightEscapeSequences(), setVerbatimStringEscapeSequencesAllowed() and + verbatimStringEscapeSequencesAllowed() to QsciLexerCPP. + - Added CommentKeyword, DeclareInputPort, DeclareOutputPort, + DeclareInputOutputPort, PortConnection and the inactive versions of all + styles to QsciLexerVerilog. + - Added CommentBlock to QsciLexerVHDL. + - Added AnnotationIndented to QsciScintilla::AnnotationDisplay. + - Added FullBoxIndicator, ThickCompositionIndicator, ThinCompositionIndicator + and TextColorIndicator to QsciScintilla::IndicatorStyle. + - Added setIndicatorHoverForegroundColor() and setIndicatorHoverStyle() to + QsciScintilla. + - Added Bookmark to QsciScintilla::MarkerSymbol. + - Added WrapWhitespace to QsciScintilla::WrapMode. + - Added SCLEX_AS, SCLEX_BIBTEX, SCLEX_DMAP, SCLEX_DMIS, SCLEX_IHEX, + SCLEX_REGISTRY, SCLEX_SREC and SCLEX_TEHEX to QsciScintillaBase. + - Added SCI_CHANGEINSERTION to QsciScintillaBase. + - Added SCI_CLEARTABSTOPS, SCI_ADDTABSTOP and SCI_GETNEXTTABSTOP to + QsciScintillaBase. + - Added SCI_GETIMEINTERACTION, SCI_SETIMEINTERACTION, SC_IME_WINDOWED and + SC_IME_INLINE to QsciScintillaBase. + - Added SC_MARK_BOOKMARK to QsciScintillaBase. + - Added INDIC_COMPOSITIONTHIN, INDIC_FULLBOX, INDIC_TEXTFORE, INDIC_IME, + INDIC_IME_MAX, SC_INDICVALUEBIT, SC_INDICVALUEMASK, + SC_INDICFLAG_VALUEBEFORE, SCI_INDICSETHOVERSTYLE, SCI_INDICGETHOVERSTYLE, + SCI_INDICSETHOVERFORE, SCI_INDICGETHOVERFORE, SCI_INDICSETFLAGS and + SCI_INDICGETFLAGS to QsciScintillaBase. + - Added SCI_SETTARGETRANGE and SCI_GETTARGETRANGE to QsciScintillaBase. + - Added SCFIND_CXX11REGEX to QsciScintillaBase. + - Added SCI_CALLTIPSETPOSSTART to QsciScintillaBase. + - Added SC_FOLDFLAG_LINESTATE to QsciScintillaBase. + - Added SC_WRAP_WHITESPACE to QsciScintillaBase. + - Added SC_PHASES_ONE, SC_PHASES_TWO, SC_PHASES_MULTIPLE, SCI_GETPHASESDRAW + and SCI_SETPHASESDRAW to QsciScintillaBase. + - Added SC_STATUS_OK, SC_STATUS_FAILURE, SC_STATUS_BADALLOC, + SC_STATUS_WARN_START and SC_STATUS_WARNREGEX to QsciScintillaBase. + - Added SC_MULTIAUTOC_ONCE, SC_MULTIAUTOC_EACH, SCI_AUTOCSETMULTI and + SCI_AUTOCGETMULTI to QsciScintillaBase. + - Added ANNOTATION_INDENTED to QsciScintillaBase. + - Added SCI_DROPSELECTIONN to QsciScintillaBase. + - Added SC_TECHNOLOGY_DIRECTWRITERETAIN and SC_TECHNOLOGY_DIRECTWRITEDC to + QsciScintillaBase. + - Added SC_LINE_END_TYPE_DEFAULT, SC_LINE_END_TYPE_UNICODE, + SCI_GETLINEENDTYPESSUPPORTED, SCI_SETLINEENDTYPESALLOWED, + SCI_GETLINEENDTYPESALLOWED and SCI_GETLINEENDTYPESACTIVE to + QsciScintillaBase. + - Added SCI_ALLOCATESUBSTYLES, SCI_GETSUBSTYLESSTART, SCI_GETSUBSTYLESLENGTH, + SCI_GETSTYLEFROMSUBSTYLE, SCI_GETPRIMARYSTYLEFROMSTYLE, SCI_FREESUBSTYLES, + SCI_SETIDENTIFIERS, SCI_DISTANCETOSECONDARYSTYLES and SCI_GETSUBSTYLEBASES + to QsciScintillaBase. + - Added SC_MOD_INSERTCHECK and SC_MOD_CHANGETABSTOPS to QsciScintillaBase. + - Qt v3 and PyQt v3 are no longer supported. + +v2.8.4 11th September 2014 + - Added setHotspotForegroundColor(), resetHotspotForegroundColor(), + setHotspotBackgroundColor(), resetHotspotBackgroundColor(), + setHotspotUnderline() and setHotspotWrap() to QsciScintilla. + - Added SCI_SETHOTSPOTSINGLELINE to QsciScintillaBase. + - Bug fixes. + +v2.8.3 3rd July 2014 + - Added the QsciLexerCoffeeScript class. + - Font sizes are now handled as floating point values rather than integers. + - Bug fixes. + +v2.8.2 26th May 2014 + - Added the QsciLexerAVS class. + - Added the QsciLexerPO class. + - Added the --sysroot, --no-sip-files and --no-qsci-api options to the Python + bindings' configure.py. + - Cross-compilation (specifically to iOS and Android) is now supported. + - configure.py has been refactored and relicensed so that it can be used as a + template for wrapping other bindings. + - Bug fixes. + +v2.8.1 14th March 2014 + - Added support for iOS and Android. + - Added support for retina displays. + - A qscintilla2.prf file is installed so that application .pro files only + need to add CONFIG += qscintilla2. + - Updated the keywords recognised by the Octave lexer. + - Bug fixes. + +v2.8 9th November 2013 + - Based on Scintilla v3.3.6. + - Added the SCN_FOCUSIN() and SCN_FOCUSOUT() signals to QsciScintillaBase. + - Added PreProcessorCommentLineDoc and InactivePreProcessorCommentLineDoc to + QsciLexerCPP. + - Added SCLEX_LITERATEHASKELL, SCLEX_KVIRC, SCLEX_RUST and SCLEX_STTXT to + QsciScintillaBase. + - Added ThickCompositionIndicator to QsciScintilla::IndicatorStyle. + - Added INDIC_COMPOSITIONTHICK to QsciScintillaBase. + - Added SC_FOLDACTION_CONTRACT, SC_FOLDACTION_EXPAND and SC_FOLDACTION_TOGGLE + to QsciScintillaBase. + - Added SCI_FOLDLINE, SCI_FOLDCHILDREN, SCI_EXPANDCHILDREN and SCI_FOLDALL to + QsciScintillaBase. + - Added SC_AUTOMATICFOLD_SHOW, SC_AUTOMATICFOLD_CLICK and + SC_AUTOMATICFOLD_CHANGE to QsciScintillaBase. + - Added SCI_SETAUTOMATICFOLD and SCI_GETAUTOMATICFOLD to QsciScintillaBase. + - Added SC_ORDER_PRESORTED, SC_ORDER_PERFORMSORT and SC_ORDER_CUSTOM to + QsciScintillaBase. + - Added SCI_AUTOCSETORDER and SCI_AUTOCGETORDER to QsciScintillaBase. + - Added SCI_POSITIONRELATIVE to QsciScintillaBase. + - Added SCI_RELEASEALLEXTENDEDSTYLES and SCI_ALLOCATEEXTENDEDSTYLES to + QsciScintillaBase. + - Added SCI_SCROLLRANGE to QsciScintillaBase. + - Added SCI_SETCARETLINEVISIBLEALWAYS and SCI_GETCARETLINEVISIBLEALWAYS to + QsciScintillaBase. + - Added SCI_SETMOUSESELECTIONRECTANGULARSWITCH and + SCI_GETMOUSESELECTIONRECTANGULARSWITCH to QsciScintillaBase. + - Added SCI_SETREPRESENTATION, SCI_GETREPRESENTATION and + SCI_CLEARREPRESENTATION to QsciScintillaBase. + - Input methods are now properly supported. + +v2.7.2 16th June 2013 + - The build script for the Python bindings now has a --pyqt argument for + specifying PyQt4 or PyQt5. + - The default EOL mode on OS/X is now EolUnix. + - Bug fixes. + +v2.7.1 1st March 2013 + - Added support for the final release of Qt v5. + - The build script for the Python bindings should now work with SIP v5. + - Bug fixes. + +v2.7 8th December 2012 + - Based on Scintilla v3.2.3. + - Added support for Qt v5-rc1. + - Added HashQuotedString, InactiveHashQuotedString, PreProcessorComment, + InactivePreProcessorComment, setHighlightHashQuotedStrings() and + highlightHashQuotedStrings() to QsciLexerCpp. + - Added Variable, setHSSLanguage(), HSSLanguage(), setLessLanguage(), + LessLanguage(), setSCCSLanguage() and SCCSLanguage() to QsciLexerCSS. + - Added setOverwriteMode() and overwriteMode() to QsciScintilla. + - Added wordAtLineIndex() to QsciScintilla. + - Added findFirstInSelection() to QsciScintilla. + - Added CallTipsPosition, callTipsPosition() and setCallTipsPosition() to + QsciScintilla. + - Added WrapFlagInMargin to QsciScintilla::WrapVisualFlag. + - Added SquigglePixmapIndicator to QsciScintilla::IndicatorStyle. + - The weight of a font (rather than whether it is just bold or not) is now + respected. + - Added SCLEX_AVS, SCLEX_COFFEESCRIPT, SCLEX_ECL, SCLEX_OSCRIPT, + SCLEX_TCMD and SCLEX_VISUALPROLOG to QsciScintillaBase. + - Added SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE and + SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE to QsciScintillaBase. + - Added SC_FONT_SIZE_MULTIPLIER to QsciScintillaBase. + - Added SC_WEIGHT_NORMAL, SC_WEIGHT_SEMIBOLD and SC_WEIGHT_BOLD to + QsciScintillaBase. + - Added SC_WRAPVISUALFLAG_MARGIN to QsciScintillaBase. + - Added INDIC_SQUIGGLEPIXMAP to QsciScintillaBase. + - Added SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, + SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR, SCI_CALLTIPSETPOSITION, + SCI_COUNTCHARACTERS, SCI_CREATELOADER, SCI_DELETERANGE, + SCI_FINDINDICATORFLASH, SCI_FINDINDICATORHIDE, SCI_FINDINDICATORSHOW, + SCI_GETALLLINESVISIBLE, SCI_GETGAPPOSITION, SCI_GETPUNCTUATIONCHARS, + SCI_GETRANGEPOINTER, SCI_GETSELECTIONEMPTY, SCI_GETTECHNOLOGY, + SCI_GETWHITESPACECHARS, SCI_GETWORDCHARS, SCI_RGBAIMAGESETSCALE, + SCI_SETPUNCTUATIONCHARS, SCI_SETTECHNOLOGY, SCI_STYLESETSIZEFRACTIONAL, + SCI_STYLEGETSIZEFRACTIONAL, SCI_STYLESETWEIGHT and SCI_STYLEGETWEIGHT to + QsciScintillaBase. + - Removed SCI_GETUSEPALETTE and SCI_SETUSEPALETTE from QsciScintillaBase. + - Bug fixes. + +v2.6.2 20th June 2012 + - Added support for Qt v5-alpha. + - QsciLexer::wordCharacters() is now part of the public API. + - Bug fixes. + +v2.6.1 10th February 2012 + - Support SCI_NAMESPACE to enable all internal Scintilla classes to be put + into the Scintilla namespace. + - APIs now allow for spaces between the end of a word and the opening + parenthesis. + - Building against Qt v3 is fixed. + +v2.6 11th November 2011 + - Based on Scintilla v2.29. + - Added Command, command() and execute() to QsciCommand. + - Added boundTo() and find() to QsciCommandSet. + - Added createStandardContextMenu() to QsciScintilla. + - Added StraightBoxIndicator, DashesIndicator, DotsIndicator, + SquiggleLowIndicator and DotBoxIndicator to QsciScintilla::IndicatorStyle. + - Added markerDefine() to QsciScintilla. + - Added MoNone, MoSublineSelect, marginOptions() and setMarginOptions() to + QsciScintilla. + - Added registerImage() to QsciScintilla. + - Added setIndicatorOutlineColor() to QsciScintilla. + - Added setMatchedBraceIndicator(), resetMatchedBraceIndicator(), + setUnmatchedBraceIndicator() and resetUnmatchedBraceIndicator() to + QsciScintilla. + - Added highlightTripleQuotedStrings() and setHighlightTripleQuotedStrings() + to QsciLexerCpp. + - Added Label to QsciLexerLua. + - Added DoubleQuotedStringVar, Translation, RegexVar, SubstitutionVar, + BackticksVar, DoubleQuotedHereDocumentVar, BacktickHereDocumentVar, + QuotedStringQQVar, QuotedStringQXVar, QuotedStringQRVar, setFoldAtElse() + and foldAtElse() to QsciLexerPerl. + - Added highlightSubidentifiers() and setHighlightSubidentifiers() to + QsciLexerPython. + - Added INDIC_STRAIGHTBOX, INDIC_DASH, INDIC_DOTS, INDIC_SQUIGGLELOW and + INDIC_DOTBOX to QsciScintillaBase. + - Added SC_MARGINOPTION_NONE and SC_MARGINOPTION_SUBLINESELECT to + QsciScintillaBase. + - Added SC_MARK_RGBAIMAGE to QsciScintillaBase. + - Added SCI_BRACEBADLIGHTINDICATOR, SCI_BRACEHIGHLIGHTINDICATOR, + SCI_GETIDENTIFIER, SCI_GETMARGINOPTIONS, SCI_INDICGETOUTLINEALPHA, + SCI_INDICSETOUTLINEALPHA, SCI_MARKERDEFINERGBAIMAGE, + SCI_MARKERENABLEHIGHLIGHT, SCI_MARKERSETBACKSELECTED, + SCI_MOVESELECTEDLINESDOWN, SCI_MOVESELECTEDLINESUP, SCI_REGISTERRGBAIMAGE, + SCI_RGBAIMAGESETHEIGHT, SCI_RGBAIMAGESETWIDTH, SCI_SCROLLTOEND, + SCI_SCROLLTOSTART, SCI_SETEMPTYSELECTION, SCI_SETIDENTIFIER and + SCI_SETMARGINOPTIONS to QsciScintillaBase. + +v2.5.1 17th April 2011 + - Added QsciLexerMatlab and QsciLexerOctave. + +v2.5 29th March 2011 + - Based on Scintilla v2.25. + - Rectangular selections are now fully supported and compatible with SciTE. + - The signature of the fromMimeData() and toMimeData() methods of + QsciScintillaBase have changed incompatibly in order to support rectangular + selections. + - Added QsciScintilla::setAutoCompletionUseSingle() to replace the now + deprecated setAutoCompletionShowSingle(). + - Added QsciScintilla::autoCompletionUseSingle() to replace the now + deprecated autoCompletionShowSingle(). + - QsciScintilla::setAutoCompletionCaseSensitivity() is no longer ignored if a + lexer has been set. + - Added FullRectangle, LeftRectangle and Underline to the + QsciScintilla::MarkerSymbol enum. + - Added setExtraAscent(), extraAscent(), setExtraDescent() and extraDescent() + to QsciScintilla. + - Added setWhitespaceSize() and whitespaceSize() to QsciScintilla. + - Added replaceSelectedText() to QsciScintilla. + - Added setWhitespaceBackgroundColor() and setWhitespaceForegroundColor() to + QsciScintilla. + - Added setWrapIndentMode() and wrapIndentMode() to QsciScintilla. + - Added setFirstVisibleLine() to QsciScintilla. + - Added setContractedFolds() and contractedFolds() to QsciScintilla. + - Added the SCN_HOTSPOTRELEASECLICK() signal to QsciScintillaBase. + - The signature of the QsciScintillaBase::SCN_UPDATEUI() signal has changed. + - Added the RawString and inactive styles to QsciLexerCPP. + - Added MediaRule to QsciLexerCSS. + - Added BackquoteString, RawString, KeywordSet5, KeywordSet6 and KeywordSet7 + to QsciLexerD. + - Added setDjangoTemplates(), djangoTemplates(), setMakoTemplates() and + makoTemplates() to QsciLexerHTML. + - Added KeywordSet5, KeywordSet6, KeywordSet7 and KeywordSet8 to + QsciLexerLua. + - Added setInitialSpaces() and initialSpaces() to QsciLexerProperties. + - Added setFoldCompact(), foldCompact(), setStringsOverNewlineAllowed() and + stringsOverNewlineAllowed() to QsciLexerPython. + - Added setFoldComments(), foldComments(), setFoldCompact() and foldCompact() + to QsciLexerRuby. + - Added setFoldComments() and foldComments(), and removed setFoldCompact() + and foldCompact() from QsciLexerTCL. + - Added setFoldComments(), foldComments(), setFoldCompact(), foldCompact(), + setProcessComments(), processComments(), setProcessIf(), and processIf() to + QsciLexerTeX. + - Added QuotedIdentifier, setDottedWords(), dottedWords(), setFoldAtElse(), + foldAtElse(), setFoldOnlyBegin(), foldOnlyBegin(), setHashComments(), + hashComments(), setQuotedIdentifiers() and quotedIdentifiers() to + QsciLexerSQL. + - The Python bindings now allow optional arguments to be specified as keyword + arguments. + - The Python bindings will now build using the protected-is-public hack if + possible. + +v2.4.6 23rd December 2010 + - Added support for indicators to the high-level API, i.e. added the + IndicatorStyle enum, the clearIndicatorRange(), fillIndicatorRange(), + indicatorDefine(), indicatorDrawUnder(), setIndicatorDrawUnder() and + setIndicatorForegroundColor methods, and the indicatorClicked() and + indicatorReleased() signals to QsciScintilla. + - Added support for the Key style in QsciLexerProperties. + - Added an API file for Python v2.7. + - Added the --no-timestamp command line option to the Python bindings' + configure.py. + +v2.4.5 31st August 2010 + - A bug fix release. + +v2.4.4 12th July 2010 + - Added the canInsertFromMimeData(), fromMimeData() and toMimeData() methods + to QsciScintillaBase. + - QsciScintilla::markerDefine() now allows existing markers to be redefined. + +v2.4.3 17th March 2010 + - Added clearFolds() to QsciScintilla. + +v2.4.2 20th January 2010 + - Updated Spanish translations from Jaime Seuma. + - Fixed compilation problems with Qt v3 and Qt v4 prior to v4.5. + +v2.4.1 14th January 2010 + - Added the QsciLexerSpice and QsciLexerVerilog classes. + - Significant performance improvements when handling long lines. + - The Python bindings include automatically generated docstrings by default. + - Added an API file for Python v3. + +v2.4 5th June 2009 + - Based on Scintilla v1.78. + - Added the QsciLexerCustom, QsciStyle and QsciStyledText classes. + - Added annotate(), annotation(), clearAnnotations(), setAnnotationDisplay() + and annotationDisplay() to QsciScintilla. + - Added setMarginText(), clearMarginText(), setMarginType() and marginType() + to QsciScintilla. + - Added QsciLexer::lexerId() so that container lexers can be implemented. + - Added editor() and styleBitsNeeded() to QsciLexer. + - Added setDollarsAllowed() and dollarsAllowed() to QsciLexerCPP. + - Added setFoldScriptComments(), foldScriptComments(), + setFoldScriptHeredocs() and foldScriptHeredocs() to QsciLexerHTML. + - Added setSmartHighlighting() and smartHighlighting() to QsciLexerPascal. + (Note that the Scintilla Pascal lexer has changed so that any saved colour + and font settings will not be properly restored.) + - Added setFoldPackages(), foldPackages(), setFoldPODBlocks() and + foldPODBlocks() to QsciLexerPerl. + - Added setV2UnicodeAllowed(), v2UnicodeAllowed(), setV3BinaryOctalAllowed(), + v3BinaryOctalAllowed(), setV3BytesAllowed and v3BytesAllowed() to + QsciLexerPython. + - Added setScriptsStyled() and scriptsStyled() to QsciLexerXML. + - Added Spanish translations from Jaime Seuma. + +v2.3.2 17th November 2008 + - A bug fix release. + +v2.3.1 6th November 2008 + - Based on Scintilla v1.77. + - Added the read() and write() methods to QsciScintilla to allow a file to be + read and written while minimising the conversions. + - Added the positionFromLineIndex() and lineIndexFromPosition() methods to + QsciScintilla to convert between a Scintilla character address and a + QScintilla character address. + - Added QsciScintilla::wordAtPoint() to return the word at the given screen + coordinates. + - QSciScintilla::setSelection() now allows the carat to be left at either the + start or the end of the selection. + - 'with' is now treated as a keyword by the Python lexer. + +v2.3 20th September 2008 + - Based on Scintilla v1.76. + - The new QsciAbstractAPIs class allows applications to replace the default + implementation of the language APIs used for auto-completion lists and call + tips. + - Added QsciScintilla::apiContext() to allow applications to determine the + context used for auto-completion and call tips. + - Added the QsciLexerFortran, QsciLexerFortran77, QsciLexerPascal, + QsciLexerPostScript, QsciLexerTCL, QsciLexerXML and QsciLexerYAML classes. + - QsciScintilla::setFolding() will now accept an optional margin number. + +v2.2 27th February 2008 + - Based on Scintilla v1.75. + - A lexer's default colour, paper and font are now written to and read from + the settings. + - Windows64 is now supported. + - The signature of the QsciScintillaBase::SCN_MACRORECORD() signal has + changed slightly. + - Changed the licensing to match the current Qt licenses, including GPL v3. + +v2.1 1st June 2007 + - A slightly revised API, incompatible with QScintilla v2.0. + - Lexers now remember their style settings. A lexer no longer has to be the + current lexer when changing a style's color, end-of-line fill, font or + paper. + - The color(), eolFill(), font() and paper() methods of QsciLexer now return + the current values for a style rather than the default values. + - The setDefaultColor(), setDefaultFont() and setDefaultPaper() methods of + QsciLexer are no longer slots and no longer virtual. + - The defaultColor(), defaultFont() and defaultPaper() methods of QsciLexer + are no longer virtual. + - The color(), eolFill(), font() and paper() methods of all QsciLexer derived + classes (except for QsciLexer itself) have been renamed defaultColor(), + defaultEolFill(), defaultFont() and defaultPaper() respectively. + +v2.0 26th May 2007 + - A revised API, incompatible with QScintilla v1. + - Hugely improved autocompletion and call tips support. + - Supports both Qt v3 and Qt v4. + - Includes Python bindings. diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/CMakeLists.txt b/libs/qscintilla_2.14.1/Qt5Qt6/CMakeLists.txt new file mode 100644 index 000000000..57587197a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/CMakeLists.txt @@ -0,0 +1,325 @@ +cmake_minimum_required(VERSION 3.16) +project(qscintilla2 VERSION 2.14.1 LANGUAGES CXX) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(QT_MAJOR Qt5 CACHE STRING "Major QT version") + +find_package(${QT_MAJOR} REQUIRED COMPONENTS PrintSupport Widgets) + +if(APPLE) + find_package(${QT_MAJOR} REQUIRED COMPONENTS MacExtras) +endif() + +add_definitions(-DSCINTILLA_QT) +add_definitions(-DSCI_LEXER) + +set(SRC_LIST + ../scintilla/include/ILexer.h + ../scintilla/include/ILoader.h + ../scintilla/include/Platform.h + ../scintilla/include/SciLexer.h + ../scintilla/include/Sci_Position.h + ../scintilla/include/Scintilla.h + ../scintilla/include/ScintillaWidget.h + ../scintilla/lexers/LexA68k.cpp + ../scintilla/lexers/LexAPDL.cpp + ../scintilla/lexers/LexASY.cpp + ../scintilla/lexers/LexAU3.cpp + ../scintilla/lexers/LexAVE.cpp + ../scintilla/lexers/LexAVS.cpp + ../scintilla/lexers/LexAbaqus.cpp + ../scintilla/lexers/LexAda.cpp + ../scintilla/lexers/LexAsm.cpp + ../scintilla/lexers/LexAsn1.cpp + ../scintilla/lexers/LexBaan.cpp + ../scintilla/lexers/LexBash.cpp + ../scintilla/lexers/LexBasic.cpp + ../scintilla/lexers/LexBatch.cpp + ../scintilla/lexers/LexBibTeX.cpp + ../scintilla/lexers/LexBullant.cpp + ../scintilla/lexers/LexCLW.cpp + ../scintilla/lexers/LexCOBOL.cpp + ../scintilla/lexers/LexCPP.cpp + ../scintilla/lexers/LexCSS.cpp + ../scintilla/lexers/LexCaml.cpp + ../scintilla/lexers/LexCmake.cpp + ../scintilla/lexers/LexCoffeeScript.cpp + ../scintilla/lexers/LexConf.cpp + ../scintilla/lexers/LexCrontab.cpp + ../scintilla/lexers/LexCsound.cpp + ../scintilla/lexers/LexD.cpp + ../scintilla/lexers/LexDMAP.cpp + ../scintilla/lexers/LexDMIS.cpp + ../scintilla/lexers/LexDiff.cpp + ../scintilla/lexers/LexECL.cpp + ../scintilla/lexers/LexEDIFACT.cpp + ../scintilla/lexers/LexEScript.cpp + ../scintilla/lexers/LexEiffel.cpp + ../scintilla/lexers/LexErlang.cpp + ../scintilla/lexers/LexErrorList.cpp + ../scintilla/lexers/LexFlagship.cpp + ../scintilla/lexers/LexForth.cpp + ../scintilla/lexers/LexFortran.cpp + ../scintilla/lexers/LexGAP.cpp + ../scintilla/lexers/LexGui4Cli.cpp + ../scintilla/lexers/LexHTML.cpp + ../scintilla/lexers/LexHaskell.cpp + ../scintilla/lexers/LexHex.cpp + ../scintilla/lexers/LexIndent.cpp + ../scintilla/lexers/LexInno.cpp + ../scintilla/lexers/LexJSON.cpp + ../scintilla/lexers/LexKVIrc.cpp + ../scintilla/lexers/LexKix.cpp + ../scintilla/lexers/LexLaTeX.cpp + ../scintilla/lexers/LexLisp.cpp + ../scintilla/lexers/LexLout.cpp + ../scintilla/lexers/LexLua.cpp + ../scintilla/lexers/LexMMIXAL.cpp + ../scintilla/lexers/LexMPT.cpp + ../scintilla/lexers/LexMSSQL.cpp + ../scintilla/lexers/LexMagik.cpp + ../scintilla/lexers/LexMake.cpp + ../scintilla/lexers/LexMarkdown.cpp + ../scintilla/lexers/LexMatlab.cpp + ../scintilla/lexers/LexMaxima.cpp + ../scintilla/lexers/LexMetapost.cpp + ../scintilla/lexers/LexModula.cpp + ../scintilla/lexers/LexMySQL.cpp + ../scintilla/lexers/LexNimrod.cpp + ../scintilla/lexers/LexNsis.cpp + ../scintilla/lexers/LexNull.cpp + ../scintilla/lexers/LexOScript.cpp + ../scintilla/lexers/LexOpal.cpp + ../scintilla/lexers/LexPB.cpp + ../scintilla/lexers/LexPLM.cpp + ../scintilla/lexers/LexPO.cpp + ../scintilla/lexers/LexPOV.cpp + ../scintilla/lexers/LexPS.cpp + ../scintilla/lexers/LexPascal.cpp + ../scintilla/lexers/LexPerl.cpp + ../scintilla/lexers/LexPowerPro.cpp + ../scintilla/lexers/LexPowerShell.cpp + ../scintilla/lexers/LexProgress.cpp + ../scintilla/lexers/LexProps.cpp + ../scintilla/lexers/LexPython.cpp + ../scintilla/lexers/LexR.cpp + ../scintilla/lexers/LexRebol.cpp + ../scintilla/lexers/LexRegistry.cpp + ../scintilla/lexers/LexRuby.cpp + ../scintilla/lexers/LexRust.cpp + ../scintilla/lexers/LexSAS.cpp + ../scintilla/lexers/LexSML.cpp + ../scintilla/lexers/LexSQL.cpp + ../scintilla/lexers/LexSTTXT.cpp + ../scintilla/lexers/LexScriptol.cpp + ../scintilla/lexers/LexSmalltalk.cpp + ../scintilla/lexers/LexSorcus.cpp + ../scintilla/lexers/LexSpecman.cpp + ../scintilla/lexers/LexSpice.cpp + ../scintilla/lexers/LexStata.cpp + ../scintilla/lexers/LexTACL.cpp + ../scintilla/lexers/LexTADS3.cpp + ../scintilla/lexers/LexTAL.cpp + ../scintilla/lexers/LexTCL.cpp + ../scintilla/lexers/LexTCMD.cpp + ../scintilla/lexers/LexTeX.cpp + ../scintilla/lexers/LexTxt2tags.cpp + ../scintilla/lexers/LexVB.cpp + ../scintilla/lexers/LexVHDL.cpp + ../scintilla/lexers/LexVerilog.cpp + ../scintilla/lexers/LexVisualProlog.cpp + ../scintilla/lexers/LexYAML.cpp + ../scintilla/lexlib/Accessor.cpp ../scintilla/lexlib/Accessor.h + ../scintilla/lexlib/CharacterCategory.cpp ../scintilla/lexlib/CharacterCategory.h + ../scintilla/lexlib/CharacterSet.cpp ../scintilla/lexlib/CharacterSet.h + ../scintilla/lexlib/DefaultLexer.cpp ../scintilla/lexlib/DefaultLexer.h + ../scintilla/lexlib/LexAccessor.h + ../scintilla/lexlib/LexerBase.cpp ../scintilla/lexlib/LexerBase.h + ../scintilla/lexlib/LexerModule.cpp ../scintilla/lexlib/LexerModule.h + ../scintilla/lexlib/LexerNoExceptions.cpp ../scintilla/lexlib/LexerNoExceptions.h + ../scintilla/lexlib/LexerSimple.cpp ../scintilla/lexlib/LexerSimple.h + ../scintilla/lexlib/OptionSet.h + ../scintilla/lexlib/PropSetSimple.cpp ../scintilla/lexlib/PropSetSimple.h + ../scintilla/lexlib/SparseState.h + ../scintilla/lexlib/StringCopy.h + ../scintilla/lexlib/StyleContext.cpp ../scintilla/lexlib/StyleContext.h + ../scintilla/lexlib/SubStyles.h + ../scintilla/lexlib/WordList.cpp ../scintilla/lexlib/WordList.h + ../scintilla/src/AutoComplete.cpp ../scintilla/src/AutoComplete.h + ../scintilla/src/CallTip.cpp ../scintilla/src/CallTip.h + ../scintilla/src/CaseConvert.cpp ../scintilla/src/CaseConvert.h + ../scintilla/src/CaseFolder.cpp ../scintilla/src/CaseFolder.h + ../scintilla/src/Catalogue.cpp ../scintilla/src/Catalogue.h + ../scintilla/src/CellBuffer.cpp ../scintilla/src/CellBuffer.h + ../scintilla/src/CharClassify.cpp ../scintilla/src/CharClassify.h + ../scintilla/src/ContractionState.cpp ../scintilla/src/ContractionState.h + ../scintilla/src/DBCS.cpp ../scintilla/src/DBCS.h + ../scintilla/src/Decoration.cpp ../scintilla/src/Decoration.h + ../scintilla/src/Document.cpp ../scintilla/src/Document.h + ../scintilla/src/EditModel.cpp ../scintilla/src/EditModel.h + ../scintilla/src/EditView.cpp ../scintilla/src/EditView.h + ../scintilla/src/Editor.cpp ../scintilla/src/Editor.h + ../scintilla/src/ElapsedPeriod.h + ../scintilla/src/ExternalLexer.cpp ../scintilla/src/ExternalLexer.h + ../scintilla/src/FontQuality.h + ../scintilla/src/Indicator.cpp ../scintilla/src/Indicator.h + ../scintilla/src/IntegerRectangle.h + ../scintilla/src/KeyMap.cpp ../scintilla/src/KeyMap.h + ../scintilla/src/LineMarker.cpp ../scintilla/src/LineMarker.h + ../scintilla/src/MarginView.cpp ../scintilla/src/MarginView.h + ../scintilla/src/Partitioning.h + ../scintilla/src/PerLine.cpp ../scintilla/src/PerLine.h + ../scintilla/src/Position.h + ../scintilla/src/PositionCache.cpp ../scintilla/src/PositionCache.h + ../scintilla/src/RESearch.cpp ../scintilla/src/RESearch.h + ../scintilla/src/RunStyles.cpp ../scintilla/src/RunStyles.h + ../scintilla/src/ScintillaBase.cpp ../scintilla/src/ScintillaBase.h + ../scintilla/src/Selection.cpp ../scintilla/src/Selection.h + ../scintilla/src/SparseVector.h + ../scintilla/src/SplitVector.h + ../scintilla/src/Style.cpp ../scintilla/src/Style.h + ../scintilla/src/UniConversion.cpp ../scintilla/src/UniConversion.h + ../scintilla/src/UniqueString.h + ../scintilla/src/ViewStyle.cpp ../scintilla/src/ViewStyle.h + ../scintilla/src/XPM.cpp ../scintilla/src/XPM.h + InputMethod.cpp + ListBoxQt.cpp ListBoxQt.h + MacPasteboardMime.cpp + PlatQt.cpp + Qsci/qsciabstractapis.h + Qsci/qsciapis.h + Qsci/qscicommand.h + Qsci/qscicommandset.h + Qsci/qscidocument.h + Qsci/qsciglobal.h + Qsci/qscilexer.h + Qsci/qscilexerasm.h + Qsci/qscilexeravs.h + Qsci/qscilexerbash.h + Qsci/qscilexerbatch.h + Qsci/qscilexercmake.h + Qsci/qscilexercoffeescript.h + Qsci/qscilexercpp.h + Qsci/qscilexercsharp.h + Qsci/qscilexercss.h + Qsci/qscilexercustom.h + Qsci/qscilexerd.h + Qsci/qscilexerdiff.h + Qsci/qscilexeredifact.h + Qsci/qscilexerfortran.h + Qsci/qscilexerfortran77.h + Qsci/qscilexerhex.h + Qsci/qscilexerhtml.h + Qsci/qscilexeridl.h + Qsci/qscilexerintelhex.h + Qsci/qscilexerjava.h + Qsci/qscilexerjavascript.h + Qsci/qscilexerjson.h + Qsci/qscilexerlua.h + Qsci/qscilexermakefile.h + Qsci/qscilexermarkdown.h + Qsci/qscilexermasm.h + Qsci/qscilexermatlab.h + Qsci/qscilexernasm.h + Qsci/qscilexeroctave.h + Qsci/qscilexerpascal.h + Qsci/qscilexerperl.h + Qsci/qscilexerpo.h + Qsci/qscilexerpostscript.h + Qsci/qscilexerpov.h + Qsci/qscilexerproperties.h + Qsci/qscilexerpython.h + Qsci/qscilexerruby.h + Qsci/qscilexerspice.h + Qsci/qscilexersql.h + Qsci/qscilexersrec.h + Qsci/qscilexertcl.h + Qsci/qscilexertekhex.h + Qsci/qscilexertex.h + Qsci/qscilexerverilog.h + Qsci/qscilexervhdl.h + Qsci/qscilexerxml.h + Qsci/qscilexeryaml.h + Qsci/qscimacro.h + Qsci/qsciscintilla.h + Qsci/qsciscintillabase.h + Qsci/qscistyle.h + Qsci/qscistyledtext.h + Qsci/qsciprinter.h + SciAccessibility.cpp SciAccessibility.h + SciClasses.cpp SciClasses.h + ScintillaQt.cpp ScintillaQt.h + qsciabstractapis.cpp + qsciapis.cpp + qscicommand.cpp + qscicommandset.cpp + qscidocument.cpp + qscilexer.cpp + qscilexerasm.cpp + qscilexeravs.cpp + qscilexerbash.cpp + qscilexerbatch.cpp + qscilexercmake.cpp + qscilexercoffeescript.cpp + qscilexercpp.cpp + qscilexercsharp.cpp + qscilexercss.cpp + qscilexercustom.cpp + qscilexerd.cpp + qscilexerdiff.cpp + qscilexeredifact.cpp + qscilexerfortran.cpp + qscilexerfortran77.cpp + qscilexerhex.cpp + qscilexerhtml.cpp + qscilexeridl.cpp + qscilexerintelhex.cpp + qscilexerjava.cpp + qscilexerjavascript.cpp + qscilexerjson.cpp + qscilexerlua.cpp + qscilexermakefile.cpp + qscilexermarkdown.cpp + qscilexermasm.cpp + qscilexermatlab.cpp + qscilexernasm.cpp + qscilexeroctave.cpp + qscilexerpascal.cpp + qscilexerperl.cpp + qscilexerpo.cpp + qscilexerpostscript.cpp + qscilexerpov.cpp + qscilexerproperties.cpp + qscilexerpython.cpp + qscilexerruby.cpp + qscilexerspice.cpp + qscilexersql.cpp + qscilexersrec.cpp + qscilexertcl.cpp + qscilexertekhex.cpp + qscilexertex.cpp + qscilexerverilog.cpp + qscilexervhdl.cpp + qscilexerxml.cpp + qscilexeryaml.cpp + qscimacro.cpp + qsciscintilla.cpp + qsciscintillabase.cpp + qscistyle.cpp + qscistyledtext.cpp + qsciprinter.cpp +) + +add_library(qscintilla2 ${SRC_LIST}) +target_include_directories(qscintilla2 PRIVATE ../scintilla/include ../scintilla/lexlib ../scintilla/src) +target_include_directories(qscintilla2 INTERFACE .) + +target_link_libraries(qscintilla2 ${QT_MAJOR}::Widgets ${QT_MAJOR}::PrintSupport) + +if (APPLE) + target_link_libraries(qscintilla2 ${QT_MAJOR}::MacExtras) +endif() + +add_library(QScintilla::QScintilla ALIAS qscintilla2) diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/InputMethod.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/InputMethod.cpp new file mode 100644 index 000000000..afce5a143 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/InputMethod.cpp @@ -0,0 +1,273 @@ +// Copyright (c) 2021 Riverbank Computing Limited +// Copyright (c) 2011 Archaeopteryx Software, Inc. +// Copyright (c) 1990-2011, Scientific Toolworks, Inc. +// +// The License.txt file describes the conditions under which this software may +// be distributed. + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Qsci/qsciscintillabase.h" +#include "ScintillaQt.h" + + +#define INDIC_INPUTMETHOD 24 + +#define MAXLENINPUTIME 200 +#define SC_INDICATOR_INPUT INDIC_IME +#define SC_INDICATOR_TARGET INDIC_IME+1 +#define SC_INDICATOR_CONVERTED INDIC_IME+2 +#define SC_INDICATOR_UNKNOWN INDIC_IME_MAX + + +static bool IsHangul(const QChar qchar) +{ + int unicode = (int)qchar.unicode(); + // Korean character ranges used for preedit chars. + // http://www.programminginkorean.com/programming/hangul-in-unicode/ + const bool HangulJamo = (0x1100 <= unicode && unicode <= 0x11FF); + const bool HangulCompatibleJamo = (0x3130 <= unicode && unicode <= 0x318F); + const bool HangulJamoExtendedA = (0xA960 <= unicode && unicode <= 0xA97F); + const bool HangulJamoExtendedB = (0xD7B0 <= unicode && unicode <= 0xD7FF); + const bool HangulSyllable = (0xAC00 <= unicode && unicode <= 0xD7A3); + return HangulJamo || HangulCompatibleJamo || HangulSyllable || + HangulJamoExtendedA || HangulJamoExtendedB; +} + +static void MoveImeCarets(QsciScintillaQt *sqt, int offset) +{ + // Move carets relatively by bytes + for (size_t r=0; r < sqt->sel.Count(); r++) { + int positionInsert = sqt->sel.Range(r).Start().Position(); + sqt->sel.Range(r).caret.SetPosition(positionInsert + offset); + sqt->sel.Range(r).anchor.SetPosition(positionInsert + offset); + } +} + +static void DrawImeIndicator(QsciScintillaQt *sqt, int indicator, int len) +{ + // Emulate the visual style of IME characters with indicators. + // Draw an indicator on the character before caret by the character bytes of len + // so it should be called after AddCharUTF(). + // It does not affect caret positions. + if (indicator < 8 || indicator > INDIC_MAX) { + return; + } + sqt->pdoc->DecorationSetCurrentIndicator(indicator); + for (size_t r=0; r< sqt-> sel.Count(); r++) { + int positionInsert = sqt->sel.Range(r).Start().Position(); + sqt->pdoc->DecorationFillRange(positionInsert - len, 1, len); + } +} + +static int GetImeCaretPos(QInputMethodEvent *event) +{ + foreach (QInputMethodEvent::Attribute attr, event->attributes()) { + if (attr.type == QInputMethodEvent::Cursor) + return attr.start; + } + return 0; +} + +static std::vector MapImeIndicators(QInputMethodEvent *event) +{ + std::vector imeIndicator(event->preeditString().size(), SC_INDICATOR_UNKNOWN); + foreach (QInputMethodEvent::Attribute attr, event->attributes()) { + if (attr.type == QInputMethodEvent::TextFormat) { + QTextFormat format = attr.value.value(); + QTextCharFormat charFormat = format.toCharFormat(); + + int indicator = SC_INDICATOR_UNKNOWN; + switch (charFormat.underlineStyle()) { + case QTextCharFormat::NoUnderline: // win32, linux + indicator = SC_INDICATOR_TARGET; + break; + case QTextCharFormat::SingleUnderline: // osx + case QTextCharFormat::DashUnderline: // win32, linux + indicator = SC_INDICATOR_INPUT; + break; + case QTextCharFormat::DotLine: + case QTextCharFormat::DashDotLine: + case QTextCharFormat::WaveUnderline: + case QTextCharFormat::SpellCheckUnderline: + indicator = SC_INDICATOR_CONVERTED; + break; + + default: + indicator = SC_INDICATOR_UNKNOWN; + } + + if (format.hasProperty(QTextFormat::BackgroundBrush)) // win32, linux + indicator = SC_INDICATOR_TARGET; + +#ifdef Q_OS_OSX + if (charFormat.underlineStyle() == QTextCharFormat::SingleUnderline) { + QColor uc = charFormat.underlineColor(); + if (uc.lightness() < 2) { // osx + indicator = SC_INDICATOR_TARGET; + } + } +#endif + + for (int i = attr.start; i < attr.start+attr.length; i++) { + imeIndicator[i] = indicator; + } + } + } + return imeIndicator; +} + +void QsciScintillaBase::inputMethodEvent(QInputMethodEvent *event) +{ + // Copy & paste by johnsonj with a lot of helps of Neil + // Great thanks for my forerunners, jiniya and BLUEnLIVE + + if (sci->pdoc->IsReadOnly() || sci->SelectionContainsProtected()) { + // Here, a canceling and/or completing composition function is needed. + return; + } + + bool initialCompose = false; + if (sci->pdoc->TentativeActive()) { + sci->pdoc->TentativeUndo(); + } else { + // No tentative undo means start of this composition so + // Fill in any virtual spaces. + initialCompose = true; + } + + sci->view.imeCaretBlockOverride = false; + + if (!event->commitString().isEmpty()) { + const QString commitStr = event->commitString(); + const int commitStrLen = commitStr.length(); + + for (int i = 0; i < commitStrLen;) { + const int ucWidth = commitStr.at(i).isHighSurrogate() ? 2 : 1; + const QString oneCharUTF16 = commitStr.mid(i, ucWidth); + const QByteArray oneChar = textAsBytes(oneCharUTF16); + const int oneCharLen = oneChar.length(); + + sci->AddCharUTF(oneChar.data(), oneChar.length()); + i += ucWidth; + } + + } else if (!event->preeditString().isEmpty()) { + const QString preeditStr = event->preeditString(); + const int preeditStrLen = preeditStr.length(); + if (preeditStrLen == 0) { + sci->ShowCaretAtCurrentPosition(); + return; + } + + if (initialCompose) + sci->ClearBeforeTentativeStart(); + sci->pdoc->TentativeStart(); // TentativeActive() from now on. + + std::vector imeIndicator = MapImeIndicators(event); + + for (unsigned int i = 0; i < preeditStrLen;) { + const unsigned int ucWidth = preeditStr.at(i).isHighSurrogate() ? 2 : 1; + const QString oneCharUTF16 = preeditStr.mid(i, ucWidth); + const QByteArray oneChar = textAsBytes(oneCharUTF16); + const int oneCharLen = oneChar.length(); + + sci->AddCharUTF(oneChar.data(), oneCharLen); + + DrawImeIndicator(sci, imeIndicator[i], oneCharLen); + i += ucWidth; + } + + // Move IME carets. + int imeCaretPos = GetImeCaretPos(event); + int imeEndToImeCaretU16 = imeCaretPos - preeditStrLen; + int imeCaretPosDoc = sci->pdoc->GetRelativePositionUTF16(sci->CurrentPosition(), imeEndToImeCaretU16); + + MoveImeCarets(sci, - sci->CurrentPosition() + imeCaretPosDoc); + + if (IsHangul(preeditStr.at(0))) { +#ifndef Q_OS_WIN + if (imeCaretPos > 0) { + int oneCharBefore = sci->pdoc->GetRelativePosition(sci->CurrentPosition(), -1); + MoveImeCarets(sci, - sci->CurrentPosition() + oneCharBefore); + } +#endif + sci->view.imeCaretBlockOverride = true; + } + + // Set candidate box position for Qt::ImCursorRectangle. + preeditPos = sci->CurrentPosition(); + sci->EnsureCaretVisible(); + updateMicroFocus(); + } + sci->ShowCaretAtCurrentPosition(); +} + +QVariant QsciScintillaBase::inputMethodQuery(Qt::InputMethodQuery query) const +{ + int pos = SendScintilla(SCI_GETCURRENTPOS); + int line = SendScintilla(SCI_LINEFROMPOSITION, pos); + + switch (query) { + case Qt::ImHints: + return QWidget::inputMethodQuery(query); + + case Qt::ImCursorRectangle: + { + int startPos = (preeditPos >= 0) ? preeditPos : pos; + Scintilla::Point pt = sci->LocationFromPosition(startPos); + int width = SendScintilla(SCI_GETCARETWIDTH); + int height = SendScintilla(SCI_TEXTHEIGHT, line); + return QRect(pt.x, pt.y, width, height); + } + + case Qt::ImFont: + { + char fontName[64]; + int style = SendScintilla(SCI_GETSTYLEAT, pos); + int len = SendScintilla(SCI_STYLEGETFONT, style, (sptr_t)fontName); + int size = SendScintilla(SCI_STYLEGETSIZE, style); + bool italic = SendScintilla(SCI_STYLEGETITALIC, style); + int weight = SendScintilla(SCI_STYLEGETBOLD, style) ? QFont::Bold : -1; + return QFont(QString::fromUtf8(fontName, len), size, weight, italic); + } + + case Qt::ImCursorPosition: + { + int paraStart = sci->pdoc->ParaUp(pos); + return pos - paraStart; + } + + case Qt::ImSurroundingText: + { + int paraStart = sci->pdoc->ParaUp(pos); + int paraEnd = sci->pdoc->ParaDown(pos); + QVarLengthArray buffer(paraEnd - paraStart + 1); + + SendScintilla(SCI_GETTEXTRANGE, paraStart, paraEnd, buffer.data()); + + return bytesAsText(buffer.constData(), buffer.size()); + } + + case Qt::ImCurrentSelection: + { + QVarLengthArray buffer(SendScintilla(SCI_GETSELTEXT) + 1); + SendScintilla(SCI_GETSELTEXT, 0, (sptr_t)buffer.data()); + + return bytesAsText(buffer.constData(), buffer.size() - 1); + } + + default: + return QVariant(); + } +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.cpp new file mode 100644 index 000000000..f67e581c1 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.cpp @@ -0,0 +1,367 @@ +// This module implements the specialisation of QListBox that handles the +// Scintilla double-click callback. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "ListBoxQt.h" + +#include + +#include + +#include "SciClasses.h" +#include "Qsci/qsciscintilla.h" + + +QsciListBoxQt::QsciListBoxQt() + : slb(0), visible_rows(5), utf8(false), delegate(0) +{ +} + + +void QsciListBoxQt::SetFont(Scintilla::Font &font) +{ + QFont *f = reinterpret_cast(font.GetID()); + + if (f) + slb->setFont(*f); +} + + +void QsciListBoxQt::Create(Scintilla::Window &parent, int, Scintilla::Point, + int, bool unicodeMode, int) +{ + utf8 = unicodeMode; + + // The parent we want is the QsciScintillaBase, not the text area. + wid = slb = new QsciSciListBox(reinterpret_cast(parent.GetID())->parentWidget(), this); +} + + +void QsciListBoxQt::SetAverageCharWidth(int) +{ + // We rely on sizeHint() for the size of the list box rather than make + // calculations based on the average character width and the number of + // visible rows. +} + + +void QsciListBoxQt::SetVisibleRows(int vrows) +{ + // We only pretend to implement this. + visible_rows = vrows; +} + + +int QsciListBoxQt::GetVisibleRows() const +{ + return visible_rows; +} + + +Scintilla::PRectangle QsciListBoxQt::GetDesiredRect() +{ + Scintilla::PRectangle rc(0, 0, 100, 100); + + if (slb) + { + int rows = slb->count(); + + if (rows == 0 || rows > visible_rows) + rows = visible_rows; + + int row_height = slb->sizeHintForRow(0); + int height = (rows * row_height) + (2 * slb->frameWidth()); + + int width = slb->sizeHintForColumn(0) + (2 * slb->frameWidth()); + + if (slb->count() > rows) + width += QApplication::style()->pixelMetric( + QStyle::PM_ScrollBarExtent); + + rc.right = width; + rc.bottom = height; + } + + return rc; +} + + +int QsciListBoxQt::CaretFromEdge() +{ + int dist = 0; + + // Find the width of the biggest image. + for (xpmMap::const_iterator it = xset.begin(); it != xset.end(); ++it) + { + int w = it.value().width(); + + if (dist < w) + dist = w; + } + + if (slb) + dist += slb->frameWidth(); + + // Fudge factor - adjust if required. + dist += 3; + + return dist; +} + + +void QsciListBoxQt::Clear() +{ + Q_ASSERT(slb); + + slb->clear(); +} + + +void QsciListBoxQt::Append(char *s, int type) +{ + Q_ASSERT(slb); + + QString qs; + + if (utf8) + qs = QString::fromUtf8(s); + else + qs = QString::fromLatin1(s); + + xpmMap::const_iterator it; + + if (type < 0 || (it = xset.find(type)) == xset.end()) + slb->addItem(qs); + else + slb->addItemPixmap(it.value(), qs); +} + + +int QsciListBoxQt::Length() +{ + Q_ASSERT(slb); + + return slb->count(); +} + + +void QsciListBoxQt::Select(int n) +{ + Q_ASSERT(slb); + + slb->setCurrentRow(n); + selectionChanged(); +} + + +int QsciListBoxQt::GetSelection() +{ + Q_ASSERT(slb); + + return slb->currentRow(); +} + + +int QsciListBoxQt::Find(const char *prefix) +{ + Q_ASSERT(slb); + + return slb->find(prefix); +} + + +void QsciListBoxQt::GetValue(int n, char *value, int len) +{ + Q_ASSERT(slb); + + QString selection = slb->text(n); + + bool trim_selection = false; + QObject *sci_obj = slb->parent(); + + if (sci_obj->inherits("QsciScintilla")) + { + QsciScintilla *sci = static_cast(sci_obj); + + if (sci->isAutoCompletionList()) + { + // Save the full selection and trim the value we return. + sci->acSelection = selection; + trim_selection = true; + } + } + + if (selection.isEmpty() || len <= 0) + value[0] = '\0'; + else + { + const char *s; + int slen; + + QByteArray bytes; + + if (utf8) + bytes = selection.toUtf8(); + else + bytes = selection.toLatin1(); + + s = bytes.data(); + slen = bytes.length(); + + while (slen-- && len--) + { + if (trim_selection && *s == ' ') + break; + + *value++ = *s++; + } + + *value = '\0'; + } +} + + +void QsciListBoxQt::Sort() +{ + Q_ASSERT(slb); + + slb->sortItems(); +} + + +void QsciListBoxQt::RegisterImage(int type, const char *xpm_data) +{ + xset.insert(type, *reinterpret_cast(xpm_data)); +} + + +void QsciListBoxQt::RegisterRGBAImage(int type, int, int, + const unsigned char *pixelsImage) +{ + QPixmap pm; + + pm.convertFromImage(*reinterpret_cast(pixelsImage)); + + xset.insert(type, pm); +} + + +void QsciListBoxQt::ClearRegisteredImages() +{ + xset.clear(); +} + + +void QsciListBoxQt::SetDelegate(Scintilla::IListBoxDelegate *lbDelegate) +{ + delegate = lbDelegate; +} + + +void QsciListBoxQt::handleDoubleClick() +{ + if (delegate) + { + Scintilla::ListBoxEvent event( + Scintilla::ListBoxEvent::EventType::doubleClick); + + delegate->ListNotify(&event); + } +} + + +void QsciListBoxQt::handleRelease() +{ + selectionChanged(); +} + + +void QsciListBoxQt::selectionChanged() +{ + if (delegate) + { + Scintilla::ListBoxEvent event( + Scintilla::ListBoxEvent::EventType::selectionChange); + + delegate->ListNotify(&event); + } +} + + +void QsciListBoxQt::SetList(const char *list, char separator, char typesep) +{ + char *words; + + Clear(); + + if ((words = qstrdup(list)) != NULL) + { + char *startword = words; + char *numword = NULL; + + for (int i = 0; words[i] != '\0'; i++) + { + if (words[i] == separator) + { + words[i] = '\0'; + + if (numword) + *numword = '\0'; + + Append(startword, numword ? atoi(numword + 1) : -1); + + startword = words + i + 1; + numword = NULL; + } + else if (words[i] == typesep) + { + numword = words + i; + } + } + + if (startword) + { + if (numword) + *numword = '\0'; + + Append(startword, numword ? atoi(numword + 1) : -1); + } + + delete[] words; + } +} + + +// The ListBox methods that need to be implemented explicitly. + +Scintilla::ListBox::ListBox() noexcept +{ +} + + +Scintilla::ListBox::~ListBox() +{ +} + + +Scintilla::ListBox *Scintilla::ListBox::Allocate() +{ + return new QsciListBoxQt(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.h b/libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.h new file mode 100644 index 000000000..ffcc17a06 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/ListBoxQt.h @@ -0,0 +1,76 @@ +// This defines the specialisation of QListBox that handles the Scintilla +// double-click callback. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include +#include +#include + +#include "Platform.h" + + +class QsciSciListBox; + + +// This is an internal class but it is referenced by a public class so it has +// to have a Qsci prefix rather than being put in the Scintilla namespace. +// However the reason for avoiding this no longer applies. +class QsciListBoxQt : public Scintilla::ListBox +{ +public: + QsciListBoxQt(); + + virtual void SetFont(Scintilla::Font &font); + virtual void Create(Scintilla::Window &parent, int, Scintilla::Point, int, + bool unicodeMode, int); + virtual void SetAverageCharWidth(int); + virtual void SetVisibleRows(int); + virtual int GetVisibleRows() const; + virtual Scintilla::PRectangle GetDesiredRect(); + virtual int CaretFromEdge(); + virtual void Clear(); + virtual void Append(char *s, int type = -1); + virtual int Length(); + virtual void Select(int n); + virtual int GetSelection(); + virtual int Find(const char *prefix); + virtual void GetValue(int n, char *value, int len); + virtual void Sort(); + virtual void RegisterImage(int type, const char *xpm_data); + virtual void RegisterRGBAImage(int type, int width, int height, + const unsigned char *pixelsImage); + virtual void ClearRegisteredImages(); + virtual void SetDelegate(Scintilla::IListBoxDelegate *lbDelegate); + virtual void SetList(const char *list, char separator, char typesep); + + void handleDoubleClick(); + void handleRelease(); + +private: + QsciSciListBox *slb; + int visible_rows; + bool utf8; + Scintilla::IListBoxDelegate *delegate; + + typedef QMap xpmMap; + xpmMap xset; + + void selectionChanged(); +}; diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/MacPasteboardMime.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/MacPasteboardMime.cpp new file mode 100644 index 000000000..bea06b50c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/MacPasteboardMime.cpp @@ -0,0 +1,111 @@ +// This module implements part of the support for rectangular selections on +// macOS. It is a separate file to avoid clashes between macOS and Scintilla +// data types. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include + +#if QT_VERSION < 0x060000 && defined(Q_OS_OSX) + +#include +#include +#include +#include +#include +#include + +#include + + +static const QLatin1String mimeRectangular("text/x-qscintilla-rectangular"); +static const QLatin1String utiRectangularMac("com.scintilla.utf16-plain-text.rectangular"); + + +class RectangularPasteboardMime : public QMacPasteboardMime +{ +public: + RectangularPasteboardMime() : QMacPasteboardMime(MIME_ALL) + { + } + + bool canConvert(const QString &mime, QString flav) + { + return mime == mimeRectangular && flav == utiRectangularMac; + } + + QList convertFromMime(const QString &, QVariant data, QString) + { + QList converted; + + converted.append(data.toByteArray()); + + return converted; + } + + QVariant convertToMime(const QString &, QList data, QString) + { + QByteArray converted; + + foreach (QByteArray i, data) + { + converted += i; + } + + return QVariant(converted); + } + + QString convertorName() + { + return QString("QScintillaRectangular"); + } + + QString flavorFor(const QString &mime) + { + if (mime == mimeRectangular) + return QString(utiRectangularMac); + + return QString(); + } + + QString mimeFor(QString flav) + { + if (flav == utiRectangularMac) + return QString(mimeRectangular); + + return QString(); + } +}; + + +// Initialise the singleton instance. +void initialiseRectangularPasteboardMime() +{ + static RectangularPasteboardMime *instance = 0; + + if (!instance) + { + instance = new RectangularPasteboardMime(); + + qRegisterDraggedTypes(QStringList(utiRectangularMac)); + } +} + + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/PlatQt.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/PlatQt.cpp new file mode 100644 index 000000000..073c5fd01 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/PlatQt.cpp @@ -0,0 +1,990 @@ +// This module implements the portability layer for the Qt port of Scintilla. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(Q_OS_WASM) +#include +#endif + +#include "Platform.h" +#include "XPM.h" + +#include "Qsci/qsciscintillabase.h" +#include "SciClasses.h" + +#include "FontQuality.h" + + +namespace Scintilla { + +// Type convertors. +static QFont *PFont(FontID fid) +{ + return reinterpret_cast(fid); +} + +static QWidget *PWindow(WindowID wid) +{ + return reinterpret_cast(wid); +} + +static QsciSciPopup *PMenu(MenuID mid) +{ + return reinterpret_cast(mid); +} + + +// Font management. +Font::Font() noexcept : fid(0) +{ +} + +Font::~Font() +{ +} + +void Font::Create(const FontParameters &fp) +{ + Release(); + + QFont *f = new QFont(); + + QFont::StyleStrategy strategy; + + switch (fp.extraFontFlag & SC_EFF_QUALITY_MASK) + { + case SC_EFF_QUALITY_NON_ANTIALIASED: + strategy = QFont::NoAntialias; + break; + + case SC_EFF_QUALITY_ANTIALIASED: + strategy = QFont::PreferAntialias; + break; + + default: + strategy = QFont::PreferDefault; + } + + f->setStyleStrategy(strategy); + f->setFamily(fp.faceName); + f->setPointSizeF(fp.size); + f->setItalic(fp.italic); + + // Scintilla weights are between 1 and 100, Qt5 weights are between 0 and + // 99, and Qt6 weights match Scintilla. A negative weight is interpreted + // as an explicit Qt weight (ie. the back door). +#if QT_VERSION >= 0x060000 + QFont::Weight qt_weight = static_cast(abs(fp.weight)); +#else + int qt_weight; + + if (fp.weight < 0) + qt_weight = -fp.weight; + else if (fp.weight <= 200) + qt_weight = QFont::Light; + else if (fp.weight <= QsciScintillaBase::SC_WEIGHT_NORMAL) + qt_weight = QFont::Normal; + else if (fp.weight <= 600) + qt_weight = QFont::DemiBold; + else if (fp.weight <= 850) + qt_weight = QFont::Bold; + else + qt_weight = QFont::Black; +#endif + + f->setWeight(qt_weight); + + fid = f; +} + +void Font::Release() +{ + if (fid) + { + delete PFont(fid); + fid = 0; + } +} + + +// A surface abstracts a place to draw. +class SurfaceImpl : public Surface +{ +public: + SurfaceImpl(); + virtual ~SurfaceImpl(); + + void Init(WindowID wid); + void Init(SurfaceID sid, WindowID); + void Init(QPainter *p); + void InitPixMap(int width, int height, Surface *sid, WindowID wid); + + void Release(); + bool Initialised() {return painter;} + void PenColour(ColourDesired fore); + int LogPixelsY() {return pd->logicalDpiY();} + int DeviceHeightFont(int points) {return points;} + void MoveTo(int x_,int y_); + void LineTo(int x_,int y_); + void Polygon(Point *pts, size_t 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); + void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, + int alphaFill, ColourDesired outline, int alphaOutline, + int flags); + void GradientRectangle(PRectangle rc, const std::vector &stops, + GradientOptions options); + void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage); + void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back); + void Copy(PRectangle rc, Point from, Surface &surfaceSource); + + void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, + const char *s, int len, ColourDesired fore, ColourDesired back); + 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 Ascent(Font &font_); + XYPOSITION Descent(Font &font_); + XYPOSITION InternalLeading(Font &font_) {Q_UNUSED(font_); return 0;} + XYPOSITION Height(Font &font_); + XYPOSITION AverageCharWidth(Font &font_); + + void SetClip(PRectangle rc); + void FlushCachedState(); + + void SetUnicodeMode(bool unicodeMode_) {unicodeMode = unicodeMode_;} + void SetDBCSMode(int codePage) {Q_UNUSED(codePage);} + + void DrawXPM(PRectangle rc, const XPM *xpm); + +private: + void drawRect(const PRectangle &rc); + void drawText(const PRectangle &rc, Font &font_, XYPOSITION ybase, + const char *s, int len, ColourDesired fore); + static QFont convertQFont(Font &font); + QFontMetricsF metrics(Font &font_); + QString convertText(const char *s, int len); + static QColor convertQColor(const ColourDesired &col, + unsigned alpha = 255); + + bool unicodeMode; + QPaintDevice *pd; + QPainter *painter; + bool my_resources; + int pen_x, pen_y; +}; + +Surface *Surface::Allocate(int) +{ + return new SurfaceImpl; +} + +SurfaceImpl::SurfaceImpl() + : unicodeMode(false), pd(0), painter(0), my_resources(false), pen_x(0), + pen_y(0) +{ +} + +SurfaceImpl::~SurfaceImpl() +{ + Release(); +} + +void SurfaceImpl::Init(WindowID wid) +{ + Release(); + + pd = reinterpret_cast(wid); +} + +void SurfaceImpl::Init(SurfaceID sid, WindowID) +{ + Release(); + + // This method, and the SurfaceID type, is only used when printing. As it + // is actually a void * we pass (when using SCI_FORMATRANGE) a pointer to a + // QPainter rather than a pointer to a SurfaceImpl as might be expected. + QPainter *p = reinterpret_cast(sid); + + pd = p->device(); + painter = p; +} + +void SurfaceImpl::Init(QPainter *p) +{ + Release(); + + pd = p->device(); + painter = p; +} + +void SurfaceImpl::InitPixMap(int width, int height, Surface *sid, WindowID wid) +{ + Release(); + + int dpr = PWindow(wid)->devicePixelRatio(); + QPixmap *pixmap = new QPixmap(width * dpr, height * dpr); + pixmap->setDevicePixelRatio(dpr); + + pd = pixmap; + + painter = new QPainter(pd); + my_resources = true; + + SetUnicodeMode(static_cast(sid)->unicodeMode); +} + +void SurfaceImpl::Release() +{ + if (my_resources) + { + if (painter) + delete painter; + + if (pd) + delete pd; + + my_resources = false; + } + + painter = 0; + pd = 0; +} + +void SurfaceImpl::MoveTo(int x_, int y_) +{ + Q_ASSERT(painter); + + pen_x = x_; + pen_y = y_; +} + +void SurfaceImpl::LineTo(int x_, int y_) +{ + Q_ASSERT(painter); + + painter->drawLine(pen_x, pen_y, x_, y_); + + pen_x = x_; + pen_y = y_; +} + +void SurfaceImpl::PenColour(ColourDesired fore) +{ + Q_ASSERT(painter); + + painter->setPen(convertQColor(fore)); +} + +void SurfaceImpl::Polygon(Point *pts, size_t npts, ColourDesired fore, + ColourDesired back) +{ + Q_ASSERT(painter); + + QPolygonF qpts(npts); + + for (size_t i = 0; i < npts; ++i) + qpts[i] = QPointF(pts[i].x, pts[i].y); + + painter->setPen(convertQColor(fore)); + painter->setBrush(convertQColor(back)); + painter->drawPolygon(qpts); +} + +void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, + ColourDesired back) +{ + Q_ASSERT(painter); + + painter->setPen(convertQColor(fore)); + painter->setBrush(convertQColor(back)); + drawRect(rc); +} + +void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) +{ + Q_ASSERT(painter); + + painter->setPen(Qt::NoPen); + painter->setBrush(convertQColor(back)); + drawRect(rc); +} + +void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) +{ + Q_ASSERT(painter); + + SurfaceImpl &si = static_cast(surfacePattern); + QPixmap *pm = static_cast(si.pd); + + if (pm) + { + QBrush brsh(Qt::black, *pm); + + painter->setPen(Qt::NoPen); + painter->setBrush(brsh); + drawRect(rc); + } + else + { + FillRectangle(rc, ColourDesired(0)); + } +} + +void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourDesired fore, + ColourDesired back) +{ + Q_ASSERT(painter); + + painter->setPen(convertQColor(fore)); + painter->setBrush(convertQColor(back)); + painter->drawRoundedRect( + QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top), + 25, 25, Qt::RelativeSize); +} + +void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, + ColourDesired fill, int alphaFill, ColourDesired outline, + int alphaOutline, int) +{ + Q_ASSERT(painter); + + QColor outline_colour = convertQColor(outline, alphaOutline); + QColor fill_colour = convertQColor(fill, alphaFill); + + // There was a report of Qt seeming to ignore the alpha value of the pen so + // so we disable the pen if the outline and fill colours are the same. + if (outline_colour == fill_colour) + painter->setPen(Qt::NoPen); + else + painter->setPen(outline_colour); + + painter->setBrush(fill_colour); + + const int radius = (cornerSize ? 25 : 0); + + painter->drawRoundedRect( + QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top), + radius, radius, Qt::RelativeSize); +} + +void SurfaceImpl::GradientRectangle(PRectangle rc, + const std::vector &stops, GradientOptions options) +{ + Q_ASSERT(painter); + + QLinearGradient gradient; + + switch (options) + { + case GradientOptions::leftToRight: + gradient = QLinearGradient(rc.left, rc.top, rc.right, rc.top); + break; + + case GradientOptions::topToBottom: + default: + gradient = QLinearGradient(rc.left, rc.top, rc.left, rc.bottom); + } + + gradient.setSpread(QGradient::RepeatSpread); + + for (const ColourStop &stop : stops) + gradient.setColorAt(stop.position, + convertQColor(stop.colour, stop.colour.GetAlpha())); + + painter->fillRect( + QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top), + QBrush(gradient)); +} + +void SurfaceImpl::drawRect(const PRectangle &rc) +{ + painter->drawRect( + QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); +} + +void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, + ColourDesired back) +{ + Q_ASSERT(painter); + + painter->setPen(convertQColor(fore)); + painter->setBrush(convertQColor(back)); + painter->drawEllipse( + QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); +} + +void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) +{ + Q_ASSERT(painter); + + SurfaceImpl &si = static_cast(surfaceSource); + + if (si.pd) + { + QPixmap *pm = static_cast(si.pd); + qreal x = from.x; + qreal y = from.y; + qreal width = rc.right - rc.left; + qreal height = rc.bottom - rc.top; + + qreal dpr = pm->devicePixelRatio(); + + x *= dpr; + y *= dpr; + width *= dpr; + height *= dpr; + + painter->drawPixmap(QPointF(rc.left, rc.top), *pm, + QRectF(x, y, width, height)); + } +} + +void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, + const char *s, int len, ColourDesired fore, ColourDesired back) +{ + Q_ASSERT(painter); + + FillRectangle(rc, back); + drawText(rc, font_, ybase, s, len, fore); +} + +void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, + const char *s, int len, ColourDesired fore, ColourDesired back) +{ + Q_ASSERT(painter); + + SetClip(rc); + DrawTextNoClip(rc, font_, ybase, s, len, fore, back); + painter->setClipping(false); +} + +void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, + XYPOSITION ybase, const char *s, int len, ColourDesired fore) +{ + // Only draw if there is a non-space. + for (int i = 0; i < len; ++i) + if (s[i] != ' ') + { + drawText(rc, font_, ybase, s, len, fore); + return; + } +} + +void SurfaceImpl::drawText(const PRectangle &rc, Font &font_, XYPOSITION ybase, + const char *s, int len, ColourDesired fore) +{ + QString qs = convertText(s, len); + + QFont *f = PFont(font_.GetID()); + + if (f) + painter->setFont(*f); + + painter->setPen(convertQColor(fore)); + painter->drawText(QPointF(rc.left, ybase), qs); +} + +void SurfaceImpl::DrawXPM(PRectangle rc, const XPM *xpm) +{ + Q_ASSERT(painter); + + XYPOSITION x, y; + const QPixmap &qpm = xpm->Pixmap(); + + x = rc.left + (rc.Width() - qpm.width()) / 2.0; + y = rc.top + (rc.Height() - qpm.height()) / 2.0; + + painter->drawPixmap(QPointF(x, y), qpm); +} + +void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, + const unsigned char *pixelsImage) +{ + Q_UNUSED(width); + Q_UNUSED(height); + Q_ASSERT(painter); + + const QImage *qim = reinterpret_cast(pixelsImage); + + painter->drawImage(QPointF(rc.left, rc.top), *qim); +} + +void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, + XYPOSITION *positions) +{ + QString qs = convertText(s, len); + QTextLayout text_layout(qs, convertQFont(font_), pd); + + text_layout.beginLayout(); + QTextLine text_line = text_layout.createLine(); + text_layout.endLayout(); + + if (unicodeMode) + { + int i_char = 0, i_byte = 0;; + + while (i_char < qs.size()) + { + unsigned char byte = s[i_byte]; + int nbytes, code_units; + + // Work out character sizes by looking at the byte stream. + if (byte >= 0xf0) + { + nbytes = 4; + code_units = 2; + } + else + { + if (byte >= 0xe0) + nbytes = 3; + else if (byte >= 0x80) + nbytes = 2; + else + nbytes = 1; + + code_units = 1; + } + + XYPOSITION position = text_line.cursorToX(i_char + code_units); + + // Set the same position for each byte of the character. + for (int i = 0; i < nbytes && i_byte < len; ++i) + positions[i_byte++] = position; + + i_char += code_units; + } + + // This shouldn't be necessary... + XYPOSITION last_position = ((i_byte > 0) ? positions[i_byte - 1] : 0); + + while (i_byte < len) + positions[i_byte++] = last_position; + } + else + { + for (int i = 0; i < len; ++i) + positions[i] = text_line.cursorToX(i + 1); + } +} + +XYPOSITION SurfaceImpl::WidthText(Font &font_, const char *s, int len) +{ + return metrics(font_).horizontalAdvance(convertText(s, len)); + +} + +XYPOSITION SurfaceImpl::Ascent(Font &font_) +{ + return metrics(font_).ascent(); +} + +XYPOSITION SurfaceImpl::Descent(Font &font_) +{ + // Qt doesn't include the baseline in the descent, so add it. Note that + // a descent from Qt4 always seems to be 2 pixels larger (irrespective of + // font or size) than the same descent from Qt3. This means that text is a + // little more spaced out with Qt4 - and will be more noticeable with + // smaller fonts. + return metrics(font_).descent() + 1; +} + +XYPOSITION SurfaceImpl::Height(Font &font_) +{ + return metrics(font_).height(); +} + +XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) +{ + return metrics(font_).averageCharWidth(); +} + +void SurfaceImpl::SetClip(PRectangle rc) +{ + Q_ASSERT(painter); + + painter->setClipRect( + QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); +} + +void SurfaceImpl::FlushCachedState() +{ +} + +// Return the QFont for a Font. +QFont SurfaceImpl::convertQFont(Font &font) +{ + QFont *f = PFont(font.GetID()); + + if (f) + return *f; + + return QApplication::font(); +} + +// Get the metrics for a font. +QFontMetricsF SurfaceImpl::metrics(Font &font_) +{ + QFont fnt = convertQFont(font_); + + return QFontMetricsF(fnt, pd); +} + +// Convert a Scintilla string to a Qt Unicode string. +QString SurfaceImpl::convertText(const char *s, int len) +{ + if (unicodeMode) + return QString::fromUtf8(s, len); + + return QString::fromLatin1(s, len); +} + + +// Convert a Scintilla colour, and alpha component, to a Qt QColor. +QColor SurfaceImpl::convertQColor(const ColourDesired &col, unsigned alpha) +{ + int c = col.AsInteger(); + + unsigned r = c & 0xff; + unsigned g = (c >> 8) & 0xff; + unsigned b = (c >> 16) & 0xff; + + return QColor(r, g, b, alpha); +} + + +// Window (widget) management. +Window::~Window() +{ +} + +void Window::Destroy() +{ + QWidget *w = PWindow(wid); + + if (w) + { + // Delete the widget next time round the event loop rather than + // straight away. This gets round a problem when auto-completion lists + // are cancelled after an entry has been double-clicked, ie. the list's + // dtor is called from one of the list's slots. There are other ways + // around the problem but this is the simplest and doesn't seem to + // cause problems of its own. + w->deleteLater(); + wid = 0; + } +} + +PRectangle Window::GetPosition() const +{ + QWidget *w = PWindow(wid); + + // Before any size allocated pretend its big enough not to be scrolled. + PRectangle rc(0,0,5000,5000); + + if (w) + { + const QRect &r = w->geometry(); + + rc.right = r.right() - r.left() + 1; + rc.bottom = r.bottom() - r.top() + 1; + } + + return rc; +} + +void Window::SetPosition(PRectangle rc) +{ + PWindow(wid)->setGeometry(rc.left, rc.top, rc.right - rc.left, + rc.bottom - rc.top); +} + +void Window::SetPositionRelative(PRectangle rc, const Window *relativeTo) +{ + QWidget *rel = PWindow(relativeTo->wid); + QPoint pos = rel->mapToGlobal(rel->pos()); + + int x = pos.x() + rc.left; + int y = pos.y() + rc.top; + + PWindow(wid)->setGeometry(x, y, rc.right - rc.left, rc.bottom - rc.top); +} + +PRectangle Window::GetClientPosition() const +{ + return GetPosition(); +} + +void Window::Show(bool show) +{ + QWidget *w = PWindow(wid); + + if (show) + w->show(); + else + w->hide(); +} + +void Window::InvalidateAll() +{ + QWidget *w = PWindow(wid); + + if (w) + w->update(); +} + +void Window::InvalidateRectangle(PRectangle rc) +{ + QWidget *w = PWindow(wid); + + if (w) + w->update(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); +} + +void Window::SetFont(Font &font) +{ + PWindow(wid)->setFont(*PFont(font.GetID())); +} + +void Window::SetCursor(Cursor curs) +{ + Qt::CursorShape qc; + + switch (curs) + { + case cursorText: + qc = Qt::IBeamCursor; + break; + + case cursorUp: + qc = Qt::UpArrowCursor; + break; + + case cursorWait: + qc = Qt::WaitCursor; + break; + + case cursorHoriz: + qc = Qt::SizeHorCursor; + break; + + case cursorVert: + qc = Qt::SizeVerCursor; + break; + + case cursorHand: + qc = Qt::PointingHandCursor; + break; + + default: + // Note that Qt doesn't have a standard cursor that could be used to + // implement cursorReverseArrow. + qc = Qt::ArrowCursor; + } + + PWindow(wid)->setCursor(qc); +} + +PRectangle Window::GetMonitorRect(Point pt) +{ + QPoint qpt = PWindow(wid)->mapToGlobal(QPoint(pt.x, pt.y)); + QRect qr = QApplication::screenAt(qpt)->availableGeometry(); + qpt = PWindow(wid)->mapFromGlobal(qr.topLeft()); + + return PRectangle(qpt.x(), qpt.y(), qpt.x() + qr.width(), qpt.y() + qr.height()); +} + + +// Menu management. +Menu::Menu() noexcept : mid(0) +{ +} + +void Menu::CreatePopUp() +{ + Destroy(); + mid = new QsciSciPopup(); +} + +void Menu::Destroy() +{ + QsciSciPopup *m = PMenu(mid); + + if (m) + { + delete m; + mid = 0; + } +} + +void Menu::Show(Point pt, Window &) +{ + PMenu(mid)->popup(QPoint(pt.x, pt.y)); +} + + +class DynamicLibraryImpl : public DynamicLibrary +{ +public: + DynamicLibraryImpl(const char *modulePath) + { +#if !defined(Q_OS_WASM) + m = new QLibrary(modulePath); + m->load(); +#endif + } + + virtual ~DynamicLibraryImpl() + { +#if !defined(Q_OS_WASM) + if (m) + delete m; +#endif + } + + virtual Function FindFunction(const char *name) + { +#if !defined(Q_OS_WASM) + if (m) + return (Function)m->resolve(name); +#endif + + return 0; + } + + virtual bool IsValid() + { +#if !defined(Q_OS_WASM) + return m && m->isLoaded(); +#else + return false; +#endif + } + +private: +#if !defined(Q_OS_WASM) + QLibrary* m; +#endif +}; + +DynamicLibrary *DynamicLibrary::Load(const char *modulePath) +{ + return new DynamicLibraryImpl(modulePath); +} + + +// Manage system wide parameters. +ColourDesired Platform::Chrome() +{ + return ColourDesired(0xe0,0xe0,0xe0); +} + +ColourDesired Platform::ChromeHighlight() +{ + return ColourDesired(0xff,0xff,0xff); +} + +const char *Platform::DefaultFont() +{ + static QByteArray def_font; + + def_font = QApplication::font().family().toLatin1(); + + return def_font.constData(); +} + +int Platform::DefaultFontSize() +{ + return QApplication::font().pointSize(); +} + +unsigned int Platform::DoubleClickTime() +{ + return QApplication::doubleClickInterval(); +} + +void Platform::DebugDisplay(const char *s) +{ + qDebug("%s", s); +} + +//#define TRACE + +#ifdef TRACE +void Platform::DebugPrintf(const char *format, ...) +{ + char buffer[2000]; + va_list pArguments; + + va_start(pArguments, format); + vsprintf(buffer, format, pArguments); + va_end(pArguments); + + DebugDisplay(buffer); +} +#else +void Platform::DebugPrintf(const char *, ...) +{ +} +#endif + +static bool assertionPopUps = true; + +bool Platform::ShowAssertionPopUps(bool assertionPopUps_) +{ + bool ret = assertionPopUps; + + assertionPopUps = assertionPopUps_; + + return ret; +} + +void Platform::Assert(const char *c, const char *file, int line) +{ + qFatal("Assertion [%s] failed at %s %d\n", c, file, line); +} + +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciabstractapis.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciabstractapis.h new file mode 100644 index 000000000..76e2a341c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciabstractapis.h @@ -0,0 +1,90 @@ +// This module defines interface to the QsciAbstractAPIs class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIABSTRACTAPIS_H +#define QSCIABSTRACTAPIS_H + +#include +#include +#include + +#include +#include + + +class QsciLexer; + + +//! \brief The QsciAbstractAPIs class represents the interface to the textual +//! API information used in call tips and for auto-completion. A sub-class +//! will provide the actual implementation of the interface. +//! +//! API information is specific to a particular language lexer but can be +//! shared by multiple instances of the lexer. +class QSCINTILLA_EXPORT QsciAbstractAPIs : public QObject +{ + Q_OBJECT + +public: + //! Constructs a QsciAbstractAPIs instance attached to lexer \a lexer. \a + //! lexer becomes the instance's parent object although the instance can + //! also be subsequently attached to other lexers. + QsciAbstractAPIs(QsciLexer *lexer); + + //! Destroy the QsciAbstractAPIs instance. + virtual ~QsciAbstractAPIs(); + + //! Return the lexer that the instance is attached to. + QsciLexer *lexer() const; + + //! Update the list \a list with API entries derived from \a context. \a + //! context is the list of words in the text preceding the cursor position. + //! The characters that make up a word and the characters that separate + //! words are defined by the lexer. The last word is a partial word and + //! may be empty if the user has just entered a word separator. + virtual void updateAutoCompletionList(const QStringList &context, + QStringList &list) = 0; + + //! This is called when the user selects the entry \a selection from the + //! auto-completion list. A sub-class can use this as a hint to provide + //! more specific API entries in future calls to + //! updateAutoCompletionList(). The default implementation does nothing. + virtual void autoCompletionSelected(const QString &selection); + + //! Return the call tips valid for the context \a context. (Note that the + //! last word of the context will always be empty.) \a commas is the number + //! of commas the user has typed after the context and before the cursor + //! position. The exact position of the list of call tips can be adjusted + //! by specifying a corresponding left character shift in \a shifts. This + //! is normally done to correct for any displayed context according to \a + //! style. + //! + //! \sa updateAutoCompletionList() + virtual QStringList callTips(const QStringList &context, int commas, + QsciScintilla::CallTipsStyle style, QList &shifts) = 0; + +private: + QsciLexer *lex; + + QsciAbstractAPIs(const QsciAbstractAPIs &); + QsciAbstractAPIs &operator=(const QsciAbstractAPIs &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciapis.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciapis.h new file mode 100644 index 000000000..bc1eb68b2 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciapis.h @@ -0,0 +1,213 @@ +// This module defines interface to the QsciAPIs class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIAPIS_H +#define QSCIAPIS_H + +#include +#include +#include +#include + +#include +#include +#include + + +class QsciAPIsPrepared; +class QsciAPIsWorker; +class QsciLexer; + + +//! \brief The QsciAPIs class provies an implementation of the textual API +//! information used in call tips and for auto-completion. +//! +//! Raw API information is read from one or more files. Each API function is +//! described by a single line of text comprising the function's name, followed +//! by the function's optional comma separated parameters enclosed in +//! parenthesis, and finally followed by optional explanatory text. +//! +//! A function name may be followed by a `?' and a number. The number is used +//! by auto-completion to display a registered QPixmap with the function name. +//! +//! All function names are used by auto-completion, but only those that include +//! function parameters are used in call tips. +//! +//! QScintilla only deals with prepared API information and not the raw +//! information described above. This is done so that large APIs can be +//! handled while still being responsive to user input. The conversion of raw +//! information to prepared information is time consuming (think tens of +//! seconds) and implemented in a separate thread. Prepared information can +//! be quickly saved to and loaded from files. Such files are portable between +//! different architectures. +//! +//! QScintilla based applications that want to support large APIs would +//! normally provide the user with the ability to specify a set of, possibly +//! project specific, raw API files and convert them to prepared files that are +//! loaded quickly when the application is invoked. +class QSCINTILLA_EXPORT QsciAPIs : public QsciAbstractAPIs +{ + Q_OBJECT + +public: + //! Constructs a QsciAPIs instance attached to lexer \a lexer. \a lexer + //! becomes the instance's parent object although the instance can also be + //! subsequently attached to other lexers. + QsciAPIs(QsciLexer *lexer); + + //! Destroy the QsciAPIs instance. + virtual ~QsciAPIs(); + + //! Add the single raw API entry \a entry to the current set. + //! + //! \sa clear(), load(), remove() + void add(const QString &entry); + + //! Deletes all raw API information. + //! + //! \sa add(), load(), remove() + void clear(); + + //! Load the API information from the file named \a filename, adding it to + //! the current set. Returns true if successful, otherwise false. + bool load(const QString &filename); + + //! Remove the single raw API entry \a entry from the current set. + //! + //! \sa add(), clear(), load() + void remove(const QString &entry); + + //! Convert the current raw API information to prepared API information. + //! This is implemented by a separate thread. + //! + //! \sa cancelPreparation() + void prepare(); + + //! Cancel the conversion of the current raw API information to prepared + //! API information. + //! + //! \sa prepare() + void cancelPreparation(); + + //! Return the default name of the prepared API information file. It is + //! based on the name of the associated lexer and in the directory defined + //! by the QSCIDIR environment variable. If the environment variable isn't + //! set then $HOME/.qsci is used. + QString defaultPreparedName() const; + + //! Check to see is a prepared API information file named \a filename + //! exists. If \a filename is empty then the value returned by + //! defaultPreparedName() is used. Returns true if successful, otherwise + //! false. + //! + //! \sa defaultPreparedName() + bool isPrepared(const QString &filename = QString()) const; + + //! Load the prepared API information from the file named \a filename. If + //! \a filename is empty then a name is constructed based on the name of + //! the associated lexer and saved in the directory defined by the QSCIDIR + //! environment variable. If the environment variable isn't set then + //! $HOME/.qsci is used. Returns true if successful, otherwise false. + bool loadPrepared(const QString &filename = QString()); + + //! Save the prepared API information to the file named \a filename. If + //! \a filename is empty then a name is constructed based on the name of + //! the associated lexer and saved in the directory defined by the QSCIDIR + //! environment variable. If the environment variable isn't set then + //! $HOME/.qsci is used. Returns true if successful, otherwise false. + bool savePrepared(const QString &filename = QString()) const; + + //! \reimp + virtual void updateAutoCompletionList(const QStringList &context, + QStringList &list); + + //! \reimp + virtual void autoCompletionSelected(const QString &sel); + + //! \reimp + virtual QStringList callTips(const QStringList &context, int commas, + QsciScintilla::CallTipsStyle style, QList &shifts); + + //! \internal Reimplemented to receive termination events from the worker + //! thread. + virtual bool event(QEvent *e); + + //! Return a list of the installed raw API file names for the associated + //! lexer. + QStringList installedAPIFiles() const; + +signals: + //! This signal is emitted when the conversion of raw API information to + //! prepared API information has been cancelled. + //! + //! \sa apiPreparationFinished(), apiPreparationStarted() + void apiPreparationCancelled(); + + //! This signal is emitted when the conversion of raw API information to + //! prepared API information starts and can be used to give some visual + //! feedback to the user. + //! + //! \sa apiPreparationCancelled(), apiPreparationFinished() + void apiPreparationStarted(); + + //! This signal is emitted when the conversion of raw API information to + //! prepared API information has finished. + //! + //! \sa apiPreparationCancelled(), apiPreparationStarted() + void apiPreparationFinished(); + +private: + friend class QsciAPIsPrepared; + friend class QsciAPIsWorker; + + // This indexes a word in a set of raw APIs. The first part indexes the + // entry in the set, the second part indexes the word within the entry. + typedef QPair WordIndex; + + // This is a list of word indexes. + typedef QList WordIndexList; + + QsciAPIsWorker *worker; + QStringList old_context; + QStringList::const_iterator origin; + int origin_len; + QString unambiguous_context; + QStringList apis; + QsciAPIsPrepared *prep; + + static bool enoughCommas(const QString &s, int commas); + + QStringList positionOrigin(const QStringList &context, QString &path); + bool originStartsWith(const QString &path, const QString &wsep); + const WordIndexList *wordIndexOf(const QString &word) const; + void lastCompleteWord(const QString &word, QStringList &with_context, + bool &unambig); + void lastPartialWord(const QString &word, QStringList &with_context, + bool &unambig); + void addAPIEntries(const WordIndexList &wl, bool complete, + QStringList &with_context, bool &unambig); + QString prepName(const QString &filename, bool mkpath = false) const; + void deleteWorker(); + + QsciAPIs(const QsciAPIs &); + QsciAPIs &operator=(const QsciAPIs &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommand.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommand.h new file mode 100644 index 000000000..563fb562e --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommand.h @@ -0,0 +1,408 @@ +// This defines the interface to the QsciCommand class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCICOMMAND_H +#define QSCICOMMAND_H + +#include + +#include +#include + + +class QsciScintilla; + + +//! \brief The QsciCommand class represents an internal editor command that may +//! have one or two keys bound to it. +//! +//! Methods are provided to change the keys bound to the command and to remove +//! a key binding. Each command has a user friendly description of the command +//! for use in key mapping dialogs. +class QSCINTILLA_EXPORT QsciCommand +{ +public: + //! This enum defines the different commands that can be assigned to a key. + enum Command { + //! Move down one line. + LineDown = QsciScintillaBase::SCI_LINEDOWN, + + //! Extend the selection down one line. + LineDownExtend = QsciScintillaBase::SCI_LINEDOWNEXTEND, + + //! Extend the rectangular selection down one line. + LineDownRectExtend = QsciScintillaBase::SCI_LINEDOWNRECTEXTEND, + + //! Scroll the view down one line. + LineScrollDown = QsciScintillaBase::SCI_LINESCROLLDOWN, + + //! Move up one line. + LineUp = QsciScintillaBase::SCI_LINEUP, + + //! Extend the selection up one line. + LineUpExtend = QsciScintillaBase::SCI_LINEUPEXTEND, + + //! Extend the rectangular selection up one line. + LineUpRectExtend = QsciScintillaBase::SCI_LINEUPRECTEXTEND, + + //! Scroll the view up one line. + LineScrollUp = QsciScintillaBase::SCI_LINESCROLLUP, + + //! Scroll to the start of the document. + ScrollToStart = QsciScintillaBase::SCI_SCROLLTOSTART, + + //! Scroll to the end of the document. + ScrollToEnd = QsciScintillaBase::SCI_SCROLLTOEND, + + //! Scroll vertically to centre the current line. + VerticalCentreCaret = QsciScintillaBase::SCI_VERTICALCENTRECARET, + + //! Move down one paragraph. + ParaDown = QsciScintillaBase::SCI_PARADOWN, + + //! Extend the selection down one paragraph. + ParaDownExtend = QsciScintillaBase::SCI_PARADOWNEXTEND, + + //! Move up one paragraph. + ParaUp = QsciScintillaBase::SCI_PARAUP, + + //! Extend the selection up one paragraph. + ParaUpExtend = QsciScintillaBase::SCI_PARAUPEXTEND, + + //! Move left one character. + CharLeft = QsciScintillaBase::SCI_CHARLEFT, + + //! Extend the selection left one character. + CharLeftExtend = QsciScintillaBase::SCI_CHARLEFTEXTEND, + + //! Extend the rectangular selection left one character. + CharLeftRectExtend = QsciScintillaBase::SCI_CHARLEFTRECTEXTEND, + + //! Move right one character. + CharRight = QsciScintillaBase::SCI_CHARRIGHT, + + //! Extend the selection right one character. + CharRightExtend = QsciScintillaBase::SCI_CHARRIGHTEXTEND, + + //! Extend the rectangular selection right one character. + CharRightRectExtend = QsciScintillaBase::SCI_CHARRIGHTRECTEXTEND, + + //! Move left one word. + WordLeft = QsciScintillaBase::SCI_WORDLEFT, + + //! Extend the selection left one word. + WordLeftExtend = QsciScintillaBase::SCI_WORDLEFTEXTEND, + + //! Move right one word. + WordRight = QsciScintillaBase::SCI_WORDRIGHT, + + //! Extend the selection right one word. + WordRightExtend = QsciScintillaBase::SCI_WORDRIGHTEXTEND, + + //! Move to the end of the previous word. + WordLeftEnd = QsciScintillaBase::SCI_WORDLEFTEND, + + //! Extend the selection to the end of the previous word. + WordLeftEndExtend = QsciScintillaBase::SCI_WORDLEFTENDEXTEND, + + //! Move to the end of the next word. + WordRightEnd = QsciScintillaBase::SCI_WORDRIGHTEND, + + //! Extend the selection to the end of the next word. + WordRightEndExtend = QsciScintillaBase::SCI_WORDRIGHTENDEXTEND, + + //! Move left one word part. + WordPartLeft = QsciScintillaBase::SCI_WORDPARTLEFT, + + //! Extend the selection left one word part. + WordPartLeftExtend = QsciScintillaBase::SCI_WORDPARTLEFTEXTEND, + + //! Move right one word part. + WordPartRight = QsciScintillaBase::SCI_WORDPARTRIGHT, + + //! Extend the selection right one word part. + WordPartRightExtend = QsciScintillaBase::SCI_WORDPARTRIGHTEXTEND, + + //! Move to the start of the document line. + Home = QsciScintillaBase::SCI_HOME, + + //! Extend the selection to the start of the document line. + HomeExtend = QsciScintillaBase::SCI_HOMEEXTEND, + + //! Extend the rectangular selection to the start of the document line. + HomeRectExtend = QsciScintillaBase::SCI_HOMERECTEXTEND, + + //! Move to the start of the displayed line. + HomeDisplay = QsciScintillaBase::SCI_HOMEDISPLAY, + + //! Extend the selection to the start of the displayed line. + HomeDisplayExtend = QsciScintillaBase::SCI_HOMEDISPLAYEXTEND, + + //! Move to the start of the displayed or document line. + HomeWrap = QsciScintillaBase::SCI_HOMEWRAP, + + //! Extend the selection to the start of the displayed or document + //! line. + HomeWrapExtend = QsciScintillaBase::SCI_HOMEWRAPEXTEND, + + //! Move to the first visible character in the document line. + VCHome = QsciScintillaBase::SCI_VCHOME, + + //! Extend the selection to the first visible character in the document + //! line. + VCHomeExtend = QsciScintillaBase::SCI_VCHOMEEXTEND, + + //! Extend the rectangular selection to the first visible character in + //! the document line. + VCHomeRectExtend = QsciScintillaBase::SCI_VCHOMERECTEXTEND, + + //! Move to the first visible character of the displayed or document + //! line. + VCHomeWrap = QsciScintillaBase::SCI_VCHOMEWRAP, + + //! Extend the selection to the first visible character of the + //! displayed or document line. + VCHomeWrapExtend = QsciScintillaBase::SCI_VCHOMEWRAPEXTEND, + + //! Move to the end of the document line. + LineEnd = QsciScintillaBase::SCI_LINEEND, + + //! Extend the selection to the end of the document line. + LineEndExtend = QsciScintillaBase::SCI_LINEENDEXTEND, + + //! Extend the rectangular selection to the end of the document line. + LineEndRectExtend = QsciScintillaBase::SCI_LINEENDRECTEXTEND, + + //! Move to the end of the displayed line. + LineEndDisplay = QsciScintillaBase::SCI_LINEENDDISPLAY, + + //! Extend the selection to the end of the displayed line. + LineEndDisplayExtend = QsciScintillaBase::SCI_LINEENDDISPLAYEXTEND, + + //! Move to the end of the displayed or document line. + LineEndWrap = QsciScintillaBase::SCI_LINEENDWRAP, + + //! Extend the selection to the end of the displayed or document line. + LineEndWrapExtend = QsciScintillaBase::SCI_LINEENDWRAPEXTEND, + + //! Move to the start of the document. + DocumentStart = QsciScintillaBase::SCI_DOCUMENTSTART, + + //! Extend the selection to the start of the document. + DocumentStartExtend = QsciScintillaBase::SCI_DOCUMENTSTARTEXTEND, + + //! Move to the end of the document. + DocumentEnd = QsciScintillaBase::SCI_DOCUMENTEND, + + //! Extend the selection to the end of the document. + DocumentEndExtend = QsciScintillaBase::SCI_DOCUMENTENDEXTEND, + + //! Move up one page. + PageUp = QsciScintillaBase::SCI_PAGEUP, + + //! Extend the selection up one page. + PageUpExtend = QsciScintillaBase::SCI_PAGEUPEXTEND, + + //! Extend the rectangular selection up one page. + PageUpRectExtend = QsciScintillaBase::SCI_PAGEUPRECTEXTEND, + + //! Move down one page. + PageDown = QsciScintillaBase::SCI_PAGEDOWN, + + //! Extend the selection down one page. + PageDownExtend = QsciScintillaBase::SCI_PAGEDOWNEXTEND, + + //! Extend the rectangular selection down one page. + PageDownRectExtend = QsciScintillaBase::SCI_PAGEDOWNRECTEXTEND, + + //! Stuttered move up one page. + StutteredPageUp = QsciScintillaBase::SCI_STUTTEREDPAGEUP, + + //! Stuttered extend the selection up one page. + StutteredPageUpExtend = QsciScintillaBase::SCI_STUTTEREDPAGEUPEXTEND, + + //! Stuttered move down one page. + StutteredPageDown = QsciScintillaBase::SCI_STUTTEREDPAGEDOWN, + + //! Stuttered extend the selection down one page. + StutteredPageDownExtend = QsciScintillaBase::SCI_STUTTEREDPAGEDOWNEXTEND, + + //! Delete the current character. + Delete = QsciScintillaBase::SCI_CLEAR, + + //! Delete the previous character. + DeleteBack = QsciScintillaBase::SCI_DELETEBACK, + + //! Delete the previous character if not at start of line. + DeleteBackNotLine = QsciScintillaBase::SCI_DELETEBACKNOTLINE, + + //! Delete the word to the left. + DeleteWordLeft = QsciScintillaBase::SCI_DELWORDLEFT, + + //! Delete the word to the right. + DeleteWordRight = QsciScintillaBase::SCI_DELWORDRIGHT, + + //! Delete right to the end of the next word. + DeleteWordRightEnd = QsciScintillaBase::SCI_DELWORDRIGHTEND, + + //! Delete the line to the left. + DeleteLineLeft = QsciScintillaBase::SCI_DELLINELEFT, + + //! Delete the line to the right. + DeleteLineRight = QsciScintillaBase::SCI_DELLINERIGHT, + + //! Delete the current line. + LineDelete = QsciScintillaBase::SCI_LINEDELETE, + + //! Cut the current line to the clipboard. + LineCut = QsciScintillaBase::SCI_LINECUT, + + //! Copy the current line to the clipboard. + LineCopy = QsciScintillaBase::SCI_LINECOPY, + + //! Transpose the current and previous lines. + LineTranspose = QsciScintillaBase::SCI_LINETRANSPOSE, + + //! Duplicate the current line. + LineDuplicate = QsciScintillaBase::SCI_LINEDUPLICATE, + + //! Select the whole document. + SelectAll = QsciScintillaBase::SCI_SELECTALL, + + //! Move the selected lines up one line. + MoveSelectedLinesUp = QsciScintillaBase::SCI_MOVESELECTEDLINESUP, + + //! Move the selected lines down one line. + MoveSelectedLinesDown = QsciScintillaBase::SCI_MOVESELECTEDLINESDOWN, + + //! Duplicate the selection. + SelectionDuplicate = QsciScintillaBase::SCI_SELECTIONDUPLICATE, + + //! Convert the selection to lower case. + SelectionLowerCase = QsciScintillaBase::SCI_LOWERCASE, + + //! Convert the selection to upper case. + SelectionUpperCase = QsciScintillaBase::SCI_UPPERCASE, + + //! Cut the selection to the clipboard. + SelectionCut = QsciScintillaBase::SCI_CUT, + + //! Copy the selection to the clipboard. + SelectionCopy = QsciScintillaBase::SCI_COPY, + + //! Paste from the clipboard. + Paste = QsciScintillaBase::SCI_PASTE, + + //! Toggle insert/overtype. + EditToggleOvertype = QsciScintillaBase::SCI_EDITTOGGLEOVERTYPE, + + //! Insert a platform dependent newline. + Newline = QsciScintillaBase::SCI_NEWLINE, + + //! Insert a formfeed. + Formfeed = QsciScintillaBase::SCI_FORMFEED, + + //! Indent one level. + Tab = QsciScintillaBase::SCI_TAB, + + //! De-indent one level. + Backtab = QsciScintillaBase::SCI_BACKTAB, + + //! Cancel any current operation. + Cancel = QsciScintillaBase::SCI_CANCEL, + + //! Undo the last command. + Undo = QsciScintillaBase::SCI_UNDO, + + //! Redo the last command. + Redo = QsciScintillaBase::SCI_REDO, + + //! Zoom in. + ZoomIn = QsciScintillaBase::SCI_ZOOMIN, + + //! Zoom out. + ZoomOut = QsciScintillaBase::SCI_ZOOMOUT, + + //! Reverse the selected lines. + ReverseLines = QsciScintillaBase::SCI_LINEREVERSE, + }; + + //! Return the command that will be executed by this instance. + Command command() const {return scicmd;} + + //! Execute the command. + void execute(); + + //! Binds the key \a key to the command. If \a key is 0 then the key + //! binding is removed. If \a key is invalid then the key binding is + //! unchanged. Valid keys are any visible or control character or any + //! of \c Qt::Key_Down, \c Qt::Key_Up, \c Qt::Key_Left, \c Qt::Key_Right, + //! \c Qt::Key_Home, \c Qt::Key_End, \c Qt::Key_PageUp, + //! \c Qt::Key_PageDown, \c Qt::Key_Delete, \c Qt::Key_Insert, + //! \c Qt::Key_Escape, \c Qt::Key_Backspace, \c Qt::Key_Tab, + //! \c Qt::Key_Backtab, \c Qt::Key_Return, \c Qt::Key_Enter, + //! \c Qt::Key_Super_L, \c Qt::Key_Super_R or \c Qt::Key_Menu. Keys may be + //! modified with any combination of \c Qt::ShiftModifier, + //! \c Qt::ControlModifier, \c Qt::AltModifier and \c Qt::MetaModifier. + //! + //! \sa key(), setAlternateKey(), validKey() + void setKey(int key); + + //! Binds the alternate key \a altkey to the command. If \a key is 0 + //! then the alternate key binding is removed. + //! + //! \sa alternateKey(), setKey(), validKey() + void setAlternateKey(int altkey); + + //! The key that is currently bound to the command is returned. + //! + //! \sa setKey(), alternateKey() + int key() const {return qkey;} + + //! The alternate key that is currently bound to the command is + //! returned. + //! + //! \sa setAlternateKey(), key() + int alternateKey() const {return qaltkey;} + + //! If the key \a key is valid then true is returned. + static bool validKey(int key); + + //! The user friendly description of the command is returned. + QString description() const; + +private: + friend class QsciCommandSet; + + QsciCommand(QsciScintilla *qs, Command cmd, int key, int altkey, + const char *desc); + + void bindKey(int key,int &qk,int &scik); + + QsciScintilla *qsCmd; + Command scicmd; + int qkey, scikey, qaltkey, scialtkey; + const char *descCmd; + + QsciCommand(const QsciCommand &); + QsciCommand &operator=(const QsciCommand &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommandset.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommandset.h new file mode 100644 index 000000000..85bb2bc36 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscicommandset.h @@ -0,0 +1,89 @@ +// This defines the interface to the QsciCommandSet class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCICOMMANDSET_H +#define QSCICOMMANDSET_H + +#include + +#include + +#include +#include + + +QT_BEGIN_NAMESPACE +class QSettings; +QT_END_NAMESPACE + +class QsciScintilla; + + +//! \brief The QsciCommandSet class represents the set of all internal editor +//! commands that may have keys bound. +//! +//! Methods are provided to access the individual commands and to read and +//! write the current bindings from and to settings files. +class QSCINTILLA_EXPORT QsciCommandSet +{ +public: + //! The key bindings for each command in the set are read from the + //! settings \a qs. \a prefix is prepended to the key of each entry. + //! true is returned if there was no error. + //! + //! \sa writeSettings() + bool readSettings(QSettings &qs, const char *prefix = "/Scintilla"); + + //! The key bindings for each command in the set are written to the + //! settings \a qs. \a prefix is prepended to the key of each entry. + //! true is returned if there was no error. + //! + //! \sa readSettings() + bool writeSettings(QSettings &qs, const char *prefix = "/Scintilla"); + + //! The commands in the set are returned as a list. + QList &commands() {return cmds;} + + //! The primary keys bindings for all commands are removed. + void clearKeys(); + + //! The alternate keys bindings for all commands are removed. + void clearAlternateKeys(); + + // Find the command that is bound to \a key. + QsciCommand *boundTo(int key) const; + + // Find a specific command \a command. + QsciCommand *find(QsciCommand::Command command) const; + +private: + friend class QsciScintilla; + + QsciCommandSet(QsciScintilla *qs); + ~QsciCommandSet(); + + QsciScintilla *qsci; + QList cmds; + + QsciCommandSet(const QsciCommandSet &); + QsciCommandSet &operator=(const QsciCommandSet &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscidocument.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscidocument.h new file mode 100644 index 000000000..965ebb018 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscidocument.h @@ -0,0 +1,61 @@ +// This defines the interface to the QsciDocument class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIDOCUMENT_H +#define QSCIDOCUMENT_H + +#include + + +class QsciScintillaBase; +class QsciDocumentP; + + +//! \brief The QsciDocument class represents a document to be edited. +//! +//! It is an opaque class that can be attached to multiple instances of +//! QsciScintilla to create different simultaneous views of the same document. +//! QsciDocument uses implicit sharing so that copying class instances is a +//! cheap operation. +class QSCINTILLA_EXPORT QsciDocument +{ +public: + //! Create a new unattached document. + QsciDocument(); + virtual ~QsciDocument(); + + QsciDocument(const QsciDocument &); + QsciDocument &operator=(const QsciDocument &); + +private: + friend class QsciScintilla; + + void attach(const QsciDocument &that); + void detach(); + void display(QsciScintillaBase *qsb, const QsciDocument *from); + void undisplay(QsciScintillaBase *qsb); + + bool isModified() const; + void setModified(bool m); + + QsciDocumentP *pdoc; +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciglobal.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciglobal.h new file mode 100644 index 000000000..215088106 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciglobal.h @@ -0,0 +1,54 @@ +// This module defines various things common to all of the Scintilla Qt port. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIGLOBAL_H +#define QSCIGLOBAL_H + +#include + + +#define QSCINTILLA_VERSION 0x020e01 +#define QSCINTILLA_VERSION_STR "2.14.1" + + +// We only support Qt v5.11 and later. +#if QT_VERSION < 0x050b00 +#error "Qt v5.11.0 or later is required" +#endif + + +// Define QSCINTILLA_MAKE_DLL to create a QScintilla shared library, or +// define QSCINTILLA_DLL to link against a QScintilla shared library, or define +// neither to either build or link against a static QScintilla library. +#if defined(QSCINTILLA_DLL) +#define QSCINTILLA_EXPORT Q_DECL_IMPORT +#elif defined(QSCINTILLA_MAKE_DLL) +#define QSCINTILLA_EXPORT Q_DECL_EXPORT +#else +#define QSCINTILLA_EXPORT +#endif + + +#if !defined(QT_BEGIN_NAMESPACE) +#define QT_BEGIN_NAMESPACE +#define QT_END_NAMESPACE +#endif + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexer.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexer.h new file mode 100644 index 000000000..fdb088a37 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexer.h @@ -0,0 +1,356 @@ +// This defines the interface to the QsciLexer class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXER_H +#define QSCILEXER_H + +#include +#include +#include +#include +#include + +#include + + +QT_BEGIN_NAMESPACE +class QSettings; +QT_END_NAMESPACE + +class QsciAbstractAPIs; +class QsciScintilla; + + +//! \brief The QsciLexer class is an abstract class used as a base for language +//! lexers. +//! +//! A lexer scans the text breaking it up into separate language objects, e.g. +//! keywords, strings, operators. The lexer then uses a different style to +//! draw each object. A style is identified by a style number and has a number +//! of attributes, including colour and font. A specific language lexer will +//! implement appropriate default styles which can be overriden by an +//! application by further sub-classing the specific language lexer. +//! +//! A lexer may provide one or more sets of words to be recognised as keywords. +//! Most lexers only provide one set, but some may support languages embedded +//! in other languages and provide several sets. +//! +//! QsciLexer provides convenience methods for saving and restoring user +//! preferences for fonts and colours. +//! +//! If you want to write a lexer for a new language then you can add it to the +//! underlying Scintilla code and implement a corresponding QsciLexer sub-class +//! to manage the different styles used. Alternatively you can implement a +//! sub-class of QsciLexerCustom. +class QSCINTILLA_EXPORT QsciLexer : public QObject +{ + Q_OBJECT + +public: + //! Construct a QsciLexer with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexer(QObject *parent = 0); + + //! Destroy the QSciLexer. + virtual ~QsciLexer(); + + //! Returns the name of the language. It must be re-implemented by a + //! sub-class. + virtual const char *language() const = 0; + + //! Returns the name of the lexer. If 0 is returned then the lexer's + //! numeric identifier is used. The default implementation returns 0. + //! + //! \sa lexerId() + virtual const char *lexer() const; + + //! Returns the identifier (i.e. a QsciScintillaBase::SCLEX_* value) of the + //! lexer. This is only used if lexer() returns 0. The default + //! implementation returns QsciScintillaBase::SCLEX_CONTAINER. + //! + //! \sa lexer() + virtual int lexerId() const; + + //! Returns the current API set or 0 if there isn't one. + //! + //! \sa setAPIs() + QsciAbstractAPIs *apis() const; + + //! Returns the characters that can fill up auto-completion. + virtual const char *autoCompletionFillups() const; + + //! Returns the list of character sequences that can separate + //! auto-completion words. The first in the list is assumed to be the + //! sequence used to separate words in the lexer's API files. + virtual QStringList autoCompletionWordSeparators() const; + + //! Returns the auto-indentation style. The default is 0 if the + //! language is block structured, or QsciScintilla::AiMaintain if not. + //! + //! \sa setAutoIndentStyle(), QsciScintilla::AiMaintain, + //! QsciScintilla::AiOpening, QsciScintilla::AiClosing + int autoIndentStyle(); + + //! Returns a space separated list of words or characters in a particular + //! style that define the end of a block for auto-indentation. The style + //! is returned via \a style. + virtual const char *blockEnd(int *style = 0) const; + + //! Returns the number of lines prior to the current one when determining + //! the scope of a block when auto-indenting. + virtual int blockLookback() const; + + //! Returns a space separated list of words or characters in a particular + //! style that define the start of a block for auto-indentation. The style + //! is returned via \a style. + virtual const char *blockStart(int *style = 0) const; + + //! Returns a space separated list of keywords in a particular style that + //! define the start of a block for auto-indentation. The style is + //! returned via \a style. + virtual const char *blockStartKeyword(int *style = 0) const; + + //! Returns the style used for braces for brace matching. + virtual int braceStyle() const; + + //! Returns true if the language is case sensitive. The default is true. + virtual bool caseSensitive() const; + + //! Returns the foreground colour of the text for style number \a style. + //! The default colour is that returned by defaultColor(). + //! + //! \sa defaultColor(), paper() + virtual QColor color(int style) const; + + //! Returns the end-of-line for style number \a style. The default is + //! false. + virtual bool eolFill(int style) const; + + //! Returns the font for style number \a style. The default font is + //! that returned by defaultFont(). + //! + //! \sa defaultFont() + virtual QFont font(int style) const; + + //! Returns the view used for indentation guides. + virtual int indentationGuideView() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. Keyword sets are numbered + //! from 1. 0 is returned if there is no such set. + virtual const char *keywords(int set) const; + + //! Returns the number of the style used for whitespace. The default + //! implementation returns 0 which is the convention adopted by most + //! lexers. + virtual int defaultStyle() const; + + //! Returns the descriptive name for style number \a style. For a valid + //! style number for this language a non-empty QString must be returned. + //! If the style number is invalid then an empty QString must be returned. + //! This is intended to be used in user preference dialogs. + virtual QString description(int style) const = 0; + + //! Returns the background colour of the text for style number + //! \a style. + //! + //! \sa defaultPaper(), color() + virtual QColor paper(int style) const; + + //! Returns the default text colour. + //! + //! \sa setDefaultColor() + QColor defaultColor() const; + + //! Returns the default text colour for style number \a style. + virtual QColor defaultColor(int style) const; + + //! Returns the default end-of-line for style number \a style. The default + //! is false. + virtual bool defaultEolFill(int style) const; + + //! Returns the default font. + //! + //! \sa setDefaultFont() + QFont defaultFont() const; + + //! Returns the default font for style number \a style. + virtual QFont defaultFont(int style) const; + + //! Returns the default paper colour. + //! + //! \sa setDefaultPaper() + QColor defaultPaper() const; + + //! Returns the default paper colour for style number \a style. + virtual QColor defaultPaper(int style) const; + + //! Returns the QsciScintilla instance that the lexer is currently attached + //! to or 0 if it is unattached. + QsciScintilla *editor() const {return attached_editor;} + + //! The current set of APIs is set to \a apis. If \a apis is 0 then any + //! existing APIs for this lexer are removed. + //! + //! \sa apis() + void setAPIs(QsciAbstractAPIs *apis); + + //! The default text colour is set to \a c. + //! + //! \sa defaultColor(), color() + void setDefaultColor(const QColor &c); + + //! The default font is set to \a f. + //! + //! \sa defaultFont(), font() + void setDefaultFont(const QFont &f); + + //! The default paper colour is set to \a c. + //! + //! \sa defaultPaper(), paper() + void setDefaultPaper(const QColor &c); + + //! \internal Set the QsciScintilla instance that the lexer is attached to. + virtual void setEditor(QsciScintilla *editor); + + //! The colour, paper, font and end-of-line for each style number, and + //! all lexer specific properties are read from the settings \a qs. + //! \a prefix is prepended to the key of each entry. true is returned + //! if there was no error. + //! + //! \sa writeSettings(), QsciScintilla::setLexer() + bool readSettings(QSettings &qs,const char *prefix = "/Scintilla"); + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + virtual void refreshProperties(); + + //! Returns the number of style bits needed by the lexer. Normally this + //! should only be re-implemented by custom lexers. This is deprecated and + //! no longer has any effect. + virtual int styleBitsNeeded() const; + + //! Returns the string of characters that comprise a word. The default is + //! 0 which implies the upper and lower case alphabetic characters and + //! underscore. + virtual const char *wordCharacters() const; + + //! The colour, paper, font and end-of-line for each style number, and + //! all lexer specific properties are written to the settings \a qs. + //! \a prefix is prepended to the key of each entry. true is returned + //! if there was no error. + //! + //! \sa readSettings() + bool writeSettings(QSettings &qs, + const char *prefix = "/Scintilla") const; + +public slots: + //! The auto-indentation style is set to \a autoindentstyle. + //! + //! \sa autoIndentStyle(), QsciScintilla::AiMaintain, + //! QsciScintilla::AiOpening, QsciScintilla::AiClosing + virtual void setAutoIndentStyle(int autoindentstyle); + + //! The foreground colour for style number \a style is set to \a c. If + //! \a style is -1 then the colour is set for all styles. + virtual void setColor(const QColor &c,int style = -1); + + //! The end-of-line fill for style number \a style is set to + //! \a eoffill. If \a style is -1 then the fill is set for all styles. + virtual void setEolFill(bool eoffill,int style = -1); + + //! The font for style number \a style is set to \a f. If \a style is + //! -1 then the font is set for all styles. + virtual void setFont(const QFont &f,int style = -1); + + //! The background colour for style number \a style is set to \a c. If + //! \a style is -1 then the colour is set for all styles. + virtual void setPaper(const QColor &c,int style = -1); + +signals: + //! This signal is emitted when the foreground colour of style number + //! \a style has changed. The new colour is \a c. + void colorChanged(const QColor &c,int style); + + //! This signal is emitted when the end-of-file fill of style number + //! \a style has changed. The new fill is \a eolfilled. + void eolFillChanged(bool eolfilled,int style); + + //! This signal is emitted when the font of style number \a style has + //! changed. The new font is \a f. + void fontChanged(const QFont &f,int style); + + //! This signal is emitted when the background colour of style number + //! \a style has changed. The new colour is \a c. + void paperChanged(const QColor &c,int style); + + //! This signal is emitted when the value of the lexer property \a prop + //! needs to be changed. The new value is \a val. + void propertyChanged(const char *prop, const char *val); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + virtual bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + virtual bool writeProperties(QSettings &qs,const QString &prefix) const; + + //! \internal Convert a QString to encoded bytes. + QByteArray textAsBytes(const QString &text) const; + + //! \internal Convert encoded bytes to a QString. + QString bytesAsText(const char *bytes, int size) const; + +private: + struct StyleData { + QFont font; + QColor color; + QColor paper; + bool eol_fill; + }; + + struct StyleDataMap { + bool style_data_set; + QMap style_data; + }; + + StyleDataMap *style_map; + + int autoIndStyle; + QFont defFont; + QColor defColor; + QColor defPaper; + QsciAbstractAPIs *apiSet; + QsciScintilla *attached_editor; + + void setStyleDefaults() const; + StyleData &styleData(int style) const; + + QsciLexer(const QsciLexer &); + QsciLexer &operator=(const QsciLexer &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerasm.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerasm.h new file mode 100644 index 000000000..bedb72024 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerasm.h @@ -0,0 +1,201 @@ +// This defines the interface to the abstract QsciLexerAsm class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERASM_H +#define QSCILEXERASM_H + +#include +#include + +#include +#include + + +//! \brief The abstract QsciLexerAsm class encapsulates the Scintilla Asm +//! lexer. +class QSCINTILLA_EXPORT QsciLexerAsm : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Asm lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A number. + Number = 2, + + //! A double-quoted string. + DoubleQuotedString = 3, + + //! An operator. + Operator = 4, + + //! An identifier. + Identifier = 5, + + //! A CPU instruction. + CPUInstruction = 6, + + //! An FPU instruction. + FPUInstruction = 7, + + //! A register. + Register = 8, + + //! A directive. + Directive = 9, + + //! A directive operand. + DirectiveOperand = 11, + + //! A block comment. + BlockComment = 12, + + //! A single-quoted string. + SingleQuotedString = 13, + + //! The end of a line where a string is not closed. + UnclosedString = 14, + + //! An extended instruction. + ExtendedInstruction = 16, + + //! A comment directive. + CommentDirective = 17, + }; + + //! Construct a QsciLexerAsm with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerAsm(QObject *parent = 0); + + //! Destroys the QsciLexerAsm instance. + virtual ~QsciLexerAsm(); + + //! Returns the foreground colour of the text for style number \a style. + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. Set 1 is normally used for + //! CPU instructions. Set 2 is normally used for FPU instructions. Set 3 + //! is normally used for register names. Set 4 is normally used for + //! directives. Set 5 is normally used for directive operands. Set 6 is + //! normally used for extended instructions. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! Returns the delimiter used by the COMMENT directive. + //! + //! \sa setCommentDelimiter() + QChar commentDelimiter() const; + + //! Returns true if syntax-based folding is enabled. + //! + //! \sa setFoldSyntaxBased() + bool foldSyntaxBased() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is true. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! \a delimiter is the character used for the COMMENT directive's + //! delimiter. The default is '~'. + //! + //! \sa commentDelimiter() + virtual void setCommentDelimiter(QChar delimeter); + + //! If \a syntax_based is true then syntax-based folding is enabled. The + //! default is true. + //! + //! \sa foldSyntaxBased() + virtual void setFoldSyntaxBased(bool syntax_based); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs, const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs, const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setCommentDelimiterProp(); + void setSyntaxBasedProp(); + + bool fold_comments; + bool fold_compact; + QChar comment_delimiter; + bool fold_syntax_based; + + QsciLexerAsm(const QsciLexerAsm &); + QsciLexerAsm &operator=(const QsciLexerAsm &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeravs.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeravs.h new file mode 100644 index 000000000..bea07b923 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeravs.h @@ -0,0 +1,174 @@ +// This defines the interface to the QsciLexerAVS class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERAVS_H +#define QSCILEXERAVS_H + +#include + +#include +#include + + +//! \brief The QsciLexerAVS class encapsulates the Scintilla AVS lexer. +class QSCINTILLA_EXPORT QsciLexerAVS : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! AVS lexer. + enum { + //! The default. + Default = 0, + + //! A block comment. + BlockComment = 1, + + //! A nested block comment. + NestedBlockComment = 2, + + //! A line comment. + LineComment = 3, + + //! A number. + Number = 4, + + //! An operator. + Operator = 5, + + //! An identifier + Identifier = 6, + + //! A string. + String = 7, + + //! A triple quoted string. + TripleString = 8, + + //! A keyword (as defined by keyword set number 1).. + Keyword = 9, + + //! A filter (as defined by keyword set number 2). + Filter = 10, + + //! A plugin (as defined by keyword set number 3). + Plugin = 11, + + //! A function (as defined by keyword set number 4). + Function = 12, + + //! A clip property (as defined by keyword set number 5). + ClipProperty = 13, + + //! A keyword defined in keyword set number 6. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet6 = 14 + }; + + //! Construct a QsciLexerAVS with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerAVS(QObject *parent = 0); + + //! Destroys the QsciLexerAVS instance. + virtual ~QsciLexerAVS(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + + bool fold_comments; + bool fold_compact; + + QsciLexerAVS(const QsciLexerAVS &); + QsciLexerAVS &operator=(const QsciLexerAVS &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbash.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbash.h new file mode 100644 index 000000000..aac7aabd0 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbash.h @@ -0,0 +1,178 @@ +// This defines the interface to the QsciLexerBash class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERBASH_H +#define QSCILEXERBASH_H + +#include + +#include +#include + + +//! \brief The QsciLexerBash class encapsulates the Scintilla Bash lexer. +class QSCINTILLA_EXPORT QsciLexerBash : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Bash lexer. + enum { + //! The default. + Default = 0, + + //! An error. + Error = 1, + + //! A comment. + Comment = 2, + + //! A number. + Number = 3, + + //! A keyword. + Keyword = 4, + + //! A double-quoted string. + DoubleQuotedString = 5, + + //! A single-quoted string. + SingleQuotedString = 6, + + //! An operator. + Operator = 7, + + //! An identifier + Identifier = 8, + + //! A scalar. + Scalar = 9, + + //! Parameter expansion. + ParameterExpansion = 10, + + //! Backticks. + Backticks = 11, + + //! A here document delimiter. + HereDocumentDelimiter = 12, + + //! A single quoted here document. + SingleQuotedHereDocument = 13 + }; + + //! Construct a QsciLexerBash with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerBash(QObject *parent = 0); + + //! Destroys the QsciLexerBash instance. + virtual ~QsciLexerBash(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + + bool fold_comments; + bool fold_compact; + + QsciLexerBash(const QsciLexerBash &); + QsciLexerBash &operator=(const QsciLexerBash &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbatch.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbatch.h new file mode 100644 index 000000000..0d2d61a2a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerbatch.h @@ -0,0 +1,115 @@ +// This defines the interface to the QsciLexerBatch class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERBATCH_H +#define QSCILEXERBATCH_H + +#include + +#include +#include + + +//! \brief The QsciLexerBatch class encapsulates the Scintilla batch file +//! lexer. +class QSCINTILLA_EXPORT QsciLexerBatch : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! batch file lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A keyword. + Keyword = 2, + + //! A label. + Label = 3, + + //! An hide command character. + HideCommandChar = 4, + + //! An external command . + ExternalCommand = 5, + + //! A variable. + Variable = 6, + + //! An operator + Operator = 7 + }; + + //! Construct a QsciLexerBatch with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerBatch(QObject *parent = 0); + + //! Destroys the QsciLexerBatch instance. + virtual ~QsciLexerBatch(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! \internal Returns true if the language is case sensitive. + bool caseSensitive() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerBatch(const QsciLexerBatch &); + QsciLexerBatch &operator=(const QsciLexerBatch &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercmake.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercmake.h new file mode 100644 index 000000000..07a7bbca7 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercmake.h @@ -0,0 +1,160 @@ +// This defines the interface to the QsciLexerCMake class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERCMAKE_H +#define QSCILEXERCMAKE_H + +#include + +#include +#include + + +//! \brief The QsciLexerCMake class encapsulates the Scintilla CMake lexer. +class QSCINTILLA_EXPORT QsciLexerCMake : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! CMake lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A string. + String = 2, + + //! A left quoted string. + StringLeftQuote = 3, + + //! A right quoted string. + StringRightQuote = 4, + + //! A function. (Defined by keyword set number 1.) + Function = 5, + + //! A variable. (Defined by keyword set number 2.) + Variable = 6, + + //! A label. + Label = 7, + + //! A keyword defined in keyword set number 3. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet3 = 8, + + //! A WHILE block. + BlockWhile = 9, + + //! A FOREACH block. + BlockForeach = 10, + + //! An IF block. + BlockIf = 11, + + //! A MACRO block. + BlockMacro = 12, + + //! A variable within a string. + StringVariable = 13, + + //! A number. + Number = 14 + }; + + //! Construct a QsciLexerCMake with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerCMake(QObject *parent = 0); + + //! Destroys the QsciLexerCMake instance. + virtual ~QsciLexerCMake(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if ELSE blocks can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const; + +public slots: + //! If \a fold is true then ELSE blocks can be folded. The default is + //! false. + //! + //! \sa foldAtElse() + virtual void setFoldAtElse(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAtElseProp(); + + bool fold_atelse; + + QsciLexerCMake(const QsciLexerCMake &); + QsciLexerCMake &operator=(const QsciLexerCMake &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercoffeescript.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercoffeescript.h new file mode 100644 index 000000000..925aa03ff --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercoffeescript.h @@ -0,0 +1,264 @@ +// This defines the interface to the QsciLexerCoffeeScript class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERCOFFEESCRIPT_H +#define QSCILEXERCOFFEESCRIPT_H + +#include + +#include +#include + + +//! \brief The QsciLexerCoffeeScript class encapsulates the Scintilla +//! CoffeeScript lexer. +class QSCINTILLA_EXPORT QsciLexerCoffeeScript : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! C++ lexer. + enum { + //! The default. + Default = 0, + + //! A C-style comment. + Comment = 1, + + //! A C++-style comment line. + CommentLine = 2, + + //! A JavaDoc/Doxygen C-style comment. + CommentDoc = 3, + + //! A number. + Number = 4, + + //! A keyword. + Keyword = 5, + + //! A double-quoted string. + DoubleQuotedString = 6, + + //! A single-quoted string. + SingleQuotedString = 7, + + //! An IDL UUID. + UUID = 8, + + //! A pre-processor block. + PreProcessor = 9, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! The end of a line where a string is not closed. + UnclosedString = 12, + + //! A C# verbatim string. + VerbatimString = 13, + + //! A regular expression. + Regex = 14, + + //! A JavaDoc/Doxygen C++-style comment line. + CommentLineDoc = 15, + + //! A keyword defined in keyword set number 2. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet2 = 16, + + //! A JavaDoc/Doxygen keyword. + CommentDocKeyword = 17, + + //! A JavaDoc/Doxygen keyword error defined in keyword set number 3. + //! The class must be sub-classed and re-implement keywords() to make + //! use of this style. + CommentDocKeywordError = 18, + + //! A global class defined in keyword set number 4. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + GlobalClass = 19, + + //! A block comment. + CommentBlock = 22, + + //! A block regular expression. + BlockRegex = 23, + + //! A block regular expression comment. + BlockRegexComment = 24, + + //! An instance property. + InstanceProperty = 25, + }; + + //! Construct a QsciLexerCoffeeScript with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerCoffeeScript(QObject *parent = 0); + + //! Destroys the QsciLexerCoffeeScript instance. + virtual ~QsciLexerCoffeeScript(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a + //! particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. Set 1 is normally used for + //! primary keywords and identifiers. Set 2 is normally used for secondary + //! keywords and identifiers. Set 3 is normally used for documentation + //! comment keywords. Set 4 is normally used for global classes and + //! typedefs. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if '$' characters are allowed in identifier names. + //! + //! \sa setDollarsAllowed() + bool dollarsAllowed() const {return dollars;} + + //! If \a allowed is true then '$' characters are allowed in identifier + //! names. The default is true. + //! + //! \sa dollarsAllowed() + void setDollarsAllowed(bool allowed); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + void setFoldComments(bool fold); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + void setFoldCompact(bool fold); + + //! Returns true if preprocessor lines (after the preprocessor + //! directive) are styled. + //! + //! \sa setStylePreprocessor() + bool stylePreprocessor() const {return style_preproc;} + + //! If \a style is true then preprocessor lines (after the preprocessor + //! directive) are styled. The default is false. + //! + //! \sa stylePreprocessor() + void setStylePreprocessor(bool style); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setStylePreprocProp(); + void setDollarsProp(); + + bool fold_comments; + bool fold_compact; + bool style_preproc; + bool dollars; + + QsciLexerCoffeeScript(const QsciLexerCoffeeScript &); + QsciLexerCoffeeScript &operator=(const QsciLexerCoffeeScript &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercpp.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercpp.h new file mode 100644 index 000000000..da54b446f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercpp.h @@ -0,0 +1,398 @@ +// This defines the interface to the QsciLexerCPP class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERCPP_H +#define QSCILEXERCPP_H + +#include + +#include +#include + + +//! \brief The QsciLexerCPP class encapsulates the Scintilla C++ +//! lexer. +class QSCINTILLA_EXPORT QsciLexerCPP : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! C++ lexer. + enum { + //! The default. + Default = 0, + InactiveDefault = Default + 64, + + //! A C comment. + Comment = 1, + InactiveComment = Comment + 64, + + //! A C++ comment line. + CommentLine = 2, + InactiveCommentLine = CommentLine + 64, + + //! A JavaDoc/Doxygen style C comment. + CommentDoc = 3, + InactiveCommentDoc = CommentDoc + 64, + + //! A number. + Number = 4, + InactiveNumber = Number + 64, + + //! A keyword. + Keyword = 5, + InactiveKeyword = Keyword + 64, + + //! A double-quoted string. + DoubleQuotedString = 6, + InactiveDoubleQuotedString = DoubleQuotedString + 64, + + //! A single-quoted string. + SingleQuotedString = 7, + InactiveSingleQuotedString = SingleQuotedString + 64, + + //! An IDL UUID. + UUID = 8, + InactiveUUID = UUID + 64, + + //! A pre-processor block. + PreProcessor = 9, + InactivePreProcessor = PreProcessor + 64, + + //! An operator. + Operator = 10, + InactiveOperator = Operator + 64, + + //! An identifier + Identifier = 11, + InactiveIdentifier = Identifier + 64, + + //! The end of a line where a string is not closed. + UnclosedString = 12, + InactiveUnclosedString = UnclosedString + 64, + + //! A C# verbatim string. + VerbatimString = 13, + InactiveVerbatimString = VerbatimString + 64, + + //! A JavaScript regular expression. + Regex = 14, + InactiveRegex = Regex + 64, + + //! A JavaDoc/Doxygen style C++ comment line. + CommentLineDoc = 15, + InactiveCommentLineDoc = CommentLineDoc + 64, + + //! A keyword defined in keyword set number 2. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet2 = 16, + InactiveKeywordSet2 = KeywordSet2 + 64, + + //! A JavaDoc/Doxygen keyword. + CommentDocKeyword = 17, + InactiveCommentDocKeyword = CommentDocKeyword + 64, + + //! A JavaDoc/Doxygen keyword error. + CommentDocKeywordError = 18, + InactiveCommentDocKeywordError = CommentDocKeywordError + 64, + + //! A global class or typedef defined in keyword set number 5. The + //! class must be sub-classed and re-implement keywords() to make use + //! of this style. + GlobalClass = 19, + InactiveGlobalClass = GlobalClass + 64, + + //! A C++ raw string. + RawString = 20, + InactiveRawString = RawString + 64, + + //! A Vala triple-quoted verbatim string. + TripleQuotedVerbatimString = 21, + InactiveTripleQuotedVerbatimString = TripleQuotedVerbatimString + 64, + + //! A Pike hash-quoted string. + HashQuotedString = 22, + InactiveHashQuotedString = HashQuotedString + 64, + + //! A pre-processor stream comment. + PreProcessorComment = 23, + InactivePreProcessorComment = PreProcessorComment + 64, + + //! A JavaDoc/Doxygen style pre-processor comment. + PreProcessorCommentLineDoc = 24, + InactivePreProcessorCommentLineDoc = PreProcessorCommentLineDoc + 64, + + //! A user-defined literal. + UserLiteral = 25, + InactiveUserLiteral = UserLiteral + 64, + + //! A task marker. + TaskMarker = 26, + InactiveTaskMarker = TaskMarker + 64, + + //! An escape sequence. + EscapeSequence = 27, + InactiveEscapeSequence = EscapeSequence + 64, + }; + + //! Construct a QsciLexerCPP with parent \a parent. \a parent is typically + //! the QsciScintilla instance. \a caseInsensitiveKeywords is true if the + //! lexer ignores the case of keywords. + QsciLexerCPP(QObject *parent = 0, bool caseInsensitiveKeywords = false); + + //! Destroys the QsciLexerCPP instance. + virtual ~QsciLexerCPP(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a + //! particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. Set 1 is normally used for + //! primary keywords and identifiers. Set 2 is normally used for secondary + //! keywords and identifiers. Set 3 is normally used for documentation + //! comment keywords. Set 4 is normally used for global classes and + //! typedefs. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if "} else {" lines can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const {return fold_atelse;} + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! Returns true if preprocessor blocks can be folded. + //! + //! \sa setFoldPreprocessor() + bool foldPreprocessor() const {return fold_preproc;} + + //! Returns true if preprocessor lines (after the preprocessor + //! directive) are styled. + //! + //! \sa setStylePreprocessor() + bool stylePreprocessor() const {return style_preproc;} + + //! If \a allowed is true then '$' characters are allowed in identifier + //! names. The default is true. + //! + //! \sa dollarsAllowed() + void setDollarsAllowed(bool allowed); + + //! Returns true if '$' characters are allowed in identifier names. + //! + //! \sa setDollarsAllowed() + bool dollarsAllowed() const {return dollars;} + + //! If \a enabled is true then triple quoted strings are highlighted. The + //! default is false. + //! + //! \sa highlightTripleQuotedStrings() + void setHighlightTripleQuotedStrings(bool enabled); + + //! Returns true if triple quoted strings should be highlighted. + //! + //! \sa setHighlightTripleQuotedStrings() + bool highlightTripleQuotedStrings() const {return highlight_triple;} + + //! If \a enabled is true then hash quoted strings are highlighted. The + //! default is false. + //! + //! \sa highlightHashQuotedStrings() + void setHighlightHashQuotedStrings(bool enabled); + + //! Returns true if hash quoted strings should be highlighted. + //! + //! \sa setHighlightHashQuotedStrings() + bool highlightHashQuotedStrings() const {return highlight_hash;} + + //! If \a enabled is true then back-quoted raw strings are highlighted. + //! The default is false. + //! + //! \sa highlightBackQuotedStrings() + void setHighlightBackQuotedStrings(bool enabled); + + //! Returns true if back-quoted raw strings should be highlighted. + //! + //! \sa setHighlightBackQuotedStrings() + bool highlightBackQuotedStrings() const {return highlight_back;} + + //! If \a enabled is true then escape sequences in strings are highlighted. + //! The default is false. + //! + //! \sa highlightEscapeSequences() + void setHighlightEscapeSequences(bool enabled); + + //! Returns true if escape sequences in strings should be highlighted. + //! + //! \sa setHighlightEscapeSequences() + bool highlightEscapeSequences() const {return highlight_escape;} + + //! If \a allowed is true then escape sequences are allowed in verbatim + //! strings. The default is false. + //! + //! \sa verbatimStringEscapeSequencesAllowed() + void setVerbatimStringEscapeSequencesAllowed(bool allowed); + + //! Returns true if hash quoted strings should be highlighted. + //! + //! \sa setVerbatimStringEscapeSequencesAllowed() + bool verbatimStringEscapeSequencesAllowed() const {return vs_escape;} + +public slots: + //! If \a fold is true then "} else {" lines can be folded. The + //! default is false. + //! + //! \sa foldAtElse() + virtual void setFoldAtElse(bool fold); + + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then preprocessor blocks can be folded. The + //! default is true. + //! + //! \sa foldPreprocessor() + virtual void setFoldPreprocessor(bool fold); + + //! If \a style is true then preprocessor lines (after the preprocessor + //! directive) are styled. The default is false. + //! + //! \sa stylePreprocessor() + virtual void setStylePreprocessor(bool style); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAtElseProp(); + void setCommentProp(); + void setCompactProp(); + void setPreprocProp(); + void setStylePreprocProp(); + void setDollarsProp(); + void setHighlightTripleProp(); + void setHighlightHashProp(); + void setHighlightBackProp(); + void setHighlightEscapeProp(); + void setVerbatimStringEscapeProp(); + + bool fold_atelse; + bool fold_comments; + bool fold_compact; + bool fold_preproc; + bool style_preproc; + bool dollars; + bool highlight_triple; + bool highlight_hash; + bool highlight_back; + bool highlight_escape; + bool vs_escape; + + bool nocase; + + QsciLexerCPP(const QsciLexerCPP &); + QsciLexerCPP &operator=(const QsciLexerCPP &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercsharp.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercsharp.h new file mode 100644 index 000000000..60eea7c77 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercsharp.h @@ -0,0 +1,77 @@ +// This defines the interface to the QsciLexerCSharp class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERCSHARP_H +#define QSCILEXERCSHARP_H + +#include + +#include +#include + + +//! \brief The QsciLexerCSharp class encapsulates the Scintilla C# +//! lexer. +class QSCINTILLA_EXPORT QsciLexerCSharp : public QsciLexerCPP +{ + Q_OBJECT + +public: + //! Construct a QsciLexerCSharp with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerCSharp(QObject *parent = 0); + + //! Destroys the QsciLexerCSharp instance. + virtual ~QsciLexerCSharp(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerCSharp(const QsciLexerCSharp &); + QsciLexerCSharp &operator=(const QsciLexerCSharp &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercss.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercss.h new file mode 100644 index 000000000..addc85835 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercss.h @@ -0,0 +1,252 @@ +// This defines the interface to the QsciLexerCSS class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERCSS_H +#define QSCILEXERCSS_H + +#include + +#include +#include + + +//! \brief The QsciLexerCSS class encapsulates the Scintilla CSS lexer. +class QSCINTILLA_EXPORT QsciLexerCSS : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! CSS lexer. + enum { + //! The default. + Default = 0, + + //! A tag. + Tag = 1, + + //! A class selector. + ClassSelector = 2, + + //! A pseudo class. The list of pseudo classes is defined by keyword + //! set 2. + PseudoClass = 3, + + //! An unknown pseudo class. + UnknownPseudoClass = 4, + + //! An operator. + Operator = 5, + + //! A CSS1 property. The list of CSS1 properties is defined by keyword + //! set 1. + CSS1Property = 6, + + //! An unknown property. + UnknownProperty = 7, + + //! A value. + Value = 8, + + //! A comment. + Comment = 9, + + //! An ID selector. + IDSelector = 10, + + //! An important value. + Important = 11, + + //! An @-rule. + AtRule = 12, + + //! A double-quoted string. + DoubleQuotedString = 13, + + //! A single-quoted string. + SingleQuotedString = 14, + + //! A CSS2 property. The list of CSS2 properties is defined by keyword + //! set 3. + CSS2Property = 15, + + //! An attribute. + Attribute = 16, + + //! A CSS3 property. The list of CSS3 properties is defined by keyword + //! set 4. + CSS3Property = 17, + + //! A pseudo element. The list of pseudo elements is defined by + //! keyword set 5. + PseudoElement = 18, + + //! An extended (browser specific) CSS property. The list of extended + //! CSS properties is defined by keyword set 6. + ExtendedCSSProperty = 19, + + //! An extended (browser specific) pseudo class. The list of extended + //! pseudo classes is defined by keyword set 7. + ExtendedPseudoClass = 20, + + //! An extended (browser specific) pseudo element. The list of + //! extended pseudo elements is defined by keyword set 8. + ExtendedPseudoElement = 21, + + //! A media rule. + MediaRule = 22, + + //! A variable. + Variable = 23, + }; + + //! Construct a QsciLexerCSS with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerCSS(QObject *parent = 0); + + //! Destroys the QsciLexerCSS instance. + virtual ~QsciLexerCSS(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! If \a enabled is true then support for HSS is enabled. The default is + //! false. + //! + //! \sa HSSLanguage() + void setHSSLanguage(bool enabled); + + //! Returns true if support for HSS is enabled. + //! + //! \sa setHSSLanguage() + bool HSSLanguage() const {return hss_language;} + + //! If \a enabled is true then support for Less CSS is enabled. The + //! default is false. + //! + //! \sa LessLanguage() + void setLessLanguage(bool enabled); + + //! Returns true if support for Less CSS is enabled. + //! + //! \sa setLessLanguage() + bool LessLanguage() const {return less_language;} + + //! If \a enabled is true then support for Sassy CSS is enabled. The + //! default is false. + //! + //! \sa SCSSLanguage() + void setSCSSLanguage(bool enabled); + + //! Returns true if support for Sassy CSS is enabled. + //! + //! \sa setSCSSLanguage() + bool SCSSLanguage() const {return scss_language;} + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setHSSProp(); + void setLessProp(); + void setSCSSProp(); + + bool fold_comments; + bool fold_compact; + bool hss_language; + bool less_language; + bool scss_language; + + QsciLexerCSS(const QsciLexerCSS &); + QsciLexerCSS &operator=(const QsciLexerCSS &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercustom.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercustom.h new file mode 100644 index 000000000..d1ba17ba4 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexercustom.h @@ -0,0 +1,100 @@ +// This defines the interface to the QsciLexerCustom class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERCUSTOM_H +#define QSCILEXERCUSTOM_H + +#include +#include + + +class QsciScintilla; +class QsciStyle; + + +//! \brief The QsciLexerCustom class is an abstract class used as a base for +//! new language lexers. +//! +//! The advantage of implementing a new lexer this way (as opposed to adding +//! the lexer to the underlying Scintilla code) is that it does not require the +//! QScintilla library to be re-compiled. It also makes it possible to +//! integrate external lexers. +//! +//! All that is necessary to implement a new lexer is to define appropriate +//! styles and to re-implement the styleText() method. +class QSCINTILLA_EXPORT QsciLexerCustom : public QsciLexer +{ + Q_OBJECT + +public: + //! Construct a QsciLexerCustom with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerCustom(QObject *parent = 0); + + //! Destroy the QSciLexerCustom. + virtual ~QsciLexerCustom(); + + //! The next \a length characters starting from the current styling + //! position have their style set to style number \a style. The current + //! styling position is moved. The styling position is initially set by + //! calling startStyling(). + //! + //! \sa startStyling(), styleText() + void setStyling(int length, int style); + + //! The next \a length characters starting from the current styling + //! position have their style set to style \a style. The current styling + //! position is moved. The styling position is initially set by calling + //! startStyling(). + //! + //! \sa startStyling(), styleText() + void setStyling(int length, const QsciStyle &style); + + //! The styling position is set to \a start. \a styleBits is unused. + //! + //! \sa setStyling(), styleBitsNeeded(), styleText() + void startStyling(int pos, int styleBits = 0); + + //! This is called when the section of text beginning at position \a start + //! and up to position \a end needs to be styled. \a start will always be + //! at the start of a line. The text is styled by calling startStyling() + //! followed by one or more calls to setStyling(). It must be + //! re-implemented by a sub-class. + //! + //! \sa setStyling(), startStyling(), QsciScintilla::bytes(), + //! QsciScintilla::text() + virtual void styleText(int start, int end) = 0; + + //! \reimp + virtual void setEditor(QsciScintilla *editor); + + //! \reimp This re-implementation returns 5 as the number of style bits + //! needed. + virtual int styleBitsNeeded() const; + +private slots: + void handleStyleNeeded(int pos); + +private: + QsciLexerCustom(const QsciLexerCustom &); + QsciLexerCustom &operator=(const QsciLexerCustom &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerd.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerd.h new file mode 100644 index 000000000..e910188c1 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerd.h @@ -0,0 +1,242 @@ +// This defines the interface to the QsciLexerD class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERD_H +#define QSCILEXERD_H + +#include + +#include +#include + + +//! \brief The QsciLexerD class encapsulates the Scintilla D lexer. +class QSCINTILLA_EXPORT QsciLexerD : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the D + //! lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A comment line. + CommentLine = 2, + + //! A JavaDoc and Doxygen comment. + CommentDoc = 3, + + //! A nested comment. + CommentNested = 4, + + //! A number. + Number = 5, + + //! A keyword. + Keyword = 6, + + //! A secondary keyword. + KeywordSecondary = 7, + + //! A doc keyword + KeywordDoc = 8, + + //! Typedefs and aliases + Typedefs = 9, + + //! A string. + String = 10, + + //! The end of a line where a string is not closed. + UnclosedString = 11, + + //! A character + Character = 12, + + //! An operator. + Operator = 13, + + //! An identifier + Identifier = 14, + + //! A JavaDoc and Doxygen line. + CommentLineDoc = 15, + + //! A JavaDoc and Doxygen keyword. + CommentDocKeyword = 16, + + //! A JavaDoc and Doxygen keyword error. + CommentDocKeywordError = 17, + + //! A backquoted string. + BackquoteString = 18, + + //! A raw, hexadecimal or delimited string. + RawString = 19, + + //! A keyword defined in keyword set number 5. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet5 = 20, + + //! A keyword defined in keyword set number 6. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet6 = 21, + + //! A keyword defined in keyword set number 7. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet7 = 22, + }; + + //! Construct a QsciLexerD with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerD(QObject *parent = 0); + + //! Destroys the QsciLexerD instance. + virtual ~QsciLexerD(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in a + //! particular style that define the end of a block for auto-indentation. + //! The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in a + //! particular style that define the start of a block for auto-indentation. + //! The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a particular + //! style that define the start of a block for auto-indentation. The + //! styles is returned via \a style. + const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised by + //! the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the style + //! is invalid for this language then an empty QString is returned. This + //! is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if "} else {" lines can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const; + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + +public slots: + //! If \a fold is true then "} else {" lines can be folded. The default is + //! false. + //! + //! \sa foldAtElse() + virtual void setFoldAtElse(bool fold); + + //! If \a fold is true then multi-line comment blocks can be folded. The + //! default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAtElseProp(); + void setCommentProp(); + void setCompactProp(); + + bool fold_atelse; + bool fold_comments; + bool fold_compact; + + QsciLexerD(const QsciLexerD &); + QsciLexerD &operator=(const QsciLexerD &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerdiff.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerdiff.h new file mode 100644 index 000000000..43b67e99a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerdiff.h @@ -0,0 +1,107 @@ +// This defines the interface to the QsciLexerDiff class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERDIFF_H +#define QSCILEXERDIFF_H + +#include + +#include +#include + + +//! \brief The QsciLexerDiff class encapsulates the Scintilla Diff +//! lexer. +class QSCINTILLA_EXPORT QsciLexerDiff : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Diff lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A command. + Command = 2, + + //! A header. + Header = 3, + + //! A position. + Position = 4, + + //! A line removed. + LineRemoved = 5, + + //! A line added. + LineAdded = 6, + + //! A line changed. + LineChanged = 7, + + //! An adding patch added. + AddingPatchAdded = 8, + + //! A removing patch added. + RemovingPatchAdded = 9, + + //! An adding patch added. + AddingPatchRemoved = 10, + + //! A removing patch added. + RemovingPatchRemoved = 11, + }; + + //! Construct a QsciLexerDiff with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerDiff(QObject *parent = 0); + + //! Destroys the QsciLexerDiff instance. + virtual ~QsciLexerDiff(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + QColor defaultColor(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerDiff(const QsciLexerDiff &); + QsciLexerDiff &operator=(const QsciLexerDiff &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeredifact.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeredifact.h new file mode 100644 index 000000000..548fa0953 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeredifact.h @@ -0,0 +1,96 @@ +// This defines the interface to the QsciLexerEDIFACT class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXEREDIFACT_H +#define QSCILEXEREDIFACT_H + +#include + +#include +#include + + +//! \brief The QsciLexerEDIFACT class encapsulates the Scintilla EDIFACT lexer. +class QSCINTILLA_EXPORT QsciLexerEDIFACT : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! EDIFACT lexer. + enum { + //! The default. + Default = 0, + + //! A segment start. + SegmentStart = 1, + + //! A segment end. + SegmentEnd = 2, + + //! An element separator. + ElementSeparator = 3, + + //! A composite separator. + CompositeSeparator = 4, + + //! A release separator. + ReleaseSeparator = 5, + + //! A UNA segment header. + UNASegmentHeader = 6, + + //! A UNH segment header. + UNHSegmentHeader = 7, + + //! A bad segment. + BadSegment = 8, + }; + + //! Construct a QsciLexerEDIFACT with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerEDIFACT(QObject *parent = 0); + + //! Destroys the QsciLexerEDIFACT instance. + virtual ~QsciLexerEDIFACT(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerEDIFACT(const QsciLexerEDIFACT &); + QsciLexerEDIFACT &operator=(const QsciLexerEDIFACT &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran.h new file mode 100644 index 000000000..f5aa99b0d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran.h @@ -0,0 +1,59 @@ +// This defines the interface to the QsciLexerFortran class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERFORTRAN_H +#define QSCILEXERFORTRAN_H + +#include + +#include +#include + + +//! \brief The QsciLexerFortran class encapsulates the Scintilla Fortran lexer. +class QSCINTILLA_EXPORT QsciLexerFortran : public QsciLexerFortran77 +{ + Q_OBJECT + +public: + //! Construct a QsciLexerFortran with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerFortran(QObject *parent = 0); + + //! Destroys the QsciLexerFortran instance. + virtual ~QsciLexerFortran(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + +private: + QsciLexerFortran(const QsciLexerFortran &); + QsciLexerFortran &operator=(const QsciLexerFortran &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran77.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran77.h new file mode 100644 index 000000000..4689d6c40 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerfortran77.h @@ -0,0 +1,168 @@ +// This defines the interface to the QsciLexerFortran77 class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERFORTRAN77_H +#define QSCILEXERFORTRAN77_H + +#include + +#include +#include + + +//! \brief The QsciLexerFortran77 class encapsulates the Scintilla Fortran77 +//! lexer. +class QSCINTILLA_EXPORT QsciLexerFortran77 : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Fortran77 lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A number. + Number = 2, + + //! A single-quoted string. + SingleQuotedString = 3, + + //! A double-quoted string. + DoubleQuotedString = 4, + + //! The end of a line where a string is not closed. + UnclosedString = 5, + + //! An operator. + Operator = 6, + + //! An identifier + Identifier = 7, + + //! A keyword. + Keyword = 8, + + //! An intrinsic function. + IntrinsicFunction = 9, + + //! An extended, non-standard or user defined function. + ExtendedFunction = 10, + + //! A pre-processor block. + PreProcessor = 11, + + //! An operator in .NAME. format. + DottedOperator = 12, + + //! A label. + Label = 13, + + //! A continuation. + Continuation = 14 + }; + + //! Construct a QsciLexerFortran77 with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerFortran77(QObject *parent = 0); + + //! Destroys the QsciLexerFortran77 instance. + virtual ~QsciLexerFortran77(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + +public slots: + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCompactProp(); + + bool fold_compact; + + QsciLexerFortran77(const QsciLexerFortran77 &); + QsciLexerFortran77 &operator=(const QsciLexerFortran77 &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhex.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhex.h new file mode 100644 index 000000000..dc4287427 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhex.h @@ -0,0 +1,120 @@ +// This defines the interface to the abstract QsciLexerHex class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERHEX_H +#define QSCILEXERHEX_H + +#include + +#include +#include + + +//! \brief The abstract QsciLexerHex class encapsulates the Scintilla Hex +//! lexer. +class QSCINTILLA_EXPORT QsciLexerHex : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Hex lexer. + enum { + //! The default. + Default = 0, + + //! A record start. + RecordStart = 1, + + //! A record type. + RecordType = 2, + + //! An unknown record type. + UnknownRecordType = 3, + + //! A correct byte count field. + ByteCount = 4, + + //! An incorrect byte count field. + IncorrectByteCount = 5, + + //! No address (S-Record and Intel Hex only). + NoAddress = 6, + + //! A data address. + DataAddress = 7, + + //! A record count (S-Record only). + RecordCount = 8, + + //! A start address. + StartAddress = 9, + + //! An extended address (Intel Hex only). + ExtendedAddress = 11, + + //! Odd data. + OddData = 12, + + //! Even data. + EvenData = 13, + + //! Unknown data (S-Record and Intel Hex only). + UnknownData = 14, + + //! A correct checksum. + Checksum = 16, + + //! An incorrect checksum. + IncorrectChecksum = 17, + + //! Garbage data after the record. + TrailingGarbage = 18, + }; + + //! Construct a QsciLexerHex with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerHex(QObject *parent = 0); + + //! Destroys the QsciLexerHex instance. + virtual ~QsciLexerHex(); + + //! Returns the foreground colour of the text for style number \a style. + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerHex(const QsciLexerHex &); + QsciLexerHex &operator=(const QsciLexerHex &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhtml.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhtml.h new file mode 100644 index 000000000..b4bdc2f0d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerhtml.h @@ -0,0 +1,532 @@ +// This defines the interface to the QsciLexerHTML class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERHTML_H +#define QSCILEXERHTML_H + +#include + +#include +#include + + +//! \brief The QsciLexerHTML class encapsulates the Scintilla HTML lexer. +class QSCINTILLA_EXPORT QsciLexerHTML : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! HTML lexer. + enum { + //! The default. + Default = 0, + + //! A tag. + Tag = 1, + + //! An unknown tag. + UnknownTag = 2, + + //! An attribute. + Attribute = 3, + + //! An unknown attribute. + UnknownAttribute = 4, + + //! An HTML number. + HTMLNumber = 5, + + //! An HTML double-quoted string. + HTMLDoubleQuotedString = 6, + + //! An HTML single-quoted string. + HTMLSingleQuotedString = 7, + + //! Other text within a tag. + OtherInTag = 8, + + //! An HTML comment. + HTMLComment = 9, + + //! An entity. + Entity = 10, + + //! The end of an XML style tag. + XMLTagEnd = 11, + + //! The start of an XML fragment. + XMLStart = 12, + + //! The end of an XML fragment. + XMLEnd = 13, + + //! A script tag. + Script = 14, + + //! The start of an ASP fragment with @. + ASPAtStart = 15, + + //! The start of an ASP fragment. + ASPStart = 16, + + //! CDATA. + CDATA = 17, + + //! The start of a PHP fragment. + PHPStart = 18, + + //! An unquoted HTML value. + HTMLValue = 19, + + //! An ASP X-Code comment. + ASPXCComment = 20, + + //! The default for SGML. + SGMLDefault = 21, + + //! An SGML command. + SGMLCommand = 22, + + //! The first parameter of an SGML command. + SGMLParameter = 23, + + //! An SGML double-quoted string. + SGMLDoubleQuotedString = 24, + + //! An SGML single-quoted string. + SGMLSingleQuotedString = 25, + + //! An SGML error. + SGMLError = 26, + + //! An SGML special entity. + SGMLSpecial = 27, + + //! An SGML entity. + SGMLEntity = 28, + + //! An SGML comment. + SGMLComment = 29, + + //! A comment with the first parameter of an SGML command. + SGMLParameterComment = 30, + + //! The default for an SGML block. + SGMLBlockDefault = 31, + + //! The start of a JavaScript fragment. + JavaScriptStart = 40, + + //! The default for JavaScript. + JavaScriptDefault = 41, + + //! A JavaScript comment. + JavaScriptComment = 42, + + //! A JavaScript line comment. + JavaScriptCommentLine = 43, + + //! A JavaDoc style JavaScript comment. + JavaScriptCommentDoc = 44, + + //! A JavaScript number. + JavaScriptNumber = 45, + + //! A JavaScript word. + JavaScriptWord = 46, + + //! A JavaScript keyword. + JavaScriptKeyword = 47, + + //! A JavaScript double-quoted string. + JavaScriptDoubleQuotedString = 48, + + //! A JavaScript single-quoted string. + JavaScriptSingleQuotedString = 49, + + //! A JavaScript symbol. + JavaScriptSymbol = 50, + + //! The end of a JavaScript line where a string is not closed. + JavaScriptUnclosedString = 51, + + //! A JavaScript regular expression. + JavaScriptRegex = 52, + + //! The start of an ASP JavaScript fragment. + ASPJavaScriptStart = 55, + + //! The default for ASP JavaScript. + ASPJavaScriptDefault = 56, + + //! An ASP JavaScript comment. + ASPJavaScriptComment = 57, + + //! An ASP JavaScript line comment. + ASPJavaScriptCommentLine = 58, + + //! An ASP JavaDoc style JavaScript comment. + ASPJavaScriptCommentDoc = 59, + + //! An ASP JavaScript number. + ASPJavaScriptNumber = 60, + + //! An ASP JavaScript word. + ASPJavaScriptWord = 61, + + //! An ASP JavaScript keyword. + ASPJavaScriptKeyword = 62, + + //! An ASP JavaScript double-quoted string. + ASPJavaScriptDoubleQuotedString = 63, + + //! An ASP JavaScript single-quoted string. + ASPJavaScriptSingleQuotedString = 64, + + //! An ASP JavaScript symbol. + ASPJavaScriptSymbol = 65, + + //! The end of an ASP JavaScript line where a string is not + //! closed. + ASPJavaScriptUnclosedString = 66, + + //! An ASP JavaScript regular expression. + ASPJavaScriptRegex = 67, + + //! The start of a VBScript fragment. + VBScriptStart = 70, + + //! The default for VBScript. + VBScriptDefault = 71, + + //! A VBScript comment. + VBScriptComment = 72, + + //! A VBScript number. + VBScriptNumber = 73, + + //! A VBScript keyword. + VBScriptKeyword = 74, + + //! A VBScript string. + VBScriptString = 75, + + //! A VBScript identifier. + VBScriptIdentifier = 76, + + //! The end of a VBScript line where a string is not closed. + VBScriptUnclosedString = 77, + + //! The start of an ASP VBScript fragment. + ASPVBScriptStart = 80, + + //! The default for ASP VBScript. + ASPVBScriptDefault = 81, + + //! An ASP VBScript comment. + ASPVBScriptComment = 82, + + //! An ASP VBScript number. + ASPVBScriptNumber = 83, + + //! An ASP VBScript keyword. + ASPVBScriptKeyword = 84, + + //! An ASP VBScript string. + ASPVBScriptString = 85, + + //! An ASP VBScript identifier. + ASPVBScriptIdentifier = 86, + + //! The end of an ASP VBScript line where a string is not + //! closed. + ASPVBScriptUnclosedString = 87, + + //! The start of a Python fragment. + PythonStart = 90, + + //! The default for Python. + PythonDefault = 91, + + //! A Python comment. + PythonComment = 92, + + //! A Python number. + PythonNumber = 93, + + //! A Python double-quoted string. + PythonDoubleQuotedString = 94, + + //! A Python single-quoted string. + PythonSingleQuotedString = 95, + + //! A Python keyword. + PythonKeyword = 96, + + //! A Python triple single-quoted string. + PythonTripleSingleQuotedString = 97, + + //! A Python triple double-quoted string. + PythonTripleDoubleQuotedString = 98, + + //! The name of a Python class. + PythonClassName = 99, + + //! The name of a Python function or method. + PythonFunctionMethodName = 100, + + //! A Python operator. + PythonOperator = 101, + + //! A Python identifier. + PythonIdentifier = 102, + + //! The start of an ASP Python fragment. + ASPPythonStart = 105, + + //! The default for ASP Python. + ASPPythonDefault = 106, + + //! An ASP Python comment. + ASPPythonComment = 107, + + //! An ASP Python number. + ASPPythonNumber = 108, + + //! An ASP Python double-quoted string. + ASPPythonDoubleQuotedString = 109, + + //! An ASP Python single-quoted string. + ASPPythonSingleQuotedString = 110, + + //! An ASP Python keyword. + ASPPythonKeyword = 111, + + //! An ASP Python triple single-quoted string. + ASPPythonTripleSingleQuotedString = 112, + + //! An ASP Python triple double-quoted string. + ASPPythonTripleDoubleQuotedString = 113, + + //! The name of an ASP Python class. + ASPPythonClassName = 114, + + //! The name of an ASP Python function or method. + ASPPythonFunctionMethodName = 115, + + //! An ASP Python operator. + ASPPythonOperator = 116, + + //! An ASP Python identifier + ASPPythonIdentifier = 117, + + //! The default for PHP. + PHPDefault = 118, + + //! A PHP double-quoted string. + PHPDoubleQuotedString = 119, + + //! A PHP single-quoted string. + PHPSingleQuotedString = 120, + + //! A PHP keyword. + PHPKeyword = 121, + + //! A PHP number. + PHPNumber = 122, + + //! A PHP variable. + PHPVariable = 123, + + //! A PHP comment. + PHPComment = 124, + + //! A PHP line comment. + PHPCommentLine = 125, + + //! A PHP double-quoted variable. + PHPDoubleQuotedVariable = 126, + + //! A PHP operator. + PHPOperator = 127 + }; + + //! Construct a QsciLexerHTML with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerHTML(QObject *parent = 0); + + //! Destroys the QsciLexerHTML instance. + virtual ~QsciLexerHTML(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the auto-completion fillup characters. + const char *autoCompletionFillups() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if tags are case sensitive. + //! + //! \sa setCaseSensitiveTags() + bool caseSensitiveTags() const {return case_sens_tags;} + + //! If \a enabled is true then Django templates are enabled. The default + //! is false. + //! + //! \sa djangoTemplates() + void setDjangoTemplates(bool enabled); + + //! Returns true if support for Django templates is enabled. + //! + //! \sa setDjangoTemplates() + bool djangoTemplates() const {return django_templates;} + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! Returns true if preprocessor blocks can be folded. + //! + //! \sa setFoldPreprocessor() + bool foldPreprocessor() const {return fold_preproc;} + + //! If \a fold is true then script comments can be folded. The default is + //! false. + //! + //! \sa foldScriptComments() + void setFoldScriptComments(bool fold); + + //! Returns true if script comments can be folded. + //! + //! \sa setFoldScriptComments() + bool foldScriptComments() const {return fold_script_comments;} + + //! If \a fold is true then script heredocs can be folded. The default is + //! false. + //! + //! \sa foldScriptHeredocs() + void setFoldScriptHeredocs(bool fold); + + //! Returns true if script heredocs can be folded. + //! + //! \sa setFoldScriptHeredocs() + bool foldScriptHeredocs() const {return fold_script_heredocs;} + + //! If \a enabled is true then Mako templates are enabled. The default is + //! false. + //! + //! \sa makoTemplates() + void setMakoTemplates(bool enabled); + + //! Returns true if support for Mako templates is enabled. + //! + //! \sa setMakoTemplates() + bool makoTemplates() const {return mako_templates;} + +public slots: + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then preprocessor blocks can be folded. The + //! default is false. + //! + //! \sa foldPreprocessor() + virtual void setFoldPreprocessor(bool fold); + + //! If \a sens is true then tags are case sensitive. The default is false. + //! + //! \sa caseSensitiveTags() + virtual void setCaseSensitiveTags(bool sens); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCompactProp(); + void setPreprocProp(); + void setCaseSensTagsProp(); + void setScriptCommentsProp(); + void setScriptHeredocsProp(); + void setDjangoProp(); + void setMakoProp(); + + bool fold_compact; + bool fold_preproc; + bool case_sens_tags; + bool fold_script_comments; + bool fold_script_heredocs; + bool django_templates; + bool mako_templates; + + QsciLexerHTML(const QsciLexerHTML &); + QsciLexerHTML &operator=(const QsciLexerHTML &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeridl.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeridl.h new file mode 100644 index 000000000..52e0c2f20 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeridl.h @@ -0,0 +1,64 @@ +// This defines the interface to the QsciLexerIDL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERIDL_H +#define QSCILEXERIDL_H + +#include + +#include +#include + + +//! \brief The QsciLexerIDL class encapsulates the Scintilla IDL +//! lexer. +class QSCINTILLA_EXPORT QsciLexerIDL : public QsciLexerCPP +{ + Q_OBJECT + +public: + //! Construct a QsciLexerIDL with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerIDL(QObject *parent = 0); + + //! Destroys the QsciLexerIDL instance. + virtual ~QsciLexerIDL(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the foreground colour of the text for style number \a style. + QColor defaultColor(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerIDL(const QsciLexerIDL &); + QsciLexerIDL &operator=(const QsciLexerIDL &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerintelhex.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerintelhex.h new file mode 100644 index 000000000..8a6aa3da5 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerintelhex.h @@ -0,0 +1,60 @@ +// This defines the interface to the QsciLexerIntelHex class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERINTELHEX_H +#define QSCILEXERINTELHEX_H + +#include + +#include +#include + + +//! \brief The QsciLexerIntelHex class encapsulates the Scintilla Intel Hex +//! lexer. +class QSCINTILLA_EXPORT QsciLexerIntelHex : public QsciLexerHex +{ + Q_OBJECT + +public: + //! Construct a QsciLexerIntelHex with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerIntelHex(QObject *parent = 0); + + //! Destroys the QsciLexerIntelHex instance. + virtual ~QsciLexerIntelHex(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. + const char *lexer() const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerIntelHex(const QsciLexerIntelHex &); + QsciLexerIntelHex &operator=(const QsciLexerIntelHex &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjava.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjava.h new file mode 100644 index 000000000..5111c2790 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjava.h @@ -0,0 +1,55 @@ +// This defines the interface to the QsciLexerJava class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERJAVA_H +#define QSCILEXERJAVA_H + +#include + +#include +#include + + +//! \brief The QsciLexerJava class encapsulates the Scintilla Java lexer. +class QSCINTILLA_EXPORT QsciLexerJava : public QsciLexerCPP +{ + Q_OBJECT + +public: + //! Construct a QsciLexerJava with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerJava(QObject *parent = 0); + + //! Destroys the QsciLexerJava instance. + virtual ~QsciLexerJava(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + +private: + QsciLexerJava(const QsciLexerJava &); + QsciLexerJava &operator=(const QsciLexerJava &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjavascript.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjavascript.h new file mode 100644 index 000000000..94afc7544 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjavascript.h @@ -0,0 +1,81 @@ +// This defines the interface to the QsciLexerJavaScript class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERJSCRIPT_H +#define QSCILEXERJSCRIPT_H + +#include + +#include +#include + + +//! \brief The QsciLexerJavaScript class encapsulates the Scintilla JavaScript +//! lexer. +class QSCINTILLA_EXPORT QsciLexerJavaScript : public QsciLexerCPP +{ + Q_OBJECT + +public: + //! Construct a QsciLexerJavaScript with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerJavaScript(QObject *parent = 0); + + //! Destroys the QsciLexerJavaScript instance. + virtual ~QsciLexerJavaScript(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + friend class QsciLexerHTML; + + static const char *keywordClass; + + QsciLexerJavaScript(const QsciLexerJavaScript &); + QsciLexerJavaScript &operator=(const QsciLexerJavaScript &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjson.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjson.h new file mode 100644 index 000000000..7e5bf2900 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerjson.h @@ -0,0 +1,184 @@ +// This defines the interface to the QsciLexerJSON class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERJSON_H +#define QSCILEXERJSON_H + +#include + +#include +#include + + +//! \brief The QsciLexerJSON class encapsulates the Scintilla JSON lexer. +class QSCINTILLA_EXPORT QsciLexerJSON : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! JSON lexer. + enum { + //! The default. + Default = 0, + + //! A number. + Number = 1, + + //! A string. + String = 2, + + //! An unclosed string. + UnclosedString = 3, + + //! A property. + Property = 4, + + //! An escape sequence. + EscapeSequence = 5, + + //! A line comment. + CommentLine = 6, + + //! A block comment. + CommentBlock = 7, + + //! An operator. + Operator = 8, + + //! An Internationalised Resource Identifier (IRI). + IRI = 9, + + //! A JSON-LD compact IRI. + IRICompact = 10, + + //! A JSON keyword. + Keyword = 11, + + //! A JSON-LD keyword. + KeywordLD = 12, + + //! A parsing error. + Error = 13, + }; + + //! Construct a QsciLexerJSON with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerJSON(QObject *parent = 0); + + //! Destroys the QsciLexerJSON instance. + virtual ~QsciLexerJSON(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a highlight is true then line and block comments will be + //! highlighted. The default is true. + //! + //! \sa hightlightComments() + void setHighlightComments(bool highlight); + + //! Returns true if line and block comments are highlighted + //! + //! \sa setHightlightComments() + bool highlightComments() const {return allow_comments;} + + //! If \a highlight is true then escape sequences in strings are + //! highlighted. The default is true. + //! + //! \sa highlightEscapeSequences() + void setHighlightEscapeSequences(bool highlight); + + //! Returns true if escape sequences in strings are highlighted. + //! + //! \sa setHighlightEscapeSequences() + bool highlightEscapeSequences() const {return escape_sequence;} + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + void setFoldCompact(bool fold); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAllowCommentsProp(); + void setEscapeSequenceProp(); + void setCompactProp(); + + bool allow_comments; + bool escape_sequence; + bool fold_compact; + + QsciLexerJSON(const QsciLexerJSON &); + QsciLexerJSON &operator=(const QsciLexerJSON &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerlua.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerlua.h new file mode 100644 index 000000000..ea1cee38f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerlua.h @@ -0,0 +1,194 @@ +// This defines the interface to the QsciLexerLua class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERLUA_H +#define QSCILEXERLUA_H + +#include + +#include +#include + + +//! \brief The QsciLexerLua class encapsulates the Scintilla Lua +//! lexer. +class QSCINTILLA_EXPORT QsciLexerLua : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Lua lexer. + enum { + //! The default. + Default = 0, + + //! A block comment. + Comment = 1, + + //! A line comment. + LineComment = 2, + + //! A number. + Number = 4, + + //! A keyword. + Keyword = 5, + + //! A string. + String = 6, + + //! A character. + Character = 7, + + //! A literal string. + LiteralString = 8, + + //! Preprocessor + Preprocessor = 9, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! The end of a line where a string is not closed. + UnclosedString = 12, + + //! Basic functions. + BasicFunctions = 13, + + //! String, table and maths functions. + StringTableMathsFunctions = 14, + + //! Coroutines, I/O and system facilities. + CoroutinesIOSystemFacilities = 15, + + //! A keyword defined in keyword set number 5. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet5 = 16, + + //! A keyword defined in keyword set number 6. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet6 = 17, + + //! A keyword defined in keyword set number 7. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet7 = 18, + + //! A keyword defined in keyword set number 8. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet8 = 19, + + //! A label. + Label = 20 + }; + + //! Construct a QsciLexerLua with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerLua(QObject *parent = 0); + + //! Destroys the QsciLexerLua instance. + virtual ~QsciLexerLua(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + +public slots: + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCompactProp(); + + bool fold_compact; + + QsciLexerLua(const QsciLexerLua &); + QsciLexerLua &operator=(const QsciLexerLua &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermakefile.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermakefile.h new file mode 100644 index 000000000..76c1bbca9 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermakefile.h @@ -0,0 +1,105 @@ +// This defines the interface to the QsciLexerMakefile class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERMAKEFILE_H +#define QSCILEXERMAKEFILE_H + +#include + +#include +#include + + +//! \brief The QsciLexerMakefile class encapsulates the Scintilla +//! Makefile lexer. +class QSCINTILLA_EXPORT QsciLexerMakefile : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Makefile lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A pre-processor directive. + Preprocessor = 2, + + //! A variable. + Variable = 3, + + //! An operator. + Operator = 4, + + //! A target. + Target = 5, + + //! An error. + Error = 9 + }; + + //! Construct a QsciLexerMakefile with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerMakefile(QObject *parent = 0); + + //! Destroys the QsciLexerMakefile instance. + virtual ~QsciLexerMakefile(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerMakefile(const QsciLexerMakefile &); + QsciLexerMakefile &operator=(const QsciLexerMakefile &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermarkdown.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermarkdown.h new file mode 100644 index 000000000..dc257150a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermarkdown.h @@ -0,0 +1,148 @@ +// This defines the interface to the QsciLexerMarkdown class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERMARKDOWN_H +#define QSCILEXERMARKDOWN_H + +#include + +#include +#include + + +//! \brief The QsciLexerMarkdown class encapsulates the Scintilla Markdown +//! lexer. +class QSCINTILLA_EXPORT QsciLexerMarkdown : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Markdown lexer. + + // Note that some values are omitted (ie. LINE_BEGIN and PRECHAR) as these + // seem to be internal state information rather than indicating that text + // should be styled differently. + enum { + //! The default. + Default = 0, + + //! Special (e.g. end-of-line codes if enabled). + Special = 1, + + //! Strong emphasis using double asterisks. + StrongEmphasisAsterisks = 2, + + //! Strong emphasis using double underscores. + StrongEmphasisUnderscores = 3, + + //! Emphasis using single asterisks. + EmphasisAsterisks = 4, + + //! Emphasis using single underscores. + EmphasisUnderscores = 5, + + //! A level 1 header. + Header1 = 6, + + //! A level 2 header. + Header2 = 7, + + //! A level 3 header. + Header3 = 8, + + //! A level 4 header. + Header4 = 9, + + //! A level 5 header. + Header5 = 10, + + //! A level 6 header. + Header6 = 11, + + //! Pre-char (up to three indent spaces, e.g. for a sub-list). + Prechar = 12, + + //! An unordered list item. + UnorderedListItem = 13, + + //! An ordered list item. + OrderedListItem = 14, + + //! A block quote. + BlockQuote = 15, + + //! Strike out. + StrikeOut = 16, + + //! A horizontal rule. + HorizontalRule = 17, + + //! A link. + Link = 18, + + //! Code between backticks. + CodeBackticks = 19, + + //! Code between double backticks. + CodeDoubleBackticks = 20, + + //! A code block. + CodeBlock = 21, + }; + + //! Construct a QsciLexerMarkdown with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerMarkdown(QObject *parent = 0); + + //! Destroys the QsciLexerMarkdown instance. + virtual ~QsciLexerMarkdown(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerMarkdown(const QsciLexerMarkdown &); + QsciLexerMarkdown &operator=(const QsciLexerMarkdown &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermasm.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermasm.h new file mode 100644 index 000000000..81b90b895 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermasm.h @@ -0,0 +1,54 @@ +// This defines the interface to the QsciLexerMASM class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERMASM_H +#define QSCILEXERMASM_H + +#include + +#include +#include + + +//! \brief The QsciLexerMASM class encapsulates the Scintilla MASM lexer. +class QSCINTILLA_EXPORT QsciLexerMASM : public QsciLexerAsm +{ + Q_OBJECT + +public: + //! Construct a QsciLexerMASM with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerMASM(QObject *parent = 0); + + //! Destroys the QsciLexerMASM instance. + virtual ~QsciLexerMASM(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. + const char *lexer() const; + +private: + QsciLexerMASM(const QsciLexerMASM &); + QsciLexerMASM &operator=(const QsciLexerMASM &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermatlab.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermatlab.h new file mode 100644 index 000000000..c04e67bdb --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexermatlab.h @@ -0,0 +1,104 @@ +// This defines the interface to the QsciLexerMatlab class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERMATLAB_H +#define QSCILEXERMATLAB_H + +#include + +#include +#include + + +//! \brief The QsciLexerMatlab class encapsulates the Scintilla Matlab file +//! lexer. +class QSCINTILLA_EXPORT QsciLexerMatlab : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Matlab file lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A command. + Command = 2, + + //! A number. + Number = 3, + + //! A keyword. + Keyword = 4, + + //! A single quoted string. + SingleQuotedString = 5, + + //! An operator + Operator = 6, + + //! An identifier. + Identifier = 7, + + //! A double quoted string. + DoubleQuotedString = 8 + }; + + //! Construct a QsciLexerMatlab with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerMatlab(QObject *parent = 0); + + //! Destroys the QsciLexerMatlab instance. + virtual ~QsciLexerMatlab(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerMatlab(const QsciLexerMatlab &); + QsciLexerMatlab &operator=(const QsciLexerMatlab &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexernasm.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexernasm.h new file mode 100644 index 000000000..0a8e8eb7c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexernasm.h @@ -0,0 +1,54 @@ +// This defines the interface to the QsciLexerNASM class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERNASM_H +#define QSCILEXERNASM_H + +#include + +#include +#include + + +//! \brief The QsciLexerNASM class encapsulates the Scintilla NASM lexer. +class QSCINTILLA_EXPORT QsciLexerNASM : public QsciLexerAsm +{ + Q_OBJECT + +public: + //! Construct a QsciLexerNASM with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerNASM(QObject *parent = 0); + + //! Destroys the QsciLexerNASM instance. + virtual ~QsciLexerNASM(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. + const char *lexer() const; + +private: + QsciLexerNASM(const QsciLexerNASM &); + QsciLexerNASM &operator=(const QsciLexerNASM &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeroctave.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeroctave.h new file mode 100644 index 000000000..dafbadfb7 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeroctave.h @@ -0,0 +1,60 @@ +// This defines the interface to the QsciLexerOctave class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXEROCTAVE_H +#define QSCILEXEROCTAVE_H + +#include + +#include +#include + + +//! \brief The QsciLexerOctave class encapsulates the Scintilla Octave file +//! lexer. +class QSCINTILLA_EXPORT QsciLexerOctave : public QsciLexerMatlab +{ + Q_OBJECT + +public: + //! Construct a QsciLexerOctave with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerOctave(QObject *parent = 0); + + //! Destroys the QsciLexerOctave instance. + virtual ~QsciLexerOctave(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + +private: + QsciLexerOctave(const QsciLexerOctave &); + QsciLexerOctave &operator=(const QsciLexerOctave &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpascal.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpascal.h new file mode 100644 index 000000000..f8caf119f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpascal.h @@ -0,0 +1,227 @@ +// This defines the interface to the QsciLexerPascal class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPASCAL_H +#define QSCILEXERPASCAL_H + +#include + +#include +#include + + +//! \brief The QsciLexerPascal class encapsulates the Scintilla Pascal lexer. +class QSCINTILLA_EXPORT QsciLexerPascal : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! C++ lexer. + enum { + //! The default. + Default = 0, + + //! An identifier + Identifier = 1, + + //! A '{ ... }' style comment. + Comment = 2, + + //! A '(* ... *)' style comment. + CommentParenthesis = 3, + + //! A comment line. + CommentLine = 4, + + //! A '{$ ... }' style pre-processor block. + PreProcessor = 5, + + //! A '(*$ ... *)' style pre-processor block. + PreProcessorParenthesis = 6, + + //! A number. + Number = 7, + + //! A hexadecimal number. + HexNumber = 8, + + //! A keyword. + Keyword = 9, + + //! A single-quoted string. + SingleQuotedString = 10, + + //! The end of a line where a string is not closed. + UnclosedString = 11, + + //! A character. + Character = 12, + + //! An operator. + Operator = 13, + + //! Inline Asm. + Asm = 14 + }; + + //! Construct a QsciLexerPascal with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerPascal(QObject *parent = 0); + + //! Destroys the QsciLexerPascal instance. + virtual ~QsciLexerPascal(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a + //! particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! Returns true if preprocessor blocks can be folded. + //! + //! \sa setFoldPreprocessor() + bool foldPreprocessor() const; + + //! If \a enabled is true then some keywords will only be highlighted in an + //! appropriate context (similar to how the Delphi IDE works). The default + //! is true. + //! + //! \sa smartHighlighting() + void setSmartHighlighting(bool enabled); + + //! Returns true if some keywords will only be highlighted in an + //! appropriate context (similar to how the Delphi IDE works). + //! + //! \sa setSmartHighlighting() + bool smartHighlighting() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then preprocessor blocks can be folded. The + //! default is true. + //! + //! \sa foldPreprocessor() + virtual void setFoldPreprocessor(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setPreprocProp(); + void setSmartHighlightProp(); + + bool fold_comments; + bool fold_compact; + bool fold_preproc; + bool smart_highlight; + + QsciLexerPascal(const QsciLexerPascal &); + QsciLexerPascal &operator=(const QsciLexerPascal &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerperl.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerperl.h new file mode 100644 index 000000000..0a5f77c67 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerperl.h @@ -0,0 +1,312 @@ +// This defines the interface to the QsciLexerPerl class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPERL_H +#define QSCILEXERPERL_H + +#include + +#include +#include + + +//! \brief The QsciLexerPerl class encapsulates the Scintilla Perl +//! lexer. +class QSCINTILLA_EXPORT QsciLexerPerl : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Perl lexer. + enum { + //! The default. + Default = 0, + + //! An error. + Error = 1, + + //! A comment. + Comment = 2, + + //! A POD. + POD = 3, + + //! A number. + Number = 4, + + //! A keyword. + Keyword = 5, + + //! A double-quoted string. + DoubleQuotedString = 6, + + //! A single-quoted string. + SingleQuotedString = 7, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! A scalar. + Scalar = 12, + + //! An array. + Array = 13, + + //! A hash. + Hash = 14, + + //! A symbol table. + SymbolTable = 15, + + //! A regular expression. + Regex = 17, + + //! A substitution. + Substitution = 18, + + //! Backticks. + Backticks = 20, + + //! A data section. + DataSection = 21, + + //! A here document delimiter. + HereDocumentDelimiter = 22, + + //! A single quoted here document. + SingleQuotedHereDocument = 23, + + //! A double quoted here document. + DoubleQuotedHereDocument = 24, + + //! A backtick here document. + BacktickHereDocument = 25, + + //! A quoted string (q). + QuotedStringQ = 26, + + //! A quoted string (qq). + QuotedStringQQ = 27, + + //! A quoted string (qx). + QuotedStringQX = 28, + + //! A quoted string (qr). + QuotedStringQR = 29, + + //! A quoted string (qw). + QuotedStringQW = 30, + + //! A verbatim POD. + PODVerbatim = 31, + + //! A Subroutine prototype. + SubroutinePrototype = 40, + + //! A format identifier. + FormatIdentifier = 41, + + //! A format body. + FormatBody = 42, + + //! A double-quoted string (interpolated variable). + DoubleQuotedStringVar = 43, + + //! A translation. + Translation = 44, + + //! A regular expression (interpolated variable). + RegexVar = 54, + + //! A substitution (interpolated variable). + SubstitutionVar = 55, + + //! Backticks (interpolated variable). + BackticksVar = 57, + + //! A double quoted here document (interpolated variable). + DoubleQuotedHereDocumentVar = 61, + + //! A backtick here document (interpolated variable). + BacktickHereDocumentVar = 62, + + //! A quoted string (qq, interpolated variable). + QuotedStringQQVar = 64, + + //! A quoted string (qx, interpolated variable). + QuotedStringQXVar = 65, + + //! A quoted string (qr, interpolated variable). + QuotedStringQRVar = 66 + }; + + //! Construct a QsciLexerPerl with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerPerl(QObject *parent = 0); + + //! Destroys the QsciLexerPerl instance. + virtual ~QsciLexerPerl(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number + //! \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a fold is true then "} else {" lines can be folded. The default is + //! false. + //! + //! \sa foldAtElse() + void setFoldAtElse(bool fold); + + //! Returns true if "} else {" lines can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const {return fold_atelse;} + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! If \a fold is true then packages can be folded. The default is true. + //! + //! \sa foldPackages() + void setFoldPackages(bool fold); + + //! Returns true if packages can be folded. + //! + //! \sa setFoldPackages() + bool foldPackages() const; + + //! If \a fold is true then POD blocks can be folded. The default is true. + //! + //! \sa foldPODBlocks() + void setFoldPODBlocks(bool fold); + + //! Returns true if POD blocks can be folded. + //! + //! \sa setFoldPODBlocks() + bool foldPODBlocks() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAtElseProp(); + void setCommentProp(); + void setCompactProp(); + void setPackagesProp(); + void setPODBlocksProp(); + + bool fold_atelse; + bool fold_comments; + bool fold_compact; + bool fold_packages; + bool fold_pod_blocks; + + QsciLexerPerl(const QsciLexerPerl &); + QsciLexerPerl &operator=(const QsciLexerPerl &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpo.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpo.h new file mode 100644 index 000000000..083308f62 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpo.h @@ -0,0 +1,163 @@ +// This defines the interface to the QsciLexerPO class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPO_H +#define QSCILEXERPO_H + +#include + +#include +#include + + +//! \brief The QsciLexerPO class encapsulates the Scintilla PO lexer. +class QSCINTILLA_EXPORT QsciLexerPO : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! PO lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A message identifier. + MessageId = 2, + + //! The text of a message identifier. + MessageIdText = 3, + + //! A message string. + MessageString = 4, + + //! The text of a message string. + MessageStringText = 5, + + //! A message context. + MessageContext = 6, + + //! The text of a message context. + MessageContextText = 7, + + //! The "fuzzy" flag. + Fuzzy = 8, + + //! A programmer comment. + ProgrammerComment = 9, + + //! A reference. + Reference = 10, + + //! A flag. + Flags = 11, + + //! A message identifier text end-of-line. + MessageIdTextEOL = 12, + + //! A message string text end-of-line. + MessageStringTextEOL = 13, + + //! A message context text end-of-line. + MessageContextTextEOL = 14 + }; + + //! Construct a QsciLexerPO with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerPO(QObject *parent = 0); + + //! Destroys the QsciLexerPO instance. + virtual ~QsciLexerPO(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + + bool fold_comments; + bool fold_compact; + + QsciLexerPO(const QsciLexerPO &); + QsciLexerPO &operator=(const QsciLexerPO &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpostscript.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpostscript.h new file mode 100644 index 000000000..1af088dd2 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpostscript.h @@ -0,0 +1,204 @@ +// This defines the interface to the QsciLexerPostScript class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPOSTSCRIPT_H +#define QSCILEXERPOSTSCRIPT_H + +#include + +#include +#include + + +//! \brief The QsciLexerPostScript class encapsulates the Scintilla PostScript +//! lexer. +class QSCINTILLA_EXPORT QsciLexerPostScript : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! PostScript lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A DSC comment. + DSCComment = 2, + + //! A DSC comment value. + DSCCommentValue = 3, + + //! A number. + Number = 4, + + //! A name. + Name = 5, + + //! A keyword. + Keyword = 6, + + //! A literal. + Literal = 7, + + //! An immediately evaluated literal. + ImmediateEvalLiteral = 8, + + //! Array parenthesis. + ArrayParenthesis = 9, + + //! Dictionary parenthesis. + DictionaryParenthesis = 10, + + //! Procedure parenthesis. + ProcedureParenthesis = 11, + + //! Text. + Text = 12, + + //! A hexadecimal string. + HexString = 13, + + //! A base85 string. + Base85String = 14, + + //! A bad string character. + BadStringCharacter = 15 + }; + + //! Construct a QsciLexerPostScript with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerPostScript(QObject *parent = 0); + + //! Destroys the QsciLexerPostScript instance. + virtual ~QsciLexerPostScript(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. Set 5 can be used to provide + //! additional user defined keywords. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if tokens should be marked. + //! + //! \sa setTokenize() + bool tokenize() const; + + //! Returns the PostScript level. + //! + //! \sa setLevel() + int level() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! Returns true if else blocks can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const; + +public slots: + //! If \a tokenize is true then tokens are marked. The default is false. + //! + //! \sa tokenize() + virtual void setTokenize(bool tokenize); + + //! The PostScript level is set to \a level. The default is 3. + //! + //! \sa level() + virtual void setLevel(int level); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then else blocks can be folded. The default is + //! false. + //! + //! \sa foldAtElse() + virtual void setFoldAtElse(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setTokenizeProp(); + void setLevelProp(); + void setCompactProp(); + void setAtElseProp(); + + bool ps_tokenize; + int ps_level; + bool fold_compact; + bool fold_atelse; + + QsciLexerPostScript(const QsciLexerPostScript &); + QsciLexerPostScript &operator=(const QsciLexerPostScript &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpov.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpov.h new file mode 100644 index 000000000..1f522ac70 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpov.h @@ -0,0 +1,203 @@ +// This defines the interface to the QsciLexerPOV class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPOV_H +#define QSCILEXERPOV_H + +#include + +#include +#include + + +//! \brief The QsciLexerPOV class encapsulates the Scintilla POV lexer. +class QSCINTILLA_EXPORT QsciLexerPOV : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! POV lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A comment line. + CommentLine = 2, + + //! A number. + Number = 3, + + //! An operator. + Operator = 4, + + //! An identifier + Identifier = 5, + + //! A string. + String = 6, + + //! The end of a line where a string is not closed. + UnclosedString = 7, + + //! A directive. + Directive = 8, + + //! A bad directive. + BadDirective = 9, + + //! Objects, CSG and appearance. + ObjectsCSGAppearance = 10, + + //! Types, modifiers and items. + TypesModifiersItems = 11, + + //! Predefined identifiers. + PredefinedIdentifiers = 12, + + //! Predefined identifiers. + PredefinedFunctions = 13, + + //! A keyword defined in keyword set number 6. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet6 = 14, + + //! A keyword defined in keyword set number 7. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet7 = 15, + + //! A keyword defined in keyword set number 8. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet8 = 16 + }; + + //! Construct a QsciLexerPOV with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerPOV(QObject *parent = 0); + + //! Destroys the QsciLexerPOV instance. + virtual ~QsciLexerPOV(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! Returns true if directives can be folded. + //! + //! \sa setFoldDirectives() + bool foldDirectives() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then directives can be folded. The default is + //! false. + //! + //! \sa foldDirectives() + virtual void setFoldDirectives(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setDirectiveProp(); + + bool fold_comments; + bool fold_compact; + bool fold_directives; + + QsciLexerPOV(const QsciLexerPOV &); + QsciLexerPOV &operator=(const QsciLexerPOV &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerproperties.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerproperties.h new file mode 100644 index 000000000..547de603f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerproperties.h @@ -0,0 +1,150 @@ +// This defines the interface to the QsciLexerProperties class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPROPERTIES_H +#define QSCILEXERPROPERTIES_H + +#include + +#include +#include + + +//! \brief The QsciLexerProperties class encapsulates the Scintilla +//! Properties lexer. +class QSCINTILLA_EXPORT QsciLexerProperties : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Properties lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A section. + Section = 2, + + //! An assignment operator. + Assignment = 3, + + //! A default value. + DefaultValue = 4, + + //! A key. + Key = 5 + }; + + //! Construct a QsciLexerProperties with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerProperties(QObject *parent = 0); + + //! Destroys the QsciLexerProperties instance. + virtual ~QsciLexerProperties(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the descriptive name for style number \a style. If the style + //! is invalid for this language then an empty QString is returned. This + //! is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! If \a enable is true then initial spaces in a line are allowed. The + //! default is true. + //! + //! \sa initialSpaces() + void setInitialSpaces(bool enable); + + //! Returns true if initial spaces in a line are allowed. + //! + //! \sa setInitialSpaces() + bool initialSpaces() const {return initial_spaces;} + +public slots: + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCompactProp(); + void setInitialSpacesProp(); + + bool fold_compact; + bool initial_spaces; + + QsciLexerProperties(const QsciLexerProperties &); + QsciLexerProperties &operator=(const QsciLexerProperties &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpython.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpython.h new file mode 100644 index 000000000..240d96efc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerpython.h @@ -0,0 +1,333 @@ +// This defines the interface to the QsciLexerPython class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERPYTHON_H +#define QSCILEXERPYTHON_H + +#include + +#include +#include +#include "Qsci/qsciscintillabase.h" + + +//! \brief The QsciLexerPython class encapsulates the Scintilla Python lexer. +class QSCINTILLA_EXPORT QsciLexerPython : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Python lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A number. + Number = 2, + + //! A double-quoted string. + DoubleQuotedString = 3, + + //! A single-quoted string. + SingleQuotedString = 4, + + //! A keyword. + Keyword = 5, + + //! A triple single-quoted string. + TripleSingleQuotedString = 6, + + //! A triple double-quoted string. + TripleDoubleQuotedString = 7, + + //! The name of a class. + ClassName = 8, + + //! The name of a function or method. + FunctionMethodName = 9, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! A comment block. + CommentBlock = 12, + + //! The end of a line where a string is not closed. + UnclosedString = 13, + + //! A highlighted identifier. These are defined by keyword set + //! 2. Reimplement keywords() to define keyword set 2. + HighlightedIdentifier = 14, + + //! A decorator. + Decorator = 15, + + //! A double-quoted f-string. + DoubleQuotedFString = 16, + + //! A single-quoted f-string. + SingleQuotedFString = 17, + + //! A triple single-quoted f-string. + TripleSingleQuotedFString = 18, + + //! A triple double-quoted f-string. + TripleDoubleQuotedFString = 19, + }; + + //! This enum defines the different conditions that can cause + //! indentations to be displayed as being bad. + enum IndentationWarning { + //! Bad indentation is not displayed differently. + NoWarning = 0, + + //! The indentation is inconsistent when compared to the + //! previous line, ie. it is made up of a different combination + //! of tabs and/or spaces. + Inconsistent = 1, + + //! The indentation is made up of spaces followed by tabs. + TabsAfterSpaces = 2, + + //! The indentation contains spaces. + Spaces = 3, + + //! The indentation contains tabs. + Tabs = 4 + }; + + //! Construct a QsciLexerPython with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerPython(QObject *parent = 0); + + //! Destroys the QsciLexerPython instance. + virtual ~QsciLexerPython(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns the number of lines prior to the current one when + //! determining the scope of a block when auto-indenting. + int blockLookback() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! \internal Returns the view used for indentation guides. + virtual int indentationGuideView() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if indented comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + void setFoldCompact(bool fold); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! Returns true if triple quoted strings can be folded. + //! + //! \sa setFoldQuotes() + bool foldQuotes() const {return fold_quotes;} + + //! Returns the condition that will cause bad indentations to be + //! displayed. + //! + //! \sa setIndentationWarning() + QsciLexerPython::IndentationWarning indentationWarning() const {return indent_warn;} + + //! If \a enabled is true then sub-identifiers defined in keyword set 2 + //! will be highlighted. For example, if it is false and "open" is defined + //! in keyword set 2 then "foo.open" will not be highlighted. The default + //! is true. + //! + //! \sa highlightSubidentifiers() + void setHighlightSubidentifiers(bool enabled); + + //! Returns true if string literals are allowed to span newline characters. + //! + //! \sa setHighlightSubidentifiers() + bool highlightSubidentifiers() const {return highlight_subids;} + + //! If \a allowed is true then string literals are allowed to span newline + //! characters. The default is false. + //! + //! \sa stringsOverNewlineAllowed() + void setStringsOverNewlineAllowed(bool allowed); + + //! Returns true if string literals are allowed to span newline characters. + //! + //! \sa setStringsOverNewlineAllowed() + bool stringsOverNewlineAllowed() const {return strings_over_newline;} + + //! If \a allowed is true then Python v2 unicode string literals (e.g. + //! u"utf8") are allowed. The default is true. + //! + //! \sa v2UnicodeAllowed() + void setV2UnicodeAllowed(bool allowed); + + //! Returns true if Python v2 unicode string literals (e.g. u"utf8") are + //! allowed. + //! + //! \sa setV2UnicodeAllowed() + bool v2UnicodeAllowed() const {return v2_unicode;} + + //! If \a allowed is true then Python v3 binary and octal literals (e.g. + //! 0b1011, 0o712) are allowed. The default is true. + //! + //! \sa v3BinaryOctalAllowed() + void setV3BinaryOctalAllowed(bool allowed); + + //! Returns true if Python v3 binary and octal literals (e.g. 0b1011, + //! 0o712) are allowed. + //! + //! \sa setV3BinaryOctalAllowed() + bool v3BinaryOctalAllowed() const {return v3_binary_octal;} + + //! If \a allowed is true then Python v3 bytes string literals (e.g. + //! b"bytes") are allowed. The default is true. + //! + //! \sa v3BytesAllowed() + void setV3BytesAllowed(bool allowed); + + //! Returns true if Python v3 bytes string literals (e.g. b"bytes") are + //! allowed. + //! + //! \sa setV3BytesAllowed() + bool v3BytesAllowed() const {return v3_bytes;} + +public slots: + //! If \a fold is true then indented comment blocks can be folded. The + //! default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then triple quoted strings can be folded. The + //! default is false. + //! + //! \sa foldQuotes() + virtual void setFoldQuotes(bool fold); + + //! Sets the condition that will cause bad indentations to be + //! displayed. + //! + //! \sa indentationWarning() + virtual void setIndentationWarning(QsciLexerPython::IndentationWarning warn); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setQuotesProp(); + void setTabWhingeProp(); + void setStringsOverNewlineProp(); + void setV2UnicodeProp(); + void setV3BinaryOctalProp(); + void setV3BytesProp(); + void setHighlightSubidsProp(); + + bool fold_comments; + bool fold_compact; + bool fold_quotes; + IndentationWarning indent_warn; + bool strings_over_newline; + bool v2_unicode; + bool v3_binary_octal; + bool v3_bytes; + bool highlight_subids; + + friend class QsciLexerHTML; + + static const char *keywordClass; + + QsciLexerPython(const QsciLexerPython &); + QsciLexerPython &operator=(const QsciLexerPython &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerruby.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerruby.h new file mode 100644 index 000000000..b09c79952 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerruby.h @@ -0,0 +1,240 @@ +// This defines the interface to the QsciLexerRuby class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERRUBY_H +#define QSCILEXERRUBY_H + +#include + +#include +#include + + +//! \brief The QsciLexerRuby class encapsulates the Scintilla Ruby lexer. +class QSCINTILLA_EXPORT QsciLexerRuby : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Ruby lexer. + enum { + //! The default. + Default = 0, + + //! An error. + Error = 1, + + //! A comment. + Comment = 2, + + //! A POD. + POD = 3, + + //! A number. + Number = 4, + + //! A keyword. + Keyword = 5, + + //! A double-quoted string. + DoubleQuotedString = 6, + + //! A single-quoted string. + SingleQuotedString = 7, + + //! The name of a class. + ClassName = 8, + + //! The name of a function or method. + FunctionMethodName = 9, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! A regular expression. + Regex = 12, + + //! A global. + Global = 13, + + //! A symbol. + Symbol = 14, + + //! The name of a module. + ModuleName = 15, + + //! An instance variable. + InstanceVariable = 16, + + //! A class variable. + ClassVariable = 17, + + //! Backticks. + Backticks = 18, + + //! A data section. + DataSection = 19, + + //! A here document delimiter. + HereDocumentDelimiter = 20, + + //! A here document. + HereDocument = 21, + + //! A %q string. + PercentStringq = 24, + + //! A %Q string. + PercentStringQ = 25, + + //! A %x string. + PercentStringx = 26, + + //! A %r string. + PercentStringr = 27, + + //! A %w string. + PercentStringw = 28, + + //! A demoted keyword. + DemotedKeyword = 29, + + //! stdin. + Stdin = 30, + + //! stdout. + Stdout = 31, + + //! stderr. + Stderr = 40 + }; + + //! Construct a QsciLexerRuby with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerRuby(QObject *parent = 0); + + //! Destroys the QsciLexerRuby instance. + virtual ~QsciLexerRuby(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The style is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a + //! particular style that define the start of a block for + //! auto-indentation. The style is returned via \a style. + const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultpaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the style + //! is invalid for this language then an empty QString is returned. This + //! is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + void setFoldComments(bool fold); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + void setFoldCompact(bool fold); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs, const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs, const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + + bool fold_comments; + bool fold_compact; + + QsciLexerRuby(const QsciLexerRuby &); + QsciLexerRuby &operator=(const QsciLexerRuby &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerspice.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerspice.h new file mode 100644 index 000000000..364ef578c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerspice.h @@ -0,0 +1,106 @@ +// This defines the interface to the QsciLexerSpice class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERSPICE_H +#define QSCILEXERSPICE_H + +#include + +#include +#include + + +//! \brief The QsciLexerSpice class encapsulates the Scintilla Spice lexer. +class QSCINTILLA_EXPORT QsciLexerSpice : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Spice lexer. + enum { + //! The default. + Default = 0, + + //! An identifier. + Identifier = 1, + + //! A command. + Command = 2, + + //! A function. + Function = 3, + + //! A parameter. + Parameter = 4, + + //! A number. + Number = 5, + + //! A delimiter. + Delimiter = 6, + + //! A value. + Value = 7, + + //! A comment. + Comment = 8 + }; + + //! Construct a QsciLexerSpice with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerSpice(QObject *parent = 0); + + //! Destroys the QsciLexerSpice instance. + virtual ~QsciLexerSpice(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerSpice(const QsciLexerSpice &); + QsciLexerSpice &operator=(const QsciLexerSpice &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersql.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersql.h new file mode 100644 index 000000000..93b64fc67 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersql.h @@ -0,0 +1,286 @@ +// This defines the interface to the QsciLexerSQL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERSQL_H +#define QSCILEXERSQL_H + +#include + +#include +#include + + +//! \brief The QsciLexerSQL class encapsulates the Scintilla SQL lexer. +class QSCINTILLA_EXPORT QsciLexerSQL : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! SQL lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A line comment. + CommentLine = 2, + + //! A JavaDoc/Doxygen style comment. + CommentDoc = 3, + + //! A number. + Number = 4, + + //! A keyword. + Keyword = 5, + + //! A double-quoted string. + DoubleQuotedString = 6, + + //! A single-quoted string. + SingleQuotedString = 7, + + //! An SQL*Plus keyword. + PlusKeyword = 8, + + //! An SQL*Plus prompt. + PlusPrompt = 9, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! An SQL*Plus comment. + PlusComment = 13, + + //! A '#' line comment. + CommentLineHash = 15, + + //! A JavaDoc/Doxygen keyword. + CommentDocKeyword = 17, + + //! A JavaDoc/Doxygen keyword error. + CommentDocKeywordError = 18, + + //! A keyword defined in keyword set number 5. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + //! Note that keywords must be defined using lower case. + KeywordSet5 = 19, + + //! A keyword defined in keyword set number 6. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + //! Note that keywords must be defined using lower case. + KeywordSet6 = 20, + + //! A keyword defined in keyword set number 7. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + //! Note that keywords must be defined using lower case. + KeywordSet7 = 21, + + //! A keyword defined in keyword set number 8. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + //! Note that keywords must be defined using lower case. + KeywordSet8 = 22, + + //! A quoted identifier. + QuotedIdentifier = 23, + + //! A quoted operator. + QuotedOperator = 24, + }; + + //! Construct a QsciLexerSQL with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerSQL(QObject *parent = 0); + + //! Destroys the QsciLexerSQL instance. + virtual ~QsciLexerSQL(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised by + //! the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the style + //! is invalid for this language then an empty QString is returned. This + //! is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if backslash escapes are enabled. + //! + //! \sa setBackslashEscapes() + bool backslashEscapes() const {return backslash_escapes;} + + //! If \a enable is true then words may contain dots (i.e. periods or full + //! stops). The default is false. + //! + //! \sa dottedWords() + void setDottedWords(bool enable); + + //! Returns true if words may contain dots (i.e. periods or full stops). + //! + //! \sa setDottedWords() + bool dottedWords() const {return allow_dotted_word;} + + //! If \a fold is true then ELSE blocks can be folded. The default is + //! false. + //! + //! \sa foldAtElse() + void setFoldAtElse(bool fold); + + //! Returns true if ELSE blocks can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const {return at_else;} + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! If \a fold is true then only BEGIN blocks can be folded. The default + //! is false. + //! + //! \sa foldOnlyBegin() + void setFoldOnlyBegin(bool fold); + + //! Returns true if BEGIN blocks only can be folded. + //! + //! \sa setFoldOnlyBegin() + bool foldOnlyBegin() const {return only_begin;} + + //! If \a enable is true then '#' is used as a comment character. It is + //! typically enabled for MySQL and disabled for Oracle. The default is + //! false. + //! + //! \sa hashComments() + void setHashComments(bool enable); + + //! Returns true if '#' is used as a comment character. + //! + //! \sa setHashComments() + bool hashComments() const {return numbersign_comment;} + + //! If \a enable is true then quoted identifiers are enabled. The default + //! is false. + //! + //! \sa quotedIdentifiers() + void setQuotedIdentifiers(bool enable); + + //! Returns true if quoted identifiers are enabled. + //! + //! \sa setQuotedIdentifiers() + bool quotedIdentifiers() const {return backticks_identifier;} + +public slots: + //! If \a enable is true then backslash escapes are enabled. The + //! default is false. + //! + //! \sa backslashEscapes() + virtual void setBackslashEscapes(bool enable); + + //! If \a fold is true then multi-line comment blocks can be folded. The + //! default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs, const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs, const QString &prefix) const; + +private: + void setAtElseProp(); + void setCommentProp(); + void setCompactProp(); + void setOnlyBeginProp(); + void setBackticksIdentifierProp(); + void setNumbersignCommentProp(); + void setBackslashEscapesProp(); + void setAllowDottedWordProp(); + + bool at_else; + bool fold_comments; + bool fold_compact; + bool only_begin; + bool backticks_identifier; + bool numbersign_comment; + bool backslash_escapes; + bool allow_dotted_word; + + QsciLexerSQL(const QsciLexerSQL &); + QsciLexerSQL &operator=(const QsciLexerSQL &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersrec.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersrec.h new file mode 100644 index 000000000..eee87016c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexersrec.h @@ -0,0 +1,59 @@ +// This defines the interface to the QsciLexerSRec class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERSREC_H +#define QSCILEXERSREC_H + +#include + +#include +#include + + +//! \brief The QsciLexerSRec class encapsulates the Scintilla S-Record lexer. +class QSCINTILLA_EXPORT QsciLexerSRec : public QsciLexerHex +{ + Q_OBJECT + +public: + //! Construct a QsciLexerSRec with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerSRec(QObject *parent = 0); + + //! Destroys the QsciLexerSRec instance. + virtual ~QsciLexerSRec(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. + const char *lexer() const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerSRec(const QsciLexerSRec &); + QsciLexerSRec &operator=(const QsciLexerSRec &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertcl.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertcl.h new file mode 100644 index 000000000..95e98c7e4 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertcl.h @@ -0,0 +1,189 @@ +// This defines the interface to the QsciLexerTCL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERTCL_H +#define QSCILEXERTCL_H + +#include + +#include +#include + + +//! \brief The QsciLexerTCL class encapsulates the Scintilla TCL lexer. +class QSCINTILLA_EXPORT QsciLexerTCL : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the TCL + //! lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A comment line. + CommentLine = 2, + + //! A number. + Number = 3, + + //! A quoted keyword. + QuotedKeyword = 4, + + //! A quoted string. + QuotedString = 5, + + //! An operator. + Operator = 6, + + //! An identifier + Identifier = 7, + + //! A substitution. + Substitution = 8, + + //! A substitution starting with a brace. + SubstitutionBrace = 9, + + //! A modifier. + Modifier = 10, + + //! Expand keyword (defined in keyword set number 5). + ExpandKeyword = 11, + + //! A TCL keyword (defined in keyword set number 1). + TCLKeyword = 12, + + //! A Tk keyword (defined in keyword set number 2). + TkKeyword = 13, + + //! An iTCL keyword (defined in keyword set number 3). + ITCLKeyword = 14, + + //! A Tk command (defined in keyword set number 4). + TkCommand = 15, + + //! A keyword defined in keyword set number 6. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet6 = 16, + + //! A keyword defined in keyword set number 7. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet7 = 17, + + //! A keyword defined in keyword set number 8. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet8 = 18, + + //! A keyword defined in keyword set number 9. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet9 = 19, + + //! A comment box. + CommentBox = 20, + + //! A comment block. + CommentBlock = 21 + }; + + //! Construct a QsciLexerTCL with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerTCL(QObject *parent = 0); + + //! Destroys the QsciLexerTCL instance. + virtual ~QsciLexerTCL(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the style + //! is invalid for this language then an empty QString is returned. This + //! is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a fold is true then multi-line comment blocks can be folded. The + //! default is false. + //! + //! \sa foldComments() + void setFoldComments(bool fold); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + + bool fold_comments; + + QsciLexerTCL(const QsciLexerTCL &); + QsciLexerTCL &operator=(const QsciLexerTCL &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertekhex.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertekhex.h new file mode 100644 index 000000000..dea5a59ae --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertekhex.h @@ -0,0 +1,60 @@ +// This defines the interface to the QsciLexerTekHex class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERTEKHEX_H +#define QSCILEXERTEKHEX_H + +#include + +#include +#include + + +//! \brief The QsciLexerTekHex class encapsulates the Scintilla Tektronix Hex +//! lexer. +class QSCINTILLA_EXPORT QsciLexerTekHex : public QsciLexerHex +{ + Q_OBJECT + +public: + //! Construct a QsciLexerTekHex with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerTekHex(QObject *parent = 0); + + //! Destroys the QsciLexerTekHex instance. + virtual ~QsciLexerTekHex(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. + const char *lexer() const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + +private: + QsciLexerTekHex(const QsciLexerTekHex &); + QsciLexerTekHex &operator=(const QsciLexerTekHex &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertex.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertex.h new file mode 100644 index 000000000..d9abb6460 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexertex.h @@ -0,0 +1,163 @@ +// This defines the interface to the QsciLexerTeX class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERTEX_H +#define QSCILEXERTEX_H + +#include + +#include +#include + + +//! \brief The QsciLexerTeX class encapsulates the Scintilla TeX lexer. +class QSCINTILLA_EXPORT QsciLexerTeX : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! TeX lexer. + enum { + //! The default. + Default = 0, + + //! A special. + Special = 1, + + //! A group. + Group = 2, + + //! A symbol. + Symbol = 3, + + //! A command. + Command = 4, + + //! Text. + Text = 5 + }; + + //! Construct a QsciLexerTeX with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerTeX(QObject *parent = 0); + + //! Destroys the QsciLexerTeX instance. + virtual ~QsciLexerTeX(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + QColor defaultColor(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a fold is true then multi-line comment blocks can be folded. The + //! default is false. + //! + //! \sa foldComments() + void setFoldComments(bool fold); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + void setFoldCompact(bool fold); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;} + + //! If \a enable is true then comments are processed as TeX source + //! otherwise they are ignored. The default is false. + //! + //! \sa processComments() + void setProcessComments(bool enable); + + //! Returns true if comments are processed as TeX source. + //! + //! \sa setProcessComments() + bool processComments() const {return process_comments;} + + //! If \a enable is true then \\if processed is processed as a + //! command. The default is true. + //! + //! \sa processIf() + void setProcessIf(bool enable); + + //! Returns true if \\if is processed as a command. + //! + //! \sa setProcessIf() + bool processIf() const {return process_if;} + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs, const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs, const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setProcessCommentsProp(); + void setAutoIfProp(); + + bool fold_comments; + bool fold_compact; + bool process_comments; + bool process_if; + + QsciLexerTeX(const QsciLexerTeX &); + QsciLexerTeX &operator=(const QsciLexerTeX &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerverilog.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerverilog.h new file mode 100644 index 000000000..11e152e4e --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerverilog.h @@ -0,0 +1,257 @@ +// This defines the interface to the QsciLexerVerilog class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERVERILOG_H +#define QSCILEXERVERILOG_H + +#include + +#include +#include + + +//! \brief The QsciLexerVerilog class encapsulates the Scintilla Verilog +//! lexer. +class QSCINTILLA_EXPORT QsciLexerVerilog : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! Verilog lexer. + enum { + //! The default. + Default = 0, + InactiveDefault = Default + 64, + + //! A comment. + Comment = 1, + InactiveComment = Comment + 64, + + //! A line comment. + CommentLine = 2, + InactiveCommentLine = CommentLine + 64, + + //! A bang comment. + CommentBang = 3, + InactiveCommentBang = CommentBang + 64, + + //! A number + Number = 4, + InactiveNumber = Number + 64, + + //! A keyword. + Keyword = 5, + InactiveKeyword = Keyword + 64, + + //! A string. + String = 6, + InactiveString = String + 64, + + //! A keyword defined in keyword set number 2. The class must + //! be sub-classed and re-implement keywords() to make use of + //! this style. + KeywordSet2 = 7, + InactiveKeywordSet2 = KeywordSet2 + 64, + + //! A system task. + SystemTask = 8, + InactiveSystemTask = SystemTask + 64, + + //! A pre-processor block. + Preprocessor = 9, + InactivePreprocessor = Preprocessor + 64, + + //! An operator. + Operator = 10, + InactiveOperator = Operator + 64, + + //! An identifier. + Identifier = 11, + InactiveIdentifier = Identifier + 64, + + //! The end of a line where a string is not closed. + UnclosedString = 12, + InactiveUnclosedString = UnclosedString + 64, + + //! A keyword defined in keyword set number 4. The class must + //! be sub-classed and re-implement keywords() to make use of + //! this style. This set is intended to be used for user defined + //! identifiers and tasks. + UserKeywordSet = 19, + InactiveUserKeywordSet = UserKeywordSet + 64, + + //! A keyword comment. + CommentKeyword = 20, + InactiveCommentKeyword = CommentKeyword + 64, + + //! An input port declaration. + DeclareInputPort = 21, + InactiveDeclareInputPort = DeclareInputPort + 64, + + //! An output port declaration. + DeclareOutputPort = 22, + InactiveDeclareOutputPort = DeclareOutputPort + 64, + + //! An input/output port declaration. + DeclareInputOutputPort = 23, + InactiveDeclareInputOutputPort = DeclareInputOutputPort + 64, + + //! A port connection. + PortConnection = 24, + InactivePortConnection = PortConnection + 64, + }; + + //! Construct a QsciLexerVerilog with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerVerilog(QObject *parent = 0); + + //! Destroys the QsciLexerVerilog instance. + virtual ~QsciLexerVerilog(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a fold is true then "} else {" lines can be folded. The + //! default is false. + //! + //! \sa foldAtElse() + void setFoldAtElse(bool fold); + + //! Returns true if "} else {" lines can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const {return fold_atelse;} + + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + void setFoldComments(bool fold); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const {return fold_comments;} + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + void setFoldCompact(bool fold); + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const {return fold_compact;}; + + //! If \a fold is true then preprocessor blocks can be folded. The + //! default is true. + //! + //! \sa foldPreprocessor() + void setFoldPreprocessor(bool fold); + + //! Returns true if preprocessor blocks can be folded. + //! + //! \sa setFoldPreprocessor() + bool foldPreprocessor() const {return fold_preproc;}; + + //! If \a fold is true then modules can be folded. The default is false. + //! + //! \sa foldAtModule() + void setFoldAtModule(bool fold); + + //! Returns true if modules can be folded. + //! + //! \sa setFoldAtModule() + bool foldAtModule() const {return fold_atmodule;}; + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAtElseProp(); + void setCommentProp(); + void setCompactProp(); + void setPreprocProp(); + void setAtModuleProp(); + + bool fold_atelse; + bool fold_comments; + bool fold_compact; + bool fold_preproc; + bool fold_atmodule; + + QsciLexerVerilog(const QsciLexerVerilog &); + QsciLexerVerilog &operator=(const QsciLexerVerilog &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexervhdl.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexervhdl.h new file mode 100644 index 000000000..b1df141d1 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexervhdl.h @@ -0,0 +1,221 @@ +// This defines the interface to the QsciLexerVHDL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERVHDL_H +#define QSCILEXERVHDL_H + +#include + +#include +#include + + +//! \brief The QsciLexerVHDL class encapsulates the Scintilla VHDL lexer. +class QSCINTILLA_EXPORT QsciLexerVHDL : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! VHDL lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! A comment line. + CommentLine = 2, + + //! A number. + Number = 3, + + //! A string. + String = 4, + + //! An operator. + Operator = 5, + + //! An identifier + Identifier = 6, + + //! The end of a line where a string is not closed. + UnclosedString = 7, + + //! A keyword. + Keyword = 8, + + //! A standard operator. + StandardOperator = 9, + + //! An attribute. + Attribute = 10, + + //! A standard function. + StandardFunction = 11, + + //! A standard package. + StandardPackage = 12, + + //! A standard type. + StandardType = 13, + + //! A keyword defined in keyword set number 7. The class must be + //! sub-classed and re-implement keywords() to make use of this style. + KeywordSet7 = 14, + + //! A comment block. + CommentBlock = 15, + }; + + //! Construct a QsciLexerVHDL with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerVHDL(QObject *parent = 0); + + //! Destroys the QsciLexerVHDL instance. + virtual ~QsciLexerVHDL(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! Returns true if else blocks can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const; + + //! Returns true if begin blocks can be folded. + //! + //! \sa setFoldAtBegin() + bool foldAtBegin() const; + + //! Returns true if blocks can be folded at a parenthesis. + //! + //! \sa setFoldAtParenthesis() + bool foldAtParenthesis() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is true. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then else blocks can be folded. The default is + //! true. + //! + //! \sa foldAtElse() + virtual void setFoldAtElse(bool fold); + + //! If \a fold is true then begin blocks can be folded. The default is + //! true. + //! + //! \sa foldAtBegin() + virtual void setFoldAtBegin(bool fold); + + //! If \a fold is true then blocks can be folded at a parenthesis. The + //! default is true. + //! + //! \sa foldAtParenthesis() + virtual void setFoldAtParenthesis(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + void setCompactProp(); + void setAtElseProp(); + void setAtBeginProp(); + void setAtParenthProp(); + + bool fold_comments; + bool fold_compact; + bool fold_atelse; + bool fold_atbegin; + bool fold_atparenth; + + QsciLexerVHDL(const QsciLexerVHDL &); + QsciLexerVHDL &operator=(const QsciLexerVHDL &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerxml.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerxml.h new file mode 100644 index 000000000..9d40c6b0e --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexerxml.h @@ -0,0 +1,106 @@ +// This defines the interface to the QsciLexerXML class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERXML_H +#define QSCILEXERXML_H + +#include + +#include +#include + + +//! \brief The QsciLexerXML class encapsulates the Scintilla XML lexer. +class QSCINTILLA_EXPORT QsciLexerXML : public QsciLexerHTML +{ + Q_OBJECT + +public: + //! Construct a QsciLexerXML with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexerXML(QObject *parent = 0); + + //! Destroys the QsciLexerXML instance. + virtual ~QsciLexerXML(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! If \a allowed is true then scripts are styled. The default is true. + //! + //! \sa scriptsStyled() + void setScriptsStyled(bool styled); + + //! Returns true if scripts are styled. + //! + //! \sa setScriptsStyled() + bool scriptsStyled() const; + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs, const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs, const QString &prefix) const; + +private: + void setScriptsProp(); + + bool scripts; + + QsciLexerXML(const QsciLexerXML &); + QsciLexerXML &operator=(const QsciLexerXML &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeryaml.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeryaml.h new file mode 100644 index 000000000..0e094899f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscilexeryaml.h @@ -0,0 +1,147 @@ +// This defines the interface to the QsciLexerYAML class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXERYAML_H +#define QSCILEXERYAML_H + +#include + +#include +#include + + +//! \brief The QsciLexerYAML class encapsulates the Scintilla YAML lexer. +class QSCINTILLA_EXPORT QsciLexerYAML : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! YAML lexer. + enum { + //! The default. + Default = 0, + + //! A comment. + Comment = 1, + + //! An identifier. + Identifier = 2, + + //! A keyword + Keyword = 3, + + //! A number. + Number = 4, + + //! A reference. + Reference = 5, + + //! A document delimiter. + DocumentDelimiter = 6, + + //! A text block marker. + TextBlockMarker = 7, + + //! A syntax error marker. + SyntaxErrorMarker = 8, + + //! An operator. + Operator = 9 + }; + + //! Construct a QsciLexerYAML with parent \a parent. \a parent is + //! typically the QsciScintilla instance. + QsciLexerYAML(QObject *parent = 0); + + //! Destroys the QsciLexerYAML instance. + virtual ~QsciLexerYAML(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the propertyChanged() + //! signal as required. + void refreshProperties(); + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + +public slots: + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setCommentProp(); + + bool fold_comments; + + QsciLexerYAML(const QsciLexerYAML &); + QsciLexerYAML &operator=(const QsciLexerYAML &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscimacro.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscimacro.h new file mode 100644 index 000000000..89610a5af --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscimacro.h @@ -0,0 +1,98 @@ +// This defines the interface to the QsciMacro class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIMACRO_H +#define QSCIMACRO_H + +#include +#include +#include + +#include + + +class QsciScintilla; + + +//! \brief The QsciMacro class represents a sequence of recordable editor +//! commands. +//! +//! Methods are provided to convert convert a macro to and from a textual +//! representation so that they can be easily written to and read from +//! permanent storage. +class QSCINTILLA_EXPORT QsciMacro : public QObject +{ + Q_OBJECT + +public: + //! Construct a QsciMacro with parent \a parent. + QsciMacro(QsciScintilla *parent); + + //! Construct a QsciMacro from the printable ASCII representation \a asc, + //! with parent \a parent. + QsciMacro(const QString &asc, QsciScintilla *parent); + + //! Destroy the QsciMacro instance. + virtual ~QsciMacro(); + + //! Clear the contents of the macro. + void clear(); + + //! Load the macro from the printable ASCII representation \a asc. Returns + //! true if there was no error. + //! + //! \sa save() + bool load(const QString &asc); + + //! Return a printable ASCII representation of the macro. It is guaranteed + //! that only printable ASCII characters are used and that double quote + //! characters will not be used. + //! + //! \sa load() + QString save() const; + +public slots: + //! Play the macro. + virtual void play(); + + //! Start recording user commands and add them to the macro. + virtual void startRecording(); + + //! Stop recording user commands. + virtual void endRecording(); + +private slots: + void record(unsigned int msg, unsigned long wParam, void *lParam); + +private: + struct Macro { + unsigned int msg; + unsigned long wParam; + QByteArray text; + }; + + QsciScintilla *qsci; + QList macro; + + QsciMacro(const QsciMacro &); + QsciMacro &operator=(const QsciMacro &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciprinter.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciprinter.h new file mode 100644 index 000000000..869a8ed0e --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciprinter.h @@ -0,0 +1,120 @@ +// This module defines interface to the QsciPrinter class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIPRINTER_H +#define QSCIPRINTER_H + +// This is needed for Qt v5.0.0-alpha. +#if defined(B0) +#undef B0 +#endif + +#include + +#if !defined(QT_NO_PRINTER) + +#include +#include + + +QT_BEGIN_NAMESPACE +class QRect; +class QPainter; +QT_END_NAMESPACE + +class QsciScintillaBase; + + +//! \brief The QsciPrinter class is a sub-class of the Qt QPrinter class that +//! is able to print the text of a Scintilla document. +//! +//! The class can be further sub-classed to alter to layout of the text, adding +//! headers and footers for example. +class QSCINTILLA_EXPORT QsciPrinter : public QPrinter +{ +public: + //! Constructs a printer paint device with mode \a mode. + QsciPrinter(PrinterMode mode = ScreenResolution); + + //! Destroys the QsciPrinter instance. + virtual ~QsciPrinter(); + + //! Format a page, by adding headers and footers for example, before the + //! document text is drawn on it. \a painter is the painter to be used to + //! add customised text and graphics. \a drawing is true if the page is + //! actually being drawn rather than being sized. \a painter drawing + //! methods must only be called when \a drawing is true. \a area is the + //! area of the page that will be used to draw the text. This should be + //! modified if it is necessary to reserve space for any customised text or + //! graphics. By default the area is relative to the printable area of the + //! page. Use QPrinter::setFullPage() before calling printRange() if you + //! want to try and print over the whole page. \a pagenr is the number of + //! the page. The first page is numbered 1. + virtual void formatPage(QPainter &painter, bool drawing, QRect &area, + int pagenr); + + //! Return the number of points to add to each font when printing. + //! + //! \sa setMagnification() + int magnification() const {return mag;} + + //! Sets the number of points to add to each font when printing to \a + //! magnification. + //! + //! \sa magnification() + virtual void setMagnification(int magnification); + + //! Print a range of lines from the Scintilla instance \a qsb using the + //! supplied QPainter \a painter. \a from is the first line to print and a + //! negative value signifies the first line of text. \a to is the last + //! line to print and a negative value signifies the last line of text. + //! true is returned if there was no error. + virtual int printRange(QsciScintillaBase *qsb, QPainter &painter, + int from = -1, int to = -1); + + //! Print a range of lines from the Scintilla instance \a qsb using a + //! default QPainter. \a from is the first line to print and a negative + //! value signifies the first line of text. \a to is the last line to + //! print and a negative value signifies the last line of text. true is + //! returned if there was no error. + virtual int printRange(QsciScintillaBase *qsb, int from = -1, int to = -1); + + //! Return the line wrap mode used when printing. The default is + //! QsciScintilla::WrapWord. + //! + //! \sa setWrapMode() + QsciScintilla::WrapMode wrapMode() const {return wrap;} + + //! Sets the line wrap mode used when printing to \a wmode. + //! + //! \sa wrapMode() + virtual void setWrapMode(QsciScintilla::WrapMode wmode); + +private: + int mag; + QsciScintilla::WrapMode wrap; + + QsciPrinter(const QsciPrinter &); + QsciPrinter &operator=(const QsciPrinter &); +}; + +#endif + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintilla.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintilla.h new file mode 100644 index 000000000..ffb9416dc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintilla.h @@ -0,0 +1,2313 @@ +// This module defines the "official" high-level API of the Qt port of +// Scintilla. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCISCINTILLA_H +#define QSCISCINTILLA_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +QT_BEGIN_NAMESPACE +class QAction; +class QImage; +class QIODevice; +class QMenu; +class QPoint; +QT_END_NAMESPACE + +class QsciCommandSet; +class QsciLexer; +class QsciStyle; +class QsciStyledText; +class QsciListBoxQt; + + +//! \brief The QsciScintilla class implements a higher level, more Qt-like, +//! API to the Scintilla editor widget. +//! +//! QsciScintilla implements methods, signals and slots similar to those found +//! in other Qt editor classes. It also provides a higher level interface to +//! features specific to Scintilla such as syntax styling, call tips, +//! auto-indenting and auto-completion than that provided by QsciScintillaBase. +class QSCINTILLA_EXPORT QsciScintilla : public QsciScintillaBase +{ + Q_OBJECT + +public: + //! This enum defines the different auto-indentation styles. + enum { + //! A line is automatically indented to match the previous line. + AiMaintain = 0x01, + + //! If the language supported by the current lexer has a specific start + //! of block character (e.g. { in C++), then a line that begins with + //! that character is indented as well as the lines that make up the + //! block. It may be logically ored with AiClosing. + AiOpening = 0x02, + + //! If the language supported by the current lexer has a specific end + //! of block character (e.g. } in C++), then a line that begins with + //! that character is indented as well as the lines that make up the + //! block. It may be logically ored with AiOpening. + AiClosing = 0x04 + }; + + //! This enum defines the different annotation display styles. + enum AnnotationDisplay { + //! Annotations are not displayed. + AnnotationHidden = ANNOTATION_HIDDEN, + + //! Annotations are drawn left justified with no adornment. + AnnotationStandard = ANNOTATION_STANDARD, + + //! Annotations are surrounded by a box. + AnnotationBoxed = ANNOTATION_BOXED, + + //! Annotations are indented to match the text. + AnnotationIndented = ANNOTATION_INDENTED, + }; + + //! This enum defines the behavior if an auto-completion list contains a + //! single entry. + enum AutoCompletionUseSingle { + //! The single entry is not used automatically and the auto-completion + //! list is displayed. + AcusNever, + + //! The single entry is used automatically when auto-completion is + //! explicitly requested (using autoCompleteFromAPIs() or + //! autoCompleteFromDocument()) but not when auto-completion is + //! triggered as the user types. + AcusExplicit, + + //! The single entry is used automatically and the auto-completion list + //! is not displayed. + AcusAlways + }; + + //! This enum defines the different sources for auto-completion lists. + enum AutoCompletionSource { + //! No sources are used, ie. automatic auto-completion is disabled. + AcsNone, + + //! The source is all available sources. + AcsAll, + + //! The source is the current document. + AcsDocument, + + //! The source is any installed APIs. + AcsAPIs + }; + + //! This enum defines the different brace matching modes. The character + //! pairs {}, [] and () are treated as braces. The Python lexer will also + //! match a : with the end of the corresponding indented block. + enum BraceMatch { + //! Brace matching is disabled. + NoBraceMatch, + + //! Brace matching is enabled for a brace immediately before the + //! current position. + StrictBraceMatch, + + //! Brace matching is enabled for a brace immediately before or after + //! the current position. + SloppyBraceMatch + }; + + //! This enum defines the different call tip positions. + enum CallTipsPosition { + //! Call tips are placed below the text. + CallTipsBelowText, + + //! Call tips are placed above the text. + CallTipsAboveText, + }; + + //! This enum defines the different call tip styles. + enum CallTipsStyle { + //! Call tips are disabled. + CallTipsNone, + + //! Call tips are displayed without a context. A context is any scope + //! (e.g. a C++ namespace or a Python module) prior to the function + //! name. + CallTipsNoContext, + + //! Call tips are displayed with a context only if the user hasn't + //! already implicitly identified the context using autocompletion. + //! Note that this style may not always be able to align the call tip + //! with the text being entered. + CallTipsNoAutoCompletionContext, + + //! Call tips are displayed with a context. Note that this style + //! may not always be able to align the call tip with the text being + //! entered. + CallTipsContext + }; + + //! This enum defines the different edge modes for long lines. + enum EdgeMode { + //! Long lines are not marked. + EdgeNone = EDGE_NONE, + + //! A vertical line is drawn at the column set by setEdgeColumn(). + //! This is recommended for monospace fonts. + EdgeLine = EDGE_LINE, + + //! The background color of characters after the column limit is + //! changed to the color set by setEdgeColor(). This is recommended + //! for proportional fonts. + EdgeBackground = EDGE_BACKGROUND, + + //! Multiple vertical lines are drawn at the columns defined by + //! multiple calls to addEdgeColumn(). + EdgeMultipleLines = EDGE_MULTILINE, + }; + + //! This enum defines the different end-of-line modes. + enum EolMode { + //! A carriage return/line feed as used on Windows systems. + EolWindows = SC_EOL_CRLF, + + //! A line feed as used on Unix systems, including OS/X. + EolUnix = SC_EOL_LF, + + //! A carriage return as used on Mac systems prior to OS/X. + EolMac = SC_EOL_CR + }; + + //! This enum defines the different styles for the folding margin. + enum FoldStyle { + //! Folding is disabled. + NoFoldStyle, + + //! Plain folding style using plus and minus symbols. + PlainFoldStyle, + + //! Circled folding style using circled plus and minus symbols. + CircledFoldStyle, + + //! Boxed folding style using boxed plus and minus symbols. + BoxedFoldStyle, + + //! Circled tree style using a flattened tree with circled plus and + //! minus symbols and rounded corners. + CircledTreeFoldStyle, + + //! Boxed tree style using a flattened tree with boxed plus and minus + //! symbols and right-angled corners. + BoxedTreeFoldStyle + }; + + //! This enum defines the different indicator styles. + enum IndicatorStyle { + //! A single straight underline. + PlainIndicator = INDIC_PLAIN, + + //! A squiggly underline that requires 3 pixels of descender space. + SquiggleIndicator = INDIC_SQUIGGLE, + + //! A line of small T shapes. + TTIndicator = INDIC_TT, + + //! Diagonal hatching. + DiagonalIndicator = INDIC_DIAGONAL, + + //! Strike out. + StrikeIndicator = INDIC_STRIKE, + + //! An indicator with no visual appearence. + HiddenIndicator = INDIC_HIDDEN, + + //! A rectangle around the text. + BoxIndicator = INDIC_BOX, + + //! A rectangle with rounded corners around the text with the interior + //! usually more transparent than the border. + RoundBoxIndicator = INDIC_ROUNDBOX, + + //! A rectangle around the text with the interior usually more + //! transparent than the border. It does not colour the top pixel of + //! the line so that indicators on contiguous lines are visually + //! distinct and disconnected. + StraightBoxIndicator = INDIC_STRAIGHTBOX, + + //! A rectangle around the text with the interior usually more + //! transparent than the border. Unlike StraightBoxIndicator it covers + //! the entire character area. + FullBoxIndicator = INDIC_FULLBOX, + + //! A dashed underline. + DashesIndicator = INDIC_DASH, + + //! A dotted underline. + DotsIndicator = INDIC_DOTS, + + //! A squiggly underline that requires 2 pixels of descender space and + //! so will fit under smaller fonts. + SquiggleLowIndicator = INDIC_SQUIGGLELOW, + + //! A dotted rectangle around the text with the interior usually more + //! transparent than the border. + DotBoxIndicator = INDIC_DOTBOX, + + //! A version of SquiggleIndicator that uses a pixmap. This is quicker + //! but may be of lower quality. + SquigglePixmapIndicator = INDIC_SQUIGGLEPIXMAP, + + //! A thick underline typically used for the target during Asian + //! language input composition. + ThickCompositionIndicator = INDIC_COMPOSITIONTHICK, + + //! A thin underline typically used for non-target ranges during Asian + //! language input composition. + ThinCompositionIndicator = INDIC_COMPOSITIONTHIN, + + //! The color of the text is set to the color of the indicator's + //! foreground. + TextColorIndicator = INDIC_TEXTFORE, + + //! A triangle below the start of the indicator range. + TriangleIndicator = INDIC_POINT, + + //! A triangle below the centre of the first character in the indicator + //! range. + TriangleCharacterIndicator = INDIC_POINTCHARACTER, + + //! A vertical gradient between the indicator's foreground colour at + //! top to fully transparent at the bottom. + GradientIndicator = INDIC_GRADIENT, + + //! A vertical gradient with the indicator's foreground colour in the + //! middle and fading to fully transparent at the top and bottom. + CentreGradientIndicator = INDIC_GRADIENTCENTRE, + }; + + //! This enum defines the different margin options. + enum { + //! Reset all margin options. + MoNone = SC_MARGINOPTION_NONE, + + //! If this is set then only the first sub-line of a wrapped line will + //! be selected when clicking on a margin. + MoSublineSelect = SC_MARGINOPTION_SUBLINESELECT + }; + + //! This enum defines the different margin types. + enum MarginType { + //! The margin contains symbols, including those used for folding. + SymbolMargin = SC_MARGIN_SYMBOL, + + //! The margin contains symbols and uses the default foreground color + //! as its background color. + SymbolMarginDefaultForegroundColor = SC_MARGIN_FORE, + + //! The margin contains symbols and uses the default background color + //! as its background color. + SymbolMarginDefaultBackgroundColor = SC_MARGIN_BACK, + + //! The margin contains line numbers. + NumberMargin = SC_MARGIN_NUMBER, + + //! The margin contains styled text. + TextMargin = SC_MARGIN_TEXT, + + //! The margin contains right justified styled text. + TextMarginRightJustified = SC_MARGIN_RTEXT, + + //! The margin contains symbols and uses the color set by + //! setMarginBackgroundColor() as its background color. + SymbolMarginColor = SC_MARGIN_COLOUR, + }; + + //! This enum defines the different pre-defined marker symbols. + enum MarkerSymbol { + //! A circle. + Circle = SC_MARK_CIRCLE, + + //! A rectangle. + Rectangle = SC_MARK_ROUNDRECT, + + //! A triangle pointing to the right. + RightTriangle = SC_MARK_ARROW, + + //! A smaller rectangle. + SmallRectangle = SC_MARK_SMALLRECT, + + //! An arrow pointing to the right. + RightArrow = SC_MARK_SHORTARROW, + + //! An invisible marker that allows code to track the movement + //! of lines. + Invisible = SC_MARK_EMPTY, + + //! A triangle pointing down. + DownTriangle = SC_MARK_ARROWDOWN, + + //! A drawn minus sign. + Minus = SC_MARK_MINUS, + + //! A drawn plus sign. + Plus = SC_MARK_PLUS, + + //! A vertical line drawn in the background colour. + VerticalLine = SC_MARK_VLINE, + + //! A bottom left corner drawn in the background colour. + BottomLeftCorner = SC_MARK_LCORNER, + + //! A vertical line with a centre right horizontal line drawn + //! in the background colour. + LeftSideSplitter = SC_MARK_TCORNER, + + //! A drawn plus sign in a box. + BoxedPlus = SC_MARK_BOXPLUS, + + //! A drawn plus sign in a connected box. + BoxedPlusConnected = SC_MARK_BOXPLUSCONNECTED, + + //! A drawn minus sign in a box. + BoxedMinus = SC_MARK_BOXMINUS, + + //! A drawn minus sign in a connected box. + BoxedMinusConnected = SC_MARK_BOXMINUSCONNECTED, + + //! A rounded bottom left corner drawn in the background + //! colour. + RoundedBottomLeftCorner = SC_MARK_LCORNERCURVE, + + //! A vertical line with a centre right curved line drawn in the + //! background colour. + LeftSideRoundedSplitter = SC_MARK_TCORNERCURVE, + + //! A drawn plus sign in a circle. + CircledPlus = SC_MARK_CIRCLEPLUS, + + //! A drawn plus sign in a connected box. + CircledPlusConnected = SC_MARK_CIRCLEPLUSCONNECTED, + + //! A drawn minus sign in a circle. + CircledMinus = SC_MARK_CIRCLEMINUS, + + //! A drawn minus sign in a connected circle. + CircledMinusConnected = SC_MARK_CIRCLEMINUSCONNECTED, + + //! No symbol is drawn but the line is drawn with the same background + //! color as the marker's. + Background = SC_MARK_BACKGROUND, + + //! Three drawn dots. + ThreeDots = SC_MARK_DOTDOTDOT, + + //! Three drawn arrows pointing right. + ThreeRightArrows = SC_MARK_ARROWS, + + //! A full rectangle (ie. the margin background) using the marker's + //! background color. + FullRectangle = SC_MARK_FULLRECT, + + //! A left rectangle (ie. the left part of the margin background) using + //! the marker's background color. + LeftRectangle = SC_MARK_LEFTRECT, + + //! No symbol is drawn but the line is drawn underlined using the + //! marker's background color. + Underline = SC_MARK_UNDERLINE, + + //! A bookmark. + Bookmark = SC_MARK_BOOKMARK, + }; + + //! This enum defines how tab characters are drawn when whitespace is + //! visible. + enum TabDrawMode { + //! An arrow stretching to the tab stop. + TabLongArrow = SCTD_LONGARROW, + + //! A horizontal line stretching to the tab stop. + TabStrikeOut = SCTD_STRIKEOUT, + }; + + //! This enum defines the different whitespace visibility modes. When + //! whitespace is visible spaces are displayed as small centred dots and + //! tabs are displayed as light arrows pointing to the right. + enum WhitespaceVisibility { + //! Whitespace is invisible. + WsInvisible = SCWS_INVISIBLE, + + //! Whitespace is always visible. + WsVisible = SCWS_VISIBLEALWAYS, + + //! Whitespace is visible after the whitespace used for indentation. + WsVisibleAfterIndent = SCWS_VISIBLEAFTERINDENT, + + //! Whitespace used for indentation is visible. + WsVisibleOnlyInIndent = SCWS_VISIBLEONLYININDENT, + }; + + //! This enum defines the different line wrap modes. + enum WrapMode { + //! Lines are not wrapped. + WrapNone = SC_WRAP_NONE, + + //! Lines are wrapped at word boundaries. + WrapWord = SC_WRAP_WORD, + + //! Lines are wrapped at character boundaries. + WrapCharacter = SC_WRAP_CHAR, + + //! Lines are wrapped at whitespace boundaries. + WrapWhitespace = SC_WRAP_WHITESPACE, + }; + + //! This enum defines the different line wrap visual flags. + enum WrapVisualFlag { + //! No wrap flag is displayed. + WrapFlagNone, + + //! A wrap flag is displayed by the text. + WrapFlagByText, + + //! A wrap flag is displayed by the border. + WrapFlagByBorder, + + //! A wrap flag is displayed in the line number margin. + WrapFlagInMargin + }; + + //! This enum defines the different line wrap indentation modes. + enum WrapIndentMode { + //! Wrapped sub-lines are indented by the amount set by + //! setWrapVisualFlags(). + WrapIndentFixed = SC_WRAPINDENT_FIXED, + + //! Wrapped sub-lines are indented by the same amount as the first + //! sub-line. + WrapIndentSame = SC_WRAPINDENT_SAME, + + //! Wrapped sub-lines are indented by the same amount as the first + //! sub-line plus one more level of indentation. + WrapIndentIndented = SC_WRAPINDENT_INDENT, + + //! Wrapped sub-lines are indented by the same amount as the first + //! sub-line plus two more level of indentation. + WrapIndentDeeplyIndented = SC_WRAPINDENT_DEEPINDENT + }; + + //! Construct an empty QsciScintilla with parent \a parent. + QsciScintilla(QWidget *parent = 0); + + //! Destroys the QsciScintilla instance. + virtual ~QsciScintilla(); + + //! Returns the API context, which is a list of words, before the position + //! \a pos in the document. The context can be used by auto-completion and + //! call tips to help to identify which API call the user is referring to. + //! In the default implementation the current lexer determines what + //! characters make up a word, and what characters determine the boundaries + //! of words (ie. the start characters). If there is no current lexer then + //! the context will consist of a single word. On return \a context_start + //! will contain the position in the document of the start of the context + //! and \a last_word_start will contain the position in the document of the + //! start of the last word of the context. + virtual QStringList apiContext(int pos, int &context_start, + int &last_word_start); + + //! Annotate the line \a line with the text \a text using the style number + //! \a style. + void annotate(int line, const QString &text, int style); + + //! Annotate the line \a line with the text \a text using the style \a + //! style. + void annotate(int line, const QString &text, const QsciStyle &style); + + //! Annotate the line \a line with the styled text \a text. + void annotate(int line, const QsciStyledText &text); + + //! Annotate the line \a line with the list of styled text \a text. + void annotate(int line, const QList &text); + + //! Returns the annotation on line \a line, if any. + QString annotation(int line) const; + + //! Returns the display style for annotations. + //! + //! \sa setAnnotationDisplay() + AnnotationDisplay annotationDisplay() const; + + //! The annotations on line \a line are removed. If \a line is negative + //! then all annotations are removed. + void clearAnnotations(int line = -1); + + //! Returns true if auto-completion lists are case sensitive. + //! + //! \sa setAutoCompletionCaseSensitivity() + bool autoCompletionCaseSensitivity() const; + + //! Returns true if auto-completion fill-up characters are enabled. + //! + //! \sa setAutoCompletionFillups(), setAutoCompletionFillupsEnabled() + bool autoCompletionFillupsEnabled() const; + + //! Returns true if the rest of the word to the right of the current cursor + //! is removed when an item from an auto-completion list is selected. + //! + //! \sa setAutoCompletionReplaceWord() + bool autoCompletionReplaceWord() const; + + //! Returns true if the only item in an auto-completion list with a single + //! entry is automatically used and the list not displayed. Note that this + //! is deprecated and autoCompletionUseSingle() should be used instead. + //! + //! \sa setAutoCompletionShowSingle() + bool autoCompletionShowSingle() const; + + //! Returns the current source for the auto-completion list when it is + //! being displayed automatically as the user types. + //! + //! \sa setAutoCompletionSource() + AutoCompletionSource autoCompletionSource() const {return acSource;} + + //! Returns the current threshold for the automatic display of the + //! auto-completion list as the user types. + //! + //! \sa setAutoCompletionThreshold() + int autoCompletionThreshold() const {return acThresh;} + + //! Returns the current behavior when an auto-completion list contains a + //! single entry. + //! + //! \sa setAutoCompletionUseSingle() + AutoCompletionUseSingle autoCompletionUseSingle() const; + + //! Returns true if auto-indentation is enabled. + //! + //! \sa setAutoIndent() + bool autoIndent() const {return autoInd;} + + //! Returns true if the backspace key unindents a line instead of deleting + //! a character. The default is false. + //! + //! \sa setBackspaceUnindents(), tabIndents(), setTabIndents() + bool backspaceUnindents() const; + + //! Mark the beginning of a sequence of actions that can be undone by a + //! single call to undo(). + //! + //! \sa endUndoAction(), undo() + void beginUndoAction(); + + //! Returns the brace matching mode. + //! + //! \sa setBraceMatching() + BraceMatch braceMatching() const {return braceMode;} + + //! Returns the encoded text between positions \a start and \a end. This + //! is typically used by QsciLexerCustom::styleText(). + //! + //! \sa text() + QByteArray bytes(int start, int end) const; + + //! Returns the current call tip position. + //! + //! \sa setCallTipsPosition() + CallTipsPosition callTipsPosition() const {return call_tips_position;} + + //! Returns the current call tip style. + //! + //! \sa setCallTipsStyle() + CallTipsStyle callTipsStyle() const {return call_tips_style;} + + //! Returns the maximum number of call tips that are displayed. + //! + //! \sa setCallTipsVisible() + int callTipsVisible() const {return maxCallTips;} + + //! Cancel any previous call to findFirst(), findFirstInSelection() or + //! findNext() so that replace() does nothing. + void cancelFind(); + + //! Cancel any current auto-completion or user defined list. + void cancelList(); + + //! Returns true if the current language lexer is case sensitive. If there + //! is no current lexer then true is returned. + bool caseSensitive() const; + + //! Clear all current folds, i.e. ensure that all lines are displayed + //! unfolded. + //! + //! \sa setFolding() + void clearFolds(); + + //! Clears the range of text with indicator \a indicatorNumber starting at + //! position \a indexFrom in line \a lineFrom and finishing at position + //! \a indexTo in line \a lineTo. + //! + //! \sa fillIndicatorRange() + void clearIndicatorRange(int lineFrom, int indexFrom, int lineTo, + int indexTo, int indicatorNumber); + + //! Clear all registered images. + //! + //! \sa registerImage() + void clearRegisteredImages(); + + //! Returns the widget's text (ie. foreground) colour. + //! + //! \sa setColor() + QColor color() const; + + //! Returns a list of the line numbers that have contracted folds. This is + //! typically used to save the fold state of a document. + //! + //! \sa setContractedFolds() + QList contractedFolds() const; + + //! All the lines of the text have their end-of-lines converted to mode + //! \a mode. + //! + //! \sa eolMode(), setEolMode() + void convertEols(EolMode mode); + + //! Create the standard context menu which is shown when the user clicks + //! with the right mouse button. It is called from contextMenuEvent(). + //! The menu's ownership is transferred to the caller. + QMenu *createStandardContextMenu(); + + //! Returns the attached document. + //! + //! \sa setDocument() + QsciDocument document() const {return doc;} + + //! Mark the end of a sequence of actions that can be undone by a single + //! call to undo(). + //! + //! \sa beginUndoAction(), undo() + void endUndoAction(); + + //! Returns the color of the marker used to show that a line has exceeded + //! the length set by setEdgeColumn(). + //! + //! \sa setEdgeColor(), \sa setEdgeColumn + QColor edgeColor() const; + + //! Returns the number of the column after which lines are considered to be + //! long. + //! + //! \sa setEdgeColumn() + int edgeColumn() const; + + //! Returns the edge mode which determines how long lines are marked. + //! + //! \sa setEdgeMode() + EdgeMode edgeMode() const; + + //! Set the default font. This has no effect if a language lexer has been + //! set. + void setFont(const QFont &f); + + //! Returns the end-of-line mode. + //! + //! \sa setEolMode() + EolMode eolMode() const; + + //! Returns the visibility of end-of-lines. + //! + //! \sa setEolVisibility() + bool eolVisibility() const; + + //! Returns the extra space added to the height of a line above the + //! baseline of the text. + //! + //! \sa setExtraAscent(), extraDescent() + int extraAscent() const; + + //! Returns the extra space added to the height of a line below the + //! baseline of the text. + //! + //! \sa setExtraDescent(), extraAscent() + int extraDescent() const; + + //! Fills the range of text with indicator \a indicatorNumber starting at + //! position \a indexFrom in line \a lineFrom and finishing at position + //! \a indexTo in line \a lineTo. + //! + //! \sa clearIndicatorRange() + void fillIndicatorRange(int lineFrom, int indexFrom, int lineTo, + int indexTo, int indicatorNumber); + + //! Find the first occurrence of the string \a expr and return true if + //! \a expr was found, otherwise returns false. If \a expr is found it + //! becomes the current selection. + //! + //! If \a re is true then \a expr is interpreted as a regular expression + //! rather than a simple string. + //! + //! If \a cs is true then the search is case sensitive. + //! + //! If \a wo is true then the search looks for whole word matches only, + //! otherwise it searches for any matching text. + //! + //! If \a wrap is true then the search wraps around the end of the text. + //! + //! If \a forward is true (the default) then the search is forward from the + //! starting position to the end of the text, otherwise it is backwards to + //! the beginning of the text. + //! + //! If either \a line or \a index are negative (the default) then the + //! search begins from the current cursor position. Otherwise the search + //! begins at position \a index of line \a line. + //! + //! If \a show is true (the default) then any text found is made visible + //! (ie. it is unfolded). + //! + //! If \a posix is true then a regular expression is treated in a more + //! POSIX compatible manner by interpreting bare ( and ) as tagged sections + //! rather than \( and \). + //! + //! If \a cxx11 is true then a regular expression is treated as a Cxx11 + //! regular expression. + //! + //! \sa cancelFind(), findFirstInSelection(), findNext(), replace() + virtual bool findFirst(const QString &expr, bool re, bool cs, bool wo, + bool wrap, bool forward = true, int line = -1, int index = -1, + bool show = true, bool posix = false, bool cxx11 = false); + + //! Find the first occurrence of the string \a expr in the current + //! selection and return true if \a expr was found, otherwise returns + //! false. If \a expr is found it becomes the current selection. The + //! original selection is restored when a subsequent call to findNext() + //! returns false. + //! + //! If \a re is true then \a expr is interpreted as a regular expression + //! rather than a simple string. + //! + //! If \a cs is true then the search is case sensitive. + //! + //! If \a wo is true then the search looks for whole word matches only, + //! otherwise it searches for any matching text. + //! + //! If \a forward is true (the default) then the search is forward from the + //! start to the end of the selection, otherwise it is backwards from the + //! end to the start of the selection. + //! + //! If \a show is true (the default) then any text found is made visible + //! (ie. it is unfolded). + //! + //! If \a posix is true then a regular expression is treated in a more + //! POSIX compatible manner by interpreting bare ( and ) as tagged sections + //! rather than \( and \). + //! + //! If \a cxx11 is true then a regular expression is treated as a Cxx11 + //! regular expression. + //! + //! \sa cancelFind(), findFirst(), findNext(), replace() + virtual bool findFirstInSelection(const QString &expr, bool re, bool cs, + bool wo, bool forward = true, bool show = true, + bool posix = false, bool cxx11 = false); + + //! Find the next occurence of the string found using findFirst() or + //! findFirstInSelection(). + //! + //! \sa cancelFind(), findFirst(), findFirstInSelection(), replace() + virtual bool findNext(); + + //! Find a brace and it's match. \a brace is updated with the position of + //! the brace and will be -1 if there is none. \a is updated with the + //! position of the matching brace and will be -1 if there is none. + //! \a mode specifies how braces are matched. true is returned if the + //! current position is inside a pair of braces. + bool findMatchingBrace(long &brace, long &other, BraceMatch mode); + + //! Returns the number of the first visible line. + //! + //! \sa setFirstVisibleLine() + int firstVisibleLine() const; + + //! Returns the current folding style. + //! + //! \sa setFolding() + FoldStyle folding() const {return fold;} + + //! Sets \a *line and \a *index to the line and index of the cursor. + //! + //! \sa setCursorPosition() + void getCursorPosition(int *line, int *index) const; + + //! If there is a selection, \a *lineFrom is set to the line number in + //! which the selection begins and \a *lineTo is set to the line number in + //! which the selection ends. (They could be the same.) \a *indexFrom is + //! set to the index at which the selection begins within \a *lineFrom, and + //! \a *indexTo is set to the index at which the selection ends within + //! \a *lineTo. If there is no selection, \a *lineFrom, \a *indexFrom, + //! \a *lineTo and \a *indexTo are all set to -1. + //! + //! \sa setSelection() + void getSelection(int *lineFrom, int *indexFrom, int *lineTo, + int *indexTo) const; + + //! Returns true if some text is selected. + //! + //! \sa selectedText() + bool hasSelectedText() const {return selText;} + + //! Returns the number of characters that line \a line is indented by. + //! + //! \sa setIndentation() + int indentation(int line) const; + + //! Returns true if the display of indentation guides is enabled. + //! + //! \sa setIndentationGuides() + bool indentationGuides() const; + + //! Returns true if indentations are created using tabs and spaces, rather + //! than just spaces. The default is true. + //! + //! \sa setIndentationsUseTabs() + bool indentationsUseTabs() const; + + //! Returns the indentation width in characters. The default is 0 which + //! means that the value returned by tabWidth() is actually used. + //! + //! \sa setIndentationWidth(), tabWidth() + int indentationWidth() const; + + //! Define a type of indicator using the style \a style with the indicator + //! number \a indicatorNumber. If \a indicatorNumber is -1 then the + //! indicator number is automatically allocated. The indicator number is + //! returned or -1 if too many types of indicator have been defined. + //! + //! Indicators are used to display additional information over the top of + //! styling. They can be used to show, for example, syntax errors, + //! deprecated names and bad indentation by drawing lines under text or + //! boxes around text. + //! + //! There may be up to 32 types of indicator defined at a time. The first + //! 8 are normally used by lexers. By default indicator number 0 is a + //! dark green SquiggleIndicator, 1 is a blue TTIndicator, and 2 is a red + //! PlainIndicator. + int indicatorDefine(IndicatorStyle style, int indicatorNumber = -1); + + //! Returns true if the indicator \a indicatorNumber is drawn under the + //! text (i.e. in the background). The default is false. + //! + //! \sa setIndicatorDrawUnder() + bool indicatorDrawUnder(int indicatorNumber) const; + + //! Returns true if a call tip is currently active. + bool isCallTipActive() const; + + //! Returns true if an auto-completion or user defined list is currently + //! active. + bool isListActive() const; + + //! Returns true if the text has been modified. + //! + //! \sa setModified(), modificationChanged() + bool isModified() const; + + //! Returns true if the text edit is read-only. + //! + //! \sa setReadOnly() + bool isReadOnly() const; + + //! Returns true if there is something that can be redone. + //! + //! \sa redo() + bool isRedoAvailable() const; + + //! Returns true if there is something that can be undone. + //! + //! \sa undo() + bool isUndoAvailable() const; + + //! Returns true if text is interpreted as being UTF8 encoded. The default + //! is to interpret the text as Latin1 encoded. + //! + //! \sa setUtf8() + bool isUtf8() const; + + //! Returns true if character \a ch is a valid word character. + //! + //! \sa wordCharacters() + bool isWordCharacter(char ch) const; + + //! Returns the line which is at \a point pixel coordinates or -1 if there + //! is no line at that point. + int lineAt(const QPoint &point) const; + + //! QScintilla uses the combination of a line number and a character index + //! from the start of that line to specify the position of a character + //! within the text. The underlying Scintilla instead uses a byte index + //! from the start of the text. This will convert the \a position byte + //! index to the \a *line line number and \a *index character index. + //! + //! \sa positionFromLineIndex() + void lineIndexFromPosition(int position, int *line, int *index) const; + + //! Returns the length of line \a line int bytes or -1 if there is no such + //! line. In order to get the length in characters use text(line).length(). + int lineLength(int line) const; + + //! Returns the number of lines of text. + int lines() const; + + //! Returns the length of the text edit's text in bytes. In order to get + //! the length in characters use text().length(). + int length() const; + + //! Returns the current language lexer used to style text. If it is 0 then + //! syntax styling is disabled. + //! + //! \sa setLexer() + QsciLexer *lexer() const; + + //! Returns the background color of margin \a margin. + //! + //! \sa setMarginBackgroundColor() + QColor marginBackgroundColor(int margin) const; + + //! Returns true if line numbers are enabled for margin \a margin. + //! + //! \sa setMarginLineNumbers(), marginType(), SCI_GETMARGINTYPEN + bool marginLineNumbers(int margin) const; + + //! Returns the marker mask of margin \a margin. + //! + //! \sa setMarginMask(), QsciMarker, SCI_GETMARGINMASKN + int marginMarkerMask(int margin) const; + + //! Returns the margin options. The default is MoNone. + //! + //! \sa setMarginOptions(), MoNone, MoSublineSelect. + int marginOptions() const; + + //! Returns true if margin \a margin is sensitive to mouse clicks. + //! + //! \sa setMarginSensitivity(), marginClicked(), SCI_GETMARGINTYPEN + bool marginSensitivity(int margin) const; + + //! Returns the type of margin \a margin. + //! + //! \sa setMarginType(), SCI_GETMARGINTYPEN + MarginType marginType(int margin) const; + + //! Returns the width in pixels of margin \a margin. + //! + //! \sa setMarginWidth(), SCI_GETMARGINWIDTHN + int marginWidth(int margin) const; + + //! Returns the number of margins. + //! + //! \sa setMargins() + int margins() const; + + //! Define a type of marker using the symbol \a sym with the marker number + //! \a markerNumber. If \a markerNumber is -1 then the marker number is + //! automatically allocated. The marker number is returned or -1 if too + //! many types of marker have been defined. + //! + //! Markers are small geometric symbols and characters used, for example, + //! to indicate the current line or, in debuggers, to indicate breakpoints. + //! If a margin has a width of 0 then its markers are not drawn, but their + //! background colours affect the background colour of the corresponding + //! line of text. + //! + //! There may be up to 32 types of marker defined at a time and each line + //! of text has a set of marker instances associated with it. Markers are + //! drawn according to their numerical identifier. Markers try to move + //! with their text by tracking where the start of their line moves to. + //! For example, when a line is deleted its markers are added to previous + //! line's markers. + //! + //! Each marker type is identified by a marker number. Each instance of a + //! marker is identified by a marker handle. + int markerDefine(MarkerSymbol sym, int markerNumber = -1); + + //! Define a marker using the character \a ch with the marker number + //! \a markerNumber. If \a markerNumber is -1 then the marker number is + //! automatically allocated. The marker number is returned or -1 if too + //! many markers have been defined. + int markerDefine(char ch, int markerNumber = -1); + + //! Define a marker using a copy of the pixmap \a pm with the marker number + //! \a markerNumber. If \a markerNumber is -1 then the marker number is + //! automatically allocated. The marker number is returned or -1 if too + //! many markers have been defined. + int markerDefine(const QPixmap &pm, int markerNumber = -1); + + //! Define a marker using a copy of the image \a im with the marker number + //! \a markerNumber. If \a markerNumber is -1 then the marker number is + //! automatically allocated. The marker number is returned or -1 if too + //! many markers have been defined. + int markerDefine(const QImage &im, int markerNumber = -1); + + //! Add an instance of marker number \a markerNumber to line number + //! \a linenr. A handle for the marker is returned which can be used to + //! track the marker's position, or -1 if the \a markerNumber was invalid. + //! + //! \sa markerDelete(), markerDeleteAll(), markerDeleteHandle() + int markerAdd(int linenr, int markerNumber); + + //! Returns the 32 bit mask of marker numbers at line number \a linenr. + //! + //! \sa markerAdd() + unsigned markersAtLine(int linenr) const; + + //! Delete all markers with the marker number \a markerNumber in the line + //! \a linenr. If \a markerNumber is -1 then delete all markers from line + //! \a linenr. + //! + //! \sa markerAdd(), markerDeleteAll(), markerDeleteHandle() + void markerDelete(int linenr, int markerNumber = -1); + + //! Delete the all markers with the marker number \a markerNumber. If + //! \a markerNumber is -1 then delete all markers. + //! + //! \sa markerAdd(), markerDelete(), markerDeleteHandle() + void markerDeleteAll(int markerNumber = -1); + + //! Delete the the marker instance with the marker handle \a mhandle. + //! + //! \sa markerAdd(), markerDelete(), markerDeleteAll() + void markerDeleteHandle(int mhandle); + + //! Return the line number that contains the marker instance with the + //! marker handle \a mhandle. + int markerLine(int mhandle) const; + + //! Return the number of the next line to contain at least one marker from + //! a 32 bit mask of markers. \a linenr is the line number to start the + //! search from. \a mask is the mask of markers to search for. + //! + //! \sa markerFindPrevious() + int markerFindNext(int linenr, unsigned mask) const; + + //! Return the number of the previous line to contain at least one marker + //! from a 32 bit mask of markers. \a linenr is the line number to start + //! the search from. \a mask is the mask of markers to search for. + //! + //! \sa markerFindNext() + int markerFindPrevious(int linenr, unsigned mask) const; + + //! Returns true if text entered by the user will overwrite existing text. + //! + //! \sa setOverwriteMode() + bool overwriteMode() const; + + //! Returns the widget's paper (ie. background) colour. + //! + //! \sa setPaper() + QColor paper() const; + + //! QScintilla uses the combination of a line number and a character index + //! from the start of that line to specify the position of a character + //! within the text. The underlying Scintilla instead uses a byte index + //! from the start of the text. This will return the byte index + //! corresponding to the \a line line number and \a index character index. + //! + //! \sa lineIndexFromPosition() + int positionFromLineIndex(int line, int index) const; + + //! Reads the current document from the \a io device and returns true if + //! there was no error. + //! + //! \sa write() + bool read(QIODevice *io); + + //! Recolours the document between the \a start and \a end positions. + //! \a start defaults to the start of the document and \a end defaults to + //! the end of the document. + virtual void recolor(int start = 0, int end = -1); + + //! Register an image \a pm with ID \a id. Registered images can be + //! displayed in auto-completion lists. + //! + //! \sa clearRegisteredImages(), QsciLexer::apiLoad() + void registerImage(int id, const QPixmap &pm); + + //! Register an image \a im with ID \a id. Registered images can be + //! displayed in auto-completion lists. + //! + //! \sa clearRegisteredImages(), QsciLexer::apiLoad() + void registerImage(int id, const QImage &im); + + //! Replace the current selection, set by a previous call to findFirst(), + //! findFirstInSelection() or findNext(), with \a replaceStr. + //! + //! \sa cancelFind(), findFirst(), findFirstInSelection(), findNext() + virtual void replace(const QString &replaceStr); + + //! Reset the fold margin colours to their defaults. + //! + //! \sa setFoldMarginColors() + void resetFoldMarginColors(); + + //! Resets the background colour of an active hotspot area to the default. + //! + //! \sa setHotspotBackgroundColor(), resetHotspotForegroundColor() + void resetHotspotBackgroundColor(); + + //! Resets the foreground colour of an active hotspot area to the default. + //! + //! \sa setHotspotForegroundColor(), resetHotspotBackgroundColor() + void resetHotspotForegroundColor(); + + //! Gets the assumed document width in pixels. + //! + //! \sa setScrollWidth(), setScrollWidthTracking() + int scrollWidth() const; + + //! Returns true if scroll width tracking is enabled. + //! + //! \sa scrollWidth(), setScrollWidthTracking() + bool scrollWidthTracking() const; + + //! The fold margin may be drawn as a one pixel sized checkerboard pattern + //! of two colours, \a fore and \a back. + //! + //! \sa resetFoldMarginColors() + void setFoldMarginColors(const QColor &fore, const QColor &back); + + //! Set the display style for annotations. The default is + //! AnnotationStandard. + //! + //! \sa annotationDisplay() + void setAnnotationDisplay(AnnotationDisplay display); + + //! Enable the use of fill-up characters, either those explicitly set or + //! those set by a lexer. By default, fill-up characters are disabled. + //! + //! \sa autoCompletionFillupsEnabled(), setAutoCompletionFillups() + void setAutoCompletionFillupsEnabled(bool enabled); + + //! A fill-up character is one that, when entered while an auto-completion + //! list is being displayed, causes the currently selected item from the + //! list to be added to the text followed by the fill-up character. + //! \a fillups is the set of fill-up characters. If a language lexer has + //! been set then this is ignored and the lexer defines the fill-up + //! characters. The default is that no fill-up characters are set. + //! + //! \sa autoCompletionFillupsEnabled(), setAutoCompletionFillupsEnabled() + void setAutoCompletionFillups(const char *fillups); + + //! A word separator is a sequence of characters that, when entered, causes + //! the auto-completion list to be displayed. If a language lexer has been + //! set then this is ignored and the lexer defines the word separators. + //! The default is that no word separators are set. + //! + //! \sa setAutoCompletionThreshold() + void setAutoCompletionWordSeparators(const QStringList &separators); + + //! Set the background colour of call tips to \a col. The default is + //! white. + void setCallTipsBackgroundColor(const QColor &col); + + //! Set the foreground colour of call tips to \a col. The default is + //! mid-gray. + void setCallTipsForegroundColor(const QColor &col); + + //! Set the highlighted colour of call tip text to \a col. The default is + //! dark blue. + void setCallTipsHighlightColor(const QColor &col); + + //! Set the current call tip position. The default is CallTipsBelowText. + //! + //! \sa callTipsPosition() + void setCallTipsPosition(CallTipsPosition position); + + //! Set the current call tip style. The default is CallTipsNoContext. + //! + //! \sa callTipsStyle() + void setCallTipsStyle(CallTipsStyle style); + + //! Set the maximum number of call tips that are displayed to \a nr. If + //! the maximum number is 0 then all applicable call tips are displayed. + //! If the maximum number is -1 then one call tip will be displayed with up + //! and down arrows that allow the use to scroll through the full list. + //! The default is -1. + //! + //! \sa callTipsVisible() + void setCallTipsVisible(int nr); + + //! Sets each line in the \a folds list of line numbers to be a contracted + //! fold. This is typically used to restore the fold state of a document. + //! + //! \sa contractedFolds() + void setContractedFolds(const QList &folds); + + //! Attach the document \a document, replacing the currently attached + //! document. + //! + //! \sa document() + void setDocument(const QsciDocument &document); + + //! Add \a colnr to the columns which are displayed with a vertical line. + //! The edge mode must be set to EdgeMultipleLines. + //! + //! \sa clearEdgeColumns() + void addEdgeColumn(int colnr, const QColor &col); + + //! Remove any columns added by previous calls to addEdgeColumn(). + //! + //! \sa addEdgeColumn() + void clearEdgeColumns(); + + //! Set the color of the marker used to show that a line has exceeded the + //! length set by setEdgeColumn(). + //! + //! \sa edgeColor(), \sa setEdgeColumn + void setEdgeColor(const QColor &col); + + //! Set the number of the column after which lines are considered to be + //! long. + //! + //! \sa edgeColumn() + void setEdgeColumn(int colnr); + + //! Set the edge mode which determines how long lines are marked. + //! + //! \sa edgeMode() + void setEdgeMode(EdgeMode mode); + + //! Set the number of the first visible line to \a linenr. + //! + //! \sa firstVisibleLine() + void setFirstVisibleLine(int linenr); + + //! Enables or disables, according to \a under, if the indicator + //! \a indicatorNumber is drawn under or over the text (i.e. in the + //! background or foreground). If \a indicatorNumber is -1 then the state + //! of all indicators is set. + //! + //! \sa indicatorDrawUnder() + void setIndicatorDrawUnder(bool under, int indicatorNumber = -1); + + //! Set the foreground colour of indicator \a indicatorNumber to \a col. + //! If \a indicatorNumber is -1 then the colour of all indicators is set. + void setIndicatorForegroundColor(const QColor &col, int indicatorNumber = -1); + + //! Set the foreground colour of indicator \a indicatorNumber to \a col + //! when the mouse is over it or the caret moved into it. If + //! \a indicatorNumber is -1 then the colour of all indicators is set. + void setIndicatorHoverForegroundColor(const QColor &col, int indicatorNumber = -1); + + //! Set the style of indicator \a indicatorNumber to \a style when the + //! mouse is over it or the caret moved into it. If \a indicatorNumber is + //! -1 then the style of all indicators is set. + void setIndicatorHoverStyle(IndicatorStyle style, int indicatorNumber = -1); + + //! Set the outline colour of indicator \a indicatorNumber to \a col. + //! If \a indicatorNumber is -1 then the colour of all indicators is set. + //! At the moment only the alpha value of the colour has any affect. + void setIndicatorOutlineColor(const QColor &col, int indicatorNumber = -1); + + //! Sets the background color of margin \a margin to \a col. + //! + //! \sa marginBackgroundColor() + void setMarginBackgroundColor(int margin, const QColor &col); + + //! Set the margin options to \a options. + //! + //! \sa marginOptions(), MoNone, MoSublineSelect. + void setMarginOptions(int options); + + //! Set the margin text of line \a line with the text \a text using the + //! style number \a style. + void setMarginText(int line, const QString &text, int style); + + //! Set the margin text of line \a line with the text \a text using the + //! style \a style. + void setMarginText(int line, const QString &text, const QsciStyle &style); + + //! Set the margin text of line \a line with the styled text \a text. + void setMarginText(int line, const QsciStyledText &text); + + //! Set the margin text of line \a line with the list of styled text \a + //! text. + void setMarginText(int line, const QList &text); + + //! Set the type of margin \a margin to type \a type. + //! + //! \sa marginType(), SCI_SETMARGINTYPEN + void setMarginType(int margin, MarginType type); + + //! The margin text on line \a line is removed. If \a line is negative + //! then all margin text is removed. + void clearMarginText(int line = -1); + + //! Set the number of margins to \a margins. + //! + //! \sa margins() + void setMargins(int margins); + + //! Set the background colour, including the alpha component, of marker + //! \a markerNumber to \a col. If \a markerNumber is -1 then the colour of + //! all markers is set. The default is white. + //! + //! \sa setMarkerForegroundColor() + void setMarkerBackgroundColor(const QColor &col, int markerNumber = -1); + + //! Set the foreground colour of marker \a markerNumber to \a col. If + //! \a markerNumber is -1 then the colour of all markers is set. The + //! default is black. + //! + //! \sa setMarkerBackgroundColor() + void setMarkerForegroundColor(const QColor &col, int markerNumber = -1); + + //! Set the background colour used to display matched braces to \a col. It + //! is ignored if an indicator is being used. The default is white. + //! + //! \sa setMatchedBraceForegroundColor(), setMatchedBraceIndicator() + void setMatchedBraceBackgroundColor(const QColor &col); + + //! Set the foreground colour used to display matched braces to \a col. It + //! is ignored if an indicator is being used. The default is red. + //! + //! \sa setMatchedBraceBackgroundColor(), setMatchedBraceIndicator() + void setMatchedBraceForegroundColor(const QColor &col); + + //! Set the indicator used to display matched braces to \a indicatorNumber. + //! The default is not to use an indicator. + //! + //! \sa resetMatchedBraceIndicator(), setMatchedBraceBackgroundColor() + void setMatchedBraceIndicator(int indicatorNumber); + + //! Stop using an indicator to display matched braces. + //! + //! \sa setMatchedBraceIndicator() + void resetMatchedBraceIndicator(); + + //! For performance, QScintilla does not measure the display width of the + //! document to determine the properties of the horizontal scroll bar. + //! Instead, an assumed width is used. This sets the document width in + //! pixels assumed by QScintilla to \a pixelWidth. The default value is + //! 2000. + //! + //! \sa scrollWidth(), setScrollWidthTracking() + void setScrollWidth(int pixelWidth); + + //! If scroll width tracking is enabled then the scroll width is adjusted + //! to ensure that all of the lines currently displayed can be completely + //! scrolled. This mode never adjusts the scroll width to be narrower. + //! This sets the scroll width tracking to \a enabled. + //! + //! \sa setScrollWidth(), scrollWidthTracking() + void setScrollWidthTracking(bool enabled); + + //! Sets the mode used to draw tab characters when whitespace is visible to + //! \a mode. The default is to use an arrow. + //! + //! \sa tabDrawMode() + void setTabDrawMode(TabDrawMode mode); + + //! Set the background colour used to display unmatched braces to \a col. + //! It is ignored if an indicator is being used. The default is white. + //! + //! \sa setUnmatchedBraceForegroundColor(), setUnmatchedBraceIndicator() + void setUnmatchedBraceBackgroundColor(const QColor &col); + + //! Set the foreground colour used to display unmatched braces to \a col. + //! It is ignored if an indicator is being used. The default is blue. + //! + //! \sa setUnmatchedBraceBackgroundColor(), setUnmatchedBraceIndicator() + void setUnmatchedBraceForegroundColor(const QColor &col); + + //! Set the indicator used to display unmatched braces to + //! \a indicatorNumber. The default is not to use an indicator. + //! + //! \sa resetUnmatchedBraceIndicator(), setUnmatchedBraceBackgroundColor() + void setUnmatchedBraceIndicator(int indicatorNumber); + + //! Stop using an indicator to display unmatched braces. + //! + //! \sa setUnmatchedBraceIndicator() + void resetUnmatchedBraceIndicator(); + + //! Set the visual flags displayed when a line is wrapped. \a endFlag + //! determines if and where the flag at the end of a line is displayed. + //! \a startFlag determines if and where the flag at the start of a line is + //! displayed. \a indent is the number of characters a wrapped line is + //! indented by. By default no visual flags are displayed. + void setWrapVisualFlags(WrapVisualFlag endFlag, + WrapVisualFlag startFlag = WrapFlagNone, int indent = 0); + + //! Returns the selected text or an empty string if there is no currently + //! selected text. + //! + //! \sa hasSelectedText() + QString selectedText() const; + + //! Returns whether or not the selection is drawn up to the right hand + //! border. + //! + //! \sa setSelectionToEol() + bool selectionToEol() const; + + //! Sets the background colour of an active hotspot area to \a col. + //! + //! \sa resetHotspotBackgroundColor(), setHotspotForegroundColor() + void setHotspotBackgroundColor(const QColor &col); + + //! Sets the foreground colour of an active hotspot area to \a col. + //! + //! \sa resetHotspotForegroundColor(), setHotspotBackgroundColor() + void setHotspotForegroundColor(const QColor &col); + + //! Enables or disables, according to \a enable, the underlining of an + //! active hotspot area. The default is false. + void setHotspotUnderline(bool enable); + + //! Enables or disables, according to \a enable, the wrapping of a hotspot + //! area to following lines. The default is true. + void setHotspotWrap(bool enable); + + //! Sets whether or not the selection is drawn up to the right hand border. + //! \a filled is set if the selection is drawn to the border. + //! + //! \sa selectionToEol() + void setSelectionToEol(bool filled); + + //! Sets the extra space added to the height of a line above the baseline + //! of the text to \a extra. + //! + //! \sa extraAscent(), setExtraDescent() + void setExtraAscent(int extra); + + //! Sets the extra space added to the height of a line below the baseline + //! of the text to \a extra. + //! + //! \sa extraDescent(), setExtraAscent() + void setExtraDescent(int extra); + + //! Text entered by the user will overwrite existing text if \a overwrite + //! is true. + //! + //! \sa overwriteMode() + void setOverwriteMode(bool overwrite); + + //! Sets the background colour of visible whitespace to \a col. If \a col + //! is an invalid color (the default) then the color specified by the + //! current lexer is used. + void setWhitespaceBackgroundColor(const QColor &col); + + //! Sets the foreground colour of visible whitespace to \a col. If \a col + //! is an invalid color (the default) then the color specified by the + //! current lexer is used. + void setWhitespaceForegroundColor(const QColor &col); + + //! Sets the size of the dots used to represent visible whitespace. + //! + //! \sa whitespaceSize() + void setWhitespaceSize(int size); + + //! Sets the line wrap indentation mode to \a mode. The default is + //! WrapIndentFixed. + //! + //! \sa wrapIndentMode() + void setWrapIndentMode(WrapIndentMode mode); + + //! Displays a user defined list which can be interacted with like an + //! auto-completion list. \a id is an identifier for the list which is + //! passed as an argument to the userListActivated() signal and must be at + //! least 1. \a list is the text with which the list is populated. + //! + //! \sa cancelList(), isListActive(), userListActivated() + void showUserList(int id, const QStringList &list); + + //! The standard command set is returned. + QsciCommandSet *standardCommands() const {return stdCmds;} + + //! Returns the mode used to draw tab characters when whitespace is + //! visible. + //! + //! \sa setTabDrawMode() + TabDrawMode tabDrawMode() const; + + //! Returns true if the tab key indents a line instead of inserting a tab + //! character. The default is true. + //! + //! \sa setTabIndents(), backspaceUnindents(), setBackspaceUnindents() + bool tabIndents() const; + + //! Returns the tab width in characters. The default is 8. + //! + //! \sa setTabWidth() + int tabWidth() const; + + //! Returns the text of the current document. + //! + //! \sa setText() + QString text() const; + + //! \overload + //! + //! Returns the text of line \a line. + //! + //! \sa setText() + QString text(int line) const; + + //! \overload + //! + //! Returns the text between positions \a start and \a end. This is + //! typically used by QsciLexerCustom::styleText(). + //! + //! \sa bytes(), setText() + QString text(int start, int end) const; + + //! Returns the height in pixels of the text in line number \a linenr. + int textHeight(int linenr) const; + + //! Returns the size of the dots used to represent visible whitespace. + //! + //! \sa setWhitespaceSize() + int whitespaceSize() const; + + //! Returns the visibility of whitespace. + //! + //! \sa setWhitespaceVisibility() + WhitespaceVisibility whitespaceVisibility() const; + + //! Returns the word at the \a line line number and \a index character + //! index. + QString wordAtLineIndex(int line, int index) const; + + //! Returns the word at the \a point pixel coordinates. + QString wordAtPoint(const QPoint &point) const; + + //! Returns the set of valid word character as defined by the current + //! language lexer. If there is no current lexer then the set contains an + //! an underscore, numbers and all upper and lower case alphabetic + //! characters. + //! + //! \sa isWordCharacter() + const char *wordCharacters() const; + + //! Returns the line wrap mode. + //! + //! \sa setWrapMode() + WrapMode wrapMode() const; + + //! Returns the line wrap indentation mode. + //! + //! \sa setWrapIndentMode() + WrapIndentMode wrapIndentMode() const; + + //! Writes the current document to the \a io device and returns true if + //! there was no error. + //! + //! \sa read() + bool write(QIODevice *io) const; + +public slots: + //! Appends the text \a text to the end of the text edit. Note that the + //! undo/redo history is cleared by this function. + virtual void append(const QString &text); + + //! Display an auto-completion list based on any installed APIs, the + //! current contents of the document and the characters immediately to the + //! left of the cursor. + //! + //! \sa autoCompleteFromAPIs(), autoCompleteFromDocument() + virtual void autoCompleteFromAll(); + + //! Display an auto-completion list based on any installed APIs and the + //! characters immediately to the left of the cursor. + //! + //! \sa autoCompleteFromAll(), autoCompleteFromDocument(), + //! setAutoCompletionAPIs() + virtual void autoCompleteFromAPIs(); + + //! Display an auto-completion list based on the current contents of the + //! document and the characters immediately to the left of the cursor. + //! + //! \sa autoCompleteFromAll(), autoCompleteFromAPIs() + virtual void autoCompleteFromDocument(); + + //! Display a call tip based on the the characters immediately to the left + //! of the cursor. + virtual void callTip(); + + //! Deletes all the text in the text edit. + virtual void clear(); + + //! Copies any selected text to the clipboard. + //! + //! \sa copyAvailable(), cut(), paste() + virtual void copy(); + + //! Copies any selected text to the clipboard and then deletes the text. + //! + //! \sa copy(), paste() + virtual void cut(); + + //! Ensures that the cursor is visible. + virtual void ensureCursorVisible(); + + //! Ensures that the line number \a line is visible. + virtual void ensureLineVisible(int line); + + //! If any lines are currently folded then they are all unfolded. + //! Otherwise all lines are folded. This has the same effect as clicking + //! in the fold margin with the shift and control keys pressed. If + //! \a children is not set (the default) then only the top level fold + //! points are affected, otherwise the state of all fold points are + //! changed. + virtual void foldAll(bool children = false); + + //! If the line \a line is folded then it is unfolded. Otherwise it is + //! folded. This has the same effect as clicking in the fold margin. + virtual void foldLine(int line); + + //! Increases the indentation of line \a line by an indentation width. + //! + //! \sa unindent() + virtual void indent(int line); + + //! Insert the text \a text at the current position. + virtual void insert(const QString &text); + + //! Insert the text \a text in the line \a line at the position + //! \a index. + virtual void insertAt(const QString &text, int line, int index); + + //! If the cursor is either side of a brace character then move it to the + //! position of the corresponding brace. + virtual void moveToMatchingBrace(); + + //! Pastes any text from the clipboard into the text edit at the current + //! cursor position. + //! + //! \sa copy(), cut() + virtual void paste(); + + //! Redo the last change or sequence of changes. + //! + //! \sa isRedoAvailable() + virtual void redo(); + + //! Removes any selected text. + //! + //! \sa replaceSelectedText() + virtual void removeSelectedText(); + + //! Replaces any selected text with \a text. + //! + //! \sa removeSelectedText() + virtual void replaceSelectedText(const QString &text); + + //! Resets the background colour of selected text to the default. + //! + //! \sa setSelectionBackgroundColor(), resetSelectionForegroundColor() + virtual void resetSelectionBackgroundColor(); + + //! Resets the foreground colour of selected text to the default. + //! + //! \sa setSelectionForegroundColor(), resetSelectionBackgroundColor() + virtual void resetSelectionForegroundColor(); + + //! If \a select is true (the default) then all the text is selected. If + //! \a select is false then any currently selected text is deselected. + virtual void selectAll(bool select = true); + + //! If the cursor is either side of a brace character then move it to the + //! position of the corresponding brace and select the text between the + //! braces. + virtual void selectToMatchingBrace(); + + //! If \a cs is true then auto-completion lists are case sensitive. The + //! default is true. Note that setting a lexer may change the case + //! sensitivity. + //! + //! \sa autoCompletionCaseSensitivity() + virtual void setAutoCompletionCaseSensitivity(bool cs); + + //! If \a replace is true then when an item from an auto-completion list is + //! selected, the rest of the word to the right of the current cursor is + //! removed. The default is false. + //! + //! \sa autoCompletionReplaceWord() + virtual void setAutoCompletionReplaceWord(bool replace); + + //! If \a single is true then when there is only a single entry in an + //! auto-completion list it is automatically used and the list is not + //! displayed. This only has an effect when auto-completion is explicitly + //! requested (using autoCompleteFromAPIs() and autoCompleteFromDocument()) + //! and has no effect when auto-completion is triggered as the user types. + //! The default is false. Note that this is deprecated and + //! setAutoCompletionUseSingle() should be used instead. + //! + //! \sa autoCompletionShowSingle() + virtual void setAutoCompletionShowSingle(bool single); + + //! Sets the source for the auto-completion list when it is being displayed + //! automatically as the user types to \a source. The default is AcsNone, + //! ie. it is disabled. + //! + //! \sa autoCompletionSource() + virtual void setAutoCompletionSource(AutoCompletionSource source); + + //! Sets the threshold for the automatic display of the auto-completion + //! list as the user types to \a thresh. The threshold is the number of + //! characters that the user must type before the list is displayed. If + //! the threshold is less than or equal to 0 then the list is disabled. + //! The default is -1. + //! + //! \sa autoCompletionThreshold(), setAutoCompletionWordSeparators() + virtual void setAutoCompletionThreshold(int thresh); + + //! Sets the behavior of the auto-completion list when it has a single + //! entry. The default is AcusNever. + //! + //! \sa autoCompletionUseSingle() + virtual void setAutoCompletionUseSingle(AutoCompletionUseSingle single); + + //! If \a autoindent is true then auto-indentation is enabled. The default + //! is false. + //! + //! \sa autoIndent() + virtual void setAutoIndent(bool autoindent); + + //! Sets the brace matching mode to \a bm. The default is NoBraceMatching. + //! + //! \sa braceMatching() + virtual void setBraceMatching(BraceMatch bm); + + //! If \a deindent is true then the backspace key will unindent a line + //! rather then delete a character. + //! + //! \sa backspaceUnindents(), tabIndents(), setTabIndents() + virtual void setBackspaceUnindents(bool unindent); + + //! Sets the foreground colour of the caret to \a col. + virtual void setCaretForegroundColor(const QColor &col); + + //! Sets the background colour, including the alpha component, of the line + //! containing the caret to \a col. + //! + //! \sa setCaretLineVisible() + virtual void setCaretLineBackgroundColor(const QColor &col); + + //! Sets the width of the frame of the line containing the caret to \a + //! width. + virtual void setCaretLineFrameWidth(int width); + + //! Enables or disables, according to \a enable, the background color of + //! the line containing the caret. + //! + //! \sa setCaretLineBackgroundColor() + virtual void setCaretLineVisible(bool enable); + + //! Sets the width of the caret to \a width pixels. A \a width of 0 makes + //! the caret invisible. + virtual void setCaretWidth(int width); + + //! The widget's text (ie. foreground) colour is set to \a c. This has no + //! effect if a language lexer has been set. + //! + //! \sa color() + virtual void setColor(const QColor &c); + + //! Sets the cursor to the line \a line at the position \a index. + //! + //! \sa getCursorPosition() + virtual void setCursorPosition(int line, int index); + + //! Sets the end-of-line mode to \a mode. The default is the platform's + //! natural mode. + //! + //! \sa eolMode() + virtual void setEolMode(EolMode mode); + + //! If \a visible is true then end-of-lines are made visible. The default + //! is that they are invisible. + //! + //! \sa eolVisibility() + virtual void setEolVisibility(bool visible); + + //! Sets the folding style for margin \a margin to \a fold. The default + //! style is NoFoldStyle (ie. folding is disabled) and the default margin + //! is 2. + //! + //! \sa folding() + virtual void setFolding(FoldStyle fold, int margin = 2); + + //! Sets the indentation of line \a line to \a indentation characters. + //! + //! \sa indentation() + virtual void setIndentation(int line, int indentation); + + //! Enables or disables, according to \a enable, this display of + //! indentation guides. + //! + //! \sa indentationGuides() + virtual void setIndentationGuides(bool enable); + + //! Set the background colour of indentation guides to \a col. + //! + //! \sa setIndentationGuidesForegroundColor() + virtual void setIndentationGuidesBackgroundColor(const QColor &col); + + //! Set the foreground colour of indentation guides to \a col. + //! + //! \sa setIndentationGuidesBackgroundColor() + virtual void setIndentationGuidesForegroundColor(const QColor &col); + + //! If \a tabs is true then indentations are created using tabs and spaces, + //! rather than just spaces. + //! + //! \sa indentationsUseTabs() + virtual void setIndentationsUseTabs(bool tabs); + + //! Sets the indentation width to \a width characters. If \a width is 0 + //! then the value returned by tabWidth() is used. + //! + //! \sa indentationWidth(), tabWidth() + virtual void setIndentationWidth(int width); + + //! Sets the specific language lexer used to style text to \a lex. If + //! \a lex is 0 then syntax styling is disabled. + //! + //! \sa lexer() + virtual void setLexer(QsciLexer *lexer = 0); + + //! Set the background colour of all margins to \a col. The default is a + //! gray. + //! + //! \sa setMarginsForegroundColor() + virtual void setMarginsBackgroundColor(const QColor &col); + + //! Set the font used in all margins to \a f. + virtual void setMarginsFont(const QFont &f); + + //! Set the foreground colour of all margins to \a col. The default is + //! black. + //! + //! \sa setMarginsBackgroundColor() + virtual void setMarginsForegroundColor(const QColor &col); + + //! Enables or disables, according to \a lnrs, the display of line numbers + //! in margin \a margin. + //! + //! \sa marginLineNumbers(), setMarginType(), SCI_SETMARGINTYPEN + virtual void setMarginLineNumbers(int margin, bool lnrs); + + //! Sets the marker mask of margin \a margin to \a mask. Only those + //! markers whose bit is set in the mask are displayed in the margin. + //! + //! \sa marginMarkerMask(), QsciMarker, SCI_SETMARGINMASKN + virtual void setMarginMarkerMask(int margin, int mask); + + //! Enables or disables, according to \a sens, the sensitivity of margin + //! \a margin to mouse clicks. If the user clicks in a sensitive margin + //! the marginClicked() signal is emitted. + //! + //! \sa marginSensitivity(), marginClicked(), SCI_SETMARGINSENSITIVEN + virtual void setMarginSensitivity(int margin, bool sens); + + //! Sets the width of margin \a margin to \a width pixels. If the width of + //! a margin is 0 then it is not displayed. + //! + //! \sa marginWidth(), SCI_SETMARGINWIDTHN + virtual void setMarginWidth(int margin, int width); + + //! Sets the width of margin \a margin so that it is wide enough to display + //! \a s in the current margin font. + //! + //! \sa marginWidth(), SCI_SETMARGINWIDTHN + virtual void setMarginWidth(int margin, const QString &s); + + //! Sets the modified state of the text edit to \a m. Note that it is only + //! possible to clear the modified state (where \a m is false). Attempts + //! to set the modified state (where \a m is true) are ignored. + //! + //! \sa isModified(), modificationChanged() + virtual void setModified(bool m); + + //! The widget's paper (ie. background) colour is set to \a c. This has no + //! effect if a language lexer has been set. + //! + //! \sa paper() + virtual void setPaper(const QColor &c); + + //! Sets the read-only state of the text edit to \a ro. + //! + //! \sa isReadOnly() + virtual void setReadOnly(bool ro); + + //! Sets the selection which starts at position \a indexFrom in line + //! \a lineFrom and ends at position \a indexTo in line \a lineTo. The + //! cursor is moved to position \a indexTo in \a lineTo. + //! + //! \sa getSelection() + virtual void setSelection(int lineFrom, int indexFrom, int lineTo, + int indexTo); + + //! Sets the background colour, including the alpha component, of selected + //! text to \a col. + //! + //! \sa resetSelectionBackgroundColor(), setSelectionForegroundColor() + virtual void setSelectionBackgroundColor(const QColor &col); + + //! Sets the foreground colour of selected text to \a col. + //! + //! \sa resetSelectionForegroundColor(), setSelectionBackgroundColor() + virtual void setSelectionForegroundColor(const QColor &col); + + //! If \a indent is true then the tab key will indent a line rather than + //! insert a tab character. + //! + //! \sa tabIndents(), backspaceUnindents(), setBackspaceUnindents() + virtual void setTabIndents(bool indent); + + //! Sets the tab width to \a width characters. + //! + //! \sa tabWidth() + virtual void setTabWidth(int width); + + //! Replaces all of the current text with \a text. Note that the + //! undo/redo history is cleared by this function. + //! + //! \sa text() + virtual void setText(const QString &text); + + //! Sets the current text encoding. If \a cp is true then UTF8 is used, + //! otherwise Latin1 is used. + //! + //! \sa isUtf8() + virtual void setUtf8(bool cp); + + //! Sets the visibility of whitespace to mode \a mode. The default is that + //! whitespace is invisible. + //! + //! \sa whitespaceVisibility() + virtual void setWhitespaceVisibility(WhitespaceVisibility mode); + + //! Sets the line wrap mode to \a mode. The default is that lines are not + //! wrapped. + //! + //! \sa wrapMode() + virtual void setWrapMode(WrapMode mode); + + //! Undo the last change or sequence of changes. + //! + //! Scintilla has multiple level undo and redo. It will continue to record + //! undoable actions until memory runs out. Sequences of typing or + //! deleting are compressed into single actions to make it easier to undo + //! and redo at a sensible level of detail. Sequences of actions can be + //! combined into actions that are undone as a unit. These sequences occur + //! between calls to beginUndoAction() and endUndoAction(). These + //! sequences can be nested and only the top level sequences are undone as + //! units. + //! + //! \sa beginUndoAction(), endUndoAction(), isUndoAvailable() + virtual void undo(); + + //! Decreases the indentation of line \a line by an indentation width. + //! + //! \sa indent() + virtual void unindent(int line); + + //! Zooms in on the text by by making the base font size \a range points + //! larger and recalculating all font sizes. + //! + //! \sa zoomOut(), zoomTo() + virtual void zoomIn(int range); + + //! \overload + //! + //! Zooms in on the text by by making the base font size one point larger + //! and recalculating all font sizes. + virtual void zoomIn(); + + //! Zooms out on the text by by making the base font size \a range points + //! smaller and recalculating all font sizes. + //! + //! \sa zoomIn(), zoomTo() + virtual void zoomOut(int range); + + //! \overload + //! + //! Zooms out on the text by by making the base font size one point larger + //! and recalculating all font sizes. + virtual void zoomOut(); + + //! Zooms the text by making the base font size \a size points and + //! recalculating all font sizes. + //! + //! \sa zoomIn(), zoomOut() + virtual void zoomTo(int size); + +signals: + //! This signal is emitted whenever the cursor position changes. \a line + //! contains the line number and \a index contains the character index + //! within the line. + void cursorPositionChanged(int line, int index); + + //! This signal is emitted whenever text is selected or de-selected. + //! \a yes is true if text has been selected and false if text has been + //! deselected. If \a yes is true then copy() can be used to copy the + //! selection to the clipboard. If \a yes is false then copy() does + //! nothing. + //! + //! \sa copy(), selectionChanged() + void copyAvailable(bool yes); + + //! This signal is emitted whenever the user clicks on an indicator. \a + //! line is the number of the line where the user clicked. \a index is the + //! character index within the line. \a state is the state of the modifier + //! keys (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and + //! Qt::MetaModifier) when the user clicked. + //! + //! \sa indicatorReleased() + void indicatorClicked(int line, int index, Qt::KeyboardModifiers state); + + //! This signal is emitted whenever the user releases the mouse on an + //! indicator. \a line is the number of the line where the user clicked. + //! \a index is the character index within the line. \a state is the state + //! of the modifier keys (Qt::ShiftModifier, Qt::ControlModifier, + //! Qt::AltModifer and Qt::MetaModifier) when the user released the mouse. + //! + //! \sa indicatorClicked() + void indicatorReleased(int line, int index, Qt::KeyboardModifiers state); + + //! This signal is emitted whenever the number of lines of text changes. + void linesChanged(); + + //! This signal is emitted whenever the user clicks on a sensitive margin. + //! \a margin is the margin. \a line is the number of the line where the + //! user clicked. \a state is the state of the modifier keys + //! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and + //! Qt::MetaModifier) when the user clicked. + //! + //! \sa marginSensitivity(), setMarginSensitivity() + void marginClicked(int margin, int line, Qt::KeyboardModifiers state); + + //! This signal is emitted whenever the user right-clicks on a sensitive + //! margin. \a margin is the margin. \a line is the number of the line + //! where the user clicked. \a state is the state of the modifier keys + //! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and + //! Qt::MetaModifier) when the user clicked. + //! + //! \sa marginSensitivity(), setMarginSensitivity() + void marginRightClicked(int margin, int line, Qt::KeyboardModifiers state); + + //! This signal is emitted whenever the user attempts to modify read-only + //! text. + //! + //! \sa isReadOnly(), setReadOnly() + void modificationAttempted(); + + //! This signal is emitted whenever the modification state of the text + //! changes. \a m is true if the text has been modified. + //! + //! \sa isModified(), setModified() + void modificationChanged(bool m); + + //! This signal is emitted whenever the selection changes. + //! + //! \sa copyAvailable() + void selectionChanged(); + + //! This signal is emitted whenever the text in the text edit changes. + void textChanged(); + + //! This signal is emitted when an item in a user defined list is activated + //! (selected). \a id is the list identifier. \a string is the text of + //! the item. + //! + //! \sa showUserList() + void userListActivated(int id, const QString &string); + +protected: + //! \reimp + virtual bool event(QEvent *e); + + //! \reimp + virtual void changeEvent(QEvent *e); + + //! \reimp + virtual void contextMenuEvent(QContextMenuEvent *e); + + //! \reimp + virtual void wheelEvent(QWheelEvent *e); + +private slots: + void handleCallTipClick(int dir); + void handleCharAdded(int charadded); + void handleIndicatorClick(int pos, int modifiers); + void handleIndicatorRelease(int pos, int modifiers); + void handleMarginClick(int pos, int margin, int modifiers); + void handleMarginRightClick(int pos, int margin, int modifiers); + void handleModified(int pos, int mtype, const char *text, int len, + int added, int line, int foldNow, int foldPrev, int token, + int annotationLinesAdded); + void handlePropertyChange(const char *prop, const char *val); + void handleSavePointReached(); + void handleSavePointLeft(); + void handleSelectionChanged(bool yes); + void handleAutoCompletionSelection(); + void handleUserListSelection(const char *text, int id); + + void handleStyleColorChange(const QColor &c, int style); + void handleStyleEolFillChange(bool eolfill, int style); + void handleStyleFontChange(const QFont &f, int style); + void handleStylePaperChange(const QColor &c, int style); + + void handleUpdateUI(int updated); + + void delete_selection(); + +private: + void detachLexer(); + + enum IndentState { + isNone, + isKeywordStart, + isBlockStart, + isBlockEnd + }; + + void maintainIndentation(char ch, long pos); + void autoIndentation(char ch, long pos); + void autoIndentLine(long pos, int line, int indent); + int blockIndent(int line); + IndentState getIndentState(int line); + bool rangeIsWhitespace(long spos, long epos); + int findStyledWord(const char *text, int style, const char *words); + + void checkMarker(int &markerNumber); + void checkIndicator(int &indicatorNumber); + static void allocateId(int &id, unsigned &allocated, int min, int max); + int currentIndent() const; + int indentWidth() const; + bool doFind(); + int simpleFind(); + void foldClick(int lineClick, int bstate); + void foldChanged(int line, int levelNow, int levelPrev); + void foldExpand(int &line, bool doExpand, bool force = false, + int visLevels = 0, int level = -1); + void setFoldMarker(int marknr, int mark = SC_MARK_EMPTY); + void setLexerStyle(int style); + void setStylesFont(const QFont &f, int style); + void setEnabledColors(int style, QColor &fore, QColor &back); + + void braceMatch(); + long checkBrace(long pos, int brace_style, bool &colonMode); + void gotoMatchingBrace(bool select); + + void startAutoCompletion(AutoCompletionSource acs, bool checkThresh, + bool choose_single); + + int adjustedCallTipPosition(int ctshift) const; + bool getSeparator(int &pos) const; + QString getWord(int &pos) const; + char getCharacter(int &pos) const; + bool isStartChar(char ch) const; + + bool ensureRW(); + void insertAtPos(const QString &text, int pos); + static int mapModifiers(int modifiers); + + QString wordAtPosition(int position) const; + + QByteArray styleText(const QList &styled_text, + char **styles, int style_offset = 0); + + struct FindState + { + enum Status + { + Finding, + FindingInSelection, + Idle + }; + + FindState() : status(Idle) {} + + Status status; + QString expr; + bool wrap; + bool forward; + int flags; + long startpos, startpos_orig; + long endpos, endpos_orig; + bool show; + }; + + FindState findState; + + unsigned allocatedMarkers; + unsigned allocatedIndicators; + int oldPos; + int ctPos; + bool selText; + FoldStyle fold; + int foldmargin; + bool autoInd; + BraceMatch braceMode; + AutoCompletionSource acSource; + int acThresh; + QStringList wseps; + const char *wchars; + CallTipsPosition call_tips_position; + CallTipsStyle call_tips_style; + int maxCallTips; + QStringList ct_entries; + int ct_cursor; + QList ct_shifts; + AutoCompletionUseSingle use_single; + QPointer lex; + QsciCommandSet *stdCmds; + QsciDocument doc; + QColor nl_text_colour; + QColor nl_paper_colour; + QByteArray explicit_fillups; + bool fillups_enabled; + + // The following allow QsciListBoxQt to distinguish between an + // auto-completion list and a user list, and to return the full selection + // of an auto-completion list. + friend class QsciListBoxQt; + + QString acSelection; + bool isAutoCompletionList() const; + + void set_shortcut(QAction *action, QsciCommand::Command cmd_id) const; + + QsciScintilla(const QsciScintilla &); + QsciScintilla &operator=(const QsciScintilla &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintillabase.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintillabase.h new file mode 100644 index 000000000..606c8badc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qsciscintillabase.h @@ -0,0 +1,3888 @@ +// This class defines the "official" low-level API. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCISCINTILLABASE_H +#define QSCISCINTILLABASE_H + +#include + +#include +#include +#include +#include + +#include + + +QT_BEGIN_NAMESPACE +class QColor; +class QImage; +class QMimeData; +class QPainter; +class QPixmap; +class QUrl; +QT_END_NAMESPACE + +class QsciScintillaQt; + + +//! \brief The QsciScintillaBase class implements the Scintilla editor widget +//! and its low-level API. +//! +//! Scintilla (http://www.scintilla.org) is a powerful C++ editor class that +//! supports many features including syntax styling, error indicators, code +//! completion and call tips. It is particularly useful as a programmer's +//! editor. +//! +//! QsciScintillaBase is a port to Qt of Scintilla. It implements the standard +//! Scintilla API which consists of a number of messages each taking up to +//! two arguments. +//! +//! See QsciScintilla for the implementation of a higher level API that is more +//! consistent with the rest of the Qt toolkit. +class QSCINTILLA_EXPORT QsciScintillaBase : public QAbstractScrollArea +{ + Q_OBJECT + +public: + //! The low-level Scintilla API is implemented as a set of messages each of + //! which takes up to two parameters (\a wParam and \a lParam) and + //! optionally return a value. This enum defines all the possible messages. + enum + { + //! + SCI_START = 2000, + + //! + SCI_OPTIONAL_START = 3000, + + //! + SCI_LEXER_START = 4000, + + //! This message appends some text to the end of the document. + //! \a wParam is the length of the text. + //! \a lParam is the text to be appended. + SCI_ADDTEXT = 2001, + + //! + SCI_ADDSTYLEDTEXT = 2002, + + //! + SCI_INSERTTEXT = 2003, + + //! + SCI_CLEARALL = 2004, + + //! + SCI_CLEARDOCUMENTSTYLE = 2005, + + //! + SCI_GETLENGTH = 2006, + + //! + SCI_GETCHARAT = 2007, + + //! This message returns the current position. + //! + //! \sa SCI_SETCURRENTPOS + SCI_GETCURRENTPOS = 2008, + + //! This message returns the anchor. + //! + //! \sa SCI_SETANCHOR + SCI_GETANCHOR = 2009, + + //! + SCI_GETSTYLEAT = 2010, + + //! + SCI_REDO = 2011, + + //! + SCI_SETUNDOCOLLECTION = 2012, + + //! + SCI_SELECTALL = 2013, + + //! This message marks the current state of the text as the the save + //! point. This is usually done when the text is saved or loaded. + //! + //! \sa SCN_SAVEPOINTREACHED(), SCN_SAVEPOINTLEFT() + SCI_SETSAVEPOINT = 2014, + + //! + SCI_GETSTYLEDTEXT = 2015, + + //! + SCI_CANREDO = 2016, + + //! This message returns the line that contains a particular instance + //! of a marker. + //! \a wParam is the handle of the marker. + //! + //! \sa SCI_MARKERADD + SCI_MARKERLINEFROMHANDLE = 2017, + + //! This message removes a particular instance of a marker. + //! \a wParam is the handle of the marker. + //! + //! \sa SCI_MARKERADD + SCI_MARKERDELETEHANDLE = 2018, + + //! + SCI_GETUNDOCOLLECTION = 2019, + + //! + SCI_GETVIEWWS = 2020, + + //! + SCI_SETVIEWWS = 2021, + + //! + SCI_POSITIONFROMPOINT = 2022, + + //! + SCI_POSITIONFROMPOINTCLOSE = 2023, + + //! + SCI_GOTOLINE = 2024, + + //! This message clears the current selection and sets the current + //! position. + //! \a wParam is the new current position. + //! + //! \sa SCI_SETCURRENTPOS + SCI_GOTOPOS = 2025, + + //! This message sets the anchor. + //! \a wParam is the new anchor. + //! + //! \sa SCI_GETANCHOR + SCI_SETANCHOR = 2026, + + //! + SCI_GETCURLINE = 2027, + + //! This message returns the character position of the start of the + //! text that needs to be syntax styled. + //! + //! \sa SCN_STYLENEEDED() + SCI_GETENDSTYLED = 2028, + + //! + SCI_CONVERTEOLS = 2029, + + //! + SCI_GETEOLMODE = 2030, + + //! + SCI_SETEOLMODE = 2031, + + //! + SCI_STARTSTYLING = 2032, + + //! + SCI_SETSTYLING = 2033, + + //! + SCI_GETBUFFEREDDRAW = 2034, + + //! + SCI_SETBUFFEREDDRAW = 2035, + + //! + SCI_SETTABWIDTH = 2036, + + //! + SCI_GETTABWIDTH = 2121, + + //! + SCI_SETCODEPAGE = 2037, + + //! This message sets the symbol used to draw one of 32 markers. Some + //! markers have pre-defined uses, see the SC_MARKNUM_* values. + //! \a wParam is the number of the marker. + //! \a lParam is the marker symbol and is one of the SC_MARK_* values. + //! + //! \sa SCI_MARKERADD, SCI_MARKERDEFINEPIXMAP, + //! SCI_MARKERDEFINERGBAIMAGE + SCI_MARKERDEFINE = 2040, + + //! This message sets the foreground colour used to draw a marker. A + //! colour is represented as a 24 bit value. The 8 least significant + //! bits correspond to red, the middle 8 bits correspond to green, and + //! the 8 most significant bits correspond to blue. The default value + //! is 0x000000. + //! \a wParam is the number of the marker. + //! \a lParam is the colour. + //! + //! \sa SCI_MARKERSETBACK + SCI_MARKERSETFORE = 2041, + + //! This message sets the background colour used to draw a marker. A + //! colour is represented as a 24 bit value. The 8 least significant + //! bits correspond to red, the middle 8 bits correspond to green, and + //! the 8 most significant bits correspond to blue. The default value + //! is 0xffffff. + //! \a wParam is the number of the marker. + //! \a lParam is the colour. + //! + //! \sa SCI_MARKERSETFORE + SCI_MARKERSETBACK = 2042, + + //! This message adds a marker to a line. A handle for the marker is + //! returned which can be used to track the marker's position. + //! \a wParam is the line number. + //! \a lParam is the number of the marker. + //! + //! \sa SCI_MARKERDELETE, SCI_MARKERDELETEALL, + //! SCI_MARKERDELETEHANDLE + SCI_MARKERADD = 2043, + + //! This message deletes a marker from a line. + //! \a wParam is the line number. + //! \a lParam is the number of the marker. + //! + //! \sa SCI_MARKERADD, SCI_MARKERDELETEALL + SCI_MARKERDELETE = 2044, + + //! This message deletes all occurences of a marker. + //! \a wParam is the number of the marker. If \a wParam is -1 then all + //! markers are removed. + //! + //! \sa SCI_MARKERADD, SCI_MARKERDELETE + SCI_MARKERDELETEALL = 2045, + + //! This message returns the 32 bit mask of markers at a line. + //! \a wParam is the line number. + SCI_MARKERGET = 2046, + + //! This message looks for the next line to contain at least one marker + //! contained in a 32 bit mask of markers and returns the line number. + //! \a wParam is the line number to start the search from. + //! \a lParam is the mask of markers to search for. + //! + //! \sa SCI_MARKERPREVIOUS + SCI_MARKERNEXT = 2047, + + //! This message looks for the previous line to contain at least one + //! marker contained in a 32 bit mask of markers and returns the line + //! number. + //! \a wParam is the line number to start the search from. + //! \a lParam is the mask of markers to search for. + //! + //! \sa SCI_MARKERNEXT + SCI_MARKERPREVIOUS = 2048, + + //! This message sets the symbol used to draw one of the 32 markers to + //! a pixmap. Pixmaps use the SC_MARK_PIXMAP marker symbol. + //! \a wParam is the number of the marker. + //! \a lParam is a pointer to a QPixmap instance. Note that in other + //! ports of Scintilla this is a pointer to either raw or textual XPM + //! image data. + //! + //! \sa SCI_MARKERDEFINE, SCI_MARKERDEFINERGBAIMAGE + SCI_MARKERDEFINEPIXMAP = 2049, + + //! This message sets what can be displayed in a margin. + //! \a wParam is the number of the margin. + //! \a lParam is the logical or of the SC_MARGIN_* values. + //! + //! \sa SCI_GETMARGINTYPEN + SCI_SETMARGINTYPEN = 2240, + + //! This message returns what can be displayed in a margin. + //! \a wParam is the number of the margin. + //! + //! \sa SCI_SETMARGINTYPEN + SCI_GETMARGINTYPEN = 2241, + + //! This message sets the width of a margin in pixels. + //! \a wParam is the number of the margin. + //! \a lParam is the new margin width. + //! + //! \sa SCI_GETMARGINWIDTHN + SCI_SETMARGINWIDTHN = 2242, + + //! This message returns the width of a margin in pixels. + //! \a wParam is the number of the margin. + //! + //! \sa SCI_SETMARGINWIDTHN + SCI_GETMARGINWIDTHN = 2243, + + //! This message sets the mask of a margin. The mask is a 32 value + //! with one bit for each possible marker. If a bit is set then the + //! corresponding marker is displayed. By default, all markers are + //! displayed. + //! \a wParam is the number of the margin. + //! \a lParam is the new margin mask. + //! + //! \sa SCI_GETMARGINMASKN, SCI_MARKERDEFINE + SCI_SETMARGINMASKN = 2244, + + //! This message returns the mask of a margin. + //! \a wParam is the number of the margin. + //! + //! \sa SCI_SETMARGINMASKN + SCI_GETMARGINMASKN = 2245, + + //! This message sets the sensitivity of a margin to mouse clicks. + //! \a wParam is the number of the margin. + //! \a lParam is non-zero to make the margin sensitive to mouse clicks. + //! When the mouse is clicked the SCN_MARGINCLICK() signal is emitted. + //! + //! \sa SCI_GETMARGINSENSITIVEN, SCN_MARGINCLICK() + SCI_SETMARGINSENSITIVEN = 2246, + + //! This message returns the sensitivity of a margin to mouse clicks. + //! \a wParam is the number of the margin. + //! + //! \sa SCI_SETMARGINSENSITIVEN, SCN_MARGINCLICK() + SCI_GETMARGINSENSITIVEN = 2247, + + //! This message sets the cursor shape displayed over a margin. + //! \a wParam is the number of the margin. + //! \a lParam is the cursor shape, normally either SC_CURSORARROW or + //! SC_CURSORREVERSEARROW. Note that, currently, QScintilla implements + //! both of these as Qt::ArrowCursor. + //! + //! \sa SCI_GETMARGINCURSORN + SCI_SETMARGINCURSORN = 2248, + + //! This message returns the cursor shape displayed over a margin. + //! \a wParam is the number of the margin. + //! + //! \sa SCI_SETMARGINCURSORN + SCI_GETMARGINCURSORN = 2249, + + //! + SCI_STYLECLEARALL = 2050, + + //! + SCI_STYLESETFORE = 2051, + + //! + SCI_STYLESETBACK = 2052, + + //! + SCI_STYLESETBOLD = 2053, + + //! + SCI_STYLESETITALIC = 2054, + + //! + SCI_STYLESETSIZE = 2055, + + //! + SCI_STYLESETFONT = 2056, + + //! + SCI_STYLESETEOLFILLED = 2057, + + //! + SCI_STYLERESETDEFAULT = 2058, + + //! + SCI_STYLESETUNDERLINE = 2059, + + //! + SCI_STYLESETCASE = 2060, + + //! + SCI_STYLESETSIZEFRACTIONAL = 2061, + + //! + SCI_STYLEGETSIZEFRACTIONAL = 2062, + + //! + SCI_STYLESETWEIGHT = 2063, + + //! + SCI_STYLEGETWEIGHT = 2064, + + //! + SCI_STYLESETCHARACTERSET = 2066, + + //! + SCI_SETSELFORE = 2067, + + //! + SCI_SETSELBACK = 2068, + + //! + SCI_SETCARETFORE = 2069, + + //! + SCI_ASSIGNCMDKEY = 2070, + + //! + SCI_CLEARCMDKEY = 2071, + + //! + SCI_CLEARALLCMDKEYS = 2072, + + //! + SCI_SETSTYLINGEX = 2073, + + //! + SCI_STYLESETVISIBLE = 2074, + + //! + SCI_GETCARETPERIOD = 2075, + + //! + SCI_SETCARETPERIOD = 2076, + + //! + SCI_SETWORDCHARS = 2077, + + //! + SCI_BEGINUNDOACTION = 2078, + + //! + SCI_ENDUNDOACTION = 2079, + + //! + SCI_INDICSETSTYLE = 2080, + + //! + SCI_INDICGETSTYLE = 2081, + + //! + SCI_INDICSETFORE = 2082, + + //! + SCI_INDICGETFORE = 2083, + + //! + SCI_SETWHITESPACEFORE = 2084, + + //! + SCI_SETWHITESPACEBACK = 2085, + + //! + SCI_SETWHITESPACESIZE = 2086, + + //! + SCI_GETWHITESPACESIZE = 2087, + + //! + SCI_SETSTYLEBITS = 2090, + + //! + SCI_GETSTYLEBITS = 2091, + + //! + SCI_SETLINESTATE = 2092, + + //! + SCI_GETLINESTATE = 2093, + + //! + SCI_GETMAXLINESTATE = 2094, + + //! + SCI_GETCARETLINEVISIBLE = 2095, + + //! + SCI_SETCARETLINEVISIBLE = 2096, + + //! + SCI_GETCARETLINEBACK = 2097, + + //! + SCI_SETCARETLINEBACK = 2098, + + //! + SCI_STYLESETCHANGEABLE = 2099, + + //! + SCI_AUTOCSHOW = 2100, + + //! + SCI_AUTOCCANCEL = 2101, + + //! + SCI_AUTOCACTIVE = 2102, + + //! + SCI_AUTOCPOSSTART = 2103, + + //! + SCI_AUTOCCOMPLETE = 2104, + + //! + SCI_AUTOCSTOPS = 2105, + + //! + SCI_AUTOCSETSEPARATOR = 2106, + + //! + SCI_AUTOCGETSEPARATOR = 2107, + + //! + SCI_AUTOCSELECT = 2108, + + //! + SCI_AUTOCSETCANCELATSTART = 2110, + + //! + SCI_AUTOCGETCANCELATSTART = 2111, + + //! + SCI_AUTOCSETFILLUPS = 2112, + + //! + SCI_AUTOCSETCHOOSESINGLE = 2113, + + //! + SCI_AUTOCGETCHOOSESINGLE = 2114, + + //! + SCI_AUTOCSETIGNORECASE = 2115, + + //! + SCI_AUTOCGETIGNORECASE = 2116, + + //! + SCI_USERLISTSHOW = 2117, + + //! + SCI_AUTOCSETAUTOHIDE = 2118, + + //! + SCI_AUTOCGETAUTOHIDE = 2119, + + //! + SCI_AUTOCSETDROPRESTOFWORD = 2270, + + //! + SCI_AUTOCGETDROPRESTOFWORD = 2271, + + //! + SCI_SETINDENT = 2122, + + //! + SCI_GETINDENT = 2123, + + //! + SCI_SETUSETABS = 2124, + + //! + SCI_GETUSETABS = 2125, + + //! + SCI_SETLINEINDENTATION = 2126, + + //! + SCI_GETLINEINDENTATION = 2127, + + //! + SCI_GETLINEINDENTPOSITION = 2128, + + //! + SCI_GETCOLUMN = 2129, + + //! + SCI_SETHSCROLLBAR = 2130, + + //! + SCI_GETHSCROLLBAR = 2131, + + //! + SCI_SETINDENTATIONGUIDES = 2132, + + //! + SCI_GETINDENTATIONGUIDES = 2133, + + //! + SCI_SETHIGHLIGHTGUIDE = 2134, + + //! + SCI_GETHIGHLIGHTGUIDE = 2135, + + //! + SCI_GETLINEENDPOSITION = 2136, + + //! + SCI_GETCODEPAGE = 2137, + + //! + SCI_GETCARETFORE = 2138, + + //! This message returns a non-zero value if the document is read-only. + //! + //! \sa SCI_SETREADONLY + SCI_GETREADONLY = 2140, + + //! This message sets the current position. + //! \a wParam is the new current position. + //! + //! \sa SCI_GETCURRENTPOS + SCI_SETCURRENTPOS = 2141, + + //! + SCI_SETSELECTIONSTART = 2142, + + //! + SCI_GETSELECTIONSTART = 2143, + + //! + SCI_SETSELECTIONEND = 2144, + + //! + SCI_GETSELECTIONEND = 2145, + + //! + SCI_SETPRINTMAGNIFICATION = 2146, + + //! + SCI_GETPRINTMAGNIFICATION = 2147, + + //! + SCI_SETPRINTCOLOURMODE = 2148, + + //! + SCI_GETPRINTCOLOURMODE = 2149, + + //! + SCI_FINDTEXT = 2150, + + //! + SCI_FORMATRANGE = 2151, + + //! + SCI_GETFIRSTVISIBLELINE = 2152, + + //! + SCI_GETLINE = 2153, + + //! + SCI_GETLINECOUNT = 2154, + + //! + SCI_SETMARGINLEFT = 2155, + + //! + SCI_GETMARGINLEFT = 2156, + + //! + SCI_SETMARGINRIGHT = 2157, + + //! + SCI_GETMARGINRIGHT = 2158, + + //! This message returns a non-zero value if the document has been + //! modified. + SCI_GETMODIFY = 2159, + + //! + SCI_SETSEL = 2160, + + //! + SCI_GETSELTEXT = 2161, + + //! + SCI_GETTEXTRANGE = 2162, + + //! + SCI_HIDESELECTION = 2163, + + //! + SCI_POINTXFROMPOSITION = 2164, + + //! + SCI_POINTYFROMPOSITION = 2165, + + //! + SCI_LINEFROMPOSITION = 2166, + + //! + SCI_POSITIONFROMLINE = 2167, + + //! + SCI_LINESCROLL = 2168, + + //! + SCI_SCROLLCARET = 2169, + + //! + SCI_REPLACESEL = 2170, + + //! This message sets the read-only state of the document. + //! \a wParam is the new read-only state of the document. + //! + //! \sa SCI_GETREADONLY + SCI_SETREADONLY = 2171, + + //! + SCI_NULL = 2172, + + //! + SCI_CANPASTE = 2173, + + //! + SCI_CANUNDO = 2174, + + //! This message empties the undo buffer. + SCI_EMPTYUNDOBUFFER = 2175, + + //! + SCI_UNDO = 2176, + + //! + SCI_CUT = 2177, + + //! + SCI_COPY = 2178, + + //! + SCI_PASTE = 2179, + + //! + SCI_CLEAR = 2180, + + //! This message sets the text of the document. + //! \a wParam is unused. + //! \a lParam is the new text of the document. + //! + //! \sa SCI_GETTEXT + SCI_SETTEXT = 2181, + + //! This message gets the text of the document. + //! \a wParam is size of the buffer that the text is copied to. + //! \a lParam is the address of the buffer that the text is copied to. + //! + //! \sa SCI_SETTEXT + SCI_GETTEXT = 2182, + + //! This message returns the length of the document. + SCI_GETTEXTLENGTH = 2183, + + //! + SCI_GETDIRECTFUNCTION = 2184, + + //! + SCI_GETDIRECTPOINTER = 2185, + + //! + SCI_SETOVERTYPE = 2186, + + //! + SCI_GETOVERTYPE = 2187, + + //! + SCI_SETCARETWIDTH = 2188, + + //! + SCI_GETCARETWIDTH = 2189, + + //! + SCI_SETTARGETSTART = 2190, + + //! + SCI_GETTARGETSTART = 2191, + + //! + SCI_SETTARGETEND = 2192, + + //! + SCI_GETTARGETEND = 2193, + + //! + SCI_REPLACETARGET = 2194, + + //! + SCI_REPLACETARGETRE = 2195, + + //! + SCI_SEARCHINTARGET = 2197, + + //! + SCI_SETSEARCHFLAGS = 2198, + + //! + SCI_GETSEARCHFLAGS = 2199, + + //! + SCI_CALLTIPSHOW = 2200, + + //! + SCI_CALLTIPCANCEL = 2201, + + //! + SCI_CALLTIPACTIVE = 2202, + + //! + SCI_CALLTIPPOSSTART = 2203, + + //! + SCI_CALLTIPSETHLT = 2204, + + //! + SCI_CALLTIPSETBACK = 2205, + + //! + SCI_CALLTIPSETFORE = 2206, + + //! + SCI_CALLTIPSETFOREHLT = 2207, + + //! + SCI_AUTOCSETMAXWIDTH = 2208, + + //! + SCI_AUTOCGETMAXWIDTH = 2209, + + //! This message is not implemented. + SCI_AUTOCSETMAXHEIGHT = 2210, + + //! + SCI_AUTOCGETMAXHEIGHT = 2211, + + //! + SCI_CALLTIPUSESTYLE = 2212, + + //! + SCI_CALLTIPSETPOSITION = 2213, + + //! + SCI_CALLTIPSETPOSSTART = 2214, + + //! + SCI_VISIBLEFROMDOCLINE = 2220, + + //! + SCI_DOCLINEFROMVISIBLE = 2221, + + //! + SCI_SETFOLDLEVEL = 2222, + + //! + SCI_GETFOLDLEVEL = 2223, + + //! + SCI_GETLASTCHILD = 2224, + + //! + SCI_GETFOLDPARENT = 2225, + + //! + SCI_SHOWLINES = 2226, + + //! + SCI_HIDELINES = 2227, + + //! + SCI_GETLINEVISIBLE = 2228, + + //! + SCI_SETFOLDEXPANDED = 2229, + + //! + SCI_GETFOLDEXPANDED = 2230, + + //! + SCI_TOGGLEFOLD = 2231, + + //! + SCI_ENSUREVISIBLE = 2232, + + //! + SCI_SETFOLDFLAGS = 2233, + + //! + SCI_ENSUREVISIBLEENFORCEPOLICY = 2234, + + //! + SCI_WRAPCOUNT = 2235, + + //! + SCI_GETALLLINESVISIBLE = 2236, + + //! + SCI_FOLDLINE = 2237, + + //! + SCI_FOLDCHILDREN = 2238, + + //! + SCI_EXPANDCHILDREN = 2239, + + //! + SCI_SETMARGINBACKN = 2250, + + //! + SCI_GETMARGINBACKN = 2251, + + //! + SCI_SETMARGINS = 2252, + + //! + SCI_GETMARGINS = 2253, + + //! + SCI_SETTABINDENTS = 2260, + + //! + SCI_GETTABINDENTS = 2261, + + //! + SCI_SETBACKSPACEUNINDENTS = 2262, + + //! + SCI_GETBACKSPACEUNINDENTS = 2263, + + //! + SCI_SETMOUSEDWELLTIME = 2264, + + //! + SCI_GETMOUSEDWELLTIME = 2265, + + //! + SCI_WORDSTARTPOSITION = 2266, + + //! + SCI_WORDENDPOSITION = 2267, + + //! + SCI_SETWRAPMODE = 2268, + + //! + SCI_GETWRAPMODE = 2269, + + //! + SCI_SETLAYOUTCACHE = 2272, + + //! + SCI_GETLAYOUTCACHE = 2273, + + //! + SCI_SETSCROLLWIDTH = 2274, + + //! + SCI_GETSCROLLWIDTH = 2275, + + //! This message returns the width of some text when rendered in a + //! particular style. + //! \a wParam is the style number and is one of the STYLE_* values or + //! one of the styles defined by a lexer. + //! \a lParam is a pointer to the text. + SCI_TEXTWIDTH = 2276, + + //! + SCI_SETENDATLASTLINE = 2277, + + //! + SCI_GETENDATLASTLINE = 2278, + + //! + SCI_TEXTHEIGHT = 2279, + + //! + SCI_SETVSCROLLBAR = 2280, + + //! + SCI_GETVSCROLLBAR = 2281, + + //! + SCI_APPENDTEXT = 2282, + + //! + SCI_GETTWOPHASEDRAW = 2283, + + //! + SCI_SETTWOPHASEDRAW = 2284, + + //! + SCI_AUTOCGETTYPESEPARATOR = 2285, + + //! + SCI_AUTOCSETTYPESEPARATOR = 2286, + + //! + SCI_TARGETFROMSELECTION = 2287, + + //! + SCI_LINESJOIN = 2288, + + //! + SCI_LINESSPLIT = 2289, + + //! + SCI_SETFOLDMARGINCOLOUR = 2290, + + //! + SCI_SETFOLDMARGINHICOLOUR = 2291, + + //! + SCI_MARKERSETBACKSELECTED = 2292, + + //! + SCI_MARKERENABLEHIGHLIGHT = 2293, + + //! + SCI_LINEDOWN = 2300, + + //! + SCI_LINEDOWNEXTEND = 2301, + + //! + SCI_LINEUP = 2302, + + //! + SCI_LINEUPEXTEND = 2303, + + //! + SCI_CHARLEFT = 2304, + + //! + SCI_CHARLEFTEXTEND = 2305, + + //! + SCI_CHARRIGHT = 2306, + + //! + SCI_CHARRIGHTEXTEND = 2307, + + //! + SCI_WORDLEFT = 2308, + + //! + SCI_WORDLEFTEXTEND = 2309, + + //! + SCI_WORDRIGHT = 2310, + + //! + SCI_WORDRIGHTEXTEND = 2311, + + //! + SCI_HOME = 2312, + + //! + SCI_HOMEEXTEND = 2313, + + //! + SCI_LINEEND = 2314, + + //! + SCI_LINEENDEXTEND = 2315, + + //! + SCI_DOCUMENTSTART = 2316, + + //! + SCI_DOCUMENTSTARTEXTEND = 2317, + + //! + SCI_DOCUMENTEND = 2318, + + //! + SCI_DOCUMENTENDEXTEND = 2319, + + //! + SCI_PAGEUP = 2320, + + //! + SCI_PAGEUPEXTEND = 2321, + + //! + SCI_PAGEDOWN = 2322, + + //! + SCI_PAGEDOWNEXTEND = 2323, + + //! + SCI_EDITTOGGLEOVERTYPE = 2324, + + //! + SCI_CANCEL = 2325, + + //! + SCI_DELETEBACK = 2326, + + //! + SCI_TAB = 2327, + + //! + SCI_BACKTAB = 2328, + + //! + SCI_NEWLINE = 2329, + + //! + SCI_FORMFEED = 2330, + + //! + SCI_VCHOME = 2331, + + //! + SCI_VCHOMEEXTEND = 2332, + + //! + SCI_ZOOMIN = 2333, + + //! + SCI_ZOOMOUT = 2334, + + //! + SCI_DELWORDLEFT = 2335, + + //! + SCI_DELWORDRIGHT = 2336, + + //! + SCI_LINECUT = 2337, + + //! + SCI_LINEDELETE = 2338, + + //! + SCI_LINETRANSPOSE = 2339, + + //! + SCI_LOWERCASE = 2340, + + //! + SCI_UPPERCASE = 2341, + + //! + SCI_LINESCROLLDOWN = 2342, + + //! + SCI_LINESCROLLUP = 2343, + + //! + SCI_DELETEBACKNOTLINE = 2344, + + //! + SCI_HOMEDISPLAY = 2345, + + //! + SCI_HOMEDISPLAYEXTEND = 2346, + + //! + SCI_LINEENDDISPLAY = 2347, + + //! + SCI_LINEENDDISPLAYEXTEND = 2348, + + //! + SCI_MOVECARETINSIDEVIEW = 2401, + + //! + SCI_LINELENGTH = 2350, + + //! + SCI_BRACEHIGHLIGHT = 2351, + + //! + SCI_BRACEBADLIGHT = 2352, + + //! + SCI_BRACEMATCH = 2353, + + //! + SCI_LINEREVERSE = 2354, + + //! + SCI_GETVIEWEOL = 2355, + + //! + SCI_SETVIEWEOL = 2356, + + //! + SCI_GETDOCPOINTER = 2357, + + //! + SCI_SETDOCPOINTER = 2358, + + //! + SCI_SETMODEVENTMASK = 2359, + + //! + SCI_GETEDGECOLUMN = 2360, + + //! + SCI_SETEDGECOLUMN = 2361, + + //! + SCI_GETEDGEMODE = 2362, + + //! + SCI_SETEDGEMODE = 2363, + + //! + SCI_GETEDGECOLOUR = 2364, + + //! + SCI_SETEDGECOLOUR = 2365, + + //! + SCI_SEARCHANCHOR = 2366, + + //! + SCI_SEARCHNEXT = 2367, + + //! + SCI_SEARCHPREV = 2368, + + //! + SCI_LINESONSCREEN = 2370, + + //! + SCI_USEPOPUP = 2371, + + //! + SCI_SELECTIONISRECTANGLE = 2372, + + //! + SCI_SETZOOM = 2373, + + //! + SCI_GETZOOM = 2374, + + //! + SCI_CREATEDOCUMENT = 2375, + + //! + SCI_ADDREFDOCUMENT = 2376, + + //! + SCI_RELEASEDOCUMENT = 2377, + + //! + SCI_GETMODEVENTMASK = 2378, + + //! + SCI_SETFOCUS = 2380, + + //! + SCI_GETFOCUS = 2381, + + //! + SCI_SETSTATUS = 2382, + + //! + SCI_GETSTATUS = 2383, + + //! + SCI_SETMOUSEDOWNCAPTURES = 2384, + + //! + SCI_GETMOUSEDOWNCAPTURES = 2385, + + //! + SCI_SETCURSOR = 2386, + + //! + SCI_GETCURSOR = 2387, + + //! + SCI_SETCONTROLCHARSYMBOL = 2388, + + //! + SCI_GETCONTROLCHARSYMBOL = 2389, + + //! + SCI_WORDPARTLEFT = 2390, + + //! + SCI_WORDPARTLEFTEXTEND = 2391, + + //! + SCI_WORDPARTRIGHT = 2392, + + //! + SCI_WORDPARTRIGHTEXTEND = 2393, + + //! + SCI_SETVISIBLEPOLICY = 2394, + + //! + SCI_DELLINELEFT = 2395, + + //! + SCI_DELLINERIGHT = 2396, + + //! + SCI_SETXOFFSET = 2397, + + //! + SCI_GETXOFFSET = 2398, + + //! + SCI_CHOOSECARETX = 2399, + + //! + SCI_GRABFOCUS = 2400, + + //! + SCI_SETXCARETPOLICY = 2402, + + //! + SCI_SETYCARETPOLICY = 2403, + + //! + SCI_LINEDUPLICATE = 2404, + + //! This message takes a copy of an image and registers it so that it + //! can be refered to by a unique integer identifier. + //! \a wParam is the image's identifier. + //! \a lParam is a pointer to a QPixmap instance. Note that in other + //! ports of Scintilla this is a pointer to either raw or textual XPM + //! image data. + //! + //! \sa SCI_CLEARREGISTEREDIMAGES, SCI_REGISTERRGBAIMAGE + SCI_REGISTERIMAGE = 2405, + + //! + SCI_SETPRINTWRAPMODE = 2406, + + //! + SCI_GETPRINTWRAPMODE = 2407, + + //! This message de-registers all currently registered images. + //! + //! \sa SCI_REGISTERIMAGE, SCI_REGISTERRGBAIMAGE + SCI_CLEARREGISTEREDIMAGES = 2408, + + //! + SCI_STYLESETHOTSPOT = 2409, + + //! + SCI_SETHOTSPOTACTIVEFORE = 2410, + + //! + SCI_SETHOTSPOTACTIVEBACK = 2411, + + //! + SCI_SETHOTSPOTACTIVEUNDERLINE = 2412, + + //! + SCI_PARADOWN = 2413, + + //! + SCI_PARADOWNEXTEND = 2414, + + //! + SCI_PARAUP = 2415, + + //! + SCI_PARAUPEXTEND = 2416, + + //! + SCI_POSITIONBEFORE = 2417, + + //! + SCI_POSITIONAFTER = 2418, + + //! + SCI_COPYRANGE = 2419, + + //! + SCI_COPYTEXT = 2420, + + //! + SCI_SETHOTSPOTSINGLELINE = 2421, + + //! + SCI_SETSELECTIONMODE = 2422, + + //! + SCI_GETSELECTIONMODE = 2423, + + //! + SCI_GETLINESELSTARTPOSITION = 2424, + + //! + SCI_GETLINESELENDPOSITION = 2425, + + //! + SCI_LINEDOWNRECTEXTEND = 2426, + + //! + SCI_LINEUPRECTEXTEND = 2427, + + //! + SCI_CHARLEFTRECTEXTEND = 2428, + + //! + SCI_CHARRIGHTRECTEXTEND = 2429, + + //! + SCI_HOMERECTEXTEND = 2430, + + //! + SCI_VCHOMERECTEXTEND = 2431, + + //! + SCI_LINEENDRECTEXTEND = 2432, + + //! + SCI_PAGEUPRECTEXTEND = 2433, + + //! + SCI_PAGEDOWNRECTEXTEND = 2434, + + //! + SCI_STUTTEREDPAGEUP = 2435, + + //! + SCI_STUTTEREDPAGEUPEXTEND = 2436, + + //! + SCI_STUTTEREDPAGEDOWN = 2437, + + //! + SCI_STUTTEREDPAGEDOWNEXTEND = 2438, + + //! + SCI_WORDLEFTEND = 2439, + + //! + SCI_WORDLEFTENDEXTEND = 2440, + + //! + SCI_WORDRIGHTEND = 2441, + + //! + SCI_WORDRIGHTENDEXTEND = 2442, + + //! + SCI_SETWHITESPACECHARS = 2443, + + //! + SCI_SETCHARSDEFAULT = 2444, + + //! + SCI_AUTOCGETCURRENT = 2445, + + //! + SCI_ALLOCATE = 2446, + + //! + SCI_HOMEWRAP = 2349, + + //! + SCI_HOMEWRAPEXTEND = 2450, + + //! + SCI_LINEENDWRAP = 2451, + + //! + SCI_LINEENDWRAPEXTEND = 2452, + + //! + SCI_VCHOMEWRAP = 2453, + + //! + SCI_VCHOMEWRAPEXTEND = 2454, + + //! + SCI_LINECOPY = 2455, + + //! + SCI_FINDCOLUMN = 2456, + + //! + SCI_GETCARETSTICKY = 2457, + + //! + SCI_SETCARETSTICKY = 2458, + + //! + SCI_TOGGLECARETSTICKY = 2459, + + //! + SCI_SETWRAPVISUALFLAGS = 2460, + + //! + SCI_GETWRAPVISUALFLAGS = 2461, + + //! + SCI_SETWRAPVISUALFLAGSLOCATION = 2462, + + //! + SCI_GETWRAPVISUALFLAGSLOCATION = 2463, + + //! + SCI_SETWRAPSTARTINDENT = 2464, + + //! + SCI_GETWRAPSTARTINDENT = 2465, + + //! + SCI_MARKERADDSET = 2466, + + //! + SCI_SETPASTECONVERTENDINGS = 2467, + + //! + SCI_GETPASTECONVERTENDINGS = 2468, + + //! + SCI_SELECTIONDUPLICATE = 2469, + + //! + SCI_SETCARETLINEBACKALPHA = 2470, + + //! + SCI_GETCARETLINEBACKALPHA = 2471, + + //! + SCI_SETWRAPINDENTMODE = 2472, + + //! + SCI_GETWRAPINDENTMODE = 2473, + + //! + SCI_MARKERSETALPHA = 2476, + + //! + SCI_GETSELALPHA = 2477, + + //! + SCI_SETSELALPHA = 2478, + + //! + SCI_GETSELEOLFILLED = 2479, + + //! + SCI_SETSELEOLFILLED = 2480, + + //! + SCI_STYLEGETFORE = 2481, + + //! + SCI_STYLEGETBACK = 2482, + + //! + SCI_STYLEGETBOLD = 2483, + + //! + SCI_STYLEGETITALIC = 2484, + + //! + SCI_STYLEGETSIZE = 2485, + + //! + SCI_STYLEGETFONT = 2486, + + //! + SCI_STYLEGETEOLFILLED = 2487, + + //! + SCI_STYLEGETUNDERLINE = 2488, + + //! + SCI_STYLEGETCASE = 2489, + + //! + SCI_STYLEGETCHARACTERSET = 2490, + + //! + SCI_STYLEGETVISIBLE = 2491, + + //! + SCI_STYLEGETCHANGEABLE = 2492, + + //! + SCI_STYLEGETHOTSPOT = 2493, + + //! + SCI_GETHOTSPOTACTIVEFORE = 2494, + + //! + SCI_GETHOTSPOTACTIVEBACK = 2495, + + //! + SCI_GETHOTSPOTACTIVEUNDERLINE = 2496, + + //! + SCI_GETHOTSPOTSINGLELINE = 2497, + + //! + SCI_BRACEHIGHLIGHTINDICATOR = 2498, + + //! + SCI_BRACEBADLIGHTINDICATOR = 2499, + + //! + SCI_SETINDICATORCURRENT = 2500, + + //! + SCI_GETINDICATORCURRENT = 2501, + + //! + SCI_SETINDICATORVALUE = 2502, + + //! + SCI_GETINDICATORVALUE = 2503, + + //! + SCI_INDICATORFILLRANGE = 2504, + + //! + SCI_INDICATORCLEARRANGE = 2505, + + //! + SCI_INDICATORALLONFOR = 2506, + + //! + SCI_INDICATORVALUEAT = 2507, + + //! + SCI_INDICATORSTART = 2508, + + //! + SCI_INDICATOREND = 2509, + + //! + SCI_INDICSETUNDER = 2510, + + //! + SCI_INDICGETUNDER = 2511, + + //! + SCI_SETCARETSTYLE = 2512, + + //! + SCI_GETCARETSTYLE = 2513, + + //! + SCI_SETPOSITIONCACHE = 2514, + + //! + SCI_GETPOSITIONCACHE = 2515, + + //! + SCI_SETSCROLLWIDTHTRACKING = 2516, + + //! + SCI_GETSCROLLWIDTHTRACKING = 2517, + + //! + SCI_DELWORDRIGHTEND = 2518, + + //! This message copies the selection. If the selection is empty then + //! copy the line with the caret. + SCI_COPYALLOWLINE = 2519, + + //! This message returns a pointer to the document text. Any + //! subsequent message will invalidate the pointer. + SCI_GETCHARACTERPOINTER = 2520, + + //! + SCI_INDICSETALPHA = 2523, + + //! + SCI_INDICGETALPHA = 2524, + + //! + SCI_SETEXTRAASCENT = 2525, + + //! + SCI_GETEXTRAASCENT = 2526, + + //! + SCI_SETEXTRADESCENT = 2527, + + //! + SCI_GETEXTRADESCENT = 2528, + + //! + SCI_MARKERSYMBOLDEFINED = 2529, + + //! + SCI_MARGINSETTEXT = 2530, + + //! + SCI_MARGINGETTEXT = 2531, + + //! + SCI_MARGINSETSTYLE = 2532, + + //! + SCI_MARGINGETSTYLE = 2533, + + //! + SCI_MARGINSETSTYLES = 2534, + + //! + SCI_MARGINGETSTYLES = 2535, + + //! + SCI_MARGINTEXTCLEARALL = 2536, + + //! + SCI_MARGINSETSTYLEOFFSET = 2537, + + //! + SCI_MARGINGETSTYLEOFFSET = 2538, + + //! + SCI_SETMARGINOPTIONS = 2539, + + //! + SCI_ANNOTATIONSETTEXT = 2540, + + //! + SCI_ANNOTATIONGETTEXT = 2541, + + //! + SCI_ANNOTATIONSETSTYLE = 2542, + + //! + SCI_ANNOTATIONGETSTYLE = 2543, + + //! + SCI_ANNOTATIONSETSTYLES = 2544, + + //! + SCI_ANNOTATIONGETSTYLES = 2545, + + //! + SCI_ANNOTATIONGETLINES = 2546, + + //! + SCI_ANNOTATIONCLEARALL = 2547, + + //! + SCI_ANNOTATIONSETVISIBLE = 2548, + + //! + SCI_ANNOTATIONGETVISIBLE = 2549, + + //! + SCI_ANNOTATIONSETSTYLEOFFSET = 2550, + + //! + SCI_ANNOTATIONGETSTYLEOFFSET = 2551, + + //! + SCI_RELEASEALLEXTENDEDSTYLES = 2552, + + //! + SCI_ALLOCATEEXTENDEDSTYLES = 2553, + + //! + SCI_SETEMPTYSELECTION = 2556, + + //! + SCI_GETMARGINOPTIONS = 2557, + + //! + SCI_INDICSETOUTLINEALPHA = 2558, + + //! + SCI_INDICGETOUTLINEALPHA = 2559, + + //! + SCI_ADDUNDOACTION = 2560, + + //! + SCI_CHARPOSITIONFROMPOINT = 2561, + + //! + SCI_CHARPOSITIONFROMPOINTCLOSE = 2562, + + //! + SCI_SETMULTIPLESELECTION = 2563, + + //! + SCI_GETMULTIPLESELECTION = 2564, + + //! + SCI_SETADDITIONALSELECTIONTYPING = 2565, + + //! + SCI_GETADDITIONALSELECTIONTYPING = 2566, + + //! + SCI_SETADDITIONALCARETSBLINK = 2567, + + //! + SCI_GETADDITIONALCARETSBLINK = 2568, + + //! + SCI_SCROLLRANGE = 2569, + + //! + SCI_GETSELECTIONS = 2570, + + //! + SCI_CLEARSELECTIONS = 2571, + + //! + SCI_SETSELECTION = 2572, + + //! + SCI_ADDSELECTION = 2573, + + //! + SCI_SETMAINSELECTION = 2574, + + //! + SCI_GETMAINSELECTION = 2575, + + //! + SCI_SETSELECTIONNCARET = 2576, + + //! + SCI_GETSELECTIONNCARET = 2577, + + //! + SCI_SETSELECTIONNANCHOR = 2578, + + //! + SCI_GETSELECTIONNANCHOR = 2579, + + //! + SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580, + + //! + SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581, + + //! + SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582, + + //! + SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583, + + //! + SCI_SETSELECTIONNSTART = 2584, + + //! + SCI_GETSELECTIONNSTART = 2585, + + //! + SCI_SETSELECTIONNEND = 2586, + + //! + SCI_GETSELECTIONNEND = 2587, + + //! + SCI_SETRECTANGULARSELECTIONCARET = 2588, + + //! + SCI_GETRECTANGULARSELECTIONCARET = 2589, + + //! + SCI_SETRECTANGULARSELECTIONANCHOR = 2590, + + //! + SCI_GETRECTANGULARSELECTIONANCHOR = 2591, + + //! + SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592, + + //! + SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593, + + //! + SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594, + + //! + SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595, + + //! + SCI_SETVIRTUALSPACEOPTIONS = 2596, + + //! + SCI_GETVIRTUALSPACEOPTIONS = 2597, + + //! + SCI_SETRECTANGULARSELECTIONMODIFIER = 2598, + + //! + SCI_GETRECTANGULARSELECTIONMODIFIER = 2599, + + //! + SCI_SETADDITIONALSELFORE = 2600, + + //! + SCI_SETADDITIONALSELBACK = 2601, + + //! + SCI_SETADDITIONALSELALPHA = 2602, + + //! + SCI_GETADDITIONALSELALPHA = 2603, + + //! + SCI_SETADDITIONALCARETFORE = 2604, + + //! + SCI_GETADDITIONALCARETFORE = 2605, + + //! + SCI_ROTATESELECTION = 2606, + + //! + SCI_SWAPMAINANCHORCARET = 2607, + + //! + SCI_SETADDITIONALCARETSVISIBLE = 2608, + + //! + SCI_GETADDITIONALCARETSVISIBLE = 2609, + + //! + SCI_AUTOCGETCURRENTTEXT = 2610, + + //! + SCI_SETFONTQUALITY = 2611, + + //! + SCI_GETFONTQUALITY = 2612, + + //! + SCI_SETFIRSTVISIBLELINE = 2613, + + //! + SCI_SETMULTIPASTE = 2614, + + //! + SCI_GETMULTIPASTE = 2615, + + //! + SCI_GETTAG = 2616, + + //! + SCI_CHANGELEXERSTATE = 2617, + + //! + SCI_CONTRACTEDFOLDNEXT = 2618, + + //! + SCI_VERTICALCENTRECARET = 2619, + + //! + SCI_MOVESELECTEDLINESUP = 2620, + + //! + SCI_MOVESELECTEDLINESDOWN = 2621, + + //! + SCI_SETIDENTIFIER = 2622, + + //! + SCI_GETIDENTIFIER = 2623, + + //! This message sets the width of an RGBA image specified by a future + //! call to SCI_MARKERDEFINERGBAIMAGE or SCI_REGISTERRGBAIMAGE. + //! + //! \sa SCI_RGBAIMAGESETHEIGHT, SCI_MARKERDEFINERGBAIMAGE, + //! SCI_REGISTERRGBAIMAGE. + SCI_RGBAIMAGESETWIDTH = 2624, + + //! This message sets the height of an RGBA image specified by a future + //! call to SCI_MARKERDEFINERGBAIMAGE or SCI_REGISTERRGBAIMAGE. + //! + //! \sa SCI_RGBAIMAGESETWIDTH, SCI_MARKERDEFINERGBAIMAGE, + //! SCI_REGISTERRGBAIMAGE. + SCI_RGBAIMAGESETHEIGHT = 2625, + + //! This message sets the symbol used to draw one of the 32 markers to + //! an RGBA image. RGBA images use the SC_MARK_RGBAIMAGE marker + //! symbol. + //! \a wParam is the number of the marker. + //! \a lParam is a pointer to a QImage instance. Note that in other + //! ports of Scintilla this is a pointer to raw RGBA image data. + //! + //! \sa SCI_MARKERDEFINE, SCI_MARKERDEFINEPIXMAP + SCI_MARKERDEFINERGBAIMAGE = 2626, + + //! This message takes a copy of an image and registers it so that it + //! can be refered to by a unique integer identifier. + //! \a wParam is the image's identifier. + //! \a lParam is a pointer to a QImage instance. Note that in other + //! ports of Scintilla this is a pointer to raw RGBA image data. + //! + //! \sa SCI_CLEARREGISTEREDIMAGES, SCI_REGISTERIMAGE + SCI_REGISTERRGBAIMAGE = 2627, + + //! + SCI_SCROLLTOSTART = 2628, + + //! + SCI_SCROLLTOEND = 2629, + + //! + SCI_SETTECHNOLOGY = 2630, + + //! + SCI_GETTECHNOLOGY = 2631, + + //! + SCI_CREATELOADER = 2632, + + //! + SCI_COUNTCHARACTERS = 2633, + + //! + SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634, + + //! + SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635, + + //! + SCI_AUTOCSETMULTI = 2636, + + //! + SCI_AUTOCGETMULTI = 2637, + + //! + SCI_FINDINDICATORSHOW = 2640, + + //! + SCI_FINDINDICATORFLASH = 2641, + + //! + SCI_FINDINDICATORHIDE = 2642, + + //! + SCI_GETRANGEPOINTER = 2643, + + //! + SCI_GETGAPPOSITION = 2644, + + //! + SCI_DELETERANGE = 2645, + + //! + SCI_GETWORDCHARS = 2646, + + //! + SCI_GETWHITESPACECHARS = 2647, + + //! + SCI_SETPUNCTUATIONCHARS = 2648, + + //! + SCI_GETPUNCTUATIONCHARS = 2649, + + //! + SCI_GETSELECTIONEMPTY = 2650, + + //! + SCI_RGBAIMAGESETSCALE = 2651, + + //! + SCI_VCHOMEDISPLAY = 2652, + + //! + SCI_VCHOMEDISPLAYEXTEND = 2653, + + //! + SCI_GETCARETLINEVISIBLEALWAYS = 2654, + + //! + SCI_SETCARETLINEVISIBLEALWAYS = 2655, + + //! + SCI_SETLINEENDTYPESALLOWED = 2656, + + //! + SCI_GETLINEENDTYPESALLOWED = 2657, + + //! + SCI_GETLINEENDTYPESACTIVE = 2658, + + //! + SCI_AUTOCSETORDER = 2660, + + //! + SCI_AUTOCGETORDER = 2661, + + //! + SCI_FOLDALL = 2662, + + //! + SCI_SETAUTOMATICFOLD = 2663, + + //! + SCI_GETAUTOMATICFOLD = 2664, + + //! + SCI_SETREPRESENTATION = 2665, + + //! + SCI_GETREPRESENTATION = 2666, + + //! + SCI_CLEARREPRESENTATION = 2667, + + //! + SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668, + + //! + SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669, + + //! + SCI_POSITIONRELATIVE = 2670, + + //! + SCI_DROPSELECTIONN = 2671, + + //! + SCI_CHANGEINSERTION = 2672, + + //! + SCI_GETPHASESDRAW = 2673, + + //! + SCI_SETPHASESDRAW = 2674, + + //! + SCI_CLEARTABSTOPS = 2675, + + //! + SCI_ADDTABSTOP = 2676, + + //! + SCI_GETNEXTTABSTOP = 2677, + + //! + SCI_GETIMEINTERACTION = 2678, + + //! + SCI_SETIMEINTERACTION = 2679, + + //! + SCI_INDICSETHOVERSTYLE = 2680, + + //! + SCI_INDICGETHOVERSTYLE = 2681, + + //! + SCI_INDICSETHOVERFORE = 2682, + + //! + SCI_INDICGETHOVERFORE = 2683, + + //! + SCI_INDICSETFLAGS = 2684, + + //! + SCI_INDICGETFLAGS = 2685, + + //! + SCI_SETTARGETRANGE = 2686, + + //! + SCI_GETTARGETTEXT = 2687, + + //! + SCI_MULTIPLESELECTADDNEXT = 2688, + + //! + SCI_MULTIPLESELECTADDEACH = 2689, + + //! + SCI_TARGETWHOLEDOCUMENT = 2690, + + //! + SCI_ISRANGEWORD = 2691, + + //! + SCI_SETIDLESTYLING = 2692, + + //! + SCI_GETIDLESTYLING = 2693, + + //! + SCI_MULTIEDGEADDLINE = 2694, + + //! + SCI_MULTIEDGECLEARALL = 2695, + + //! + SCI_SETMOUSEWHEELCAPTURES = 2696, + + //! + SCI_GETMOUSEWHEELCAPTURES = 2697, + + //! + SCI_GETTABDRAWMODE = 2698, + + //! + SCI_SETTABDRAWMODE = 2699, + + //! + SCI_TOGGLEFOLDSHOWTEXT = 2700, + + //! + SCI_FOLDDISPLAYTEXTSETSTYLE = 2701, + + //! + SCI_SETACCESSIBILITY = 2702, + + //! + SCI_GETACCESSIBILITY = 2703, + + //! + SCI_GETCARETLINEFRAME = 2704, + + //! + SCI_SETCARETLINEFRAME = 2705, + + //! + SCI_STARTRECORD = 3001, + + //! + SCI_STOPRECORD = 3002, + + //! This message sets the number of the lexer to use for syntax + //! styling. + //! \a wParam is the number of the lexer and is one of the SCLEX_* + //! values. + SCI_SETLEXER = 4001, + + //! This message returns the number of the lexer being used for syntax + //! styling. + SCI_GETLEXER = 4002, + + //! + SCI_COLOURISE = 4003, + + //! + SCI_SETPROPERTY = 4004, + + //! + SCI_SETKEYWORDS = 4005, + + //! This message sets the name of the lexer to use for syntax styling. + //! \a wParam is unused. + //! \a lParam is the name of the lexer. + SCI_SETLEXERLANGUAGE = 4006, + + //! + SCI_LOADLEXERLIBRARY = 4007, + + //! + SCI_GETPROPERTY = 4008, + + //! + SCI_GETPROPERTYEXPANDED = 4009, + + //! + SCI_GETPROPERTYINT = 4010, + + //! + SCI_GETSTYLEBITSNEEDED = 4011, + + //! + SCI_GETLEXERLANGUAGE = 4012, + + //! + SCI_PRIVATELEXERCALL = 4013, + + //! + SCI_PROPERTYNAMES = 4014, + + //! + SCI_PROPERTYTYPE = 4015, + + //! + SCI_DESCRIBEPROPERTY = 4016, + + //! + SCI_DESCRIBEKEYWORDSETS = 4017, + + //! + SCI_GETLINEENDTYPESSUPPORTED = 4018, + + //! + SCI_ALLOCATESUBSTYLES = 4020, + + //! + SCI_GETSUBSTYLESSTART = 4021, + + //! + SCI_GETSUBSTYLESLENGTH = 4022, + + //! + SCI_GETSTYLEFROMSUBSTYLE = 4027, + + //! + SCI_GETPRIMARYSTYLEFROMSTYLE = 4028, + + //! + SCI_FREESUBSTYLES = 4023, + + //! + SCI_SETIDENTIFIERS = 4024, + + //! + SCI_DISTANCETOSECONDARYSTYLES = 4025, + + //! + SCI_GETSUBSTYLEBASES = 4026, + + //! + SCI_GETLINECHARACTERINDEX = 2710, + + //! + SCI_ALLOCATELINECHARACTERINDEX = 2711, + + //! + SCI_RELEASELINECHARACTERINDEX = 2712, + + //! + SCI_LINEFROMINDEXPOSITION = 2713, + + //! + SCI_INDEXPOSITIONFROMLINE = 2714, + + //! + SCI_COUNTCODEUNITS = 2715, + + //! + SCI_POSITIONRELATIVECODEUNITS = 2716, + + //! + SCI_GETNAMEDSTYLES = 4029, + + //! + SCI_NAMEOFSTYLE = 4030, + + //! + SCI_TAGSOFSTYLE = 4031, + + //! + SCI_DESCRIPTIONOFSTYLE = 4032, + + //! + SCI_GETMOVEEXTENDSSELECTION = 2706, + + //! + SCI_SETCOMMANDEVENTS = 2717, + + //! + SCI_GETCOMMANDEVENTS = 2718, + + //! + SCI_GETDOCUMENTOPTIONS = 2379, + }; + + enum + { + SC_AC_FILLUP = 1, + SC_AC_DOUBLECLICK = 2, + SC_AC_TAB = 3, + SC_AC_NEWLINE = 4, + SC_AC_COMMAND = 5, + }; + + enum + { + SC_ALPHA_TRANSPARENT = 0, + SC_ALPHA_OPAQUE = 255, + SC_ALPHA_NOALPHA = 256 + }; + + enum + { + SC_CARETSTICKY_OFF = 0, + SC_CARETSTICKY_ON = 1, + SC_CARETSTICKY_WHITESPACE = 2 + }; + + enum + { + SC_DOCUMENTOPTION_DEFAULT = 0x0000, + SC_DOCUMENTOPTION_STYLES_NONE = 0x0001, + SC_DOCUMENTOPTION_TEXT_LARGE = 0x0100, + }; + + enum + { + SC_EFF_QUALITY_MASK = 0x0f, + SC_EFF_QUALITY_DEFAULT = 0, + SC_EFF_QUALITY_NON_ANTIALIASED = 1, + SC_EFF_QUALITY_ANTIALIASED = 2, + SC_EFF_QUALITY_LCD_OPTIMIZED = 3 + }; + + enum + { + SC_IDLESTYLING_NONE = 0, + SC_IDLESTYLING_TOVISIBLE = 1, + SC_IDLESTYLING_AFTERVISIBLE = 2, + SC_IDLESTYLING_ALL = 3, + }; + + enum + { + SC_IME_WINDOWED = 0, + SC_IME_INLINE = 1, + }; + + enum + { + SC_LINECHARACTERINDEX_NONE = 0, + SC_LINECHARACTERINDEX_UTF32 = 1, + SC_LINECHARACTERINDEX_UTF16 = 2, + }; + + enum + { + SC_MARGINOPTION_NONE = 0x00, + SC_MARGINOPTION_SUBLINESELECT = 0x01 + }; + + enum + { + SC_MULTIAUTOC_ONCE = 0, + SC_MULTIAUTOC_EACH = 1 + }; + + enum + { + SC_MULTIPASTE_ONCE = 0, + SC_MULTIPASTE_EACH = 1 + }; + + enum + { + SC_POPUP_NEVER = 0, + SC_POPUP_ALL = 1, + SC_POPUP_TEXT = 2, + }; + + //! This enum defines the different selection modes. + //! + //! \sa SCI_GETSELECTIONMODE, SCI_SETSELECTIONMODE + enum + { + SC_SEL_STREAM = 0, + SC_SEL_RECTANGLE = 1, + SC_SEL_LINES = 2, + SC_SEL_THIN = 3 + }; + + enum + { + SC_STATUS_OK = 0, + SC_STATUS_FAILURE = 1, + SC_STATUS_BADALLOC = 2, + SC_STATUS_WARN_START = 1000, + SC_STATUS_WARNREGEX = 1001, + }; + + enum + { + SC_TYPE_BOOLEAN = 0, + SC_TYPE_INTEGER = 1, + SC_TYPE_STRING = 2 + }; + + enum + { + SC_UPDATE_CONTENT = 0x01, + SC_UPDATE_SELECTION = 0x02, + SC_UPDATE_V_SCROLL = 0x04, + SC_UPDATE_H_SCROLL = 0x08 + }; + + enum + { + SC_WRAPVISUALFLAG_NONE = 0x0000, + SC_WRAPVISUALFLAG_END = 0x0001, + SC_WRAPVISUALFLAG_START = 0x0002, + SC_WRAPVISUALFLAG_MARGIN = 0x0004 + }; + + enum + { + SC_WRAPVISUALFLAGLOC_DEFAULT = 0x0000, + SC_WRAPVISUALFLAGLOC_END_BY_TEXT = 0x0001, + SC_WRAPVISUALFLAGLOC_START_BY_TEXT = 0x0002 + }; + + enum + { + SCTD_LONGARROW = 0, + SCTD_STRIKEOUT = 1, + }; + + enum + { + SCVS_NONE = 0, + SCVS_RECTANGULARSELECTION = 1, + SCVS_USERACCESSIBLE = 2, + SCVS_NOWRAPLINESTART = 4, + }; + + enum + { + SCWS_INVISIBLE = 0, + SCWS_VISIBLEALWAYS = 1, + SCWS_VISIBLEAFTERINDENT = 2, + SCWS_VISIBLEONLYININDENT = 3, + }; + + enum + { + SC_EOL_CRLF = 0, + SC_EOL_CR = 1, + SC_EOL_LF = 2 + }; + + enum + { + SC_CP_DBCS = 1, + SC_CP_UTF8 = 65001 + }; + + //! This enum defines the different marker symbols. + //! + //! \sa SCI_MARKERDEFINE + enum + { + //! A circle. + SC_MARK_CIRCLE = 0, + + //! A rectangle. + SC_MARK_ROUNDRECT = 1, + + //! A triangle pointing to the right. + SC_MARK_ARROW = 2, + + //! A smaller rectangle. + SC_MARK_SMALLRECT = 3, + + //! An arrow pointing to the right. + SC_MARK_SHORTARROW = 4, + + //! An invisible marker that allows code to track the movement + //! of lines. + SC_MARK_EMPTY = 5, + + //! A triangle pointing down. + SC_MARK_ARROWDOWN = 6, + + //! A drawn minus sign. + SC_MARK_MINUS = 7, + + //! A drawn plus sign. + SC_MARK_PLUS = 8, + + //! A vertical line drawn in the background colour. + SC_MARK_VLINE = 9, + + //! A bottom left corner drawn in the background colour. + SC_MARK_LCORNER = 10, + + //! A vertical line with a centre right horizontal line drawn + //! in the background colour. + SC_MARK_TCORNER = 11, + + //! A drawn plus sign in a box. + SC_MARK_BOXPLUS = 12, + + //! A drawn plus sign in a connected box. + SC_MARK_BOXPLUSCONNECTED = 13, + + //! A drawn minus sign in a box. + SC_MARK_BOXMINUS = 14, + + //! A drawn minus sign in a connected box. + SC_MARK_BOXMINUSCONNECTED = 15, + + //! A rounded bottom left corner drawn in the background + //! colour. + SC_MARK_LCORNERCURVE = 16, + + //! A vertical line with a centre right curved line drawn in + //! the background colour. + SC_MARK_TCORNERCURVE = 17, + + //! A drawn plus sign in a circle. + SC_MARK_CIRCLEPLUS = 18, + + //! A drawn plus sign in a connected box. + SC_MARK_CIRCLEPLUSCONNECTED = 19, + + //! A drawn minus sign in a circle. + SC_MARK_CIRCLEMINUS = 20, + + //! A drawn minus sign in a connected circle. + SC_MARK_CIRCLEMINUSCONNECTED = 21, + + //! No symbol is drawn but the line is drawn with the same background + //! color as the marker's. + SC_MARK_BACKGROUND = 22, + + //! Three drawn dots. + SC_MARK_DOTDOTDOT = 23, + + //! Three drawn arrows pointing right. + SC_MARK_ARROWS = 24, + + //! An XPM format pixmap. + SC_MARK_PIXMAP = 25, + + //! A full rectangle (ie. the margin background) using the marker's + //! background color. + SC_MARK_FULLRECT = 26, + + //! A left rectangle (ie. the left part of the margin background) using + //! the marker's background color. + SC_MARK_LEFTRECT = 27, + + //! The value is available for plugins to use. + SC_MARK_AVAILABLE = 28, + + //! The line is underlined using the marker's background color. + SC_MARK_UNDERLINE = 29, + + //! A RGBA format image. + SC_MARK_RGBAIMAGE = 30, + + //! A bookmark. + SC_MARK_BOOKMARK = 31, + + //! Characters can be used as symbols by adding this to the ASCII value + //! of the character. + SC_MARK_CHARACTER = 10000 + }; + + enum + { + SC_MARKNUM_FOLDEREND = 25, + SC_MARKNUM_FOLDEROPENMID = 26, + SC_MARKNUM_FOLDERMIDTAIL = 27, + SC_MARKNUM_FOLDERTAIL = 28, + SC_MARKNUM_FOLDERSUB = 29, + SC_MARKNUM_FOLDER = 30, + SC_MARKNUM_FOLDEROPEN = 31, + SC_MASK_FOLDERS = 0xfe000000 + }; + + //! This enum defines what can be displayed in a margin. + //! + //! \sa SCI_GETMARGINTYPEN, SCI_SETMARGINTYPEN + enum + { + //! The margin can display symbols. Note that all margins can display + //! symbols. + SC_MARGIN_SYMBOL = 0, + + //! The margin will display line numbers. + SC_MARGIN_NUMBER = 1, + + //! The margin's background color will be set to the default background + //! color. + SC_MARGIN_BACK = 2, + + //! The margin's background color will be set to the default foreground + //! color. + SC_MARGIN_FORE = 3, + + //! The margin will display text. + SC_MARGIN_TEXT = 4, + + //! The margin will display right justified text. + SC_MARGIN_RTEXT = 5, + + //! The margin's background color will be set to the color set by + //! SCI_SETMARGINBACKN. + SC_MARGIN_COLOUR = 6, + }; + + enum + { + STYLE_DEFAULT = 32, + STYLE_LINENUMBER = 33, + STYLE_BRACELIGHT = 34, + STYLE_BRACEBAD = 35, + STYLE_CONTROLCHAR = 36, + STYLE_INDENTGUIDE = 37, + STYLE_CALLTIP = 38, + STYLE_FOLDDISPLAYTEXT = 39, + STYLE_LASTPREDEFINED = 39, + STYLE_MAX = 255 + }; + + enum + { + SC_CHARSET_ANSI = 0, + SC_CHARSET_DEFAULT = 1, + SC_CHARSET_BALTIC = 186, + SC_CHARSET_CHINESEBIG5 = 136, + SC_CHARSET_EASTEUROPE = 238, + SC_CHARSET_GB2312 = 134, + SC_CHARSET_GREEK = 161, + SC_CHARSET_HANGUL = 129, + SC_CHARSET_MAC = 77, + SC_CHARSET_OEM = 255, + SC_CHARSET_RUSSIAN = 204, + SC_CHARSET_OEM866 = 866, + SC_CHARSET_CYRILLIC = 1251, + SC_CHARSET_SHIFTJIS = 128, + SC_CHARSET_SYMBOL = 2, + SC_CHARSET_TURKISH = 162, + SC_CHARSET_JOHAB = 130, + SC_CHARSET_HEBREW = 177, + SC_CHARSET_ARABIC = 178, + SC_CHARSET_VIETNAMESE = 163, + SC_CHARSET_THAI = 222, + SC_CHARSET_8859_15 = 1000 + }; + + enum + { + SC_CASE_MIXED = 0, + SC_CASE_UPPER = 1, + SC_CASE_LOWER = 2, + SC_CASE_CAMEL = 3, + }; + + //! This enum defines the different indentation guide views. + //! + //! \sa SCI_GETINDENTATIONGUIDES, SCI_SETINDENTATIONGUIDES + enum + { + //! No indentation guides are shown. + SC_IV_NONE = 0, + + //! Indentation guides are shown inside real indentation white space. + SC_IV_REAL = 1, + + //! Indentation guides are shown beyond the actual indentation up to + //! the level of the next non-empty line. If the previous non-empty + //! line was a fold header then indentation guides are shown for one + //! more level of indent than that line. This setting is good for + //! Python. + SC_IV_LOOKFORWARD = 2, + + //! Indentation guides are shown beyond the actual indentation up to + //! the level of the next non-empty line or previous non-empty line + //! whichever is the greater. This setting is good for most languages. + SC_IV_LOOKBOTH = 3 + }; + + enum + { + INDIC_PLAIN = 0, + INDIC_SQUIGGLE = 1, + INDIC_TT = 2, + INDIC_DIAGONAL = 3, + INDIC_STRIKE = 4, + INDIC_HIDDEN = 5, + INDIC_BOX = 6, + INDIC_ROUNDBOX = 7, + INDIC_STRAIGHTBOX = 8, + INDIC_DASH = 9, + INDIC_DOTS = 10, + INDIC_SQUIGGLELOW = 11, + INDIC_DOTBOX = 12, + INDIC_SQUIGGLEPIXMAP = 13, + INDIC_COMPOSITIONTHICK = 14, + INDIC_COMPOSITIONTHIN = 15, + INDIC_FULLBOX = 16, + INDIC_TEXTFORE = 17, + INDIC_POINT = 18, + INDIC_POINTCHARACTER = 19, + INDIC_GRADIENT = 20, + INDIC_GRADIENTCENTRE = 21, + + INDIC_IME = 32, + INDIC_IME_MAX = 35, + + INDIC_CONTAINER = 8, + INDIC_MAX = 35, + INDIC0_MASK = 0x20, + INDIC1_MASK = 0x40, + INDIC2_MASK = 0x80, + INDICS_MASK = 0xe0, + + SC_INDICVALUEBIT = 0x01000000, + SC_INDICVALUEMASK = 0x00ffffff, + SC_INDICFLAG_VALUEBEFORE = 1, + }; + + enum + { + SC_PRINT_NORMAL = 0, + SC_PRINT_INVERTLIGHT = 1, + SC_PRINT_BLACKONWHITE = 2, + SC_PRINT_COLOURONWHITE = 3, + SC_PRINT_COLOURONWHITEDEFAULTBG = 4, + SC_PRINT_SCREENCOLOURS = 5, + }; + + enum + { + SCFIND_WHOLEWORD = 2, + SCFIND_MATCHCASE = 4, + SCFIND_WORDSTART = 0x00100000, + SCFIND_REGEXP = 0x00200000, + SCFIND_POSIX = 0x00400000, + SCFIND_CXX11REGEX = 0x00800000, + }; + + enum + { + SC_FOLDDISPLAYTEXT_HIDDEN = 0, + SC_FOLDDISPLAYTEXT_STANDARD = 1, + SC_FOLDDISPLAYTEXT_BOXED = 2, + }; + + enum + { + SC_FOLDLEVELBASE = 0x00400, + SC_FOLDLEVELWHITEFLAG = 0x01000, + SC_FOLDLEVELHEADERFLAG = 0x02000, + SC_FOLDLEVELNUMBERMASK = 0x00fff + }; + + enum + { + SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002, + SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004, + SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008, + SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010, + SC_FOLDFLAG_LEVELNUMBERS = 0x0040, + SC_FOLDFLAG_LINESTATE = 0x0080, + }; + + enum + { + SC_LINE_END_TYPE_DEFAULT = 0, + SC_LINE_END_TYPE_UNICODE = 1, + }; + + enum + { + SC_TIME_FOREVER = 10000000 + }; + + enum + { + SC_WRAP_NONE = 0, + SC_WRAP_WORD = 1, + SC_WRAP_CHAR = 2, + SC_WRAP_WHITESPACE = 3, + }; + + enum + { + SC_WRAPINDENT_FIXED = 0, + SC_WRAPINDENT_SAME = 1, + SC_WRAPINDENT_INDENT = 2, + SC_WRAPINDENT_DEEPINDENT = 3, + }; + + enum + { + SC_CACHE_NONE = 0, + SC_CACHE_CARET = 1, + SC_CACHE_PAGE = 2, + SC_CACHE_DOCUMENT = 3 + }; + + enum + { + SC_PHASES_ONE = 0, + SC_PHASES_TWO = 1, + SC_PHASES_MULTIPLE = 2, + }; + + enum + { + ANNOTATION_HIDDEN = 0, + ANNOTATION_STANDARD = 1, + ANNOTATION_BOXED = 2, + ANNOTATION_INDENTED = 3, + }; + + enum + { + EDGE_NONE = 0, + EDGE_LINE = 1, + EDGE_BACKGROUND = 2, + EDGE_MULTILINE = 3, + }; + + enum + { + SC_CURSORNORMAL = -1, + SC_CURSORARROW = 2, + SC_CURSORWAIT = 4, + SC_CURSORREVERSEARROW = 7 + }; + + enum + { + UNDO_MAY_COALESCE = 1 + }; + + enum + { + VISIBLE_SLOP = 0x01, + VISIBLE_STRICT = 0x04 + }; + + enum + { + CARET_SLOP = 0x01, + CARET_STRICT = 0x04, + CARET_JUMPS = 0x10, + CARET_EVEN = 0x08 + }; + + enum + { + CARETSTYLE_INVISIBLE = 0, + CARETSTYLE_LINE = 1, + CARETSTYLE_BLOCK = 2 + }; + + enum + { + SC_MOD_INSERTTEXT = 0x1, + SC_MOD_DELETETEXT = 0x2, + SC_MOD_CHANGESTYLE = 0x4, + SC_MOD_CHANGEFOLD = 0x8, + SC_PERFORMED_USER = 0x10, + SC_PERFORMED_UNDO = 0x20, + SC_PERFORMED_REDO = 0x40, + SC_MULTISTEPUNDOREDO = 0x80, + SC_LASTSTEPINUNDOREDO = 0x100, + SC_MOD_CHANGEMARKER = 0x200, + SC_MOD_BEFOREINSERT = 0x400, + SC_MOD_BEFOREDELETE = 0x800, + SC_MULTILINEUNDOREDO = 0x1000, + SC_STARTACTION = 0x2000, + SC_MOD_CHANGEINDICATOR = 0x4000, + SC_MOD_CHANGELINESTATE = 0x8000, + SC_MOD_CHANGEMARGIN = 0x10000, + SC_MOD_CHANGEANNOTATION = 0x20000, + SC_MOD_CONTAINER = 0x40000, + SC_MOD_LEXERSTATE = 0x80000, + SC_MOD_INSERTCHECK = 0x100000, + SC_MOD_CHANGETABSTOPS = 0x200000, + SC_MODEVENTMASKALL = 0x3fffff + }; + + enum + { + SCK_DOWN = 300, + SCK_UP = 301, + SCK_LEFT = 302, + SCK_RIGHT = 303, + SCK_HOME = 304, + SCK_END = 305, + SCK_PRIOR = 306, + SCK_NEXT = 307, + SCK_DELETE = 308, + SCK_INSERT = 309, + SCK_ESCAPE = 7, + SCK_BACK = 8, + SCK_TAB = 9, + SCK_RETURN = 13, + SCK_ADD = 310, + SCK_SUBTRACT = 311, + SCK_DIVIDE = 312, + SCK_WIN = 313, + SCK_RWIN = 314, + SCK_MENU = 315 + }; + + //! This enum defines the different modifier keys. + enum + { + //! No modifier key. + SCMOD_NORM = 0, + + //! Shift key. + SCMOD_SHIFT = 1, + + //! Control key (the Command key on OS/X, the Ctrl key on other + //! platforms). + SCMOD_CTRL = 2, + + //! Alt key. + SCMOD_ALT = 4, + + //! This is the same as SCMOD_META on all platforms. + SCMOD_SUPER = 8, + + //! Meta key (the Ctrl key on OS/X, the Windows key on other + //! platforms). + SCMOD_META = 16 + }; + + //! This enum defines the different language lexers. + //! + //! \sa SCI_GETLEXER, SCI_SETLEXER + enum + { + //! No lexer is selected and the SCN_STYLENEEDED signal is emitted so + //! that the application can style the text as needed. This is the + //! default. + SCLEX_CONTAINER = 0, + + //! Select the null lexer that does no syntax styling. + SCLEX_NULL = 1, + + //! Select the Python lexer. + SCLEX_PYTHON = 2, + + //! Select the C++ lexer. + SCLEX_CPP = 3, + + //! Select the HTML lexer. + SCLEX_HTML = 4, + + //! Select the XML lexer. + SCLEX_XML = 5, + + //! Select the Perl lexer. + SCLEX_PERL = 6, + + //! Select the SQL lexer. + SCLEX_SQL = 7, + + //! Select the Visual Basic lexer. + SCLEX_VB = 8, + + //! Select the lexer for properties style files. + SCLEX_PROPERTIES = 9, + + //! Select the lexer for error list style files. + SCLEX_ERRORLIST = 10, + + //! Select the Makefile lexer. + SCLEX_MAKEFILE = 11, + + //! Select the Windows batch file lexer. + SCLEX_BATCH = 12, + + //! Select the LaTex lexer. + SCLEX_LATEX = 14, + + //! Select the Lua lexer. + SCLEX_LUA = 15, + + //! Select the lexer for diff output. + SCLEX_DIFF = 16, + + //! Select the lexer for Apache configuration files. + SCLEX_CONF = 17, + + //! Select the Pascal lexer. + SCLEX_PASCAL = 18, + + //! Select the Avenue lexer. + SCLEX_AVE = 19, + + //! Select the Ada lexer. + SCLEX_ADA = 20, + + //! Select the Lisp lexer. + SCLEX_LISP = 21, + + //! Select the Ruby lexer. + SCLEX_RUBY = 22, + + //! Select the Eiffel lexer. + SCLEX_EIFFEL = 23, + + //! Select the Eiffel lexer folding at keywords. + SCLEX_EIFFELKW = 24, + + //! Select the Tcl lexer. + SCLEX_TCL = 25, + + //! Select the lexer for nnCron files. + SCLEX_NNCRONTAB = 26, + + //! Select the Bullant lexer. + SCLEX_BULLANT = 27, + + //! Select the VBScript lexer. + SCLEX_VBSCRIPT = 28, + + //! Select the ASP lexer. + SCLEX_ASP = SCLEX_HTML, + + //! Select the PHP lexer. + SCLEX_PHP = SCLEX_HTML, + + //! Select the Baan lexer. + SCLEX_BAAN = 31, + + //! Select the Matlab lexer. + SCLEX_MATLAB = 32, + + //! Select the Scriptol lexer. + SCLEX_SCRIPTOL = 33, + + //! Select the assembler lexer (';' comment character). + SCLEX_ASM = 34, + + //! Select the C++ lexer with case insensitive keywords. + SCLEX_CPPNOCASE = 35, + + //! Select the FORTRAN lexer. + SCLEX_FORTRAN = 36, + + //! Select the FORTRAN77 lexer. + SCLEX_F77 = 37, + + //! Select the CSS lexer. + SCLEX_CSS = 38, + + //! Select the POV lexer. + SCLEX_POV = 39, + + //! Select the Basser Lout typesetting language lexer. + SCLEX_LOUT = 40, + + //! Select the EScript lexer. + SCLEX_ESCRIPT = 41, + + //! Select the PostScript lexer. + SCLEX_PS = 42, + + //! Select the NSIS lexer. + SCLEX_NSIS = 43, + + //! Select the MMIX assembly language lexer. + SCLEX_MMIXAL = 44, + + //! Select the Clarion lexer. + SCLEX_CLW = 45, + + //! Select the Clarion lexer with case insensitive keywords. + SCLEX_CLWNOCASE = 46, + + //! Select the MPT text log file lexer. + SCLEX_LOT = 47, + + //! Select the YAML lexer. + SCLEX_YAML = 48, + + //! Select the TeX lexer. + SCLEX_TEX = 49, + + //! Select the Metapost lexer. + SCLEX_METAPOST = 50, + + //! Select the PowerBASIC lexer. + SCLEX_POWERBASIC = 51, + + //! Select the Forth lexer. + SCLEX_FORTH = 52, + + //! Select the Erlang lexer. + SCLEX_ERLANG = 53, + + //! Select the Octave lexer. + SCLEX_OCTAVE = 54, + + //! Select the MS SQL lexer. + SCLEX_MSSQL = 55, + + //! Select the Verilog lexer. + SCLEX_VERILOG = 56, + + //! Select the KIX-Scripts lexer. + SCLEX_KIX = 57, + + //! Select the Gui4Cli lexer. + SCLEX_GUI4CLI = 58, + + //! Select the Specman E lexer. + SCLEX_SPECMAN = 59, + + //! Select the AutoIt3 lexer. + SCLEX_AU3 = 60, + + //! Select the APDL lexer. + SCLEX_APDL = 61, + + //! Select the Bash lexer. + SCLEX_BASH = 62, + + //! Select the ASN.1 lexer. + SCLEX_ASN1 = 63, + + //! Select the VHDL lexer. + SCLEX_VHDL = 64, + + //! Select the Caml lexer. + SCLEX_CAML = 65, + + //! Select the BlitzBasic lexer. + SCLEX_BLITZBASIC = 66, + + //! Select the PureBasic lexer. + SCLEX_PUREBASIC = 67, + + //! Select the Haskell lexer. + SCLEX_HASKELL = 68, + + //! Select the PHPScript lexer. + SCLEX_PHPSCRIPT = 69, + + //! Select the TADS3 lexer. + SCLEX_TADS3 = 70, + + //! Select the REBOL lexer. + SCLEX_REBOL = 71, + + //! Select the Smalltalk lexer. + SCLEX_SMALLTALK = 72, + + //! Select the FlagShip lexer. + SCLEX_FLAGSHIP = 73, + + //! Select the Csound lexer. + SCLEX_CSOUND = 74, + + //! Select the FreeBasic lexer. + SCLEX_FREEBASIC = 75, + + //! Select the InnoSetup lexer. + SCLEX_INNOSETUP = 76, + + //! Select the Opal lexer. + SCLEX_OPAL = 77, + + //! Select the Spice lexer. + SCLEX_SPICE = 78, + + //! Select the D lexer. + SCLEX_D = 79, + + //! Select the CMake lexer. + SCLEX_CMAKE = 80, + + //! Select the GAP lexer. + SCLEX_GAP = 81, + + //! Select the PLM lexer. + SCLEX_PLM = 82, + + //! Select the Progress lexer. + SCLEX_PROGRESS = 83, + + //! Select the Abaqus lexer. + SCLEX_ABAQUS = 84, + + //! Select the Asymptote lexer. + SCLEX_ASYMPTOTE = 85, + + //! Select the R lexer. + SCLEX_R = 86, + + //! Select the MagikSF lexer. + SCLEX_MAGIK = 87, + + //! Select the PowerShell lexer. + SCLEX_POWERSHELL = 88, + + //! Select the MySQL lexer. + SCLEX_MYSQL = 89, + + //! Select the gettext .po file lexer. + SCLEX_PO = 90, + + //! Select the TAL lexer. + SCLEX_TAL = 91, + + //! Select the COBOL lexer. + SCLEX_COBOL = 92, + + //! Select the TACL lexer. + SCLEX_TACL = 93, + + //! Select the Sorcus lexer. + SCLEX_SORCUS = 94, + + //! Select the PowerPro lexer. + SCLEX_POWERPRO = 95, + + //! Select the Nimrod lexer. + SCLEX_NIMROD = 96, + + //! Select the SML lexer. + SCLEX_SML = 97, + + //! Select the Markdown lexer. + SCLEX_MARKDOWN = 98, + + //! Select the txt2tags lexer. + SCLEX_TXT2TAGS = 99, + + //! Select the 68000 assembler lexer. + SCLEX_A68K = 100, + + //! Select the Modula 3 lexer. + SCLEX_MODULA = 101, + + //! Select the CoffeeScript lexer. + SCLEX_COFFEESCRIPT = 102, + + //! Select the Take Command lexer. + SCLEX_TCMD = 103, + + //! Select the AviSynth lexer. + SCLEX_AVS = 104, + + //! Select the ECL lexer. + SCLEX_ECL = 105, + + //! Select the OScript lexer. + SCLEX_OSCRIPT = 106, + + //! Select the Visual Prolog lexer. + SCLEX_VISUALPROLOG = 107, + + //! Select the Literal Haskell lexer. + SCLEX_LITERATEHASKELL = 108, + + //! Select the Structured Text lexer. + SCLEX_STTXT = 109, + + //! Select the KVIrc lexer. + SCLEX_KVIRC = 110, + + //! Select the Rust lexer. + SCLEX_RUST = 111, + + //! Select the MSC Nastran DMAP lexer. + SCLEX_DMAP = 112, + + //! Select the assembler lexer ('#' comment character). + SCLEX_AS = 113, + + //! Select the DMIS lexer. + SCLEX_DMIS = 114, + + //! Select the lexer for Windows registry files. + SCLEX_REGISTRY = 115, + + //! Select the BibTex lexer. + SCLEX_BIBTEX = 116, + + //! Select the Motorola S-Record hex lexer. + SCLEX_SREC = 117, + + //! Select the Intel hex lexer. + SCLEX_IHEX = 118, + + //! Select the Tektronix extended hex lexer. + SCLEX_TEHEX = 119, + + //! Select the JSON hex lexer. + SCLEX_JSON = 120, + + //! Select the EDIFACT lexer. + SCLEX_EDIFACT = 121, + + //! Select the pseudo-lexer used for the indentation-based folding of + //! files. + SCLEX_INDENT = 122, + + //! Select the Maxima lexer. + SCLEX_MAXIMA = 123, + + //! Select the Stata lexer. + SCLEX_STATA = 124, + + //! Select the SAS lexer. + SCLEX_SAS = 125, + }; + + enum + { + SC_WEIGHT_NORMAL = 400, + SC_WEIGHT_SEMIBOLD = 600, + SC_WEIGHT_BOLD = 700, + }; + + enum + { + SC_TECHNOLOGY_DEFAULT = 0, + SC_TECHNOLOGY_DIRECTWRITE = 1, + SC_TECHNOLOGY_DIRECTWRITERETAIN = 2, + SC_TECHNOLOGY_DIRECTWRITEDC = 3, + }; + + enum + { + SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0, + SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1, + }; + + enum + { + SC_FONT_SIZE_MULTIPLIER = 100, + }; + + enum + { + SC_FOLDACTION_CONTRACT = 0, + SC_FOLDACTION_EXPAND = 1, + SC_FOLDACTION_TOGGLE = 2, + }; + + enum + { + SC_AUTOMATICFOLD_SHOW = 0x0001, + SC_AUTOMATICFOLD_CLICK = 0x0002, + SC_AUTOMATICFOLD_CHANGE = 0x0004, + }; + + enum + { + SC_ORDER_PRESORTED = 0, + SC_ORDER_PERFORMSORT = 1, + SC_ORDER_CUSTOM = 2, + }; + + //! Construct an empty QsciScintillaBase with parent \a parent. + explicit QsciScintillaBase(QWidget *parent = 0); + + //! Destroys the QsciScintillaBase instance. + virtual ~QsciScintillaBase(); + + //! Returns a pointer to a QsciScintillaBase instance, or 0 if there isn't + //! one. This can be used by the higher level API to send messages that + //! aren't associated with a particular instance. + static QsciScintillaBase *pool(); + + //! Replaces the existing horizontal scroll bar with \a scrollBar. The + //! existing scroll bar is deleted. This should be called instead of + //! QAbstractScrollArea::setHorizontalScrollBar(). + void replaceHorizontalScrollBar(QScrollBar *scrollBar); + + //! Replaces the existing vertical scroll bar with \a scrollBar. The + //! existing scroll bar is deleted. This should be called instead of + //! QAbstractScrollArea::setHorizontalScrollBar(). + void replaceVerticalScrollBar(QScrollBar *scrollBar); + + //! Send the Scintilla message \a msg with the optional parameters \a + //! wParam and \a lParam. + long SendScintilla(unsigned int msg, unsigned long wParam = 0, + long lParam = 0) const; + + //! \overload + long SendScintilla(unsigned int msg, unsigned long wParam, + void *lParam) const; + + //! \overload + long SendScintilla(unsigned int msg, uintptr_t wParam, + const char *lParam) const; + + //! \overload + long SendScintilla(unsigned int msg, const char *lParam) const; + + //! \overload + long SendScintilla(unsigned int msg, const char *wParam, + const char *lParam) const; + + //! \overload + long SendScintilla(unsigned int msg, long wParam) const; + + //! \overload + long SendScintilla(unsigned int msg, int wParam) const; + + //! \overload + long SendScintilla(unsigned int msg, long cpMin, long cpMax, + char *lpstrText) const; + + //! \overload + long SendScintilla(unsigned int msg, unsigned long wParam, + const QColor &col) const; + + //! \overload + long SendScintilla(unsigned int msg, const QColor &col) const; + + //! \overload + long SendScintilla(unsigned int msg, unsigned long wParam, QPainter *hdc, + const QRect &rc, long cpMin, long cpMax) const; + + //! \overload + long SendScintilla(unsigned int msg, unsigned long wParam, + const QPixmap &lParam) const; + + //! \overload + long SendScintilla(unsigned int msg, unsigned long wParam, + const QImage &lParam) const; + + //! Send the Scintilla message \a msg and return a pointer result. + void *SendScintillaPtrResult(unsigned int msg) const; + + //! \internal + static int commandKey(int qt_key, int &modifiers); + +signals: + //! This signal is emitted when text is selected or de-selected. + //! \a yes is true if text has been selected and false if text has been + //! deselected. + void QSCN_SELCHANGED(bool yes); + + //! This signal is emitted when the user cancels an auto-completion list. + //! + //! \sa SCN_AUTOCSELECTION() + void SCN_AUTOCCANCELLED(); + + //! This signal is emitted when the user deletes a character when an + //! auto-completion list is active. + void SCN_AUTOCCHARDELETED(); + + //! This signal is emitted after an auto-completion has inserted its text. + //! \a selection is the text of the selection. \a position is the start + //! position of the word being completed. \a ch is the fillup character + //! that triggered the selection if method is SC_AC_FILLUP. \a method is + //! the method used to trigger the selection. + //! + //! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCSELECTION() + void SCN_AUTOCCOMPLETED(const char *selection, int position, int ch, int method); + + //! This signal is emitted when the user selects an item in an + //! auto-completion list. It is emitted before the selection is inserted. + //! The insertion can be cancelled by sending an SCI_AUTOCANCEL message + //! from a connected slot. + //! \a selection is the text of the selection. \a position is the start + //! position of the word being completed. \a ch is the fillup character + //! that triggered the selection if method is SC_AC_FILLUP. \a method is + //! the method used to trigger the selection. + //! + //! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCCOMPLETED() + void SCN_AUTOCSELECTION(const char *selection, int position, int ch, int method); + + //! \overload + void SCN_AUTOCSELECTION(const char *selection, int position); + + //! This signal is emitted when the user highlights an item in an + //! auto-completion or user list. + //! \a selection is the text of the selection. \a id is an identifier for + //! the list which was passed as an argument to the SCI_USERLISTSHOW + //! message or 0 if the list is an auto-completion list. \a position is + //! the position that the list was displayed at. + void SCN_AUTOCSELECTIONCHANGE(const char *selection, int id, int position); + + //! This signal is emitted when the document has changed for any reason. + void SCEN_CHANGE(); + + //! This signal is emitted when the user clicks on a calltip. + //! \a direction is 1 if the user clicked on the up arrow, 2 if the user + //! clicked on the down arrow, and 0 if the user clicked elsewhere. + void SCN_CALLTIPCLICK(int direction); + + //! This signal is emitted whenever the user enters an ordinary character + //! into the text. + //! \a charadded is the character. It can be used to decide to display a + //! call tip or an auto-completion list. + void SCN_CHARADDED(int charadded); + + //! This signal is emitted when the user double clicks. + //! \a position is the position in the text where the click occured. + //! \a line is the number of the line in the text where the click occured. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user double clicked. + void SCN_DOUBLECLICK(int position, int line, int modifiers); + + //! This signal is emitted when the user moves the mouse (or presses a key) + //! after keeping it in one position for the dwell period. + //! \a position is the position in the text where the mouse dwells. + //! \a x is the x-coordinate where the mouse dwells. \a y is the + //! y-coordinate where the mouse dwells. + //! + //! \sa SCN_DWELLSTART, SCI_SETMOUSEDWELLTIME + void SCN_DWELLEND(int position, int x, int y); + + //! This signal is emitted when the user keeps the mouse in one position + //! for the dwell period. + //! \a position is the position in the text where the mouse dwells. + //! \a x is the x-coordinate where the mouse dwells. \a y is the + //! y-coordinate where the mouse dwells. + //! + //! \sa SCN_DWELLEND, SCI_SETMOUSEDWELLTIME + void SCN_DWELLSTART(int position, int x, int y); + + //! This signal is emitted when focus is received. + void SCN_FOCUSIN(); + + //! This signal is emitted when focus is lost. + void SCN_FOCUSOUT(); + + //! This signal is emitted when the user clicks on text in a style with the + //! hotspot attribute set. + //! \a position is the position in the text where the click occured. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user clicked. + void SCN_HOTSPOTCLICK(int position, int modifiers); + + //! This signal is emitted when the user double clicks on text in a style + //! with the hotspot attribute set. + //! \a position is the position in the text where the double click occured. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user double clicked. + void SCN_HOTSPOTDOUBLECLICK(int position, int modifiers); + + //! This signal is emitted when the user releases the mouse button on text + //! in a style with the hotspot attribute set. + //! \a position is the position in the text where the release occured. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user released the button. + void SCN_HOTSPOTRELEASECLICK(int position, int modifiers); + + //! This signal is emitted when the user clicks on text that has an + //! indicator. + //! \a position is the position in the text where the click occured. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user clicked. + void SCN_INDICATORCLICK(int position, int modifiers); + + //! This signal is emitted when the user releases the mouse button on text + //! that has an indicator. + //! \a position is the position in the text where the release occured. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user released. + void SCN_INDICATORRELEASE(int position, int modifiers); + + //! This signal is emitted when a recordable editor command has been + //! executed. + void SCN_MACRORECORD(unsigned int, unsigned long, void *); + + //! This signal is emitted when the user clicks on a sensitive margin. + //! \a position is the position of the start of the line against which the + //! user clicked. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user clicked. + //! \a margin is the number of the margin the user clicked in: 0, 1 or 2. + //! + //! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN + void SCN_MARGINCLICK(int position, int modifiers, int margin); + + //! This signal is emitted when the user right-clicks on a sensitive + //! margin. \a position is the position of the start of the line against + //! which the user clicked. + //! \a modifiers is the logical or of the modifier keys that were pressed + //! when the user clicked. + //! \a margin is the number of the margin the user clicked in: 0, 1 or 2. + //! + //! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN + void SCN_MARGINRIGHTCLICK(int position, int modifiers, int margin); + + //! + void SCN_MODIFIED(int, int, const char *, int, int, int, int, int, int, int); + + //! This signal is emitted when the user attempts to modify read-only + //! text. + void SCN_MODIFYATTEMPTRO(); + + //! + void SCN_NEEDSHOWN(int, int); + + //! This signal is emitted when painting has been completed. It is useful + //! to trigger some other change but to have the paint be done first to + //! appear more reponsive to the user. + void SCN_PAINTED(); + + //! This signal is emitted when the current state of the text no longer + //! corresponds to the state of the text at the save point. + //! + //! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTREACHED() + void SCN_SAVEPOINTLEFT(); + + //! This signal is emitted when the current state of the text corresponds + //! to the state of the text at the save point. This allows feedback to be + //! given to the user as to whether the text has been modified since it was + //! last saved. + //! + //! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTLEFT() + void SCN_SAVEPOINTREACHED(); + + //! This signal is emitted when a range of text needs to be syntax styled. + //! The range is from the value returned by the SCI_GETENDSTYLED message + //! and \a position. It is only emitted if the currently selected lexer is + //! SCLEX_CONTAINER. + //! + //! \sa SCI_COLOURISE, SCI_GETENDSTYLED + void SCN_STYLENEEDED(int position); + + //! This signal is emitted when a URI is dropped. + //! \a url is the value of the URI. + void SCN_URIDROPPED(const QUrl &url); + + //! This signal is emitted when either the text or styling of the text has + //! changed or the selection range or scroll position has changed. + //! \a updated contains the set of SC_UPDATE_* flags describing the changes + //! since the signal was last emitted. + void SCN_UPDATEUI(int updated); + + //! This signal is emitted when the user selects an item in a user list. + //! \a selection is the text of the selection. \a id is an identifier for + //! the list which was passed as an argument to the SCI_USERLISTSHOW + //! message and must be at least 1. \a ch is the fillup character that + //! triggered the selection if method is SC_AC_FILLUP. \a method is the + //! method used to trigger the selection. \a position is the position that + //! the list was displayed at. + //! + //! \sa SCI_USERLISTSHOW, SCN_AUTOCSELECTION() + void SCN_USERLISTSELECTION(const char *selection, int id, int ch, int method, int position); + + //! \overload + void SCN_USERLISTSELECTION(const char *selection, int id, int ch, int method); + + //! \overload + void SCN_USERLISTSELECTION(const char *selection, int id); + + //! + void SCN_ZOOM(); + +protected: + //! Returns true if the contents of a MIME data object can be decoded and + //! inserted into the document. It is called during drag and paste + //! operations. + //! \a source is the MIME data object. + //! + //! \sa fromMimeData(), toMimeData() + virtual bool canInsertFromMimeData(const QMimeData *source) const; + + //! Returns the text of a MIME data object. It is called when a drag and + //! drop is completed and when text is pasted from the clipboard. + //! \a source is the MIME data object. On return \a rectangular is set if + //! the text corresponds to a rectangular selection. + //! + //! \sa canInsertFromMimeData(), toMimeData() + virtual QByteArray fromMimeData(const QMimeData *source, bool &rectangular) const; + + //! Returns a new MIME data object containing some text and whether it + //! corresponds to a rectangular selection. It is called when a drag and + //! drop is started and when the selection is copied to the clipboard. + //! Ownership of the object is passed to the caller. \a text is the text. + //! \a rectangular is set if the text corresponds to a rectangular + //! selection. + //! + //! \sa canInsertFromMimeData(), fromMimeData() + virtual QMimeData *toMimeData(const QByteArray &text, bool rectangular) const; + + //! \reimp + virtual void changeEvent(QEvent *e); + + //! Re-implemented to handle the context menu. + virtual void contextMenuEvent(QContextMenuEvent *e); + + //! Re-implemented to handle drag enters. + virtual void dragEnterEvent(QDragEnterEvent *e); + + //! Re-implemented to handle drag leaves. + virtual void dragLeaveEvent(QDragLeaveEvent *e); + + //! Re-implemented to handle drag moves. + virtual void dragMoveEvent(QDragMoveEvent *e); + + //! Re-implemented to handle drops. + virtual void dropEvent(QDropEvent *e); + + //! Re-implemented to tell Scintilla it has the focus. + virtual void focusInEvent(QFocusEvent *e); + + //! Re-implemented to tell Scintilla it has lost the focus. + virtual void focusOutEvent(QFocusEvent *e); + + //! Re-implemented to allow tabs to be entered as text. + virtual bool focusNextPrevChild(bool next); + + //! Re-implemented to handle key presses. + virtual void keyPressEvent(QKeyEvent *e); + + //! Re-implemented to handle composed characters. + virtual void inputMethodEvent(QInputMethodEvent *event); + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + + //! Re-implemented to handle mouse double-clicks. + virtual void mouseDoubleClickEvent(QMouseEvent *e); + + //! Re-implemented to handle mouse moves. + virtual void mouseMoveEvent(QMouseEvent *e); + + //! Re-implemented to handle mouse presses. + virtual void mousePressEvent(QMouseEvent *e); + + //! Re-implemented to handle mouse releases. + virtual void mouseReleaseEvent(QMouseEvent *e); + + //! Re-implemented to paint the viewport. + virtual void paintEvent(QPaintEvent *e); + + //! Re-implemented to handle resizes. + virtual void resizeEvent(QResizeEvent *e); + + //! \internal Re-implemented to handle scrolling. + virtual void scrollContentsBy(int dx, int dy); + + //! \internal This helps to work around some Scintilla bugs. + void setScrollBars(); + + //! \internal Convert a QString to encoded bytes. + QByteArray textAsBytes(const QString &text) const; + + //! \internal Convert encoded bytes to a QString. + QString bytesAsText(const char *bytes, int size) const; + + //! Give access to the text convertors. + friend class QsciAccessibleScintillaBase; + friend class QsciLexer; + + //! \internal A helper for QsciScintilla::contextMenuEvent(). + bool contextMenuNeeded(int x, int y) const; + +private slots: + void handleVSb(int value); + void handleHSb(int value); + +private: + // This is needed to allow QsciScintillaQt to emit this class's signals. + friend class QsciScintillaQt; + + QsciScintillaQt *sci; + QPoint triple_click_at; + QTimer triple_click; + int preeditPos; + int preeditNrBytes; + QString preeditString; + bool clickCausedFocus; + + void connectHorizontalScrollBar(); + void connectVerticalScrollBar(); + + void acceptAction(QDropEvent *e); + + int eventModifiers(QMouseEvent *e); + + QsciScintillaBase(const QsciScintillaBase &); + QsciScintillaBase &operator=(const QsciScintillaBase &); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyle.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyle.h new file mode 100644 index 000000000..c6eb7ed87 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyle.h @@ -0,0 +1,204 @@ +// This module defines interface to the QsciStyle class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCISTYLE_H +#define QSCISTYLE_H + +#include +#include +#include + +#include + + +class QsciScintillaBase; + + +//! \brief The QsciStyle class encapsulates all the attributes of a style. +//! +//! Each character of a document has an associated style which determines how +//! the character is displayed, e.g. its font and color. A style is identified +//! by a number. Lexers define styles for each of the language's features so +//! that they are displayed differently. Some style numbers have hard-coded +//! meanings, e.g. the style used for call tips. +class QSCINTILLA_EXPORT QsciStyle +{ +public: + //! This enum defines the different ways the displayed case of the text can + //! be changed. + enum TextCase { + //! The text is displayed as its original case. + OriginalCase = 0, + + //! The text is displayed as upper case. + UpperCase = 1, + + //! The text is displayed as lower case. + LowerCase = 2 + }; + + //! Constructs a QsciStyle instance for style number \a style. If \a style + //! is negative then a new style number is automatically allocated if + //! possible. If it is not possible then style() will return a negative + //! value. + //! + //! \sa style() + QsciStyle(int style = -1); + + //! Constructs a QsciStyle instance for style number \a style. If \a style + //! is negative then a new style number is automatically allocated if + //! possible. If it is not possible then style() will return a negative + //! value. The styles description, color, paper color, font and + //! end-of-line fill are set to \a description, \a color, \a paper, \a font + //! and \a eolFill respectively. + //! + //! \sa style() + QsciStyle(int style, const QString &description, const QColor &color, + const QColor &paper, const QFont &font, bool eolFill = false); + + //! \internal Apply the style to a particular editor. + void apply(QsciScintillaBase *sci) const; + + //! The style's number is set to \a style. + //! + //! \sa style() + void setStyle(int style) {style_nr = style;} + + //! Returns the number of the style. This will be negative if the style is + //! invalid. + //! + //! \sa setStyle() + int style() const {return style_nr;} + + //! The style's description is set to \a description. + //! + //! \sa description() + void setDescription(const QString &description) {style_description = description;} + + //! Returns the style's description. + //! + //! \sa setDescription() + QString description() const {return style_description;} + + //! The style's foreground color is set to \a color. The default is taken + //! from the application's default palette. + //! + //! \sa color() + void setColor(const QColor &color); + + //! Returns the style's foreground color. + //! + //! \sa setColor() + QColor color() const {return style_color;} + + //! The style's background color is set to \a paper. The default is taken + //! from the application's default palette. + //! + //! \sa paper() + void setPaper(const QColor &paper); + + //! Returns the style's background color. + //! + //! \sa setPaper() + QColor paper() const {return style_paper;} + + //! The style's font is set to \a font. The default is the application's + //! default font. + //! + //! \sa font() + void setFont(const QFont &font); + + //! Returns the style's font. + //! + //! \sa setFont() + QFont font() const {return style_font;} + + //! The style's end-of-line fill is set to \a fill. The default is false. + //! + //! \sa eolFill() + void setEolFill(bool fill); + + //! Returns the style's end-of-line fill. + //! + //! \sa setEolFill() + bool eolFill() const {return style_eol_fill;} + + //! The style's text case is set to \a text_case. The default is + //! OriginalCase. + //! + //! \sa textCase() + void setTextCase(TextCase text_case); + + //! Returns the style's text case. + //! + //! \sa setTextCase() + TextCase textCase() const {return style_case;} + + //! The style's visibility is set to \a visible. The default is true. + //! + //! \sa visible() + void setVisible(bool visible); + + //! Returns the style's visibility. + //! + //! \sa setVisible() + bool visible() const {return style_visible;} + + //! The style's changeability is set to \a changeable. The default is + //! true. + //! + //! \sa changeable() + void setChangeable(bool changeable); + + //! Returns the style's changeability. + //! + //! \sa setChangeable() + bool changeable() const {return style_changeable;} + + //! The style's sensitivity to mouse clicks is set to \a hotspot. The + //! default is false. + //! + //! \sa hotspot() + void setHotspot(bool hotspot); + + //! Returns the style's sensitivity to mouse clicks. + //! + //! \sa setHotspot() + bool hotspot() const {return style_hotspot;} + + //! Refresh the style settings. + void refresh(); + +private: + int style_nr; + QString style_description; + QColor style_color; + QColor style_paper; + QFont style_font; + bool style_eol_fill; + TextCase style_case; + bool style_visible; + bool style_changeable; + bool style_hotspot; + + void init(int style); +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyledtext.h b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyledtext.h new file mode 100644 index 000000000..4298f2bc0 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/Qsci/qscistyledtext.h @@ -0,0 +1,61 @@ +// This module defines interface to the QsciStyledText class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCISTYLEDTEXT_H +#define QSCISTYLEDTEXT_H + +#include + +#include + + +class QsciScintillaBase; +class QsciStyle; + + +//! \brief The QsciStyledText class is a container for a piece of text and the +//! style used to display the text. +class QSCINTILLA_EXPORT QsciStyledText +{ +public: + //! Constructs a QsciStyledText instance for text \a text and style number + //! \a style. + QsciStyledText(const QString &text, int style); + + //! Constructs a QsciStyledText instance for text \a text and style \a + //! style. + QsciStyledText(const QString &text, const QsciStyle &style); + + //! \internal Apply the style to a particular editor. + void apply(QsciScintillaBase *sci) const; + + //! Returns a reference to the text. + const QString &text() const {return styled_text;} + + //! Returns the number of the style. + int style() const; + +private: + QString styled_text; + int style_nr; + const QsciStyle *explicit_style; +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.cpp new file mode 100644 index 000000000..5c4d67c64 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.cpp @@ -0,0 +1,739 @@ +// The implementation of the class that implements accessibility support. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include + +#if !defined(QT_NO_ACCESSIBILITY) + +#include "SciAccessibility.h" + +#include +#include +#include +#include +#include + +#include "Qsci/qsciscintillabase.h" + + +// Set if the accessibility support needs initialising. +bool QsciAccessibleScintillaBase::needs_initialising = true; + +// The list of all accessibles. +QList QsciAccessibleScintillaBase::all_accessibles; + + +// Forward declarations. +static QAccessibleInterface *factory(const QString &classname, QObject *object); + + +// The ctor. +QsciAccessibleScintillaBase::QsciAccessibleScintillaBase(QWidget *widget) : + QAccessibleWidget(widget, QAccessible::EditableText), + current_cursor_offset(-1), is_selection(false) +{ + all_accessibles.append(this); +} + + +// The dtor. +QsciAccessibleScintillaBase::~QsciAccessibleScintillaBase() +{ + all_accessibles.removeOne(this); +} + + +// Initialise the accessibility support. +void QsciAccessibleScintillaBase::initialise() +{ + if (needs_initialising) + { + QAccessible::installFactory(factory); + needs_initialising = false; + } +} + + +// Find the accessible for a widget. +QsciAccessibleScintillaBase *QsciAccessibleScintillaBase::findAccessible( + QsciScintillaBase *sb) +{ + for (int i = 0; i < all_accessibles.size(); ++i) + { + QsciAccessibleScintillaBase *acc_sb = all_accessibles.at(i); + + if (acc_sb->sciWidget() == sb) + return acc_sb; + } + + return 0; +} + + +// Return the QsciScintillaBase instance. +QsciScintillaBase *QsciAccessibleScintillaBase::sciWidget() const +{ + return static_cast(widget()); +} + + +// Update the accessible when the selection has changed. +void QsciAccessibleScintillaBase::selectionChanged(QsciScintillaBase *sb, + bool selection) +{ + QsciAccessibleScintillaBase *acc_sb = findAccessible(sb); + + if (!acc_sb) + return; + + acc_sb->is_selection = selection; +} + + +// Update the accessibility when text has been inserted. +void QsciAccessibleScintillaBase::textInserted(QsciScintillaBase *sb, + int position, const char *text, int length) +{ + Q_ASSERT(text); + + QString new_text = sb->bytesAsText(text, length); + int offset = positionAsOffset(sb, position); + + QAccessibleTextInsertEvent ev(sb, offset, new_text); + QAccessible::updateAccessibility(&ev); +} + + +// Return the fragment of text before an offset. +QString QsciAccessibleScintillaBase::textBeforeOffset(int offset, + QAccessible::TextBoundaryType boundaryType, int *startOffset, + int *endOffset) const +{ + QsciScintillaBase *sb = sciWidget(); + + // Initialise in case of errors. + *startOffset = *endOffset = -1; + + int position = validPosition(offset); + + if (position < 0) + return QString(); + + int start_position, end_position; + + if (!boundaries(sb, position, boundaryType, &start_position, &end_position)) + return QString(); + + if (start_position == 0) + return QString(); + + if (!boundaries(sb, start_position - 1, boundaryType, &start_position, &end_position)) + return QString(); + + positionRangeAsOffsetRange(sb, start_position, end_position, startOffset, + endOffset); + + return textRange(sb, start_position, end_position); +} + + +// Return the fragment of text after an offset. +QString QsciAccessibleScintillaBase::textAfterOffset(int offset, + QAccessible::TextBoundaryType boundaryType, int *startOffset, + int *endOffset) const +{ + QsciScintillaBase *sb = sciWidget(); + + // Initialise in case of errors. + *startOffset = *endOffset = -1; + + int position = validPosition(offset); + + if (position < 0) + return QString(); + + int start_position, end_position; + + if (!boundaries(sb, position, boundaryType, &start_position, &end_position)) + return QString(); + + if (end_position >= sb->SendScintilla(QsciScintillaBase::SCI_GETTEXTLENGTH)) + return QString(); + + if (!boundaries(sb, end_position, boundaryType, &start_position, &end_position)) + return QString(); + + positionRangeAsOffsetRange(sb, start_position, end_position, startOffset, + endOffset); + + return textRange(sb, start_position, end_position); +} + + +// Return the fragment of text at an offset. +QString QsciAccessibleScintillaBase::textAtOffset(int offset, + QAccessible::TextBoundaryType boundaryType, int *startOffset, + int *endOffset) const +{ + QsciScintillaBase *sb = sciWidget(); + + // Initialise in case of errors. + *startOffset = *endOffset = -1; + + int position = validPosition(offset); + + if (position < 0) + return QString(); + + int start_position, end_position; + + if (!boundaries(sb, position, boundaryType, &start_position, &end_position)) + return QString(); + + positionRangeAsOffsetRange(sb, start_position, end_position, startOffset, + endOffset); + + return textRange(sb, start_position, end_position); +} + + +// Update the accessibility when text has been deleted. +void QsciAccessibleScintillaBase::textDeleted(QsciScintillaBase *sb, + int position, const char *text, int length) +{ + Q_ASSERT(text); + + QString old_text = sb->bytesAsText(text, length); + int offset = positionAsOffset(sb, position); + + QAccessibleTextRemoveEvent ev(sb, offset, old_text); + QAccessible::updateAccessibility(&ev); +} + + +// Update the accessibility when the UI has been updated. +void QsciAccessibleScintillaBase::updated(QsciScintillaBase *sb) +{ + QsciAccessibleScintillaBase *acc_sb = findAccessible(sb); + + if (!acc_sb) + return; + + int cursor_offset = positionAsOffset(sb, + sb->SendScintilla(QsciScintillaBase::SCI_GETCURRENTPOS)); + + if (acc_sb->current_cursor_offset != cursor_offset) + { + acc_sb->current_cursor_offset = cursor_offset; + + QAccessibleTextCursorEvent ev(sb, cursor_offset); + QAccessible::updateAccessibility(&ev); + } +} + + +// Return a valid position from an offset or -1 if it was invalid. +int QsciAccessibleScintillaBase::validPosition(int offset) const +{ + // An offset of -1 is interpreted as the length of the text. + int nr_chars = characterCount(); + + if (offset == -1) + offset = nr_chars; + + // Check there is some text and the offset is within range. + if (nr_chars == 0 || offset < 0 || offset > nr_chars) + return -1; + + return offsetAsPosition(sciWidget(), offset); +} + + +// Get the start and end boundary positions for a type of boundary. true is +// returned if the boundary positions are valid. +bool QsciAccessibleScintillaBase::boundaries(QsciScintillaBase *sb, + int position, QAccessible::TextBoundaryType boundaryType, + int *start_position, int *end_position) +{ + // This implementation is based on what Qt does although that may itself be + // wrong. The cursor is in a word if it is before or after any character + // in the word. If the cursor is not in a word (eg. is has a space each + // side) then the previous word is current. + + switch (boundaryType) + { + case QAccessible::CharBoundary: + *start_position = position; + *end_position = sb->SendScintilla( + QsciScintillaBase::SCI_POSITIONAFTER, position); + break; + + case QAccessible::WordBoundary: + *start_position = sb->SendScintilla( + QsciScintillaBase::SCI_WORDSTARTPOSITION, position, 1); + *end_position = sb->SendScintilla( + QsciScintillaBase::SCI_WORDENDPOSITION, position, 1); + + // If the start and end positions are the same then we are not in a + // word. + if (*start_position == *end_position) + { + // We need the immediately preceding word. Note that Qt behaves + // differently as it will not move before the current line. + + // Find the end of the preceding word. + *end_position = sb->SendScintilla( + QsciScintillaBase::SCI_WORDSTARTPOSITION, position, 0L); + + // If the end is 0 then there isn't a preceding word. + if (*end_position == 0) + return false; + + // Now find the start. + *start_position = sb->SendScintilla( + QsciScintillaBase::SCI_WORDSTARTPOSITION, *end_position, + 1); + } + + break; + + case QAccessible::SentenceBoundary: + return false; + + case QAccessible::ParagraphBoundary: + // Paragraph boundaries are supposed to be supported but it isn't clear + // what this means in a code editor. + return false; + + case QAccessible::LineBoundary: + { + int line = sb->SendScintilla( + QsciScintillaBase::SCI_LINEFROMPOSITION, position); + + *start_position = sb->SendScintilla( + QsciScintillaBase::SCI_POSITIONFROMLINE, line); + *end_position = sb->SendScintilla( + QsciScintillaBase::SCI_POSITIONFROMLINE, line + 1); + + // See if we are after the last end-of-line character. + if (*start_position == *end_position) + return false; + } + + break; + + case QAccessible::NoBoundary: + *start_position = 0; + *end_position = sb->SendScintilla( + QsciScintillaBase::SCI_GETTEXTLENGTH); + break; + } + + return true; +} + + +// Return the text between two positions. +QString QsciAccessibleScintillaBase::textRange(QsciScintillaBase *sb, + int start_position, int end_position) +{ + QByteArray bytes(end_position - start_position + 1, '\0'); + + sb->SendScintilla(QsciScintillaBase::SCI_GETTEXTRANGE, start_position, + end_position, bytes.data()); + + return sb->bytesAsText(bytes.constData(), bytes.size() - 1); +} + + +// Convert a byte position to a character offset. +int QsciAccessibleScintillaBase::positionAsOffset(QsciScintillaBase *sb, + int position) +{ + return sb->SendScintilla(QsciScintillaBase::SCI_COUNTCHARACTERS, 0, + position); +} + + +// Convert a range of byte poisitions to character offsets. +void QsciAccessibleScintillaBase::positionRangeAsOffsetRange( + QsciScintillaBase *sb, int start_position, int end_position, + int *startOffset, int *endOffset) +{ + *startOffset = positionAsOffset(sb, start_position); + *endOffset = positionAsOffset(sb, end_position); +} + + +// Convert character offset position to a byte position. +int QsciAccessibleScintillaBase::offsetAsPosition(QsciScintillaBase *sb, + int offset) +{ + return sb->SendScintilla(QsciScintillaBase::SCI_POSITIONRELATIVE, 0, + offset); +} + + +// Get the current selection if any. +void QsciAccessibleScintillaBase::selection(int selectionIndex, + int *startOffset, int *endOffset) const +{ + int start, end; + + if (selectionIndex == 0 && is_selection) + { + QsciScintillaBase *sb = sciWidget(); + int start_position = sb->SendScintilla( + QsciScintillaBase::SCI_GETSELECTIONSTART); + int end_position = sb->SendScintilla( + QsciScintillaBase::SCI_GETSELECTIONEND); + + start = positionAsOffset(sb, start_position); + end = positionAsOffset(sb, end_position); + } + else + { + start = end = 0; + } + + *startOffset = start; + *endOffset = end; +} + + +// Return the number of selections. +int QsciAccessibleScintillaBase::selectionCount() const +{ + return (is_selection ? 1 : 0); +} + + +// Add a selection. +void QsciAccessibleScintillaBase::addSelection(int startOffset, int endOffset) +{ + setSelection(0, startOffset, endOffset); +} + + +// Remove a selection. +void QsciAccessibleScintillaBase::removeSelection(int selectionIndex) +{ + if (selectionIndex == 0) + sciWidget()->SendScintilla(QsciScintillaBase::SCI_CLEARSELECTIONS); +} + + +// Set the selection. +void QsciAccessibleScintillaBase::setSelection(int selectionIndex, + int startOffset, int endOffset) +{ + if (selectionIndex == 0) + { + QsciScintillaBase *sb = sciWidget(); + sb->SendScintilla(QsciScintillaBase::SCI_SETSELECTIONSTART, + offsetAsPosition(sb, startOffset)); + sb->SendScintilla(QsciScintillaBase::SCI_SETSELECTIONEND, + offsetAsPosition(sb, endOffset)); + } +} + + +// Return the current cursor offset. +int QsciAccessibleScintillaBase::cursorPosition() const +{ + return current_cursor_offset; +} + + +// Set the cursor offset. +void QsciAccessibleScintillaBase::setCursorPosition(int position) +{ + QsciScintillaBase *sb = sciWidget(); + + sb->SendScintilla(QsciScintillaBase::SCI_GOTOPOS, + offsetAsPosition(sb, position)); +} + + +// Return the text between two offsets. +QString QsciAccessibleScintillaBase::text(int startOffset, int endOffset) const +{ + QsciScintillaBase *sb = sciWidget(); + + return textRange(sb, offsetAsPosition(sb, startOffset), + offsetAsPosition(sb, endOffset)); +} + + +// Return the number of characters in the text. +int QsciAccessibleScintillaBase::characterCount() const +{ + QsciScintillaBase *sb = sciWidget(); + + return sb->SendScintilla(QsciScintillaBase::SCI_COUNTCHARACTERS, 0, + sb->SendScintilla(QsciScintillaBase::SCI_GETTEXTLENGTH)); +} + + +QRect QsciAccessibleScintillaBase::characterRect(int offset) const +{ + QsciScintillaBase *sb = sciWidget(); + int position = offsetAsPosition(sb, offset); + int x_vport = sb->SendScintilla(QsciScintillaBase::SCI_POINTXFROMPOSITION, + position); + int y_vport = sb->SendScintilla(QsciScintillaBase::SCI_POINTYFROMPOSITION, + position); + const QString ch = text(offset, offset + 1); + + // Get the character's font metrics. + int style = sb->SendScintilla(QsciScintillaBase::SCI_GETSTYLEAT, position); + QFontMetrics metrics(fontForStyle(style)); + + QRect rect(x_vport, y_vport, metrics.horizontalAdvance(ch), + metrics.height()); + rect.moveTo(sb->viewport()->mapToGlobal(rect.topLeft())); + + return rect; +} + + +// Return the offset of the character at the given screen coordinates. +int QsciAccessibleScintillaBase::offsetAtPoint(const QPoint &point) const +{ + QsciScintillaBase *sb = sciWidget(); + QPoint p = sb->viewport()->mapFromGlobal(point); + int position = sb->SendScintilla(QsciScintillaBase::SCI_POSITIONFROMPOINT, + p.x(), p.y()); + + return (position >= 0) ? positionAsOffset(sb, position) : -1; +} + + +// Scroll to make sure an area of text is visible. +void QsciAccessibleScintillaBase::scrollToSubstring(int startIndex, + int endIndex) +{ + QsciScintillaBase *sb = sciWidget(); + int start = offsetAsPosition(sb, startIndex); + int end = offsetAsPosition(sb, endIndex); + + sb->SendScintilla(QsciScintillaBase::SCI_SCROLLRANGE, end, start); +} + + +// Return the attributes of a character and surrounding text. +QString QsciAccessibleScintillaBase::attributes(int offset, int *startOffset, + int *endOffset) const +{ + QsciScintillaBase *sb = sciWidget(); + int position = offsetAsPosition(sb, offset); + int style = sb->SendScintilla(QsciScintillaBase::SCI_GETSTYLEAT, position); + + // Find the start of the text with this style. + int start_position = position; + int start_text_position = offset; + + while (start_position > 0) + { + int before = sb->SendScintilla(QsciScintillaBase::SCI_POSITIONBEFORE, + start_position); + int s = sb->SendScintilla(QsciScintillaBase::SCI_GETSTYLEAT, before); + + if (s != style) + break; + + start_position = before; + --start_text_position; + } + + *startOffset = start_text_position; + + // Find the end of the text with this style. + int end_position = sb->SendScintilla(QsciScintillaBase::SCI_POSITIONAFTER, + position); + int end_text_position = offset + 1; + int last_position = sb->SendScintilla( + QsciScintillaBase::SCI_GETTEXTLENGTH); + + while (end_position < last_position) + { + int s = sb->SendScintilla(QsciScintillaBase::SCI_GETSTYLEAT, + end_position); + + if (s != style) + break; + + end_position = sb->SendScintilla(QsciScintillaBase::SCI_POSITIONAFTER, + end_position); + ++end_text_position; + } + + *endOffset = end_text_position; + + // Convert the style to attributes. + QString attrs; + + int back = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETBACK, style); + addAttribute(attrs, "background-color", colourAsRGB(back)); + + int fore = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETFORE, style); + addAttribute(attrs, "color", colourAsRGB(fore)); + + QFont font = fontForStyle(style); + + QString family = font.family(); + family = family.replace('\\', QLatin1String("\\\\")); + family = family.replace(':', QLatin1String("\\:")); + family = family.replace(',', QLatin1String("\\,")); + family = family.replace('=', QLatin1String("\\=")); + family = family.replace(';', QLatin1String("\\;")); + family = family.replace('\"', QLatin1String("\\\"")); + addAttribute(attrs, "font-familly", + QLatin1Char('"') + family + QLatin1Char('"')); + + int font_size = int(font.pointSize()); + addAttribute(attrs, "font-size", + QString::fromLatin1("%1pt").arg(font_size)); + + QFont::Style font_style = font.style(); + addAttribute(attrs, "font-style", + QString::fromLatin1((font_style == QFont::StyleItalic) ? "italic" : ((font_style == QFont::StyleOblique) ? "oblique": "normal"))); + + int font_weight = font.weight(); + addAttribute(attrs, "font-weight", + QString::fromLatin1( + (font_weight > QFont::Normal) ? "bold" : "normal")); + + int underline = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETUNDERLINE, + style); + if (underline) + addAttribute(attrs, "text-underline-type", + QString::fromLatin1("single")); + + return attrs; +} + + +// Add an attribute name/value pair. +void QsciAccessibleScintillaBase::addAttribute(QString &attrs, + const char *name, const QString &value) +{ + attrs.append(QLatin1String(name)); + attrs.append(QChar(':')); + attrs.append(value); + attrs.append(QChar(';')); +} + + +// Convert a integer colour to an RGB string. +QString QsciAccessibleScintillaBase::colourAsRGB(int colour) +{ + return QString::fromLatin1("rgb(%1,%2,%3)").arg(colour & 0xff).arg((colour >> 8) & 0xff).arg((colour >> 16) & 0xff); +} + + +// Convert a integer colour to an RGB string. +QFont QsciAccessibleScintillaBase::fontForStyle(int style) const +{ + QsciScintillaBase *sb = sciWidget(); + char fontName[64]; + int len = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETFONT, style, + fontName); + int size = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETSIZE, style); + bool italic = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETITALIC, + style); + int weight = sb->SendScintilla(QsciScintillaBase::SCI_STYLEGETWEIGHT, + style); + + return QFont(QString::fromUtf8(fontName, len), size, weight, italic); +} + + +// Delete some text. +void QsciAccessibleScintillaBase::deleteText(int startOffset, int endOffset) +{ + addSelection(startOffset, endOffset); + sciWidget()->SendScintilla(QsciScintillaBase::SCI_REPLACESEL, ""); +} + + +// Insert some text. +void QsciAccessibleScintillaBase::insertText(int offset, const QString &text) +{ + QsciScintillaBase *sb = sciWidget(); + + sb->SendScintilla(QsciScintillaBase::SCI_INSERTTEXT, + offsetAsPosition(sb, offset), sb->textAsBytes(text).constData()); +} + + +// Replace some text. +void QsciAccessibleScintillaBase::replaceText(int startOffset, int endOffset, + const QString &text) +{ + QsciScintillaBase *sb = sciWidget(); + + addSelection(startOffset, endOffset); + sb->SendScintilla(QsciScintillaBase::SCI_REPLACESEL, + sb->textAsBytes(text).constData()); +} + + +// Return the state. +QAccessible::State QsciAccessibleScintillaBase::state() const +{ + QAccessible::State st = QAccessibleWidget::state(); + + st.selectableText = true; + st.multiLine = true; + + if (sciWidget()->SendScintilla(QsciScintillaBase::SCI_GETREADONLY)) + st.readOnly = true; + else + st.editable = true; + + return st; +} + + +// Provide access to the indivual interfaces. +void *QsciAccessibleScintillaBase::interface_cast(QAccessible::InterfaceType t) +{ + if (t == QAccessible::TextInterface) + return static_cast(this); + + if (t == QAccessible::EditableTextInterface) + return static_cast(this); + + return QAccessibleWidget::interface_cast(t); +} + + +// The accessibility interface factory. +static QAccessibleInterface *factory(const QString &classname, QObject *object) +{ + if (classname == QLatin1String("QsciScintillaBase") && object && object->isWidgetType()) + return new QsciAccessibleScintillaBase(static_cast(object)); + + return 0; +} + + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.h b/libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.h new file mode 100644 index 000000000..e4b4ba595 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/SciAccessibility.h @@ -0,0 +1,119 @@ +// The definition of the class that implements accessibility support. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef _SCIACCESSIBILITY_H +#define _SCIACCESSIBILITY_H + +#include + +#if !defined(QT_NO_ACCESSIBILITY) + +#include +#include +#include +#include +#include +#include +#include +#include + + +class QsciScintillaBase; + + +// The implementation of accessibility support. +class QsciAccessibleScintillaBase : public QAccessibleWidget, + public QAccessibleTextInterface, + public QAccessibleEditableTextInterface +{ +public: + explicit QsciAccessibleScintillaBase(QWidget *widget); + ~QsciAccessibleScintillaBase(); + + static void initialise(); + + static void selectionChanged(QsciScintillaBase *sb, bool selection); + static void textInserted(QsciScintillaBase *sb, int position, + const char *text, int length); + static void textDeleted(QsciScintillaBase *sb, int position, + const char *text, int length); + static void updated(QsciScintillaBase *sb); + + void selection(int selectionIndex, int *startOffset, int *endOffset) const; + int selectionCount() const; + void addSelection(int startOffset, int endOffset); + void removeSelection(int selectionIndex); + void setSelection(int selectionIndex, int startOffset, int endOffset); + + int cursorPosition() const; + void setCursorPosition(int position); + + QString text(int startOffset, int endOffset) const; + QString textBeforeOffset(int offset, + QAccessible::TextBoundaryType boundaryType, int *startOffset, + int *endOffset) const; + QString textAfterOffset(int offset, + QAccessible::TextBoundaryType boundaryType, int *startOffset, + int *endOffset) const; + QString textAtOffset(int offset, + QAccessible::TextBoundaryType boundaryType, int *startOffset, + int *endOffset) const; + int characterCount() const; + QRect characterRect(int offset) const; + int offsetAtPoint(const QPoint &point) const; + void scrollToSubstring(int startIndex, int endIndex); + QString attributes(int offset, int *startOffset, int *endOffset) const; + + void deleteText(int startOffset, int endOffset); + void insertText(int offset, const QString &text); + void replaceText(int startOffset, int endOffset, const QString &text); + + QAccessible::State state() const; + void *interface_cast(QAccessible::InterfaceType t); + +private: + static bool needs_initialising; + static QList all_accessibles; + int current_cursor_offset; + bool is_selection; + + static QsciAccessibleScintillaBase *findAccessible(QsciScintillaBase *sb); + QsciScintillaBase *sciWidget() const; + int validPosition(int offset) const; + static bool boundaries(QsciScintillaBase *sb, int position, + QAccessible::TextBoundaryType boundaryType, int *start_position, + int *end_position); + static QString textRange(QsciScintillaBase *sb, int start_position, + int end_position); + static int positionAsOffset(QsciScintillaBase *sb, int position); + static void positionRangeAsOffsetRange(QsciScintillaBase *sb, + int start_position, int end_position, int *startOffset, + int *endOffset); + static int offsetAsPosition(QsciScintillaBase *sb, int offset); + static QString colourAsRGB(int colour); + static void addAttribute(QString &attrs, const char *name, + const QString &value); + QFont fontForStyle(int style) const; +}; + + +#endif + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.cpp new file mode 100644 index 000000000..438965a9e --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.cpp @@ -0,0 +1,189 @@ +// The implementation of various Qt version independent classes used by the +// rest of the port. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "SciClasses.h" + +#include +#include +#include +#include +#include +#include + +#include "ScintillaQt.h" +#include "ListBoxQt.h" + + +// Create a call tip. +QsciSciCallTip::QsciSciCallTip(QWidget *parent, QsciScintillaQt *sci_) + : QWidget(parent, Qt::WindowFlags(Qt::Popup|Qt::FramelessWindowHint|Qt::WA_StaticContents)), + sci(sci_) +{ + // Ensure that the main window keeps the focus (and the caret flashing) + // when this is displayed. + setFocusProxy(parent); +} + + +// Destroy a call tip. +QsciSciCallTip::~QsciSciCallTip() +{ + // Ensure that the main window doesn't receive a focus out event when + // this is destroyed. + setFocusProxy(0); +} + + +// Paint a call tip. +void QsciSciCallTip::paintEvent(QPaintEvent *) +{ + Scintilla::Surface *surfaceWindow = Scintilla::Surface::Allocate( + SC_TECHNOLOGY_DEFAULT); + + if (!surfaceWindow) + return; + + QPainter p(this); + + surfaceWindow->Init(&p); + surfaceWindow->SetUnicodeMode(sci->CodePage() == SC_CP_UTF8); + sci->ct.PaintCT(surfaceWindow); + + delete surfaceWindow; +} + + +// Handle a mouse press in a call tip. +void QsciSciCallTip::mousePressEvent(QMouseEvent *e) +{ + Scintilla::Point pt; + + pt.x = e->x(); + pt.y = e->y(); + + sci->ct.MouseClick(pt); + sci->CallTipClick(); + + update(); +} + + +// Create the popup instance. +QsciSciPopup::QsciSciPopup() +{ + // Set up the mapper. + connect(&mapper, SIGNAL(mapped(int)), this, SLOT(on_triggered(int))); +} + + +// Add an item and associated command to the popup and enable it if required. +void QsciSciPopup::addItem(const QString &label, int cmd, bool enabled, + QsciScintillaQt *sci_) +{ + QAction *act = addAction(label, &mapper, SLOT(map())); + mapper.setMapping(act, cmd); + act->setEnabled(enabled); + sci = sci_; +} + + +// A slot to handle a menu action being triggered. +void QsciSciPopup::on_triggered(int cmd) +{ + sci->Command(cmd); +} + + +QsciSciListBox::QsciSciListBox(QWidget *parent, QsciListBoxQt *lbx_) + : QListWidget(parent), lbx(lbx_) +{ + setAttribute(Qt::WA_StaticContents); + +#if defined(Q_OS_WIN) + setWindowFlags(Qt::Tool|Qt::FramelessWindowHint); + + // This stops the main widget losing focus when the user clicks on this one + // (which prevents this one being destroyed). + setFocusPolicy(Qt::NoFocus); +#else + // This is the root of the focus problems under Gnome's window manager. We + // have tried many flag combinations in the past. The consensus now seems + // to be that the following works. However it might now work because of a + // change in Qt so we only enable it for recent versions in order to + // reduce the risk of breaking something that works with earlier versions. + setWindowFlags(Qt::ToolTip|Qt::WindowStaysOnTopHint); + + // This may not be needed. + setFocusProxy(parent); +#endif + + setFrameShape(StyledPanel); + setFrameShadow(Plain); +} + + +QsciSciListBox::~QsciSciListBox() +{ + // Ensure that the main widget doesn't get a focus out event when this is + // destroyed. + setFocusProxy(0); +} + + +void QsciSciListBox::addItemPixmap(const QPixmap &pm, const QString &txt) +{ + new QListWidgetItem(pm, txt, this); +} + + +int QsciSciListBox::find(const QString &prefix) +{ + QList itms = findItems(prefix, + Qt::MatchStartsWith|Qt::MatchCaseSensitive); + + if (itms.size() == 0) + return -1; + + return row(itms[0]); +} + + +QString QsciSciListBox::text(int n) +{ + QListWidgetItem *itm = item(n); + + if (!itm) + return QString(); + + return itm->text(); +} + + +void QsciSciListBox::mouseDoubleClickEvent(QMouseEvent *) +{ + lbx->handleDoubleClick(); +} + + +void QsciSciListBox::mouseReleaseEvent(QMouseEvent *) +{ + lbx->handleRelease(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.h b/libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.h new file mode 100644 index 000000000..d5e9e0867 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/SciClasses.h @@ -0,0 +1,103 @@ +// The definition of various Qt version independent classes used by the rest of +// the port. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef _SCICLASSES_H +#define _SCICLASSES_H + +#include +#include +#include +#include + +#include + + +class QsciScintillaQt; +class QsciListBoxQt; + + +// A simple QWidget sub-class to implement a call tip. This is not put into +// the Scintilla namespace because of moc's problems with preprocessor macros. +class QsciSciCallTip : public QWidget +{ + Q_OBJECT + +public: + QsciSciCallTip(QWidget *parent, QsciScintillaQt *sci_); + ~QsciSciCallTip(); + +protected: + void paintEvent(QPaintEvent *e); + void mousePressEvent(QMouseEvent *e); + +private: + QsciScintillaQt *sci; +}; + + +// A popup menu where options correspond to a numeric command. This is not put +// into the Scintilla namespace because of moc's problems with preprocessor +// macros. +class QsciSciPopup : public QMenu +{ + Q_OBJECT + +public: + QsciSciPopup(); + + void addItem(const QString &label, int cmd, bool enabled, + QsciScintillaQt *sci_); + +private slots: + void on_triggered(int cmd); + +private: + QsciScintillaQt *sci; + QSignalMapper mapper; +}; + + +// This sub-class of QListBox is needed to provide slots from which we can call +// QsciListBox's double-click callback (and you thought this was a C++ +// program). This is not put into the Scintilla namespace because of moc's +// problems with preprocessor macros. +class QsciSciListBox : public QListWidget +{ + Q_OBJECT + +public: + QsciSciListBox(QWidget *parent, QsciListBoxQt *lbx_); + virtual ~QsciSciListBox(); + + void addItemPixmap(const QPixmap &pm, const QString &txt); + + int find(const QString &prefix); + QString text(int n); + +protected: + void mouseDoubleClickEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); + +private: + QsciListBoxQt *lbx; +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.cpp new file mode 100644 index 000000000..e10556004 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.cpp @@ -0,0 +1,768 @@ +// The implementation of the Qt specific subclass of ScintillaBase. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Qsci/qsciscintillabase.h" +#include "ScintillaQt.h" +#if !defined(QT_NO_ACCESSIBILITY) +#include "SciAccessibility.h" +#endif +#include "SciClasses.h" + + +// We want to use the Scintilla notification names as Qt signal names. +#undef SCEN_CHANGE +#undef SCN_AUTOCCANCELLED +#undef SCN_AUTOCCHARDELETED +#undef SCN_AUTOCCOMPLETED +#undef SCN_AUTOCSELECTION +#undef SCN_AUTOCSELECTIONCHANGE +#undef SCN_CALLTIPCLICK +#undef SCN_CHARADDED +#undef SCN_DOUBLECLICK +#undef SCN_DWELLEND +#undef SCN_DWELLSTART +#undef SCN_FOCUSIN +#undef SCN_FOCUSOUT +#undef SCN_HOTSPOTCLICK +#undef SCN_HOTSPOTDOUBLECLICK +#undef SCN_HOTSPOTRELEASECLICK +#undef SCN_INDICATORCLICK +#undef SCN_INDICATORRELEASE +#undef SCN_MACRORECORD +#undef SCN_MARGINCLICK +#undef SCN_MARGINRIGHTCLICK +#undef SCN_MODIFIED +#undef SCN_MODIFYATTEMPTRO +#undef SCN_NEEDSHOWN +#undef SCN_PAINTED +#undef SCN_SAVEPOINTLEFT +#undef SCN_SAVEPOINTREACHED +#undef SCN_STYLENEEDED +#undef SCN_UPDATEUI +#undef SCN_USERLISTSELECTION +#undef SCN_ZOOM + +enum +{ + SCEN_CHANGE = 768, + SCN_AUTOCCANCELLED = 2025, + SCN_AUTOCCHARDELETED = 2026, + SCN_AUTOCCOMPLETED = 2030, + SCN_AUTOCSELECTION = 2022, + SCN_AUTOCSELECTIONCHANGE = 2032, + SCN_CALLTIPCLICK = 2021, + SCN_CHARADDED = 2001, + SCN_DOUBLECLICK = 2006, + SCN_DWELLEND = 2017, + SCN_DWELLSTART = 2016, + SCN_FOCUSIN = 2028, + SCN_FOCUSOUT = 2029, + SCN_HOTSPOTCLICK = 2019, + SCN_HOTSPOTDOUBLECLICK = 2020, + SCN_HOTSPOTRELEASECLICK = 2027, + SCN_INDICATORCLICK = 2023, + SCN_INDICATORRELEASE = 2024, + SCN_MACRORECORD = 2009, + SCN_MARGINCLICK = 2010, + SCN_MARGINRIGHTCLICK = 2031, + SCN_MODIFIED = 2008, + SCN_MODIFYATTEMPTRO = 2004, + SCN_NEEDSHOWN = 2011, + SCN_PAINTED = 2013, + SCN_SAVEPOINTLEFT = 2003, + SCN_SAVEPOINTREACHED = 2002, + SCN_STYLENEEDED = 2000, + SCN_UPDATEUI = 2007, + SCN_USERLISTSELECTION = 2014, + SCN_ZOOM = 2018 +}; + + +// The ctor. +QsciScintillaQt::QsciScintillaQt(QsciScintillaBase *qsb_) + : vMax(0), hMax(0), vPage(0), hPage(0), capturedMouse(false), qsb(qsb_) +{ + wMain = qsb->viewport(); + + // This is ignored. + imeInteraction = imeInline; + + // Using pixmaps screws things up when moving to a different display + // (although this could be because we haven't got the pixmap code right). + // However Qt shouldn't need buffered drawing anyway. + WndProc(SCI_SETBUFFEREDDRAW, 0, 0); + + for (int i = 0; i <= static_cast(tickPlatform); ++i) + timers[i] = 0; + + Initialise(); +} + + +// The dtor. +QsciScintillaQt::~QsciScintillaQt() +{ + Finalise(); +} + + +// Initialise the instance. +void QsciScintillaQt::Initialise() +{ + // This signal is only ever emitted for systems that have a separate + // selection (ie. X11). + connect(QApplication::clipboard(), SIGNAL(selectionChanged()), this, + SLOT(onSelectionChanged())); +} + + +// Tidy up the instance. +void QsciScintillaQt::Finalise() +{ + for (int i = 0; i <= static_cast(tickPlatform); ++i) + FineTickerCancel(static_cast(i)); + + ScintillaBase::Finalise(); +} + + +// Start a drag. +void QsciScintillaQt::StartDrag() +{ + inDragDrop = ddDragging; + + QDrag *qdrag = new QDrag(qsb); + qdrag->setMimeData(mimeSelection(drag)); + + Qt::DropAction action = qdrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::MoveAction); + + // Remove the dragged text if it was a move to another widget or + // application. + if (action == Qt::MoveAction && qdrag->target() != qsb->viewport()) + ClearSelection(); + + SetDragPosition(Scintilla::SelectionPosition()); + inDragDrop = ddNone; +} + + +// Re-implement to trap certain messages. +sptr_t QsciScintillaQt::WndProc(unsigned int iMessage, uptr_t wParam, + sptr_t lParam) +{ + switch (iMessage) + { + case SCI_GETDIRECTFUNCTION: + return reinterpret_cast(DirectFunction); + + case SCI_GETDIRECTPOINTER: + return reinterpret_cast(this); + } + + return ScintillaBase::WndProc(iMessage, wParam, lParam); +} + + +// Windows nonsense. +sptr_t QsciScintillaQt::DefWndProc(unsigned int, uptr_t, sptr_t) +{ + return 0; +} + + +// Grab or release the mouse (and keyboard). +void QsciScintillaQt::SetMouseCapture(bool on) +{ + if (mouseDownCaptures) + { + if (on) + qsb->viewport()->grabMouse(); + else + qsb->viewport()->releaseMouse(); + } + + capturedMouse = on; +} + + +// Return true if the mouse/keyboard are currently grabbed. +bool QsciScintillaQt::HaveMouseCapture() +{ + return capturedMouse; +} + + +// Set the position of the vertical scrollbar. +void QsciScintillaQt::SetVerticalScrollPos() +{ + QScrollBar *sb = qsb->verticalScrollBar(); + bool was_blocked = sb->blockSignals(true); + + sb->setValue(topLine); + + sb->blockSignals(was_blocked); +} + + +// Set the position of the horizontal scrollbar. +void QsciScintillaQt::SetHorizontalScrollPos() +{ + QScrollBar *sb = qsb->horizontalScrollBar(); + bool was_blocked = sb->blockSignals(true); + + sb->setValue(xOffset); + + sb->blockSignals(was_blocked); +} + + +// Set the extent of the vertical and horizontal scrollbars and return true if +// the view needs re-drawing. +bool QsciScintillaQt::ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) +{ + bool modified = false; + QScrollBar *sb; + + int vNewPage = nPage; + int vNewMax = nMax - vNewPage + 1; + + if (vMax != vNewMax || vPage != vNewPage) + { + vMax = vNewMax; + vPage = vNewPage; + modified = true; + + sb = qsb->verticalScrollBar(); + sb->setMaximum(vMax); + sb->setPageStep(vPage); + } + + int hNewPage = GetTextRectangle().Width(); + int hNewMax = (scrollWidth > hNewPage) ? scrollWidth - hNewPage : 0; + int charWidth = vs.styles[STYLE_DEFAULT].aveCharWidth; + + sb = qsb->horizontalScrollBar(); + + if (hMax != hNewMax || hPage != hNewPage || sb->singleStep() != charWidth) + { + hMax = hNewMax; + hPage = hNewPage; + modified = true; + + sb->setMaximum(hMax); + sb->setPageStep(hPage); + sb->setSingleStep(charWidth); + } + + return modified; +} + + +// Called after SCI_SETWRAPMODE and SCI_SETHSCROLLBAR. +void QsciScintillaQt::ReconfigureScrollBars() +{ + // Hide or show the scrollbars if needed. + bool hsb = (horizontalScrollBarVisible && !Wrapping()); + + qsb->setHorizontalScrollBarPolicy(hsb ? Qt::ScrollBarAsNeeded : Qt::ScrollBarAlwaysOff); + qsb->setVerticalScrollBarPolicy(verticalScrollBarVisible ? Qt::ScrollBarAsNeeded : Qt::ScrollBarAlwaysOff); +} + + +// Notify interested parties of any change in the document. +void QsciScintillaQt::NotifyChange() +{ + emit qsb->SCEN_CHANGE(); +} + + +// Notify interested parties of various events. This is the main mapping +// between Scintilla notifications and Qt signals. +void QsciScintillaQt::NotifyParent(SCNotification scn) +{ + switch (scn.nmhdr.code) + { + case SCN_CALLTIPCLICK: + emit qsb->SCN_CALLTIPCLICK(scn.position); + break; + + case SCN_AUTOCCANCELLED: + emit qsb->SCN_AUTOCCANCELLED(); + break; + + case SCN_AUTOCCHARDELETED: + emit qsb->SCN_AUTOCCHARDELETED(); + break; + + case SCN_AUTOCCOMPLETED: + emit qsb->SCN_AUTOCCOMPLETED(scn.text, scn.position, scn.ch, + scn.listCompletionMethod); + break; + + case SCN_AUTOCSELECTION: + emit qsb->SCN_AUTOCSELECTION(scn.text, scn.position, scn.ch, + scn.listCompletionMethod); + emit qsb->SCN_AUTOCSELECTION(scn.text, scn.position); + break; + + case SCN_AUTOCSELECTIONCHANGE: + emit qsb->SCN_AUTOCSELECTIONCHANGE(scn.text, scn.listType, + scn.position); + break; + + case SCN_CHARADDED: + emit qsb->SCN_CHARADDED(scn.ch); + break; + + case SCN_DOUBLECLICK: + emit qsb->SCN_DOUBLECLICK(scn.position, scn.line, scn.modifiers); + break; + + case SCN_DWELLEND: + emit qsb->SCN_DWELLEND(scn.position, scn.x, scn.y); + break; + + case SCN_DWELLSTART: + emit qsb->SCN_DWELLSTART(scn.position, scn.x, scn.y); + break; + + case SCN_FOCUSIN: + emit qsb->SCN_FOCUSIN(); + break; + + case SCN_FOCUSOUT: + emit qsb->SCN_FOCUSOUT(); + break; + + case SCN_HOTSPOTCLICK: + emit qsb->SCN_HOTSPOTCLICK(scn.position, scn.modifiers); + break; + + case SCN_HOTSPOTDOUBLECLICK: + emit qsb->SCN_HOTSPOTDOUBLECLICK(scn.position, scn.modifiers); + break; + + case SCN_HOTSPOTRELEASECLICK: + emit qsb->SCN_HOTSPOTRELEASECLICK(scn.position, scn.modifiers); + break; + + case SCN_INDICATORCLICK: + emit qsb->SCN_INDICATORCLICK(scn.position, scn.modifiers); + break; + + case SCN_INDICATORRELEASE: + emit qsb->SCN_INDICATORRELEASE(scn.position, scn.modifiers); + break; + + case SCN_MACRORECORD: + emit qsb->SCN_MACRORECORD(scn.message, scn.wParam, + reinterpret_cast(scn.lParam)); + break; + + case SCN_MARGINCLICK: + emit qsb->SCN_MARGINCLICK(scn.position, scn.modifiers, scn.margin); + break; + + case SCN_MARGINRIGHTCLICK: + emit qsb->SCN_MARGINRIGHTCLICK(scn.position, scn.modifiers, + scn.margin); + break; + + case SCN_MODIFIED: + { + char *text; + +#if !defined(QT_NO_ACCESSIBILITY) + if ((scn.modificationType & SC_MOD_INSERTTEXT) != 0) + QsciAccessibleScintillaBase::textInserted(qsb, scn.position, + scn.text, scn.length); + else if ((scn.modificationType & SC_MOD_DELETETEXT) != 0) + QsciAccessibleScintillaBase::textDeleted(qsb, scn.position, + scn.text, scn.length); +#endif + + // Give some protection to the Python bindings. + if (scn.text && (scn.modificationType & (SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT)) != 0) + { + text = new char[scn.length + 1]; + memcpy(text, scn.text, scn.length); + text[scn.length] = '\0'; + } + else + { + text = 0; + } + + emit qsb->SCN_MODIFIED(scn.position, scn.modificationType, text, + scn.length, scn.linesAdded, scn.line, scn.foldLevelNow, + scn.foldLevelPrev, scn.token, scn.annotationLinesAdded); + + if (text) + delete[] text; + + break; + } + + case SCN_MODIFYATTEMPTRO: + emit qsb->SCN_MODIFYATTEMPTRO(); + break; + + case SCN_NEEDSHOWN: + emit qsb->SCN_NEEDSHOWN(scn.position, scn.length); + break; + + case SCN_PAINTED: + emit qsb->SCN_PAINTED(); + break; + + case SCN_SAVEPOINTLEFT: + emit qsb->SCN_SAVEPOINTLEFT(); + break; + + case SCN_SAVEPOINTREACHED: + emit qsb->SCN_SAVEPOINTREACHED(); + break; + + case SCN_STYLENEEDED: + emit qsb->SCN_STYLENEEDED(scn.position); + break; + + case SCN_UPDATEUI: +#if !defined(QT_NO_ACCESSIBILITY) + QsciAccessibleScintillaBase::updated(qsb); +#endif + emit qsb->SCN_UPDATEUI(scn.updated); + break; + + case SCN_USERLISTSELECTION: + emit qsb->SCN_USERLISTSELECTION(scn.text, scn.listType, scn.ch, + scn.listCompletionMethod, scn.position); + emit qsb->SCN_USERLISTSELECTION(scn.text, scn.listType, scn.ch, + scn.listCompletionMethod); + emit qsb->SCN_USERLISTSELECTION(scn.text, scn.listType); + break; + + case SCN_ZOOM: + emit qsb->SCN_ZOOM(); + break; + + default: + qWarning("Unknown notification: %u", scn.nmhdr.code); + } +} + + +// Convert a selection to mime data. +QMimeData *QsciScintillaQt::mimeSelection( + const Scintilla::SelectionText &text) const +{ + return qsb->toMimeData(QByteArray(text.Data()), text.rectangular); +} + + +// Copy the selected text to the clipboard. +void QsciScintillaQt::CopyToClipboard( + const Scintilla::SelectionText &selectedText) +{ + QApplication::clipboard()->setMimeData(mimeSelection(selectedText)); +} + + +// Implement copy. +void QsciScintillaQt::Copy() +{ + if (!sel.Empty()) + { + Scintilla::SelectionText text; + + CopySelectionRange(&text); + CopyToClipboard(text); + } +} + + +// Implement pasting text. +void QsciScintillaQt::Paste() +{ + pasteFromClipboard(QClipboard::Clipboard); +} + + +// Paste text from either the clipboard or selection. +void QsciScintillaQt::pasteFromClipboard(QClipboard::Mode mode) +{ + int len; + const char *s; + bool rectangular; + + const QMimeData *source = QApplication::clipboard()->mimeData(mode); + + if (!source || !qsb->canInsertFromMimeData(source)) + return; + + QByteArray text = qsb->fromMimeData(source, rectangular); + len = text.length(); + s = text.data(); + + std::string dest = Scintilla::Document::TransformLineEnds(s, len, + pdoc->eolMode); + + Scintilla::SelectionText selText; + selText.Copy(dest, (IsUnicodeMode() ? SC_CP_UTF8 : 0), + vs.styles[STYLE_DEFAULT].characterSet, rectangular, false); + + Scintilla::UndoGroup ug(pdoc); + + ClearSelection(); + InsertPasteShape(selText.Data(), selText.Length(), + selText.rectangular ? pasteRectangular : pasteStream); + EnsureCaretVisible(); +} + + +// Create a call tip window. +void QsciScintillaQt::CreateCallTipWindow(Scintilla::PRectangle rc) +{ + if (!ct.wCallTip.Created()) + ct.wCallTip = new QsciSciCallTip(qsb, this); + + QsciSciCallTip *w = reinterpret_cast(ct.wCallTip.GetID()); + + w->resize(rc.right - rc.left, rc.bottom - rc.top); + ct.wCallTip.Show(); +} + + +// Add an item to the right button menu. +void QsciScintillaQt::AddToPopUp(const char *label, int cmd, bool enabled) +{ + QsciSciPopup *pm = static_cast(popup.GetID()); + + if (*label) + pm->addItem(qApp->translate("ContextMenu", label), cmd, enabled, this); + else + pm->addSeparator(); +} + + +// Claim the (primary) selection. +void QsciScintillaQt::ClaimSelection() +{ + QClipboard *cb = QApplication::clipboard(); + bool isSel = !sel.Empty(); + + if (cb->supportsSelection()) + { + if (isSel) + { + Scintilla::SelectionText text; + + CopySelectionRange(&text); + + if (text.Data()) + cb->setMimeData(mimeSelection(text), QClipboard::Selection); + + primarySelection = true; + } + else + { + primarySelection = false; + } + } + +#if !defined(QT_NO_ACCESSIBILITY) + QsciAccessibleScintillaBase::selectionChanged(qsb, isSel); +#endif + + emit qsb->QSCN_SELCHANGED(isSel); +} + + +// Unclaim the (primary) selection. +void QsciScintillaQt::onSelectionChanged() +{ + bool new_primary = QApplication::clipboard()->ownsSelection(); + + if (primarySelection != new_primary) + { + primarySelection = new_primary; + qsb->viewport()->update(); + } +} + + +// Implemented to provide compatibility with the Windows version. +sptr_t QsciScintillaQt::DirectFunction(QsciScintillaQt *sciThis, unsigned int iMessage, + uptr_t wParam, sptr_t lParam) +{ + return sciThis->WndProc(iMessage,wParam,lParam); +} + + +// Draw the contents of the widget. +void QsciScintillaQt::paintEvent(QPaintEvent *e) +{ + Scintilla::Surface *sw; + + const QRect &qr = e->rect(); + + rcPaint.left = qr.left(); + rcPaint.top = qr.top(); + rcPaint.right = qr.right() + 1; + rcPaint.bottom = qr.bottom() + 1; + + Scintilla::PRectangle rcClient = GetClientRectangle(); + paintingAllText = rcPaint.Contains(rcClient); + + sw = Scintilla::Surface::Allocate(SC_TECHNOLOGY_DEFAULT); + if (!sw) + return; + + QPainter painter(qsb->viewport()); + + paintState = painting; + sw->Init(&painter); + sw->SetUnicodeMode(CodePage() == SC_CP_UTF8); + Paint(sw, rcPaint); + + delete sw; + + // If the painting area was insufficient to cover the new style or brace + // highlight positions then repaint the whole thing. + if (paintState == paintAbandoned) + { + // Do a full re-paint immediately. This may only be needed on OS X (to + // avoid flicker). + paintingAllText = true; + + sw = Scintilla::Surface::Allocate(SC_TECHNOLOGY_DEFAULT); + if (!sw) + return; + + QPainter painter(qsb->viewport()); + + paintState = painting; + sw->Init(&painter); + sw->SetUnicodeMode(CodePage() == SC_CP_UTF8); + Paint(sw, rcPaint); + + delete sw; + + qsb->viewport()->update(); + } + + paintState = notPainting; +} + + +// Re-implemented to drive the tickers. +void QsciScintillaQt::timerEvent(QTimerEvent *e) +{ + for (int i = 0; i <= static_cast(tickPlatform); ++i) + if (timers[i] == e->timerId()) + TickFor(static_cast(i)); +} + + +// Re-implemented to say we support fine tickers. +bool QsciScintillaQt::FineTickerAvailable() +{ + return true; +} + + +// Re-implemented to stop a ticker. +void QsciScintillaQt::FineTickerCancel(TickReason reason) +{ + int &ticker = timers[static_cast(reason)]; + + if (ticker != 0) + { + killTimer(ticker); + ticker = 0; + } +} + + +// Re-implemented to check if a particular ticker is running. +bool QsciScintillaQt::FineTickerRunning(TickReason reason) +{ + return (timers[static_cast(reason)] != 0); +} + + +// Re-implemented to start a ticker. +void QsciScintillaQt::FineTickerStart(TickReason reason, int ms, int) +{ + int &ticker = timers[static_cast(reason)]; + + if (ticker != 0) + killTimer(ticker); + + ticker = startTimer(ms); +} + + +// Re-implemented to support idle processing. +bool QsciScintillaQt::SetIdle(bool on) +{ + if (on) + { + if (!idler.state) + { + QTimer *timer = reinterpret_cast(idler.idlerID); + + if (!timer) + { + idler.idlerID = timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(onIdle())); + } + + timer->start(0); + idler.state = true; + } + } + else if (idler.state) + { + reinterpret_cast(idler.idlerID)->stop(); + idler.state = false; + } + + return true; +} + + +// Invoked to trigger any idle processing. +void QsciScintillaQt::onIdle() +{ + if (!Idle()) + SetIdle(false); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.h b/libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.h new file mode 100644 index 000000000..c34229152 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/ScintillaQt.h @@ -0,0 +1,151 @@ +// The definition of the Qt specific subclass of ScintillaBase. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef SCINTILLAQT_H +#define SCINTILLAQT_H + + +#include +#include + +#include + +// These are needed because Scintilla class header files don't manage their own +// dependencies properly. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ILexer.h" +#include "ILoader.h" +#include "Platform.h" +#include "Scintilla.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "Position.h" +#include "UniqueString.h" +#include "CellBuffer.h" +#include "CharClassify.h" +#include "RunStyles.h" +#include "CaseFolder.h" +#include "Decoration.h" +#include "Document.h" +#include "Style.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Indicator.h" +#include "ViewStyle.h" +#include "KeyMap.h" +#include "ContractionState.h" +#include "Selection.h" +#include "PositionCache.h" +#include "EditModel.h" +#include "MarginView.h" +#include "EditView.h" +#include "Editor.h" +#include "AutoComplete.h" +#include "CallTip.h" +#include "LexAccessor.h" +#include "Accessor.h" + +#include "ScintillaBase.h" + + +QT_BEGIN_NAMESPACE +class QMimeData; +class QPaintEvent; +QT_END_NAMESPACE + +class QsciScintillaBase; +class QsciSciCallTip; +class QsciSciPopup; + + +// This is an internal class but it is referenced by a public class so it has +// to have a Qsci prefix rather than being put in the Scintilla namespace. +// (However the reason for avoiding this no longer applies.) +class QsciScintillaQt : public QObject, public Scintilla::ScintillaBase +{ + Q_OBJECT + + friend class QsciScintillaBase; + friend class QsciSciCallTip; + friend class QsciSciPopup; + +public: + QsciScintillaQt(QsciScintillaBase *qsb_); + virtual ~QsciScintillaQt(); + + virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, + sptr_t lParam); + +protected: + void timerEvent(QTimerEvent *e); + +private slots: + void onIdle(); + void onSelectionChanged(); + +private: + void Initialise(); + void Finalise(); + bool SetIdle(bool on); + void StartDrag(); + sptr_t DefWndProc(unsigned int, uptr_t, sptr_t); + void SetMouseCapture(bool on); + bool HaveMouseCapture(); + void SetVerticalScrollPos(); + void SetHorizontalScrollPos(); + bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage); + void ReconfigureScrollBars(); + void NotifyChange(); + void NotifyParent(SCNotification scn); + void CopyToClipboard(const Scintilla::SelectionText &selectedText); + void Copy(); + void Paste(); + void CreateCallTipWindow(Scintilla::PRectangle rc); + void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); + void ClaimSelection(); + void UnclaimSelection(); + static sptr_t DirectFunction(QsciScintillaQt *sci, unsigned int iMessage, + uptr_t wParam,sptr_t lParam); + + QMimeData *mimeSelection(const Scintilla::SelectionText &text) const; + void paintEvent(QPaintEvent *e); + void pasteFromClipboard(QClipboard::Mode mode); + + // tickPlatform is the last of the TickReason members. + int timers[tickPlatform + 1]; + bool FineTickerAvailable(); + void FineTickerCancel(TickReason reason); + bool FineTickerRunning(TickReason reason); + void FineTickerStart(TickReason reason, int ms, int tolerance); + + int vMax, hMax, vPage, hPage; + bool capturedMouse; + QsciScintillaBase *qsb; +}; + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/features/qscintilla2.prf b/libs/qscintilla_2.14.1/Qt5Qt6/features/qscintilla2.prf new file mode 100644 index 000000000..731bb3253 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/features/qscintilla2.prf @@ -0,0 +1,25 @@ +QT += widgets +!ios:QT += printsupport +macx:lessThan(QT_MAJOR_VERSION, 6) { + QT += macextras +} + +DEFINES += QSCINTILLA_DLL + +INCLUDEPATH += $$[QT_INSTALL_HEADERS] + +LIBS += -L$$[QT_INSTALL_LIBS] + +CONFIG(debug, debug|release) { + mac: { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION}_debug + } else { + win32: { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION}d + } else { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION} + } + } +} else { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION} +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/features_staticlib/qscintilla2.prf b/libs/qscintilla_2.14.1/Qt5Qt6/features_staticlib/qscintilla2.prf new file mode 100644 index 000000000..18a806d1c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/features_staticlib/qscintilla2.prf @@ -0,0 +1,23 @@ +QT += widgets +!ios:QT += printsupport +macx:lessThan(QT_MAJOR_VERSION, 6) { + QT += macextras +} + +INCLUDEPATH += $$[QT_INSTALL_HEADERS] + +LIBS += -L$$[QT_INSTALL_LIBS] + +CONFIG(debug, debug|release) { + mac: { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION}_debug + } else { + win32: { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION}d + } else { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION} + } + } +} else { + LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION} +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qsciabstractapis.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qsciabstractapis.cpp new file mode 100644 index 000000000..6f17d6e86 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qsciabstractapis.cpp @@ -0,0 +1,51 @@ +// This module implements the QsciAbstractAPIs class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qsciabstractapis.h" + +#include "Qsci/qscilexer.h" + + +// The ctor. +QsciAbstractAPIs::QsciAbstractAPIs(QsciLexer *lexer) + : QObject(lexer), lex(lexer) +{ + lexer->setAPIs(this); +} + + +// The dtor. +QsciAbstractAPIs::~QsciAbstractAPIs() +{ +} + + +// Return the lexer. +QsciLexer *QsciAbstractAPIs::lexer() const +{ + return lex; +} + + +// Called when the user has made a selection from the auto-completion list. +void QsciAbstractAPIs::autoCompletionSelected(const QString &selection) +{ + Q_UNUSED(selection); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qsciapis.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qsciapis.cpp new file mode 100644 index 000000000..d4abccc09 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qsciapis.cpp @@ -0,0 +1,995 @@ +// This module implements the QsciAPIs class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include + +#include + +#include "Qsci/qsciapis.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Qsci/qscilexer.h" + + + +// The version number of the prepared API information format. +const unsigned char PreparedDataFormatVersion = 0; + + +// This class contains prepared API information. +struct QsciAPIsPrepared +{ + // The word dictionary is a map of individual words and a list of positions + // each occurs in the sorted list of APIs. A position is a tuple of the + // index into the list of APIs and the index into the particular API. + QMap wdict; + + // The case dictionary maps the case insensitive words to the form in which + // they are to be used. It is only used if the language is case + // insensitive. + QMap cdict; + + // The raw API information. + QStringList raw_apis; + + QStringList apiWords(int api_idx, const QStringList &wseps, + bool strip_image) const; + static QString apiBaseName(const QString &api); +}; + + +// Return a particular API entry as a list of words. +QStringList QsciAPIsPrepared::apiWords(int api_idx, const QStringList &wseps, + bool strip_image) const +{ + QString base = apiBaseName(raw_apis[api_idx]); + + // Remove any embedded image reference if necessary. + if (strip_image) + { + int tail = base.indexOf('?'); + + if (tail >= 0) + base.truncate(tail); + } + + if (wseps.isEmpty()) + return QStringList(base); + + return base.split(wseps.first()); +} + + +// Return the name of an API function, ie. without the arguments. +QString QsciAPIsPrepared::apiBaseName(const QString &api) +{ + QString base = api; + int tail = base.indexOf('('); + + if (tail >= 0) + base.truncate(tail); + + return base.simplified(); +} + + +// The user event type that signals that the worker thread has started. +const QEvent::Type WorkerStarted = static_cast(QEvent::User + 1012); + + +// The user event type that signals that the worker thread has finished. +const QEvent::Type WorkerFinished = static_cast(QEvent::User + 1013); + + +// The user event type that signals that the worker thread has aborted. +const QEvent::Type WorkerAborted = static_cast(QEvent::User + 1014); + + +// This class is the worker thread that post-processes the API set. +class QsciAPIsWorker : public QThread +{ +public: + QsciAPIsWorker(QsciAPIs *apis); + virtual ~QsciAPIsWorker(); + + virtual void run(); + + QsciAPIsPrepared *prepared; + +private: + QsciAPIs *proxy; + bool abort; +}; + + +// The worker thread ctor. +QsciAPIsWorker::QsciAPIsWorker(QsciAPIs *apis) + : prepared(0), proxy(apis), abort(false) +{ +} + + +// The worker thread dtor. +QsciAPIsWorker::~QsciAPIsWorker() +{ + // Tell the thread to stop. There is no need to bother with a mutex. + abort = true; + + // Wait for it to do so and hit it if it doesn't. + if (!wait(500)) + terminate(); + + if (prepared) + delete prepared; +} + + +// The worker thread entry point. +void QsciAPIsWorker::run() +{ + // Sanity check. + if (!prepared) + return; + + // Tell the main thread we have started. + QApplication::postEvent(proxy, new QEvent(WorkerStarted)); + + // Sort the full list. + prepared->raw_apis.sort(); + + QStringList wseps = proxy->lexer()->autoCompletionWordSeparators(); + bool cs = proxy->lexer()->caseSensitive(); + + // Split each entry into separate words but ignoring any arguments. + for (int a = 0; a < prepared->raw_apis.count(); ++a) + { + // Check to see if we should stop. + if (abort) + break; + + QStringList words = prepared->apiWords(a, wseps, true); + + for (int w = 0; w < words.count(); ++w) + { + const QString &word = words[w]; + + // Add the word's position to any existing list for this word. + QsciAPIs::WordIndexList wil = prepared->wdict[word]; + + // If the language is case insensitive and we haven't seen this + // word before then save it in the case dictionary. + if (!cs && wil.count() == 0) + prepared->cdict[word.toUpper()] = word; + + wil.append(QsciAPIs::WordIndex(a, w)); + prepared->wdict[word] = wil; + } + } + + // Tell the main thread we have finished. + QApplication::postEvent(proxy, new QEvent(abort ? WorkerAborted : WorkerFinished)); +} + + +// The ctor. +QsciAPIs::QsciAPIs(QsciLexer *lexer) + : QsciAbstractAPIs(lexer), worker(0), origin_len(0) +{ + prep = new QsciAPIsPrepared; +} + + +// The dtor. +QsciAPIs::~QsciAPIs() +{ + deleteWorker(); + delete prep; +} + + +// Delete the worker thread if there is one. +void QsciAPIs::deleteWorker() +{ + if (worker) + { + delete worker; + worker = 0; + } +} + + +//! Handle termination events from the worker thread. +bool QsciAPIs::event(QEvent *e) +{ + switch (e->type()) + { + case WorkerStarted: + emit apiPreparationStarted(); + return true; + + case WorkerAborted: + deleteWorker(); + emit apiPreparationCancelled(); + return true; + + case WorkerFinished: + delete prep; + old_context.clear(); + + prep = worker->prepared; + worker->prepared = 0; + deleteWorker(); + + // Allow the raw API information to be modified. + apis = prep->raw_apis; + + emit apiPreparationFinished(); + + return true; + + default: + break; + } + + return QObject::event(e); +} + + +// Clear the current raw API entries. +void QsciAPIs::clear() +{ + apis.clear(); +} + + +// Clear out all API information. +bool QsciAPIs::load(const QString &filename) +{ + QFile f(filename); + + if (!f.open(QIODevice::ReadOnly)) + return false; + + QTextStream ts(&f); + + for (;;) + { + QString line = ts.readLine(); + + if (line.isEmpty()) + break; + + apis.append(line); + } + + return true; +} + + +// Add a single API entry. +void QsciAPIs::add(const QString &entry) +{ + apis.append(entry); +} + + +// Remove a single API entry. +void QsciAPIs::remove(const QString &entry) +{ + int idx = apis.indexOf(entry); + + if (idx >= 0) + apis.removeAt(idx); +} + + +// Position the "origin" cursor into the API entries according to the user +// supplied context. +QStringList QsciAPIs::positionOrigin(const QStringList &context, QString &path) +{ + // Get the list of words and see if the context is the same as last time we + // were called. + QStringList new_context; + bool same_context = (old_context.count() > 0 && old_context.count() < context.count()); + + for (int i = 0; i < context.count(); ++i) + { + QString word = context[i]; + + if (!lexer()->caseSensitive()) + word = word.toUpper(); + + if (i < old_context.count() && old_context[i] != word) + same_context = false; + + new_context << word; + } + + // If the context has changed then reset the origin. + if (!same_context) + origin_len = 0; + + // If we have a current origin (ie. the user made a specific selection in + // the current context) then adjust the origin to include the last complete + // word as the user may have entered more parts of the name without using + // auto-completion. + if (origin_len > 0) + { + const QString wsep = lexer()->autoCompletionWordSeparators().first(); + + int start_new = old_context.count(); + int end_new = new_context.count() - 1; + + if (start_new == end_new) + { + path = old_context.join(wsep); + origin_len = path.length(); + } + else + { + QString fixed = *origin; + fixed.truncate(origin_len); + + path = fixed; + + while (start_new < end_new) + { + // Add this word to the current path. + path.append(wsep); + path.append(new_context[start_new]); + origin_len = path.length(); + + // Skip entries in the current origin that don't match the + // path. + while (origin != prep->raw_apis.end()) + { + // See if the current origin has come to an end. + if (!originStartsWith(fixed, wsep)) + origin = prep->raw_apis.end(); + else if (originStartsWith(path, wsep)) + break; + else + ++origin; + } + + if (origin == prep->raw_apis.end()) + break; + + ++start_new; + } + } + + // Terminate the path. + path.append(wsep); + + // If the new text wasn't recognised then reset the origin. + if (origin == prep->raw_apis.end()) + origin_len = 0; + } + + if (origin_len == 0) + path.truncate(0); + + // Save the "committed" context for next time. + old_context = new_context; + old_context.removeLast(); + + return new_context; +} + + +// Return true if the origin starts with the given path. +bool QsciAPIs::originStartsWith(const QString &path, const QString &wsep) +{ + const QString &orig = *origin; + + if (!orig.startsWith(path)) + return false; + + // Check that the path corresponds to the end of a word, ie. that what + // follows in the origin is either a word separator or a (. + QString tail = orig.mid(path.length()); + + return (!tail.isEmpty() && (tail.startsWith(wsep) || tail.at(0) == '(')); +} + + +// Add auto-completion words to an existing list. +void QsciAPIs::updateAutoCompletionList(const QStringList &context, + QStringList &list) +{ + QString path; + QStringList new_context = positionOrigin(context, path); + + if (origin_len > 0) + { + const QString wsep = lexer()->autoCompletionWordSeparators().first(); + QStringList::const_iterator it = origin; + + unambiguous_context = path; + + while (it != prep->raw_apis.end()) + { + QString base = QsciAPIsPrepared::apiBaseName(*it); + + if (!base.startsWith(path)) + break; + + // Make sure we have something after the path. + if (base != path) + { + // Get the word we are interested in (ie. the one after the + // current origin in path). + QString w = base.mid(origin_len + wsep.length()).split(wsep).first(); + + // Append the space, we know the origin is unambiguous. + w.append(' '); + + if (!list.contains(w)) + list << w; + } + + ++it; + } + } + else + { + // At the moment we assume we will add words from multiple contexts so + // mark the unambiguous context as unknown. + unambiguous_context = QString(); + + bool unambig = true; + QStringList with_context; + + if (new_context.last().isEmpty()) + lastCompleteWord(new_context[new_context.count() - 2], with_context, unambig); + else + lastPartialWord(new_context.last(), with_context, unambig); + + for (int i = 0; i < with_context.count(); ++i) + { + // Remove any unambigious context (allowing for a possible image + // identifier). + QString noc = with_context[i]; + + if (unambig) + { + int op = noc.indexOf(QLatin1String(" (")); + + if (op >= 0) + { + int cl = noc.indexOf(QLatin1String(")")); + + if (cl > op) + noc.remove(op, cl - op + 1); + else + noc.truncate(op); + } + } + + list << noc; + } + } +} + + +// Get the index list for a particular word if there is one. +const QsciAPIs::WordIndexList *QsciAPIs::wordIndexOf(const QString &word) const +{ + QString csword; + + // Indirect through the case dictionary if the language isn't case + // sensitive. + if (lexer()->caseSensitive()) + csword = word; + else + { + csword = prep->cdict[word]; + + if (csword.isEmpty()) + return 0; + } + + // Get the possible API entries if any. + const WordIndexList *wl = &prep->wdict[csword]; + + if (wl->isEmpty()) + return 0; + + return wl; +} + + +// Add auto-completion words based on the last complete word entered. +void QsciAPIs::lastCompleteWord(const QString &word, QStringList &with_context, bool &unambig) +{ + // Get the possible API entries if any. + const WordIndexList *wl = wordIndexOf(word); + + if (wl) + addAPIEntries(*wl, true, with_context, unambig); +} + + +// Add auto-completion words based on the last partial word entered. +void QsciAPIs::lastPartialWord(const QString &word, QStringList &with_context, bool &unambig) +{ + if (lexer()->caseSensitive()) + { + QMap::const_iterator it = prep->wdict.lowerBound(word); + + while (it != prep->wdict.end()) + { + if (!it.key().startsWith(word)) + break; + + addAPIEntries(it.value(), false, with_context, unambig); + + ++it; + } + } + else + { + QMap::const_iterator it = prep->cdict.lowerBound(word); + + while (it != prep->cdict.end()) + { + if (!it.key().startsWith(word)) + break; + + addAPIEntries(prep->wdict[it.value()], false, with_context, unambig); + + ++it; + } + } +} + + +// Handle the selection of an entry in the auto-completion list. +void QsciAPIs::autoCompletionSelected(const QString &selection) +{ + // If the selection is an API (ie. it has a space separating the selected + // word and the optional origin) then remember the origin. + QStringList lst = selection.split(' '); + + if (lst.count() != 2) + { + origin_len = 0; + return; + } + + const QString &path = lst[1]; + QString owords; + + if (path.isEmpty()) + owords = unambiguous_context; + else + { + // Check the parenthesis. + if (!path.startsWith("(") || !path.endsWith(")")) + { + origin_len = 0; + return; + } + + // Remove the parenthesis. + owords = path.mid(1, path.length() - 2); + } + + origin = std::lower_bound(prep->raw_apis.begin(), prep->raw_apis.end(), + owords); + origin_len = owords.length(); +} + + +// Add auto-completion words for a particular word (defined by where it appears +// in the APIs) and depending on whether the word was complete (when it's +// actually the next word in the API entry that is of interest) or not. +void QsciAPIs::addAPIEntries(const WordIndexList &wl, bool complete, + QStringList &with_context, bool &unambig) +{ + QStringList wseps = lexer()->autoCompletionWordSeparators(); + + for (int w = 0; w < wl.count(); ++w) + { + const WordIndex &wi = wl[w]; + + QStringList api_words = prep->apiWords(wi.first, wseps, false); + + int idx = wi.second; + + if (complete) + { + // Skip if this is the last word. + if (++idx >= api_words.count()) + continue; + } + + QString api_word, org; + + if (idx == 0) + { + api_word = api_words[0] + ' '; + org = QString::fromLatin1(""); + } + else + { + QStringList orgl = api_words.mid(0, idx); + org = orgl.join(wseps.first()); + + // Add the context (allowing for a possible image identifier). + QString w = api_words[idx]; + QString type; + int type_idx = w.indexOf(QLatin1String("?")); + + if (type_idx >= 0) + { + type = w.mid(type_idx); + w.truncate(type_idx); + } + + api_word = QString("%1 (%2)%3").arg(w).arg(org).arg(type); + } + + // If the origin is different to the context then the context is + // ambiguous. + if (unambig) + { + if (unambiguous_context.isNull()) + { + unambiguous_context = org; + } + else if (unambiguous_context != org) + { + unambiguous_context.truncate(0); + unambig = false; + } + } + + if (!with_context.contains(api_word)) + with_context.append(api_word); + } +} + + +// Return the call tip for a function. +QStringList QsciAPIs::callTips(const QStringList &context, int commas, + QsciScintilla::CallTipsStyle style, QList &shifts) +{ + QString path; + QStringList new_context = positionOrigin(context, path); + QStringList wseps = lexer()->autoCompletionWordSeparators(); + QStringList cts; + + if (origin_len > 0) + { + // The path should have a trailing word separator. + const QString &wsep = wseps.first(); + path.chop(wsep.length()); + + QStringList::const_iterator it = origin; + QString prev; + + // Work out the length of the context. + QStringList strip = path.split(wsep); + strip.removeLast(); + int ctstart = strip.join(wsep).length(); + + if (ctstart) + ctstart += wsep.length(); + + int shift; + + if (style == QsciScintilla::CallTipsContext) + { + shift = ctstart; + ctstart = 0; + } + else + shift = 0; + + // Make sure we only look at the functions we are interested in. + path.append('('); + + while (it != prep->raw_apis.end() && (*it).startsWith(path)) + { + QString w = (*it).mid(ctstart); + + if (w != prev && enoughCommas(w, commas)) + { + shifts << shift; + cts << w; + prev = w; + } + + ++it; + } + } + else + { + const QString &fname = new_context[new_context.count() - 2]; + + // Find everywhere the function name appears in the APIs. + const WordIndexList *wil = wordIndexOf(fname); + + if (wil) + for (int i = 0; i < wil->count(); ++i) + { + const WordIndex &wi = (*wil)[i]; + QStringList awords = prep->apiWords(wi.first, wseps, true); + + // Check the word is the function name and not part of any + // context. + if (wi.second != awords.count() - 1) + continue; + + const QString &api = prep->raw_apis[wi.first]; + + int tail = api.indexOf('('); + + if (tail < 0) + continue; + + if (!enoughCommas(api, commas)) + continue; + + if (style == QsciScintilla::CallTipsNoContext) + { + shifts << 0; + cts << (fname + api.mid(tail)); + } + else + { + shifts << tail - fname.length(); + + // Remove any image type. + int im_type = api.indexOf('?'); + + if (im_type <= 0) + cts << api; + else + cts << (api.left(im_type - 1) + api.mid(tail)); + } + } + } + + return cts; +} + + +// Return true if a string has enough commas in the argument list. +bool QsciAPIs::enoughCommas(const QString &s, int commas) +{ + int end = s.indexOf(')'); + + if (end < 0) + return false; + + QString w = s.left(end); + + return (w.count(',') >= commas); +} + + +// Ensure the list is ready. +void QsciAPIs::prepare() +{ + // Handle the trivial case. + if (worker) + return; + + QsciAPIsPrepared *new_apis = new QsciAPIsPrepared; + new_apis->raw_apis = apis; + + worker = new QsciAPIsWorker(this); + worker->prepared = new_apis; + worker->start(); +} + + +// Cancel any current preparation. +void QsciAPIs::cancelPreparation() +{ + deleteWorker(); +} + + +// Check that a prepared API file exists. +bool QsciAPIs::isPrepared(const QString &filename) const +{ + QString pname = prepName(filename); + + if (pname.isEmpty()) + return false; + + QFileInfo fi(pname); + + return fi.exists(); +} + + +// Load the prepared API information. +bool QsciAPIs::loadPrepared(const QString &filename) +{ + QString pname = prepName(filename); + + if (pname.isEmpty()) + return false; + + // Read the prepared data and decompress it. + QFile pf(pname); + + if (!pf.open(QIODevice::ReadOnly)) + return false; + + QByteArray cpdata = pf.readAll(); + + pf.close(); + + if (cpdata.count() == 0) + return false; + + QByteArray pdata = qUncompress(cpdata); + + // Extract the data. + QDataStream pds(pdata); + + unsigned char vers; + pds >> vers; + + if (vers > PreparedDataFormatVersion) + return false; + + char *lex_name; + pds >> lex_name; + + if (qstrcmp(lex_name, lexer()->lexer()) != 0) + { + delete[] lex_name; + return false; + } + + delete[] lex_name; + + prep->wdict.clear(); + pds >> prep->wdict; + + if (!lexer()->caseSensitive()) + { + // Build up the case dictionary. + prep->cdict.clear(); + + QMap::const_iterator it = prep->wdict.begin(); + + while (it != prep->wdict.end()) + { + prep->cdict[it.key().toUpper()] = it.key(); + ++it; + } + } + + prep->raw_apis.clear(); + pds >> prep->raw_apis; + + // Allow the raw API information to be modified. + apis = prep->raw_apis; + + return true; +} + + +// Save the prepared API information. +bool QsciAPIs::savePrepared(const QString &filename) const +{ + QString pname = prepName(filename, true); + + if (pname.isEmpty()) + return false; + + // Write the prepared data to a memory buffer. + QByteArray pdata; + QDataStream pds(&pdata, QIODevice::WriteOnly); + + // Use a serialisation format supported by Qt v3.0 and later. + pds.setVersion(QDataStream::Qt_3_0); + pds << PreparedDataFormatVersion; + pds << lexer()->lexer(); + pds << prep->wdict; + pds << prep->raw_apis; + + // Compress the data and write it. + QFile pf(pname); + + if (!pf.open(QIODevice::WriteOnly|QIODevice::Truncate)) + return false; + + if (pf.write(qCompress(pdata)) < 0) + { + pf.close(); + return false; + } + + pf.close(); + return true; +} + + +// Return the name of the default prepared API file. +QString QsciAPIs::defaultPreparedName() const +{ + return prepName(QString()); +} + + +// Return the name of a prepared API file. +QString QsciAPIs::prepName(const QString &filename, bool mkpath) const +{ + // Handle the tivial case. + if (!filename.isEmpty()) + return filename; + + QString pdname; + char *qsci = getenv("QSCIDIR"); + + if (qsci) + pdname = qsci; + else + { + static const char *qsci_dir = ".qsci"; + + QDir pd = QDir::home(); + + if (mkpath && !pd.exists(qsci_dir) && !pd.mkdir(qsci_dir)) + return QString(); + + pdname = pd.filePath(qsci_dir); + } + + return QString("%1/%2.pap").arg(pdname).arg(lexer()->lexer()); +} + + +// Return installed API files. +QStringList QsciAPIs::installedAPIFiles() const +{ + QString qtdir = QLibraryInfo::location(QLibraryInfo::DataPath); + + QDir apidir = QDir(QString("%1/qsci/api/%2").arg(qtdir).arg(lexer()->lexer())); + QStringList filenames; + + QStringList filters; + filters << "*.api"; + + QFileInfoList flist = apidir.entryInfoList(filters, QDir::Files, QDir::IgnoreCase); + + foreach (QFileInfo fi, flist) + filenames << fi.absoluteFilePath(); + + return filenames; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscicommand.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscicommand.cpp new file mode 100644 index 000000000..840c3bc31 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscicommand.cpp @@ -0,0 +1,143 @@ +// This module implements the QsciCommand class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscicommand.h" + +#include +#include + +#include "Qsci/qsciscintilla.h" +#include "Qsci/qsciscintillabase.h" + + +static int convert(int key); + + +// The ctor. +QsciCommand::QsciCommand(QsciScintilla *qs, QsciCommand::Command cmd, int key, + int altkey, const char *desc) + : qsCmd(qs), scicmd(cmd), qkey(key), qaltkey(altkey), descCmd(desc) +{ + scikey = convert(qkey); + + if (scikey) + qsCmd->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, scikey, + scicmd); + + scialtkey = convert(qaltkey); + + if (scialtkey) + qsCmd->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, scialtkey, + scicmd); +} + + +// Execute the command. +void QsciCommand::execute() +{ + qsCmd->SendScintilla(scicmd); +} + + +// Bind a key to a command. +void QsciCommand::setKey(int key) +{ + bindKey(key,qkey,scikey); +} + + +// Bind an alternate key to a command. +void QsciCommand::setAlternateKey(int altkey) +{ + bindKey(altkey,qaltkey,scialtkey); +} + + +// Do the hard work of binding a key. +void QsciCommand::bindKey(int key,int &qk,int &scik) +{ + int new_scikey; + + // Ignore if it is invalid, allowing for the fact that we might be + // unbinding it. + if (key) + { + new_scikey = convert(key); + + if (!new_scikey) + return; + } + else + new_scikey = 0; + + if (scik) + qsCmd->SendScintilla(QsciScintillaBase::SCI_CLEARCMDKEY, scik); + + qk = key; + scik = new_scikey; + + if (scik) + qsCmd->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, scik, scicmd); +} + + +// See if a key is valid. +bool QsciCommand::validKey(int key) +{ + return convert(key); +} + + +// Convert a Qt character to the Scintilla equivalent. Return zero if it is +// invalid. +static int convert(int key) +{ + // Convert the modifiers. + int sci_mod = 0; + + if (key & Qt::SHIFT) + sci_mod |= QsciScintillaBase::SCMOD_SHIFT; + + if (key & Qt::CTRL) + sci_mod |= QsciScintillaBase::SCMOD_CTRL; + + if (key & Qt::ALT) + sci_mod |= QsciScintillaBase::SCMOD_ALT; + + if (key & Qt::META) + sci_mod |= QsciScintillaBase::SCMOD_META; + + key &= ~Qt::MODIFIER_MASK; + + // Convert the key. + int sci_key = QsciScintillaBase::commandKey(key, sci_mod); + + if (sci_key) + sci_key |= (sci_mod << 16); + + return sci_key; +} + + +// Return the translated user friendly description. +QString QsciCommand::description() const +{ + return qApp->translate("QsciCommand", descCmd); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscicommandset.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscicommandset.cpp new file mode 100644 index 000000000..18bea3a83 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscicommandset.cpp @@ -0,0 +1,987 @@ +// This module implements the QsciCommandSet class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscicommandset.h" + +#include + +#include "Qsci/qscicommand.h" +#include "Qsci/qsciscintilla.h" +#include "Qsci/qsciscintillabase.h" + + +// Starting with QScintilla v2.7 the standard OS/X keyboard shortcuts are used +// where possible. In order to restore the behaviour of earlier versions then +// #define DONT_USE_OSX_KEYS here or add it to the qmake project (.pro) file. +#if defined(Q_OS_MAC) && !defined(DONT_USE_OSX_KEYS) +#define USING_OSX_KEYS +#else +#undef USING_OSX_KEYS +#endif + + +// The ctor. +QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) +{ + struct sci_cmd { + QsciCommand::Command cmd; + int key; + int altkey; + const char *desc; + }; + + static struct sci_cmd cmd_table[] = { + { + QsciCommand::LineDown, + Qt::Key_Down, +#if defined(USING_OSX_KEYS) + Qt::Key_N | Qt::META, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Move down one line") + }, + { + QsciCommand::LineDownExtend, + Qt::Key_Down | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_N | Qt::META | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Extend selection down one line") + }, + { + QsciCommand::LineDownRectExtend, + Qt::Key_Down | Qt::ALT | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_N | Qt::META | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection down one line") + }, + { + QsciCommand::LineScrollDown, + Qt::Key_Down | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Scroll view down one line") + }, + { + QsciCommand::LineUp, + Qt::Key_Up, +#if defined(USING_OSX_KEYS) + Qt::Key_P | Qt::META, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Move up one line") + }, + { + QsciCommand::LineUpExtend, + Qt::Key_Up | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_P | Qt::META | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Extend selection up one line") + }, + { + QsciCommand::LineUpRectExtend, + Qt::Key_Up | Qt::ALT | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_P | Qt::META | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection up one line") + }, + { + QsciCommand::LineScrollUp, + Qt::Key_Up | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Scroll view up one line") + }, + { + QsciCommand::ScrollToStart, +#if defined(USING_OSX_KEYS) + Qt::Key_Home, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Scroll to start of document") + }, + { + QsciCommand::ScrollToEnd, +#if defined(USING_OSX_KEYS) + Qt::Key_End, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Scroll to end of document") + }, + { + QsciCommand::VerticalCentreCaret, +#if defined(USING_OSX_KEYS) + Qt::Key_L | Qt::META, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Scroll vertically to centre current line") + }, + { + QsciCommand::ParaDown, + Qt::Key_BracketRight | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move down one paragraph") + }, + { + QsciCommand::ParaDownExtend, + Qt::Key_BracketRight | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection down one paragraph") + }, + { + QsciCommand::ParaUp, + Qt::Key_BracketLeft | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move up one paragraph") + }, + { + QsciCommand::ParaUpExtend, + Qt::Key_BracketLeft | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection up one paragraph") + }, + { + QsciCommand::CharLeft, + Qt::Key_Left, +#if defined(USING_OSX_KEYS) + Qt::Key_B | Qt::META, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Move left one character") + }, + { + QsciCommand::CharLeftExtend, + Qt::Key_Left | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_B | Qt::META | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection left one character") + }, + { + QsciCommand::CharLeftRectExtend, + Qt::Key_Left | Qt::ALT | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_B | Qt::META | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection left one character") + }, + { + QsciCommand::CharRight, + Qt::Key_Right, +#if defined(USING_OSX_KEYS) + Qt::Key_F | Qt::META, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Move right one character") + }, + { + QsciCommand::CharRightExtend, + Qt::Key_Right | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_F | Qt::META | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection right one character") + }, + { + QsciCommand::CharRightRectExtend, + Qt::Key_Right | Qt::ALT | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_F | Qt::META | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection right one character") + }, + { + QsciCommand::WordLeft, +#if defined(USING_OSX_KEYS) + Qt::Key_Left | Qt::ALT, +#else + Qt::Key_Left | Qt::CTRL, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move left one word") + }, + { + QsciCommand::WordLeftExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_Left | Qt::ALT | Qt::SHIFT, +#else + Qt::Key_Left | Qt::CTRL | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Extend selection left one word") + }, + { + QsciCommand::WordRight, +#if defined(USING_OSX_KEYS) + 0, +#else + Qt::Key_Right | Qt::CTRL, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move right one word") + }, + { + QsciCommand::WordRightExtend, + Qt::Key_Right | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Extend selection right one word") + }, + { + QsciCommand::WordLeftEnd, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to end of previous word") + }, + { + QsciCommand::WordLeftEndExtend, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to end of previous word") + }, + { + QsciCommand::WordRightEnd, +#if defined(USING_OSX_KEYS) + Qt::Key_Right | Qt::ALT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to end of next word") + }, + { + QsciCommand::WordRightEndExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_Right | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to end of next word") + }, + { + QsciCommand::WordPartLeft, + Qt::Key_Slash | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move left one word part") + }, + { + QsciCommand::WordPartLeftExtend, + Qt::Key_Slash | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection left one word part") + }, + { + QsciCommand::WordPartRight, + Qt::Key_Backslash | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move right one word part") + }, + { + QsciCommand::WordPartRightExtend, + Qt::Key_Backslash | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection right one word part") + }, + { + QsciCommand::Home, +#if defined(USING_OSX_KEYS) + Qt::Key_A | Qt::META, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to start of document line") + }, + { + QsciCommand::HomeExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_A | Qt::META | Qt::SHIFT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to start of document line") + }, + { + QsciCommand::HomeRectExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_A | Qt::META | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection to start of document line") + }, + { + QsciCommand::HomeDisplay, +#if defined(USING_OSX_KEYS) + Qt::Key_Left | Qt::CTRL, +#else + Qt::Key_Home | Qt::ALT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to start of display line") + }, + { + QsciCommand::HomeDisplayExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_Left | Qt::CTRL | Qt::SHIFT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to start of display line") + }, + { + QsciCommand::HomeWrap, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Move to start of display or document line") + }, + { + QsciCommand::HomeWrapExtend, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to start of display or document line") + }, + { + QsciCommand::VCHome, +#if defined(USING_OSX_KEYS) + 0, +#else + Qt::Key_Home, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Move to first visible character in document line") + }, + { + QsciCommand::VCHomeExtend, +#if defined(USING_OSX_KEYS) + 0, +#else + Qt::Key_Home | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to first visible character in document line") + }, + { + QsciCommand::VCHomeRectExtend, +#if defined(USING_OSX_KEYS) + 0, +#else + Qt::Key_Home | Qt::ALT | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection to first visible character in document line") + }, + { + QsciCommand::VCHomeWrap, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Move to first visible character of display in document line") + }, + { + QsciCommand::VCHomeWrapExtend, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to first visible character in display or document line") + }, + { + QsciCommand::LineEnd, +#if defined(USING_OSX_KEYS) + Qt::Key_E | Qt::META, +#else + Qt::Key_End, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to end of document line") + }, + { + QsciCommand::LineEndExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_E | Qt::META | Qt::SHIFT, +#else + Qt::Key_End | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to end of document line") + }, + { + QsciCommand::LineEndRectExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_E | Qt::META | Qt::ALT | Qt::SHIFT, +#else + Qt::Key_End | Qt::ALT | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection to end of document line") + }, + { + QsciCommand::LineEndDisplay, +#if defined(USING_OSX_KEYS) + Qt::Key_Right | Qt::CTRL, +#else + Qt::Key_End | Qt::ALT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to end of display line") + }, + { + QsciCommand::LineEndDisplayExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_Right | Qt::CTRL | Qt::SHIFT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to end of display line") + }, + { + QsciCommand::LineEndWrap, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Move to end of display or document line") + }, + { + QsciCommand::LineEndWrapExtend, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to end of display or document line") + }, + { + QsciCommand::DocumentStart, +#if defined(USING_OSX_KEYS) + Qt::Key_Up | Qt::CTRL, +#else + Qt::Key_Home | Qt::CTRL, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to start of document") + }, + { + QsciCommand::DocumentStartExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_Up | Qt::CTRL | Qt::SHIFT, +#else + Qt::Key_Home | Qt::CTRL | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to start of document") + }, + { + QsciCommand::DocumentEnd, +#if defined(USING_OSX_KEYS) + Qt::Key_Down | Qt::CTRL, +#else + Qt::Key_End | Qt::CTRL, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move to end of document") + }, + { + QsciCommand::DocumentEndExtend, +#if defined(USING_OSX_KEYS) + Qt::Key_Down | Qt::CTRL | Qt::SHIFT, +#else + Qt::Key_End | Qt::CTRL | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection to end of document") + }, + { + QsciCommand::PageUp, + Qt::Key_PageUp, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move up one page") + }, + { + QsciCommand::PageUpExtend, + Qt::Key_PageUp | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Extend selection up one page") + }, + { + QsciCommand::PageUpRectExtend, + Qt::Key_PageUp | Qt::ALT | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection up one page") + }, + { + QsciCommand::PageDown, + Qt::Key_PageDown, +#if defined(USING_OSX_KEYS) + Qt::Key_V | Qt::META, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Move down one page") + }, + { + QsciCommand::PageDownExtend, + Qt::Key_PageDown | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_V | Qt::META | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Extend selection down one page") + }, + { + QsciCommand::PageDownRectExtend, + Qt::Key_PageDown | Qt::ALT | Qt::SHIFT, +#if defined(USING_OSX_KEYS) + Qt::Key_V | Qt::META | Qt::ALT | Qt::SHIFT, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", + "Extend rectangular selection down one page") + }, + { + QsciCommand::StutteredPageUp, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Stuttered move up one page") + }, + { + QsciCommand::StutteredPageUpExtend, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Stuttered extend selection up one page") + }, + { + QsciCommand::StutteredPageDown, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Stuttered move down one page") + }, + { + QsciCommand::StutteredPageDownExtend, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Stuttered extend selection down one page") + }, + { + QsciCommand::Delete, + Qt::Key_Delete, +#if defined(USING_OSX_KEYS) + Qt::Key_D | Qt::META, +#else + 0, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Delete current character") + }, + { + QsciCommand::DeleteBack, + Qt::Key_Backspace, +#if defined(USING_OSX_KEYS) + Qt::Key_H | Qt::META, +#else + Qt::Key_Backspace | Qt::SHIFT, +#endif + QT_TRANSLATE_NOOP("QsciCommand", "Delete previous character") + }, + { + QsciCommand::DeleteBackNotLine, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Delete previous character if not at start of line") + }, + { + QsciCommand::DeleteWordLeft, + Qt::Key_Backspace | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Delete word to left") + }, + { + QsciCommand::DeleteWordRight, + Qt::Key_Delete | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Delete word to right") + }, + { + QsciCommand::DeleteWordRightEnd, +#if defined(USING_OSX_KEYS) + Qt::Key_Delete | Qt::ALT, +#else + 0, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Delete right to end of next word") + }, + { + QsciCommand::DeleteLineLeft, + Qt::Key_Backspace | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Delete line to left") + }, + { + QsciCommand::DeleteLineRight, +#if defined(USING_OSX_KEYS) + Qt::Key_K | Qt::META, +#else + Qt::Key_Delete | Qt::CTRL | Qt::SHIFT, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Delete line to right") + }, + { + QsciCommand::LineDelete, + Qt::Key_L | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Delete current line") + }, + { + QsciCommand::LineCut, + Qt::Key_L | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Cut current line") + }, + { + QsciCommand::LineCopy, + Qt::Key_T | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Copy current line") + }, + { + QsciCommand::LineTranspose, + Qt::Key_T | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Transpose current and previous lines") + }, + { + QsciCommand::LineDuplicate, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Duplicate the current line") + }, + { + QsciCommand::SelectAll, + Qt::Key_A | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Select all") + }, + { + QsciCommand::MoveSelectedLinesUp, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move selected lines up one line") + }, + { + QsciCommand::MoveSelectedLinesDown, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Move selected lines down one line") + }, + { + QsciCommand::SelectionDuplicate, + Qt::Key_D | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Duplicate selection") + }, + { + QsciCommand::SelectionLowerCase, + Qt::Key_U | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Convert selection to lower case") + }, + { + QsciCommand::SelectionUpperCase, + Qt::Key_U | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Convert selection to upper case") + }, + { + QsciCommand::SelectionCut, + Qt::Key_X | Qt::CTRL, + Qt::Key_Delete | Qt::SHIFT, + QT_TRANSLATE_NOOP("QsciCommand", "Cut selection") + }, + { + QsciCommand::SelectionCopy, + Qt::Key_C | Qt::CTRL, + Qt::Key_Insert | Qt::CTRL, + QT_TRANSLATE_NOOP("QsciCommand", "Copy selection") + }, + { + QsciCommand::Paste, + Qt::Key_V | Qt::CTRL, + Qt::Key_Insert | Qt::SHIFT, + QT_TRANSLATE_NOOP("QsciCommand", "Paste") + }, + { + QsciCommand::EditToggleOvertype, + Qt::Key_Insert, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Toggle insert/overtype") + }, + { + QsciCommand::Newline, + Qt::Key_Return, + Qt::Key_Return | Qt::SHIFT, + QT_TRANSLATE_NOOP("QsciCommand", "Insert newline") + }, + { + QsciCommand::Formfeed, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Formfeed") + }, + { + QsciCommand::Tab, + Qt::Key_Tab, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Indent one level") + }, + { + QsciCommand::Backtab, + Qt::Key_Tab | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "De-indent one level") + }, + { + QsciCommand::Cancel, + Qt::Key_Escape, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Cancel") + }, + { + QsciCommand::Undo, + Qt::Key_Z | Qt::CTRL, + Qt::Key_Backspace | Qt::ALT, + QT_TRANSLATE_NOOP("QsciCommand", "Undo last command") + }, + { + QsciCommand::Redo, +#if defined(USING_OSX_KEYS) + Qt::Key_Z | Qt::CTRL | Qt::SHIFT, +#else + Qt::Key_Y | Qt::CTRL, +#endif + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Redo last command") + }, + { + QsciCommand::ZoomIn, + Qt::Key_Plus | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Zoom in") + }, + { + QsciCommand::ZoomOut, + Qt::Key_Minus | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Zoom out") + }, + }; + + // Clear the default map. + qsci->SendScintilla(QsciScintillaBase::SCI_CLEARALLCMDKEYS); + + // By default control characters don't do anything (rather than insert the + // control character into the text). + for (int k = 'A'; k <= 'Z'; ++k) + qsci->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, + k + (QsciScintillaBase::SCMOD_CTRL << 16), + QsciScintillaBase::SCI_NULL); + + for (int i = 0; i < sizeof (cmd_table) / sizeof (cmd_table[0]); ++i) + cmds.append( + new QsciCommand(qsci, cmd_table[i].cmd, cmd_table[i].key, + cmd_table[i].altkey, cmd_table[i].desc)); +} + + +// The dtor. +QsciCommandSet::~QsciCommandSet() +{ + for (int i = 0; i < cmds.count(); ++i) + delete cmds.at(i); +} + + +// Read the command set from settings. +bool QsciCommandSet::readSettings(QSettings &qs, const char *prefix) +{ + bool rc = true; + + for (int i = 0; i < cmds.count(); ++i) + { + QsciCommand *cmd = cmds.at(i); + + QString skey = QString("%1/keymap/c%2/").arg(prefix).arg(static_cast(cmd->command())); + + int key; + bool ok; + + // Read the key. + ok = qs.contains(skey + "key"); + key = qs.value(skey + "key", 0).toInt(); + + if (ok) + cmd->setKey(key); + else + rc = false; + + // Read the alternate key. + ok = qs.contains(skey + "alt"); + key = qs.value(skey + "alt", 0).toInt(); + + if (ok) + cmd->setAlternateKey(key); + else + rc = false; + } + + return rc; +} + + +// Write the command set to settings. +bool QsciCommandSet::writeSettings(QSettings &qs, const char *prefix) +{ + bool rc = true; + + for (int i = 0; i < cmds.count(); ++i) + { + QsciCommand *cmd = cmds.at(i); + + QString skey = QString("%1/keymap/c%2/").arg(prefix).arg(static_cast(cmd->command())); + + // Write the key. + qs.setValue(skey + "key", cmd->key()); + + // Write the alternate key. + qs.setValue(skey + "alt", cmd->alternateKey()); + } + + return rc; +} + + +// Clear the key bindings. +void QsciCommandSet::clearKeys() +{ + for (int i = 0; i < cmds.count(); ++i) + cmds.at(i)->setKey(0); +} + + +// Clear the alternate key bindings. +void QsciCommandSet::clearAlternateKeys() +{ + for (int i = 0; i < cmds.count(); ++i) + cmds.at(i)->setAlternateKey(0); +} + + +// Find the command bound to a key. +QsciCommand *QsciCommandSet::boundTo(int key) const +{ + for (int i = 0; i < cmds.count(); ++i) + { + QsciCommand *cmd = cmds.at(i); + + if (cmd->key() == key || cmd->alternateKey() == key) + return cmd; + } + + return 0; +} + + +// Find a command. +QsciCommand *QsciCommandSet::find(QsciCommand::Command command) const +{ + for (int i = 0; i < cmds.count(); ++i) + { + QsciCommand *cmd = cmds.at(i); + + if (cmd->command() == command) + return cmd; + } + + // This should never happen. + return 0; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscidocument.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscidocument.cpp new file mode 100644 index 000000000..895ed3466 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscidocument.cpp @@ -0,0 +1,151 @@ +// This module implements the QsciDocument class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscidocument.h" +#include "Qsci/qsciscintillabase.h" + + +// This internal class encapsulates the underlying document and is shared by +// QsciDocument instances. +class QsciDocumentP +{ +public: + QsciDocumentP() : doc(0), nr_displays(0), nr_attaches(1), modified(false) {} + + void *doc; // The Scintilla document. + int nr_displays; // The number of displays. + int nr_attaches; // The number of attaches. + bool modified; // Set if not at a save point. +}; + + +// The ctor. +QsciDocument::QsciDocument() +{ + pdoc = new QsciDocumentP(); +} + + +// The dtor. +QsciDocument::~QsciDocument() +{ + detach(); +} + + +// The copy ctor. +QsciDocument::QsciDocument(const QsciDocument &that) +{ + attach(that); +} + + +// The assignment operator. +QsciDocument &QsciDocument::operator=(const QsciDocument &that) +{ + if (pdoc != that.pdoc) + { + detach(); + attach(that); + } + + return *this; +} + + +// Attach an existing document to this one. +void QsciDocument::attach(const QsciDocument &that) +{ + ++that.pdoc->nr_attaches; + pdoc = that.pdoc; +} + + +// Detach the underlying document. +void QsciDocument::detach() +{ + if (!pdoc) + return; + + if (--pdoc->nr_attaches == 0) + { + if (pdoc->doc && pdoc->nr_displays == 0) + { + QsciScintillaBase *qsb = QsciScintillaBase::pool(); + + // Release the explicit reference to the document. If the pool is + // empty then we just accept the memory leak. + if (qsb) + qsb->SendScintilla(QsciScintillaBase::SCI_RELEASEDOCUMENT, 0, + pdoc->doc); + } + + delete pdoc; + } + + pdoc = 0; +} + + +// Undisplay and detach the underlying document. +void QsciDocument::undisplay(QsciScintillaBase *qsb) +{ + if (--pdoc->nr_attaches == 0) + delete pdoc; + else if (--pdoc->nr_displays == 0) + { + // Create an explicit reference to the document to keep it alive. + qsb->SendScintilla(QsciScintillaBase::SCI_ADDREFDOCUMENT, 0, pdoc->doc); + } + + pdoc = 0; +} + + +// Display the underlying document. +void QsciDocument::display(QsciScintillaBase *qsb, const QsciDocument *from) +{ + void *ndoc = (from ? from->pdoc->doc : 0); + + // SCI_SETDOCPOINTER appears to reset the EOL mode so save and restore it. + int eol_mode = qsb->SendScintilla(QsciScintillaBase::SCI_GETEOLMODE); + + qsb->SendScintilla(QsciScintillaBase::SCI_SETDOCPOINTER, 0, ndoc); + ndoc = qsb->SendScintillaPtrResult(QsciScintillaBase::SCI_GETDOCPOINTER); + + qsb->SendScintilla(QsciScintillaBase::SCI_SETEOLMODE, eol_mode); + + pdoc->doc = ndoc; + ++pdoc->nr_displays; +} + + +// Return the modified state of the document. +bool QsciDocument::isModified() const +{ + return pdoc->modified; +} + + +// Set the modified state of the document. +void QsciDocument::setModified(bool m) +{ + pdoc->modified = m; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexer.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexer.cpp new file mode 100644 index 000000000..c9576c703 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexer.cpp @@ -0,0 +1,749 @@ +// This module implements the QsciLexer class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexer.h" + +#include +#include +#include +#include + +#include "Qsci/qsciapis.h" +#include "Qsci/qsciscintilla.h" +#include "Qsci/qsciscintillabase.h" + + +// The ctor. +QsciLexer::QsciLexer(QObject *parent) + : QObject(parent), + autoIndStyle(-1), apiSet(0), attached_editor(0) +{ +#if defined(Q_OS_WIN) + defFont = QFont("Verdana", 10); +#elif defined(Q_OS_MAC) + defFont = QFont("Menlo", 12); +#else + defFont = QFont("Bitstream Vera Sans", 9); +#endif + + // Set the default fore and background colours. + QPalette pal = QApplication::palette(); + defColor = pal.text().color(); + defPaper = pal.base().color(); + + // Putting this on the heap means we can keep the style getters const. + style_map = new StyleDataMap; + style_map->style_data_set = false; +} + + +// The dtor. +QsciLexer::~QsciLexer() +{ + delete style_map; +} + + +// Set the attached editor. +void QsciLexer::setEditor(QsciScintilla *editor) +{ + attached_editor = editor; +} + + +// Return the lexer name. +const char *QsciLexer::lexer() const +{ + return 0; +} + + +// Return the lexer identifier. +int QsciLexer::lexerId() const +{ + return QsciScintillaBase::SCLEX_CONTAINER; +} + + +// Return the number of style bits needed by the lexer. +int QsciLexer::styleBitsNeeded() const +{ + return 8; +} + + +// Make sure the style defaults have been set. +void QsciLexer::setStyleDefaults() const +{ + if (!style_map->style_data_set) + { + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + if (!description(i).isEmpty()) + styleData(i); + + style_map->style_data_set = true; + } +} + + +// Return a reference to a style's data, setting up the defaults if needed. +QsciLexer::StyleData &QsciLexer::styleData(int style) const +{ + StyleData &sd = style_map->style_data[style]; + + // See if this is a new style by checking if the colour is valid. + if (!sd.color.isValid()) + { + sd.color = defaultColor(style); + sd.paper = defaultPaper(style); + sd.font = defaultFont(style); + sd.eol_fill = defaultEolFill(style); + } + + return sd; +} + + +// Set the APIs associated with the lexer. +void QsciLexer::setAPIs(QsciAbstractAPIs *apis) +{ + apiSet = apis; +} + + +// Return a pointer to the current APIs if there are any. +QsciAbstractAPIs *QsciLexer::apis() const +{ + return apiSet; +} + + +// Default implementation to return the set of fill up characters that can end +// auto-completion. +const char *QsciLexer::autoCompletionFillups() const +{ + return "("; +} + + +// Default implementation to return the view used for indentation guides. +int QsciLexer::indentationGuideView() const +{ + return QsciScintillaBase::SC_IV_LOOKBOTH; +} + + +// Default implementation to return the list of character sequences that can +// separate auto-completion words. +QStringList QsciLexer::autoCompletionWordSeparators() const +{ + return QStringList(); +} + + +// Default implementation to return the list of keywords that can start a +// block. +const char *QsciLexer::blockStartKeyword(int *) const +{ + return 0; +} + + +// Default implementation to return the list of characters that can start a +// block. +const char *QsciLexer::blockStart(int *) const +{ + return 0; +} + + +// Default implementation to return the list of characters that can end a +// block. +const char *QsciLexer::blockEnd(int *) const +{ + return 0; +} + + +// Default implementation to return the style used for braces. +int QsciLexer::braceStyle() const +{ + return -1; +} + + +// Default implementation to return the number of lines to look back when +// auto-indenting. +int QsciLexer::blockLookback() const +{ + return 20; +} + + +// Default implementation to return the case sensitivity of the language. +bool QsciLexer::caseSensitive() const +{ + return true; +} + + +// Default implementation to return the characters that make up a word. +const char *QsciLexer::wordCharacters() const +{ + return 0; +} + + +// Default implementation to return the style used for whitespace. +int QsciLexer::defaultStyle() const +{ + return 0; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexer::color(int style) const +{ + return styleData(style).color; +} + + +// Returns the background colour of the text for a style. +QColor QsciLexer::paper(int style) const +{ + return styleData(style).paper; +} + + +// Returns the font for a style. +QFont QsciLexer::font(int style) const +{ + return styleData(style).font; +} + + +// Returns the end-of-line fill for a style. +bool QsciLexer::eolFill(int style) const +{ + return styleData(style).eol_fill; +} + + +// Returns the set of keywords. +const char *QsciLexer::keywords(int) const +{ + return 0; +} + + +// Returns the default EOL fill for a style. +bool QsciLexer::defaultEolFill(int) const +{ + return false; +} + + +// Returns the default font for a style. +QFont QsciLexer::defaultFont(int) const +{ + return defaultFont(); +} + + +// Returns the default font. +QFont QsciLexer::defaultFont() const +{ + return defFont; +} + + +// Sets the default font. +void QsciLexer::setDefaultFont(const QFont &f) +{ + defFont = f; +} + + +// Returns the default text colour for a style. +QColor QsciLexer::defaultColor(int) const +{ + return defaultColor(); +} + + +// Returns the default text colour. +QColor QsciLexer::defaultColor() const +{ + return defColor; +} + + +// Sets the default text colour. +void QsciLexer::setDefaultColor(const QColor &c) +{ + defColor = c; +} + + +// Returns the default paper colour for a styles. +QColor QsciLexer::defaultPaper(int) const +{ + return defaultPaper(); +} + + +// Returns the default paper colour. +QColor QsciLexer::defaultPaper() const +{ + return defPaper; +} + + +// Sets the default paper colour. +void QsciLexer::setDefaultPaper(const QColor &c) +{ + defPaper = c; + + // Normally the default values are only intended to provide defaults when a + // lexer is first setup because once a style has been referenced then a + // copy of the default is made. However the default paper is a special + // case because there is no other way to set the background colour used + // where there is no text. Therefore we also actively set it. + setPaper(c, QsciScintillaBase::STYLE_DEFAULT); +} + + +// Read properties from the settings. +bool QsciLexer::readProperties(QSettings &,const QString &) +{ + return true; +} + + +// Refresh all properties. +void QsciLexer::refreshProperties() +{ +} + + +// Write properties to the settings. +bool QsciLexer::writeProperties(QSettings &,const QString &) const +{ + return true; +} + + +// Restore the user settings. +bool QsciLexer::readSettings(QSettings &qs,const char *prefix) +{ + bool ok, flag, rc = true; + int num; + QString key, full_key; + QStringList fdesc; + + setStyleDefaults(); + + // Read the styles. + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + { + // Ignore invalid styles. + if (description(i).isEmpty()) + continue; + + key = QString("%1/%2/style%3/").arg(prefix).arg(language()).arg(i); + + // Read the foreground colour. + full_key = key + "color"; + + ok = qs.contains(full_key); + num = qs.value(full_key).toInt(); + + if (ok) + setColor(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i); + else + rc = false; + + // Read the end-of-line fill. + full_key = key + "eolfill"; + + ok = qs.contains(full_key); + flag = qs.value(full_key, false).toBool(); + + if (ok) + setEolFill(flag, i); + else + rc = false; + + // Read the font. First try the deprecated format that uses an integer + // point size. + full_key = key + "font"; + + ok = qs.contains(full_key); + fdesc = qs.value(full_key).toStringList(); + + if (ok && fdesc.count() == 5) + { + QFont f; + + f.setFamily(fdesc[0]); + f.setPointSize(fdesc[1].toInt()); + f.setBold(fdesc[2].toInt()); + f.setItalic(fdesc[3].toInt()); + f.setUnderline(fdesc[4].toInt()); + + setFont(f, i); + } + else + rc = false; + + // Now try the newer font format that uses a floating point point size. + // It is not an error if it doesn't exist. + full_key = key + "font2"; + + ok = qs.contains(full_key); + fdesc = qs.value(full_key).toStringList(); + + if (ok) + { + // Allow for future versions with more fields. + if (fdesc.count() >= 5) + { + QFont f; + + f.setFamily(fdesc[0]); + f.setPointSizeF(fdesc[1].toDouble()); + f.setBold(fdesc[2].toInt()); + f.setItalic(fdesc[3].toInt()); + f.setUnderline(fdesc[4].toInt()); + + setFont(f, i); + } + else + { + rc = false; + } + } + + // Read the background colour. + full_key = key + "paper"; + + ok = qs.contains(full_key); + num = qs.value(full_key).toInt(); + + if (ok) + setPaper(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i); + else + rc = false; + } + + // Read the properties. + key = QString("%1/%2/properties/").arg(prefix).arg(language()); + + if (!readProperties(qs,key)) + rc = false; + + refreshProperties(); + + // Read the rest. + key = QString("%1/%2/").arg(prefix).arg(language()); + + // Read the default foreground colour. + full_key = key + "defaultcolor"; + + ok = qs.contains(full_key); + num = qs.value(full_key).toInt(); + + if (ok) + setDefaultColor(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff)); + else + rc = false; + + // Read the default background colour. + full_key = key + "defaultpaper"; + + ok = qs.contains(full_key); + num = qs.value(full_key).toInt(); + + if (ok) + setDefaultPaper(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff)); + else + rc = false; + + // Read the default font. First try the deprecated format that uses an + // integer point size. + full_key = key + "defaultfont"; + + ok = qs.contains(full_key); + fdesc = qs.value(full_key).toStringList(); + + if (ok && fdesc.count() == 5) + { + QFont f; + + f.setFamily(fdesc[0]); + f.setPointSize(fdesc[1].toInt()); + f.setBold(fdesc[2].toInt()); + f.setItalic(fdesc[3].toInt()); + f.setUnderline(fdesc[4].toInt()); + + setDefaultFont(f); + } + else + rc = false; + + // Now try the newer font format that uses a floating point point size. It + // is not an error if it doesn't exist. + full_key = key + "defaultfont2"; + + ok = qs.contains(full_key); + fdesc = qs.value(full_key).toStringList(); + + if (ok) + { + // Allow for future versions with more fields. + if (fdesc.count() >= 5) + { + QFont f; + + f.setFamily(fdesc[0]); + f.setPointSizeF(fdesc[1].toDouble()); + f.setBold(fdesc[2].toInt()); + f.setItalic(fdesc[3].toInt()); + f.setUnderline(fdesc[4].toInt()); + + setDefaultFont(f); + } + else + { + rc = false; + } + } + + full_key = key + "autoindentstyle"; + + ok = qs.contains(full_key); + num = qs.value(full_key).toInt(); + + if (ok) + setAutoIndentStyle(num); + else + rc = false; + + return rc; +} + + +// Save the user settings. +bool QsciLexer::writeSettings(QSettings &qs,const char *prefix) const +{ + bool rc = true; + QString key, fmt("%1"); + int num; + QStringList fdesc; + + setStyleDefaults(); + + // Write the styles. + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + { + // Ignore invalid styles. + if (description(i).isEmpty()) + continue; + + QColor c; + + key = QString("%1/%2/style%3/").arg(prefix).arg(language()).arg(i); + + // Write the foreground colour. + c = color(i); + num = (c.red() << 16) | (c.green() << 8) | c.blue(); + + qs.setValue(key + "color", num); + + // Write the end-of-line fill. + qs.setValue(key + "eolfill", eolFill(i)); + + // Write the font using the deprecated format. + QFont f = font(i); + + fdesc.clear(); + fdesc += f.family(); + fdesc += fmt.arg(f.pointSize()); + + // The casts are for Borland. + fdesc += fmt.arg((int)f.bold()); + fdesc += fmt.arg((int)f.italic()); + fdesc += fmt.arg((int)f.underline()); + + qs.setValue(key + "font", fdesc); + + // Write the font using the newer format. + fdesc[1] = fmt.arg(f.pointSizeF()); + + qs.setValue(key + "font2", fdesc); + + // Write the background colour. + c = paper(i); + num = (c.red() << 16) | (c.green() << 8) | c.blue(); + + qs.setValue(key + "paper", num); + } + + // Write the properties. + key = QString("%1/%2/properties/").arg(prefix).arg(language()); + + if (!writeProperties(qs,key)) + rc = false; + + // Write the rest. + key = QString("%1/%2/").arg(prefix).arg(language()); + + // Write the default foreground colour. + num = (defColor.red() << 16) | (defColor.green() << 8) | defColor.blue(); + + qs.setValue(key + "defaultcolor", num); + + // Write the default background colour. + num = (defPaper.red() << 16) | (defPaper.green() << 8) | defPaper.blue(); + + qs.setValue(key + "defaultpaper", num); + + // Write the default font using the deprecated format. + fdesc.clear(); + fdesc += defFont.family(); + fdesc += fmt.arg(defFont.pointSize()); + + // The casts are for Borland. + fdesc += fmt.arg((int)defFont.bold()); + fdesc += fmt.arg((int)defFont.italic()); + fdesc += fmt.arg((int)defFont.underline()); + + qs.setValue(key + "defaultfont", fdesc); + + // Write the font using the newer format. + fdesc[1] = fmt.arg(defFont.pointSizeF()); + + qs.setValue(key + "defaultfont2", fdesc); + + qs.setValue(key + "autoindentstyle", autoIndStyle); + + return rc; +} + + +// Return the auto-indentation style. +int QsciLexer::autoIndentStyle() +{ + // We can't do this in the ctor because we want the virtuals to work. + if (autoIndStyle < 0) + autoIndStyle = (blockStartKeyword() || blockStart() || blockEnd()) ? + 0 : QsciScintilla::AiMaintain; + + return autoIndStyle; +} + + +// Set the auto-indentation style. +void QsciLexer::setAutoIndentStyle(int autoindentstyle) +{ + autoIndStyle = autoindentstyle; +} + + +// Set the foreground colour for a style. +void QsciLexer::setColor(const QColor &c, int style) +{ + if (style >= 0) + { + styleData(style).color = c; + emit colorChanged(c, style); + } + else + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + if (!description(i).isEmpty()) + setColor(c, i); +} + + +// Set the end-of-line fill for a style. +void QsciLexer::setEolFill(bool eolfill, int style) +{ + if (style >= 0) + { + styleData(style).eol_fill = eolfill; + emit eolFillChanged(eolfill, style); + } + else + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + if (!description(i).isEmpty()) + setEolFill(eolfill, i); +} + + +// Set the font for a style. +void QsciLexer::setFont(const QFont &f, int style) +{ + if (style >= 0) + { + styleData(style).font = f; + emit fontChanged(f, style); + } + else + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + if (!description(i).isEmpty()) + setFont(f, i); +} + + +// Set the background colour for a style. +void QsciLexer::setPaper(const QColor &c, int style) +{ + if (style >= 0) + { + styleData(style).paper = c; + emit paperChanged(c, style); + } + else + { + for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i) + if (!description(i).isEmpty()) + setPaper(c, i); + + emit paperChanged(c, QsciScintillaBase::STYLE_DEFAULT); + } +} + + +// Encode a QString as bytes. +QByteArray QsciLexer::textAsBytes(const QString &text) const +{ + Q_ASSERT(attached_editor); + + return attached_editor->textAsBytes(text); +} + + +// Decode bytes as a QString. +QString QsciLexer::bytesAsText(const char *bytes, int size) const +{ + Q_ASSERT(attached_editor); + + return attached_editor->bytesAsText(bytes, size); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerasm.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerasm.cpp new file mode 100644 index 000000000..237564411 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerasm.cpp @@ -0,0 +1,575 @@ +// This module implements the abstract QsciLexerAsm class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerasm.h" + +#include +#include +#include + + +// The ctor. Note that we choose not to support explicit fold points. +QsciLexerAsm::QsciLexerAsm(QObject *parent) + : QsciLexer(parent), + fold_comments(true), fold_compact(true), comment_delimiter('~'), + fold_syntax_based(true) +{ +} + + +// The dtor. +QsciLexerAsm::~QsciLexerAsm() +{ +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerAsm::defaultColor(int style) const +{ + switch (style) + { + case Comment: + case BlockComment: + return QColor(0x00, 0x7f, 0x00); + + case Number: + return QColor(0x00, 0x7f, 0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + return QColor(0x7f, 0x00, 0x7f); + + case Operator: + case UnclosedString: + return QColor(0x00, 0x00, 0x00); + + case CPUInstruction: + return QColor(0x00, 0x00, 0x7f); + + case FPUInstruction: + case Directive: + case DirectiveOperand: + return QColor(0x00, 0x00, 0xff); + + case Register: + return QColor(0x46, 0xaa, 0x03); + + case ExtendedInstruction: + return QColor(0xb0, 0x00, 0x40); + + case CommentDirective: + return QColor(0x66, 0xaa, 0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerAsm::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerAsm::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Operator: + case CPUInstruction: + case Register: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case Comment: + case BlockComment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerAsm::defaultPaper(int style) const +{ + if (style == UnclosedString) + return QColor(0xe0, 0xc0, 0xe0); + + return QsciLexer::defaultPaper(style); +} + + +// Returns the set of keywords. +const char *QsciLexerAsm::keywords(int set) const +{ + if (set == 1) + return + "aaa aad aam aas daa das " + "ja jae jb jbe jc jcxz je jg jge jl jle jmp jna jnae jnb jnbe jnc " + "jne jng jnge jnl jnle jno jnp jns jnz jo jp jpe jpo js jz jcxz " + "jecxz jrcxz loop loope loopne loopz loopnz call ret " + "add sub adc sbb neg cmp inc dec and or xor not test shl shr sal " + "sar shld shrd rol ror rcl rcr cbw cwd cwde cdq cdqe cqo bsf bsr " + "bt btc btr bts idiv imul div mul bswap nop " + "lea mov movsx movsxd movzx xlatb bound xchg xadd cmpxchg " + "cmpxchg8b cmpxchg16b " + "push pop pushad popad pushf popf pushfd popfd pushfq popfq " + "seta setae setb setbe setc sete setg setge setl setle setna " + "setnae setnb setnbe setnc setne setng setnge setnl setnle setno " + "setnp setns setnz seto setp setpe setpo sets setz salc " + "clc cld stc std cmc lahf sahf " + "cmovo cmovno cmovb cmovc cmovnae cmovae cmovnb cmovnc cmove " + "cmovz cmovne cmovnz cmovbe cmovna cmova cmovnbe cmovs cmovns " + "cmovp cmovpe cmovnp cmovpo cmovl cmovnge cmovge cmovnl cmovle " + "cmovng cmovg cmovnle " + "lock rep repe repz repne repnz " + "cmpsb cmpsw cmpsq movsb movsw movsq scasb scasw scasd scasq " + "stosb stosw stosd stosq " + "cpuid rdtsc rdtscp rdpmc xgetbv " + "llwpcb slwpcb lwpval lwpins " + "crc32 popcnt lzcnt tzcnt movbe pclmulqdq rdrand " + "andn bextr blsi blsmk blsr " + "bzhi mulx pdep pext rorx sarx shlx shrx"; + + if (set == 2) + return + "f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcom fcomp fcompp " + "fdecstp fdisi fdiv fdivp fdivr fdivrp feni ffree fiadd ficom " + "ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisub " + "fisubr fld fld1 fldcw fldenv fldenvw fldl2e fldl2t fldlg2 fldln2 " + "fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave " + "fnsavew fnstcw fnstenv fnstenvw fnstsw fpatan fprem fptan " + "frndint frstor frstorw fsave fsavew fscale fsqrt fst fstcw " + "fstenv fstenvw fstp fstsw fsub fsubp fsubr fsubrp ftst fwait " + "fxam fxch fxtract fyl2x fyl2xp1 fsetpm fcos fldenvd fnsaved " + "fnstenvd fprem1 frstord fsaved fsin fsincos fstenvd fucom fucomp " + "fucompp fcomi fcomip fucomi fucomip ffreep fcmovb fcmove fcmovbe " + "fcmovu fcmovnb fcmovne fcmovnbe fcmovnu"; + + if (set == 3) + return + "al ah bl bh cl ch dl dh ax bx cx dx si di bp eax ebx ecx edx esi " + "edi ebx esp st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 " + "mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 ymm0 ymm1 " + "ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 fs " + "sil dil bpl r8b r9b r10b r11b r12b r13b r14b r15b r8w r9w r10w " + "r11w r12w r13w r14w r15w rax rcx rdx rbx rsp rbp rsi rdi r8 r9 " + "r10 r11 r12 r13 r14 r15 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 " + "xmm15 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 gs"; + + if (set == 4) + return + "db dw dd dq dt do dy resb resw resd resq rest reso resy incbin " + "equ times safeseh __utf16__ __utf32__ %+ default cpu float start " + "imagebase osabi ..start ..imagebase ..gotpc ..gotoff ..gottpoff " + "..got ..plt ..sym ..tlsie section segment __sect__ group " + "absolute .bss .comment .data .lbss .ldata .lrodata .rdata " + ".rodata .tbss .tdata .text alloc bss code exec data noalloc " + "nobits noexec nowrite progbits rdata tls write private public " + "common stack overlay class extern global common import export " + "%define %idefine %xdefine %ixdefine %assign %undef %? %?? " + "%defstr %idefstr %deftok %ideftok %strcat %strlen %substr %macro " + "%imacro %rmacro %exitmacro %endmacro %unmacro %if %ifn %elif " + "%elifn %else %endif %ifdef %ifndef %elifdef %elifndef %ifmacro " + "%ifnmacro %elifmacro %elifnmacro %ifctx %ifnctx %elifctx " + "%elifnctx %ifidn %ifnidn %elifidn %elifnidn %ifidni %ifnidni " + "%elifidni %elifnidni %ifid %ifnid %elifid %elifnid %ifnum " + "%ifnnum %elifnum %elifnnum %ifstr %ifnstr %elifstr %elifnstr " + "%iftoken %ifntoken %eliftoken %elifntoken %ifempty %elifempty " + "%ifnempty %elifnempty %ifenv %ifnenv %elifenv %elifnenv %rep " + "%exitrep %endrep %while %exitwhile %endwhile %include " + "%pathsearch %depend %use %push %pop %repl %arg %local %stacksize " + "flat flat64 large small %error %warning %fatal %00 .nolist " + "%rotate %line %! %final %clear struc endstruc istruc at iend " + "align alignb sectalign bits use16 use32 use64 __nasm_major__ " + "__nasm_minor__ __nasm_subminor__ ___nasm_patchlevel__ " + "__nasm_version_id__ __nasm_ver__ __file__ __line__ __pass__ " + "__bits__ __output_format__ __date__ __time__ __date_num__ " + "__time_num__ __posix_time__ __utc_date__ __utc_time__ " + "__utc_date_num__ __utc_time_num__ __float_daz__ __float_round__ " + "__float__ __use_altreg__ altreg __use_smartalign__ smartalign " + "__alignmode__ __use_fp__ __infinity__ __nan__ __qnan__ __snan__ " + "__float8__ __float16__ __float32__ __float64__ __float80m__ " + "__float80e__ __float128l__ __float128h__"; + + if (set == 5) + return + "a16 a32 a64 o16 o32 o64 strict byte word dword qword tword oword " + "yword nosplit %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 abs rel $ $$ seg wrt"; + + if (set == 6) + return + "movd movq paddb paddw paddd paddsb paddsw paddusb paddusw psubb " + "psubw psubd psubsb psubsw psubusb psubusw pand pandn por pxor " + "pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pmaddwd pmulhw " + "pmullw psllw pslld psllq psrlw psrld psrlq psraw psrad packuswb " + "packsswb packssdw punpcklbw punpcklwd punpckldq punpckhbw " + "punpckhwd punpckhdq emms " + "pavgb pavgw pextrw pinsrw pmovmskb pmaxsw pmaxub pminsw pminub " + "pmulhuw psadbw pshufw prefetchnta prefetcht0 prefetcht1 " + "prefetcht2 maskmovq movntq sfence " + "paddsiw psubsiw pmulhrw pmachriw pmulhriw pmagw pdistib paveb " + "pmvzb pmvnzb pmvlzb pmvgezb " + "pfacc pfadd pfsub pfsubr pfmul pfcmpeq pfcmpge pfcmpgt pfmax " + "pfmin pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pi2fd pf2id " + "pavgusb pmulhrw femms " + "pfnacc pfpnacc pi2fw pf2iw pswapd " + "pfrsqrtv pfrcpv " + "prefetch prefetchw " + "addss addps subss subps mulss mulps divss divps sqrtss sqrtps " + "rcpss rcpps rsqrtss rsqrtps maxss maxps minss minps cmpss comiss " + "ucomiss cmpps cmpeqss cmpltss cmpless cmpunordss cmpneqss " + "cmpnltss cmpnless cmpordss cmpeqps cmpltps cmpleps cmpunordps " + "cmpneqps cmpnltps cmpnleps cmpordps andnps andps orps xorps " + "cvtsi2ss cvtss2si cvttss2si cvtpi2ps cvtps2pi cvttps2pi movss " + "movlps movhps movlhps movhlps movaps movups movntps movmskps " + "shufps unpckhps unpcklps ldmxcsr stmxcsr " + "addpd addsd subpd subsd mulsd mulpd divsd divpd sqrtsd sqrtpd " + "maxsd maxpd minsd minpd cmpsd comisd ucomisd cmppd cmpeqsd " + "cmpltsd cmplesd cmpunordsd cmpneqsd cmpnltsd cmpnlesd cmpordsd " + "cmpeqpd cmpltpd cmplepd cmpunordpd cmpneqpd cmpnltpd cmpnlepd " + "cmpordpd andnpd andpd orpd xorpd cvtsd2ss cvtpd2ps cvtss2sd " + "cvtps2pd cvtdq2ps cvtps2dq cvttps2dq cvtdq2pd cvtpd2dq cvttpd2dq " + "cvtsi2sd cvtsd2si cvttsd2si cvtpi2pd cvtpd2pi cvttpd2pi movsd " + "movlpd movhpd movapd movupd movntpd movmskpd shufpd unpckhpd " + "unpcklpd movnti movdqa movdqu movntdq maskmovdqu movdq2q movq2dq " + "paddq psubq pmuludq pslldq psrldq punpcklqdq punpckhqdq pshufhw " + "pshuflw pshufd lfence mfence " + "addsubps addsubpd haddps haddpd hsubps hsubpd movsldup movshdup " + "movddup lddqu fisttp " + "psignb psignw psignd pabsb pabsw pabsd palignr pshufb pmulhrsw " + "pmaddubsw phaddw phaddd phaddsw phsubw phsubd phsubsw " + "extrq insertq movntsd movntss " + "mpsadbw phminposuw pmuldq pmulld dpps dppd blendps blendpd " + "blendvps blendvpd pblendvb pblendw pmaxsb pmaxuw pmaxsd pmaxud " + "pminsb pminuw pminsd pminud roundps roundss roundpd roundsd " + "insertps pinsrb pinsrd pinsrq extractps pextrb pextrd pextrq " + "pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw " + "pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq ptest pcmpeqq " + "packusdw movntdqa " + "pcmpgtq pcmpestri pcmpestrm pcmpistri pcmpistrm " + "aesenc aesenclast aesdec aesdeclast aeskeygenassist aesimc " + "xcryptcbc xcryptcfb xcryptctr xcryptecb xcryptofb xsha1 xsha256 " + "montmul xstore " + "vaddss vaddps vaddsd vaddpd vsubss vsubps vsubsd vsubpd " + "vaddsubps vaddsubpd vhaddps vhaddpd vhsubps vhsubpd vmulss " + "vmulps vmulsd vmulpd vmaxss vmaxps vmaxsd vmaxpd vminss vminps " + "vminsd vminpd vandps vandpd vandnps vandnpd vorps vorpd vxorps " + "vxorpd vblendps vblendpd vblendvps vblendvpd vcmpss vcomiss " + "vucomiss vcmpsd vcomisd vucomisd vcmpps vcmppd vcmpeqss vcmpltss " + "vcmpless vcmpunordss vcmpneqss vcmpnltss vcmpnless vcmpordss " + "vcmpeq_uqss vcmpngess vcmpngtss vcmpfalsess vcmpneq_oqss " + "vcmpgess vcmpgtss vcmptruess vcmpeq_osss vcmplt_oqss vcmple_oqss " + "vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss " + "vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss " + "vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpeqps " + "vcmpltps vcmpleps vcmpunordps vcmpneqps vcmpnltps vcmpnleps " + "vcmpordps vcmpeq_uqps vcmpngeps vcmpngtps vcmpfalseps " + "vcmpneq_oqps vcmpgeps vcmpgtps vcmptrueps vcmpeq_osps " + "vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps " + "vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps " + "vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps " + "vcmptrue_usps vcmpeqsd vcmpltsd vcmplesd vcmpunordsd vcmpneqsd " + "vcmpnltsd vcmpnlesd vcmpordsd vcmpeq_uqsd vcmpngesd vcmpngtsd " + "vcmpfalsesd vcmpneq_oqsd vcmpgesd vcmpgtsd vcmptruesd " + "vcmpeq_ossd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd " + "vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd " + "vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd " + "vcmptrue_ussd vcmpeqpd vcmpltpd vcmplepd vcmpunordpd vcmpneqpd " + "vcmpnltpd vcmpnlepd vcmpordpd vcmpeq_uqpd vcmpngepd vcmpngtpd " + "vcmpfalsepd vcmpneq_oqpd vcmpgepd vcmpgtpd vcmptruepd " + "vcmpeq_ospd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd " + "vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd " + "vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd " + "vcmptrue_uspd vcvtsd2ss vcvtpd2ps vcvtss2sd vcvtps2pd vcvtsi2ss " + "vcvtss2si vcvttss2si vcvtpi2ps vcvtps2pi vcvttps2pi vcvtdq2ps " + "vcvtps2dq vcvttps2dq vcvtdq2pd vcvtpd2dq vcvttpd2dq vcvtsi2sd " + "vcvtsd2si vcvttsd2si vcvtpi2pd vcvtpd2pi vcvttpd2pi vdivss " + "vdivps vdivsd vdivpd vsqrtss vsqrtps vsqrtsd vsqrtpd vdpps vdppd " + "vmaskmovps vmaskmovpd vmovss vmovsd vmovaps vmovapd vmovups " + "vmovupd vmovntps vmovntpd vmovhlps vmovlhps vmovlps vmovlpd " + "vmovhps vmovhpd vmovsldup vmovshdup vmovddup vmovmskps vmovmskpd " + "vroundss vroundps vroundsd vroundpd vrcpss vrcpps vrsqrtss " + "vrsqrtps vunpcklps vunpckhps vunpcklpd vunpckhpd vbroadcastss " + "vbroadcastsd vbroadcastf128 vextractps vinsertps vextractf128 " + "vinsertf128 vshufps vshufpd vpermilps vpermilpd vperm2f128 " + "vtestps vtestpd vpaddb vpaddusb vpaddsb vpaddw vpaddusw vpaddsw " + "vpaddd vpaddq vpsubb vpsubusb vpsubsb vpsubw vpsubusw vpsubsw " + "vpsubd vpsubq vphaddw vphaddsw vphaddd vphsubw vphsubsw vphsubd " + "vpsllw vpslld vpsllq vpsrlw vpsrld vpsrlq vpsraw vpsrad vpand " + "vpandn vpor vpxor vpblendwb vpblendw vpsignb vpsignw vpsignd " + "vpavgb vpavgw vpabsb vpabsw vpabsd vmovd vmovq vmovdqa vmovdqu " + "vlddqu vmovntdq vmovntdqa vmaskmovdqu vpmovsxbw vpmovsxbd " + "vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd " + "vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpackuswb vpacksswb " + "vpackusdw vpackssdw vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb " + "vpcmpgtw vpcmpgtd vpcmpgtq vpmaddubsw vpmaddwd vpmullw vpmulhuw " + "vpmulhw vpmulhrsw vpmulld vpmuludq vpmuldq vpmaxub vpmaxsb " + "vpmaxuw vpmaxsw vpmaxud vpmaxsd vpminub vpminsb vpminuw vpminsw " + "vpminud vpminsd vpmovmskb vptest vpunpcklbw vpunpcklwd " + "vpunpckldq vpunpcklqdq vpunpckhbw vpunpckhwd vpunpckhdq " + "vpunpckhqdq vpslldq vpsrldq vpalignr vpshufb vpshuflw vpshufhw " + "vpshufd vpextrb vpextrw vpextrd vpextrq vpinsrb vpinsrw vpinsrd " + "vpinsrq vpsadbw vmpsadbw vphminposuw vpcmpestri vpcmpestrm " + "vpcmpistri vpcmpistrm vpclmulqdq vaesenc vaesenclast vaesdec " + "vaesdeclast vaeskeygenassist vaesimc vldmxcsr vstmxcsr vzeroall " + "vzeroupper " + "vbroadcasti128 vpbroadcastb vpbroadcastw vpbroadcastd " + "vpbroadcastq vpblendd vpermd vpermq vperm2i128 vextracti128 " + "vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd " + "vpsrlvd vpsrldq vpgatherdd vpgatherqd vgatherdq vgatherqq " + "vpermps vpermpd vgatherdpd vgatherqpd vgatherdps vgatherqps " + "vfrczss vfrczps vfrczsd vfrczpd vpermil2ps vperlil2pd vtestps " + "vtestpd vpcomub vpcomb vpcomuw vpcomw vpcomud vpcomd vpcomuq " + "vpcomq vphaddubw vphaddbw vphaddubd vphaddbd vphaddubq vphaddbq " + "vphadduwd vphaddwd vphadduwq vphaddwq vphaddudq vphadddq " + "vphsubbw vphsubwd vphsubdq vpmacsdd vpmacssdd vpmacsdql " + "vpmacssdql vpmacsdqh vpmacssdqh vpmacsww vpmacssww vpmacswd " + "vpmacsswd vpmadcswd vpmadcsswd vpcmov vpperm vprotb vprotw " + "vprotd vprotq vpshab vpshaw vpshad vpshaq vpshlb vpshlw vpshld " + "vpshlq " + "vcvtph2ps vcvtps2ph " + "vfmaddss vfmaddps vfmaddsd vfmaddpd vfmsubss vfmsubps vfmsubsd " + "vfmsubpd vnfmaddss vnfmaddps vnfmaddsd vnfmaddpd vnfmsubss " + "vnfmsubps vnfmsubsd vnfmsubpd vfmaddsubps vfmaddsubpd " + "vfmsubaddps vfmsubaddpd " + "vfmadd132ss vfmadd213ss vfmadd231ss vfmadd132ps vfmadd213ps " + "vfmadd231ps vfmadd132sd vfmadd213sd vfmadd231sd vfmadd132pd " + "vfmadd213pd vfmadd231pd vfmaddsub132ps vfmaddsub213ps " + "vfmaddsub231ps vfmaddsub132pd vfmaddsub213pd vfmaddsub231pd " + "vfmsubadd132ps vfmsubadd213ps vfmsubadd231ps vfmsubadd132pd " + "vfmsubadd213pd vfmsubadd231pd vfmsub132ss vfmsub213ss " + "vfmsub231ss vfmsub132ps vfmsub213ps vfmsub231ps vfmsub132sd " + "vfmsub213sd vfmsub231sd vfmsub132pd vfmsub213pd vfmsub231pd " + "vfnmadd132ss vfnmadd213ss vfnmadd231ss vfnmadd132ps vfnmadd213ps " + "vfnmadd231ps vfnmadd132sd vfnmadd213sd vfnmadd231sd vfnmadd132pd " + "vfnmadd213pd vfnmadd231pd vfnmsub132ss vfnmsub213ss vfnmsub231ss " + "vfnmsub132ps vfnmsub213ps vfnmsub231ps vfnmsub132sd vfnmsub213sd " + "vfnmsub231sd vfnmsub132pd vfnmsub213pd vfnmsub231pd"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerAsm::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Number: + return tr("Number"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case CPUInstruction: + return tr("CPU instruction"); + + case FPUInstruction: + return tr("FPU instruction"); + + case Register: + return tr("Register"); + + case Directive: + return tr("Directive"); + + case DirectiveOperand: + return tr("Directive operand"); + + case BlockComment: + return tr("Block comment"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case UnclosedString: + return tr("Unclosed string"); + + case ExtendedInstruction: + return tr("Extended instruction"); + + case CommentDirective: + return tr("Comment directive"); + } + + return QString(); +} + + +// Refresh all properties. +void QsciLexerAsm::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setCommentDelimiterProp(); + setSyntaxBasedProp(); +} + + +// Read properties from the settings. +bool QsciLexerAsm::readProperties(QSettings &qs,const QString &prefix) +{ + fold_comments = qs.value(prefix + "foldcomments", true).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + comment_delimiter = qs.value(prefix + "commentdelimiter", + QChar('~')).toChar(); + fold_syntax_based = qs.value(prefix + "foldsyntaxbased", true).toBool(); + + return true; +} + + +// Write properties to the settings. +bool QsciLexerAsm::writeProperties(QSettings &qs,const QString &prefix) const +{ + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "commentdelimiter", comment_delimiter); + qs.setValue(prefix + "foldsyntaxbased", fold_syntax_based); + + return true; +} + + +// Return true if comments can be folded. +bool QsciLexerAsm::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerAsm::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.asm.comment.multiline" property. +void QsciLexerAsm::setCommentProp() +{ + emit propertyChanged("fold.asm.comment.multiline", + (fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerAsm::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact. +void QsciLexerAsm::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerAsm::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} + + +// Return the comment delimiter. +QChar QsciLexerAsm::commentDelimiter() const +{ + return comment_delimiter; +} + + +// Set the comment delimiter. +void QsciLexerAsm::setCommentDelimiter(QChar delimiter) +{ + comment_delimiter = delimiter; + + setCommentDelimiterProp(); +} + + +// Set the "lexer.asm.comment.delimiter" property. +void QsciLexerAsm::setCommentDelimiterProp() +{ + emit propertyChanged("lexer.asm.comment.delimiter", + textAsBytes(QString(comment_delimiter)).constData()); +} + + +// Return true if folds are syntax-based. +bool QsciLexerAsm::foldSyntaxBased() const +{ + return fold_syntax_based; +} + + +// Set if folds are syntax-based. +void QsciLexerAsm::setFoldSyntaxBased(bool syntax_based) +{ + fold_syntax_based = syntax_based; + + setSyntaxBasedProp(); +} + + +// Set the "fold.asm.syntax.based" property. +void QsciLexerAsm::setSyntaxBasedProp() +{ + emit propertyChanged("fold.asm.syntax.based", + (fold_syntax_based ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeravs.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeravs.cpp new file mode 100644 index 000000000..b741b072d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeravs.cpp @@ -0,0 +1,414 @@ +// This module implements the QsciLexerAVS class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexeravs.h" + +#include +#include +#include + + +// The ctor. +QsciLexerAVS::QsciLexerAVS(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerAVS::~QsciLexerAVS() +{ +} + + +// Returns the language name. +const char *QsciLexerAVS::language() const +{ + return "AVS"; +} + + +// Returns the lexer name. +const char *QsciLexerAVS::lexer() const +{ + return "avs"; +} + + +// Return the style used for braces. +int QsciLexerAVS::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerAVS::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerAVS::defaultColor(int style) const +{ + switch (style) + { + case Default: + case Operator: + return QColor(0x00, 0x00, 0x00); + + case BlockComment: + case NestedBlockComment: + case LineComment: + return QColor(0x00, 0x7f, 0x00); + + case Number: + case Function: + return QColor(0x00, 0x7f, 0x7f); + + case String: + case TripleString: + return QColor(0x7f, 0x00, 0x7f); + + case Keyword: + case Filter: + case ClipProperty: + return QColor(0x00, 0x00, 0x7f); + + case Plugin: + return QColor(0x00, 0x80, 0xc0); + + case KeywordSet6: + return QColor(0x80, 0x00, 0xff); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerAVS::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case BlockComment: + case NestedBlockComment: + case LineComment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS", 9); +#elif defined(Q_OS_MAC) + f = QFont("Georgia", 13); +#else + f = QFont("Bitstream Vera Serif", 9); +#endif + break; + + case Keyword: + case Filter: + case Plugin: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerAVS::keywords(int set) const +{ + if (set == 1) + return "true false return global"; + + if (set == 2) + return + "addborders alignedsplice amplify amplifydb animate applyrange " + "assumebff assumefieldbased assumefps assumeframebased " + "assumesamplerate assumescaledfps assumetff audiodub audiodubex " + "avifilesource avisource bicubicresize bilinearresize " + "blackmanresize blackness blankclip blur bob cache changefps " + "colorbars colorkeymask coloryuv compare complementparity " + "conditionalfilter conditionalreader convertaudio " + "convertaudioto16bit convertaudioto24bit convertaudioto32bit " + "convertaudioto8bit convertaudiotofloat convertbacktoyuy2 " + "convertfps converttobackyuy2 converttomono converttorgb " + "converttorgb24 converttorgb32 converttoy8 converttoyv16 " + "converttoyv24 converttoyv411 converttoyuy2 converttoyv12 crop " + "cropbottom delayaudio deleteframe dissolve distributor " + "doubleweave duplicateframe ensurevbrmp3sync fadein fadein0 " + "fadein2 fadeio fadeio0 fadeio2 fadeout fadeout0 fadeout2 " + "fixbrokenchromaupsampling fixluminance fliphorizontal " + "flipvertical frameevaluate freezeframe gaussresize " + "generalconvolution getchannel getchannels getmtmode getparity " + "grayscale greyscale histogram horizontalreduceby2 imagereader " + "imagesource imagewriter info interleave internalcache " + "internalcachemt invert killaudio killvideo lanczos4resize " + "lanczosresize layer letterbox levels limiter loop mask maskhs " + "max merge mergeargb mergechannels mergechroma mergeluma mergergb " + "messageclip min mixaudio monotostereo normalize null " + "opendmlsource overlay peculiarblend pointresize pulldown " + "reduceby2 resampleaudio resetmask reverse rgbadjust scriptclip " + "segmentedavisource segmenteddirectshowsource selecteven " + "selectevery selectodd selectrangeevery separatefields setmtmode " + "sharpen showalpha showblue showfiveversions showframenumber " + "showgreen showred showsmpte showtime sincresize skewrows " + "spatialsoften spline16resize spline36resize spline64resize ssrc " + "stackhorizontal stackvertical subtitle subtract supereq " + "swapfields swapuv temporalsoften timestretch tone trim turn180 " + "turnleft turnright tweak unalignedsplice utoy utoy8 version " + "verticalreduceby2 vtoy vtoy8 wavsource weave writefile " + "writefileend writefileif writefilestart ytouv"; + + if (set == 3) + return + "addgrain addgrainc agc_hdragc analyzelogo animeivtc asharp " + "audiograph autocrop autoyuy2 avsrecursion awarpsharp " + "bassaudiosource bicublinresize bifrost binarize blendfields " + "blindpp blockbuster bordercontrol cfielddiff cframediff " + "chromashift cnr2 colormatrix combmask contra convolution3d " + "convolution3dyv12 dctfilter ddcc deblendlogo deblock deblock_qed " + "decimate decomb dedup deen deflate degrainmedian depan " + "depanestimate depaninterleave depanscenes depanstabilize " + "descratch despot dfttest dgbob dgsource directshowsource " + "distancefunction dss2 dup dupmc edeen edgemask ediupsizer eedi2 " + "eedi3 eedi3_rpow2 expand faerydust fastbicubicresize " + "fastbilinearresize fastediupsizer dedgemask fdecimate " + "ffaudiosource ffdshow ffindex ffmpegsource ffmpegsource2 " + "fft3dfilter fft3dgpu ffvideosource fielddeinterlace fielddiff " + "fillmargins fity2uv fity2u fity2v fitu2y fitv2y fluxsmooth " + "fluxsmoothst fluxsmootht framediff framenumber frfun3b frfun7 " + "gicocu golddust gradfun2db grapesmoother greedyhma grid " + "guavacomb hqdn3d hybridfupp hysteresymask ibob " + "improvesceneswitch inflate inpand inpaintlogo interframe " + "interlacedresize interlacedwarpedresize interleaved2planar " + "iscombed iscombedt iscombedtivtc kerneldeint leakkernelbob " + "leakkerneldeint limitedsharpen limitedsharpenfaster logic lsfmod " + "lumafilter lumayv12 manalyse maskeddeinterlace maskedmerge " + "maskedmix mblockfps mcompensate mctemporaldenoise " + "mctemporaldenoisepp mdegrain1 mdegrain2 mdegrain3 mdepan " + "medianblur mergehints mflow mflowblur mflowfps mflowinter " + "minblur mipsmooth mmask moderatesharpen monitorfilter motionmask " + "mpasource mpeg2source mrecalculate mscdetection msharpen mshow " + "msmooth msu_fieldshiftfixer msu_frc msuper mt mt_adddiff " + "mt_average mt_binarize mt_circle mt_clamp mt_convolution " + "mt_deflate mt_diamond mt_edge mt_ellipse mt_expand " + "mt_freeellipse mt_freelosange mt_freerectangle mt_hysteresis " + "mt_infix mt_inflate mt_inpand mt_invert mt_logic mt_losange " + "mt_lut mt_lutf mt_luts mt_lutspa mt_lutsx mt_lutxy mt_lutxyz " + "mt_makediff mt_mappedblur mt_merge mt_motion mt_polish " + "mt_rectangle mt_square mti mtsource multidecimate mvanalyse " + "mvblockfps mvchangecompensate mvcompensate mvdegrain1 mvdegrain2 " + "mvdegrain3 mvdenoise mvdepan mvflow mvflowblur mvflowfps " + "mvflowfps2 mvflowinter mvincrease mvmask mvrecalculate " + "mvscdetection mvshow nicac3source nicdtssource niclpcmsource " + "nicmpasource nicmpg123source nnedi nnedi2 nnedi2_rpow2 nnedi3 " + "nnedi3_rpow2 nomosmooth overlaymask peachsmoother pixiedust " + "planar2interleaved qtgmc qtinput rawavsource rawsource " + "reduceflicker reinterpolate411 removedirt removedust removegrain " + "removegrainhd removetemporalgrain repair requestlinear " + "reversefielddominance rgb3dlut rgdeinterlace rgsdeinterlace " + "rgblut rotate sangnom seesaw sharpen2 showchannels " + "showcombedtivtc smartdecimate smartdeinterlace smdegrain " + "smoothdeinterlace smoothuv soothess soxfilter spacedust sshiq " + "ssim ssiq stmedianfilter t3dlut tanisotropic tbilateral tcanny " + "tcomb tcombmask tcpserver tcpsource tdecimate tdeint tedgemask " + "telecide temporalcleaner temporalrepair temporalsmoother " + "tfieldblank tfm tisophote tivtc tmaskblank tmaskedmerge " + "tmaskedmerge3 tmm tmonitor tnlmeans tomsmocomp toon textsub " + "ttempsmooth ttempsmoothf tunsharp unblock uncomb undot unfilter " + "unsharpmask vaguedenoiser variableblur verticalcleaner " + "videoscope vinverse vobsub vqmcalc warpedresize warpsharp " + "xsharpen yadif yadifmod yuy2lut yv12convolution " + "yv12interlacedreduceby2 yv12interlacedselecttopfields yv12layer " + "yv12lut yv12lutxy yv12substract yv12torgb24 yv12toyuy2"; + + if (set == 4) + return + "abs apply assert bool ceil chr clip continueddenominator " + "continuednumerator cos default defined eval averagechromau " + "averagechromav averageluma chromaudifference chromavdifference " + "lumadifference exist exp findstr float floor frac hexvalue " + "import int isbool isclip isfloat isint isstring lcase leftstr " + "load_stdcall_plugin loadcplugin loadplugin loadvfapiplugin " + "loadvirtualdubplugin log midstr muldiv nop opt_allowfloataudio " + "opt_avipadscanlines opt_dwchannelmask opt_usewaveextensible " + "opt_vdubplanarhack pi pow rand revstr rightstr round scriptdir " + "scriptfile scriptname select setmemorymax " + "setplanarlegacyalignment rgbdifference rgbdifferencefromprevious " + "rgbdifferencetonext udifferencefromprevious udifferencetonext " + "setworkingdir sign sin spline sqrt string strlen time ucase " + "undefined value versionnumber versionstring uplanemax " + "uplanemedian uplanemin uplaneminmaxdifference " + "vdifferencefromprevious vdifferencetonext vplanemax vplanemedian " + "vplanemin vplaneminmaxdifference ydifferencefromprevious " + "ydifferencetonext yplanemax yplanemedian yplanemin " + "yplaneminmaxdifference"; + + if (set == 5) + return + "audiobits audiochannels audiolength audiolengthf audiorate " + "framecount framerate frameratedenominator frameratenumerator " + "getleftchannel getrightchannel hasaudio hasvideo height " + "isaudiofloat isaudioint isfieldbased isframebased isinterleaved " + "isplanar isrgb isrgb24 isrgb32 isyuv isyuy2 isyv12 width"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerAVS::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case BlockComment: + return tr("Block comment"); + + case NestedBlockComment: + return tr("Nested block comment"); + + case LineComment: + return tr("Line comment"); + + case Number: + return tr("Number"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case String: + return tr("Double-quoted string"); + + case TripleString: + return tr("Triple double-quoted string"); + + case Keyword: + return tr("Keyword"); + + case Filter: + return tr("Filter"); + + case Plugin: + return tr("Plugin"); + + case Function: + return tr("Function"); + + case ClipProperty: + return tr("Clip property"); + + case KeywordSet6: + return tr("User defined"); + } + + return QString(); +} + + +// Refresh all properties. +void QsciLexerAVS::refreshProperties() +{ + setCommentProp(); + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerAVS::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerAVS::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerAVS::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerAVS::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerAVS::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerAVS::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerAVS::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerAVS::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbash.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbash.cpp new file mode 100644 index 000000000..8a866c53d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbash.cpp @@ -0,0 +1,350 @@ +// This module implements the QsciLexerBash class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerbash.h" + +#include +#include +#include + + +// The ctor. +QsciLexerBash::QsciLexerBash(QObject *parent) + : QsciLexer(parent), fold_comments(false), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerBash::~QsciLexerBash() +{ +} + + +// Returns the language name. +const char *QsciLexerBash::language() const +{ + return "Bash"; +} + + +// Returns the lexer name. +const char *QsciLexerBash::lexer() const +{ + return "bash"; +} + + +// Return the style used for braces. +int QsciLexerBash::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerBash::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$@%&"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerBash::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Error: + case Backticks: + return QColor(0xff,0xff,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + case SingleQuotedHereDocument: + return QColor(0x7f,0x00,0x7f); + + case Operator: + case Identifier: + case Scalar: + case ParameterExpansion: + case HereDocumentDelimiter: + return QColor(0x00,0x00,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerBash::defaultEolFill(int style) const +{ + switch (style) + { + case SingleQuotedHereDocument: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerBash::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case DoubleQuotedString: + case SingleQuotedString: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerBash::keywords(int set) const +{ + if (set == 1) + return + "alias ar asa awk banner basename bash bc bdiff break " + "bunzip2 bzip2 cal calendar case cat cc cd chmod " + "cksum clear cmp col comm compress continue cp cpio " + "crypt csplit ctags cut date dc dd declare deroff dev " + "df diff diff3 dircmp dirname do done du echo ed " + "egrep elif else env esac eval ex exec exit expand " + "export expr false fc fgrep fi file find fmt fold for " + "function functions getconf getopt getopts grep gres " + "hash head help history iconv id if in integer jobs " + "join kill local lc let line ln logname look ls m4 " + "mail mailx make man mkdir more mt mv newgrp nl nm " + "nohup ntps od pack paste patch pathchk pax pcat perl " + "pg pr print printf ps pwd read readonly red return " + "rev rm rmdir sed select set sh shift size sleep sort " + "spell split start stop strings strip stty sum " + "suspend sync tail tar tee test then time times touch " + "tr trap true tsort tty type typeset ulimit umask " + "unalias uname uncompress unexpand uniq unpack unset " + "until uudecode uuencode vi vim vpax wait wc whence " + "which while who wpaste wstart xargs zcat " + + "chgrp chown chroot dir dircolors factor groups " + "hostid install link md5sum mkfifo mknod nice pinky " + "printenv ptx readlink seq sha1sum shred stat su tac " + "unlink users vdir whoami yes"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerBash::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Error: + return tr("Error"); + + case Comment: + return tr("Comment"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case Scalar: + return tr("Scalar"); + + case ParameterExpansion: + return tr("Parameter expansion"); + + case Backticks: + return tr("Backticks"); + + case HereDocumentDelimiter: + return tr("Here document delimiter"); + + case SingleQuotedHereDocument: + return tr("Single-quoted here document"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerBash::defaultPaper(int style) const +{ + switch (style) + { + case Error: + return QColor(0xff,0x00,0x00); + + case Scalar: + return QColor(0xff,0xe0,0xe0); + + case ParameterExpansion: + return QColor(0xff,0xff,0xe0); + + case Backticks: + return QColor(0xa0,0x80,0x80); + + case HereDocumentDelimiter: + case SingleQuotedHereDocument: + return QColor(0xdd,0xd0,0xdd); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerBash::refreshProperties() +{ + setCommentProp(); + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerBash::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerBash::writeProperties(QSettings &qs, const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerBash::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerBash::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerBash::setCommentProp() +{ + emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerBash::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerBash::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerBash::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbatch.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbatch.cpp new file mode 100644 index 000000000..d722482fc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerbatch.cpp @@ -0,0 +1,212 @@ +// This module implements the QsciLexerBatch class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerbatch.h" + +#include +#include +#include + + +// The ctor. +QsciLexerBatch::QsciLexerBatch(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerBatch::~QsciLexerBatch() +{ +} + + +// Returns the language name. +const char *QsciLexerBatch::language() const +{ + return "Batch"; +} + + +// Returns the lexer name. +const char *QsciLexerBatch::lexer() const +{ + return "batch"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerBatch::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerBatch::defaultColor(int style) const +{ + switch (style) + { + case Default: + case Operator: + return QColor(0x00,0x00,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Keyword: + case ExternalCommand: + return QColor(0x00,0x00,0x7f); + + case Label: + return QColor(0x7f,0x00,0x7f); + + case HideCommandChar: + return QColor(0x7f,0x7f,0x00); + + case Variable: + return QColor(0x80,0x00,0x80); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerBatch::defaultEolFill(int style) const +{ + switch (style) + { + case Label: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerBatch::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case ExternalCommand: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerBatch::keywords(int set) const +{ + if (set == 1) + return + "rem set if exist errorlevel for in do break call " + "chcp cd chdir choice cls country ctty date del " + "erase dir echo exit goto loadfix loadhigh mkdir md " + "move path pause prompt rename ren rmdir rd shift " + "time type ver verify vol com con lpt nul"; + + return 0; +} + + +// Return the case sensitivity. +bool QsciLexerBatch::caseSensitive() const +{ + return false; +} + + +// Returns the user name of a style. +QString QsciLexerBatch::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Keyword: + return tr("Keyword"); + + case Label: + return tr("Label"); + + case HideCommandChar: + return tr("Hide command character"); + + case ExternalCommand: + return tr("External command"); + + case Variable: + return tr("Variable"); + + case Operator: + return tr("Operator"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerBatch::defaultPaper(int style) const +{ + switch (style) + { + case Label: + return QColor(0x60,0x60,0x60); + } + + return QsciLexer::defaultPaper(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercmake.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercmake.cpp new file mode 100644 index 000000000..4dd47f830 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercmake.cpp @@ -0,0 +1,304 @@ +// This module implements the QsciLexerCMake class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexercmake.h" + +#include +#include +#include + + +// The ctor. +QsciLexerCMake::QsciLexerCMake(QObject *parent) + : QsciLexer(parent), fold_atelse(false) +{ +} + + +// The dtor. +QsciLexerCMake::~QsciLexerCMake() +{ +} + + +// Returns the language name. +const char *QsciLexerCMake::language() const +{ + return "CMake"; +} + + +// Returns the lexer name. +const char *QsciLexerCMake::lexer() const +{ + return "cmake"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerCMake::defaultColor(int style) const +{ + switch (style) + { + case Default: + case KeywordSet3: + return QColor(0x00,0x00,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case String: + case StringLeftQuote: + case StringRightQuote: + return QColor(0x7f,0x00,0x7f); + + case Function: + case BlockWhile: + case BlockForeach: + case BlockIf: + case BlockMacro: + return QColor(0x00,0x00,0x7f); + + case Variable: + return QColor(0x80,0x00,0x00); + + case Label: + case StringVariable: + return QColor(0xcc,0x33,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerCMake::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Function: + case BlockWhile: + case BlockForeach: + case BlockIf: + case BlockMacro: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerCMake::keywords(int set) const +{ + if (set == 1) + return + "add_custom_command add_custom_target add_definitions " + "add_dependencies add_executable add_library add_subdirectory " + "add_test aux_source_directory build_command build_name " + "cmake_minimum_required configure_file create_test_sourcelist " + "else elseif enable_language enable_testing endforeach endif " + "endmacro endwhile exec_program execute_process " + "export_library_dependencies file find_file find_library " + "find_package find_path find_program fltk_wrap_ui foreach " + "get_cmake_property get_directory_property get_filename_component " + "get_source_file_property get_target_property get_test_property " + "if include include_directories include_external_msproject " + "include_regular_expression install install_files " + "install_programs install_targets link_directories link_libraries " + "list load_cache load_command macro make_directory " + "mark_as_advanced math message option output_required_files " + "project qt_wrap_cpp qt_wrap_ui remove remove_definitions " + "separate_arguments set set_directory_properties " + "set_source_files_properties set_target_properties " + "set_tests_properties site_name source_group string " + "subdir_depends subdirs target_link_libraries try_compile try_run " + "use_mangled_mesa utility_source variable_requires " + "vtk_make_instantiator vtk_wrap_java vtk_wrap_python vtk_wrap_tcl " + "while write_file"; + + if (set == 2) + return + "ABSOLUTE ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ALL AND APPEND " + "ARGS ASCII BEFORE CACHE CACHE_VARIABLES CLEAR COMMAND COMMANDS " + "COMMAND_NAME COMMENT COMPARE COMPILE_FLAGS COPYONLY DEFINED " + "DEFINE_SYMBOL DEPENDS DOC EQUAL ESCAPE_QUOTES EXCLUDE " + "EXCLUDE_FROM_ALL EXISTS EXPORT_MACRO EXT EXTRA_INCLUDE " + "FATAL_ERROR FILE FILES FORCE FUNCTION GENERATED GLOB " + "GLOB_RECURSE GREATER GROUP_SIZE HEADER_FILE_ONLY HEADER_LOCATION " + "IMMEDIATE INCLUDES INCLUDE_DIRECTORIES INCLUDE_INTERNALS " + "INCLUDE_REGULAR_EXPRESSION LESS LINK_DIRECTORIES LINK_FLAGS " + "LOCATION MACOSX_BUNDLE MACROS MAIN_DEPENDENCY MAKE_DIRECTORY " + "MATCH MATCHALL MATCHES MODULE NAME NAME_WE NOT NOTEQUAL " + "NO_SYSTEM_PATH OBJECT_DEPENDS OPTIONAL OR OUTPUT OUTPUT_VARIABLE " + "PATH PATHS POST_BUILD POST_INSTALL_SCRIPT PREFIX PREORDER " + "PRE_BUILD PRE_INSTALL_SCRIPT PRE_LINK PROGRAM PROGRAM_ARGS " + "PROPERTIES QUIET RANGE READ REGEX REGULAR_EXPRESSION REPLACE " + "REQUIRED RETURN_VALUE RUNTIME_DIRECTORY SEND_ERROR SHARED " + "SOURCES STATIC STATUS STREQUAL STRGREATER STRLESS SUFFIX TARGET " + "TOLOWER TOUPPER VAR VARIABLES VERSION WIN32 WRAP_EXCLUDE WRITE " + "APPLE MINGW MSYS CYGWIN BORLAND WATCOM MSVC MSVC_IDE MSVC60 " + "MSVC70 MSVC71 MSVC80 CMAKE_COMPILER_2005 OFF ON"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerCMake::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case String: + return tr("String"); + + case StringLeftQuote: + return tr("Left quoted string"); + + case StringRightQuote: + return tr("Right quoted string"); + + case Function: + return tr("Function"); + + case Variable: + return tr("Variable"); + + case Label: + return tr("Label"); + + case KeywordSet3: + return tr("User defined"); + + case BlockWhile: + return tr("WHILE block"); + + case BlockForeach: + return tr("FOREACH block"); + + case BlockIf: + return tr("IF block"); + + case BlockMacro: + return tr("MACRO block"); + + case StringVariable: + return tr("Variable within a string"); + + case Number: + return tr("Number"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerCMake::defaultPaper(int style) const +{ + switch (style) + { + case String: + case StringLeftQuote: + case StringRightQuote: + case StringVariable: + return QColor(0xee,0xee,0xee); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerCMake::refreshProperties() +{ + setAtElseProp(); +} + + +// Read properties from the settings. +bool QsciLexerCMake::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerCMake::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldatelse", fold_atelse); + + return rc; +} + + +// Return true if ELSE blocks can be folded. +bool QsciLexerCMake::foldAtElse() const +{ + return fold_atelse; +} + + +// Set if ELSE blocks can be folded. +void QsciLexerCMake::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.at.else" property. +void QsciLexerCMake::setAtElseProp() +{ + emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercoffeescript.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercoffeescript.cpp new file mode 100644 index 000000000..637ba62f6 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercoffeescript.cpp @@ -0,0 +1,454 @@ +// This module implements the QsciLexerCoffeeScript class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexercoffeescript.h" + +#include +#include +#include + + +// The ctor. +QsciLexerCoffeeScript::QsciLexerCoffeeScript(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true), style_preproc(false), + dollars(true) +{ +} + + +// The dtor. +QsciLexerCoffeeScript::~QsciLexerCoffeeScript() +{ +} + + +// Returns the language name. +const char *QsciLexerCoffeeScript::language() const +{ + return "CoffeeScript"; +} + + +// Returns the lexer name. +const char *QsciLexerCoffeeScript::lexer() const +{ + return "coffeescript"; +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerCoffeeScript::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << "."; + + return wl; +} + + +// Return the list of keywords that can start a block. +const char *QsciLexerCoffeeScript::blockStartKeyword(int *style) const +{ + if (style) + *style = Keyword; + + return "catch class do else finally for if try until when while"; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerCoffeeScript::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return "{"; +} + + +// Return the list of characters that can end a block. +const char *QsciLexerCoffeeScript::blockEnd(int *style) const +{ + if (style) + *style = Operator; + + return "}"; +} + + +// Return the style used for braces. +int QsciLexerCoffeeScript::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerCoffeeScript::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerCoffeeScript::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80, 0x80, 0x80); + + case Comment: + case CommentLine: + case CommentBlock: + case BlockRegexComment: + return QColor(0x00, 0x7f, 0x00); + + case CommentDoc: + case CommentLineDoc: + return QColor(0x3f, 0x70, 0x3f); + + case Number: + return QColor(0x00, 0x7f, 0x7f); + + case Keyword: + return QColor(0x00, 0x00, 0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + return QColor(0x7f, 0x00, 0x7f); + + case PreProcessor: + return QColor(0x7f, 0x7f, 0x00); + + case Operator: + case UnclosedString: + return QColor(0x00, 0x00, 0x00); + + case VerbatimString: + return QColor(0x00, 0x7f, 0x00); + + case Regex: + case BlockRegex: + return QColor(0x3f, 0x7f, 0x3f); + + case CommentDocKeyword: + return QColor(0x30, 0x60, 0xa0); + + case CommentDocKeywordError: + return QColor(0x80, 0x40, 0x20); + + case InstanceProperty: + return QColor(0xc0, 0x60, 0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerCoffeeScript::defaultEolFill(int style) const +{ + switch (style) + { + case UnclosedString: + case VerbatimString: + case Regex: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerCoffeeScript::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: + case CommentDoc: + case CommentLineDoc: + case CommentDocKeyword: + case CommentDocKeywordError: + case CommentBlock: + case BlockRegexComment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case DoubleQuotedString: + case SingleQuotedString: + case UnclosedString: + case VerbatimString: + case Regex: + case BlockRegex: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerCoffeeScript::keywords(int set) const +{ + if (set == 1) + return + "true false null this new delete typeof in instanceof return " + "throw break continue debugger if else switch for while do try " + "catch finally class extends super " + "undefined then unless until loop of by when and or is isnt not " + "yes no on off"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerCoffeeScript::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("C-style comment"); + + case CommentLine: + return tr("C++-style comment"); + + case CommentDoc: + return tr("JavaDoc C-style comment"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case UUID: + return tr("IDL UUID"); + + case PreProcessor: + return tr("Pre-processor block"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case UnclosedString: + return tr("Unclosed string"); + + case VerbatimString: + return tr("C# verbatim string"); + + case Regex: + return tr("Regular expression"); + + case CommentLineDoc: + return tr("JavaDoc C++-style comment"); + + case KeywordSet2: + return tr("Secondary keywords and identifiers"); + + case CommentDocKeyword: + return tr("JavaDoc keyword"); + + case CommentDocKeywordError: + return tr("JavaDoc keyword error"); + + case GlobalClass: + return tr("Global classes"); + + case CommentBlock: + return tr("Block comment"); + + case BlockRegex: + return tr("Block regular expression"); + + case BlockRegexComment: + return tr("Block regular expression comment"); + + case InstanceProperty: + return tr("Instance property"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerCoffeeScript::defaultPaper(int style) const +{ + switch (style) + { + case UnclosedString: + return QColor(0xe0,0xc0,0xe0); + + case VerbatimString: + return QColor(0xe0,0xff,0xe0); + + case Regex: + return QColor(0xe0,0xf0,0xe0); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerCoffeeScript::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setStylePreprocProp(); + setDollarsProp(); +} + + +// Read properties from the settings. +bool QsciLexerCoffeeScript::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + style_preproc = qs.value(prefix + "stylepreprocessor", false).toBool(); + dollars = qs.value(prefix + "dollars", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerCoffeeScript::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "stylepreprocessor", style_preproc); + qs.setValue(prefix + "dollars", dollars); + + return rc; +} + + +// Set if comments can be folded. +void QsciLexerCoffeeScript::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerCoffeeScript::setCommentProp() +{ + emit propertyChanged("fold.coffeescript.comment", + (fold_comments ? "1" : "0")); +} + + +// Set if folds are compact +void QsciLexerCoffeeScript::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerCoffeeScript::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} + + +// Set if preprocessor lines are styled. +void QsciLexerCoffeeScript::setStylePreprocessor(bool style) +{ + style_preproc = style; + + setStylePreprocProp(); +} + + +// Set the "styling.within.preprocessor" property. +void QsciLexerCoffeeScript::setStylePreprocProp() +{ + emit propertyChanged("styling.within.preprocessor", + (style_preproc ? "1" : "0")); +} + + +// Set if '$' characters are allowed. +void QsciLexerCoffeeScript::setDollarsAllowed(bool allowed) +{ + dollars = allowed; + + setDollarsProp(); +} + + +// Set the "lexer.cpp.allow.dollars" property. +void QsciLexerCoffeeScript::setDollarsProp() +{ + emit propertyChanged("lexer.cpp.allow.dollars", (dollars ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercpp.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercpp.cpp new file mode 100644 index 000000000..aab85b6eb --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercpp.cpp @@ -0,0 +1,801 @@ +// This module implements the QsciLexerCPP class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexercpp.h" + +#include +#include +#include + + +// The ctor. +QsciLexerCPP::QsciLexerCPP(QObject *parent, bool caseInsensitiveKeywords) + : QsciLexer(parent), + fold_atelse(false), fold_comments(false), fold_compact(true), + fold_preproc(true), style_preproc(false), dollars(true), + highlight_triple(false), highlight_hash(false), highlight_back(false), + highlight_escape(false), vs_escape(false), + nocase(caseInsensitiveKeywords) +{ +} + + +// The dtor. +QsciLexerCPP::~QsciLexerCPP() +{ +} + + +// Returns the language name. +const char *QsciLexerCPP::language() const +{ + return "C++"; +} + + +// Returns the lexer name. +const char *QsciLexerCPP::lexer() const +{ + return (nocase ? "cppnocase" : "cpp"); +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerCPP::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << "::" << "->" << "."; + + return wl; +} + + +// Return the list of keywords that can start a block. +const char *QsciLexerCPP::blockStartKeyword(int *style) const +{ + if (style) + *style = Keyword; + + return "case catch class default do else finally for if private " + "protected public struct try union while"; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerCPP::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return "{"; +} + + +// Return the list of characters that can end a block. +const char *QsciLexerCPP::blockEnd(int *style) const +{ + if (style) + *style = Operator; + + return "}"; +} + + +// Return the style used for braces. +int QsciLexerCPP::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerCPP::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerCPP::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80, 0x80, 0x80); + + case Comment: + case CommentLine: + return QColor(0x00, 0x7f, 0x00); + + case CommentDoc: + case CommentLineDoc: + case PreProcessorCommentLineDoc: + return QColor(0x3f, 0x70, 0x3f); + + case Number: + return QColor(0x00, 0x7f, 0x7f); + + case Keyword: + return QColor(0x00, 0x00, 0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + case RawString: + return QColor(0x7f, 0x00, 0x7f); + + case PreProcessor: + return QColor(0x7f, 0x7f, 0x00); + + case Operator: + case UnclosedString: + return QColor(0x00, 0x00, 0x00); + + case VerbatimString: + case TripleQuotedVerbatimString: + case HashQuotedString: + return QColor(0x00, 0x7f, 0x00); + + case Regex: + return QColor(0x3f, 0x7f, 0x3f); + + case CommentDocKeyword: + return QColor(0x30, 0x60, 0xa0); + + case CommentDocKeywordError: + return QColor(0x80, 0x40, 0x20); + + case PreProcessorComment: + return QColor(0x65, 0x99, 0x00); + + case InactiveDefault: + case InactiveUUID: + case InactiveCommentLineDoc: + case InactiveKeywordSet2: + case InactiveCommentDocKeyword: + case InactiveCommentDocKeywordError: + case InactivePreProcessorCommentLineDoc: + return QColor(0xc0, 0xc0, 0xc0); + + case InactiveComment: + case InactiveCommentLine: + case InactiveNumber: + case InactiveVerbatimString: + case InactiveTripleQuotedVerbatimString: + case InactiveHashQuotedString: + return QColor(0x90, 0xb0, 0x90); + + case InactiveCommentDoc: + return QColor(0xd0, 0xd0, 0xd0); + + case InactiveKeyword: + return QColor(0x90, 0x90, 0xb0); + + case InactiveDoubleQuotedString: + case InactiveSingleQuotedString: + case InactiveRawString: + return QColor(0xb0, 0x90, 0xb0); + + case InactivePreProcessor: + return QColor(0xb0, 0xb0, 0x90); + + case InactiveOperator: + case InactiveIdentifier: + case InactiveGlobalClass: + return QColor(0xb0, 0xb0, 0xb0); + + case InactiveUnclosedString: + return QColor(0x00, 0x00, 0x00); + + case InactiveRegex: + return QColor(0x7f, 0xaf, 0x7f); + + case InactivePreProcessorComment: + return QColor(0xa0, 0xc0, 0x90); + + case UserLiteral: + return QColor(0xc0, 0x60, 0x00); + + case InactiveUserLiteral: + return QColor(0xd7, 0xa0, 0x90); + + case TaskMarker: + return QColor(0xbe, 0x07, 0xff); + + case InactiveTaskMarker: + return QColor(0xc3, 0xa1, 0xcf); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerCPP::defaultEolFill(int style) const +{ + switch (style) + { + case UnclosedString: + case InactiveUnclosedString: + case VerbatimString: + case InactiveVerbatimString: + case Regex: + case InactiveRegex: + case TripleQuotedVerbatimString: + case InactiveTripleQuotedVerbatimString: + case HashQuotedString: + case InactiveHashQuotedString: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerCPP::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case InactiveComment: + case CommentLine: + case InactiveCommentLine: + case CommentDoc: + case InactiveCommentDoc: + case CommentLineDoc: + case InactiveCommentLineDoc: + case CommentDocKeyword: + case InactiveCommentDocKeyword: + case CommentDocKeywordError: + case InactiveCommentDocKeywordError: + case TaskMarker: + case InactiveTaskMarker: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case InactiveKeyword: + case Operator: + case InactiveOperator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case DoubleQuotedString: + case InactiveDoubleQuotedString: + case SingleQuotedString: + case InactiveSingleQuotedString: + case UnclosedString: + case InactiveUnclosedString: + case VerbatimString: + case InactiveVerbatimString: + case Regex: + case InactiveRegex: + case TripleQuotedVerbatimString: + case InactiveTripleQuotedVerbatimString: + case HashQuotedString: + case InactiveHashQuotedString: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerCPP::keywords(int set) const +{ + if (set == 1) + return + "and and_eq asm auto bitand bitor bool break case " + "catch char class compl const const_cast continue " + "default delete do double dynamic_cast else enum " + "explicit export extern false float for friend goto if " + "inline int long mutable namespace new not not_eq " + "operator or or_eq private protected public register " + "reinterpret_cast return short signed sizeof static " + "static_cast struct switch template this throw true " + "try typedef typeid typename union unsigned using " + "virtual void volatile wchar_t while xor xor_eq"; + + if (set == 3) + return + "a addindex addtogroup anchor arg attention author b " + "brief bug c class code date def defgroup deprecated " + "dontinclude e em endcode endhtmlonly endif " + "endlatexonly endlink endverbatim enum example " + "exception f$ f[ f] file fn hideinitializer " + "htmlinclude htmlonly if image include ingroup " + "internal invariant interface latexonly li line link " + "mainpage name namespace nosubgrouping note overload " + "p page par param post pre ref relates remarks return " + "retval sa section see showinitializer since skip " + "skipline struct subsection test throw todo typedef " + "union until var verbatim verbinclude version warning " + "weakgroup $ @ \\ & < > # { }"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerCPP::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case InactiveDefault: + return tr("Inactive default"); + + case Comment: + return tr("C comment"); + + case InactiveComment: + return tr("Inactive C comment"); + + case CommentLine: + return tr("C++ comment"); + + case InactiveCommentLine: + return tr("Inactive C++ comment"); + + case CommentDoc: + return tr("JavaDoc style C comment"); + + case InactiveCommentDoc: + return tr("Inactive JavaDoc style C comment"); + + case Number: + return tr("Number"); + + case InactiveNumber: + return tr("Inactive number"); + + case Keyword: + return tr("Keyword"); + + case InactiveKeyword: + return tr("Inactive keyword"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case InactiveDoubleQuotedString: + return tr("Inactive double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case InactiveSingleQuotedString: + return tr("Inactive single-quoted string"); + + case UUID: + return tr("IDL UUID"); + + case InactiveUUID: + return tr("Inactive IDL UUID"); + + case PreProcessor: + return tr("Pre-processor block"); + + case InactivePreProcessor: + return tr("Inactive pre-processor block"); + + case Operator: + return tr("Operator"); + + case InactiveOperator: + return tr("Inactive operator"); + + case Identifier: + return tr("Identifier"); + + case InactiveIdentifier: + return tr("Inactive identifier"); + + case UnclosedString: + return tr("Unclosed string"); + + case InactiveUnclosedString: + return tr("Inactive unclosed string"); + + case VerbatimString: + return tr("C# verbatim string"); + + case InactiveVerbatimString: + return tr("Inactive C# verbatim string"); + + case Regex: + return tr("JavaScript regular expression"); + + case InactiveRegex: + return tr("Inactive JavaScript regular expression"); + + case CommentLineDoc: + return tr("JavaDoc style C++ comment"); + + case InactiveCommentLineDoc: + return tr("Inactive JavaDoc style C++ comment"); + + case KeywordSet2: + return tr("Secondary keywords and identifiers"); + + case InactiveKeywordSet2: + return tr("Inactive secondary keywords and identifiers"); + + case CommentDocKeyword: + return tr("JavaDoc keyword"); + + case InactiveCommentDocKeyword: + return tr("Inactive JavaDoc keyword"); + + case CommentDocKeywordError: + return tr("JavaDoc keyword error"); + + case InactiveCommentDocKeywordError: + return tr("Inactive JavaDoc keyword error"); + + case GlobalClass: + return tr("Global classes and typedefs"); + + case InactiveGlobalClass: + return tr("Inactive global classes and typedefs"); + + case RawString: + return tr("C++ raw string"); + + case InactiveRawString: + return tr("Inactive C++ raw string"); + + case TripleQuotedVerbatimString: + return tr("Vala triple-quoted verbatim string"); + + case InactiveTripleQuotedVerbatimString: + return tr("Inactive Vala triple-quoted verbatim string"); + + case HashQuotedString: + return tr("Pike hash-quoted string"); + + case InactiveHashQuotedString: + return tr("Inactive Pike hash-quoted string"); + + case PreProcessorComment: + return tr("Pre-processor C comment"); + + case InactivePreProcessorComment: + return tr("Inactive pre-processor C comment"); + + case PreProcessorCommentLineDoc: + return tr("JavaDoc style pre-processor comment"); + + case InactivePreProcessorCommentLineDoc: + return tr("Inactive JavaDoc style pre-processor comment"); + + case UserLiteral: + return tr("User-defined literal"); + + case InactiveUserLiteral: + return tr("Inactive user-defined literal"); + + case TaskMarker: + return tr("Task marker"); + + case InactiveTaskMarker: + return tr("Inactive task marker"); + + case EscapeSequence: + return tr("Escape sequence"); + + case InactiveEscapeSequence: + return tr("Inactive escape sequence"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerCPP::defaultPaper(int style) const +{ + switch (style) + { + case UnclosedString: + case InactiveUnclosedString: + return QColor(0xe0,0xc0,0xe0); + + case VerbatimString: + case InactiveVerbatimString: + case TripleQuotedVerbatimString: + case InactiveTripleQuotedVerbatimString: + return QColor(0xe0,0xff,0xe0); + + case Regex: + case InactiveRegex: + return QColor(0xe0,0xf0,0xe0); + + case RawString: + case InactiveRawString: + return QColor(0xff,0xf3,0xff); + + case HashQuotedString: + case InactiveHashQuotedString: + return QColor(0xe7,0xff,0xd7); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerCPP::refreshProperties() +{ + setAtElseProp(); + setCommentProp(); + setCompactProp(); + setPreprocProp(); + setStylePreprocProp(); + setDollarsProp(); + setHighlightTripleProp(); + setHighlightHashProp(); + setHighlightBackProp(); + setHighlightEscapeProp(); + setVerbatimStringEscapeProp(); +} + + +// Read properties from the settings. +bool QsciLexerCPP::readProperties(QSettings &qs,const QString &prefix) +{ + fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_preproc = qs.value(prefix + "foldpreprocessor", true).toBool(); + style_preproc = qs.value(prefix + "stylepreprocessor", false).toBool(); + dollars = qs.value(prefix + "dollars", true).toBool(); + highlight_triple = qs.value(prefix + "highlighttriple", false).toBool(); + highlight_hash = qs.value(prefix + "highlighthash", false).toBool(); + highlight_back = qs.value(prefix + "highlightback", false).toBool(); + highlight_escape = qs.value(prefix + "highlightescape", false).toBool(); + vs_escape = qs.value(prefix + "verbatimstringescape", false).toBool(); + + return true; +} + + +// Write properties to the settings. +bool QsciLexerCPP::writeProperties(QSettings &qs,const QString &prefix) const +{ + qs.setValue(prefix + "foldatelse", fold_atelse); + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldpreprocessor", fold_preproc); + qs.setValue(prefix + "stylepreprocessor", style_preproc); + qs.setValue(prefix + "dollars", dollars); + qs.setValue(prefix + "highlighttriple", highlight_triple); + qs.setValue(prefix + "highlighthash", highlight_hash); + qs.setValue(prefix + "highlightback", highlight_back); + qs.setValue(prefix + "highlightescape", highlight_escape); + qs.setValue(prefix + "verbatimstringescape", vs_escape); + + return true; +} + + +// Set if else can be folded. +void QsciLexerCPP::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.at.else" property. +void QsciLexerCPP::setAtElseProp() +{ + emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0")); +} + + +// Set if comments can be folded. +void QsciLexerCPP::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerCPP::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Set if folds are compact +void QsciLexerCPP::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerCPP::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Set if preprocessor blocks can be folded. +void QsciLexerCPP::setFoldPreprocessor(bool fold) +{ + fold_preproc = fold; + + setPreprocProp(); +} + + +// Set the "fold.preprocessor" property. +void QsciLexerCPP::setPreprocProp() +{ + emit propertyChanged("fold.preprocessor",(fold_preproc ? "1" : "0")); +} + + +// Set if preprocessor lines are styled. +void QsciLexerCPP::setStylePreprocessor(bool style) +{ + style_preproc = style; + + setStylePreprocProp(); +} + + +// Set the "styling.within.preprocessor" property. +void QsciLexerCPP::setStylePreprocProp() +{ + emit propertyChanged("styling.within.preprocessor",(style_preproc ? "1" : "0")); +} + + +// Set if '$' characters are allowed. +void QsciLexerCPP::setDollarsAllowed(bool allowed) +{ + dollars = allowed; + + setDollarsProp(); +} + + +// Set the "lexer.cpp.allow.dollars" property. +void QsciLexerCPP::setDollarsProp() +{ + emit propertyChanged("lexer.cpp.allow.dollars",(dollars ? "1" : "0")); +} + + +// Set if triple quoted strings are highlighted. +void QsciLexerCPP::setHighlightTripleQuotedStrings(bool enabled) +{ + highlight_triple = enabled; + + setHighlightTripleProp(); +} + + +// Set the "lexer.cpp.triplequoted.strings" property. +void QsciLexerCPP::setHighlightTripleProp() +{ + emit propertyChanged("lexer.cpp.triplequoted.strings", + (highlight_triple ? "1" : "0")); +} + + +// Set if hash quoted strings are highlighted. +void QsciLexerCPP::setHighlightHashQuotedStrings(bool enabled) +{ + highlight_hash = enabled; + + setHighlightHashProp(); +} + + +// Set the "lexer.cpp.hashquoted.strings" property. +void QsciLexerCPP::setHighlightHashProp() +{ + emit propertyChanged("lexer.cpp.hashquoted.strings", + (highlight_hash ? "1" : "0")); +} + + +// Set if back-quoted strings are highlighted. +void QsciLexerCPP::setHighlightBackQuotedStrings(bool enabled) +{ + highlight_back = enabled; + + setHighlightBackProp(); +} + + +// Set the "lexer.cpp.backquoted.strings" property. +void QsciLexerCPP::setHighlightBackProp() +{ + emit propertyChanged("lexer.cpp.backquoted.strings", + (highlight_back ? "1" : "0")); +} + + +// Set if escape sequences in strings are highlighted. +void QsciLexerCPP::setHighlightEscapeSequences(bool enabled) +{ + highlight_escape = enabled; + + setHighlightEscapeProp(); +} + + +// Set the "lexer.cpp.escape.sequence" property. +void QsciLexerCPP::setHighlightEscapeProp() +{ + emit propertyChanged("lexer.cpp.escape.sequence", + (highlight_escape ? "1" : "0")); +} + + +// Set if escape sequences in verbatim strings are allowed. +void QsciLexerCPP::setVerbatimStringEscapeSequencesAllowed(bool allowed) +{ + vs_escape = allowed; + + setVerbatimStringEscapeProp(); +} + + +// Set the "lexer.cpp.verbatim.strings.allow.escapes" property. +void QsciLexerCPP::setVerbatimStringEscapeProp() +{ + emit propertyChanged("lexer.cpp.verbatim.strings.allow.escapes", + (vs_escape ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercsharp.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercsharp.cpp new file mode 100644 index 000000000..8d8fd0db6 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercsharp.cpp @@ -0,0 +1,118 @@ +// This module implements the QsciLexerCSharp class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexercsharp.h" + +#include +#include + + +// The ctor. +QsciLexerCSharp::QsciLexerCSharp(QObject *parent) + : QsciLexerCPP(parent) +{ +} + + +// The dtor. +QsciLexerCSharp::~QsciLexerCSharp() +{ +} + + +// Returns the language name. +const char *QsciLexerCSharp::language() const +{ + return "C#"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerCSharp::defaultColor(int style) const +{ + if (style == VerbatimString) + return QColor(0x00,0x7f,0x00); + + return QsciLexerCPP::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerCSharp::defaultEolFill(int style) const +{ + if (style == VerbatimString) + return true; + + return QsciLexerCPP::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerCSharp::defaultFont(int style) const +{ + if (style == VerbatimString) +#if defined(Q_OS_WIN) + return QFont("Courier New",10); +#elif defined(Q_OS_MAC) + return QFont("Courier", 12); +#else + return QFont("Bitstream Vera Sans Mono",9); +#endif + + return QsciLexerCPP::defaultFont(style); +} + + +// Returns the set of keywords. +const char *QsciLexerCSharp::keywords(int set) const +{ + if (set != 1) + return 0; + + return "abstract as base bool break byte case catch char checked " + "class const continue decimal default delegate do double else " + "enum event explicit extern false finally fixed float for " + "foreach goto if implicit in int interface internal is lock " + "long namespace new null object operator out override params " + "private protected public readonly ref return sbyte sealed " + "short sizeof stackalloc static string struct switch this " + "throw true try typeof uint ulong unchecked unsafe ushort " + "using virtual void while"; +} + + +// Returns the user name of a style. +QString QsciLexerCSharp::description(int style) const +{ + if (style == VerbatimString) + return tr("Verbatim string"); + + return QsciLexerCPP::description(style); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerCSharp::defaultPaper(int style) const +{ + if (style == VerbatimString) + return QColor(0xe0,0xff,0xe0); + + return QsciLexer::defaultPaper(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercss.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercss.cpp new file mode 100644 index 000000000..9d021cab2 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercss.cpp @@ -0,0 +1,440 @@ +// This module implements the QsciLexerCSS class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexercss.h" + +#include +#include +#include + + +// The ctor. +QsciLexerCSS::QsciLexerCSS(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true), hss_language(false), + less_language(false), scss_language(false) +{ +} + + +// The dtor. +QsciLexerCSS::~QsciLexerCSS() +{ +} + + +// Returns the language name. +const char *QsciLexerCSS::language() const +{ + return "CSS"; +} + + +// Returns the lexer name. +const char *QsciLexerCSS::lexer() const +{ + return "css"; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerCSS::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return "{"; +} + + +// Return the list of characters that can end a block. +const char *QsciLexerCSS::blockEnd(int *style) const +{ + if (style) + *style = Operator; + + return "}"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerCSS::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerCSS::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0xff,0x00,0x80); + + case Tag: + return QColor(0x00,0x00,0x7f); + + case PseudoClass: + case Attribute: + return QColor(0x80,0x00,0x00); + + case UnknownPseudoClass: + case UnknownProperty: + return QColor(0xff,0x00,0x00); + + case Operator: + return QColor(0x00,0x00,0x00); + + case CSS1Property: + return QColor(0x00,0x40,0xe0); + + case Value: + case DoubleQuotedString: + case SingleQuotedString: + return QColor(0x7f,0x00,0x7f); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case IDSelector: + return QColor(0x00,0x7f,0x7f); + + case Important: + return QColor(0xff,0x80,0x00); + + case AtRule: + case MediaRule: + return QColor(0x7f,0x7f,0x00); + + case CSS2Property: + return QColor(0x00,0xa0,0xe0); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerCSS::defaultFont(int style) const +{ + QFont f; + + if (style == Comment) +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + else + { + f = QsciLexer::defaultFont(style); + + switch (style) + { + case Tag: + case Important: + case MediaRule: + f.setBold(true); + break; + + case IDSelector: + f.setItalic(true); + break; + } + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerCSS::keywords(int set) const +{ + if (set == 1) + return + "color background-color background-image " + "background-repeat background-attachment " + "background-position background font-family " + "font-style font-variant font-weight font-size font " + "word-spacing letter-spacing text-decoration " + "vertical-align text-transform text-align " + "text-indent line-height margin-top margin-right " + "margin-bottom margin-left margin padding-top " + "padding-right padding-bottom padding-left padding " + "border-top-width border-right-width " + "border-bottom-width border-left-width border-width " + "border-top border-right border-bottom border-left " + "border border-color border-style width height float " + "clear display white-space list-style-type " + "list-style-image list-style-position list-style"; + + if (set == 2) + return + "first-letter first-line link active visited " + "first-child focus hover lang before after left " + "right first"; + + if (set == 3) + return + "border-top-color border-right-color " + "border-bottom-color border-left-color border-color " + "border-top-style border-right-style " + "border-bottom-style border-left-style border-style " + "top right bottom left position z-index direction " + "unicode-bidi min-width max-width min-height " + "max-height overflow clip visibility content quotes " + "counter-reset counter-increment marker-offset size " + "marks page-break-before page-break-after " + "page-break-inside page orphans widows font-stretch " + "font-size-adjust unicode-range units-per-em src " + "panose-1 stemv stemh slope cap-height x-height " + "ascent descent widths bbox definition-src baseline " + "centerline mathline topline text-shadow " + "caption-side table-layout border-collapse " + "border-spacing empty-cells speak-header cursor " + "outline outline-width outline-style outline-color " + "volume speak pause-before pause-after pause " + "cue-before cue-after cue play-during azimuth " + "elevation speech-rate voice-family pitch " + "pitch-range stress richness speak-punctuation " + "speak-numeral"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerCSS::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Tag: + return tr("Tag"); + + case ClassSelector: + return tr("Class selector"); + + case PseudoClass: + return tr("Pseudo-class"); + + case UnknownPseudoClass: + return tr("Unknown pseudo-class"); + + case Operator: + return tr("Operator"); + + case CSS1Property: + return tr("CSS1 property"); + + case UnknownProperty: + return tr("Unknown property"); + + case Value: + return tr("Value"); + + case Comment: + return tr("Comment"); + + case IDSelector: + return tr("ID selector"); + + case Important: + return tr("Important"); + + case AtRule: + return tr("@-rule"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case CSS2Property: + return tr("CSS2 property"); + + case Attribute: + return tr("Attribute"); + + case CSS3Property: + return tr("CSS3 property"); + + case PseudoElement: + return tr("Pseudo-element"); + + case ExtendedCSSProperty: + return tr("Extended CSS property"); + + case ExtendedPseudoClass: + return tr("Extended pseudo-class"); + + case ExtendedPseudoElement: + return tr("Extended pseudo-element"); + + case MediaRule: + return tr("Media rule"); + + case Variable: + return tr("Variable"); + } + + return QString(); +} + + +// Refresh all properties. +void QsciLexerCSS::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setHSSProp(); + setLessProp(); + setSCSSProp(); +} + + +// Read properties from the settings. +bool QsciLexerCSS::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + hss_language = qs.value(prefix + "hsslanguage", false).toBool(); + less_language = qs.value(prefix + "lesslanguage", false).toBool(); + scss_language = qs.value(prefix + "scsslanguage", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerCSS::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "hsslanguage", hss_language); + qs.setValue(prefix + "lesslanguage", less_language); + qs.setValue(prefix + "scsslanguage", scss_language); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerCSS::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerCSS::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerCSS::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerCSS::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerCSS::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerCSS::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Set if HSS is supported. +void QsciLexerCSS::setHSSLanguage(bool enabled) +{ + hss_language = enabled; + + setHSSProp(); +} + + +// Set the "lexer.css.hss.language" property. +void QsciLexerCSS::setHSSProp() +{ + emit propertyChanged("lexer.css.hss.language",(hss_language ? "1" : "0")); +} + + +// Set if Less CSS is supported. +void QsciLexerCSS::setLessLanguage(bool enabled) +{ + less_language = enabled; + + setLessProp(); +} + + +// Set the "lexer.css.less.language" property. +void QsciLexerCSS::setLessProp() +{ + emit propertyChanged("lexer.css.less.language",(less_language ? "1" : "0")); +} + + +// Set if Sassy CSS is supported. +void QsciLexerCSS::setSCSSLanguage(bool enabled) +{ + scss_language = enabled; + + setSCSSProp(); +} + + +// Set the "lexer.css.scss.language" property. +void QsciLexerCSS::setSCSSProp() +{ + emit propertyChanged("lexer.css.scss.language",(scss_language ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercustom.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercustom.cpp new file mode 100644 index 000000000..75c600f8c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexercustom.cpp @@ -0,0 +1,101 @@ +// This module implements the QsciLexerCustom class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexercustom.h" + +#include "Qsci/qsciscintilla.h" +#include "Qsci/qsciscintillabase.h" +#include "Qsci/qscistyle.h" + + +// The ctor. +QsciLexerCustom::QsciLexerCustom(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerCustom::~QsciLexerCustom() +{ +} + + +// Start styling. +void QsciLexerCustom::startStyling(int start, int) +{ + if (!editor()) + return; + + editor()->SendScintilla(QsciScintillaBase::SCI_STARTSTYLING, start); +} + + +// Set the style for a number of characters. +void QsciLexerCustom::setStyling(int length, int style) +{ + if (!editor()) + return; + + editor()->SendScintilla(QsciScintillaBase::SCI_SETSTYLING, length, style); +} + + +// Set the style for a number of characters. +void QsciLexerCustom::setStyling(int length, const QsciStyle &style) +{ + setStyling(length, style.style()); +} + + +// Set the attached editor. +void QsciLexerCustom::setEditor(QsciScintilla *new_editor) +{ + if (editor()) + disconnect(editor(), SIGNAL(SCN_STYLENEEDED(int)), this, + SLOT(handleStyleNeeded(int))); + + QsciLexer::setEditor(new_editor); + + if (editor()) + connect(editor(), SIGNAL(SCN_STYLENEEDED(int)), this, + SLOT(handleStyleNeeded(int))); +} + + +// Return the number of style bits needed by the lexer. +int QsciLexerCustom::styleBitsNeeded() const +{ + return 5; +} + + +// Handle a request to style some text. +void QsciLexerCustom::handleStyleNeeded(int pos) +{ + int start = editor()->SendScintilla(QsciScintillaBase::SCI_GETENDSTYLED); + int line = editor()->SendScintilla(QsciScintillaBase::SCI_LINEFROMPOSITION, + start); + start = editor()->SendScintilla(QsciScintillaBase::SCI_POSITIONFROMLINE, + line); + + if (start != pos) + styleText(start, pos); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerd.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerd.cpp new file mode 100644 index 000000000..126a829ab --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerd.cpp @@ -0,0 +1,450 @@ +// This module implements the QsciLexerD class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerd.h" + +#include +#include +#include + + +// The ctor. +QsciLexerD::QsciLexerD(QObject *parent) + : QsciLexer(parent), + fold_atelse(false), fold_comments(false), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerD::~QsciLexerD() +{ +} + + +// Returns the language name. +const char *QsciLexerD::language() const +{ + return "D"; +} + + +// Returns the lexer name. +const char *QsciLexerD::lexer() const +{ + return "d"; +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerD::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << "."; + + return wl; +} + + +// Return the list of keywords that can start a block. +const char *QsciLexerD::blockStartKeyword(int *style) const +{ + if (style) + *style = Keyword; + + return "case catch class default do else finally for foreach " + "foreach_reverse if private protected public struct try union " + "while"; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerD::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return "{"; +} + + +// Return the list of characters that can end a block. +const char *QsciLexerD::blockEnd(int *style) const +{ + if (style) + *style = Operator; + + return "}"; +} + + +// Return the style used for braces. +int QsciLexerD::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerD::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerD::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Comment: + case CommentLine: + return QColor(0x00,0x7f,0x00); + + case CommentDoc: + case CommentLineDoc: + return QColor(0x3f,0x70,0x3f); + + case CommentNested: + return QColor(0xa0,0xc0,0xa0); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + case KeywordSecondary: + case KeywordDoc: + case Typedefs: + return QColor(0x00,0x00,0x7f); + + case String: + return QColor(0x7f,0x00,0x7f); + + case Character: + return QColor(0x7f,0x00,0x7f); + + case Operator: + case UnclosedString: + return QColor(0x00,0x00,0x00); + + case Identifier: + break; + + case CommentDocKeyword: + return QColor(0x30,0x60,0xa0); + + case CommentDocKeywordError: + return QColor(0x80,0x40,0x20); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerD::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerD::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: + case CommentDoc: + case CommentNested: + case CommentLineDoc: + case CommentDocKeyword: + case CommentDocKeywordError: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case KeywordSecondary: + case KeywordDoc: + case Typedefs: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case String: + case UnclosedString: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerD::keywords(int set) const +{ + if (set == 1) + return + "abstract alias align asm assert auto body bool break byte case " + "cast catch cdouble cent cfloat char class const continue creal " + "dchar debug default delegate delete deprecated do double else " + "enum export extern false final finally float for foreach " + "foreach_reverse function goto idouble if ifloat import in inout " + "int interface invariant ireal is lazy long mixin module new null " + "out override package pragma private protected public real return " + "scope short static struct super switch synchronized template " + "this throw true try typedef typeid typeof ubyte ucent uint ulong " + "union unittest ushort version void volatile wchar while with"; + + if (set == 3) + return + "a addindex addtogroup anchor arg attention author b brief bug c " + "class code date def defgroup deprecated dontinclude e em endcode " + "endhtmlonly endif endlatexonly endlink endverbatim enum example " + "exception f$ f[ f] file fn hideinitializer htmlinclude htmlonly " + "if image include ingroup internal invariant interface latexonly " + "li line link mainpage name namespace nosubgrouping note overload " + "p page par param post pre ref relates remarks return retval sa " + "section see showinitializer since skip skipline struct " + "subsection test throw todo typedef union until var verbatim " + "verbinclude version warning weakgroup $ @ \\ & < > # { }"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerD::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Block comment"); + + case CommentLine: + return tr("Line comment"); + + case CommentDoc: + return tr("DDoc style block comment"); + + case CommentNested: + return tr("Nesting comment"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case KeywordSecondary: + return tr("Secondary keyword"); + + case KeywordDoc: + return tr("Documentation keyword"); + + case Typedefs: + return tr("Type definition"); + + case String: + return tr("String"); + + case UnclosedString: + return tr("Unclosed string"); + + case Character: + return tr("Character"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case CommentLineDoc: + return tr("DDoc style line comment"); + + case CommentDocKeyword: + return tr("DDoc keyword"); + + case CommentDocKeywordError: + return tr("DDoc keyword error"); + + case BackquoteString: + return tr("Backquoted string"); + + case RawString: + return tr("Raw string"); + + case KeywordSet5: + return tr("User defined 1"); + + case KeywordSet6: + return tr("User defined 2"); + + case KeywordSet7: + return tr("User defined 3"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerD::defaultPaper(int style) const +{ + if (style == UnclosedString) + return QColor(0xe0,0xc0,0xe0); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerD::refreshProperties() +{ + setAtElseProp(); + setCommentProp(); + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerD::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerD::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldatelse", fold_atelse); + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Return true if else can be folded. +bool QsciLexerD::foldAtElse() const +{ + return fold_atelse; +} + + +// Set if else can be folded. +void QsciLexerD::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.at.else" property. +void QsciLexerD::setAtElseProp() +{ + emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0")); +} + + +// Return true if comments can be folded. +bool QsciLexerD::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerD::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerD::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerD::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerD::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerD::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerdiff.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerdiff.cpp new file mode 100644 index 000000000..f22f59b52 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerdiff.cpp @@ -0,0 +1,143 @@ +// This module implements the QsciLexerDiff class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerdiff.h" + +#include +#include +#include + + +// The ctor. +QsciLexerDiff::QsciLexerDiff(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerDiff::~QsciLexerDiff() +{ +} + + +// Returns the language name. +const char *QsciLexerDiff::language() const +{ + return "Diff"; +} + + +// Returns the lexer name. +const char *QsciLexerDiff::lexer() const +{ + return "diff"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerDiff::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerDiff::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x00,0x00,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Command: + return QColor(0x7f,0x7f,0x00); + + case Header: + return QColor(0x7f,0x00,0x00); + + case Position: + return QColor(0x7f,0x00,0x7f); + + case LineRemoved: + case AddingPatchRemoved: + case RemovingPatchRemoved: + return QColor(0x00,0x7f,0x7f); + + case LineAdded: + case AddingPatchAdded: + case RemovingPatchAdded: + return QColor(0x00,0x00,0x7f); + + case LineChanged: + return QColor(0x7f,0x7f,0x7f); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the user name of a style. +QString QsciLexerDiff::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Command: + return tr("Command"); + + case Header: + return tr("Header"); + + case Position: + return tr("Position"); + + case LineRemoved: + return tr("Removed line"); + + case LineAdded: + return tr("Added line"); + + case LineChanged: + return tr("Changed line"); + + case AddingPatchAdded: + return tr("Added adding patch"); + + case RemovingPatchAdded: + return tr("Removed adding patch"); + + case AddingPatchRemoved: + return tr("Added removing patch"); + + case RemovingPatchRemoved: + return tr("Removed removing patch"); + } + + return QString(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeredifact.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeredifact.cpp new file mode 100644 index 000000000..5bf09df8a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeredifact.cpp @@ -0,0 +1,122 @@ +// This module implements the QsciLexerEDIFACT class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexeredifact.h" + + +// The ctor. +QsciLexerEDIFACT::QsciLexerEDIFACT(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerEDIFACT::~QsciLexerEDIFACT() +{ +} + + +// Returns the language name. +const char *QsciLexerEDIFACT::language() const +{ + return "EDIFACT"; +} + + +// Returns the lexer name. +const char *QsciLexerEDIFACT::lexer() const +{ + return "edifact"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerEDIFACT::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80, 0x80, 0x80); + + case SegmentStart: + return QColor(0x00, 0x00, 0xcb); + + case SegmentEnd: + return QColor(0xff, 0x8d, 0xb1); + + case ElementSeparator: + return QColor(0xff, 0x8d, 0xb1); + + case CompositeSeparator: + return QColor(0x80, 0x80, 0x00); + + case ReleaseSeparator: + return QColor(0x5e, 0x5e, 0x5e); + + case UNASegmentHeader: + return QColor(0x00, 0x80, 0x00); + + case UNHSegmentHeader: + return QColor(0x2f, 0x8b, 0xbd); + + case BadSegment: + return QColor(0x80, 0x00, 0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the user name of a style. +QString QsciLexerEDIFACT::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case SegmentStart: + return tr("Segment start"); + + case SegmentEnd: + return tr("Segment end"); + + case ElementSeparator: + return tr("Element separator"); + + case CompositeSeparator: + return tr("Composite separator"); + + case ReleaseSeparator: + return tr("Release separator"); + + case UNASegmentHeader: + return tr("UNA segment header"); + + case UNHSegmentHeader: + return tr("UNH segment header"); + + case BadSegment: + return tr("Badly formed segment"); + } + + return QString(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran.cpp new file mode 100644 index 000000000..286d8cacc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran.cpp @@ -0,0 +1,109 @@ +// This module implements the QsciLexerFortran class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerfortran.h" + +#include +#include +#include + + +// The ctor. +QsciLexerFortran::QsciLexerFortran(QObject *parent) + : QsciLexerFortran77(parent) +{ +} + + +// The dtor. +QsciLexerFortran::~QsciLexerFortran() +{ +} + + +// Returns the language name. +const char *QsciLexerFortran::language() const +{ + return "Fortran"; +} + + +// Returns the lexer name. +const char *QsciLexerFortran::lexer() const +{ + return "fortran"; +} + + +// Returns the set of keywords. +const char *QsciLexerFortran::keywords(int set) const +{ + if (set == 2) + return + "abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint " + "ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 " + "amax1 amin0 amin1 amod anint any asin asind associated atan " + "atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size " + "bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin " + "cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count " + "cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan " + "datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos " + "dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits " + "dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product " + "dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh " + "eoshift epsilon errsns exp exponent float floati floatj floatk " + "floor fraction free huge iabs iachar iand ibclr ibits ibset " + "ichar idate idim idint idnint ieor ifix iiabs iiand iibclr " + "iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint " + "iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod " + "index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft " + "ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint " + "jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign " + "jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr " + "kibits kibset kidim kidint kidnnt kieor kifix kind kint kior " + "kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot " + "kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 " + "logical lshift malloc matmul max max0 max1 maxexponent maxloc " + "maxval merge min min0 min1 minexponent minloc minval mod modulo " + "mvbits nearest nint not nworkers number_of_processors pack " + "popcnt poppar precision present product radix random " + "random_number random_seed range real repeat reshape rrspacing " + "rshift scale scan secnds selected_int_kind selected_real_kind " + "set_exponent shape sign sin sind sinh size sizeof sngl snglq " + "spacing spread sqrt sum system_clock tan tand tanh tiny transfer " + "transpose trim ubound unpack verify"; + + if (set == 3) + return + "cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg " + "dcotan dcotand decode dimag dll_export dll_import doublecomplex " + "dreal dvchk encode find flen flush getarg getcharqq getcl getdat " + "getenv gettim hfix ibchng identifier imag int1 int2 int4 intc " + "intrup invalop iostat_msg isha ishc ishl jfix lacfar locking " + "locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq " + "precfill prompt qabs qacos qacosd qasin qasind qatan qatand " + "qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd " + "qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind " + "qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment " + "setdat settim system timer undfl unlock union val virtual " + "volatile zabs zcos zexp zlog zsin zsqrt"; + + return QsciLexerFortran77::keywords(set); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran77.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran77.cpp new file mode 100644 index 000000000..df568a8ef --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerfortran77.cpp @@ -0,0 +1,296 @@ +// This module implements the QsciLexerFortran77 class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerfortran77.h" + +#include +#include +#include + + +// The ctor. +QsciLexerFortran77::QsciLexerFortran77(QObject *parent) + : QsciLexer(parent), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerFortran77::~QsciLexerFortran77() +{ +} + + +// Returns the language name. +const char *QsciLexerFortran77::language() const +{ + return "Fortran77"; +} + + +// Returns the lexer name. +const char *QsciLexerFortran77::lexer() const +{ + return "f77"; +} + + +// Return the style used for braces. +int QsciLexerFortran77::braceStyle() const +{ + return Default; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerFortran77::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case SingleQuotedString: + case DoubleQuotedString: + return QColor(0x7f,0x00,0x7f); + + case UnclosedString: + case Operator: + case DottedOperator: + case Continuation: + return QColor(0x00,0x00,0x00); + + case Identifier: + break; + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case IntrinsicFunction: + return QColor(0xb0,0x00,0x40); + + case ExtendedFunction: + return QColor(0xb0,0x40,0x80); + + case PreProcessor: + return QColor(0x7f,0x7f,0x00); + + case Label: + return QColor(0xe0,0xc0,0xe0); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerFortran77::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerFortran77::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Operator: + case DottedOperator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerFortran77::keywords(int set) const +{ + if (set == 1) + return + "access action advance allocatable allocate apostrophe assign " + "assignment associate asynchronous backspace bind blank blockdata " + "call case character class close common complex contains continue " + "cycle data deallocate decimal delim default dimension direct do " + "dowhile double doubleprecision else elseif elsewhere encoding " + "end endassociate endblockdata enddo endfile endforall " + "endfunction endif endinterface endmodule endprogram endselect " + "endsubroutine endtype endwhere entry eor equivalence err errmsg " + "exist exit external file flush fmt forall form format formatted " + "function go goto id if implicit in include inout integer inquire " + "intent interface intrinsic iomsg iolength iostat kind len " + "logical module name named namelist nextrec nml none nullify " + "number only open opened operator optional out pad parameter pass " + "pause pending pointer pos position precision print private " + "program protected public quote read readwrite real rec recl " + "recursive result return rewind save select selectcase selecttype " + "sequential sign size stat status stop stream subroutine target " + "then to type unformatted unit use value volatile wait where " + "while write"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerFortran77::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Number: + return tr("Number"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case UnclosedString: + return tr("Unclosed string"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case Keyword: + return tr("Keyword"); + + case IntrinsicFunction: + return tr("Intrinsic function"); + + case ExtendedFunction: + return tr("Extended function"); + + case PreProcessor: + return tr("Pre-processor block"); + + case DottedOperator: + return tr("Dotted operator"); + + case Label: + return tr("Label"); + + case Continuation: + return tr("Continuation"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerFortran77::defaultPaper(int style) const +{ + if (style == UnclosedString) + return QColor(0xe0,0xc0,0xe0); + + if (style == Continuation) + return QColor(0xf0,0xe0,0x80); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerFortran77::refreshProperties() +{ + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerFortran77::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = true; + + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerFortran77::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Return true if folds are compact. +bool QsciLexerFortran77::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerFortran77::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerFortran77::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhex.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhex.cpp new file mode 100644 index 000000000..c71fbeee3 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhex.cpp @@ -0,0 +1,156 @@ +// This module implements the abstract QsciLexerHex class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerhex.h" + +#include +#include + + +// The ctor. +QsciLexerHex::QsciLexerHex(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerHex::~QsciLexerHex() +{ +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerHex::defaultColor(int style) const +{ + switch (style) + { + case RecordStart: + case RecordType: + case UnknownRecordType: + return QColor(0x7f, 0x00, 0x00); + + case ByteCount: + return QColor(0x7f, 0x7f, 0x00); + + case IncorrectByteCount: + case IncorrectChecksum: + return QColor(0xff, 0xff, 0x00); + + case NoAddress: + case RecordCount: + return QColor(0x7f, 0x00, 0xff); + + case DataAddress: + case StartAddress: + case ExtendedAddress: + return QColor(0x00, 0x7f, 0xff); + + case Checksum: + return QColor(0x00, 0xbf, 0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerHex::defaultFont(int style) const +{ + QFont f = QsciLexer::defaultFont(style); + + if (style == UnknownRecordType || style == UnknownData || style == TrailingGarbage) + f.setItalic(true); + else if (style == OddData) + f.setBold(true); + + return f; +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerHex::defaultPaper(int style) const +{ + if (style == IncorrectByteCount || style == IncorrectChecksum) + return QColor(0xff, 0x00, 0x00); + + return QsciLexer::defaultPaper(style); +} + + +// Returns the user name of a style. +QString QsciLexerHex::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case RecordStart: + return tr("Record start"); + + case RecordType: + return tr("Record type"); + + case UnknownRecordType: + return tr("Unknown record type"); + + case ByteCount: + return tr("Byte count"); + + case IncorrectByteCount: + return tr("Incorrect byte count"); + + case NoAddress: + return tr("No address"); + + case DataAddress: + return tr("Data address"); + + case RecordCount: + return tr("Record count"); + + case StartAddress: + return tr("Start address"); + + case ExtendedAddress: + return tr("Extended address"); + + case OddData: + return tr("Odd data"); + + case EvenData: + return tr("Even data"); + + case UnknownData: + return tr("Unknown data"); + + case Checksum: + return tr("Checksum"); + + case IncorrectChecksum: + return tr("Incorrect checksum"); + + case TrailingGarbage: + return tr("Trailing garbage after a record"); + } + + return QString(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhtml.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhtml.cpp new file mode 100644 index 000000000..0a554c2ea --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerhtml.cpp @@ -0,0 +1,1181 @@ +// This module implements the QsciLexerHTML class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerhtml.h" + +#include +#include +#include + +#include "Qsci/qscilexerjavascript.h" +#include "Qsci/qscilexerpython.h" + + +// The ctor. +QsciLexerHTML::QsciLexerHTML(QObject *parent) + : QsciLexer(parent), + fold_compact(true), fold_preproc(true), case_sens_tags(false), + fold_script_comments(false), fold_script_heredocs(false), + django_templates(false), mako_templates(false) +{ +} + + +// The dtor. +QsciLexerHTML::~QsciLexerHTML() +{ +} + + +// Returns the language name. +const char *QsciLexerHTML::language() const +{ + return "HTML"; +} + + +// Returns the lexer name. +const char *QsciLexerHTML::lexer() const +{ + return "hypertext"; +} + + +// Return the auto-completion fillup characters. +const char *QsciLexerHTML::autoCompletionFillups() const +{ + return "/>"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerHTML::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerHTML::defaultColor(int style) const +{ + switch (style) + { + case Default: + case JavaScriptDefault: + case JavaScriptWord: + case JavaScriptSymbol: + case ASPJavaScriptDefault: + case ASPJavaScriptWord: + case ASPJavaScriptSymbol: + case VBScriptDefault: + case ASPVBScriptDefault: + case PHPOperator: + return QColor(0x00,0x00,0x00); + + case Tag: + case XMLTagEnd: + case Script: + case SGMLDefault: + case SGMLCommand: + case VBScriptKeyword: + case VBScriptIdentifier: + case VBScriptUnclosedString: + case ASPVBScriptKeyword: + case ASPVBScriptIdentifier: + case ASPVBScriptUnclosedString: + return QColor(0x00,0x00,0x80); + + case UnknownTag: + case UnknownAttribute: + return QColor(0xff,0x00,0x00); + + case Attribute: + case VBScriptNumber: + case ASPVBScriptNumber: + return QColor(0x00,0x80,0x80); + + case HTMLNumber: + case JavaScriptNumber: + case ASPJavaScriptNumber: + case PythonNumber: + case PythonFunctionMethodName: + case ASPPythonNumber: + case ASPPythonFunctionMethodName: + return QColor(0x00,0x7f,0x7f); + + case HTMLDoubleQuotedString: + case HTMLSingleQuotedString: + case JavaScriptDoubleQuotedString: + case JavaScriptSingleQuotedString: + case ASPJavaScriptDoubleQuotedString: + case ASPJavaScriptSingleQuotedString: + case PythonDoubleQuotedString: + case PythonSingleQuotedString: + case ASPPythonDoubleQuotedString: + case ASPPythonSingleQuotedString: + case PHPKeyword: + return QColor(0x7f,0x00,0x7f); + + case OtherInTag: + case Entity: + case VBScriptString: + case ASPVBScriptString: + return QColor(0x80,0x00,0x80); + + case HTMLComment: + case SGMLComment: + return QColor(0x80,0x80,0x00); + + case XMLStart: + case XMLEnd: + case PHPStart: + case PythonClassName: + case ASPPythonClassName: + return QColor(0x00,0x00,0xff); + + case HTMLValue: + return QColor(0xff,0x00,0xff); + + case SGMLParameter: + return QColor(0x00,0x66,0x00); + + case SGMLDoubleQuotedString: + case SGMLError: + return QColor(0x80,0x00,0x00); + + case SGMLSingleQuotedString: + return QColor(0x99,0x33,0x00); + + case SGMLSpecial: + return QColor(0x33,0x66,0xff); + + case SGMLEntity: + return QColor(0x33,0x33,0x33); + + case SGMLBlockDefault: + return QColor(0x00,0x00,0x66); + + case JavaScriptStart: + case ASPJavaScriptStart: + return QColor(0x7f,0x7f,0x00); + + case JavaScriptComment: + case JavaScriptCommentLine: + case ASPJavaScriptComment: + case ASPJavaScriptCommentLine: + case PythonComment: + case ASPPythonComment: + case PHPDoubleQuotedString: + return QColor(0x00,0x7f,0x00); + + case JavaScriptCommentDoc: + return QColor(0x3f,0x70,0x3f); + + case JavaScriptKeyword: + case ASPJavaScriptKeyword: + case PythonKeyword: + case ASPPythonKeyword: + case PHPVariable: + case PHPDoubleQuotedVariable: + return QColor(0x00,0x00,0x7f); + + case ASPJavaScriptCommentDoc: + return QColor(0x7f,0x7f,0x7f); + + case VBScriptComment: + case ASPVBScriptComment: + return QColor(0x00,0x80,0x00); + + case PythonStart: + case PythonDefault: + case ASPPythonStart: + case ASPPythonDefault: + return QColor(0x80,0x80,0x80); + + case PythonTripleSingleQuotedString: + case PythonTripleDoubleQuotedString: + case ASPPythonTripleSingleQuotedString: + case ASPPythonTripleDoubleQuotedString: + return QColor(0x7f,0x00,0x00); + + case PHPDefault: + return QColor(0x00,0x00,0x33); + + case PHPSingleQuotedString: + return QColor(0x00,0x9f,0x00); + + case PHPNumber: + return QColor(0xcc,0x99,0x00); + + case PHPComment: + return QColor(0x99,0x99,0x99); + + case PHPCommentLine: + return QColor(0x66,0x66,0x66); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerHTML::defaultEolFill(int style) const +{ + switch (style) + { + case JavaScriptDefault: + case JavaScriptComment: + case JavaScriptCommentDoc: + case JavaScriptUnclosedString: + case ASPJavaScriptDefault: + case ASPJavaScriptComment: + case ASPJavaScriptCommentDoc: + case ASPJavaScriptUnclosedString: + case VBScriptDefault: + case VBScriptComment: + case VBScriptNumber: + case VBScriptKeyword: + case VBScriptString: + case VBScriptIdentifier: + case VBScriptUnclosedString: + case ASPVBScriptDefault: + case ASPVBScriptComment: + case ASPVBScriptNumber: + case ASPVBScriptKeyword: + case ASPVBScriptString: + case ASPVBScriptIdentifier: + case ASPVBScriptUnclosedString: + case PythonDefault: + case PythonComment: + case PythonNumber: + case PythonDoubleQuotedString: + case PythonSingleQuotedString: + case PythonKeyword: + case PythonTripleSingleQuotedString: + case PythonTripleDoubleQuotedString: + case PythonClassName: + case PythonFunctionMethodName: + case PythonOperator: + case PythonIdentifier: + case ASPPythonDefault: + case ASPPythonComment: + case ASPPythonNumber: + case ASPPythonDoubleQuotedString: + case ASPPythonSingleQuotedString: + case ASPPythonKeyword: + case ASPPythonTripleSingleQuotedString: + case ASPPythonTripleDoubleQuotedString: + case ASPPythonClassName: + case ASPPythonFunctionMethodName: + case ASPPythonOperator: + case ASPPythonIdentifier: + case PHPDefault: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerHTML::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Default: + case Entity: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman",11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter",10); +#endif + break; + + case HTMLComment: +#if defined(Q_OS_WIN) + f = QFont("Verdana",9); +#elif defined(Q_OS_MAC) + f = QFont("Verdana", 12); +#else + f = QFont("Bitstream Vera Sans",8); +#endif + break; + + case SGMLCommand: + case PythonKeyword: + case PythonClassName: + case PythonFunctionMethodName: + case PythonOperator: + case ASPPythonKeyword: + case ASPPythonClassName: + case ASPPythonFunctionMethodName: + case ASPPythonOperator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case JavaScriptDefault: + case JavaScriptCommentDoc: + case JavaScriptKeyword: + case JavaScriptSymbol: + case ASPJavaScriptDefault: + case ASPJavaScriptCommentDoc: + case ASPJavaScriptKeyword: + case ASPJavaScriptSymbol: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + f.setBold(true); + break; + + case JavaScriptComment: + case JavaScriptCommentLine: + case JavaScriptNumber: + case JavaScriptWord: + case JavaScriptDoubleQuotedString: + case JavaScriptSingleQuotedString: + case ASPJavaScriptComment: + case ASPJavaScriptCommentLine: + case ASPJavaScriptNumber: + case ASPJavaScriptWord: + case ASPJavaScriptDoubleQuotedString: + case ASPJavaScriptSingleQuotedString: + case VBScriptComment: + case ASPVBScriptComment: + case PythonComment: + case ASPPythonComment: + case PHPComment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case VBScriptDefault: + case VBScriptNumber: + case VBScriptString: + case VBScriptIdentifier: + case VBScriptUnclosedString: + case ASPVBScriptDefault: + case ASPVBScriptNumber: + case ASPVBScriptString: + case ASPVBScriptIdentifier: + case ASPVBScriptUnclosedString: +#if defined(Q_OS_WIN) + f = QFont("Lucida Sans Unicode",9); +#elif defined(Q_OS_MAC) + f = QFont("Lucida Grande", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case VBScriptKeyword: + case ASPVBScriptKeyword: +#if defined(Q_OS_WIN) + f = QFont("Lucida Sans Unicode",9); +#elif defined(Q_OS_MAC) + f = QFont("Lucida Grande", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + f.setBold(true); + break; + + case PythonDoubleQuotedString: + case PythonSingleQuotedString: + case ASPPythonDoubleQuotedString: + case ASPPythonSingleQuotedString: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier New", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + case PHPKeyword: + case PHPVariable: + case PHPDoubleQuotedVariable: + f = QsciLexer::defaultFont(style); + f.setItalic(true); + break; + + case PHPCommentLine: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + f.setItalic(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerHTML::keywords(int set) const +{ + if (set == 1) + return + "a abbr acronym address applet area " + "b base basefont bdo big blockquote body br button " + "caption center cite code col colgroup " + "dd del dfn dir div dl dt " + "em " + "fieldset font form frame frameset " + "h1 h2 h3 h4 h5 h6 head hr html " + "i iframe img input ins isindex " + "kbd " + "label legend li link " + "map menu meta " + "noframes noscript " + "object ol optgroup option " + "p param pre " + "q " + "s samp script select small span strike strong style " + "sub sup " + "table tbody td textarea tfoot th thead title tr tt " + "u ul " + "var " + "xml xmlns " + "abbr accept-charset accept accesskey action align " + "alink alt archive axis " + "background bgcolor border " + "cellpadding cellspacing char charoff charset checked " + "cite class classid clear codebase codetype color " + "cols colspan compact content coords " + "data datafld dataformatas datapagesize datasrc " + "datetime declare defer dir disabled " + "enctype event " + "face for frame frameborder " + "headers height href hreflang hspace http-equiv " + "id ismap label lang language leftmargin link " + "longdesc " + "marginwidth marginheight maxlength media method " + "multiple " + "name nohref noresize noshade nowrap " + "object onblur onchange onclick ondblclick onfocus " + "onkeydown onkeypress onkeyup onload onmousedown " + "onmousemove onmouseover onmouseout onmouseup onreset " + "onselect onsubmit onunload " + "profile prompt " + "readonly rel rev rows rowspan rules " + "scheme scope selected shape size span src standby " + "start style summary " + "tabindex target text title topmargin type " + "usemap " + "valign value valuetype version vlink vspace " + "width " + "text password checkbox radio submit reset file " + "hidden image " + "public !doctype"; + + if (set == 2) + return QsciLexerJavaScript::keywordClass; + + if (set == 3) + return + // Move these to QsciLexerVisualBasic when we + // get round to implementing it. + "and begin case call continue do each else elseif end " + "erase error event exit false for function get gosub " + "goto if implement in load loop lset me mid new next " + "not nothing on or property raiseevent rem resume " + "return rset select set stop sub then to true unload " + "until wend while with withevents attribute alias as " + "boolean byref byte byval const compare currency date " + "declare dim double enum explicit friend global " + "integer let lib long module object option optional " + "preserve private property public redim single static " + "string type variant"; + + if (set == 4) + return QsciLexerPython::keywordClass; + + if (set == 5) + return + "and argv as argc break case cfunction class continue " + "declare default do die " + "echo else elseif empty enddeclare endfor endforeach " + "endif endswitch endwhile e_all e_parse e_error " + "e_warning eval exit extends " + "false for foreach function global " + "http_cookie_vars http_get_vars http_post_vars " + "http_post_files http_env_vars http_server_vars " + "if include include_once list new not null " + "old_function or " + "parent php_os php_self php_version print " + "require require_once return " + "static switch stdclass this true var xor virtual " + "while " + "__file__ __line__ __sleep __wakeup"; + + if (set == 6) + return "ELEMENT DOCTYPE ATTLIST ENTITY NOTATION"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerHTML::description(int style) const +{ + switch (style) + { + case Default: + return tr("HTML default"); + + case Tag: + return tr("Tag"); + + case UnknownTag: + return tr("Unknown tag"); + + case Attribute: + return tr("Attribute"); + + case UnknownAttribute: + return tr("Unknown attribute"); + + case HTMLNumber: + return tr("HTML number"); + + case HTMLDoubleQuotedString: + return tr("HTML double-quoted string"); + + case HTMLSingleQuotedString: + return tr("HTML single-quoted string"); + + case OtherInTag: + return tr("Other text in a tag"); + + case HTMLComment: + return tr("HTML comment"); + + case Entity: + return tr("Entity"); + + case XMLTagEnd: + return tr("End of a tag"); + + case XMLStart: + return tr("Start of an XML fragment"); + + case XMLEnd: + return tr("End of an XML fragment"); + + case Script: + return tr("Script tag"); + + case ASPAtStart: + return tr("Start of an ASP fragment with @"); + + case ASPStart: + return tr("Start of an ASP fragment"); + + case CDATA: + return tr("CDATA"); + + case PHPStart: + return tr("Start of a PHP fragment"); + + case HTMLValue: + return tr("Unquoted HTML value"); + + case ASPXCComment: + return tr("ASP X-Code comment"); + + case SGMLDefault: + return tr("SGML default"); + + case SGMLCommand: + return tr("SGML command"); + + case SGMLParameter: + return tr("First parameter of an SGML command"); + + case SGMLDoubleQuotedString: + return tr("SGML double-quoted string"); + + case SGMLSingleQuotedString: + return tr("SGML single-quoted string"); + + case SGMLError: + return tr("SGML error"); + + case SGMLSpecial: + return tr("SGML special entity"); + + case SGMLComment: + return tr("SGML comment"); + + case SGMLParameterComment: + return tr("First parameter comment of an SGML command"); + + case SGMLBlockDefault: + return tr("SGML block default"); + + case JavaScriptStart: + return tr("Start of a JavaScript fragment"); + + case JavaScriptDefault: + return tr("JavaScript default"); + + case JavaScriptComment: + return tr("JavaScript comment"); + + case JavaScriptCommentLine: + return tr("JavaScript line comment"); + + case JavaScriptCommentDoc: + return tr("JavaDoc style JavaScript comment"); + + case JavaScriptNumber: + return tr("JavaScript number"); + + case JavaScriptWord: + return tr("JavaScript word"); + + case JavaScriptKeyword: + return tr("JavaScript keyword"); + + case JavaScriptDoubleQuotedString: + return tr("JavaScript double-quoted string"); + + case JavaScriptSingleQuotedString: + return tr("JavaScript single-quoted string"); + + case JavaScriptSymbol: + return tr("JavaScript symbol"); + + case JavaScriptUnclosedString: + return tr("JavaScript unclosed string"); + + case JavaScriptRegex: + return tr("JavaScript regular expression"); + + case ASPJavaScriptStart: + return tr("Start of an ASP JavaScript fragment"); + + case ASPJavaScriptDefault: + return tr("ASP JavaScript default"); + + case ASPJavaScriptComment: + return tr("ASP JavaScript comment"); + + case ASPJavaScriptCommentLine: + return tr("ASP JavaScript line comment"); + + case ASPJavaScriptCommentDoc: + return tr("JavaDoc style ASP JavaScript comment"); + + case ASPJavaScriptNumber: + return tr("ASP JavaScript number"); + + case ASPJavaScriptWord: + return tr("ASP JavaScript word"); + + case ASPJavaScriptKeyword: + return tr("ASP JavaScript keyword"); + + case ASPJavaScriptDoubleQuotedString: + return tr("ASP JavaScript double-quoted string"); + + case ASPJavaScriptSingleQuotedString: + return tr("ASP JavaScript single-quoted string"); + + case ASPJavaScriptSymbol: + return tr("ASP JavaScript symbol"); + + case ASPJavaScriptUnclosedString: + return tr("ASP JavaScript unclosed string"); + + case ASPJavaScriptRegex: + return tr("ASP JavaScript regular expression"); + + case VBScriptStart: + return tr("Start of a VBScript fragment"); + + case VBScriptDefault: + return tr("VBScript default"); + + case VBScriptComment: + return tr("VBScript comment"); + + case VBScriptNumber: + return tr("VBScript number"); + + case VBScriptKeyword: + return tr("VBScript keyword"); + + case VBScriptString: + return tr("VBScript string"); + + case VBScriptIdentifier: + return tr("VBScript identifier"); + + case VBScriptUnclosedString: + return tr("VBScript unclosed string"); + + case ASPVBScriptStart: + return tr("Start of an ASP VBScript fragment"); + + case ASPVBScriptDefault: + return tr("ASP VBScript default"); + + case ASPVBScriptComment: + return tr("ASP VBScript comment"); + + case ASPVBScriptNumber: + return tr("ASP VBScript number"); + + case ASPVBScriptKeyword: + return tr("ASP VBScript keyword"); + + case ASPVBScriptString: + return tr("ASP VBScript string"); + + case ASPVBScriptIdentifier: + return tr("ASP VBScript identifier"); + + case ASPVBScriptUnclosedString: + return tr("ASP VBScript unclosed string"); + + case PythonStart: + return tr("Start of a Python fragment"); + + case PythonDefault: + return tr("Python default"); + + case PythonComment: + return tr("Python comment"); + + case PythonNumber: + return tr("Python number"); + + case PythonDoubleQuotedString: + return tr("Python double-quoted string"); + + case PythonSingleQuotedString: + return tr("Python single-quoted string"); + + case PythonKeyword: + return tr("Python keyword"); + + case PythonTripleDoubleQuotedString: + return tr("Python triple double-quoted string"); + + case PythonTripleSingleQuotedString: + return tr("Python triple single-quoted string"); + + case PythonClassName: + return tr("Python class name"); + + case PythonFunctionMethodName: + return tr("Python function or method name"); + + case PythonOperator: + return tr("Python operator"); + + case PythonIdentifier: + return tr("Python identifier"); + + case ASPPythonStart: + return tr("Start of an ASP Python fragment"); + + case ASPPythonDefault: + return tr("ASP Python default"); + + case ASPPythonComment: + return tr("ASP Python comment"); + + case ASPPythonNumber: + return tr("ASP Python number"); + + case ASPPythonDoubleQuotedString: + return tr("ASP Python double-quoted string"); + + case ASPPythonSingleQuotedString: + return tr("ASP Python single-quoted string"); + + case ASPPythonKeyword: + return tr("ASP Python keyword"); + + case ASPPythonTripleDoubleQuotedString: + return tr("ASP Python triple double-quoted string"); + + case ASPPythonTripleSingleQuotedString: + return tr("ASP Python triple single-quoted string"); + + case ASPPythonClassName: + return tr("ASP Python class name"); + + case ASPPythonFunctionMethodName: + return tr("ASP Python function or method name"); + + case ASPPythonOperator: + return tr("ASP Python operator"); + + case ASPPythonIdentifier: + return tr("ASP Python identifier"); + + case PHPDefault: + return tr("PHP default"); + + case PHPDoubleQuotedString: + return tr("PHP double-quoted string"); + + case PHPSingleQuotedString: + return tr("PHP single-quoted string"); + + case PHPKeyword: + return tr("PHP keyword"); + + case PHPNumber: + return tr("PHP number"); + + case PHPVariable: + return tr("PHP variable"); + + case PHPComment: + return tr("PHP comment"); + + case PHPCommentLine: + return tr("PHP line comment"); + + case PHPDoubleQuotedVariable: + return tr("PHP double-quoted variable"); + + case PHPOperator: + return tr("PHP operator"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerHTML::defaultPaper(int style) const +{ + switch (style) + { + case ASPAtStart: + return QColor(0xff,0xff,0x00); + + case ASPStart: + case CDATA: + return QColor(0xff,0xdf,0x00); + + case PHPStart: + return QColor(0xff,0xef,0xbf); + + case HTMLValue: + return QColor(0xff,0xef,0xff); + + case SGMLDefault: + case SGMLCommand: + case SGMLParameter: + case SGMLDoubleQuotedString: + case SGMLSingleQuotedString: + case SGMLSpecial: + case SGMLEntity: + case SGMLComment: + return QColor(0xef,0xef,0xff); + + case SGMLError: + return QColor(0xff,0x66,0x66); + + case SGMLBlockDefault: + return QColor(0xcc,0xcc,0xe0); + + case JavaScriptDefault: + case JavaScriptComment: + case JavaScriptCommentLine: + case JavaScriptCommentDoc: + case JavaScriptNumber: + case JavaScriptWord: + case JavaScriptKeyword: + case JavaScriptDoubleQuotedString: + case JavaScriptSingleQuotedString: + case JavaScriptSymbol: + return QColor(0xf0,0xf0,0xff); + + case JavaScriptUnclosedString: + case ASPJavaScriptUnclosedString: + return QColor(0xbf,0xbb,0xb0); + + case JavaScriptRegex: + case ASPJavaScriptRegex: + return QColor(0xff,0xbb,0xb0); + + case ASPJavaScriptDefault: + case ASPJavaScriptComment: + case ASPJavaScriptCommentLine: + case ASPJavaScriptCommentDoc: + case ASPJavaScriptNumber: + case ASPJavaScriptWord: + case ASPJavaScriptKeyword: + case ASPJavaScriptDoubleQuotedString: + case ASPJavaScriptSingleQuotedString: + case ASPJavaScriptSymbol: + return QColor(0xdf,0xdf,0x7f); + + case VBScriptDefault: + case VBScriptComment: + case VBScriptNumber: + case VBScriptKeyword: + case VBScriptString: + case VBScriptIdentifier: + return QColor(0xef,0xef,0xff); + + case VBScriptUnclosedString: + case ASPVBScriptUnclosedString: + return QColor(0x7f,0x7f,0xff); + + case ASPVBScriptDefault: + case ASPVBScriptComment: + case ASPVBScriptNumber: + case ASPVBScriptKeyword: + case ASPVBScriptString: + case ASPVBScriptIdentifier: + return QColor(0xcf,0xcf,0xef); + + case PythonDefault: + case PythonComment: + case PythonNumber: + case PythonDoubleQuotedString: + case PythonSingleQuotedString: + case PythonKeyword: + case PythonTripleSingleQuotedString: + case PythonTripleDoubleQuotedString: + case PythonClassName: + case PythonFunctionMethodName: + case PythonOperator: + case PythonIdentifier: + return QColor(0xef,0xff,0xef); + + case ASPPythonDefault: + case ASPPythonComment: + case ASPPythonNumber: + case ASPPythonDoubleQuotedString: + case ASPPythonSingleQuotedString: + case ASPPythonKeyword: + case ASPPythonTripleSingleQuotedString: + case ASPPythonTripleDoubleQuotedString: + case ASPPythonClassName: + case ASPPythonFunctionMethodName: + case ASPPythonOperator: + case ASPPythonIdentifier: + return QColor(0xcf,0xef,0xcf); + + case PHPDefault: + case PHPDoubleQuotedString: + case PHPSingleQuotedString: + case PHPKeyword: + case PHPNumber: + case PHPVariable: + case PHPComment: + case PHPCommentLine: + case PHPDoubleQuotedVariable: + case PHPOperator: + return QColor(0xff,0xf8,0xf8); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerHTML::refreshProperties() +{ + setCompactProp(); + setPreprocProp(); + setCaseSensTagsProp(); + setScriptCommentsProp(); + setScriptHeredocsProp(); + setDjangoProp(); + setMakoProp(); +} + + +// Read properties from the settings. +bool QsciLexerHTML::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_preproc = qs.value(prefix + "foldpreprocessor", false).toBool(); + case_sens_tags = qs.value(prefix + "casesensitivetags", false).toBool(); + fold_script_comments = qs.value(prefix + "foldscriptcomments", false).toBool(); + fold_script_heredocs = qs.value(prefix + "foldscriptheredocs", false).toBool(); + django_templates = qs.value(prefix + "djangotemplates", false).toBool(); + mako_templates = qs.value(prefix + "makotemplates", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerHTML::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldpreprocessor", fold_preproc); + qs.setValue(prefix + "casesensitivetags", case_sens_tags); + qs.setValue(prefix + "foldscriptcomments", fold_script_comments); + qs.setValue(prefix + "foldscriptheredocs", fold_script_heredocs); + qs.setValue(prefix + "djangotemplates", django_templates); + qs.setValue(prefix + "makotemplates", mako_templates); + + return rc; +} + + +// Set if tags are case sensitive. +void QsciLexerHTML::setCaseSensitiveTags(bool sens) +{ + case_sens_tags = sens; + + setCaseSensTagsProp(); +} + + +// Set the "html.tags.case.sensitive" property. +void QsciLexerHTML::setCaseSensTagsProp() +{ + emit propertyChanged("html.tags.case.sensitive",(case_sens_tags ? "1" : "0")); +} + + +// Set if folds are compact +void QsciLexerHTML::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerHTML::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Set if preprocessor blocks can be folded. +void QsciLexerHTML::setFoldPreprocessor(bool fold) +{ + fold_preproc = fold; + + setPreprocProp(); +} + + +// Set the "fold.html.preprocessor" property. +void QsciLexerHTML::setPreprocProp() +{ + emit propertyChanged("fold.html.preprocessor",(fold_preproc ? "1" : "0")); +} + + +// Set if script comments can be folded. +void QsciLexerHTML::setFoldScriptComments(bool fold) +{ + fold_script_comments = fold; + + setScriptCommentsProp(); +} + + +// Set the "fold.hypertext.comment" property. +void QsciLexerHTML::setScriptCommentsProp() +{ + emit propertyChanged("fold.hypertext.comment",(fold_script_comments ? "1" : "0")); +} + + +// Set if script heredocs can be folded. +void QsciLexerHTML::setFoldScriptHeredocs(bool fold) +{ + fold_script_heredocs = fold; + + setScriptHeredocsProp(); +} + + +// Set the "fold.hypertext.heredoc" property. +void QsciLexerHTML::setScriptHeredocsProp() +{ + emit propertyChanged("fold.hypertext.heredoc",(fold_script_heredocs ? "1" : "0")); +} + + +// Set if Django templates are supported. +void QsciLexerHTML::setDjangoTemplates(bool enable) +{ + django_templates = enable; + + setDjangoProp(); +} + + +// Set the "lexer.html.django" property. +void QsciLexerHTML::setDjangoProp() +{ + emit propertyChanged("lexer.html.django", (django_templates ? "1" : "0")); +} + + +// Set if Mako templates are supported. +void QsciLexerHTML::setMakoTemplates(bool enable) +{ + mako_templates = enable; + + setMakoProp(); +} + + +// Set the "lexer.html.mako" property. +void QsciLexerHTML::setMakoProp() +{ + emit propertyChanged("lexer.html.mako", (mako_templates ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeridl.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeridl.cpp new file mode 100644 index 000000000..62558950a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeridl.cpp @@ -0,0 +1,100 @@ +// This module implements the QsciLexerIDL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexeridl.h" + +#include +#include + + +// The ctor. +QsciLexerIDL::QsciLexerIDL(QObject *parent) + : QsciLexerCPP(parent) +{ +} + + +// The dtor. +QsciLexerIDL::~QsciLexerIDL() +{ +} + + +// Returns the language name. +const char *QsciLexerIDL::language() const +{ + return "IDL"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerIDL::defaultColor(int style) const +{ + if (style == UUID) + return QColor(0x80,0x40,0x80); + + return QsciLexerCPP::defaultColor(style); +} + + +// Returns the set of keywords. +const char *QsciLexerIDL::keywords(int set) const +{ + if (set != 1) + return 0; + + return "aggregatable allocate appobject arrays async async_uuid " + "auto_handle bindable boolean broadcast byte byte_count " + "call_as callback char coclass code comm_status const " + "context_handle context_handle_noserialize " + "context_handle_serialize control cpp_quote custom decode " + "default defaultbind defaultcollelem defaultvalue " + "defaultvtable dispinterface displaybind dllname double dual " + "enable_allocate encode endpoint entry enum error_status_t " + "explicit_handle fault_status first_is float handle_t heap " + "helpcontext helpfile helpstring helpstringcontext " + "helpstringdll hidden hyper id idempotent ignore iid_as iid_is " + "immediatebind implicit_handle import importlib in include " + "in_line int __int64 __int3264 interface last_is lcid " + "length_is library licensed local long max_is maybe message " + "methods midl_pragma midl_user_allocate midl_user_free min_is " + "module ms_union ncacn_at_dsp ncacn_dnet_nsp ncacn_http " + "ncacn_ip_tcp ncacn_nb_ipx ncacn_nb_nb ncacn_nb_tcp ncacn_np " + "ncacn_spx ncacn_vns_spp ncadg_ip_udp ncadg_ipx ncadg_mq " + "ncalrpc nocode nonbrowsable noncreatable nonextensible notify " + "object odl oleautomation optimize optional out out_of_line " + "pipe pointer_default pragma properties propget propput " + "propputref ptr public range readonly ref represent_as " + "requestedit restricted retval shape short signed size_is " + "small source strict_context_handle string struct switch " + "switch_is switch_type transmit_as typedef uidefault union " + "unique unsigned user_marshal usesgetlasterror uuid v1_enum " + "vararg version void wchar_t wire_marshal"; +} + + +// Returns the user name of a style. +QString QsciLexerIDL::description(int style) const +{ + if (style == UUID) + return tr("UUID"); + + return QsciLexerCPP::description(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerintelhex.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerintelhex.cpp new file mode 100644 index 000000000..8eb2b91e9 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerintelhex.cpp @@ -0,0 +1,59 @@ +// This module implements the QsciLexerIntelHex class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerintelhex.h" + + +// The ctor. +QsciLexerIntelHex::QsciLexerIntelHex(QObject *parent) + : QsciLexerHex(parent) +{ +} + + +// The dtor. +QsciLexerIntelHex::~QsciLexerIntelHex() +{ +} + + +// Returns the language name. +const char *QsciLexerIntelHex::language() const +{ + return "Intel-Hex"; +} + + +// Returns the lexer name. +const char *QsciLexerIntelHex::lexer() const +{ + return "ihex"; +} + + +// Returns the user name of a style. +QString QsciLexerIntelHex::description(int style) const +{ + // Handle unsupported styles. + if (style == RecordCount) + return QString(); + + return QsciLexerHex::description(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjava.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjava.cpp new file mode 100644 index 000000000..ad3886653 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjava.cpp @@ -0,0 +1,57 @@ +// This module implements the QsciLexerJava class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerjava.h" + + +// The ctor. +QsciLexerJava::QsciLexerJava(QObject *parent) + : QsciLexerCPP(parent) +{ +} + + +// The dtor. +QsciLexerJava::~QsciLexerJava() +{ +} + + +// Returns the language name. +const char *QsciLexerJava::language() const +{ + return "Java"; +} + + +// Returns the set of keywords. +const char *QsciLexerJava::keywords(int set) const +{ + if (set != 1) + return 0; + + return "abstract assert boolean break byte case catch char class " + "const continue default do double else extends final finally " + "float for future generic goto if implements import inner " + "instanceof int interface long native new null operator outer " + "package private protected public rest return short static " + "super switch synchronized this throw throws transient try var " + "void volatile while"; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjavascript.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjavascript.cpp new file mode 100644 index 000000000..56f8e7752 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjavascript.cpp @@ -0,0 +1,120 @@ +// This module implements the QsciLexerJavaScript class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerjavascript.h" + +#include +#include + + +// The list of JavaScript keywords that can be used by other friendly lexers. +const char *QsciLexerJavaScript::keywordClass = + "abstract boolean break byte case catch char class const continue " + "debugger default delete do double else enum export extends final " + "finally float for function goto if implements import in instanceof " + "int interface long native new package private protected public " + "return short static super switch synchronized this throw throws " + "transient try typeof var void volatile while with"; + + +// The ctor. +QsciLexerJavaScript::QsciLexerJavaScript(QObject *parent) + : QsciLexerCPP(parent) +{ +} + + +// The dtor. +QsciLexerJavaScript::~QsciLexerJavaScript() +{ +} + + +// Returns the language name. +const char *QsciLexerJavaScript::language() const +{ + return "JavaScript"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerJavaScript::defaultColor(int style) const +{ + if (style == Regex) + return QColor(0x3f,0x7f,0x3f); + + return QsciLexerCPP::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerJavaScript::defaultEolFill(int style) const +{ + if (style == Regex) + return true; + + return QsciLexerCPP::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerJavaScript::defaultFont(int style) const +{ + if (style == Regex) +#if defined(Q_OS_WIN) + return QFont("Courier New",10); +#elif defined(Q_OS_MAC) + return QFont("Courier", 12); +#else + return QFont("Bitstream Vera Sans Mono",9); +#endif + + return QsciLexerCPP::defaultFont(style); +} + + +// Returns the set of keywords. +const char *QsciLexerJavaScript::keywords(int set) const +{ + if (set != 1) + return 0; + + return keywordClass; +} + + +// Returns the user name of a style. +QString QsciLexerJavaScript::description(int style) const +{ + if (style == Regex) + return tr("Regular expression"); + + return QsciLexerCPP::description(style); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerJavaScript::defaultPaper(int style) const +{ + if (style == Regex) + return QColor(0xe0,0xf0,0xff); + + return QsciLexer::defaultPaper(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjson.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjson.cpp new file mode 100644 index 000000000..bf30e5b22 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerjson.cpp @@ -0,0 +1,298 @@ +// This module implements the QsciLexerJSON class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerjson.h" + +#include +#include +#include + + +// The ctor. +QsciLexerJSON::QsciLexerJSON(QObject *parent) + : QsciLexer(parent), + allow_comments(true), escape_sequence(true), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerJSON::~QsciLexerJSON() +{ +} + + +// Returns the language name. +const char *QsciLexerJSON::language() const +{ + return "JSON"; +} + + +// Returns the lexer name. +const char *QsciLexerJSON::lexer() const +{ + return "json"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerJSON::defaultColor(int style) const +{ + switch (style) + { + case UnclosedString: + case Error: + return QColor(0xff, 0xff, 0xff); + + case Number: + return QColor(0x00, 0x7f, 0x7f); + + case String: + return QColor(0x7f, 0x00, 0x00); + + case Property: + return QColor(0x88, 0x0a, 0xe8); + + case EscapeSequence: + return QColor(0x0b, 0x98, 0x2e); + + case CommentLine: + case CommentBlock: + return QColor(0x05, 0xbb, 0xae); + + case Operator: + return QColor(0x18, 0x64, 0x4a); + + case IRI: + return QColor(0x00, 0x00, 0xff); + + case IRICompact: + return QColor(0xd1, 0x37, 0xc1); + + case Keyword: + return QColor(0x0b, 0xce, 0xa7); + + case KeywordLD: + return QColor(0xec, 0x28, 0x06); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerJSON::defaultEolFill(int style) const +{ + switch (style) + { + case UnclosedString: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerJSON::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case CommentLine: + f = QsciLexer::defaultFont(style); + f.setItalic(true); + break; + + case Keyword: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerJSON::keywords(int set) const +{ + if (set == 1) + return "false true null"; + + if (set == 2) + return + "@id @context @type @value @language @container @list @set " + "@reverse @index @base @vocab @graph"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerJSON::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Number: + return tr("Number"); + + case String: + return tr("String"); + + case UnclosedString: + return tr("Unclosed string"); + + case Property: + return tr("Property"); + + case EscapeSequence: + return tr("Escape sequence"); + + case CommentLine: + return tr("Line comment"); + + case CommentBlock: + return tr("Block comment"); + + case Operator: + return tr("Operator"); + + case IRI: + return tr("IRI"); + + case IRICompact: + return tr("JSON-LD compact IRI"); + + case Keyword: + return tr("JSON keyword"); + + case KeywordLD: + return tr("JSON-LD keyword"); + + case Error: + return tr("Parsing error"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerJSON::defaultPaper(int style) const +{ + switch (style) + { + case UnclosedString: + case Error: + return QColor(0xff, 0x00, 0x00); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerJSON::refreshProperties() +{ + setAllowCommentsProp(); + setEscapeSequenceProp(); + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerJSON::readProperties(QSettings &qs,const QString &prefix) +{ + allow_comments = qs.value(prefix + "allowcomments", true).toBool(); + escape_sequence = qs.value(prefix + "escapesequence", true).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return true; +} + + +// Write properties to the settings. +bool QsciLexerJSON::writeProperties(QSettings &qs,const QString &prefix) const +{ + qs.setValue(prefix + "allowcomments", allow_comments); + qs.setValue(prefix + "escapesequence", escape_sequence); + qs.setValue(prefix + "foldcompact", fold_compact); + + return true; +} + + +// Set if comments are highlighted +void QsciLexerJSON::setHighlightComments(bool highlight) +{ + allow_comments = highlight; + + setAllowCommentsProp(); +} + + +// Set the "lexer.json.allow.comments" property. +void QsciLexerJSON::setAllowCommentsProp() +{ + emit propertyChanged("lexer.json.allow.comments", + (allow_comments ? "1" : "0")); +} + + +// Set if escape sequences are highlighted. +void QsciLexerJSON::setHighlightEscapeSequences(bool highlight) +{ + escape_sequence = highlight; + + setEscapeSequenceProp(); +} + + +// Set the "lexer.json.escape.sequence" property. +void QsciLexerJSON::setEscapeSequenceProp() +{ + emit propertyChanged("lexer.json.escape.sequence", + (escape_sequence ? "1" : "0")); +} + + +// Set if folds are compact. +void QsciLexerJSON::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerJSON::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerlua.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerlua.cpp new file mode 100644 index 000000000..0792f295d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerlua.cpp @@ -0,0 +1,368 @@ +// This module implements the QsciLexerLua class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerlua.h" + +#include +#include +#include + + +// The ctor. +QsciLexerLua::QsciLexerLua(QObject *parent) + : QsciLexer(parent), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerLua::~QsciLexerLua() +{ +} + + +// Returns the language name. +const char *QsciLexerLua::language() const +{ + return "Lua"; +} + + +// Returns the lexer name. +const char *QsciLexerLua::lexer() const +{ + return "lua"; +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerLua::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << ":" << "."; + + return wl; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerLua::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return ""; +} + + +// Return the style used for braces. +int QsciLexerLua::braceStyle() const +{ + return Operator; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerLua::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x00,0x00,0x00); + + case Comment: + case LineComment: + return QColor(0x00,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + case BasicFunctions: + case StringTableMathsFunctions: + case CoroutinesIOSystemFacilities: + return QColor(0x00,0x00,0x7f); + + case String: + case Character: + case LiteralString: + return QColor(0x7f,0x00,0x7f); + + case Preprocessor: + case Label: + return QColor(0x7f,0x7f,0x00); + + case Operator: + case Identifier: + break; + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerLua::defaultEolFill(int style) const +{ + if (style == Comment || style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerLua::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case LineComment: + case LiteralString: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerLua::keywords(int set) const +{ + if (set == 1) + // Keywords. + return + "and break do else elseif end false for function if " + "in local nil not or repeat return then true until " + "while"; + + if (set == 2) + // Basic functions. + return + "_ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT _STDERR " + "_STDIN _STDOUT call dostring foreach foreachi getn " + "globals newtype rawget rawset require sort tinsert " + "tremove " + + "G getfenv getmetatable ipairs loadlib next pairs " + "pcall rawegal rawget rawset require setfenv " + "setmetatable xpcall string table math coroutine io " + "os debug"; + + if (set == 3) + // String, table and maths functions. + return + "abs acos asin atan atan2 ceil cos deg exp floor " + "format frexp gsub ldexp log log10 max min mod rad " + "random randomseed sin sqrt strbyte strchar strfind " + "strlen strlower strrep strsub strupper tan " + + "string.byte string.char string.dump string.find " + "string.len string.lower string.rep string.sub " + "string.upper string.format string.gfind string.gsub " + "table.concat table.foreach table.foreachi table.getn " + "table.sort table.insert table.remove table.setn " + "math.abs math.acos math.asin math.atan math.atan2 " + "math.ceil math.cos math.deg math.exp math.floor " + "math.frexp math.ldexp math.log math.log10 math.max " + "math.min math.mod math.pi math.rad math.random " + "math.randomseed math.sin math.sqrt math.tan"; + + if (set == 4) + // Coroutine, I/O and system facilities. + return + "openfile closefile readfrom writeto appendto remove " + "rename flush seek tmpfile tmpname read write clock " + "date difftime execute exit getenv setlocale time " + + "coroutine.create coroutine.resume coroutine.status " + "coroutine.wrap coroutine.yield io.close io.flush " + "io.input io.lines io.open io.output io.read " + "io.tmpfile io.type io.write io.stdin io.stdout " + "io.stderr os.clock os.date os.difftime os.execute " + "os.exit os.getenv os.remove os.rename os.setlocale " + "os.time os.tmpname"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerLua::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case LineComment: + return tr("Line comment"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case String: + return tr("String"); + + case Character: + return tr("Character"); + + case LiteralString: + return tr("Literal string"); + + case Preprocessor: + return tr("Preprocessor"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case UnclosedString: + return tr("Unclosed string"); + + case BasicFunctions: + return tr("Basic functions"); + + case StringTableMathsFunctions: + return tr("String, table and maths functions"); + + case CoroutinesIOSystemFacilities: + return tr("Coroutines, i/o and system facilities"); + + case KeywordSet5: + return tr("User defined 1"); + + case KeywordSet6: + return tr("User defined 2"); + + case KeywordSet7: + return tr("User defined 3"); + + case KeywordSet8: + return tr("User defined 4"); + + case Label: + return tr("Label"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerLua::defaultPaper(int style) const +{ + switch (style) + { + case Comment: + return QColor(0xd0,0xf0,0xf0); + + case LiteralString: + return QColor(0xe0,0xff,0xff); + + case UnclosedString: + return QColor(0xe0,0xc0,0xe0); + + case BasicFunctions: + return QColor(0xd0,0xff,0xd0); + + case StringTableMathsFunctions: + return QColor(0xd0,0xd0,0xff); + + case CoroutinesIOSystemFacilities: + return QColor(0xff,0xd0,0xd0); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerLua::refreshProperties() +{ + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerLua::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerLua::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Return true if folds are compact. +bool QsciLexerLua::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact. +void QsciLexerLua::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerLua::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermakefile.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermakefile.cpp new file mode 100644 index 000000000..7676e8a17 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermakefile.cpp @@ -0,0 +1,158 @@ +// This module implements the QsciLexerMakefile class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexermakefile.h" + +#include +#include + + +// The ctor. +QsciLexerMakefile::QsciLexerMakefile(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerMakefile::~QsciLexerMakefile() +{ +} + + +// Returns the language name. +const char *QsciLexerMakefile::language() const +{ + return "Makefile"; +} + + +// Returns the lexer name. +const char *QsciLexerMakefile::lexer() const +{ + return "makefile"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerMakefile::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerMakefile::defaultColor(int style) const +{ + switch (style) + { + case Default: + case Operator: + return QColor(0x00,0x00,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Preprocessor: + return QColor(0x7f,0x7f,0x00); + + case Variable: + return QColor(0x00,0x00,0x80); + + case Target: + return QColor(0xa0,0x00,0x00); + + case Error: + return QColor(0xff,0xff,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerMakefile::defaultEolFill(int style) const +{ + if (style == Error) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerMakefile::defaultFont(int style) const +{ + QFont f; + + if (style == Comment) +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + else + f = QsciLexer::defaultFont(style); + + return f; +} + + +// Returns the user name of a style. +QString QsciLexerMakefile::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Preprocessor: + return tr("Preprocessor"); + + case Variable: + return tr("Variable"); + + case Operator: + return tr("Operator"); + + case Target: + return tr("Target"); + + case Error: + return tr("Error"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerMakefile::defaultPaper(int style) const +{ + if (style == Error) + return QColor(0xff,0x00,0x00); + + return QsciLexer::defaultPaper(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermarkdown.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermarkdown.cpp new file mode 100644 index 000000000..97a9f24c5 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermarkdown.cpp @@ -0,0 +1,289 @@ +// This module implements the QsciLexerMarkdown class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexermarkdown.h" + +#include + + +// The ctor. +QsciLexerMarkdown::QsciLexerMarkdown(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerMarkdown::~QsciLexerMarkdown() +{ +} + + +// Returns the language name. +const char *QsciLexerMarkdown::language() const +{ + return "Markdown"; +} + + +// Returns the lexer name. +const char *QsciLexerMarkdown::lexer() const +{ + return "markdown"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerMarkdown::defaultColor(int style) const +{ + switch (style) + { + case Special: + return QColor(0xcc, 0x00, 0xff); + + case StrongEmphasisAsterisks: + case StrongEmphasisUnderscores: + return QColor(0x22, 0x44, 0x66); + + case EmphasisAsterisks: + case EmphasisUnderscores: + return QColor(0x88, 0x00, 0x88); + + case Header1: + return QColor(0xff, 0x77, 0x00); + + case Header2: + return QColor(0xdd, 0x66, 0x00); + + case Header3: + return QColor(0xbb, 0x55, 0x00); + + case Header4: + return QColor(0x99, 0x44, 0x00); + + case Header5: + return QColor(0x77, 0x33, 0x00); + + case Header6: + return QColor(0x55, 0x22, 0x00); + + case Prechar: + return QColor(0x00, 0x00, 0x00); + + case UnorderedListItem: + return QColor(0x82, 0x5d, 0x00); + + case OrderedListItem: + return QColor(0x00, 0x00, 0x70); + + case BlockQuote: + return QColor(0x00, 0x66, 0x00); + + case StrikeOut: + return QColor(0xdd, 0xdd, 0xdd); + + case HorizontalRule: + return QColor(0x1f, 0x1c, 0x1b); + + case Link: + return QColor(0x00, 0x00, 0xaa); + + case CodeBackticks: + case CodeDoubleBackticks: + return QColor(0x7f, 0x00, 0x7f); + + case CodeBlock: + return QColor(0x00, 0x45, 0x8a); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerMarkdown::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case StrongEmphasisAsterisks: + case StrongEmphasisUnderscores: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case EmphasisAsterisks: + case EmphasisUnderscores: + f = QsciLexer::defaultFont(style); + f.setItalic(true); + break; + + case Header1: + case Header2: + case Header3: + case Header4: + case Header5: + case Header6: +#if defined(Q_OS_WIN) + f = QFont("Courier New", 10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono", 9); +#endif + f.setBold(true); + break; + + case HorizontalRule: + case CodeBackticks: + case CodeDoubleBackticks: + case CodeBlock: +#if defined(Q_OS_WIN) + f = QFont("Courier New", 10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono", 9); +#endif + break; + + case Link: + f = QsciLexer::defaultFont(style); + f.setUnderline(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerMarkdown::defaultPaper(int style) const +{ + switch (style) + { + case Prechar: + return QColor(0xee, 0xee, 0xaa); + + case UnorderedListItem: + return QColor(0xde, 0xd8, 0xc3); + + case OrderedListItem: + return QColor(0xb8, 0xc3, 0xe1); + + case BlockQuote: + return QColor(0xcb, 0xdc, 0xcb); + + case StrikeOut: + return QColor(0xaa, 0x00, 0x00); + + case HorizontalRule: + return QColor(0xe7, 0xd1, 0xc9); + + case CodeBackticks: + case CodeDoubleBackticks: + return QColor(0xef, 0xff, 0xef); + + case CodeBlock: + return QColor(0xc5, 0xe0, 0xf5); + } + + return QsciLexer::defaultPaper(style); +} + + +// Returns the user name of a style. +QString QsciLexerMarkdown::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Special: + return tr("Special"); + + case StrongEmphasisAsterisks: + return tr("Strong emphasis using double asterisks"); + + case StrongEmphasisUnderscores: + return tr("Strong emphasis using double underscores"); + + case EmphasisAsterisks: + return tr("Emphasis using single asterisks"); + + case EmphasisUnderscores: + return tr("Emphasis using single underscores"); + + case Header1: + return tr("Level 1 header"); + + case Header2: + return tr("Level 2 header"); + + case Header3: + return tr("Level 3 header"); + + case Header4: + return tr("Level 4 header"); + + case Header5: + return tr("Level 5 header"); + + case Header6: + return tr("Level 6 header"); + + case Prechar: + return tr("Pre-char"); + + case UnorderedListItem: + return tr("Unordered list item"); + + case OrderedListItem: + return tr("Ordered list item"); + + case BlockQuote: + return tr("Block quote"); + + case StrikeOut: + return tr("Strike out"); + + case HorizontalRule: + return tr("Horizontal rule"); + + case Link: + return tr("Link"); + + case CodeBackticks: + return tr("Code between backticks"); + + case CodeDoubleBackticks: + return tr("Code between double backticks"); + + case CodeBlock: + return tr("Code block"); + } + + return QString(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermasm.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermasm.cpp new file mode 100644 index 000000000..1bed35ad3 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermasm.cpp @@ -0,0 +1,48 @@ +// This module implements the QsciLexerMASM class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexermasm.h" + + +// The ctor. +QsciLexerMASM::QsciLexerMASM(QObject *parent) + : QsciLexerAsm(parent) +{ +} + + +// The dtor. +QsciLexerMASM::~QsciLexerMASM() +{ +} + + +// Returns the language name. +const char *QsciLexerMASM::language() const +{ + return "MASM"; +} + + +// Returns the lexer name. +const char *QsciLexerMASM::lexer() const +{ + return "asm"; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermatlab.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermatlab.cpp new file mode 100644 index 000000000..dbcf77ffa --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexermatlab.cpp @@ -0,0 +1,161 @@ +// This module implements the QsciLexerMatlab class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexermatlab.h" + +#include +#include + + +// The ctor. +QsciLexerMatlab::QsciLexerMatlab(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerMatlab::~QsciLexerMatlab() +{ +} + + +// Returns the language name. +const char *QsciLexerMatlab::language() const +{ + return "Matlab"; +} + + +// Returns the lexer name. +const char *QsciLexerMatlab::lexer() const +{ + return "matlab"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerMatlab::defaultColor(int style) const +{ + switch (style) + { + case Default: + case Operator: + return QColor(0x00,0x00,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Command: + return QColor(0x7f,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case SingleQuotedString: + case DoubleQuotedString: + return QColor(0x7f,0x00,0x7f); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerMatlab::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerMatlab::keywords(int set) const +{ + if (set == 1) + return + "break case catch continue else elseif end for function " + "global if otherwise persistent return switch try while"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerMatlab::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Command: + return tr("Command"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + } + + return QString(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexernasm.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexernasm.cpp new file mode 100644 index 000000000..054adf1df --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexernasm.cpp @@ -0,0 +1,48 @@ +// This module implements the QsciLexerNASM class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexernasm.h" + + +// The ctor. +QsciLexerNASM::QsciLexerNASM(QObject *parent) + : QsciLexerAsm(parent) +{ +} + + +// The dtor. +QsciLexerNASM::~QsciLexerNASM() +{ +} + + +// Returns the language name. +const char *QsciLexerNASM::language() const +{ + return "NASM"; +} + + +// Returns the lexer name. +const char *QsciLexerNASM::lexer() const +{ + return "as"; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeroctave.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeroctave.cpp new file mode 100644 index 000000000..192d7e8af --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeroctave.cpp @@ -0,0 +1,68 @@ +// This module implements the QsciLexerOctave class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexeroctave.h" + +#include +#include + + +// The ctor. +QsciLexerOctave::QsciLexerOctave(QObject *parent) + : QsciLexerMatlab(parent) +{ +} + + +// The dtor. +QsciLexerOctave::~QsciLexerOctave() +{ +} + + +// Returns the language name. +const char *QsciLexerOctave::language() const +{ + return "Octave"; +} + + +// Returns the lexer name. +const char *QsciLexerOctave::lexer() const +{ + return "octave"; +} + + +// Returns the set of keywords. +const char *QsciLexerOctave::keywords(int set) const +{ + if (set == 1) + return + "__FILE__ __LINE__ break case catch classdef continue do else " + "elseif end end_try_catch end_unwind_protect endclassdef " + "endenumeration endevents endfor endfunction endif endmethods " + "endparfor endproperties endswitch endwhile enumeration events " + "for function get global if methods otherwise parfor persistent " + "properties return set static switch try until unwind_protect " + "unwind_protect_cleanup while"; + + return 0; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpascal.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpascal.cpp new file mode 100644 index 000000000..3d7f8162d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpascal.cpp @@ -0,0 +1,432 @@ +// This module implements the QsciLexerPascal class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerpascal.h" + +#include +#include +#include + + +// The ctor. +QsciLexerPascal::QsciLexerPascal(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true), fold_preproc(false), + smart_highlight(true) +{ +} + + +// The dtor. +QsciLexerPascal::~QsciLexerPascal() +{ +} + + +// Returns the language name. +const char *QsciLexerPascal::language() const +{ + return "Pascal"; +} + + +// Returns the lexer name. +const char *QsciLexerPascal::lexer() const +{ + return "pascal"; +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerPascal::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << "." << "^"; + + return wl; +} + + +// Return the list of keywords that can start a block. +const char *QsciLexerPascal::blockStartKeyword(int *style) const +{ + if (style) + *style = Keyword; + + return + "case class do else for then private protected public published " + "repeat try while type"; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerPascal::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return "begin"; +} + + +// Return the list of characters that can end a block. +const char *QsciLexerPascal::blockEnd(int *style) const +{ + if (style) + *style = Operator; + + return "end"; +} + + +// Return the style used for braces. +int QsciLexerPascal::braceStyle() const +{ + return Operator; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPascal::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Identifier: + break; + + case Comment: + case CommentParenthesis: + case CommentLine: + return QColor(0x00,0x7f,0x00); + + case PreProcessor: + case PreProcessorParenthesis: + return QColor(0x7f,0x7f,0x00); + + case Number: + case HexNumber: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case SingleQuotedString: + case Character: + return QColor(0x7f,0x00,0x7f); + + case UnclosedString: + case Operator: + return QColor(0x00,0x00,0x00); + + case Asm: + return QColor(0x80,0x40,0x80); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerPascal::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerPascal::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentParenthesis: + case CommentLine: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case SingleQuotedString: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman", 11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter", 10); +#endif + f.setItalic(true); + break; + + case UnclosedString: +#if defined(Q_OS_WIN) + f = QFont("Courier New", 10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono", 9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerPascal::defaultPaper(int style) const +{ + if (style == UnclosedString) + return QColor(0xe0,0xc0,0xe0); + + return QsciLexer::defaultPaper(style); +} + + +// Returns the set of keywords. +const char *QsciLexerPascal::keywords(int set) const +{ + if (set == 1) + return + "absolute abstract and array as asm assembler automated begin " + "case cdecl class const constructor delayed deprecated destructor " + "dispid dispinterface div do downto dynamic else end except " + "experimental export exports external far file final finalization " + "finally for forward function goto helper if implementation in " + "inherited initialization inline interface is label library " + "message mod near nil not object of on operator or out overload " + "override packed pascal platform private procedure program " + "property protected public published raise record reference " + "register reintroduce repeat resourcestring safecall sealed set " + "shl shr static stdcall strict string then threadvar to try type " + "unit unsafe until uses var varargs virtual while winapi with xor" + "add default implements index name nodefault read readonly remove " + "stored write writeonly" + "package contains requires"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerPascal::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Identifier: + return tr("Identifier"); + + case Comment: + return tr("'{ ... }' style comment"); + + case CommentParenthesis: + return tr("'(* ... *)' style comment"); + + case CommentLine: + return tr("Line comment"); + + case PreProcessor: + return tr("'{$ ... }' style pre-processor block"); + + case PreProcessorParenthesis: + return tr("'(*$ ... *)' style pre-processor block"); + + case Number: + return tr("Number"); + + case HexNumber: + return tr("Hexadecimal number"); + + case Keyword: + return tr("Keyword"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case UnclosedString: + return tr("Unclosed string"); + + case Character: + return tr("Character"); + + case Operator: + return tr("Operator"); + + case Asm: + return tr("Inline asm"); + } + + return QString(); +} + + +// Refresh all properties. +void QsciLexerPascal::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setPreprocProp(); + setSmartHighlightProp(); +} + + +// Read properties from the settings. +bool QsciLexerPascal::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_preproc = qs.value(prefix + "foldpreprocessor", true).toBool(); + smart_highlight = qs.value(prefix + "smarthighlight", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerPascal::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldpreprocessor", fold_preproc); + qs.setValue(prefix + "smarthighlight", smart_highlight); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerPascal::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerPascal::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerPascal::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerPascal::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerPascal::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerPascal::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Return true if preprocessor blocks can be folded. +bool QsciLexerPascal::foldPreprocessor() const +{ + return fold_preproc; +} + + +// Set if preprocessor blocks can be folded. +void QsciLexerPascal::setFoldPreprocessor(bool fold) +{ + fold_preproc = fold; + + setPreprocProp(); +} + + +// Set the "fold.preprocessor" property. +void QsciLexerPascal::setPreprocProp() +{ + emit propertyChanged("fold.preprocessor",(fold_preproc ? "1" : "0")); +} + + +// Return true if smart highlighting is enabled. +bool QsciLexerPascal::smartHighlighting() const +{ + return smart_highlight; +} + + +// Set if smart highlighting is enabled. +void QsciLexerPascal::setSmartHighlighting(bool enabled) +{ + smart_highlight = enabled; + + setSmartHighlightProp(); +} + + +// Set the "lexer.pascal.smart.highlighting" property. +void QsciLexerPascal::setSmartHighlightProp() +{ + emit propertyChanged("lexer.pascal.smart.highlighting", (smart_highlight ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerperl.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerperl.cpp new file mode 100644 index 000000000..cce8f31df --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerperl.cpp @@ -0,0 +1,658 @@ +// This module implements the QsciLexerPerl class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerperl.h" + +#include +#include +#include + + +// The ctor. +QsciLexerPerl::QsciLexerPerl(QObject *parent) + : QsciLexer(parent), + fold_atelse(false), fold_comments(false), fold_compact(true), + fold_packages(true), fold_pod_blocks(true) +{ +} + + +// The dtor. +QsciLexerPerl::~QsciLexerPerl() +{ +} + + +// Returns the language name. +const char *QsciLexerPerl::language() const +{ + return "Perl"; +} + + +// Returns the lexer name. +const char *QsciLexerPerl::lexer() const +{ + return "perl"; +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerPerl::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << "::" << "->"; + + return wl; +} + + +// Return the list of characters that can start a block. +const char *QsciLexerPerl::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return "{"; +} + + +// Return the list of characters that can end a block. +const char *QsciLexerPerl::blockEnd(int *style) const +{ + if (style) + *style = Operator; + + return "}"; +} + + +// Return the style used for braces. +int QsciLexerPerl::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerPerl::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$@%&"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPerl::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Error: + case Backticks: + case QuotedStringQX: + return QColor(0xff,0xff,0x00); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case POD: + case PODVerbatim: + return QColor(0x00,0x40,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + case SingleQuotedHereDocument: + case DoubleQuotedHereDocument: + case BacktickHereDocument: + case QuotedStringQ: + case QuotedStringQQ: + return QColor(0x7f,0x00,0x7f); + + case Operator: + case Identifier: + case Scalar: + case Array: + case Hash: + case SymbolTable: + case Regex: + case Substitution: + case HereDocumentDelimiter: + case QuotedStringQR: + case QuotedStringQW: + case SubroutinePrototype: + case Translation: + return QColor(0x00,0x00,0x00); + + case DataSection: + return QColor(0x60,0x00,0x00); + + case FormatIdentifier: + case FormatBody: + return QColor(0xc0,0x00,0xc0); + + case DoubleQuotedStringVar: + case RegexVar: + case SubstitutionVar: + case BackticksVar: + case DoubleQuotedHereDocumentVar: + case BacktickHereDocumentVar: + case QuotedStringQQVar: + case QuotedStringQXVar: + case QuotedStringQRVar: + return QColor(0xd0, 0x00, 0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerPerl::defaultEolFill(int style) const +{ + switch (style) + { + case POD: + case DataSection: + case SingleQuotedHereDocument: + case DoubleQuotedHereDocument: + case BacktickHereDocument: + case PODVerbatim: + case FormatBody: + case DoubleQuotedHereDocumentVar: + case BacktickHereDocumentVar: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerPerl::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case POD: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman",11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter",10); +#endif + break; + + case Keyword: + case Operator: + case DoubleQuotedHereDocument: + case FormatIdentifier: + case RegexVar: + case SubstitutionVar: + case BackticksVar: + case DoubleQuotedHereDocumentVar: + case BacktickHereDocumentVar: + case QuotedStringQXVar: + case QuotedStringQRVar: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case DoubleQuotedString: + case SingleQuotedString: + case QuotedStringQQ: + case PODVerbatim: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + case BacktickHereDocument: + case SubroutinePrototype: + f = QsciLexer::defaultFont(style); + f.setItalic(true); + break; + + case DoubleQuotedStringVar: + case QuotedStringQQVar: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerPerl::keywords(int set) const +{ + if (set == 1) + return + "NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ " + "AUTOLOAD BEGIN CORE DESTROY END EQ GE GT INIT LE LT " + "NE CHECK abs accept alarm and atan2 bind binmode " + "bless caller chdir chmod chomp chop chown chr chroot " + "close closedir cmp connect continue cos crypt " + "dbmclose dbmopen defined delete die do dump each " + "else elsif endgrent endhostent endnetent endprotoent " + "endpwent endservent eof eq eval exec exists exit exp " + "fcntl fileno flock for foreach fork format formline " + "ge getc getgrent getgrgid getgrnam gethostbyaddr " + "gethostbyname gethostent getlogin getnetbyaddr " + "getnetbyname getnetent getpeername getpgrp getppid " + "getpriority getprotobyname getprotobynumber " + "getprotoent getpwent getpwnam getpwuid getservbyname " + "getservbyport getservent getsockname getsockopt glob " + "gmtime goto grep gt hex if index int ioctl join keys " + "kill last lc lcfirst le length link listen local " + "localtime lock log lstat lt m map mkdir msgctl " + "msgget msgrcv msgsnd my ne next no not oct open " + "opendir or ord our pack package pipe pop pos print " + "printf prototype push q qq qr quotemeta qu qw qx " + "rand read readdir readline readlink readpipe recv " + "redo ref rename require reset return reverse " + "rewinddir rindex rmdir s scalar seek seekdir select " + "semctl semget semop send setgrent sethostent " + "setnetent setpgrp setpriority setprotoent setpwent " + "setservent setsockopt shift shmctl shmget shmread " + "shmwrite shutdown sin sleep socket socketpair sort " + "splice split sprintf sqrt srand stat study sub " + "substr symlink syscall sysopen sysread sysseek " + "system syswrite tell telldir tie tied time times tr " + "truncate uc ucfirst umask undef unless unlink unpack " + "unshift untie until use utime values vec wait " + "waitpid wantarray warn while write x xor y"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerPerl::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Error: + return tr("Error"); + + case Comment: + return tr("Comment"); + + case POD: + return tr("POD"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case Scalar: + return tr("Scalar"); + + case Array: + return tr("Array"); + + case Hash: + return tr("Hash"); + + case SymbolTable: + return tr("Symbol table"); + + case Regex: + return tr("Regular expression"); + + case Substitution: + return tr("Substitution"); + + case Backticks: + return tr("Backticks"); + + case DataSection: + return tr("Data section"); + + case HereDocumentDelimiter: + return tr("Here document delimiter"); + + case SingleQuotedHereDocument: + return tr("Single-quoted here document"); + + case DoubleQuotedHereDocument: + return tr("Double-quoted here document"); + + case BacktickHereDocument: + return tr("Backtick here document"); + + case QuotedStringQ: + return tr("Quoted string (q)"); + + case QuotedStringQQ: + return tr("Quoted string (qq)"); + + case QuotedStringQX: + return tr("Quoted string (qx)"); + + case QuotedStringQR: + return tr("Quoted string (qr)"); + + case QuotedStringQW: + return tr("Quoted string (qw)"); + + case PODVerbatim: + return tr("POD verbatim"); + + case SubroutinePrototype: + return tr("Subroutine prototype"); + + case FormatIdentifier: + return tr("Format identifier"); + + case FormatBody: + return tr("Format body"); + + case DoubleQuotedStringVar: + return tr("Double-quoted string (interpolated variable)"); + + case Translation: + return tr("Translation"); + + case RegexVar: + return tr("Regular expression (interpolated variable)"); + + case SubstitutionVar: + return tr("Substitution (interpolated variable)"); + + case BackticksVar: + return tr("Backticks (interpolated variable)"); + + case DoubleQuotedHereDocumentVar: + return tr("Double-quoted here document (interpolated variable)"); + + case BacktickHereDocumentVar: + return tr("Backtick here document (interpolated variable)"); + + case QuotedStringQQVar: + return tr("Quoted string (qq, interpolated variable)"); + + case QuotedStringQXVar: + return tr("Quoted string (qx, interpolated variable)"); + + case QuotedStringQRVar: + return tr("Quoted string (qr, interpolated variable)"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerPerl::defaultPaper(int style) const +{ + switch (style) + { + case Error: + return QColor(0xff,0x00,0x00); + + case POD: + return QColor(0xe0,0xff,0xe0); + + case Scalar: + return QColor(0xff,0xe0,0xe0); + + case Array: + return QColor(0xff,0xff,0xe0); + + case Hash: + return QColor(0xff,0xe0,0xff); + + case SymbolTable: + return QColor(0xe0,0xe0,0xe0); + + case Regex: + return QColor(0xa0,0xff,0xa0); + + case Substitution: + case Translation: + return QColor(0xf0,0xe0,0x80); + + case Backticks: + case BackticksVar: + case QuotedStringQXVar: + return QColor(0xa0,0x80,0x80); + + case DataSection: + return QColor(0xff,0xf0,0xd8); + + case HereDocumentDelimiter: + case SingleQuotedHereDocument: + case DoubleQuotedHereDocument: + case BacktickHereDocument: + case DoubleQuotedHereDocumentVar: + case BacktickHereDocumentVar: + return QColor(0xdd,0xd0,0xdd); + + case PODVerbatim: + return QColor(0xc0,0xff,0xc0); + + case FormatBody: + return QColor(0xff,0xf0,0xff); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerPerl::refreshProperties() +{ + setAtElseProp(); + setCommentProp(); + setCompactProp(); + setPackagesProp(); + setPODBlocksProp(); +} + + +// Read properties from the settings. +bool QsciLexerPerl::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_packages = qs.value(prefix + "foldpackages", true).toBool(); + fold_pod_blocks = qs.value(prefix + "foldpodblocks", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerPerl::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldatelse", fold_atelse); + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldpackages", fold_packages); + qs.setValue(prefix + "foldpodblocks", fold_pod_blocks); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerPerl::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerPerl::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerPerl::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerPerl::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerPerl::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerPerl::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Return true if packages can be folded. +bool QsciLexerPerl::foldPackages() const +{ + return fold_packages; +} + + +// Set if packages can be folded. +void QsciLexerPerl::setFoldPackages(bool fold) +{ + fold_packages = fold; + + setPackagesProp(); +} + + +// Set the "fold.perl.package" property. +void QsciLexerPerl::setPackagesProp() +{ + emit propertyChanged("fold.perl.package",(fold_packages ? "1" : "0")); +} + + +// Return true if POD blocks can be folded. +bool QsciLexerPerl::foldPODBlocks() const +{ + return fold_pod_blocks; +} + + +// Set if POD blocks can be folded. +void QsciLexerPerl::setFoldPODBlocks(bool fold) +{ + fold_pod_blocks = fold; + + setPODBlocksProp(); +} + + +// Set the "fold.perl.pod" property. +void QsciLexerPerl::setPODBlocksProp() +{ + emit propertyChanged("fold.perl.pod",(fold_pod_blocks ? "1" : "0")); +} + + +// Set if else can be folded. +void QsciLexerPerl::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.perl.at.else" property. +void QsciLexerPerl::setAtElseProp() +{ + emit propertyChanged("fold.perl.at.else",(fold_atelse ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpo.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpo.cpp new file mode 100644 index 000000000..85192593a --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpo.cpp @@ -0,0 +1,223 @@ +// This module implements the QsciLexerPO class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerpo.h" + +#include +#include +#include + + +// The ctor. +QsciLexerPO::QsciLexerPO(QObject *parent) + : QsciLexer(parent), fold_comments(false), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerPO::~QsciLexerPO() +{ +} + + +// Returns the language name. +const char *QsciLexerPO::language() const +{ + return "PO"; +} + + +// Returns the lexer name. +const char *QsciLexerPO::lexer() const +{ + return "po"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPO::defaultColor(int style) const +{ + switch (style) + { + case Comment: + return QColor(0x00, 0x7f, 0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerPO::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS", 9); +#elif defined(Q_OS_MAC) + f = QFont("Georgia", 13); +#else + f = QFont("Bitstream Vera Serif", 9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the user name of a style. +QString QsciLexerPO::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case MessageId: + return tr("Message identifier"); + + case MessageIdText: + return tr("Message identifier text"); + + case MessageString: + return tr("Message string"); + + case MessageStringText: + return tr("Message string text"); + + case MessageContext: + return tr("Message context"); + + case MessageContextText: + return tr("Message context text"); + + case Fuzzy: + return tr("Fuzzy flag"); + + case ProgrammerComment: + return tr("Programmer comment"); + + case Reference: + return tr("Reference"); + + case Flags: + return tr("Flags"); + + case MessageIdTextEOL: + return tr("Message identifier text end-of-line"); + + case MessageStringTextEOL: + return tr("Message string text end-of-line"); + + case MessageContextTextEOL: + return tr("Message context text end-of-line"); + } + + return QString(); +} + + +// Refresh all properties. +void QsciLexerPO::refreshProperties() +{ + setCommentProp(); + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerPO::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerPO::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerPO::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerPO::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerPO::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerPO::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerPO::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerPO::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpostscript.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpostscript.cpp new file mode 100644 index 000000000..12c7ed896 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpostscript.cpp @@ -0,0 +1,448 @@ +// This module implements the QsciLexerPostScript class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerpostscript.h" + +#include +#include +#include + + +// The ctor. +QsciLexerPostScript::QsciLexerPostScript(QObject *parent) + : QsciLexer(parent), + ps_tokenize(false), ps_level(3), fold_compact(true), fold_atelse(false) +{ +} + + +// The dtor. +QsciLexerPostScript::~QsciLexerPostScript() +{ +} + + +// Returns the language name. +const char *QsciLexerPostScript::language() const +{ + return "PostScript"; +} + + +// Returns the lexer name. +const char *QsciLexerPostScript::lexer() const +{ + return "ps"; +} + + +// Return the style used for braces. +int QsciLexerPostScript::braceStyle() const +{ + return ProcedureParenthesis; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPostScript::defaultColor(int style) const +{ + switch (style) + { + case Comment: + return QColor(0x00,0x7f,0x00); + + case DSCComment: + return QColor(0x3f,0x70,0x3f); + + case DSCCommentValue: + case DictionaryParenthesis: + return QColor(0x30,0x60,0xa0); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Name: + case ProcedureParenthesis: + return QColor(0x00,0x00,0x00); + + case Keyword: + case ArrayParenthesis: + return QColor(0x00,0x00,0x7f); + + case Literal: + case ImmediateEvalLiteral: + return QColor(0x7f,0x7f,0x00); + + case Text: + case Base85String: + return QColor(0x7f,0x00,0x7f); + + case HexString: + return QColor(0x3f,0x7f,0x3f); + + case BadStringCharacter: + return QColor(0xff,0xff,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerPostScript::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case DSCComment: + case DSCCommentValue: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case ProcedureParenthesis: + f = QsciLexer::defaultFont(style); + f.setBold(true); + + case Text: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman", 11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter", 10); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerPostScript::keywords(int set) const +{ + if (set == 1) + return + "$error = == FontDirectory StandardEncoding UserObjects abs add " + "aload anchorsearch and arc arcn arcto array ashow astore atan " + "awidthshow begin bind bitshift bytesavailable cachestatus " + "ceiling charpath clear cleardictstack cleartomark clip clippath " + "closefile closepath concat concatmatrix copy copypage cos count " + "countdictstack countexecstack counttomark currentcmykcolor " + "currentcolorspace currentdash currentdict currentfile " + "currentflat currentfont currentgray currenthsbcolor " + "currentlinecap currentlinejoin currentlinewidth currentmatrix " + "currentmiterlimit currentpagedevice currentpoint currentrgbcolor " + "currentscreen currenttransfer cvi cvlit cvn cvr cvrs cvs cvx def " + "defaultmatrix definefont dict dictstack div dtransform dup echo " + "end eoclip eofill eq erasepage errordict exch exec execstack " + "executeonly executive exit exp false file fill findfont " + "flattenpath floor flush flushfile for forall ge get getinterval " + "grestore grestoreall gsave gt idetmatrix idiv idtransform if " + "ifelse image imagemask index initclip initgraphics initmatrix " + "inustroke invertmatrix itransform known kshow le length lineto " + "ln load log loop lt makefont mark matrix maxlength mod moveto " + "mul ne neg newpath noaccess nor not null nulldevice or pathbbox " + "pathforall pop print prompt pstack put putinterval quit rand " + "rcheck rcurveto read readhexstring readline readonly readstring " + "rectstroke repeat resetfile restore reversepath rlineto rmoveto " + "roll rotate round rrand run save scale scalefont search " + "setblackgeneration setcachedevice setcachelimit setcharwidth " + "setcolorscreen setcolortransfer setdash setflat setfont setgray " + "sethsbcolor setlinecap setlinejoin setlinewidth setmatrix " + "setmiterlimit setpagedevice setrgbcolor setscreen settransfer " + "setvmthreshold show showpage sin sqrt srand stack start status " + "statusdict stop stopped store string stringwidth stroke " + "strokepath sub systemdict token token transform translate true " + "truncate type ueofill undefineresource userdict usertime version " + "vmstatus wcheck where widthshow write writehexstring writestring " + "xcheck xor"; + + if (set == 2) + return + "GlobalFontDirectory ISOLatin1Encoding SharedFontDirectory " + "UserObject arct colorimage cshow currentblackgeneration " + "currentcacheparams currentcmykcolor currentcolor " + "currentcolorrendering currentcolorscreen currentcolorspace " + "currentcolortransfer currentdevparams currentglobal " + "currentgstate currenthalftone currentobjectformat " + "currentoverprint currentpacking currentpagedevice currentshared " + "currentstrokeadjust currentsystemparams currentundercolorremoval " + "currentuserparams defineresource defineuserobject deletefile " + "execform execuserobject filenameforall fileposition filter " + "findencoding findresource gcheck globaldict glyphshow gstate " + "ineofill infill instroke inueofill inufill inustroke " + "languagelevel makepattern packedarray printobject product " + "realtime rectclip rectfill rectstroke renamefile resourceforall " + "resourcestatus revision rootfont scheck selectfont serialnumber " + "setbbox setblackgeneration setcachedevice2 setcacheparams " + "setcmykcolor setcolor setcolorrendering setcolorscreen " + "setcolorspace setcolortranfer setdevparams setfileposition " + "setglobal setgstate sethalftone setobjectformat setoverprint " + "setpacking setpagedevice setpattern setshared setstrokeadjust " + "setsystemparams setucacheparams setundercolorremoval " + "setuserparams setvmthreshold shareddict startjob uappend ucache " + "ucachestatus ueofill ufill undef undefinefont undefineresource " + "undefineuserobject upath ustroke ustrokepath vmreclaim " + "writeobject xshow xyshow yshow"; + + if (set == 3) + return + "cliprestore clipsave composefont currentsmoothness " + "findcolorrendering setsmoothness shfill"; + + if (set == 4) + return + ".begintransparencygroup .begintransparencymask .bytestring " + ".charboxpath .currentaccuratecurves .currentblendmode " + ".currentcurvejoin .currentdashadapt .currentdotlength " + ".currentfilladjust2 .currentlimitclamp .currentopacityalpha " + ".currentoverprintmode .currentrasterop .currentshapealpha " + ".currentsourcetransparent .currenttextknockout " + ".currenttexturetransparent .dashpath .dicttomark " + ".discardtransparencygroup .discardtransparencymask " + ".endtransparencygroup .endtransparencymask .execn .filename " + ".filename .fileposition .forceput .forceundef .forgetsave " + ".getbitsrect .getdevice .inittransparencymask .knownget " + ".locksafe .makeoperator .namestring .oserrno .oserrorstring " + ".peekstring .rectappend .runandhide .setaccuratecurves " + ".setblendmode .setcurvejoin .setdashadapt .setdebug " + ".setdefaultmatrix .setdotlength .setfilladjust2 .setlimitclamp " + ".setmaxlength .setopacityalpha .setoverprintmode .setrasterop " + ".setsafe .setshapealpha .setsourcetransparent .settextknockout " + ".settexturetransparent .stringbreak .stringmatch .tempfile " + ".type1decrypt .type1encrypt .type1execchar .unread arccos " + "arcsin copydevice copyscanlines currentdevice finddevice " + "findlibfile findprotodevice flushpage getdeviceprops getenv " + "makeimagedevice makewordimagedevice max min putdeviceprops " + "setdevice"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerPostScript::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case DSCComment: + return tr("DSC comment"); + + case DSCCommentValue: + return tr("DSC comment value"); + + case Number: + return tr("Number"); + + case Name: + return tr("Name"); + + case Keyword: + return tr("Keyword"); + + case Literal: + return tr("Literal"); + + case ImmediateEvalLiteral: + return tr("Immediately evaluated literal"); + + case ArrayParenthesis: + return tr("Array parenthesis"); + + case DictionaryParenthesis: + return tr("Dictionary parenthesis"); + + case ProcedureParenthesis: + return tr("Procedure parenthesis"); + + case Text: + return tr("Text"); + + case HexString: + return tr("Hexadecimal string"); + + case Base85String: + return tr("Base85 string"); + + case BadStringCharacter: + return tr("Bad string character"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerPostScript::defaultPaper(int style) const +{ + if (style == BadStringCharacter) + return QColor(0xff,0x00,0x00); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerPostScript::refreshProperties() +{ + setTokenizeProp(); + setLevelProp(); + setCompactProp(); + setAtElseProp(); +} + + +// Read properties from the settings. +bool QsciLexerPostScript::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + ps_tokenize = qs.value(prefix + "pstokenize", false).toBool(); + ps_level = qs.value(prefix + "pslevel", 3).toInt(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerPostScript::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "pstokenize", ps_tokenize); + qs.setValue(prefix + "pslevel", ps_level); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldatelse", fold_atelse); + + return rc; +} + + +// Return true if tokens are marked. +bool QsciLexerPostScript::tokenize() const +{ + return ps_tokenize; +} + + +// Set if tokens are marked. +void QsciLexerPostScript::setTokenize(bool tokenize) +{ + ps_tokenize = tokenize; + + setTokenizeProp(); +} + + +// Set the "ps.tokenize" property. +void QsciLexerPostScript::setTokenizeProp() +{ + emit propertyChanged("ps.tokenize",(ps_tokenize ? "1" : "0")); +} + + +// Return the PostScript level. +int QsciLexerPostScript::level() const +{ + return ps_level; +} + + +// Set the PostScript level. +void QsciLexerPostScript::setLevel(int level) +{ + ps_level = level; + + setLevelProp(); +} + + +// Set the "ps.level" property. +void QsciLexerPostScript::setLevelProp() +{ + emit propertyChanged("ps.level", QByteArray::number(ps_level)); +} + + +// Return true if folds are compact. +bool QsciLexerPostScript::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerPostScript::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerPostScript::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Return true if else blocks can be folded. +bool QsciLexerPostScript::foldAtElse() const +{ + return fold_atelse; +} + + +// Set if else blocks can be folded. +void QsciLexerPostScript::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.at.else" property. +void QsciLexerPostScript::setAtElseProp() +{ + emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpov.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpov.cpp new file mode 100644 index 000000000..c93a4726f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpov.cpp @@ -0,0 +1,464 @@ +// This module implements the QsciLexerPOV class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerpov.h" + +#include +#include +#include + + +// The ctor. +QsciLexerPOV::QsciLexerPOV(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true), fold_directives(false) +{ +} + + +// The dtor. +QsciLexerPOV::~QsciLexerPOV() +{ +} + + +// Returns the language name. +const char *QsciLexerPOV::language() const +{ + return "POV"; +} + + +// Returns the lexer name. +const char *QsciLexerPOV::lexer() const +{ + return "pov"; +} + + +// Return the style used for braces. +int QsciLexerPOV::braceStyle() const +{ + return Operator; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerPOV::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPOV::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0xff,0x00,0x80); + + case Comment: + case CommentLine: + return QColor(0x00,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Operator: + return QColor(0x00,0x00,0x00); + + case String: + return QColor(0x7f,0x00,0x7f); + + case Directive: + return QColor(0x7f,0x7f,0x00); + + case BadDirective: + return QColor(0x80,0x40,0x20); + + case ObjectsCSGAppearance: + case TypesModifiersItems: + case PredefinedIdentifiers: + case PredefinedFunctions: + case KeywordSet6: + case KeywordSet7: + case KeywordSet8: + return QColor(0x00,0x00,0x7f); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerPOV::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerPOV::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case UnclosedString: + case PredefinedIdentifiers: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case BadDirective: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + f.setItalic(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerPOV::keywords(int set) const +{ + if (set == 1) + return + "declare local include undef fopen fclose read write " + "default version case range break debug error " + "warning if ifdef ifndef switch while macro else end"; + + if (set == 2) + return + "camera light_source light_group object blob sphere " + "cylinder box cone height_field julia_fractal lathe " + "prism sphere_sweep superellipsoid sor text torus " + "bicubic_patch disc mesh mesh2 polygon triangle " + "smooth_triangle plane poly cubic quartic quadric " + "isosurface parametric union intersection difference " + "merge function array spline vertex_vectors " + "normal_vectors uv_vectors face_indices " + "normal_indices uv_indices texture texture_list " + "interior_texture texture_map material_map image_map " + "color_map colour_map pigment_map normal_map " + "slope_map bump_map density_map pigment normal " + "material interior finish reflection irid slope " + "pigment_pattern image_pattern warp media scattering " + "density background fog sky_sphere rainbow " + "global_settings radiosity photons pattern transform " + "looks_like projected_through contained_by " + "clipped_by bounded_by"; + + if (set == 3) + return + "linear_spline quadratic_spline cubic_spline " + "natural_spline bezier_spline b_spline read write " + "append inverse open perspective orthographic " + "fisheye ultra_wide_angle omnimax panoramic " + "spherical spotlight jitter circular orient " + "media_attenuation media_interaction shadowless " + "parallel refraction collect pass_through " + "global_lights hierarchy sturm smooth gif tga iff " + "pot png pgm ppm jpeg tiff sys ttf quaternion " + "hypercomplex linear_sweep conic_sweep type " + "all_intersections split_union cutaway_textures " + "no_shadow no_image no_reflection double_illuminate " + "hollow uv_mapping all use_index use_color " + "use_colour no_bump_scale conserve_energy fresnel " + "average agate boxed bozo bumps cells crackle " + "cylindrical density_file dents facets granite " + "leopard marble onion planar quilted radial ripples " + "spotted waves wood wrinkles solid use_alpha " + "interpolate magnet noise_generator toroidal " + "ramp_wave triangle_wave sine_wave scallop_wave " + "cubic_wave poly_wave once map_type method fog_type " + "hf_gray_16 charset ascii utf8 rotate scale " + "translate matrix location right up direction sky " + "angle look_at aperture blur_samples focal_point " + "confidence variance radius falloff tightness " + "point_at area_light adaptive fade_distance " + "fade_power threshold strength water_level tolerance " + "max_iteration precision slice u_steps v_steps " + "flatness inside_vector accuracy max_gradient " + "evaluate max_trace precompute target ior dispersion " + "dispersion_samples caustics color colour rgb rgbf " + "rgbt rgbft red green blue filter transmit gray hf " + "fade_color fade_colour quick_color quick_colour " + "brick checker hexagon brick_size mortar bump_size " + "ambient diffuse brilliance crand phong phong_size " + "metallic specular roughness reflection_exponent " + "exponent thickness gradient spiral1 spiral2 " + "agate_turb form metric offset df3 coords size " + "mandel exterior julia control0 control1 altitude " + "turbulence octaves omega lambda repeat flip " + "black-hole orientation dist_exp major_radius " + "frequency phase intervals samples ratio absorption " + "emission aa_threshold aa_level eccentricity " + "extinction distance turb_depth fog_offset fog_alt " + "width arc_angle falloff_angle adc_bailout " + "ambient_light assumed_gamma irid_wavelength " + "number_of_waves always_sample brigthness count " + "error_bound gray_threshold load_file " + "low_error_factor max_sample minimum_reuse " + "nearest_count pretrace_end pretrace_start " + "recursion_limit save_file spacing gather " + "max_trace_level autostop expand_thresholds"; + + if (set == 4) + return + "x y z t u v yes no true false on off clock " + "clock_delta clock_on final_clock final_frame " + "frame_number image_height image_width initial_clock " + "initial_frame pi version"; + + if (set == 5) + return + "abs acos acosh asc asin asinh atan atanh atan2 ceil " + "cos cosh defined degrees dimensions dimension_size " + "div exp file_exists floor inside int ln log max min " + "mod pow prod radians rand seed select sin sinh sqrt " + "strcmp strlen sum tan tanh val vdot vlength " + "min_extent max_extent trace vaxis_rotate vcross " + "vrotate vnormalize vturbulence chr concat str " + "strlwr strupr substr vstr sqr cube reciprocal pwr"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerPOV::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case CommentLine: + return tr("Comment line"); + + case Number: + return tr("Number"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case String: + return tr("String"); + + case UnclosedString: + return tr("Unclosed string"); + + case Directive: + return tr("Directive"); + + case BadDirective: + return tr("Bad directive"); + + case ObjectsCSGAppearance: + return tr("Objects, CSG and appearance"); + + case TypesModifiersItems: + return tr("Types, modifiers and items"); + + case PredefinedIdentifiers: + return tr("Predefined identifiers"); + + case PredefinedFunctions: + return tr("Predefined functions"); + + case KeywordSet6: + return tr("User defined 1"); + + case KeywordSet7: + return tr("User defined 2"); + + case KeywordSet8: + return tr("User defined 3"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerPOV::defaultPaper(int style) const +{ + switch (style) + { + case UnclosedString: + return QColor(0xe0,0xc0,0xe0); + + case ObjectsCSGAppearance: + return QColor(0xff,0xd0,0xd0); + + case TypesModifiersItems: + return QColor(0xff,0xff,0xd0); + + case PredefinedFunctions: + return QColor(0xd0,0xd0,0xff); + + case KeywordSet6: + return QColor(0xd0,0xff,0xd0); + + case KeywordSet7: + return QColor(0xd0,0xd0,0xd0); + + case KeywordSet8: + return QColor(0xe0,0xe0,0xe0); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerPOV::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setDirectiveProp(); +} + + +// Read properties from the settings. +bool QsciLexerPOV::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_directives = qs.value(prefix + "folddirectives", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerPOV::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "folddirectives", fold_directives); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerPOV::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerPOV::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerPOV::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerPOV::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerPOV::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerPOV::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Return true if directives can be folded. +bool QsciLexerPOV::foldDirectives() const +{ + return fold_directives; +} + + +// Set if directives can be folded. +void QsciLexerPOV::setFoldDirectives(bool fold) +{ + fold_directives = fold; + + setDirectiveProp(); +} + + +// Set the "fold.directive" property. +void QsciLexerPOV::setDirectiveProp() +{ + emit propertyChanged("fold.directive",(fold_directives ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerproperties.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerproperties.cpp new file mode 100644 index 000000000..0c547c94d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerproperties.cpp @@ -0,0 +1,213 @@ +// This module implements the QsciLexerProperties class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerproperties.h" + +#include +#include +#include + + +// The ctor. +QsciLexerProperties::QsciLexerProperties(QObject *parent) + : QsciLexer(parent), fold_compact(true), initial_spaces(true) +{ +} + + +// The dtor. +QsciLexerProperties::~QsciLexerProperties() +{ +} + + +// Returns the language name. +const char *QsciLexerProperties::language() const +{ + return "Properties"; +} + + +// Returns the lexer name. +const char *QsciLexerProperties::lexer() const +{ + return "props"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerProperties::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerProperties::defaultColor(int style) const +{ + switch (style) + { + case Comment: + return QColor(0x00,0x7f,0x7f); + + case Section: + return QColor(0x7f,0x00,0x7f); + + case Assignment: + return QColor(0xb0,0x60,0x00); + + case DefaultValue: + return QColor(0x7f,0x7f,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerProperties::defaultEolFill(int style) const +{ + if (style == Section) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerProperties::defaultFont(int style) const +{ + QFont f; + + if (style == Comment) +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + else + f = QsciLexer::defaultFont(style); + + return f; +} + + +// Returns the user name of a style. +QString QsciLexerProperties::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Section: + return tr("Section"); + + case Assignment: + return tr("Assignment"); + + case DefaultValue: + return tr("Default value"); + + case Key: + return tr("Key"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerProperties::defaultPaper(int style) const +{ + if (style == Section) + return QColor(0xe0,0xf0,0xf0); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerProperties::refreshProperties() +{ + setCompactProp(); + setInitialSpacesProp(); +} + + +// Read properties from the settings. +bool QsciLexerProperties::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + initial_spaces = qs.value(prefix + "initialspaces", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerProperties::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "initialspaces", initial_spaces); + + return rc; +} + + +// Set if folds are compact +void QsciLexerProperties::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerProperties::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} + + +// Set if initial spaces are allowed. +void QsciLexerProperties::setInitialSpaces(bool enable) +{ + initial_spaces = enable; + + setInitialSpacesProp(); +} + + +// Set the "lexer.props.allow.initial.spaces" property. +void QsciLexerProperties::setInitialSpacesProp() +{ + emit propertyChanged("lexer.props.allow.initial.spaces", (fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpython.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpython.cpp new file mode 100644 index 000000000..82f86a942 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerpython.cpp @@ -0,0 +1,507 @@ +// This module implements the QsciLexerPython class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerpython.h" + +#include +#include +#include + + +// The list of Python keywords that can be used by other friendly lexers. +const char *QsciLexerPython::keywordClass = + "and as assert break class continue def del elif else except exec " + "finally for from global if import in is lambda None not or pass " + "print raise return try while with yield"; + + +// The ctor. +QsciLexerPython::QsciLexerPython(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true), fold_quotes(false), + indent_warn(NoWarning), strings_over_newline(false), v2_unicode(true), + v3_binary_octal(true), v3_bytes(true), highlight_subids(true) +{ +} + + +// The dtor. +QsciLexerPython::~QsciLexerPython() +{ +} + + +// Returns the language name. +const char *QsciLexerPython::language() const +{ + return "Python"; +} + + +// Returns the lexer name. +const char *QsciLexerPython::lexer() const +{ + return "python"; +} + + +// Return the view used for indentation guides. +int QsciLexerPython::indentationGuideView() const +{ + return QsciScintillaBase::SC_IV_LOOKFORWARD; +} + + +// Return the set of character sequences that can separate auto-completion +// words. +QStringList QsciLexerPython::autoCompletionWordSeparators() const +{ + QStringList wl; + + wl << "."; + + return wl; +} + +// Return the list of characters that can start a block. +const char *QsciLexerPython::blockStart(int *style) const +{ + if (style) + *style = Operator; + + return ":"; +} + + +// Return the number of lines to look back when auto-indenting. +int QsciLexerPython::blockLookback() const +{ + // This must be 0 otherwise de-indenting a Python block gets very + // difficult. + return 0; +} + + +// Return the style used for braces. +int QsciLexerPython::braceStyle() const +{ + return Operator; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPython::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + case DoubleQuotedFString: + case SingleQuotedFString: + return QColor(0x7f,0x00,0x7f); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case TripleSingleQuotedString: + case TripleDoubleQuotedString: + case TripleSingleQuotedFString: + case TripleDoubleQuotedFString: + return QColor(0x7f,0x00,0x00); + + case ClassName: + return QColor(0x00,0x00,0xff); + + case FunctionMethodName: + return QColor(0x00,0x7f,0x7f); + + case Operator: + case Identifier: + break; + + case CommentBlock: + return QColor(0x7f,0x7f,0x7f); + + case UnclosedString: + return QColor(0x00,0x00,0x00); + + case HighlightedIdentifier: + return QColor(0x40,0x70,0x90); + + case Decorator: + return QColor(0x80,0x50,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerPython::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerPython::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case DoubleQuotedString: + case SingleQuotedString: + case DoubleQuotedFString: + case SingleQuotedFString: + case UnclosedString: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + case Keyword: + case ClassName: + case FunctionMethodName: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerPython::keywords(int set) const +{ + if (set != 1) + return 0; + + return keywordClass; +} + + +// Returns the user name of a style. +QString QsciLexerPython::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Number: + return tr("Number"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case Keyword: + return tr("Keyword"); + + case TripleSingleQuotedString: + return tr("Triple single-quoted string"); + + case TripleDoubleQuotedString: + return tr("Triple double-quoted string"); + + case ClassName: + return tr("Class name"); + + case FunctionMethodName: + return tr("Function or method name"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case CommentBlock: + return tr("Comment block"); + + case UnclosedString: + return tr("Unclosed string"); + + case HighlightedIdentifier: + return tr("Highlighted identifier"); + + case Decorator: + return tr("Decorator"); + + case DoubleQuotedFString: + return tr("Double-quoted f-string"); + + case SingleQuotedFString: + return tr("Single-quoted f-string"); + + case TripleSingleQuotedFString: + return tr("Triple single-quoted f-string"); + + case TripleDoubleQuotedFString: + return tr("Triple double-quoted f-string"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerPython::defaultPaper(int style) const +{ + if (style == UnclosedString) + return QColor(0xe0,0xc0,0xe0); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerPython::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setQuotesProp(); + setTabWhingeProp(); + setStringsOverNewlineProp(); + setV2UnicodeProp(); + setV3BinaryOctalProp(); + setV3BytesProp(); + setHighlightSubidsProp(); +} + + +// Read properties from the settings. +bool QsciLexerPython::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_quotes = qs.value(prefix + "foldquotes", false).toBool(); + indent_warn = (IndentationWarning)qs.value(prefix + "indentwarning", (int)NoWarning).toInt(); + strings_over_newline = qs.value(prefix + "stringsovernewline", false).toBool(); + v2_unicode = qs.value(prefix + "v2unicode", true).toBool(); + v3_binary_octal = qs.value(prefix + "v3binaryoctal", true).toBool(); + v3_bytes = qs.value(prefix + "v3bytes", true).toBool(); + highlight_subids = qs.value(prefix + "highlightsubids", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerPython::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldquotes", fold_quotes); + qs.setValue(prefix + "indentwarning", (int)indent_warn); + qs.setValue(prefix + "stringsovernewline", strings_over_newline); + qs.setValue(prefix + "v2unicode", v2_unicode); + qs.setValue(prefix + "v3binaryoctal", v3_binary_octal); + qs.setValue(prefix + "v3bytes", v3_bytes); + qs.setValue(prefix + "highlightsubids", highlight_subids); + + return rc; +} + + +// Set if comments can be folded. +void QsciLexerPython::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment.python" property. +void QsciLexerPython::setCommentProp() +{ + emit propertyChanged("fold.comment.python",(fold_comments ? "1" : "0")); +} + + +// Set if folds are compact. +void QsciLexerPython::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerPython::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Set if quotes can be folded. +void QsciLexerPython::setFoldQuotes(bool fold) +{ + fold_quotes = fold; + + setQuotesProp(); +} + + +// Set the "fold.quotes.python" property. +void QsciLexerPython::setQuotesProp() +{ + emit propertyChanged("fold.quotes.python",(fold_quotes ? "1" : "0")); +} + + +// Set the indentation warning. +void QsciLexerPython::setIndentationWarning(QsciLexerPython::IndentationWarning warn) +{ + indent_warn = warn; + + setTabWhingeProp(); +} + + +// Set the "tab.timmy.whinge.level" property. +void QsciLexerPython::setTabWhingeProp() +{ + emit propertyChanged("tab.timmy.whinge.level", QByteArray::number(indent_warn)); +} + + +// Set if string literals can span newlines. +void QsciLexerPython::setStringsOverNewlineAllowed(bool allowed) +{ + strings_over_newline = allowed; + + setStringsOverNewlineProp(); +} + + +// Set the "lexer.python.strings.u" property. +void QsciLexerPython::setStringsOverNewlineProp() +{ + emit propertyChanged("lexer.python.strings.over.newline", (strings_over_newline ? "1" : "0")); +} + + +// Set if v2 unicode string literals are allowed. +void QsciLexerPython::setV2UnicodeAllowed(bool allowed) +{ + v2_unicode = allowed; + + setV2UnicodeProp(); +} + + +// Set the "lexer.python.strings.u" property. +void QsciLexerPython::setV2UnicodeProp() +{ + emit propertyChanged("lexer.python.strings.u", (v2_unicode ? "1" : "0")); +} + + +// Set if v3 binary and octal literals are allowed. +void QsciLexerPython::setV3BinaryOctalAllowed(bool allowed) +{ + v3_binary_octal = allowed; + + setV3BinaryOctalProp(); +} + + +// Set the "lexer.python.literals.binary" property. +void QsciLexerPython::setV3BinaryOctalProp() +{ + emit propertyChanged("lexer.python.literals.binary", (v3_binary_octal ? "1" : "0")); +} + + +// Set if v3 bytes string literals are allowed. +void QsciLexerPython::setV3BytesAllowed(bool allowed) +{ + v3_bytes = allowed; + + setV3BytesProp(); +} + + +// Set the "lexer.python.strings.b" property. +void QsciLexerPython::setV3BytesProp() +{ + emit propertyChanged("lexer.python.strings.b",(v3_bytes ? "1" : "0")); +} + + +// Set if sub-identifiers are highlighted. +void QsciLexerPython::setHighlightSubidentifiers(bool enabled) +{ + highlight_subids = enabled; + + setHighlightSubidsProp(); +} + + +// Set the "lexer.python.keywords2.no.sub.identifiers" property. +void QsciLexerPython::setHighlightSubidsProp() +{ + emit propertyChanged("lexer.python.keywords2.no.sub.identifiers", + (highlight_subids ? "0" : "1")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerruby.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerruby.cpp new file mode 100644 index 000000000..6165a710d --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerruby.cpp @@ -0,0 +1,445 @@ +// This module implements the QsciLexerRuby class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerruby.h" + +#include +#include +#include + + +// The ctor. +QsciLexerRuby::QsciLexerRuby(QObject *parent) + : QsciLexer(parent), fold_comments(false), fold_compact(true) +{ +} + + +// The dtor. +QsciLexerRuby::~QsciLexerRuby() +{ +} + + +// Returns the language name. +const char *QsciLexerRuby::language() const +{ + return "Ruby"; +} + + +// Returns the lexer name. +const char *QsciLexerRuby::lexer() const +{ + return "ruby"; +} + + +// Return the list of words that can start a block. +const char *QsciLexerRuby::blockStart(int *style) const +{ + if (style) + *style = Keyword; + + return "do"; +} + + +// Return the list of words that can start end a block. +const char *QsciLexerRuby::blockEnd(int *style) const +{ + if (style) + *style = Keyword; + + return "end"; +} + + +// Return the list of words that can start end a block. +const char *QsciLexerRuby::blockStartKeyword(int *style) const +{ + if (style) + *style = Keyword; + + return "def class if do elsif else case while for"; +} + + +// Return the style used for braces. +int QsciLexerRuby::braceStyle() const +{ + return Operator; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerRuby::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case POD: + return QColor(0x00,0x40,0x00); + + case Number: + case FunctionMethodName: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + case DemotedKeyword: + return QColor(0x00,0x00,0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + case HereDocument: + case PercentStringq: + case PercentStringQ: + return QColor(0x7f,0x00,0x7f); + + case ClassName: + return QColor(0x00,0x00,0xff); + + case Regex: + case HereDocumentDelimiter: + case PercentStringr: + case PercentStringw: + return QColor(0x00,0x00,0x00); + + case Global: + return QColor(0x80,0x00,0x80); + + case Symbol: + return QColor(0xc0,0xa0,0x30); + + case ModuleName: + return QColor(0xa0,0x00,0xa0); + + case InstanceVariable: + return QColor(0xb0,0x00,0x80); + + case ClassVariable: + return QColor(0x80,0x00,0xb0); + + case Backticks: + case PercentStringx: + return QColor(0xff,0xff,0x00); + + case DataSection: + return QColor(0x60,0x00,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerRuby::defaultEolFill(int style) const +{ + bool fill; + + switch (style) + { + case POD: + case DataSection: + case HereDocument: + fill = true; + break; + + default: + fill = QsciLexer::defaultEolFill(style); + } + + return fill; +} + + +// Returns the font of the text for a style. +QFont QsciLexerRuby::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case POD: + case DoubleQuotedString: + case SingleQuotedString: + case PercentStringq: + case PercentStringQ: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + case Keyword: + case ClassName: + case FunctionMethodName: + case Operator: + case ModuleName: + case DemotedKeyword: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerRuby::keywords(int set) const +{ + if (set == 1) + return + "__FILE__ and def end in or self unless __LINE__ " + "begin defined? ensure module redo super until BEGIN " + "break do false next rescue then when END case else " + "for nil require retry true while alias class elsif " + "if not return undef yield"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerRuby::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Error: + return tr("Error"); + + case Comment: + return tr("Comment"); + + case POD: + return tr("POD"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case ClassName: + return tr("Class name"); + + case FunctionMethodName: + return tr("Function or method name"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case Regex: + return tr("Regular expression"); + + case Global: + return tr("Global"); + + case Symbol: + return tr("Symbol"); + + case ModuleName: + return tr("Module name"); + + case InstanceVariable: + return tr("Instance variable"); + + case ClassVariable: + return tr("Class variable"); + + case Backticks: + return tr("Backticks"); + + case DataSection: + return tr("Data section"); + + case HereDocumentDelimiter: + return tr("Here document delimiter"); + + case HereDocument: + return tr("Here document"); + + case PercentStringq: + return tr("%q string"); + + case PercentStringQ: + return tr("%Q string"); + + case PercentStringx: + return tr("%x string"); + + case PercentStringr: + return tr("%r string"); + + case PercentStringw: + return tr("%w string"); + + case DemotedKeyword: + return tr("Demoted keyword"); + + case Stdin: + return tr("stdin"); + + case Stdout: + return tr("stdout"); + + case Stderr: + return tr("stderr"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerRuby::defaultPaper(int style) const +{ + switch (style) + { + case Error: + return QColor(0xff,0x00,0x00); + + case POD: + return QColor(0xc0,0xff,0xc0); + + case Regex: + case PercentStringr: + return QColor(0xa0,0xff,0xa0); + + case Backticks: + case PercentStringx: + return QColor(0xa0,0x80,0x80); + + case DataSection: + return QColor(0xff,0xf0,0xd8); + + case HereDocumentDelimiter: + case HereDocument: + return QColor(0xdd,0xd0,0xdd); + + case PercentStringw: + return QColor(0xff,0xff,0xe0); + + case Stdin: + case Stdout: + case Stderr: + return QColor(0xff,0x80,0x80); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerRuby::refreshProperties() +{ + setCommentProp(); + setCompactProp(); +} + + +// Read properties from the settings. +bool QsciLexerRuby::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerRuby::writeProperties(QSettings &qs, const QString &prefix) const +{ + int rc = true; + + qs.value(prefix + "foldcomments", fold_comments); + qs.value(prefix + "foldcompact", fold_compact); + + return rc; +} + + +// Set if comments can be folded. +void QsciLexerRuby::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerRuby::setCommentProp() +{ + emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); +} + + +// Set if folds are compact +void QsciLexerRuby::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerRuby::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerspice.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerspice.cpp new file mode 100644 index 000000000..9c2617c05 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerspice.cpp @@ -0,0 +1,194 @@ +// This module implements the QsciLexerSpice class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerspice.h" + +#include +#include + + +// The ctor. +QsciLexerSpice::QsciLexerSpice(QObject *parent) + : QsciLexer(parent) +{ +} + + +// The dtor. +QsciLexerSpice::~QsciLexerSpice() +{ +} + + +// Returns the language name. +const char *QsciLexerSpice::language() const +{ + return "Spice"; +} + + +// Returns the lexer name. +const char *QsciLexerSpice::lexer() const +{ + return "spice"; +} + + +// Return the style used for braces. +int QsciLexerSpice::braceStyle() const +{ + return Parameter; +} + + +// Returns the set of keywords. +const char *QsciLexerSpice::keywords(int set) const +{ + if (set == 1) + return + "ac alias alter alterparam append askvalues assertvalid " + "autoscale break compose copy copytodoc dc delete destroy " + "destroyvec diff display disto dowhile echo else end errorstop " + "fftinit filter foreach fourier freqtotime function " + "functionundef goto homecursors if isdisplayed label let " + "linearize listing load loadaccumulator makelabel movelabel " + "makesmithplot movecursorleft movecursorright msgbox nameplot " + "newplot nextparam noise nopoints op plot plotf plotref poly " + "print printcursors printevent printname printplot printstatus " + "printtext printtol printunits printval printvector pwl pz quit " + "removesmithplot rename repeat resume rotate runs rusage save " + "sendplot sendscript sens set setcursor setdoc setlabel " + "setlabeltype setmargins setnthtrigger setunits setvec setparam " + "setplot setquery setscaletype settracecolor settracestyle " + "setsource settrigger setvec setxlimits setylimits show showmod " + "sort status step stop switch tf timetofreq timetowave tran " + "unalias unlet unset unalterparam update version view wavefilter " + "wavetotime where while write"; + + if (set == 2) + return + "abs askvalue atan average ceil cos db differentiate " + "differentiatex exp finalvalue floor getcursorx getcursory " + "getcursory0 getcursory1 getparam im ln initialvalue integrate " + "integratex interpolate isdef isdisplayed j log length mag max " + "maxscale mean meanpts min minscale nextplot nextvector norm " + "operatingpoint ph phase phaseextend pk_pk pos pulse re rms " + "rmspts rnd sameplot sin sqrt stddev stddevpts tan tfall " + "tolerance trise unitvec vector"; + + if (set == 3) + return "param nodeset include options dcconv subckt ends model"; + + return 0; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerSpice::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Command: + case Function: + return QColor(0x00,0x00,0x7f); + + case Parameter: + return QColor(0x00,0x40,0xe0); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Delimiter: + return QColor(0x00,0x00,0x00); + + case Value: + return QColor(0x7f,0x00,0x7f); + + case Comment: + return QColor(0x00,0x7f,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerSpice::defaultFont(int style) const +{ + QFont f; + + if (style == Comment) +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + else + { + f = QsciLexer::defaultFont(style); + + if (style == Function || style == Delimiter) + f.setBold(true); + } + + return f; +} + + +// Returns the user name of a style. +QString QsciLexerSpice::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Identifier: + return tr("Identifier"); + + case Command: + return tr("Command"); + + case Function: + return tr("Function"); + + case Parameter: + return tr("Parameter"); + + case Number: + return tr("Number"); + + case Delimiter: + return tr("Delimiter"); + + case Value: + return tr("Value"); + + case Comment: + return tr("Comment"); + } + + return QString(); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexersql.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexersql.cpp new file mode 100644 index 000000000..99df5b2ad --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexersql.cpp @@ -0,0 +1,521 @@ +// This module implements the QsciLexerSQL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexersql.h" + +#include +#include +#include + + +// The ctor. +QsciLexerSQL::QsciLexerSQL(QObject *parent) + : QsciLexer(parent), + at_else(false), fold_comments(false), fold_compact(true), + only_begin(false), backticks_identifier(false), + numbersign_comment(false), backslash_escapes(false), + allow_dotted_word(false) +{ +} + + +// The dtor. +QsciLexerSQL::~QsciLexerSQL() +{ +} + + +// Returns the language name. +const char *QsciLexerSQL::language() const +{ + return "SQL"; +} + + +// Returns the lexer name. +const char *QsciLexerSQL::lexer() const +{ + return "sql"; +} + + +// Return the style used for braces. +int QsciLexerSQL::braceStyle() const +{ + return Operator; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerSQL::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Comment: + case CommentLine: + case PlusPrompt: + case PlusComment: + case CommentLineHash: + return QColor(0x00,0x7f,0x00); + + case CommentDoc: + return QColor(0x7f,0x7f,0x7f); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case DoubleQuotedString: + case SingleQuotedString: + return QColor(0x7f,0x00,0x7f); + + case PlusKeyword: + return QColor(0x7f,0x7f,0x00); + + case Operator: + case Identifier: + break; + + case CommentDocKeyword: + return QColor(0x30,0x60,0xa0); + + case CommentDocKeywordError: + return QColor(0x80,0x40,0x20); + + case KeywordSet5: + return QColor(0x4b,0x00,0x82); + + case KeywordSet6: + return QColor(0xb0,0x00,0x40); + + case KeywordSet7: + return QColor(0x8b,0x00,0x00); + + case KeywordSet8: + return QColor(0x80,0x00,0x80); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerSQL::defaultEolFill(int style) const +{ + if (style == PlusPrompt) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerSQL::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: + case PlusComment: + case CommentLineHash: + case CommentDocKeyword: + case CommentDocKeywordError: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case Operator: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case DoubleQuotedString: + case SingleQuotedString: + case PlusPrompt: +#if defined(Q_OS_WIN) + f = QFont("Courier New",10); +#elif defined(Q_OS_MAC) + f = QFont("Courier", 12); +#else + f = QFont("Bitstream Vera Sans Mono",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerSQL::keywords(int set) const +{ + if (set == 1) + return + "absolute action add admin after aggregate alias all " + "allocate alter and any are array as asc assertion " + "at authorization before begin binary bit blob " + "boolean both breadth by call cascade cascaded case " + "cast catalog char character check class clob close " + "collate collation column commit completion connect " + "connection constraint constraints constructor " + "continue corresponding create cross cube current " + "current_date current_path current_role current_time " + "current_timestamp current_user cursor cycle data " + "date day deallocate dec decimal declare default " + "deferrable deferred delete depth deref desc " + "describe descriptor destroy destructor " + "deterministic dictionary diagnostics disconnect " + "distinct domain double drop dynamic each else end " + "end-exec equals escape every except exception exec " + "execute external false fetch first float for " + "foreign found from free full function general get " + "global go goto grant group grouping having host " + "hour identity if ignore immediate in indicator " + "initialize initially inner inout input insert int " + "integer intersect interval into is isolation " + "iterate join key language large last lateral " + "leading left less level like limit local localtime " + "localtimestamp locator map match minute modifies " + "modify module month names national natural nchar " + "nclob new next no none not null numeric object of " + "off old on only open operation option or order " + "ordinality out outer output pad parameter " + "parameters partial path postfix precision prefix " + "preorder prepare preserve primary prior privileges " + "procedure public read reads real recursive ref " + "references referencing relative restrict result " + "return returns revoke right role rollback rollup " + "routine row rows savepoint schema scroll scope " + "search second section select sequence session " + "session_user set sets size smallint some| space " + "specific specifictype sql sqlexception sqlstate " + "sqlwarning start state statement static structure " + "system_user table temporary terminate than then " + "time timestamp timezone_hour timezone_minute to " + "trailing transaction translation treat trigger " + "true under union unique unknown unnest update usage " + "user using value values varchar variable varying " + "view when whenever where with without work write " + "year zone"; + + if (set == 3) + return + "param author since return see deprecated todo"; + + if (set == 4) + return + "acc~ept a~ppend archive log attribute bre~ak " + "bti~tle c~hange cl~ear col~umn comp~ute conn~ect " + "copy def~ine del desc~ribe disc~onnect e~dit " + "exec~ute exit get help ho~st i~nput l~ist passw~ord " + "pau~se pri~nt pro~mpt quit recover rem~ark " + "repf~ooter reph~eader r~un sav~e set sho~w shutdown " + "spo~ol sta~rt startup store timi~ng tti~tle " + "undef~ine var~iable whenever oserror whenever " + "sqlerror"; + + if (set == 5) + return + "dbms_output.disable dbms_output.enable dbms_output.get_line " + "dbms_output.get_lines dbms_output.new_line dbms_output.put " + "dbms_output.put_line"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerSQL::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case CommentLine: + return tr("Comment line"); + + case CommentDoc: + return tr("JavaDoc style comment"); + + case Number: + return tr("Number"); + + case Keyword: + return tr("Keyword"); + + case DoubleQuotedString: + return tr("Double-quoted string"); + + case SingleQuotedString: + return tr("Single-quoted string"); + + case PlusKeyword: + return tr("SQL*Plus keyword"); + + case PlusPrompt: + return tr("SQL*Plus prompt"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case PlusComment: + return tr("SQL*Plus comment"); + + case CommentLineHash: + return tr("# comment line"); + + case CommentDocKeyword: + return tr("JavaDoc keyword"); + + case CommentDocKeywordError: + return tr("JavaDoc keyword error"); + + case KeywordSet5: + return tr("User defined 1"); + + case KeywordSet6: + return tr("User defined 2"); + + case KeywordSet7: + return tr("User defined 3"); + + case KeywordSet8: + return tr("User defined 4"); + + case QuotedIdentifier: + return tr("Quoted identifier"); + + case QuotedOperator: + return tr("Quoted operator"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerSQL::defaultPaper(int style) const +{ + if (style == PlusPrompt) + return QColor(0xe0,0xff,0xe0); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerSQL::refreshProperties() +{ + setAtElseProp(); + setCommentProp(); + setCompactProp(); + setOnlyBeginProp(); + setBackticksIdentifierProp(); + setNumbersignCommentProp(); + setBackslashEscapesProp(); + setAllowDottedWordProp(); +} + + +// Read properties from the settings. +bool QsciLexerSQL::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = true; + + at_else = qs.value(prefix + "atelse", false).toBool(); + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + only_begin = qs.value(prefix + "onlybegin", false).toBool(); + backticks_identifier = qs.value(prefix + "backticksidentifier", false).toBool(); + numbersign_comment = qs.value(prefix + "numbersigncomment", false).toBool(); + backslash_escapes = qs.value(prefix + "backslashescapes", false).toBool(); + allow_dotted_word = qs.value(prefix + "allowdottedword", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerSQL::writeProperties(QSettings &qs, const QString &prefix) const +{ + int rc = true; + + qs.value(prefix + "atelse", at_else); + qs.value(prefix + "foldcomments", fold_comments); + qs.value(prefix + "foldcompact", fold_compact); + qs.value(prefix + "onlybegin", only_begin); + qs.value(prefix + "backticksidentifier", backticks_identifier); + qs.value(prefix + "numbersigncomment", numbersign_comment); + qs.value(prefix + "backslashescapes", backslash_escapes); + qs.value(prefix + "allowdottedword", allow_dotted_word); + + return rc; +} + + +// Set if ELSE blocks can be folded. +void QsciLexerSQL::setFoldAtElse(bool fold) +{ + at_else = fold; + + setAtElseProp(); +} + + +// Set the "fold.sql.at.else" property. +void QsciLexerSQL::setAtElseProp() +{ + emit propertyChanged("fold.sql.at.else", (at_else ? "1" : "0")); +} + + +// Set if comments can be folded. +void QsciLexerSQL::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerSQL::setCommentProp() +{ + emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); +} + + +// Set if folds are compact +void QsciLexerSQL::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerSQL::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} + + +// Set if BEGIN blocks only can be folded. +void QsciLexerSQL::setFoldOnlyBegin(bool fold) +{ + only_begin = fold; + + setOnlyBeginProp(); +} + + +// Set the "fold.sql.only.begin" property. +void QsciLexerSQL::setOnlyBeginProp() +{ + emit propertyChanged("fold.sql.only.begin", (only_begin ? "1" : "0")); +} + + +// Enable quoted identifiers. +void QsciLexerSQL::setQuotedIdentifiers(bool enable) +{ + backticks_identifier = enable; + + setBackticksIdentifierProp(); +} + + +// Set the "lexer.sql.backticks.identifier" property. +void QsciLexerSQL::setBackticksIdentifierProp() +{ + emit propertyChanged("lexer.sql.backticks.identifier", (backticks_identifier ? "1" : "0")); +} + + +// Enable '#' as a comment character. +void QsciLexerSQL::setHashComments(bool enable) +{ + numbersign_comment = enable; + + setNumbersignCommentProp(); +} + + +// Set the "lexer.sql.numbersign.comment" property. +void QsciLexerSQL::setNumbersignCommentProp() +{ + emit propertyChanged("lexer.sql.numbersign.comment", (numbersign_comment ? "1" : "0")); +} + + +// Enable/disable backslash escapes. +void QsciLexerSQL::setBackslashEscapes(bool enable) +{ + backslash_escapes = enable; + + setBackslashEscapesProp(); +} + + +// Set the "sql.backslash.escapes" property. +void QsciLexerSQL::setBackslashEscapesProp() +{ + emit propertyChanged("sql.backslash.escapes", (backslash_escapes ? "1" : "0")); +} + + +// Enable dotted words. +void QsciLexerSQL::setDottedWords(bool enable) +{ + allow_dotted_word = enable; + + setAllowDottedWordProp(); +} + + +// Set the "lexer.sql.allow.dotted.word" property. +void QsciLexerSQL::setAllowDottedWordProp() +{ + emit propertyChanged("lexer.sql.allow.dotted.word", (allow_dotted_word ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexersrec.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexersrec.cpp new file mode 100644 index 000000000..06fa235dd --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexersrec.cpp @@ -0,0 +1,62 @@ +// This module implements the QsciLexerSRec class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexersrec.h" + +#include +#include + + +// The ctor. +QsciLexerSRec::QsciLexerSRec(QObject *parent) + : QsciLexerHex(parent) +{ +} + + +// The dtor. +QsciLexerSRec::~QsciLexerSRec() +{ +} + + +// Returns the language name. +const char *QsciLexerSRec::language() const +{ + return "S-Record"; +} + + +// Returns the lexer name. +const char *QsciLexerSRec::lexer() const +{ + return "srec"; +} + + +// Returns the user name of a style. +QString QsciLexerSRec::description(int style) const +{ + // Handle unsupported styles. + if (style == ExtendedAddress) + return QString(); + + return QsciLexerHex::description(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertcl.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertcl.cpp new file mode 100644 index 000000000..070a1ac7f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertcl.cpp @@ -0,0 +1,438 @@ +// This module implements the QsciLexerTCL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexertcl.h" + +#include +#include +#include + + +// The ctor. +QsciLexerTCL::QsciLexerTCL(QObject *parent) + : QsciLexer(parent), fold_comments(false) +{ +} + + +// The dtor. +QsciLexerTCL::~QsciLexerTCL() +{ +} + + +// Returns the language name. +const char *QsciLexerTCL::language() const +{ + return "TCL"; +} + + +// Returns the lexer name. +const char *QsciLexerTCL::lexer() const +{ + return "tcl"; +} + + +// Return the style used for braces. +int QsciLexerTCL::braceStyle() const +{ + return Operator; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerTCL::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x80,0x80); + + case Comment: + case CommentLine: + case CommentBox: + return QColor(0x00,0x7f,0x00); + + case Number: + return QColor(0x00,0x7f,0x7f); + + case QuotedKeyword: + case QuotedString: + case Modifier: + return QColor(0x7f,0x00,0x7f); + + case Operator: + return QColor(0x00,0x00,0x00); + + case Identifier: + case ExpandKeyword: + case TCLKeyword: + case TkKeyword: + case ITCLKeyword: + case TkCommand: + case KeywordSet6: + case KeywordSet7: + case KeywordSet8: + case KeywordSet9: + return QColor(0x00,0x00,0x7f); + + case Substitution: + case SubstitutionBrace: + return QColor(0x7f,0x7f,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerTCL::defaultEolFill(int style) const +{ + switch (style) + { + case QuotedString: + case CommentBox: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerTCL::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: + case CommentBox: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS", 9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif", 9); +#endif + break; + + case QuotedKeyword: + case Operator: + case ExpandKeyword: + case TCLKeyword: + case TkKeyword: + case ITCLKeyword: + case TkCommand: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case CommentBlock: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS", 8); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 11); +#else + f = QFont("Serif", 9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerTCL::keywords(int set) const +{ + if (set == 1) + return + "after append array auto_execok auto_import auto_load " + "auto_load_index auto_qualify beep bgerror binary break case " + "catch cd clock close concat continue dde default echo else " + "elseif encoding eof error eval exec exit expr fblocked " + "fconfigure fcopy file fileevent flush for foreach format gets " + "glob global history http if incr info interp join lappend lindex " + "linsert list llength load loadTk lrange lreplace lsearch lset " + "lsort memory msgcat namespace open package pid pkg::create " + "pkg_mkIndex Platform-specific proc puts pwd re_syntax read " + "regexp registry regsub rename resource return scan seek set " + "socket source split string subst switch tclLog tclMacPkgSearch " + "tclPkgSetup tclPkgUnknown tell time trace unknown unset update " + "uplevel upvar variable vwait while"; + + if (set == 2) + return + "bell bind bindtags bitmap button canvas checkbutton clipboard " + "colors console cursors destroy entry event focus font frame grab " + "grid image Inter-client keysyms label labelframe listbox lower " + "menu menubutton message option options pack panedwindow photo " + "place radiobutton raise scale scrollbar selection send spinbox " + "text tk tk_chooseColor tk_chooseDirectory tk_dialog tk_focusNext " + "tk_getOpenFile tk_messageBox tk_optionMenu tk_popup " + "tk_setPalette tkerror tkvars tkwait toplevel winfo wish wm"; + + if (set == 3) + return + "@scope body class code common component configbody constructor " + "define destructor hull import inherit itcl itk itk_component " + "itk_initialize itk_interior itk_option iwidgets keep method " + "private protected public"; + + if (set == 4) + return + "tk_bisque tk_chooseColor tk_dialog tk_focusFollowsMouse " + "tk_focusNext tk_focusPrev tk_getOpenFile tk_getSaveFile " + "tk_messageBox tk_optionMenu tk_popup tk_setPalette tk_textCopy " + "tk_textCut tk_textPaste tkButtonAutoInvoke tkButtonDown " + "tkButtonEnter tkButtonInvoke tkButtonLeave tkButtonUp " + "tkCancelRepeat tkCheckRadioDown tkCheckRadioEnter " + "tkCheckRadioInvoke tkColorDialog tkColorDialog_BuildDialog " + "tkColorDialog_CancelCmd tkColorDialog_Config " + "tkColorDialog_CreateSelector tkColorDialog_DrawColorScale " + "tkColorDialog_EnterColorBar tkColorDialog_HandleRGB Entry " + "tkColorDialog_HandleSelEntry tkColorDialog_InitValues " + "tkColorDialog_LeaveColorBar tkColorDialog_MoveSelector " + "tkColorDialog_OkCmd tkColorDialog_RedrawColorBars " + "tkColorDialog_RedrawFinalColor tkColorDialog_ReleaseMouse " + "tkColorDialog_ResizeColorBars tkColorDialog_RgbToX " + "tkColorDialog_SetRGBValue tkColorDialog_StartMove " + "tkColorDialog_XToRgb tkConsoleAbout tkConsoleBind tkConsoleExit " + "tkConsoleHistory tkConsoleInit tkConsoleInsert tkConsoleInvoke " + "tkConsoleOutput tkConsolePrompt tkConsoleSource tkDarken " + "tkEntryAutoScan tkEntryBackspace tkEntryButton1 " + "tkEntryClosestGap tkEntryGetSelection tkEntryInsert " + "tkEntryKeySelect tkEntryMouseSelect tkEntryNextWord tkEntryPaste " + "tkEntryPreviousWord tkEntrySeeInsert tkEntrySetCursor " + "tkEntryTranspose tkEventMotifBindings tkFDGetFileTypes " + "tkFirstMenu tkFocusGroup_BindIn tkFocusGroup_BindOut " + "tkFocusGroup_Create tkFocusGroup_Destroy tkFocusGroup_In " + "tkFocusGroup_Out tkFocusOK tkGenerateMenuSelect tkIconList " + "tkIconList_Add tkIconList_Arrange tkIconList_AutoScan " + "tkIconList_Btn1 tkIconList_Config tkIconList_Create " + "tkIconList_CtrlBtn1 tkIconList_Curselection tkIconList_DeleteAll " + "tkIconList_Double1 tkIconList_DrawSelection tkIconList_FocusIn " + "tkIconList_FocusOut tkIconList_Get tkIconList_Goto " + "tkIconList_Index tkIconList_Invoke tkIconList_KeyPress " + "tkIconList_Leave1 tkIconList_LeftRight tkIconList_Motion1 " + "tkIconList_Reset tkIconList_ReturnKey tkIconList_See " + "tkIconList_Select tkIconList_Selection tkIconList_ShiftBtn1 " + "tkIconList_UpDown tkListbox tkListboxAutoScan " + "tkListboxBeginExtend tkListboxBeginSelect tkListboxBeginToggle " + "tkListboxCancel tkListboxDataExtend tkListboxExtendUpDown " + "tkListboxKeyAccel_Goto tkListboxKeyAccel_Key " + "tkListboxKeyAccel_Reset tkListboxKeyAccel_Set " + "tkListboxKeyAccel_Unset tkListboxMotion tkListboxSelectAll " + "tkListboxUpDown tkMbButtonUp tkMbEnter tkMbLeave tkMbMotion " + "tkMbPost tkMenuButtonDown tkMenuDownArrow tkMenuDup tkMenuEscape " + "tkMenuFind tkMenuFindName tkMenuFirstEntry tkMenuInvoke " + "tkMenuLeave tkMenuLeftArrow tkMenuMotion tkMenuNextEntry " + "tkMenuNextMenu tkMenuRightArrow tkMenuUnpost tkMenuUpArrow " + "tkMessageBox tkMotifFDialog tkMotifFDialog_ActivateDList " + "tkMotifFDialog_ActivateFEnt tkMotifFDialog_ActivateFList " + "tkMotifFDialog_ActivateSEnt tkMotifFDialog_BrowseDList " + "tkMotifFDialog_BrowseFList tkMotifFDialog_BuildUI " + "tkMotifFDialog_CancelCmd tkMotifFDialog_Config " + "tkMotifFDialog_Create tkMotifFDialog_FileTypes " + "tkMotifFDialog_FilterCmd tkMotifFDialog_InterpFilter " + "tkMotifFDialog_LoadFiles tkMotifFDialog_MakeSList " + "tkMotifFDialog_OkCmd tkMotifFDialog_SetFilter " + "tkMotifFDialog_SetListMode tkMotifFDialog_Update tkPostOverPoint " + "tkRecolorTree tkRestoreOldGrab tkSaveGrabInfo tkScaleActivate " + "tkScaleButton2Down tkScaleButtonDown tkScaleControlPress " + "tkScaleDrag tkScaleEndDrag tkScaleIncrement tkScreenChanged " + "tkScrollButton2Down tkScrollButtonDown tkScrollButtonDrag " + "tkScrollButtonUp tkScrollByPages tkScrollByUnits tkScrollDrag " + "tkScrollEndDrag tkScrollSelect tkScrollStartDrag " + "tkScrollTopBottom tkScrollToPos tkTabToWindow tkTearOffMenu " + "tkTextAutoScan tkTextButton1 tkTextClosestGap tkTextInsert " + "tkTextKeyExtend tkTextKeySelect tkTextNextPara tkTextNextPos " + "tkTextNextWord tkTextPaste tkTextPrevPara tkTextPrevPos " + "tkTextPrevWord tkTextResetAnchor tkTextScrollPages " + "tkTextSelectTo tkTextSetCursor tkTextTranspose tkTextUpDownLine " + "tkTraverseToMenu tkTraverseWithinMenu"; + + if (set == 5) + return "expand"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerTCL::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case CommentLine: + return tr("Comment line"); + + case Number: + return tr("Number"); + + case QuotedKeyword: + return tr("Quoted keyword"); + + case QuotedString: + return tr("Quoted string"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case Substitution: + return tr("Substitution"); + + case SubstitutionBrace: + return tr("Brace substitution"); + + case Modifier: + return tr("Modifier"); + + case ExpandKeyword: + return tr("Expand keyword"); + + case TCLKeyword: + return tr("TCL keyword"); + + case TkKeyword: + return tr("Tk keyword"); + + case ITCLKeyword: + return tr("iTCL keyword"); + + case TkCommand: + return tr("Tk command"); + + case KeywordSet6: + return tr("User defined 1"); + + case KeywordSet7: + return tr("User defined 2"); + + case KeywordSet8: + return tr("User defined 3"); + + case KeywordSet9: + return tr("User defined 4"); + + case CommentBox: + return tr("Comment box"); + + case CommentBlock: + return tr("Comment block"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerTCL::defaultPaper(int style) const +{ + switch (style) + { + case Comment: + return QColor(0xf0,0xff,0xe0); + + case QuotedKeyword: + case QuotedString: + case ITCLKeyword: + return QColor(0xff,0xf0,0xf0); + + case Substitution: + return QColor(0xef,0xff,0xf0); + + case ExpandKeyword: + return QColor(0xff,0xff,0x80); + + case TkKeyword: + return QColor(0xe0,0xff,0xf0); + + case TkCommand: + return QColor(0xff,0xd0,0xd0); + + case CommentBox: + case CommentBlock: + return QColor(0xf0,0xff,0xf0); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerTCL::refreshProperties() +{ + setCommentProp(); +} + + +// Read properties from the settings. +bool QsciLexerTCL::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerTCL::writeProperties(QSettings &qs, const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + + return rc; +} + + +// Set if comments can be folded. +void QsciLexerTCL::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerTCL::setCommentProp() +{ + emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertekhex.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertekhex.cpp new file mode 100644 index 000000000..ae6d2bddc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertekhex.cpp @@ -0,0 +1,59 @@ +// This module implements the QsciLexerTekHex class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexertekhex.h" + + +// The ctor. +QsciLexerTekHex::QsciLexerTekHex(QObject *parent) + : QsciLexerHex(parent) +{ +} + + +// The dtor. +QsciLexerTekHex::~QsciLexerTekHex() +{ +} + + +// Returns the language name. +const char *QsciLexerTekHex::language() const +{ + return "Tektronix-Hex"; +} + + +// Returns the lexer name. +const char *QsciLexerTekHex::lexer() const +{ + return "tehex"; +} + + +// Returns the user name of a style. +QString QsciLexerTekHex::description(int style) const +{ + // Handle unsupported styles. + if (style == NoAddress || style == RecordCount || style == ExtendedAddress || style == UnknownData) + return QString(); + + return QsciLexerHex::description(style); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertex.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertex.cpp new file mode 100644 index 000000000..fc33ba5b9 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexertex.cpp @@ -0,0 +1,308 @@ +// This module implements the QsciLexerTeX class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexertex.h" + +#include +#include +#include + + +// The ctor. +QsciLexerTeX::QsciLexerTeX(QObject *parent) + : QsciLexer(parent), + fold_comments(false), fold_compact(true), process_comments(false), + process_if(true) +{ +} + + +// The dtor. +QsciLexerTeX::~QsciLexerTeX() +{ +} + + +// Returns the language name. +const char *QsciLexerTeX::language() const +{ + return "TeX"; +} + + +// Returns the lexer name. +const char *QsciLexerTeX::lexer() const +{ + return "tex"; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerTeX::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\@"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerTeX::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x3f,0x3f,0x3f); + + case Special: + return QColor(0x00,0x7f,0x7f); + + case Group: + return QColor(0x7f,0x00,0x00); + + case Symbol: + return QColor(0x7f,0x7f,0x00); + + case Command: + return QColor(0x00,0x7f,0x00); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the set of keywords. +const char *QsciLexerTeX::keywords(int set) const +{ + if (set == 1) + return + "above abovedisplayshortskip abovedisplayskip " + "abovewithdelims accent adjdemerits advance " + "afterassignment aftergroup atop atopwithdelims " + "badness baselineskip batchmode begingroup " + "belowdisplayshortskip belowdisplayskip binoppenalty " + "botmark box boxmaxdepth brokenpenalty catcode char " + "chardef cleaders closein closeout clubpenalty copy " + "count countdef cr crcr csname day deadcycles def " + "defaulthyphenchar defaultskewchar delcode delimiter " + "delimiterfactor delimeters delimitershortfall " + "delimeters dimen dimendef discretionary " + "displayindent displaylimits displaystyle " + "displaywidowpenalty displaywidth divide " + "doublehyphendemerits dp dump edef else " + "emergencystretch end endcsname endgroup endinput " + "endlinechar eqno errhelp errmessage " + "errorcontextlines errorstopmode escapechar everycr " + "everydisplay everyhbox everyjob everymath everypar " + "everyvbox exhyphenpenalty expandafter fam fi " + "finalhyphendemerits firstmark floatingpenalty font " + "fontdimen fontname futurelet gdef global group " + "globaldefs halign hangafter hangindent hbadness " + "hbox hfil horizontal hfill horizontal hfilneg hfuzz " + "hoffset holdinginserts hrule hsize hskip hss " + "horizontal ht hyphenation hyphenchar hyphenpenalty " + "hyphen if ifcase ifcat ifdim ifeof iffalse ifhbox " + "ifhmode ifinner ifmmode ifnum ifodd iftrue ifvbox " + "ifvmode ifvoid ifx ignorespaces immediate indent " + "input inputlineno input insert insertpenalties " + "interlinepenalty jobname kern language lastbox " + "lastkern lastpenalty lastskip lccode leaders left " + "lefthyphenmin leftskip leqno let limits linepenalty " + "line lineskip lineskiplimit long looseness lower " + "lowercase mag mark mathaccent mathbin mathchar " + "mathchardef mathchoice mathclose mathcode mathinner " + "mathop mathopen mathord mathpunct mathrel " + "mathsurround maxdeadcycles maxdepth meaning " + "medmuskip message mkern month moveleft moveright " + "mskip multiply muskip muskipdef newlinechar noalign " + "noboundary noexpand noindent nolimits nonscript " + "scriptscript nonstopmode nulldelimiterspace " + "nullfont number omit openin openout or outer output " + "outputpenalty over overfullrule overline " + "overwithdelims pagedepth pagefilllstretch " + "pagefillstretch pagefilstretch pagegoal pageshrink " + "pagestretch pagetotal par parfillskip parindent " + "parshape parskip patterns pausing penalty " + "postdisplaypenalty predisplaypenalty predisplaysize " + "pretolerance prevdepth prevgraf radical raise read " + "relax relpenalty right righthyphenmin rightskip " + "romannumeral scriptfont scriptscriptfont " + "scriptscriptstyle scriptspace scriptstyle " + "scrollmode setbox setlanguage sfcode shipout show " + "showbox showboxbreadth showboxdepth showlists " + "showthe skewchar skip skipdef spacefactor spaceskip " + "span special splitbotmark splitfirstmark " + "splitmaxdepth splittopskip string tabskip textfont " + "textstyle the thickmuskip thinmuskip time toks " + "toksdef tolerance topmark topskip tracingcommands " + "tracinglostchars tracingmacros tracingonline " + "tracingoutput tracingpages tracingparagraphs " + "tracingrestores tracingstats uccode uchyph " + "underline unhbox unhcopy unkern unpenalty unskip " + "unvbox unvcopy uppercase vadjust valign vbadness " + "vbox vcenter vfil vfill vfilneg vfuzz voffset vrule " + "vsize vskip vsplit vss vtop wd widowpenalty write " + "xdef xleaders xspaceskip year " + "TeX bgroup egroup endgraf space empty null newcount " + "newdimen newskip newmuskip newbox newtoks newhelp " + "newread newwrite newfam newlanguage newinsert newif " + "maxdimen magstephalf magstep frenchspacing " + "nonfrenchspacing normalbaselines obeylines " + "obeyspaces raggedr ight ttraggedright thinspace " + "negthinspace enspace enskip quad qquad smallskip " + "medskip bigskip removelastskip topglue vglue hglue " + "break nobreak allowbreak filbreak goodbreak " + "smallbreak medbreak bigbreak line leftline " + "rightline centerline rlap llap underbar strutbox " + "strut cases matrix pmatrix bordermatrix eqalign " + "displaylines eqalignno leqalignno pageno folio " + "tracingall showhyphens fmtname fmtversion hphantom " + "vphantom phantom smash"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerTeX::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Special: + return tr("Special"); + + case Group: + return tr("Group"); + + case Symbol: + return tr("Symbol"); + + case Command: + return tr("Command"); + + case Text: + return tr("Text"); + } + + return QString(); +} + + +// Refresh all properties. +void QsciLexerTeX::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setProcessCommentsProp(); + setAutoIfProp(); +} + + +// Read properties from the settings. +bool QsciLexerTeX::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + process_comments = qs.value(prefix + "processcomments", false).toBool(); + process_if = qs.value(prefix + "processif", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerTeX::writeProperties(QSettings &qs, const QString &prefix) const +{ + int rc = true; + + qs.value(prefix + "foldcomments", fold_comments); + qs.value(prefix + "foldcompact", fold_compact); + qs.value(prefix + "processcomments", process_comments); + qs.value(prefix + "processif", process_if); + + return rc; +} + + +// Set if comments can be folded. +void QsciLexerTeX::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerTeX::setCommentProp() +{ + emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); +} + + +// Set if folds are compact. +void QsciLexerTeX::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerTeX::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} + + +// Set if comments are processed +void QsciLexerTeX::setProcessComments(bool enable) +{ + process_comments = enable; + + setProcessCommentsProp(); +} + + +// Set the "lexer.tex.comment.process" property. +void QsciLexerTeX::setProcessCommentsProp() +{ + emit propertyChanged("lexer.tex.comment.process", (process_comments ? "1" : "0")); +} + + +// Set if \if is processed +void QsciLexerTeX::setProcessIf(bool enable) +{ + process_if = enable; + + setAutoIfProp(); +} + + +// Set the "lexer.tex.auto.if" property. +void QsciLexerTeX::setAutoIfProp() +{ + emit propertyChanged("lexer.tex.auto.if", (process_if ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerverilog.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerverilog.cpp new file mode 100644 index 000000000..676a9fe74 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerverilog.cpp @@ -0,0 +1,572 @@ +// This module implements the QsciLexerVerilog class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerverilog.h" + +#include +#include +#include + + +// The ctor. +QsciLexerVerilog::QsciLexerVerilog(QObject *parent) + : QsciLexer(parent), + fold_atelse(false), fold_comments(false), fold_compact(true), + fold_preproc(false), fold_atmodule(false) +{ +} + + +// The dtor. +QsciLexerVerilog::~QsciLexerVerilog() +{ +} + + +// Returns the language name. +const char *QsciLexerVerilog::language() const +{ + return "Verilog"; +} + + +// Returns the lexer name. +const char *QsciLexerVerilog::lexer() const +{ + return "verilog"; +} + + +// Return the style used for braces. +int QsciLexerVerilog::braceStyle() const +{ + return Operator; +} + + +// Returns the set of keywords. +const char *QsciLexerVerilog::keywords(int set) const +{ + if (set == 1) + return + "always and assign automatic begin buf bufif0 bufif1 case casex " + "casez cell cmos config deassign default defparam design disable " + "edge else end endcase endconfig endfunction endgenerate " + "endmodule endprimitiveendspecify endtable endtask event for " + "force forever fork function generate genvar highz0 highz1 if " + "ifnone incdir include initial inout input instance integer join " + "large liblist library localparam macromodule medium module nand " + "negedge nmos nor noshowcancelled not notif0 notif1 or output " + "parameter pmos posedge primitive pull0 pull1 pulldown pullup " + "pulsestyle_ondetect pulsestyle_onevent rcmos real realtime reg " + "release repeat rnmos rpmos rtran rtranif0 rtranif1 scalared " + "showcancelled signed small specify specparam strong0 strong1 " + "supply0 supply1 table task time tran tranif0 tranif1 tri tri0 " + "tri1 triand trior trireg unsigned use vectored wait wand weak0 " + "weak1 while wire wor xnor xor"; + + if (set == 3) + return + "$async$and$array $async$and$plane $async$nand$array " + "$async$nand$plane $async$nor$array $async$nor$plane " + "$async$or$array $async$or$plane $bitstoreal $countdrivers " + "$display $displayb $displayh $displayo $dist_chi_square " + "$dist_erlang $dist_exponential $dist_normal $dist_poisson " + "$dist_t $dist_uniform $dumpall $dumpfile $dumpflush $dumplimit " + "$dumpoff $dumpon $dumpportsall $dumpportsflush $dumpportslimit " + "$dumpportsoff $dumpportson $dumpvars $fclose $fdisplayh " + "$fdisplay $fdisplayf $fdisplayb $ferror $fflush $fgetc $fgets " + "$finish $fmonitorb $fmonitor $fmonitorf $fmonitorh $fopen " + "$fread $fscanf $fseek $fsscanf $fstrobe $fstrobebb $fstrobef " + "$fstrobeh $ftel $fullskew $fwriteb $fwritef $fwriteh $fwrite " + "$getpattern $history $hold $incsave $input $itor $key $list " + "$log $monitorb $monitorh $monitoroff $monitoron $monitor " + "$monitoro $nochange $nokey $nolog $period $printtimescale " + "$q_add $q_exam $q_full $q_initialize $q_remove $random " + "$readmemb $readmemh $readmemh $realtime $realtobits $recovery " + "$recrem $removal $reset_count $reset $reset_value $restart " + "$rewind $rtoi $save $scale $scope $sdf_annotate $setup " + "$setuphold $sformat $showscopes $showvariables $showvars " + "$signed $skew $sreadmemb $sreadmemh $stime $stop $strobeb " + "$strobe $strobeh $strobeo $swriteb $swriteh $swriteo $swrite " + "$sync$and$array $sync$and$plane $sync$nand$array " + "$sync$nand$plane $sync$nor$array $sync$nor$plane $sync$or$array " + "$sync$or$plane $test$plusargs $time $timeformat $timeskew " + "$ungetc $unsigned $value$plusargs $width $writeb $writeh $write " + "$writeo"; + + return 0; +} + + +// Return the string of characters that comprise a word. +const char *QsciLexerVerilog::wordCharacters() const +{ + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerVerilog::defaultColor(int style) const +{ + switch (style) + { + case Default: + case InactiveComment: + case InactiveCommentLine: + case InactiveCommentBang: + case InactiveNumber: + case InactiveKeyword: + case InactiveString: + case InactiveKeywordSet2: + case InactiveSystemTask: + case InactivePreprocessor: + case InactiveOperator: + case InactiveIdentifier: + case InactiveUnclosedString: + case InactiveUserKeywordSet: + case InactiveCommentKeyword: + case InactiveDeclareInputPort: + case InactiveDeclareOutputPort: + case InactiveDeclareInputOutputPort: + case InactivePortConnection: + return QColor(0x80, 0x80, 0x80); + + case Comment: + case CommentLine: + return QColor(0x00, 0x7f, 0x00); + + case CommentBang: + return QColor(0x3f, 0x7f, 0x3f); + + case Number: + case KeywordSet2: + return QColor(0x00, 0x7f, 0x7f); + + case Keyword: + case DeclareOutputPort: + return QColor(0x00, 0x00, 0x7f); + + case String: + return QColor(0x7f, 0x00, 0x7f); + + case SystemTask: + return QColor(0x80, 0x40, 0x20); + + case Preprocessor: + return QColor(0x7f, 0x7f, 0x00); + + case Operator: + return QColor(0x00, 0x70, 0x70); + + case UnclosedString: + return QColor(0x00, 0x00, 0x00); + + case UserKeywordSet: + case CommentKeyword: + return QColor(0x2a, 0x00, 0xff); + + case DeclareInputPort: + return QColor(0x7f, 0x00, 0x00); + + case DeclareInputOutputPort: + return QColor(0x00, 0x00, 0xff); + + case PortConnection: + return QColor(0x00, 0x50, 0x32); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerVerilog::defaultEolFill(int style) const +{ + switch (style) + { + case CommentBang: + case UnclosedString: + case InactiveDefault: + case InactiveComment: + case InactiveCommentLine: + case InactiveCommentBang: + case InactiveNumber: + case InactiveKeyword: + case InactiveString: + case InactiveKeywordSet2: + case InactiveSystemTask: + case InactivePreprocessor: + case InactiveOperator: + case InactiveIdentifier: + case InactiveUnclosedString: + case InactiveUserKeywordSet: + case InactiveCommentKeyword: + case InactiveDeclareInputPort: + case InactiveDeclareOutputPort: + case InactiveDeclareInputOutputPort: + case InactivePortConnection: + return true; + } + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerVerilog::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: + case CommentBang: + case UserKeywordSet: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + case Keyword: + case PortConnection: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case InactiveDefault: + case InactiveComment: + case InactiveCommentLine: + case InactiveCommentBang: + case InactiveNumber: + case InactiveKeyword: + case InactiveString: + case InactiveKeywordSet2: + case InactiveSystemTask: + case InactivePreprocessor: + case InactiveOperator: + case InactiveIdentifier: + case InactiveUnclosedString: + case InactiveUserKeywordSet: + case InactiveCommentKeyword: + case InactiveDeclareInputPort: + case InactiveDeclareOutputPort: + case InactiveDeclareInputOutputPort: + case InactivePortConnection: + f = QsciLexer::defaultFont(style); + f.setItalic(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the user name of a style. +QString QsciLexerVerilog::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case InactiveDefault: + return tr("Inactive default"); + + case Comment: + return tr("Comment"); + + case InactiveComment: + return tr("Inactive comment"); + + case CommentLine: + return tr("Line comment"); + + case InactiveCommentLine: + return tr("Inactive line comment"); + + case CommentBang: + return tr("Bang comment"); + + case InactiveCommentBang: + return tr("Inactive bang comment"); + + case Number: + return tr("Number"); + + case InactiveNumber: + return tr("Inactive number"); + + case Keyword: + return tr("Primary keywords and identifiers"); + + case InactiveKeyword: + return tr("Inactive primary keywords and identifiers"); + + case String: + return tr("String"); + + case InactiveString: + return tr("Inactive string"); + + case KeywordSet2: + return tr("Secondary keywords and identifiers"); + + case InactiveKeywordSet2: + return tr("Inactive secondary keywords and identifiers"); + + case SystemTask: + return tr("System task"); + + case InactiveSystemTask: + return tr("Inactive system task"); + + case Preprocessor: + return tr("Preprocessor block"); + + case InactivePreprocessor: + return tr("Inactive preprocessor block"); + + case Operator: + return tr("Operator"); + + case InactiveOperator: + return tr("Inactive operator"); + + case Identifier: + return tr("Identifier"); + + case InactiveIdentifier: + return tr("Inactive identifier"); + + case UnclosedString: + return tr("Unclosed string"); + + case InactiveUnclosedString: + return tr("Inactive unclosed string"); + + case UserKeywordSet: + return tr("User defined tasks and identifiers"); + + case InactiveUserKeywordSet: + return tr("Inactive user defined tasks and identifiers"); + + case CommentKeyword: + return tr("Keyword comment"); + + case InactiveCommentKeyword: + return tr("Inactive keyword comment"); + + case DeclareInputPort: + return tr("Input port declaration"); + + case InactiveDeclareInputPort: + return tr("Inactive input port declaration"); + + case DeclareOutputPort: + return tr("Output port declaration"); + + case InactiveDeclareOutputPort: + return tr("Inactive output port declaration"); + + case DeclareInputOutputPort: + return tr("Input/output port declaration"); + + case InactiveDeclareInputOutputPort: + return tr("Inactive input/output port declaration"); + + case PortConnection: + return tr("Port connection"); + + case InactivePortConnection: + return tr("Inactive port connection"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerVerilog::defaultPaper(int style) const +{ + switch (style) + { + case CommentBang: + return QColor(0xe0, 0xf0, 0xff); + + case UnclosedString: + return QColor(0xe0, 0xc0, 0xe0); + + case InactiveDefault: + case InactiveComment: + case InactiveCommentLine: + case InactiveCommentBang: + case InactiveNumber: + case InactiveKeyword: + case InactiveString: + case InactiveKeywordSet2: + case InactiveSystemTask: + case InactivePreprocessor: + case InactiveOperator: + case InactiveIdentifier: + case InactiveUnclosedString: + case InactiveUserKeywordSet: + case InactiveCommentKeyword: + case InactiveDeclareInputPort: + case InactiveDeclareOutputPort: + case InactiveDeclareInputOutputPort: + case InactivePortConnection: + return QColor(0xe0, 0xe0, 0xe0); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerVerilog::refreshProperties() +{ + setAtElseProp(); + setCommentProp(); + setCompactProp(); + setPreprocProp(); + setAtModuleProp(); + + // We don't provide options for these as there doesn't seem much point in + // disabling them. + emit propertyChanged("lexer.verilog.track.preprocessor", "1"); + emit propertyChanged("lexer.verilog.update.preprocessor", "1"); + emit propertyChanged("lexer.verilog.portstyling", "1"); + emit propertyChanged("lexer.verilog.allupperkeywords", "1"); +} + + +// Read properties from the settings. +bool QsciLexerVerilog::readProperties(QSettings &qs,const QString &prefix) +{ + fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_preproc = qs.value(prefix + "foldpreprocessor", false).toBool(); + fold_atmodule = qs.value(prefix + "foldverilogflags", false).toBool(); + + return true; +} + + +// Write properties to the settings. +bool QsciLexerVerilog::writeProperties(QSettings &qs,const QString &prefix) const +{ + qs.setValue(prefix + "foldatelse", fold_atelse); + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldpreprocessor", fold_preproc); + qs.setValue(prefix + "foldverilogflags", fold_atmodule); + + return true; +} + + +// Set if else can be folded. +void QsciLexerVerilog::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.at.else" property. +void QsciLexerVerilog::setAtElseProp() +{ + emit propertyChanged("fold.at.else", (fold_atelse ? "1" : "0")); +} + + +// Set if comments can be folded. +void QsciLexerVerilog::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerVerilog::setCommentProp() +{ + emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); +} + + +// Set if folds are compact +void QsciLexerVerilog::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerVerilog::setCompactProp() +{ + emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); +} + + +// Set if preprocessor blocks can be folded. +void QsciLexerVerilog::setFoldPreprocessor(bool fold) +{ + fold_preproc = fold; + + setPreprocProp(); +} + + +// Set the "fold.preprocessor" property. +void QsciLexerVerilog::setPreprocProp() +{ + emit propertyChanged("fold.preprocessor", (fold_preproc ? "1" : "0")); +} + + +// Set if modules can be folded. +void QsciLexerVerilog::setFoldAtModule(bool fold) +{ + fold_atmodule = fold; + + setAtModuleProp(); +} + + +// Set the "fold.verilog.flags" property. +void QsciLexerVerilog::setAtModuleProp() +{ + emit propertyChanged("fold.verilog.flags", (fold_atmodule ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexervhdl.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexervhdl.cpp new file mode 100644 index 000000000..f1806b9e9 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexervhdl.cpp @@ -0,0 +1,418 @@ +// This module implements the QsciLexerVHDL class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexervhdl.h" + +#include +#include +#include + + +// The ctor. +QsciLexerVHDL::QsciLexerVHDL(QObject *parent) + : QsciLexer(parent), + fold_comments(true), fold_compact(true), fold_atelse(true), + fold_atbegin(true), fold_atparenth(true) +{ +} + + +// The dtor. +QsciLexerVHDL::~QsciLexerVHDL() +{ +} + + +// Returns the language name. +const char *QsciLexerVHDL::language() const +{ + return "VHDL"; +} + + +// Returns the lexer name. +const char *QsciLexerVHDL::lexer() const +{ + return "vhdl"; +} + + +// Return the style used for braces. +int QsciLexerVHDL::braceStyle() const +{ + return Attribute; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerVHDL::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x80,0x00,0x80); + + case Comment: + return QColor(0x00,0x7f,0x00); + + case CommentLine: + return QColor(0x3f,0x7f,0x3f); + + case Number: + case StandardOperator: + return QColor(0x00,0x7f,0x7f); + + case String: + return QColor(0x7f,0x00,0x7f); + + case UnclosedString: + return QColor(0x00,0x00,0x00); + + case Keyword: + return QColor(0x00,0x00,0x7f); + + case Attribute: + return QColor(0x80,0x40,0x20); + + case StandardFunction: + return QColor(0x80,0x80,0x20); + + case StandardPackage: + return QColor(0x20,0x80,0x20); + + case StandardType: + return QColor(0x20,0x80,0x80); + + case KeywordSet7: + return QColor(0x80,0x40,0x20); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerVHDL::defaultEolFill(int style) const +{ + if (style == UnclosedString) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerVHDL::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Comment: + case CommentLine: + case KeywordSet7: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerVHDL::keywords(int set) const +{ + if (set == 1) + return + "access after alias all architecture array assert attribute begin " + "block body buffer bus case component configuration constant " + "disconnect downto else elsif end entity exit file for function " + "generate generic group guarded if impure in inertial inout is " + "label library linkage literal loop map new next null of on open " + "others out package port postponed procedure process pure range " + "record register reject report return select severity shared " + "signal subtype then to transport type unaffected units until use " + "variable wait when while with"; + + if (set == 2) + return + "abs and mod nand nor not or rem rol ror sla sll sra srl xnor xor"; + + if (set == 3) + return + "left right low high ascending image value pos val succ pred " + "leftof rightof base range reverse_range length delayed stable " + "quiet transaction event active last_event last_active last_value " + "driving driving_value simple_name path_name instance_name"; + + if (set == 4) + return + "now readline read writeline write endfile resolved to_bit " + "to_bitvector to_stdulogic to_stdlogicvector to_stdulogicvector " + "to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left " + "shift_right rotate_left rotate_right resize to_integer " + "to_unsigned to_signed std_match to_01"; + + if (set == 5) + return + "std ieee work standard textio std_logic_1164 std_logic_arith " + "std_logic_misc std_logic_signed std_logic_textio " + "std_logic_unsigned numeric_bit numeric_std math_complex " + "math_real vital_primitives vital_timing"; + + if (set == 6) + return + "boolean bit character severity_level integer real time " + "delay_length natural positive string bit_vector file_open_kind " + "file_open_status line text side width std_ulogic " + "std_ulogic_vector std_logic std_logic_vector X01 X01Z UX01 UX01Z " + "unsigned signed"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerVHDL::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case CommentLine: + return tr("Comment line"); + + case Number: + return tr("Number"); + + case String: + return tr("String"); + + case Operator: + return tr("Operator"); + + case Identifier: + return tr("Identifier"); + + case UnclosedString: + return tr("Unclosed string"); + + case Keyword: + return tr("Keyword"); + + case StandardOperator: + return tr("Standard operator"); + + case Attribute: + return tr("Attribute"); + + case StandardFunction: + return tr("Standard function"); + + case StandardPackage: + return tr("Standard package"); + + case StandardType: + return tr("Standard type"); + + case KeywordSet7: + return tr("User defined"); + + case CommentBlock: + return tr("Comment block"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerVHDL::defaultPaper(int style) const +{ + if (style == UnclosedString) + return QColor(0xe0,0xc0,0xe0); + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerVHDL::refreshProperties() +{ + setCommentProp(); + setCompactProp(); + setAtElseProp(); + setAtBeginProp(); + setAtParenthProp(); +} + + +// Read properties from the settings. +bool QsciLexerVHDL::readProperties(QSettings &qs,const QString &prefix) +{ + fold_comments = qs.value(prefix + "foldcomments", true).toBool(); + fold_compact = qs.value(prefix + "foldcompact", true).toBool(); + fold_atelse = qs.value(prefix + "foldatelse", true).toBool(); + fold_atbegin = qs.value(prefix + "foldatbegin", true).toBool(); + fold_atparenth = qs.value(prefix + "foldatparenthesis", true).toBool(); + + return true; +} + + +// Write properties to the settings. +bool QsciLexerVHDL::writeProperties(QSettings &qs,const QString &prefix) const +{ + qs.setValue(prefix + "foldcomments", fold_comments); + qs.setValue(prefix + "foldcompact", fold_compact); + qs.setValue(prefix + "foldatelse", fold_atelse); + qs.setValue(prefix + "foldatbegin", fold_atbegin); + qs.setValue(prefix + "foldatparenthesis", fold_atparenth); + + return true; +} + + +// Return true if comments can be folded. +bool QsciLexerVHDL::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerVHDL::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment" property. +void QsciLexerVHDL::setCommentProp() +{ + emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); +} + + +// Return true if folds are compact. +bool QsciLexerVHDL::foldCompact() const +{ + return fold_compact; +} + + +// Set if folds are compact +void QsciLexerVHDL::setFoldCompact(bool fold) +{ + fold_compact = fold; + + setCompactProp(); +} + + +// Set the "fold.compact" property. +void QsciLexerVHDL::setCompactProp() +{ + emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); +} + + +// Return true if else blocks can be folded. +bool QsciLexerVHDL::foldAtElse() const +{ + return fold_atelse; +} + + +// Set if else blocks can be folded. +void QsciLexerVHDL::setFoldAtElse(bool fold) +{ + fold_atelse = fold; + + setAtElseProp(); +} + + +// Set the "fold.at.else" property. +void QsciLexerVHDL::setAtElseProp() +{ + emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0")); +} + + +// Return true if begin blocks can be folded. +bool QsciLexerVHDL::foldAtBegin() const +{ + return fold_atbegin; +} + + +// Set if begin blocks can be folded. +void QsciLexerVHDL::setFoldAtBegin(bool fold) +{ + fold_atbegin = fold; + + setAtBeginProp(); +} + + +// Set the "fold.at.Begin" property. +void QsciLexerVHDL::setAtBeginProp() +{ + emit propertyChanged("fold.at.Begin",(fold_atelse ? "1" : "0")); +} + + +// Return true if blocks can be folded at a parenthesis. +bool QsciLexerVHDL::foldAtParenthesis() const +{ + return fold_atparenth; +} + + +// Set if blocks can be folded at a parenthesis. +void QsciLexerVHDL::setFoldAtParenthesis(bool fold) +{ + fold_atparenth = fold; + + setAtParenthProp(); +} + + +// Set the "fold.at.Parenthese" property. +void QsciLexerVHDL::setAtParenthProp() +{ + emit propertyChanged("fold.at.Parenthese",(fold_atparenth ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerxml.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerxml.cpp new file mode 100644 index 000000000..478eb4587 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexerxml.cpp @@ -0,0 +1,252 @@ +// This module implements the QsciLexerXML class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexerxml.h" + +#include +#include +#include + + +// The ctor. +QsciLexerXML::QsciLexerXML(QObject *parent) + : QsciLexerHTML(parent), scripts(true) +{ +} + + +// The dtor. +QsciLexerXML::~QsciLexerXML() +{ +} + + +// Returns the language name. +const char *QsciLexerXML::language() const +{ + return "XML"; +} + + +// Returns the lexer name. +const char *QsciLexerXML::lexer() const +{ + return "xml"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerXML::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x00,0x00,0x00); + + case Tag: + case UnknownTag: + case XMLTagEnd: + case SGMLDefault: + case SGMLCommand: + return QColor(0x00,0x00,0x80); + + case Attribute: + case UnknownAttribute: + return QColor(0x00,0x80,0x80); + + case HTMLNumber: + return QColor(0x00,0x7f,0x7f); + + case HTMLDoubleQuotedString: + case HTMLSingleQuotedString: + return QColor(0x7f,0x00,0x7f); + + case OtherInTag: + case Entity: + case XMLStart: + case XMLEnd: + return QColor(0x80,0x00,0x80); + + case HTMLComment: + case SGMLComment: + return QColor(0x80,0x80,0x00); + + case CDATA: + case PHPStart: + case SGMLDoubleQuotedString: + case SGMLError: + return QColor(0x80,0x00,0x00); + + case HTMLValue: + return QColor(0x60,0x80,0x60); + + case SGMLParameter: + return QColor(0x00,0x66,0x00); + + case SGMLSingleQuotedString: + return QColor(0x99,0x33,0x00); + + case SGMLSpecial: + return QColor(0x33,0x66,0xff); + + case SGMLEntity: + return QColor(0x33,0x33,0x33); + + case SGMLBlockDefault: + return QColor(0x00,0x00,0x66); + } + + return QsciLexerHTML::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerXML::defaultEolFill(int style) const +{ + if (style == CDATA) + return true; + + return QsciLexerHTML::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerXML::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Default: + case Entity: + case CDATA: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman",11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter",10); +#endif + break; + + case XMLStart: + case XMLEnd: + case SGMLCommand: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + default: + f = QsciLexerHTML::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerXML::keywords(int set) const +{ + if (set == 6) + return QsciLexerHTML::keywords(set); + + return 0; +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerXML::defaultPaper(int style) const +{ + switch (style) + { + case CDATA: + return QColor(0xff,0xf0,0xf0); + + case SGMLDefault: + case SGMLCommand: + case SGMLParameter: + case SGMLDoubleQuotedString: + case SGMLSingleQuotedString: + case SGMLSpecial: + case SGMLEntity: + case SGMLComment: + return QColor(0xef,0xef,0xff); + + case SGMLError: + return QColor(0xff,0x66,0x66); + + case SGMLBlockDefault: + return QColor(0xcc,0xcc,0xe0); + } + + return QsciLexerHTML::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerXML::refreshProperties() +{ + setScriptsProp(); +} + + +// Read properties from the settings. +bool QsciLexerXML::readProperties(QSettings &qs, const QString &prefix) +{ + int rc = QsciLexerHTML::readProperties(qs, prefix); + + scripts = qs.value(prefix + "scriptsstyled", true).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerXML::writeProperties(QSettings &qs, const QString &prefix) const +{ + int rc = QsciLexerHTML::writeProperties(qs, prefix); + + qs.setValue(prefix + "scriptsstyled", scripts); + + return rc; +} + + +// Return true if scripts are styled. +bool QsciLexerXML::scriptsStyled() const +{ + return scripts; +} + + +// Set if scripts are styled. +void QsciLexerXML::setScriptsStyled(bool styled) +{ + scripts = styled; + + setScriptsProp(); +} + + +// Set the "lexer.xml.allow.scripts" property. +void QsciLexerXML::setScriptsProp() +{ + emit propertyChanged("lexer.xml.allow.scripts",(scripts ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeryaml.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeryaml.cpp new file mode 100644 index 000000000..4a672f265 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscilexeryaml.cpp @@ -0,0 +1,269 @@ +// This module implements the QsciLexerYAML class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscilexeryaml.h" + +#include +#include +#include + + +// The ctor. +QsciLexerYAML::QsciLexerYAML(QObject *parent) + : QsciLexer(parent), fold_comments(false) +{ +} + + +// The dtor. +QsciLexerYAML::~QsciLexerYAML() +{ +} + + +// Returns the language name. +const char *QsciLexerYAML::language() const +{ + return "YAML"; +} + + +// Returns the lexer name. +const char *QsciLexerYAML::lexer() const +{ + return "yaml"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerYAML::defaultColor(int style) const +{ + switch (style) + { + case Default: + return QColor(0x00,0x00,0x00); + + case Comment: + return QColor(0x00,0x88,0x00); + + case Identifier: + return QColor(0x00,0x00,0x88); + + case Keyword: + return QColor(0x88,0x00,0x88); + + case Number: + return QColor(0x88,0x00,0x00); + + case Reference: + return QColor(0x00,0x88,0x88); + + case DocumentDelimiter: + case SyntaxErrorMarker: + return QColor(0xff,0xff,0xff); + + case TextBlockMarker: + return QColor(0x33,0x33,0x66); + } + + return QsciLexer::defaultColor(style); +} + + +// Returns the end-of-line fill for a style. +bool QsciLexerYAML::defaultEolFill(int style) const +{ + if (style == DocumentDelimiter || style == SyntaxErrorMarker) + return true; + + return QsciLexer::defaultEolFill(style); +} + + +// Returns the font of the text for a style. +QFont QsciLexerYAML::defaultFont(int style) const +{ + QFont f; + + switch (style) + { + case Default: + case TextBlockMarker: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman", 11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter", 10); +#endif + break; + + case Identifier: + f = QsciLexer::defaultFont(style); + f.setBold(true); + break; + + case DocumentDelimiter: +#if defined(Q_OS_WIN) + f = QFont("Comic Sans MS",9); +#elif defined(Q_OS_MAC) + f = QFont("Comic Sans MS", 12); +#else + f = QFont("Bitstream Vera Serif",9); +#endif + f.setBold(true); + break; + + case SyntaxErrorMarker: +#if defined(Q_OS_WIN) + f = QFont("Times New Roman", 11); +#elif defined(Q_OS_MAC) + f = QFont("Times New Roman", 12); +#else + f = QFont("Bitstream Charter", 10); +#endif + f.setBold(true); + f.setItalic(true); + break; + + default: + f = QsciLexer::defaultFont(style); + } + + return f; +} + + +// Returns the set of keywords. +const char *QsciLexerYAML::keywords(int set) const +{ + if (set == 1) + return "true false yes no"; + + return 0; +} + + +// Returns the user name of a style. +QString QsciLexerYAML::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + + case Comment: + return tr("Comment"); + + case Identifier: + return tr("Identifier"); + + case Keyword: + return tr("Keyword"); + + case Number: + return tr("Number"); + + case Reference: + return tr("Reference"); + + case DocumentDelimiter: + return tr("Document delimiter"); + + case TextBlockMarker: + return tr("Text block marker"); + + case SyntaxErrorMarker: + return tr("Syntax error marker"); + + case Operator: + return tr("Operator"); + } + + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerYAML::defaultPaper(int style) const +{ + switch (style) + { + case DocumentDelimiter: + return QColor(0x00,0x00,0x88); + + case SyntaxErrorMarker: + return QColor(0xff,0x00,0x00); + } + + return QsciLexer::defaultPaper(style); +} + + +// Refresh all properties. +void QsciLexerYAML::refreshProperties() +{ + setCommentProp(); +} + + +// Read properties from the settings. +bool QsciLexerYAML::readProperties(QSettings &qs,const QString &prefix) +{ + int rc = true; + + fold_comments = qs.value(prefix + "foldcomments", false).toBool(); + + return rc; +} + + +// Write properties to the settings. +bool QsciLexerYAML::writeProperties(QSettings &qs,const QString &prefix) const +{ + int rc = true; + + qs.setValue(prefix + "foldcomments", fold_comments); + + return rc; +} + + +// Return true if comments can be folded. +bool QsciLexerYAML::foldComments() const +{ + return fold_comments; +} + + +// Set if comments can be folded. +void QsciLexerYAML::setFoldComments(bool fold) +{ + fold_comments = fold; + + setCommentProp(); +} + + +// Set the "fold.comment.yaml" property. +void QsciLexerYAML::setCommentProp() +{ + emit propertyChanged("fold.comment.yaml",(fold_comments ? "1" : "0")); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscimacro.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscimacro.cpp new file mode 100644 index 000000000..c216caeef --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscimacro.cpp @@ -0,0 +1,313 @@ +// This module implements the QsciMacro class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscimacro.h" + +#include + +#include "Qsci/qsciscintilla.h" + + +static int fromHex(unsigned char ch); + + +// The ctor. +QsciMacro::QsciMacro(QsciScintilla *parent) + : QObject(parent), qsci(parent) +{ +} + + +// The ctor that initialises the macro. +QsciMacro::QsciMacro(const QString &asc, QsciScintilla *parent) + : QObject(parent), qsci(parent) +{ + load(asc); +} + + +// The dtor. +QsciMacro::~QsciMacro() +{ +} + + +// Clear the contents of the macro. +void QsciMacro::clear() +{ + macro.clear(); +} + + +// Read a macro from a string. +bool QsciMacro::load(const QString &asc) +{ + bool ok = true; + + macro.clear(); + + QStringList fields = asc.split(' '); + + int f = 0; + + while (f < fields.size()) + { + Macro cmd; + unsigned len; + + // Extract the 3 fixed fields. + if (f + 3 > fields.size()) + { + ok = false; + break; + } + + cmd.msg = fields[f++].toUInt(&ok); + + if (!ok) + break; + + cmd.wParam = fields[f++].toULong(&ok); + + if (!ok) + break; + + len = fields[f++].toUInt(&ok); + + if (!ok) + break; + + // Extract any text. + if (len) + { + if (f + 1 > fields.size()) + { + ok = false; + break; + } + + QByteArray ba = fields[f++].toLatin1(); + const char *sp = ba.data(); + + if (!sp) + { + ok = false; + break; + } + + // Because of historical bugs the length field is unreliable. + bool embedded_null = false; + unsigned char ch; + + while ((ch = *sp++) != '\0') + { + if (ch == '"' || ch <= ' ' || ch >= 0x7f) + { + ok = false; + break; + } + + if (ch == '\\') + { + int b1, b2; + + if ((b1 = fromHex(*sp++)) < 0 || + (b2 = fromHex(*sp++)) < 0) + { + ok = false; + break; + } + + ch = (b1 << 4) + b2; + } + + if (ch == '\0') + { + // Don't add it now as it may be the terminating '\0'. + embedded_null = true; + } + else + { + if (embedded_null) + { + // Add the pending embedded '\0'. + cmd.text += '\0'; + embedded_null = false; + } + + cmd.text += ch; + } + } + + if (!ok) + break; + } + + macro.append(cmd); + } + + if (!ok) + macro.clear(); + + return ok; +} + + +// Write a macro to a string. +QString QsciMacro::save() const +{ + QString ms; + + QList::const_iterator it; + + for (it = macro.begin(); it != macro.end(); ++it) + { + if (!ms.isEmpty()) + ms += ' '; + + unsigned len = (*it).text.size(); + + ms += QString("%1 %2 %3").arg((*it).msg).arg((*it).wParam).arg(len); + + if (len) + { + // In Qt v3, if the length is greater than zero then it also + // includes the '\0', so we need to make sure that Qt v4 writes the + // '\0'. That the '\0' is written at all is a bug because + // QCString::size() is used instead of QCString::length(). We + // don't fix this so as not to break old macros. However this is + // still broken because we have already written the unadjusted + // length. So, in summary, the length field should be interpreted + // as a zero/non-zero value, and the end of the data is either at + // the next space or the very end of the data. + ++len; + + ms += ' '; + + const char *cp = (*it).text.data(); + + while (len--) + { + unsigned char ch = *cp++; + + if (ch == '\\' || ch == '"' || ch <= ' ' || ch >= 0x7f) + ms += QString("\\%1").arg(static_cast(ch), 2, 16, + QLatin1Char('0')); + else + ms += static_cast(ch); + } + } + } + + return ms; +} + + +// Play the macro. +void QsciMacro::play() +{ + if (!qsci) + return; + + QList::const_iterator it; + + for (it = macro.begin(); it != macro.end(); ++it) + qsci->SendScintilla((*it).msg, static_cast((*it).wParam), + (*it).text.constData()); +} + + +// Start recording. +void QsciMacro::startRecording() +{ + if (!qsci) + return; + + macro.clear(); + + connect(qsci, SIGNAL(SCN_MACRORECORD(unsigned int, unsigned long, void *)), + SLOT(record(unsigned int, unsigned long, void *))); + + qsci->SendScintilla(QsciScintillaBase::SCI_STARTRECORD); +} + + +// End recording. +void QsciMacro::endRecording() +{ + if (!qsci) + return; + + qsci->SendScintilla(QsciScintillaBase::SCI_STOPRECORD); + qsci->disconnect(this); +} + + +// Record a command. +void QsciMacro::record(unsigned int msg, unsigned long wParam, void *lParam) +{ + Macro m; + + m.msg = msg; + m.wParam = wParam; + + // Determine commands which need special handling of the parameters. + switch (msg) + { + case QsciScintillaBase::SCI_ADDTEXT: + m.text = QByteArray(reinterpret_cast(lParam), wParam); + break; + + case QsciScintillaBase::SCI_REPLACESEL: + if (!macro.isEmpty() && macro.last().msg == QsciScintillaBase::SCI_REPLACESEL) + { + // This is the command used for ordinary user input so it's a + // significant space reduction to append it to the previous + // command. + + macro.last().text.append(reinterpret_cast(lParam)); + return; + } + + /* Drop through. */ + + case QsciScintillaBase::SCI_INSERTTEXT: + case QsciScintillaBase::SCI_APPENDTEXT: + case QsciScintillaBase::SCI_SEARCHNEXT: + case QsciScintillaBase::SCI_SEARCHPREV: + m.text.append(reinterpret_cast(lParam)); + break; + } + + macro.append(m); +} + + +// Return the given hex character as a binary. +static int fromHex(unsigned char ch) +{ + if (ch >= '0' && ch <= '9') + return ch - '0'; + + if (ch >= 'a' && ch <= 'f') + return ch - 'a' + 10; + + return -1; +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla.pro b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla.pro new file mode 100644 index 000000000..c6f143afc --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla.pro @@ -0,0 +1,445 @@ +# The project file for the QScintilla library. +# +# Copyright (c) 2023 Riverbank Computing Limited +# +# This file is part of QScintilla. +# +# This file may be used under the terms of the GNU General Public License +# version 3.0 as published by the Free Software Foundation and appearing in +# the file LICENSE included in the packaging of this file. Please review the +# following information to ensure the GNU General Public License version 3.0 +# requirements will be met: http://www.gnu.org/copyleft/gpl.html. +# +# If you do not wish to use this file under the terms of the GPL version 3.0 +# then you may purchase a commercial license. For more information contact +# info@riverbankcomputing.com. +# +# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +!win32:VERSION = 15.2.1 + +TEMPLATE = lib +CONFIG += qt warn_off thread exceptions hide_symbols + +CONFIG(debug, debug|release) { + mac: { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION}_debug + } else { + win32: { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION}d + } else { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} + } + } +} else { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} +} + +macx:!CONFIG(staticlib) { + QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET) +} + +INCLUDEPATH += . ../scintilla/include ../scintilla/lexlib ../scintilla/src + +!CONFIG(staticlib) { + DEFINES += QSCINTILLA_MAKE_DLL + + # Comment this in to build a dynamic library supporting multiple + # architectures on macOS. + #QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 +} +DEFINES += SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES + +QT += widgets +!ios:QT += printsupport +macx:lessThan(QT_MAJOR_VERSION, 6) { + QT += macextras +} + +# Work around QTBUG-39300. +CONFIG -= android_install + +# For old versions of GCC. +unix:!macx { + CONFIG += c++11 +} + +# Comment this in if you want the internal Scintilla classes to be placed in a +# Scintilla namespace rather than pollute the global namespace. +#DEFINES += SCI_NAMESPACE + +target.path = $$[QT_INSTALL_LIBS] +INSTALLS += target + +header.path = $$[QT_INSTALL_HEADERS] +header.files = Qsci +INSTALLS += header + +trans.path = $$[QT_INSTALL_TRANSLATIONS] +trans.files = qscintilla_*.qm +INSTALLS += trans + +qsci.path = $$[QT_INSTALL_DATA] +qsci.files = ../qsci +INSTALLS += qsci + +features.path = $$[QT_HOST_DATA]/mkspecs/features +CONFIG(staticlib) { + features.files = $$PWD/features_staticlib/qscintilla2.prf +} else { + features.files = $$PWD/features/qscintilla2.prf +} +INSTALLS += features + +HEADERS = \ + ./Qsci/qsciglobal.h \ + ./Qsci/qsciscintilla.h \ + ./Qsci/qsciscintillabase.h \ + ./Qsci/qsciabstractapis.h \ + ./Qsci/qsciapis.h \ + ./Qsci/qscicommand.h \ + ./Qsci/qscicommandset.h \ + ./Qsci/qscidocument.h \ + ./Qsci/qscilexer.h \ + ./Qsci/qscilexerasm.h \ + ./Qsci/qscilexeravs.h \ + ./Qsci/qscilexerbash.h \ + ./Qsci/qscilexerbatch.h \ + ./Qsci/qscilexercmake.h \ + ./Qsci/qscilexercoffeescript.h \ + ./Qsci/qscilexercpp.h \ + ./Qsci/qscilexercsharp.h \ + ./Qsci/qscilexercss.h \ + ./Qsci/qscilexercustom.h \ + ./Qsci/qscilexerd.h \ + ./Qsci/qscilexerdiff.h \ + ./Qsci/qscilexeredifact.h \ + ./Qsci/qscilexerfortran.h \ + ./Qsci/qscilexerfortran77.h \ + ./Qsci/qscilexerhex.h \ + ./Qsci/qscilexerhtml.h \ + ./Qsci/qscilexeridl.h \ + ./Qsci/qscilexerintelhex.h \ + ./Qsci/qscilexerjava.h \ + ./Qsci/qscilexerjavascript.h \ + ./Qsci/qscilexerjson.h \ + ./Qsci/qscilexerlua.h \ + ./Qsci/qscilexermakefile.h \ + ./Qsci/qscilexermarkdown.h \ + ./Qsci/qscilexermasm.h \ + ./Qsci/qscilexermatlab.h \ + ./Qsci/qscilexernasm.h \ + ./Qsci/qscilexeroctave.h \ + ./Qsci/qscilexerpascal.h \ + ./Qsci/qscilexerperl.h \ + ./Qsci/qscilexerpostscript.h \ + ./Qsci/qscilexerpo.h \ + ./Qsci/qscilexerpov.h \ + ./Qsci/qscilexerproperties.h \ + ./Qsci/qscilexerpython.h \ + ./Qsci/qscilexerruby.h \ + ./Qsci/qscilexerspice.h \ + ./Qsci/qscilexersql.h \ + ./Qsci/qscilexersrec.h \ + ./Qsci/qscilexertcl.h \ + ./Qsci/qscilexertekhex.h \ + ./Qsci/qscilexertex.h \ + ./Qsci/qscilexerverilog.h \ + ./Qsci/qscilexervhdl.h \ + ./Qsci/qscilexerxml.h \ + ./Qsci/qscilexeryaml.h \ + ./Qsci/qscimacro.h \ + ./Qsci/qscistyle.h \ + ./Qsci/qscistyledtext.h \ + ListBoxQt.h \ + SciAccessibility.h \ + SciClasses.h \ + ScintillaQt.h \ + ../scintilla/include/ILexer.h \ + ../scintilla/include/ILoader.h \ + ../scintilla/include/Platform.h \ + ../scintilla/include/Sci_Position.h \ + ../scintilla/include/SciLexer.h \ + ../scintilla/include/Scintilla.h \ + ../scintilla/include/ScintillaWidget.h \ + ../scintilla/lexlib/Accessor.h \ + ../scintilla/lexlib/CharacterCategory.h \ + ../scintilla/lexlib/CharacterSet.h \ + ../scintilla/lexlib/DefaultLexer.h \ + ../scintilla/lexlib/LexAccessor.h \ + ../scintilla/lexlib/LexerBase.h \ + ../scintilla/lexlib/LexerModule.h \ + ../scintilla/lexlib/LexerNoExceptions.h \ + ../scintilla/lexlib/LexerSimple.h \ + ../scintilla/lexlib/OptionSet.h \ + ../scintilla/lexlib/PropSetSimple.h \ + ../scintilla/lexlib/SparseState.h \ + ../scintilla/lexlib/StringCopy.h \ + ../scintilla/lexlib/StyleContext.h \ + ../scintilla/lexlib/SubStyles.h \ + ../scintilla/lexlib/WordList.h \ + ../scintilla/src/AutoComplete.h \ + ../scintilla/src/CallTip.h \ + ../scintilla/src/CaseConvert.h \ + ../scintilla/src/CaseFolder.h \ + ../scintilla/src/Catalogue.h \ + ../scintilla/src/CellBuffer.h \ + ../scintilla/src/CharClassify.h \ + ../scintilla/src/ContractionState.h \ + ../scintilla/src/DBCS.h \ + ../scintilla/src/Decoration.h \ + ../scintilla/src/Document.h \ + ../scintilla/src/EditModel.h \ + ../scintilla/src/Editor.h \ + ../scintilla/src/EditView.h \ + ../scintilla/src/ElapsedPeriod.h \ + ../scintilla/src/ExternalLexer.h \ + ../scintilla/src/FontQuality.h \ + ../scintilla/src/Indicator.h \ + ../scintilla/src/IntegerRectangle.h \ + ../scintilla/src/KeyMap.h \ + ../scintilla/src/LineMarker.h \ + ../scintilla/src/MarginView.h \ + ../scintilla/src/Partitioning.h \ + ../scintilla/src/PerLine.h \ + ../scintilla/src/Position.h \ + ../scintilla/src/PositionCache.h \ + ../scintilla/src/RESearch.h \ + ../scintilla/src/RunStyles.h \ + ../scintilla/src/ScintillaBase.h \ + ../scintilla/src/Selection.h \ + ../scintilla/src/SparseVector.h \ + ../scintilla/src/SplitVector.h \ + ../scintilla/src/Style.h \ + ../scintilla/src/UniConversion.h \ + ../scintilla/src/UniqueString.h \ + ../scintilla/src/ViewStyle.h \ + ../scintilla/src/XPM.h + +!ios:HEADERS += ./Qsci/qsciprinter.h + +SOURCES = \ + qsciscintilla.cpp \ + qsciscintillabase.cpp \ + qsciabstractapis.cpp \ + qsciapis.cpp \ + qscicommand.cpp \ + qscicommandset.cpp \ + qscidocument.cpp \ + qscilexer.cpp \ + qscilexerasm.cpp \ + qscilexeravs.cpp \ + qscilexerbash.cpp \ + qscilexerbatch.cpp \ + qscilexercmake.cpp \ + qscilexercoffeescript.cpp \ + qscilexercpp.cpp \ + qscilexercsharp.cpp \ + qscilexercss.cpp \ + qscilexercustom.cpp \ + qscilexerd.cpp \ + qscilexerdiff.cpp \ + qscilexeredifact.cpp \ + qscilexerfortran.cpp \ + qscilexerfortran77.cpp \ + qscilexerhex.cpp \ + qscilexerhtml.cpp \ + qscilexeridl.cpp \ + qscilexerintelhex.cpp \ + qscilexerjava.cpp \ + qscilexerjavascript.cpp \ + qscilexerjson.cpp \ + qscilexerlua.cpp \ + qscilexermakefile.cpp \ + qscilexermarkdown.cpp \ + qscilexermasm.cpp \ + qscilexermatlab.cpp \ + qscilexernasm.cpp \ + qscilexeroctave.cpp \ + qscilexerpascal.cpp \ + qscilexerperl.cpp \ + qscilexerpostscript.cpp \ + qscilexerpo.cpp \ + qscilexerpov.cpp \ + qscilexerproperties.cpp \ + qscilexerpython.cpp \ + qscilexerruby.cpp \ + qscilexerspice.cpp \ + qscilexersql.cpp \ + qscilexersrec.cpp \ + qscilexertcl.cpp \ + qscilexertekhex.cpp \ + qscilexertex.cpp \ + qscilexerverilog.cpp \ + qscilexervhdl.cpp \ + qscilexerxml.cpp \ + qscilexeryaml.cpp \ + qscimacro.cpp \ + qscistyle.cpp \ + qscistyledtext.cpp \ + InputMethod.cpp \ + ListBoxQt.cpp \ + MacPasteboardMime.cpp \ + PlatQt.cpp \ + SciAccessibility.cpp \ + SciClasses.cpp \ + ScintillaQt.cpp \ + ../scintilla/lexers/LexA68k.cpp \ + ../scintilla/lexers/LexAPDL.cpp \ + ../scintilla/lexers/LexASY.cpp \ + ../scintilla/lexers/LexAU3.cpp \ + ../scintilla/lexers/LexAVE.cpp \ + ../scintilla/lexers/LexAVS.cpp \ + ../scintilla/lexers/LexAbaqus.cpp \ + ../scintilla/lexers/LexAda.cpp \ + ../scintilla/lexers/LexAsm.cpp \ + ../scintilla/lexers/LexAsn1.cpp \ + ../scintilla/lexers/LexBaan.cpp \ + ../scintilla/lexers/LexBash.cpp \ + ../scintilla/lexers/LexBasic.cpp \ + ../scintilla/lexers/LexBatch.cpp \ + ../scintilla/lexers/LexBibTeX.cpp \ + ../scintilla/lexers/LexBullant.cpp \ + ../scintilla/lexers/LexCLW.cpp \ + ../scintilla/lexers/LexCOBOL.cpp \ + ../scintilla/lexers/LexCPP.cpp \ + ../scintilla/lexers/LexCSS.cpp \ + ../scintilla/lexers/LexCaml.cpp \ + ../scintilla/lexers/LexCmake.cpp \ + ../scintilla/lexers/LexCoffeeScript.cpp \ + ../scintilla/lexers/LexConf.cpp \ + ../scintilla/lexers/LexCrontab.cpp \ + ../scintilla/lexers/LexCsound.cpp \ + ../scintilla/lexers/LexD.cpp \ + ../scintilla/lexers/LexDMAP.cpp \ + ../scintilla/lexers/LexDMIS.cpp \ + ../scintilla/lexers/LexDiff.cpp \ + ../scintilla/lexers/LexECL.cpp \ + ../scintilla/lexers/LexEDIFACT.cpp \ + ../scintilla/lexers/LexEScript.cpp \ + ../scintilla/lexers/LexEiffel.cpp \ + ../scintilla/lexers/LexErlang.cpp \ + ../scintilla/lexers/LexErrorList.cpp \ + ../scintilla/lexers/LexFlagship.cpp \ + ../scintilla/lexers/LexForth.cpp \ + ../scintilla/lexers/LexFortran.cpp \ + ../scintilla/lexers/LexGAP.cpp \ + ../scintilla/lexers/LexGui4Cli.cpp \ + ../scintilla/lexers/LexHTML.cpp \ + ../scintilla/lexers/LexHaskell.cpp \ + ../scintilla/lexers/LexHex.cpp \ + ../scintilla/lexers/LexIndent.cpp \ + ../scintilla/lexers/LexInno.cpp \ + ../scintilla/lexers/LexJSON.cpp \ + ../scintilla/lexers/LexKVIrc.cpp \ + ../scintilla/lexers/LexKix.cpp \ + ../scintilla/lexers/LexLaTeX.cpp \ + ../scintilla/lexers/LexLisp.cpp \ + ../scintilla/lexers/LexLout.cpp \ + ../scintilla/lexers/LexLua.cpp \ + ../scintilla/lexers/LexMMIXAL.cpp \ + ../scintilla/lexers/LexMPT.cpp \ + ../scintilla/lexers/LexMSSQL.cpp \ + ../scintilla/lexers/LexMagik.cpp \ + ../scintilla/lexers/LexMake.cpp \ + ../scintilla/lexers/LexMarkdown.cpp \ + ../scintilla/lexers/LexMatlab.cpp \ + ../scintilla/lexers/LexMaxima.cpp \ + ../scintilla/lexers/LexMetapost.cpp \ + ../scintilla/lexers/LexModula.cpp \ + ../scintilla/lexers/LexMySQL.cpp \ + ../scintilla/lexers/LexNimrod.cpp \ + ../scintilla/lexers/LexNsis.cpp \ + ../scintilla/lexers/LexNull.cpp \ + ../scintilla/lexers/LexOScript.cpp \ + ../scintilla/lexers/LexOpal.cpp \ + ../scintilla/lexers/LexPB.cpp \ + ../scintilla/lexers/LexPLM.cpp \ + ../scintilla/lexers/LexPO.cpp \ + ../scintilla/lexers/LexPOV.cpp \ + ../scintilla/lexers/LexPS.cpp \ + ../scintilla/lexers/LexPascal.cpp \ + ../scintilla/lexers/LexPerl.cpp \ + ../scintilla/lexers/LexPowerPro.cpp \ + ../scintilla/lexers/LexPowerShell.cpp \ + ../scintilla/lexers/LexProgress.cpp \ + ../scintilla/lexers/LexProps.cpp \ + ../scintilla/lexers/LexPython.cpp \ + ../scintilla/lexers/LexR.cpp \ + ../scintilla/lexers/LexRebol.cpp \ + ../scintilla/lexers/LexRegistry.cpp \ + ../scintilla/lexers/LexRuby.cpp \ + ../scintilla/lexers/LexRust.cpp \ + ../scintilla/lexers/LexSAS.cpp \ + ../scintilla/lexers/LexSML.cpp \ + ../scintilla/lexers/LexSQL.cpp \ + ../scintilla/lexers/LexSTTXT.cpp \ + ../scintilla/lexers/LexScriptol.cpp \ + ../scintilla/lexers/LexSmalltalk.cpp \ + ../scintilla/lexers/LexSorcus.cpp \ + ../scintilla/lexers/LexSpecman.cpp \ + ../scintilla/lexers/LexSpice.cpp \ + ../scintilla/lexers/LexStata.cpp \ + ../scintilla/lexers/LexTACL.cpp \ + ../scintilla/lexers/LexTADS3.cpp \ + ../scintilla/lexers/LexTAL.cpp \ + ../scintilla/lexers/LexTCL.cpp \ + ../scintilla/lexers/LexTCMD.cpp \ + ../scintilla/lexers/LexTeX.cpp \ + ../scintilla/lexers/LexTxt2tags.cpp \ + ../scintilla/lexers/LexVB.cpp \ + ../scintilla/lexers/LexVHDL.cpp \ + ../scintilla/lexers/LexVerilog.cpp \ + ../scintilla/lexers/LexVisualProlog.cpp \ + ../scintilla/lexers/LexYAML.cpp \ + ../scintilla/lexlib/Accessor.cpp \ + ../scintilla/lexlib/CharacterCategory.cpp \ + ../scintilla/lexlib/CharacterSet.cpp \ + ../scintilla/lexlib/DefaultLexer.cpp \ + ../scintilla/lexlib/LexerBase.cpp \ + ../scintilla/lexlib/LexerModule.cpp \ + ../scintilla/lexlib/LexerNoExceptions.cpp \ + ../scintilla/lexlib/LexerSimple.cpp \ + ../scintilla/lexlib/PropSetSimple.cpp \ + ../scintilla/lexlib/StyleContext.cpp \ + ../scintilla/lexlib/WordList.cpp \ + ../scintilla/src/AutoComplete.cpp \ + ../scintilla/src/CallTip.cpp \ + ../scintilla/src/CaseConvert.cpp \ + ../scintilla/src/CaseFolder.cpp \ + ../scintilla/src/Catalogue.cpp \ + ../scintilla/src/CellBuffer.cpp \ + ../scintilla/src/CharClassify.cpp \ + ../scintilla/src/ContractionState.cpp \ + ../scintilla/src/DBCS.cpp \ + ../scintilla/src/Decoration.cpp \ + ../scintilla/src/Document.cpp \ + ../scintilla/src/EditModel.cpp \ + ../scintilla/src/Editor.cpp \ + ../scintilla/src/EditView.cpp \ + ../scintilla/src/ExternalLexer.cpp \ + ../scintilla/src/Indicator.cpp \ + ../scintilla/src/KeyMap.cpp \ + ../scintilla/src/LineMarker.cpp \ + ../scintilla/src/MarginView.cpp \ + ../scintilla/src/PerLine.cpp \ + ../scintilla/src/PositionCache.cpp \ + ../scintilla/src/RESearch.cpp \ + ../scintilla/src/RunStyles.cpp \ + ../scintilla/src/ScintillaBase.cpp \ + ../scintilla/src/Selection.cpp \ + ../scintilla/src/Style.cpp \ + ../scintilla/src/UniConversion.cpp \ + ../scintilla/src/ViewStyle.cpp \ + ../scintilla/src/XPM.cpp + +!ios:SOURCES += qsciprinter.cpp + +TRANSLATIONS = \ + qscintilla_cs.ts \ + qscintilla_de.ts \ + qscintilla_es.ts \ + qscintilla_fr.ts \ + qscintilla_pt_br.ts diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_cs.qm b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_cs.qm new file mode 100644 index 0000000000000000000000000000000000000000..0ce0e43587b80087c40ff8b2c28b587182670c9b GIT binary patch literal 44424 zcmd5_34D~*wZ9>m?3n}-_6Q@JfPfef!Hp#W0!f7->^+J9%BhYv6oIEQ&2`(MWH7{$h1`VwRQ@33j!0>&0x!RB7Qg|WHStbW&a z#=17K1$VYEHuyAxtKTQMb~nMRpJj_~f1a`1?_*2W{fx1p4-oXdNO0;@f~`-m=4Fy$U-4TMf+(B?xVa{(4gWqs?TF(2PK8#(lE9d<$f5OvImxfX=X*oI^i81o(8XqDNk4?1JC) z8h*;(8Qb2s*P`|>8LN7-S9?VbWBEVs^~05KG1l~2ul>`2SJqU>}4^_~=S3Cv#yo^oEB^dk>!S#<4-2RED z>{GO}c%8@Fy^gWs<(~diK4xs=6i@#^im{os9$(Xk(Ay235$9okEm+_gw-WqM-{+a} z-!mDT^a{an9>K&4f;Y`0cn;sx|+eE-xJhzcx_~!%@KO=Z^ zF2UP4UL9kr2NS$`6~Wv7?3wvNC1Ycs@mw|){U6wmVD%z`zRwAc+(qz=(F7+|5S$t( z82FfA+iHTH|3fgI#!Jnh-`9OaaMQ&Ex7G{M`y^*nP9^!Dljo=Q|H2>a5VJFV| zD*vh59%QVxJAdCzuQGP=_w#>w6XY{+F2U+62o8Ol;K*MQ9J__!87%}SO(!_@L4rXa z!M3{zcJwD0?L%;lhhQp2uxBvAEx#bReFwoCo+WteT?Fr3Lh$Yh1n=3F|N6eE=$9}5 zz%^SL8}fMm!Ncg!@_P#kyqIro=N6PdcpGCys|w0L_5dC%=>PCA$Zt@=m?^L$`IQA@ zE{EOm#0sWtg#2#!--4B0@53(rv>-SZdbGYAFbsWq2k=+;y%z8vfNKlFUshq>%r1E3 zG1#eV-z#|JDd^XA6AK>QQ^45PDS&GMO90;j^aK78a7V$T58(5w4i@}=#~%2tPYd3C z{$bdgkp%}o1pnvsEo66o$k=x-E-YG!@9R>9qYi<;i>@dfTMoL59xt5Kb}Ot}TjA<` zSHkWbD%|+H74T;l7GANxKkVw;h1Yz5{+)S%V5pH`;xC2QMw%Ea`MmJP&9Ixkz64Jl zLvY+qf*ns6-uA>^#?F1Q@PV2D^y`Ac$9Kc-`)@3K=ASP!7Vls9r_aFOil++yx*hzS zKfLhsA^5)Tk-~pG0KRe;7Zq)O6a0KyG-~2$(4#8|Ub(ht`Xu13>?xYDaVhlghefel z@5S#GMK{ezF?QpgqKCc@In60AdhClY;HQ66^snA0FrMEQ{dfg_zqqPsZw|ii|0=;j zPZAtfO>oRkg5%F8c=iN>k#`BM9ZT@?rwLv?kKm3-(KC<3&Tnoi`qi=#h<6?JL~-TO1Mquy6%Y9HWX2k9Dn9LxfT#Yjcj*}|1f#DIjIAQrT~2W0PJ)|WAh`Keg4^N*uX~c<&7Tpxr7yud zwi3Ma4+M8FFAiSL`yVWBf8hS@%?d#1K%oM6WR$q+){komyqYeWby7NgN${5 zzxW4VEn#d-@8ZXQHw*sptKy&SNMSs0COBv_!6EAi`mQB->S2OoE+aVZ8-g`?1kbvT z;FR@g_$k4_N`kGq1Xn*vu;UAYkv#;XUlWWSC7ARP?CvJG@pXcm{zmZf8whSoKfj}n ze&0Es;4L2$ynO?~U8@M*HJIS;TZ&&_551bZt@uyNo1jN;7JpWGKV#k@#h)!d3-I2O zvXy(GXA4Ta)1fDe|6DTc#%+xCd#Ysgy<1@y-Y7Y@=9h?fzAZU-#ZMWVwX|gB&*3M^ z50%V*>m|g|M@v@TdjN6l^pZgHA;bl5l>`UEPqvRP2`<`$IA>Eys0wuae=E6S@(4UX zx#Y$JeGyL`B{=5;f_Ge4@?1|Z#AT6^S2y-yZ1^666WR%0zp>=CSzU;Cf+hQJLp$+b zmAt#ygSc`$!K?pT^4C`;!~f1ExZ%vwUjKCm`a7+(=x?(TpZ&eGY|M4gn_dKOSxE4X zeWe%t4(&F-Tzc{6zlVMKx6;=C_!M?Fw>0K?5$lj;1lN8>@S4|3A3OziW^Qfi3*|3k zo((Pi?P17e{-vd#Hh!T)vF6WsQ2 zS>*%ZYvosE(G@*_GQ5fRBo@9nO(A;|k*%ifx>6?S`O*(W_1&l$h>_S%0j z?Cjm%vH;{;(BdsG`3UjzZtrQ&zQI`OChxS;ZFsK1d;Xpf;_!vu=IyT{Zl317crWyA z@oevRu0ua&{f{?vdlTaFn74f`=r8Q;4IfIt|E}^zh6Le9mU!15#&eha!MmXxa+to| zdpDQsywkk*6@uO=za%*72*I&m6P)-@g41RZj4mRWdYs^f=Lv54mf*Fu1aCaxz3=a^ zFXzqn-v8WQw0DO0M`PA9cI7wTS01Q>pPB1@HJS&zeyjJl3&3wl!n?l%@$;J3y?8+kn6VS~>cR5in?PsWugfQ&4*vTtEno5<_`G>@`Su#nUD8;7 z)0h! zB=a5%;?pjr-@R*N@g85GE0G9AQ@%(zD(>kJVFTR|eM`<@mQcufC31=kg;EC4KfnH^>D>ARPRL>fAP~b!A;wJQ5E0p@jCzy__xKB89m*lB(lb7`8oCpN>UU|4i7daIm@@EVXRk|zqCsB*w$vYO>x%dj zDp$T>Y;DvRgSJ`fa8s5%lCckBYDRefz!`S}ADM^R~!ePjcUr(gWD5C8;Yuqw&k`fZm+19 zWyvKes>sTT6xJ1wmg+i7z+<)(dq`SZiivSCna^`*-`%9OY1y*p^$sno6Ou=R+zbXK zgW-qa3&HoK9j3;x4Y%%p93H`We#{OFA8F8L?Jm@430SPSm4Ztqs=y(z!4@jaclP6t1Rh>EEw5; zn0Xm$!;9tUxX=)r(J?b&ClLDqa>0o*KyK`PwMiUKHr`27GqdHE?OR$g_bO^-#YBGZ zR4X~y+p!91g_T4E$n_8FH^q?_&WR;DTSFo7bRWkSOUBiYpK{EpMnf1l_7&VR4{$>{ z^$N|3dC?$Wm`cH7sM{hPFp)I?lX&7rTu0ZmOo?dBd7p)`?vM)?HdfbyJBMYUZ8^MC zbhK6Otp-yvf0{n@*Z0AG_@-Jk=HBU0bBcYp4?JsZo738^?)17;T|dd2qkUJ?o-1&S7Y0m{7!<2YJfP%4G; zj+}gZntW#Fcwl275sO58-Qmz$7gm`hvo7u1DX{aq0Wsg&pB7lhV@5;L0{ zrKJ3M$UE{}OBh{mlY|k%&me>n!wly>|7$6o=L1##*?LJJJQt26pCXc~x>#3BBs6|a zS1c6@`jV+cINHYhW^Qm0n+NiI!lgjI75_M~6v(Ox>Ed}jeh9aQDHAIqav}P71on>4 zm5;!&;*}Jh3N8%w$fnawVJw@Uo=Gt!*5I^w{)}hRXsaQ`-pjc}p;)?rCtLZn0(aux z73Y*fgCu4YwERU~oh?>9sX&Ak2PX-W5DFJ#_rRZuNy%t)2kM0bmy)!b=U+1)#KBF8 za2$FabUl{+pr~=K-55&`hN?U(8;~FB#2!(?7g`thN0ZoNw9w^JOi1pFxhqjkS$<={k36~s z&K%VWfsrn00mx3xX^WPMsGx^0Jla3k!lYKPmk%3#6543iyE7h*iKMohVK0{X^P zCmMu^6cUnG82GUxZi9W=ng`+|)|@s>1N8g0HU=QGY}mJ&DNit*;J{`WnX1 zocGg2W*TMcS04_N|G<{Ge&0*f#2^^QOq`sEMk!kal?+0|5z8oc*|WgkLaTBSj?0-P zMs0vh;5}imqWJrs(qv(?KN0pLM&N2FM&-NVPOd=3tX=5u2uV&PGmTL3+{;GAaj;V& z_A0PS%Sa|_YgKR_*5OD|tvD8`ZD^3>G62}8s;1 z9@z&&tx^DEZZ`}6X(qx$QNDNKM*trKYka(%=6(5mf49Fb7Vve5f?RnVrnsk!R(bTs z1C<_S()Km9;tR=vi@6sQO>OZ#fFAV3C(>dTQd;RRw~|ctApCUD>dCh42=!gl)<8pB zPWoS?wAP489EKg`<~{-SX@h5!Tz%S`@TCKfA=IV#DZDK#PQ&pOw$y1m9YI7Ql$4_g zvlKJ6`DO|Z7Rrp^(%hR7he?Jl#KuD^+`#ck#n;OTNT>y}iD@crDjO1^@$p0~fX>Gf zzLrQV(7`={nd%Za)(~a@PgV03x$LdAbAnfd$qPO{wfVoWG{FU{N{v1bYYYWq(V#!k zBhMR}Wzk- zP{n4XM~mAVE-{RfLL-01_(T^uXbm%slqc}AnNWQ`1zNz8nq4TGnZjbfrHc|;X1r=l z{zm*g6GOza#eNJNUoP@omP)0pwz2U{AM^uD-c*l4G145!lxiF))i_WZo#shM3Dh^R zN%%RPZBj(T`J3cGwOUeKo}c3dd^8OdAEZ$7)^g{PE~_!F?a_+sh{i1Hljn8QZ1zJc zrw)=zqR*OsD}61QSLe{tKA_ME^TDN+f^J~?D%eHyI^(ef3Xu${7FkG{+bxCd28rb^ z=zmNJ6V&B-X+tv96^xCS!T_-@o?Ls7<~yG?K}2nefO4Dsh8&wLnsJilPy-&G*y6(F zcGG$iRxFKnM0t^y{XCp#Lp*LP*eay~M*(|LEzDP++)zL(v_Z_5M(KbF3opJkjLg15rg&yBh+fNe@M?OyF5KEG zO^i~Big9mV+S5W(iMK02a+ebqAi7D?3D7DKWAOzUR)W}7(snSvKI9M5j->z(or8|7 zhkjtiuLz~EA(jmDBUl!_tCmX1LRdcXEQu703PfAFB-Duwbz9-O>28H$sb<&Bn=`Yv zNg5V+67HkmqBbs-@JG)++qJc`!aczOpH;J27+Y&nnHgOxI!;-4D?A7LYK7*~&RU@# zj|j?&_DKjMteQSnH)2J10lt zoLt>{&4>qwB$v7v@nCb8J8-8-tVs*yY${=f8+u|@Od()zssnr445+x|#V8KV=76BR zIS%b9hn^HWZ7z_}md6Y>bX__>Xfu)+k$NyUdwuLHiDxg1i$I$f)V;N<%wxEtr7#IHhw9tOxlfe%g$mEaJzVKT1c$=2WgE zzlNSvJC2=8xk6tQr6T(9hr|v|A7#;ml|}5sxtEEHN}&V;s>QLlgi9>AIUW{psD|?l ztY5taOWHALg^EQHsnYhX5C7-!Bww%ax&fYa$9At0kq*-^(h4n;?gzl;6UuqoV?n#Y znrOj`huxiHH&}&E9-pKpJT@hH;-WqY)T2(7m=64y03K^w|m{w)J z!6Vl+3MQhJ5@c^Fwc6;`N@BXIrdw|j_z6Q44!|SwlZM$;S&q_(89Qfo1(yN=HH(K6 zYd9lc**O*gcNs`+tioM0n}tBoP3Tv}<xKTk`1Vtr^ zD=D3g@}pR*&+kjoKA*86NS$tYktr-=3)uqP@gN_-4J)+z$+V)rWeXShT5;ytTwJa6 zyA-98R7j!Sddr`U8VTB*7jUx3SjmkZ@v@L^P&y(7RDv>FJk!YL64%;tOpO%A&Iu=Q zmW7|Qp)%aGg^(l@^)=2#clbx9w3^Zze&$E!!^{KU5OwBan2`%UF0NW1gd|&2x`$R8 zS;~3U*5MiDt5Yd@+TP^N(zGg$>GCc|atyY`BrD2W|bWCQ~c5%4-Ly z-p(}-qZA%&TT+ZpA9s{>%B{t*SMdf7H)>^`QC+f0;SAOAoq^g<5HjTK^R->J_xLk3 zEoeh4CDgM?)aXw#NhO!*kjq7y#v+|3nBBcKva_AzC$_NCXh1Q8nl!?*)|YI}i&kgc z8X2A9YXxVUh*9eyv=yoDL##oX5pow`4Y81%G2tTBB&U_iCfPC!TaM~YPwEwb+z%UL zpvuK5oMG{$LhDjEENL4G4S<`kmr~DGZnmVMzQMJZl^(XYKy^xs$HVFj;M`?kZg^j* zzf^sz9JzoPX*HPXAJ`1x-lm$^l&;LN))Wqsr} z1jehF)3CK#s*+hHJ4!hXhb#w=NU5LM=QSjCacgN{{#4El>Y})7iF1bm9|6wYCrEqC z`Aezf)h0PQ#6Z?+276_KE)$~i^Y-(2j-hq&Y<3?o4^DHL!DPO`z=CzslN);Ll;@Ci z)0w3^M;lsqPKwAQ>zEEPl6DS<^yL=EE#~ zq^yH5hIyY7XmAc4Z4ARiBGK?x6i)@xI)}*KHIiI6xRcsJ5yCGtr z)YA-1VwHvg`DB`=1WO{P97hwxCi6A;#tvi~1lWzU!L;xbbB+{MoszyyA7N?_e>jdHi6h-)9J^2kB{NRek zN)O+B#y6;yU|~pO3U~8SdQ!8Xa7ZlrOs&a*kdc0W4SgO_IS?KtAgpl@CiVwu$h;k66R22lX4JZ zpJlGG?5VS4Pc=5_R=j2nl>2BLyaC209HckevO8(Y(k%6{8Oj_o$xUv-w>F$=_sy`_ zH5g`U$U5(@>x5J0U*{v_!$ktiI@;m@5WfM2-z8-}B-mR%_~X|e78H>7*^riU1B&oU zWRljltpL2AIC^u)PQp|ud;6+&sUq-7sT}C3cJ=(y-tf&1l!Ha z$>!Fj+7fpKO#>9JT;$Vq?By+8Io3n8#Y2Dj<1`CzUFdif}d7k;FX&w)j0bL|#VE%?rPkPgA6%n3M8Z{$x1d zlb7X&Q|1f0{1P>%<2S07$QbSl+6{O*6&zU`OW;O19OFoi^M%idNta$EdvHNvr?1r? z2uD!U9}@AaqawazPUbR;Ds%(Om=KvB$um=MsysJi9GBT-Aghy`cLBeg3t_%$o(zwp z=MHnvjNo$W84z`hmEyhz<+=vFg_1^9_i%nAvH-^W{^Y^e-%~dZ6NEc*eu)5orH*`i z1Ao&GUx5(hCrdh{YyCu%3Bez4ZXD_&aG#K*u$}%?d(vro9jje2$O|KL98XUjD{5%-xy1-ipQM*F?33Be*I`r?Xm%C3=|8I}{UHU)^Vc zICZGrdOy+~hBP^oGFu%#4XbVYKCRkv&JSJ~}?IteKq9!`{dt)T`=6onl zJ!-$upNjZfBs6yeE<|<1tPt@8AJ-DLnT40MpmQNitNXiAg+v^Dju6MC>I-pC!dWO` zyY7@rdX=4YZEnM2NhjSXmL5qrxyxqxgT7#xzh^1jZMe;%VR3T?YOfk!8854trIt3- zlq0PMvO4CqmecSY>`@==?uU^Apj&XHBgBerDyp;Zauzed%z%UD8W40n8@#w>HHHL% zaBbsUDX#G24SuLR#48Q;&PW!vOO>~4vGZh!$0vzL*=b#- zS{B^wj_Y1sn+PFd7PG*DPPTqP(~GRE$pXVQ*+TXl=BW_J<#ZF`o>UK`k>Ih;4Pj>r zvAZk16H>9Qo|%b+U%EL>O@B0m63|7x;gE0S_SxJGEWoq6$(tU932^5~ZFwuL^QZi{ zFibkA#b=`J(^@xVd=R*ckeQ)#0KAsSd}VgFMN)(7bho2BN)fD_;9yeFdHa=%5kaRQ zdG)xPT_k*TcH<>SJd z6ctFg4%jS_Gqp38gdD7m7*8jv;+eQ#xGgH5@6uq<^{Pnc8-fDuyEfcBUZ>VPxp=%R z{kTurM0J5wfSY<{#SlM^0q=*xbh`uk#dO!ITzIO9q@V!NU`TwAOhn>M5ChF=>OnIDDJPH;FPY?EIO zu8x!@sSnZFSG4w@V|{YpqA9#_NxqAlMWq)J@X7?|&2YS)p{+f_Uv`fBr_@z7w>H9- zvWQSD=w!W6Q}x)vZU`H88K($wPlEdpwyWPxlB4)zIgs!4+9M$wi%{67KbUANs8xvG1fX5V{JN0_Euan%CxflF24c&ubSoJDaM4?YNOlWGI%~HzL>Y6Dy*h@2lOLJ*P9EPa>B3!Y< zUn~!!4tHZ(`71K0fB?rfM7omlv=mGMsP;G^NsGZ05ZA<327Yz(t6bp*Rehat!z)$f zu|5d~*}$Y^@Ob8f-pqE4SCAhoahFAOvbZuU|8rSHmmP7JMRYQ8=Ta>7O@@u}aDZO4 z=+1kHFx}M4i14zo!y+;c7D9yL`~n&gmOBZlYT8swemUDzqM6ch_S7XFU$Tx|@#wPw8 zJc}2;mA^=kzx)=jHBr2$XD*IB#P$AI!qK_Rf<`)m>-1c{x{9!4HLnSm*a&Dze9lZK z6Ybuur>+&6>(hsX+?g8zVz%~1K;C%?4ha7LLT)T<@fcF|!ywF`=xq(pa}9Chah=VkDPiD@Oi*@HQ+lW5=p@ zVyf;`Pu1B=X7cw!NOqJ~66xDJ6nn4r5(2a=luk$`Ta%&i@1R+NMqR3v0rR_%Rj-_! F{{x3}QK + + + + QsciCommand + + + Move down one line + Posun o jednu řádku dolů + + + + Extend selection down one line + Rozšířit výběr o jednu řádku dolů + + + + Scroll view down one line + Rolovat pohled o jednu řádku dolů + + + + Extend rectangular selection down one line + Rozšířit obdélníkový výběr o jednu řádku dolů + + + + Move up one line + Posun o jednu řádku nahoru + + + + Extend selection up one line + Rozšířit výběr o jednu řádku nahoru + + + + Scroll view up one line + Rolovat pohled o jednu řádku nahoru + + + + Extend rectangular selection up one line + Rozšířit obdélníkový výběr o jednu řádku nahoru + + + + Move up one paragraph + Posun o jeden odstavec nahoru + + + + Extend selection up one paragraph + Rozšířit výběr o jeden odstavec nahoru + + + + Move down one paragraph + Posun o jeden odstavec dolů + + + + Scroll to start of document + + + + + Scroll to end of document + + + + + Scroll vertically to centre current line + + + + + Extend selection down one paragraph + Rozšířit výběr o jeden odstavec dolů + + + + Move left one character + Posun o jedno písmeno doleva + + + + Extend selection left one character + Rozšířit výběr o jedno písmeno doleva + + + + Move left one word + Posun o jedno slovo vlevo + + + + Extend selection left one word + Rozšířit výběr o jedno slovo doleva + + + + Extend rectangular selection left one character + Rozšířit obdélníkový výběr o jedno písmeno doleva + + + + Move right one character + Posun o jedno písmeno doprava + + + + Extend selection right one character + Rozšířit výběr o jedno písmeno doprava + + + + Move right one word + Posun o jedno slovo doprava + + + + Extend selection right one word + Rozšířit výběr o jedno slovo doprava + + + + Extend rectangular selection right one character + Rozšířit obdélníkový výběr o jedno písmeno doprava + + + + Move to end of previous word + + + + + Extend selection to end of previous word + + + + + Move to end of next word + + + + + Extend selection to end of next word + + + + + Move left one word part + Posun o část slova doleva + + + + Extend selection left one word part + Rozšířit výběr o část slova doleva + + + + Move right one word part + Posun o část slova doprava + + + + Extend selection right one word part + Rozšířit výběr o část slova doprava + + + + Move up one page + Posun na předchozí stranu + + + + Extend selection up one page + Rozšířit výběr na předchozí stranu + + + + Extend rectangular selection up one page + Rozšířit obdélníkový výběr na předchozí stranu + + + + Move down one page + Posun na další stranu + + + + Extend selection down one page + Rozšířit výběr na další stranu + + + + Extend rectangular selection down one page + Rozšířit obdélníkový výběr na další stranu + + + + Delete current character + Smazat aktuální znak + + + + Cut selection + Vyjmout výběr + + + + Delete word to right + Smazat slovo doprava + + + + Move to start of document line + + + + + Extend selection to start of document line + + + + + Extend rectangular selection to start of document line + + + + + Move to start of display line + + + + + Extend selection to start of display line + + + + + Move to start of display or document line + + + + + Extend selection to start of display or document line + + + + + Move to first visible character in document line + + + + + Extend selection to first visible character in document line + + + + + Extend rectangular selection to first visible character in document line + + + + + Move to first visible character of display in document line + + + + + Extend selection to first visible character in display or document line + + + + + Move to end of document line + + + + + Extend selection to end of document line + + + + + Extend rectangular selection to end of document line + + + + + Move to end of display line + + + + + Extend selection to end of display line + + + + + Move to end of display or document line + + + + + Extend selection to end of display or document line + + + + + Move to start of document + + + + + Extend selection to start of document + + + + + Move to end of document + + + + + Extend selection to end of document + + + + + Stuttered move up one page + + + + + Stuttered extend selection up one page + + + + + Stuttered move down one page + + + + + Stuttered extend selection down one page + + + + + Delete previous character if not at start of line + + + + + Delete right to end of next word + + + + + Delete line to right + Smazat řádku doprava + + + + Transpose current and previous lines + + + + + Duplicate the current line + + + + + Select all + Select document + + + + + Move selected lines up one line + + + + + Move selected lines down one line + + + + + Toggle insert/overtype + Přepnout vkládání/přepisování + + + + Paste + Vložit + + + + Copy selection + Kopírovat výběr + + + + Insert newline + + + + + De-indent one level + + + + + Cancel + Zrušit + + + + Delete previous character + Smazat předchozí znak + + + + Delete word to left + Smazat slovo doleva + + + + Delete line to left + Smazat řádku doleva + + + + Undo last command + + + + + Redo last command + Znovu použít poslední příkaz + + + + Indent one level + Odsadit o jednu úroveň + + + + Zoom in + Zvětšit + + + + Zoom out + Zmenšit + + + + Formfeed + Vysunout + + + + Cut current line + Vyjmout aktuální řádku + + + + Delete current line + Smazat aktuální řádku + + + + Copy current line + Kopírovat aktuální řádku + + + + Convert selection to lower case + Vybraný text převést na malá písmena + + + + Convert selection to upper case + Vybraný text převést na velká písmena + + + + Duplicate selection + Duplikovat výběr + + + + QsciLexerAVS + + + Default + Default + + + + Block comment + + + + + Nested block comment + + + + + Line comment + Jednořádkový komentář + + + + Number + Číslo + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Triple double-quoted string + String ve třech dvojitých uvozovkách + + + + Keyword + Klíčové slovo + + + + Filter + + + + + Plugin + + + + + Function + + + + + Clip property + + + + + User defined + + + + + QsciLexerAsm + + + Default + Default + + + + Comment + Komentář + + + + Number + Číslo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + CPU instruction + + + + + FPU instruction + + + + + Register + + + + + Directive + Direktiva + + + + Directive operand + + + + + Block comment + + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Unclosed string + Neuzavřený string + + + + Extended instruction + + + + + Comment directive + + + + + QsciLexerBash + + + Default + Default + + + + Error + Chyba + + + + Comment + Komentář + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Scalar + Skalár + + + + Parameter expansion + Rozklad parametru + + + + Backticks + Zpětný chod + + + + Here document delimiter + Zde je oddělovač dokumentu + + + + Single-quoted here document + Jednoduché uvozovky zde v dokumentu + + + + QsciLexerBatch + + + Default + Default + + + + Comment + Komentář + + + + Keyword + Klíčové slovo + + + + Label + Nadpis + + + + Hide command character + Skrýt písmeno příkazu + + + + External command + Externí příkaz + + + + Variable + Proměnná + + + + Operator + Operátor + + + + QsciLexerCMake + + + Default + Default + + + + Comment + Komentář + + + + String + + + + + Left quoted string + + + + + Right quoted string + + + + + Function + + + + + Variable + Proměnná + + + + Label + Nadpis + + + + User defined + + + + + WHILE block + + + + + FOREACH block + + + + + IF block + + + + + MACRO block + + + + + Variable within a string + + + + + Number + Číslo + + + + QsciLexerCPP + + + Default + Default + + + + Inactive default + + + + + C comment + C komentář + + + + Inactive C comment + + + + + C++ comment + C++ komentář + + + + Inactive C++ comment + + + + + JavaDoc style C comment + JavaDoc styl C komentáře + + + + Inactive JavaDoc style C comment + + + + + Number + Číslo + + + + Inactive number + + + + + Keyword + Klíčové slovo + + + + Inactive keyword + + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Inactive double-quoted string + + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Inactive single-quoted string + + + + + IDL UUID + + + + + Inactive IDL UUID + + + + + Pre-processor block + Pre-procesor blok + + + + Inactive pre-processor block + + + + + Operator + Operátor + + + + Inactive operator + + + + + Identifier + Identifikátor + + + + Inactive identifier + + + + + Unclosed string + Neuzavřený string + + + + Inactive unclosed string + + + + + C# verbatim string + + + + + Inactive C# verbatim string + + + + + JavaScript regular expression + JavaSript regulární výraz + + + + Inactive JavaScript regular expression + + + + + JavaDoc style C++ comment + JavaDoc styl C++ komentáře + + + + Inactive JavaDoc style C++ comment + + + + + Secondary keywords and identifiers + Sekundární klíčová slova a identifikátory + + + + Inactive secondary keywords and identifiers + + + + + JavaDoc keyword + JavaDoc klíčové slovo + + + + Inactive JavaDoc keyword + + + + + JavaDoc keyword error + JavaDoc klíčové slovo chyby + + + + Inactive JavaDoc keyword error + + + + + Global classes and typedefs + Globální třídy a definice typů + + + + Inactive global classes and typedefs + + + + + C++ raw string + + + + + Inactive C++ raw string + + + + + Vala triple-quoted verbatim string + + + + + Inactive Vala triple-quoted verbatim string + + + + + Pike hash-quoted string + + + + + Inactive Pike hash-quoted string + + + + + Pre-processor C comment + + + + + Inactive pre-processor C comment + + + + + JavaDoc style pre-processor comment + + + + + Inactive JavaDoc style pre-processor comment + + + + + User-defined literal + + + + + Inactive user-defined literal + + + + + Task marker + + + + + Inactive task marker + + + + + Escape sequence + + + + + Inactive escape sequence + + + + + QsciLexerCSS + + + Default + Default + + + + Tag + Tag + + + + Class selector + Selektor třídy + + + + Pseudo-class + Pseudotřída + + + + Unknown pseudo-class + Nedefinovaná pseudotřída + + + + Operator + Operátor + + + + CSS1 property + CSS1 vlastnost + + + + Unknown property + Nedefinovaná vlastnost + + + + Value + Hodnota + + + + Comment + Komentář + + + + ID selector + ID selektor + + + + Important + Important + + + + @-rule + @-pravidlo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + CSS2 property + CSS2 vlastnost + + + + Attribute + Atribut + + + + CSS3 property + CSS2 vlastnost {3 ?} + + + + Pseudo-element + + + + + Extended CSS property + + + + + Extended pseudo-class + + + + + Extended pseudo-element + + + + + Media rule + + + + + Variable + Proměnná + + + + QsciLexerCSharp + + + Verbatim string + + + + + QsciLexerCoffeeScript + + + Default + Default + + + + C-style comment + + + + + C++-style comment + + + + + JavaDoc C-style comment + + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + IDL UUID + + + + + Pre-processor block + Pre-procesor blok + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Unclosed string + Neuzavřený string + + + + C# verbatim string + + + + + Regular expression + Regulární výraz + + + + JavaDoc C++-style comment + + + + + Secondary keywords and identifiers + Sekundární klíčová slova a identifikátory + + + + JavaDoc keyword + JavaDoc klíčové slovo + + + + JavaDoc keyword error + JavaDoc klíčové slovo chyby + + + + Global classes + + + + + Block comment + + + + + Block regular expression + + + + + Block regular expression comment + + + + + Instance property + + + + + QsciLexerD + + + Default + Default + + + + Block comment + + + + + Line comment + Jednořádkový komentář + + + + DDoc style block comment + + + + + Nesting comment + + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Secondary keyword + + + + + Documentation keyword + + + + + Type definition + + + + + String + + + + + Unclosed string + Neuzavřený string + + + + Character + Znak + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + DDoc style line comment + + + + + DDoc keyword + + + + + DDoc keyword error + + + + + Backquoted string + + + + + Raw string + + + + + User defined 1 + Definováno uživatelem 1 + + + + User defined 2 + Definováno uživatelem 2 + + + + User defined 3 + Definováno uživatelem 3 + + + + QsciLexerDiff + + + Default + Default + + + + Comment + Komentář + + + + Command + Příkaz + + + + Header + Hlavička + + + + Position + Pozice + + + + Removed line + Odebraná řádka + + + + Added line + Přidaná řádka + + + + Changed line + + + + + Added adding patch + + + + + Removed adding patch + + + + + Added removing patch + + + + + Removed removing patch + + + + + QsciLexerEDIFACT + + + Default + Default + + + + Segment start + + + + + Segment end + + + + + Element separator + + + + + Composite separator + + + + + Release separator + + + + + UNA segment header + + + + + UNH segment header + + + + + Badly formed segment + + + + + QsciLexerFortran77 + + + Default + Default + + + + Comment + Komentář + + + + Number + Číslo + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Unclosed string + Neuzavřený string + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Keyword + Klíčové slovo + + + + Intrinsic function + + + + + Extended function + + + + + Pre-processor block + Pre-procesor blok + + + + Dotted operator + + + + + Label + Nadpis + + + + Continuation + + + + + QsciLexerHTML + + + HTML default + + + + + Tag + + + + + Unknown tag + Nedefinovaný tag + + + + Attribute + Atribut + + + + Unknown attribute + Nedefinovaný atribut + + + + HTML number + HTML číslo + + + + HTML double-quoted string + HTML string ve dojtých uvozovkách + + + + HTML single-quoted string + HTML string v jednoduchých uvozovkách + + + + Other text in a tag + Další text v tagu + + + + HTML comment + HTML komentář + + + + Entity + Entita + + + + End of a tag + Konec tagu + + + + Start of an XML fragment + Začátek XML části + + + + End of an XML fragment + Konec XML části + + + + Script tag + Tag skriptu + + + + Start of an ASP fragment with @ + Začátek ASP kódu s @ + + + + Start of an ASP fragment + Začátek ASP kódu + + + + CDATA + + + + + Start of a PHP fragment + Začátek PHP kódu + + + + Unquoted HTML value + HTML hodnota bez uvozovek + + + + ASP X-Code comment + ASP X-Code komentář + + + + SGML default + + + + + SGML command + SGML příkaz + + + + First parameter of an SGML command + První parametr v SGML příkazu + + + + SGML double-quoted string + SGML string ve dvojitých uvozovkách + + + + SGML single-quoted string + SGML string v jednoduchých uvozovkách + + + + SGML error + SGML chyba + + + + SGML special entity + SGML speciální entita + + + + SGML comment + SGML komentář + + + + First parameter comment of an SGML command + Komentář prvního parametru SGML příkazu + + + + SGML block default + SGML defaultní blok + + + + Start of a JavaScript fragment + Začátek JavaScript kódu + + + + JavaScript default + + + + + JavaScript comment + JavaScript komentář + + + + JavaScript line comment + JavaScript jednořádkový komentář + + + + JavaDoc style JavaScript comment + JavaDoc styl JavaScript komentáře + + + + JavaScript number + JavaScript číslo + + + + JavaScript word + JavaSript slovo + + + + JavaScript keyword + JavaSript klíčové slovo + + + + JavaScript double-quoted string + JavaSript string ve dvojitých uvozovkách + + + + JavaScript single-quoted string + JavaSript string v jednoduchých uvozovkách + + + + JavaScript symbol + + + + + JavaScript unclosed string + JavaSript neuzavřený string + + + + JavaScript regular expression + JavaSript regulární výraz + + + + Start of an ASP JavaScript fragment + Začátek ASP JavaScript kódu + + + + ASP JavaScript default + + + + + ASP JavaScript comment + ASP JavaScript komentář + + + + ASP JavaScript line comment + ASP JavaScript jednořádkový komenář + + + + JavaDoc style ASP JavaScript comment + JavaDoc styl ASP JavaScript komentář + + + + ASP JavaScript number + ASP JavaScript číslo + + + + ASP JavaScript word + ASP JavaScript slovo + + + + ASP JavaScript keyword + ASP JavaScript klíčové slovo + + + + ASP JavaScript double-quoted string + ASP JavaScript string ve dvojitých uvozovkách + + + + ASP JavaScript single-quoted string + ASP JavaScript v jednoduchých uvozovkách + + + + ASP JavaScript symbol + + + + + ASP JavaScript unclosed string + ASP JavaScript neuzavřený string + + + + ASP JavaScript regular expression + ASP JavaScript regulární výraz + + + + Start of a VBScript fragment + Začátek VBScript kódu + + + + VBScript default + + + + + VBScript comment + VBScript komentář + + + + VBScript number + VBScript číslo + + + + VBScript keyword + VBScript klíčové slovo + + + + VBScript string + + + + + VBScript identifier + VBScript identifikátor + + + + VBScript unclosed string + VBScript neuzavřený string + + + + Start of an ASP VBScript fragment + Začátek ASP VBScript kódu + + + + ASP VBScript default + + + + + ASP VBScript comment + ASP VBScript komentář + + + + ASP VBScript number + ASP VBScript číslo + + + + ASP VBScript keyword + ASP VBScript klíčové slovo + + + + ASP VBScript string + + + + + ASP VBScript identifier + ASP VBScript identifikátor + + + + ASP VBScript unclosed string + ASP VBScript neuzavřený string + + + + Start of a Python fragment + Začátek Python kódu + + + + Python default + + + + + Python comment + Python komentář + + + + Python number + Python číslo + + + + Python double-quoted string + Python string ve dojtých uvozovkách + + + + Python single-quoted string + Python string v jednoduchých uvozovkách + + + + Python keyword + Python klíčové slovo + + + + Python triple double-quoted string + Python string ve třech dvojitých uvozovkách + + + + Python triple single-quoted string + Python ve třech jednoduchých uvozovkách + + + + Python class name + Python jméno třídy + + + + Python function or method name + Python jméno funkce nebo metody + + + + Python operator + Python operátor + + + + Python identifier + Python identifikátor + + + + Start of an ASP Python fragment + Začátek ASP Python kódu + + + + ASP Python default + + + + + ASP Python comment + ASP Python komentář + + + + ASP Python number + ASP Python číslo + + + + ASP Python double-quoted string + ASP Python string ve dvojitých uvozovkách + + + + ASP Python single-quoted string + ASP Python v jednoduchých uvozovkách + + + + ASP Python keyword + ASP Python klíčové slovo + + + + ASP Python triple double-quoted string + ASP Python ve třech dvojitých uvozovkách + + + + ASP Python triple single-quoted string + ASP Python ve třech jednoduchých uvozovkách + + + + ASP Python class name + ASP Python jméno třídy + + + + ASP Python function or method name + ASP Python jméno funkce nebo metody + + + + ASP Python operator + ASP Python operátor + + + + ASP Python identifier + ASP Python identifikátor + + + + PHP default + + + + + PHP double-quoted string + PHP string ve dvojitých uvozovkách + + + + PHP single-quoted string + PHP v jednoduchých uvozovkách + + + + PHP keyword + PHP klíčové slovo + + + + PHP number + PHP číslo + + + + PHP variable + PHP proměnná + + + + PHP comment + PHP komentář + + + + PHP line comment + PHP jednořádkový komentář + + + + PHP double-quoted variable + PHP proměnná ve dvojitých uvozovkách + + + + PHP operator + PHP operátor + + + + QsciLexerHex + + + Default + Default + + + + Record start + + + + + Record type + + + + + Unknown record type + + + + + Byte count + + + + + Incorrect byte count + + + + + No address + + + + + Data address + + + + + Record count + + + + + Start address + + + + + Extended address + + + + + Odd data + + + + + Even data + + + + + Unknown data + + + + + Checksum + + + + + Incorrect checksum + + + + + Trailing garbage after a record + + + + + QsciLexerIDL + + + UUID + + + + + QsciLexerJSON + + + Default + Default + + + + Number + Číslo + + + + String + + + + + Unclosed string + Neuzavřený string + + + + Property + + + + + Escape sequence + + + + + Line comment + Jednořádkový komentář + + + + Block comment + + + + + Operator + Operátor + + + + IRI + + + + + JSON-LD compact IRI + + + + + JSON keyword + + + + + JSON-LD keyword + + + + + Parsing error + + + + + QsciLexerJavaScript + + + Regular expression + Regulární výraz + + + + QsciLexerLua + + + Default + + + + + Comment + Komentář + + + + Line comment + Jednořádkový komentář + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + String + + + + + Character + Znak + + + + Literal string + + + + + Preprocessor + + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Unclosed string + Neuzavřený string + + + + Basic functions + Základní funkce + + + + String, table and maths functions + String, tabulka a matematické funkce + + + + Coroutines, i/o and system facilities + + + + + User defined 1 + Definováno uživatelem 1 + + + + User defined 2 + Definováno uživatelem 2 + + + + User defined 3 + Definováno uživatelem 3 + + + + User defined 4 + Definováno uživatelem 4 + + + + Label + Nadpis + + + + QsciLexerMakefile + + + Default + + + + + Comment + Komentář + + + + Preprocessor + + + + + Variable + Proměnná + + + + Operator + Operátor + + + + Target + Cíl + + + + Error + Chyba + + + + QsciLexerMarkdown + + + Default + Default + + + + Special + + + + + Strong emphasis using double asterisks + + + + + Strong emphasis using double underscores + + + + + Emphasis using single asterisks + + + + + Emphasis using single underscores + + + + + Level 1 header + + + + + Level 2 header + + + + + Level 3 header + + + + + Level 4 header + + + + + Level 5 header + + + + + Level 6 header + + + + + Pre-char + + + + + Unordered list item + + + + + Ordered list item + + + + + Block quote + + + + + Strike out + + + + + Horizontal rule + + + + + Link + + + + + Code between backticks + + + + + Code between double backticks + + + + + Code block + + + + + QsciLexerMatlab + + + Default + Default + + + + Comment + Komentář + + + + Command + Příkaz + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + QsciLexerPO + + + Default + Default + + + + Comment + Komentář + + + + Message identifier + + + + + Message identifier text + + + + + Message string + + + + + Message string text + + + + + Message context + + + + + Message context text + + + + + Fuzzy flag + + + + + Programmer comment + + + + + Reference + + + + + Flags + + + + + Message identifier text end-of-line + + + + + Message string text end-of-line + + + + + Message context text end-of-line + + + + + QsciLexerPOV + + + Default + + + + + Comment + Komentář + + + + Comment line + Jednořádkový komentář + + + + Number + Číslo + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + String + + + + + Unclosed string + Neuzavřený string + + + + Directive + Direktiva + + + + Bad directive + + + + + Objects, CSG and appearance + + + + + Types, modifiers and items + + + + + Predefined identifiers + + + + + Predefined functions + + + + + User defined 1 + + + + + User defined 2 + + + + + User defined 3 + + + + + QsciLexerPascal + + + Default + Default + + + + Line comment + Jednořádkový komentář + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + '{ ... }' style comment + + + + + '(* ... *)' style comment + + + + + '{$ ... }' style pre-processor block + + + + + '(*$ ... *)' style pre-processor block + + + + + Hexadecimal number + + + + + Unclosed string + Neuzavřený string + + + + Character + Znak + + + + Inline asm + + + + + QsciLexerPerl + + + Default + + + + + Error + Chyba + + + + Comment + Komentář + + + + POD + + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Scalar + Skalár + + + + Array + Pole + + + + Hash + + + + + Symbol table + + + + + Regular expression + Regulární výraz + + + + Substitution + + + + + Backticks + + + + + Data section + + + + + Here document delimiter + Zde je oddělovač dokumentu + + + + Single-quoted here document + Zde je dokument v jednoduchých uvozovkách + + + + Double-quoted here document + Zde je dokument ve dvojitých uvozovkách + + + + Backtick here document + + + + + Quoted string (q) + + + + + Quoted string (qq) + + + + + Quoted string (qx) + + + + + Quoted string (qr) + + + + + Quoted string (qw) + + + + + POD verbatim + + + + + Subroutine prototype + + + + + Format identifier + + + + + Format body + + + + + Double-quoted string (interpolated variable) + + + + + Translation + + + + + Regular expression (interpolated variable) + + + + + Substitution (interpolated variable) + + + + + Backticks (interpolated variable) + + + + + Double-quoted here document (interpolated variable) + + + + + Backtick here document (interpolated variable) + + + + + Quoted string (qq, interpolated variable) + + + + + Quoted string (qx, interpolated variable) + + + + + Quoted string (qr, interpolated variable) + + + + + QsciLexerPostScript + + + Default + Default + + + + Comment + Komentář + + + + DSC comment + + + + + DSC comment value + + + + + Number + Číslo + + + + Name + + + + + Keyword + Klíčové slovo + + + + Literal + + + + + Immediately evaluated literal + + + + + Array parenthesis + + + + + Dictionary parenthesis + + + + + Procedure parenthesis + + + + + Text + + + + + Hexadecimal string + + + + + Base85 string + + + + + Bad string character + + + + + QsciLexerProperties + + + Default + + + + + Comment + + + + + Section + + + + + Assignment + + + + + Default value + + + + + Key + + + + + QsciLexerPython + + + Default + + + + + Comment + Komentář + + + + Number + Číslo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Keyword + Klíčové slovo + + + + Triple single-quoted string + String ve třech jednoduchých uvozovkách + + + + Triple double-quoted string + String ve třech dvojitých uvozovkách + + + + Class name + Jméno třídy + + + + Function or method name + Jméno funkce nebo metody + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Comment block + Blok komentáře + + + + Unclosed string + Neuzavřený string + + + + Highlighted identifier + Zvýrazněný identifikátor + + + + Decorator + Dekorátor + + + + Double-quoted f-string + + + + + Single-quoted f-string + + + + + Triple single-quoted f-string + + + + + Triple double-quoted f-string + + + + + QsciLexerRuby + + + Default + + + + + Comment + Komentář + + + + Number + Číslo + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Keyword + Klíčové slovo + + + + Class name + Jméno třídy + + + + Function or method name + Jméno funkce nebo metody + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Error + Chyba + + + + POD + POD + + + + Regular expression + Regulární výraz + + + + Global + + + + + Symbol + + + + + Module name + Jméno modulu + + + + Instance variable + Proměnná instance + + + + Class variable + Proměnná třídy + + + + Backticks + + + + + Data section + Datová sekce + + + + Here document delimiter + Zde je oddělovač dokumentu + + + + Here document + Zde je dokument + + + + %q string + + + + + %Q string + + + + + %x string + + + + + %r string + + + + + %w string + + + + + Demoted keyword + + + + + stdin + + + + + stdout + + + + + stderr + + + + + QsciLexerSQL + + + Default + + + + + Comment + Komentář + + + + Number + Číslo + + + + Keyword + Klíčové slovo + + + + Single-quoted string + String v jednoduchých uvozovkách + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Comment line + Jednořádkový komentář + + + + JavaDoc style comment + JavaDoc styl komentář + + + + Double-quoted string + String ve dvojitých uvozovkách + + + + SQL*Plus keyword + SQL*Plus klíčové slovo + + + + SQL*Plus prompt + + + + + SQL*Plus comment + SQL*Plus komentář + + + + # comment line + # jednořádkový komentář + + + + JavaDoc keyword + JavaDoc klíčové slovo + + + + JavaDoc keyword error + JavaDoc klíčové slovo chyby + + + + User defined 1 + Definováno uživatelem 1 + + + + User defined 2 + Definováno uživatelem 2 + + + + User defined 3 + Definováno uživatelem 3 + + + + User defined 4 + Definováno uživatelem 4 + + + + Quoted identifier + + + + + Quoted operator + + + + + QsciLexerSpice + + + Default + Default + + + + Identifier + Identifikátor + + + + Command + Příkaz + + + + Function + + + + + Parameter + + + + + Number + Číslo + + + + Delimiter + + + + + Value + Hodnota + + + + Comment + Komentář + + + + QsciLexerTCL + + + Default + Default + + + + Comment + Komentář + + + + Comment line + Jednořádkový komentář + + + + Number + Číslo + + + + Quoted keyword + + + + + Quoted string + + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Substitution + + + + + Brace substitution + + + + + Modifier + + + + + Expand keyword + + + + + TCL keyword + + + + + Tk keyword + + + + + iTCL keyword + + + + + Tk command + + + + + User defined 1 + Definováno uživatelem 1 + + + + User defined 2 + Definováno uživatelem 2 + + + + User defined 3 + Definováno uživatelem 3 + + + + User defined 4 + Definováno uživatelem 4 + + + + Comment box + + + + + Comment block + Blok komentáře + + + + QsciLexerTeX + + + Default + + + + + Special + + + + + Group + Skupina + + + + Symbol + + + + + Command + Příkaz + + + + Text + + + + + QsciLexerVHDL + + + Default + Default + + + + Comment + Komentář + + + + Comment line + Jednořádkový komentář + + + + Number + Číslo + + + + String + + + + + Operator + Operátor + + + + Identifier + Identifikátor + + + + Unclosed string + Neuzavřený string + + + + Keyword + Klíčové slovo + + + + Standard operator + + + + + Attribute + Atribut + + + + Standard function + + + + + Standard package + + + + + Standard type + + + + + User defined + + + + + Comment block + Blok komentáře + + + + QsciLexerVerilog + + + Default + Default + + + + Inactive default + + + + + Comment + Komentář + + + + Inactive comment + + + + + Line comment + Jednořádkový komentář + + + + Inactive line comment + + + + + Bang comment + + + + + Inactive bang comment + + + + + Number + Číslo + + + + Inactive number + + + + + Primary keywords and identifiers + + + + + Inactive primary keywords and identifiers + + + + + String + + + + + Inactive string + + + + + Secondary keywords and identifiers + Sekundární klíčová slova a identifikátory + + + + Inactive secondary keywords and identifiers + + + + + System task + + + + + Inactive system task + + + + + Preprocessor block + + + + + Inactive preprocessor block + + + + + Operator + Operátor + + + + Inactive operator + + + + + Identifier + Identifikátor + + + + Inactive identifier + + + + + Unclosed string + Neuzavřený string + + + + Inactive unclosed string + + + + + User defined tasks and identifiers + + + + + Inactive user defined tasks and identifiers + + + + + Keyword comment + + + + + Inactive keyword comment + + + + + Input port declaration + + + + + Inactive input port declaration + + + + + Output port declaration + + + + + Inactive output port declaration + + + + + Input/output port declaration + + + + + Inactive input/output port declaration + + + + + Port connection + + + + + Inactive port connection + + + + + QsciLexerYAML + + + Default + Default + + + + Comment + Komentář + + + + Identifier + Identifikátor + + + + Keyword + Klíčové slovo + + + + Number + Číslo + + + + Reference + + + + + Document delimiter + + + + + Text block marker + + + + + Syntax error marker + + + + + Operator + Operátor + + + + QsciScintilla + + + &Undo + + + + + &Redo + + + + + Cu&t + + + + + &Copy + + + + + &Paste + + + + + Delete + + + + + Select All + + + + diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_de.qm b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_de.qm new file mode 100644 index 0000000000000000000000000000000000000000..e13236cc2ab1cfbf984344f742eabea681171d78 GIT binary patch literal 82744 zcmc(I34D~r`TuN^O*XrmO$gyeSRsUffO3e4R3QmRkRy_S6wgg|6P6^qVRu6S@2ghp zK^2c$f1Y?$skheqXl=E&o}kvM^#ZkCtp%@Y_5Xcl_C0prd5;aj|HqF$2J$}h%rnnC z_sqwNH!{+_as!s&8QhA70Mb+X?1A;BdzNco1_hIFPYV zUtsRvY-jB5%b9yCaD8?ehpv8kthm0Cv4;0JbPZ}`_KXx`&uwPoj(U=@ zt#xetjT@M2?44}CU)+vyD%pNd66|CL2Z|WGRb^x3Iv(p&cJp#UUy@21o!4{8wkFme3WJ@l6oVm){*s}ExGgdP|z}j5`p7O1L z50&$ySd$OaBw#pknQy`cBT+gQtezh|z3OIZBDdl@ar2OJ6bevjF?;w38V-`EGXK-+_1Y4eY6*yO}G0H2drRUockv4g2fsXEFA|AokqO zF<852*pB#r7<=eg0UsO3c17N0?6*g_+z;Ns*!YpIK~;H- z1nWEEU038w%wx(nSIe8F|Xe?Z5+N!KZV zz;{>ga-FgR^0($V*RQ^q#@MqfT)!TJ@kUK^ZK>GJ*spJQ-F!dhUGj6+Zw@_{xrW~6 z`c20u#{T(V*IoM`iFN#?>z=c^89QL5>xoX{#|<31TvY;k|0ZC+f4g3IA9xQuRKP<| z7I4ms0W?96ITm(%H0A!@PdGUeoDZU#I`REbG?pTxWeR=})$i?}A!fw!=pI^2V^BjL`{z3kW80)$*f7Zb% z@M}~4!VhOKwxJ+@#b@Bt)JyY^yn8cazbw!1{JxH{VXN{_dlB@w>hjO(U&+|{kLRCt z8|3fGi}HW|=ogHA@MZpaXWqkD@V@*D7eC5e#gF7~-tiB{TCd5!;nM+-t2gp*IRX23 zUQPZ3S8QQykthG*r-5hf*ZEJxF<7hGNsy@!#n zy{(0@Ws?iG9F<~hb-dul$G(7Aom;SV0@kf4l?ov+0e3 z7iRvRv1u05?^<(hs*3SxFe+_gF_@dywl_xUx z-Khm1Z^U=&FDTeOb~j_m>VmJnsbj8zUl;uF(8aI=54hcLRX~3})zm9iLI1YUOdB8pUwK-A30TY6y1@cIa*=@Bf8fwnR4!m?0bm_tkL={oRTL4h z^ho!d_aG-Nm%3|;HZztw(7oWs-LThBxR1IRu9Yhpq@RF?J|SS;D*~=M zNx+WZ37GtufTvCt@V+4eKKP}8&-ev=@mc|2OXGd#T=DZ~1p@9)!|!|e&#wGO1S}pQ zpns--SyBTcZvkub&`Pp3v=ko8zG?QO#yum3Ro`a zaSc3N{5<9_?prruAI|L&Fm;K5zw-l|Ao%aOO0|{`-yl@kfWltJ~^+VF&hoQLX#$H(@`0{Db@5+f$6)n{a=A!FKo& zBi&!0aVBH#Ul$Jf2K#dKp9;sW{R?9+KTtR>R>9b~t%c*Cgg$=hAB8iXeTlIZjfICD zi|>E=`@&;Bg`SyMU3gp<@JtO9#t*AyuF9^$lm0%8v7=rUuyeA2r`}L_^6i76mme&= z`1vsWg$0FIR>R-8byDFqx5Cb?f2Q!hOKxK97oQeBvgs+tu06i+DK?t1$Hx~wy$S0# zyChr#T)K&rSs~7O0F#qH)v5Fy?71 z8h6UQSjRhy#&7s3W1%%g)4u&R?9c;62VRNwSo3(%^b_HK7yM8(gZ!h?TZ(3vV%u%WPwMDmVy$E)$py-zSo&<~*-MXcSv9B)!>;YT?_$uJrfFCgS z&A6glZ=^qW7v1K;pC>;my6sKK(;ZJ0-M$F>^QUu*-Z*ay^zO)_Hy{5E^!(7Gw|9U~ zr@d12emnSb)Y_tdZv+0hMIQF69gN+y#Z!D7e*e60JR^&~ho8E?r)u^e8LOP@soDwt z{Ccuyd?|ka@?y_^-@*RB^@?X|+h+I$2YY5s!hEV)JckVhfA9R*!~NIy0-nR?VE-KR zn&+6h>lyp~SWk2^;+ER`J!@7@VeG^|dDc8~I%8$aJ!@XW_=}GAtoe}se61%w8FY+! z$8+K<$6}uy={a@VAjU2@&2z@D{{#Q%AD%O=tbzZq)N}TGSjVn?1-$=A0bdPz&h2Po ztlx>A3s2sOc;j>d=M@PUxkv-_xlNQg;-vVF#Uj>Z5 z?D=pP=JlJoo=?uf-=9_C`Et;=i0A(5`EmsCp8r$NH#crZobZC@``IbRHdYrGpZqd@ zUR&(@@JPnKXezEcU@Z3Ms{(%UdGXY*!Iy!*Dn4u~@ZK_`c=n0QvClUY&w>BQmXGAn zHT>b?x+AUxJdxYOT=@NI z!v#F}HUWP!LBIuP3wZo40ayPZ;K|bk{IgHMe?$fR&nN-E4Rh#n-BkSG9q>#3J*4;# z=Rd*NUH>fp^U6xZOD7e-{^?J!uSOPs^D2IBpXg;#@T2^9UiXB#*cYFB3wIrfcxsH- z|NMcB4gR;c|G&1wkN$~w@JG`ayJBDO$e-Zvmp|(bUfImplWzh-4xbzccoE{5!nkKEeE#{@gqMu13aYogm=rR}1(}!n@y6 z{NBfdy$5^<{I6c>o%hqL;8(oltzUa6?CE~q#`o{V{8kD0&F$V*=OvkI#4X-cKVV(= zzu9~2AmCr|D2J{Q6TRUX1&sCV6!7VzIdm1>FJS4n-tepn_>&C+&cdJ5&$Itez?w${ zJpMER*AEr&q+tTyf1!Yn&JghFiv@h@!n)LM-V+PX#(I3|z36TH`3Z-3FZmjBap_CmEAI^>{@TZT z?SGdscKkH&Z$25rSpSc_cf3-=*ttu+51*HUecd78j5M6JOZ+_hH34hB5pY5J_m6)_ z{Ji>60oVRs!1c=o-1vilCv6e%_UQuNQzqa8KNaxN9s!>?O2DUI5b!Vi3i!fj0=}C5 z`!~|`ef+ri^M5r6_<5Uv{}q4ka>e=2F3)%YeFC4WY=7}{`Ah)^mI^p#miJGe?qIIq zWbca`v5z(-ydSP=!aiB;-PIp@aQG$OU8}H<_8INV`x<)exkG&=$KAu&|9$EU90qy( zRl9HKb@=)DQ+=Z@JPUEw(Z0&TA7I_C^Hp8~{=U4-H+C!5VZ!fx)z_TK*v$v}X8auZ zsy^@?GUaK+Q=j<`Irev0k6V0m9)-OaajtLft53onRr!v)W;^m10bk3Co$%{l^@WGP ze|_j(UwFwD#5ec&A{D^5b(gPeTP46;lM8LMIeCsZ}AKyiNCpGOx{$;Z7 z)M=H-BOT^DZ8!Ad`-l0?8Us9y<9!!yAAq>OOu!4D;n3A@f8X_Q_?c^5(0BcJe%OQC zd|R(W{$}(uzQ;D?A&zbIJ#}I^V=D&<*!~rVuDsv*o~h}ET#oQPzp)PS*c#uqOF;jN zFZf;`TaEoY*7wGJpr`UbzBiY;8T-$b0)AKOd;50C(w|8D>Al9kNm-RvJt`g?c6f9NZi&o!I;3%6bXef}o_Yfs|P<+;v(_|HJs z#!LK1E;pl1}m;2-H-yB`HU^R*8jo2uwz56@PA$aJS*Sv?|vS6o~m8`um1HU{Flr8-;Tw+ zuK2D0+g(@(?-l;<*8|U)7nbA?g`a-cz*7ZGyd~hh&kFcpjevjq1Bb5QFH3q-4>NY;K_#c3vmNs|qvXt^p{L#+QgT)S z_!-(>a`t8SV4nMwoOc-H=x0}yY<}Q6$m=!^T|=8n{;$3bc4r>}k2yiWI1{jYsDP&> z1pM710Uy3Vz-`|O_}Zreezk=|SH-IWRt8G0b)N}-*OlD*UJ7(RB4GPw4qbW2lswoC zKf-@q$?uQf3HfU%d36$g|KtB>amj1BErG!~feBC~1K_75_a@>iZ}1;12}GKJ*go`mn&k{K@Q{X)F-knLwOyOrT>#7=B-Upyz%3-u15pPAJ7XoPAH=>|GNXd+NQw zroTh4{PQ<~U+#Jr{{NW3uSpIrS`@gJ{KFy71+MpCyhH91aQ0*YkA7UhaHW8;^8`H2 zCEzm~1$^xk0Y5lbz}@c)_(PaOS0R4?iyFx7l)w$g6)_fX3*7M7J)m!8;J4#?82f5S z;GO{TgoFKo`?pL(y!z9?gOfn_ZTAHJbYlhlyQaWXu>#n;1%anu+rn5|dEl8xABBIA z7kK6|z?o+TURVTvlzkT1){c2@`&r=a6EUxX4+9^s0lzoI0-q#-cfgr}FTL0g)v3Uj zckP59|776%DFMV6e-QApO{IfpUxfAizI2oubbWMU>FARHBX5_EJ?$vu>8>fAaxL(+ z3@@FwANaT52cIN!G(c z_^N{iS(L@_-^20$5&r+p_bWGVbkGhxQxce76ZO^k){Cmp)cM%Kn->mrF%Fd6BH zw4|c(STGe2cEo!kiC{}88Ih7P&xDNmm{6R(g<<=Gi0-Z~DHJi&Ni}*V?Em8FU0(F9Y2cp|Ei0xk& znHY_QiM{byB-jyIXCls13|vX7i39ndXe1BZKQ8u&Id3l$O<@M5rYdNl5uW z!7x&$u*k>2L^8%O6_%VJ2)|8a)>I}q+x=2}|u1M3YpiV^F zR?BgZPvh2en$(FE;X~5cyAqLg(Rg<dw;8qXG5!YBT@Q?^g;ZH-*Ui#&V z;ZI_$mH)R*)ti$|Nef0>gRyuj7=oy$LeO>bR`Y#-EL#R5#L%>W%^-x}My^C@3kW3| z(bZB!CG6k`@kX0E}QW%Wv;>2&n1hTbr|GMt3j%Z5=JKI_zOxFlI*kYlQ}5DQ4~qx?@2I;}r` z?)nsoMFN&N6l?452qiSG1jF&3m{720HmvtlH>&iIeD4*iyFzVp%Ny$zuN4KMX)}#( z{Z29G_WqXK?tqHs+_u(uU42e`=6*CM{{Tz!g_}<9R>}J~+VF^W4#oCKXpI#1N$%!zv^k%;5aP5YLS3t+zTpZ>(u~S0SNmur%%M$e zupvxwm-W1IX0nYkrIKXoLLY5OO{N1+wu|x!xl?ArEbcU8Ddka_wSZZzqEknq(jZ_? zor7hTtkdEiJ-eJzHPV7A)3rR-k|6uFbV{5R%dD5vxGBy3ra7u*rO?8ejU8)Xo6bv$ zCc8R98_Z+fO^%JKIngp_Zz48KTy-FNGp(r(rWH>(@PdpPQ)MbL!bxJt@1X$BEGRSX zY#qnbUYS%s8x@a2%3O8WJ$Jekr$sZfM)J%hB5c@Dd!GL=XQgplX|!7BL7IC(=Q^I1 z5plaQOJh!@6-U)Pn5l}o%0Q{I>NH|s1sr?67|32a$)udLolX|IYc zfe%HsStVpqa(|QD2;RHSSkuU%oiL zF5)25pvSH8R3FIL;x-kYNh;k|Vq(NUD3f+;QJ9b(L}9m2GuHi#1LxGY@Hjf zQirgN*j40$_bPHz7fIod7C>6Y-75Yp;;jQQZ4eR$jWxorlJ=i z8UFrR_)WQVfPwomF3E<-o`N-_6jew2vj?S3>NBB{6v3i>Omdv50QG;XpR!S^_vI57 zMk*5Kp-9rf231mleM44SC#$PGQbv@WiK;_AKybkrz?u7aNmM@*Jjwbocd{I1dcT!(2-v@T_sjV8cCFhyUhj{dtJvJE1zqgI+$@`vWM6ER%U|_ z&z`xhFSXEw0w?_fW>ko6tg*m4LSA4&fpsKoHhwl2>|@_9m4?2Ib)Br(0m_P5MXkKiHV5Ps7s6#sEk`tL4VM>O1Mo{r+ zG93WDiO;sBWqcGn<2gcgii5f!CJ1*UPK9^XGG|~jb+Hxim*mB~0GCba06nGF?sZw3 zTw~y0tBFbnzTk)@G-tB=K5J~6BY2MtmQfJ<8StN{BTwo8j zh#p{RT6u~pEHe3|VTEO-*4&P)A%--zB;p+%y7n`r5-%Of+K6Xv1=(=JwBa{ zBZVa-N9p=i;sQMfy^XwsJP6)Ng{Q-i2ph%I-*K!6Z4WfQK~hJ7KiQFmO+1b-=xcck zU3FusJB6-bL>dv%OsA#C)CM|JwX&v1Aiqk7)O78;juMynbW1gylGF+pk zGb58?O2fQ8q#;{L56z;$jt4c_nwss;-r(InRBj>XjCOuh?f)TZ6Ms(ng)3@x_5+*Z zZEa}1it^;t{$M~NwV_L{>=!~-vULzezhTIyaJcE52StA5Ix5bh$coWf4LSgjb{*C6 zE1MFbSh6dg)N~Mzf&^91n^I*->28~CV|tX#UK=8Oa%PFDAUGjfJ@xy#-}0CfGgOgQ z)oqyKmpB8$H?%sDqE+#DC)g;Zbzu6_c5amyT$3 z;vb>s(YL1(P*T$oZ)xX-6gr*A@YCU%MUnN9#GDn4{B%u_)dEu#@j115D}_QuHd)^z--SHGOU^116#@giM`q?}TDmH+|w!(SQj`W!d zBfrY<35`!u9|h+%YwDTT9pi_I7mvnbFn=z}5ErmeSZls1ZFiHK)vlP-BO2zq!86%JU ztO1kg=DI;!*}{g7?l!THji0Qv72PoCAmOIN8;XFFzwT6^hczXlT~Nqj$8sG+A)*^I zCuyTrU2=w7K>-~wp+C_?#=jgDh+sIK-VNYxvm)jUDLppgP?klLTv!F zmyJ8Aw6$o}8@hXiuXZ@$nr4AI4mXo6rtBP2w;@&5DjH#VZ7gwms7X)@ zG47tyMkIYj_C#?Q6|Jed1?mu`%VRAaa1~ALd>VT>>=Ef+vAGB)RSd;7p_X=pzwO+o zEKwb#nox2z*IG{XjO0^i>Ok`0kFxtDf0c}z7WG&P+`;3M>@ihj%a5zEsBz1a@uQ>?{oE^Bq%KRtK|0`Zdl2e z)lgF8KGPvku@i`cnR<~s!74ZVH=s?v6K8`H2>H7ZKjBb2DRv2RKRn5Hpzfd{R0M^M zNC1VnB9MGD!(x#Y58YZ949nC7tM!X-Lg-#oKavSL-Q)qCen_tO$%f6(1@OrN4 zC=o;}oRKY67pIIYTp||g&?iM@2&W+rk(q9VCjqq0{J*^R%Ck)wdR-l6;DTsac>WY{ zXY@tL2FrCz$#8htVlL^>>?#@VMWJSKcwY8}!(Ao+bOj$QivKo4{c}thgom0C&gi)FFYnU8{ zt=iP}pVos6+0dT)dDf#kU0rRk8A#z!oFdNSuSIx3X}xsR0wK2d2+9}Hp;bfhFPqsw z2p=(a8JH}apKtM;+GR_vr)X&uWP{GcaQd_My_sYGWpu%Tvq=s%bK+D9Dr{6!Br<~c zAefY)D?{#pY@6dvs0jz99Wp+}s*$j0N6$%tX6QBuQaY2QPIs`f*MmLL)M}KGL%JN1 zjN*Z~C}06%kVV*sQZYGlLH(k+)?zXcVn$cim<5={wepNhZ9@asA+x!EOp_I518S$C ziRpJnEgS7%`sKBwgGlK%hf>i_-Ndz6RvB_ANZt?sSds0k-ETi@!pB40nix{ zRwzJN6QLeU@|#c z8<9wz8*$BJ^I^THWG#x8ht2PZHlOu1-kP#5(*-VQC9~w$GpsR>xZy zS{JH|w*=c|DRo6fE;I~FE97`swJQQ*tZtwYW+Vh7N)&F~7c(6ZV!cm-hJll*4M;oN z>>4BMWjwH#+EHf1+sW_}M{{q0!Q25|NR0uMh#*}_)e|LiMS7DelG;K{Fd+zq$cdqft2b8biAQmm656p z($Llr?MmUo9C29=;{OC_OD6z~veIhcR}krjDEE|1y(bVYJgu>CGA7y=FW6X>SWT`P zqV193YUI_dYI6$jR!hhv_m2#nJ(=>Fi*<@(Kb5O1kO~RHDMr;rA=Qz~RB51@_5w90 z$V#F(RFXDKFto2GLB$y3Pxg_3; zq3XQhD*G~r<)v=9XWVQUGKeij1wqR6hSOF-69cjg^!L;T@FgsShzrFnYt(*YC5oD+ zOGaAav2ZA{L2-11_peE)NdQ3cFrBed%as_>B&@^V2-9J$eKkdtw5=K`l44vYVKZBy zCzOj|slA8Hyoi)Dv*wzooC+n|gPoy7dv+~M8EUpU4FIj0?5d9+NwJT*{ zBd19j*wpty68#qC(u7>VZmPnmak?AD|B311Kf0ljV-E2?Mx)a(UiD<0JJY3(eCX-U zF-!gB0a>G1xyeSh9BaiI8-XU2d*g3m14KpxPO6HF3=*%%QHI$`4 ztBs!N&*tL0?n9&J=(6ToX)wyKWt!Ib>kf+y#t)nJsw+JxCl7j3FKym;DtYAR)Qb68?;L)U-XaMitb7 z=FAAK;Q9Z(7XXgxZQK`Nvk?>vEeMZHwX}t^CnmZ@QBk+ZjiU3m42w)Xu9Oy_%j31C zyy7`21fR{_;)IRyOLB%A@y}!!uetbI)O9KTS`B9>vuC%lak5FzZf%+l1=|!y*rqtd zHq{ZfsW#X~WM#I6!z;Sv^lhDiT1s7~?+MOs?o=k~w1#VBc+RzkG;4qCT0?r+X^@J{ zW)aa$C8WkqW(KJ3bYPs#`p^XfvXL5iXwnU@m~O>YYZL0m(8lOWM!LiCiM;fX6&R&w zGetTExwraJC=iM$UGVBSgVedC$H8$OV_&EuAOqp!*I^?!0uy1Q;6^WHzWO>F5euMH zsC1TMU#fHz*LQZs6S&VhtN&dac`?Qd<6DX)DE&u!T2mz6#gT9{6tq$%W>L3E$Fnl> z;0!Lx*2>>tyF^1XkjR%JkVa#<0zZb0O^a0_Yl5=WmMFg|lyyo#VbKI$1EN5W+NS8L zezBdbRd3nySbL0aE0>>`P>^e;ITN{Fwq>hQp`y249S?+(3T2vsal_DcXBQXKd~sNx zH!8`Q4oYPvDFSt$l&&yVrc2e9tJ+4qchSY`;k|82AD|(Nx8i~z5r}Y<2c!+SWeOg8 z&FIz+7Uyi_33!VUYjPbC0%+Di5HzDfU!ky|Wv@3FSd8tY)1V)E0w#(uToZPREwDOl1hBx6Q%8UWo+_T8qYih{(HmjL zt@Sgq(KwHd9*YbGZ85+erFU|b-d<;_a+7M~ob0O%vb3HB+xA|5&tlMA6Gj%OEHg(I z-#JVnSzzdk%!&niIydCJPR9Dkv?am+Jb&`Hpb9O>s5WIx;^s6vhf5mD@ZC8#kKlp&a%I% zM9Aj6CgHEkYU;^GcYqUg(n3VJ9<^45$R40dH$V--OkOy&aO?(iw8Hb@2~)j8myNty zhg|sD6vtYfY#gLRPbcfGusidCvT2&mmq-6L4xJL?XQ#R7kPp+$Bjw~uWPhBi$;ke`*T<`~5gh=oh)f>+mqN`B-swqM0V;%>m#a$YKsAb|R%>W! z&az2yXv4BU8wJav^!(aIeBNaleZJYK4v^FVDD`9Srt~x9`N@^d#-CGneD=pfkwP%( zuT_;-X%iZ0#R2Om$*+uvzO)S4G*;Rs=YwprN^L-Y96UH#MywNrQ%n#}=`F&kCJ3j> z5Y9xmK6M<>1xS=e6W3RXIyfai6ZliQ0EGTtTqMzjm?1@*P93IvPB@H1rJ-<`_ET2~ zXT4}B?c`Wpw6&F6ze>~5l#U3fU=^=d;8m{smEfCYijOw`Tu_|i=7&yQR?uQ+YwSg-Z)cbkgN&2=gb=Leie)_1nWXetx^O8@UnIy@F z6oUz))8O0AQB3TRuIXzWk`3%p{1$0BI^#2hImrl=8`WdGp}F3+=Q}X z87-$Xv81Dg*&|68Rl#YosC4mGHm+QRaiB7WBXOLjDtG0W6t(@)Hl}{vPHqu}383gD zeeaDbY85r1FzzvH#r@xOC_K`pr2ETMuXS!+{k%D~O?>x?i{$9xD&-0t8j8wH$_;ij z(IyNW0SmGk`fw=(t|>y>4920G^wJ$|@{ycLs{C6zJfbUafHoOD{pO0|h7)S&A_T%g z#Y534WrA}V^7VKU+X>Er+*Yeg!Z`+wqArcEQLF~N`bx@FKG(rnSVTrgpS>*!U`4<;$1MQ6wd}THW|^@&r;kifM~RPhZ^IL@kJBC8^T7 zIIgF|%fGt2c+7CxhqKOmolS3sG8>#Of0vav&8~pzrhGw+StvT|nT)msolux-Ok_r+^*La(uPj3qvyU8xEM}kgMb6C( z_g+gnnGM*NafR6!2SC9#!XMI(JyB?;9d$8}RtL^$YzXR_0d-{^&2w7Nw0IF$ag%Ju zF*{_DJ&NwAg=CcDZALMPW-)uw;_O@(jn10A+2vjmB4^kTX&)PBGewtEk&HLXW;|z! zreRqV&Q3N-2Bvq^tz;|v(87SMA+)0l667^D$d_@S!Lk^vdJy|&4J@w&ONgKc9;|0b zE*j;5$o*8$va9lD-BO<|V`h!@62ivY5Y~vqM<>!!xRzMuLN@!88#sWw}&vwKDJMrv@&uzLZ6wSTS==N9o8>e6Ju5kmAy& z)$y>^0&9CQlT}tHeDo5e9p*8SAkBtn4q$Ic^y_VHL`ImfHCu=G)3M1?f18P>S2;rtyQV!8XNIj>4-rY zbFkGC)6^w34r8w=GACrMD@Iw2l&vrLwpJIyQe#Z9L@V7*szuHmM!Qp5BKq|DvJibE zpL*xj49{37XFiSQ6|97zs)gG@X3460$aVS3iM8=?MiE#tL#HPfB%gXgN*x#k$5-X8 zyS8pl(;O4q6cBB?+@$K0iT=5`qz2Cc;hetc+m#GPo#WzUrglRVWsXelhEkwt z0akLz7(=@jbfAJi7F@Y_QLr@;QZvbtkpk%qIaLI9=o)Pc=OXVWE=!ku6*ks#K^3hN zQAwp3N`8_vLA~yDj8%Ujr1%|*JH_ueqKqTvMVnrEa7CNZ_<7L;o>ielwYVrUt+hB8 zW5LGxm?r&^p-!WEn)7%%OwdGWaU)Hce72)#R5nGlo{lIPjv`r8dbZ{n20u}*FNRCj zV5kn0nKBl5td;O09UeO)=iCSn;WNm=do9l(BlAqZk0Y~Gk+U;Cm#RdpyOZPGg7O^f z@NC1$Rz-~}_vtvb&6SzwTS<93PBYCgP?78Cd@O1*5-mH9N3K>!b~?{;$GEj_(oEcD z0s?-aSn4!RPG|vne2(e(aT8=YG;%QF|q`gp0$?AtvVB=y>tJD>Q>a5^JgY2*@-OP z%AJm3ERtB{I14|DO2(of9^n@kE4F|Zj{J~LSclAGRsENyaMyD%6L}O~1;)iA2hF8XpCuk@V8yAoS>{Sm?>sTxPstkdx%;z4%1j58rjgmGfjR?Cd!h^!Im$sFwB|^FJk{#lq>M`Q zCHLg;sy?CAIw_n*T@HM#MD|X}q-3cX$=Tm>o;MK(Gpv;kwZ|!Vbr~8>TRX_W4A zcar=nrt}k767x>2Jqk5hv&^E%dRB{cc=}F_4&gJ%L5b>_D|^Dm%Mq$K=t>weJBNu_ zi=H4p2Z@`Y8@iF-555upG@bjP7*c8a&dx3N=Tk~{MOvb`yPIy5G)**CV1RZw?#lhM znJ&6F9RZjpQtNnEH@zT5bRxtj5MGw(8hwfy8Fki!4UBPRChMGFqb~ z7R*Y=*$`wUc?v<9j*Ar`BeMx{wk8W4a3#03**BXIrwe4Y3lx4>abR%vz&8A^aWHks zc+e4@&=z#p^=#Fg7`U&D%^%_j&Nit4SxwnVB`0Ib4r)1O7sE(wMz!>27%I$|UG0U3 zg~hEfA^jC!64caZE;^v}_rehBOy%uU5SnXmeNsPt6AaMM0X<6D5UoyMBJICCmOc&4 zO9|_gTVy2kSK_WV=jHS=RsO9@>7yiA&Ab;4r?m%DCBbPG{q$F9wT*u!NKo6yKpNrJ zQP5Bc_UuTgR3+9j78)-_B@JNI?X01;EQimQpjJeiN}E*fq#~zsILXlLs17(-or|+9 z=wL3{8&Nc+>=oUJOlDhOo7xwH$Bl#d6a(oN?IX_g_(lai+uwRbE*@+C<;B=^u zD#oJjuacq;UOabQBo+*V0{O_5CWjy9NTrLrdEQMN-DB{+BJ zz=B9H8`lbVHMhhQ^!jeF*=E(mD>2z<>7GOLwJg`rw^**~P~L_s(%qyxW$Wr)61QH} z;at1ZQ8TL*@+=L9Ef$E{Wc0jLml#rpCImXzs4ljD8E!pI;88zwS*O!Gin!8&I6@G@ z0Q77%j>#HOCCR;%i_TC9s`Or0(fHC7(L+OWEOZi#Zu6mYP4fLyBD@*P4KxL90^jja zDu`)_7r3eVImyZOKo&FKa4Imq--PFPxI*mh zy=$6>u&{CI5{}B5W|Mr_`=_)d$O>_7)G}7D@-4r9Sv~Pd@~f4o>NVm}+Y-o(y%qP< zMD@2-NHEg%O9JCWG$hplFDb1~qyWUt`l7KXlfeFjcjBTts)BXl{g9wJ!AA7Yt&p1wCA&*Vg1%3#hU%{#R@IU`eB+ORCq|Fe(R<{r znFkfICfXtV(wdO|pkkJTw5U78u{panNOO>s@0^~wHGa8}x9!nGQn<94=fr3c=&iVV zwmC;WgY~gc|MdHN_=`)pzm{}?}BV7)4 zoAE=c21{Q!Qx%&Zm+!0ZmSwsE3b8qb=f4MMpKa*RY~Tfb50 znHD-eLmP$ukCcN51*uP$wv&3AIYUVxlZFG$Z4=N2jOUyAw&@I|Rwvc-%_f_sFEyx< z6HYG4vAlJscPK6I-RT`l%bRz4hjN-Kl9|^HO_K|yQ$^iRwKw$gc5AdFm)EyVKK4WQ zB0PPdcM;rkm6sSzK6AK>O}_5MRyM&z%7+({RE`%mg%WKM9=4f$?cQmhxTKip5NWaXND}Q~+?LHvIz3#XoLAV0=dCndK*c9=9w;9}I)dkA)X5Fx zXBV0ysh$Wj8_l@8Fcn39#$u!z%aQ2z`Yv9N>%eGa=8MXSri13*F{rEld1~IzH-vKk-JJHks}da zmI<#$q1TL(RZ-+d=pZkNx2VyIXX~-q)PYJD#1qktxOfHCS>@t>6SP(A4Q>``5r|%m z^>g{3i#)x~U@VHPi*y7h>u#&rBg{IxAuvzrE6h6cAuvzvE6h48A}~+uE6fL~OBfKC z59}+<)3Y&8x5rE;I_Q!?N)>kS4XC{XTd*h^v(gLVWgc;}70DFgpxr@bBobH=nUHkp zZkJMN?6)+5J;CpL!?_{&x;)QqB50H?Chb6oNbQry)`kI)gv8I;n-KAFWMT`hb+u4x z0q7Q*HklFq^L0gyqUFKjQ%Yr$N~2-LeO_{1;3ek~Z_*<2vcOiuod9xVvv;SW7-fb+ zt{AH@Vw{o-nfftpEu84bCB34?UN2T#QszuO&PHxbEH;@9x}UJOvWN5~($$Wo&;Hs$ z?G=f|p;SkxnL8RzT}$c5&Wx_~(;wwhE9uBN#r#qXxrY5xB$iRJ^b3bBwe;J)cJY#Q zG^ax4Q{$C}rCb`F36$Zp3KTfZpEz~T>j<@R7ufLOC|-n8bXqG9yv<%p_0H?wxDnSX z0vTya1FjJuf~-hbRs5967QWbeT?A0N7?n;cq~O_EIujyAR%MNhn=n1niY%o3w22h+ zEN7UZyhJY}Su^h0Vq%(S7nF@hw;E22w@#!p3(~PG4P#R#M6-`Hj+TZlSH{R}GB7ZH zf)lI;jtw$mH)mQ+E<@O`ZnVk3w%n^W5TS97)=0e@Np)WW%1}w3A(E~M6$dlL)W zl>2AmH|O7i+y}AY;z-HRwj7+mGlX$CMB*GdIWOc8(!ZkY)QSHWF^x_RQORh-iSbU9 zJ$1b~201L_uSv9~F`_K3u0!#%NGl9EURseZK~=gGPBmHz>B(QCT4|J%Cc=D#r7F4- zT<{tUM^V;HMb~9jjvJP)$jPp2`77ni;gTcyLL{IHR2p!fCKwV+sW%}T5jj)l#_!54 zre0iUJ?)%~yK!hsqip>387Or$vo%;Q(Y8VPU3y_~J|KDjRQ{NYMHB``5vSJ+5p%-BMkUFs_aHnRNR>)Q?E&LP>84}DYffWc- z&^!i>9yZG-D}pn{VgNcZY1L6SP&bUG?z0lt%0Ru$(JPs&eGsjOi=w;r9kyD^5+o%UF@&UiT58b#WKuN?)5CN%GzWVM_>$+$J2 zUvh7hKqpk{vLzWPr;_G0q8!i0vT8OS(lv?y6U6_I!=G8*@-k#>_4weVNt1%($Bj*2 zQJ_=nnnT+VO16YLxHg@Y9;Q+o=m19p3GgQaSWrEHM*;3v(Gd9vsDWgeexkaBK zX#lFfk>5)`aOTwl<>+k0wfHU3&QOQ$WUUl$PPRyjfy(KWPa&q~HDsL9mWfeW~%K)A8^$7y?dJ z!MNun5}^&GKeUdPhDbu_uxVV($+VGgNskg!Zc4bj$|VLCg(Z3ii)u+o*Cz0qOZq_~ zld)QRGZyHo=AtgD7hRx{M4y~<;iF_7@@C`IiBFPK7p#sV#7=a@J3@5Xx^fPDoC($C z7KOE9Wdv^DCG4eRI$2e@J($qG>To&F;c)Oxt179(>f+t#hM1T>tl>mx*YyPf zd$8tHElAE$3VxLAs$>mQrtL3^hOu42Jz(I3Oa_XiM~tP`baNF{ImKp5;}6AXw0lKRLT%5P&#?DPqtrqr6P4zHOjDzw_N-IE zf>1K+AtzM>OtRPk6M6hbnG+(7Hl5~u3|gSK33%$OBic!gVJ1Z7oQxclusewH+P3% zoPi4Tl;+|K*iAX1pi9VikkJXfW%%*I|$n{oO*PCIrW90h2 zWaRoB8QCYj;}TV}!pU>Rdtg7u8y`5%*?Q6~3luz~9H(ln!bap#M5BXbRx>P&j^Z^~ z-!?I<5$&(J`FeXT6qHP`8X4hkMC{q^@^nEI{TZ3|%#%wMjor=ZUU+(%Jr!3@h)J-Q zr!&mbN3Vbf&!MK!Rd4FA*BQUx0}-m!kC>zIkXcus)Bs0xebTBZ`5XC*8lu(N!~hP| zwUWuW;=_@)SP~(jIa3BJp*5tLWLfFq(AxX@@lczt5=KC^I)XkwqDDLLfmaYy;!+Ww zK%6Hj@lXrWDi~+AHwZsda6`HB%s*F6xXK55<4>{M)I@|+P{Q3ZrJ#z(rxe%CU8y%KxMCHUPYwN3Ptksv_Op%Q;N5)-qWD`_2_R}FndZ445 zSJO;UJBw{iKc{!EX|c(#r_KOsS=fMM0pcYTql^u#i}FZ2l-S@{(57&0YL?8@3!71> zGLoBG$=Gy0^sKd3qYPp`-3T?Pda1KN+=v+epQ$zvY1!$zLD1EZUQt&-!_R4(Xq+m(-jA8%E2pceP)mC;Y|sxSb&=LkcSlO98#0lVLxWMsrMo0l zWoQ235gz%QPNW>E{buYGLO^v{#B1uuMR>(qF;%7r2BwvWs1F#Q-tpFETvw^fC-Wzk za#{}Q$Fi;gV+E{4=^Bs~y7ZLPK_ICkgZeZwQy;~3bnaYvXjV##GqI3tY&>7j&wRroI)X=g!+W6o_88F50{dV zq)Og&k`Ad)0BvI;c#U*qpD!bij}si zWKRhjCMC>9%QWl(&#Yxd;gdM+q*PyQ`Lw8)e6l7+;Y}tnHoVzOWn0a-jbLNg5zuXR zAztyABXq%+7WpshZr;G{H6dE-2+>-5L{5Uv;xP$(L_Llu>aj<(-Vvhp)`)sj(p4Fp zqf;eaqRdw=*Kt3S4)gE^4%NpC2=`1WP-iAKRC=7o*%CtbsJ5#T;LNd-3_lYEBMMr+ zgNNI$o=56NoTx;I2Im>RIJtkCA6!}&>Ez`K>9s5>jX#P9C7Gi0!l6p)-gUX8G|oqS zLN1m*3@@DD5pNdpw&WXn9g12oByA(A_?BeU|4gKJ?-mzTrsm}4N#;9(_gvAjK)Um5 zBhCX;XlUHB{pw@5{tIooYFmlPymR#$B{Y@8_a;A_o?@o75!!ZC-uo8E!`<*qj4u(W zEU|PsCBr#%I3-`&7dus=`nX7<;@xZBr)0W*ea2c{kwTH9HW3HkbF`Gg7{XFU?h4>_W&Qmg(AR7&fYv>+I_t)rq{{y3yM69Iy zzwrohO`20Mml=q54`Zc+?IDnuaa%QfK1pFu_#5inDn#=e(U3C`X>WaGi zTCkQ5Y%1MLMK87KY^o9Sbmy31(T$gd49FTqyI0IOmi8ExG7E!5s`9Mj74OXHnz)U4 zbJfB|43=8d`0EapsPV%?WmylbX0E9xrMn|DHDVlZCVEc9+4^*gt4U)?fnOqc9SIz30{Iq4Jw6%zD) zddQvYI`d>-mt|*x)#dak*#itf+;_EZ_hZQwBd29+IXJT)h1U++|NLM38Em!Fd7d16qQO=N8 z2+UpIMORHq4S_;fPQq=ZZ*V$*GaNEhne0Ir$4?TeWR;Arvby>Yl z?c9AyzbI}bg)W4okL}q@s4Q9Q#Fjd=_=-3L??o&n4Js&NFU0M4n{e_c@ri}F2raz3IShSiL zf4K}@5!AU(>9=OgN6Q5l&yl|!vtmK|l6I%QmzD=nKkcn)b%@G=U6f#QCJK@db240# z?{kftB`7Rym*n>y8ZXJ0q((*FR%z(Tx^P=Dt)-%z8$v(nUF`1{$=9I>?Ee=A;dh5EySwC+uP*A zM)d+2$%Oi{WGX=)M3)_1Gfq2)%9NBl&A7lq<(gj~%$abEo^KF7j#cu(UlYO=b-IjF znHu1&!2O*a@wS{=rsQ8c+tl)JbK2K(6bJB1hj?Z|+tw+ZCvkqR!eBs(_TKh;P`i_;&@gP_Y>f_h1%aPAAg?d_!Du3{~YW%YULF@_)aLP z%A{m}6dH0PXtseM5=T?N7+$m4Ip@JDDQSP%ej`tj4!#PShF2Z1D(1s!yMbT9U@Nji z4P#L=Naj5grRo&4N6X~vDBl2CDP2`wP_<0&T)mN!W0py1?s5^-M$A+WXA#IrSjeF`Owe{!Q0r%|1v=&@5wNAmbmW(8Q>P&@fS}7)izi8 zsK**c4Pw`myW5H9t3=IR*#NX3Dc#h81co>qDy$(TI_RD$E6p@cM;&f1!Eu80#z=~5 zi^BADF2BZzjHaB{W(lq0mHEl;OOuWIsq= z4U`Xlv}CpEGF!z9Gx%VfkR~x>%v!tu%t|h`b?#2$ay{jqG2%-Ok~zK?c5`5Tj^=V& zdXU~3$9?#4x!Xi4Ze<-RQ1X`+2C4M$$c7&A)E&R0&wNw&`ZgcA)L2G(@=qKFd-9LR z_rgyZv@};UG#qw7cw$yYr?i1wFDJHUR1S8f9QWcmHYbZX;=VQ>!G=U{ZAJscm(FqY zy@eQsLovNJ3^~QSa>=9TF7IY?f2GFe7sA8=XB$A7kSjZceH? z_q5zk=PVYrGH1cEmOfBFr1PMew_TA1m0x61j$W8 + + + + QsciCommand + + + Move left one character + Ein Zeichen nach links + + + + Move right one character + Ein Zeichen nach rechts + + + + Move up one line + Eine Zeile nach oben + + + + Move down one line + Eine Zeile nach unten + + + + Move left one word part + Ein Wortteil nach links + + + + Move right one word part + Ein Wortteil nach rechts + + + + Move left one word + Ein Wort nach links + + + + Move right one word + Ein Wort nach rechts + + + + Scroll view down one line + Eine Zeile nach unten rollen + + + + Scroll view up one line + Eine Zeile nach oben rollen + + + + Move up one page + Eine Seite hoch + + + + Move down one page + Eine Seite nach unten + + + + Indent one level + Eine Ebene einrücken + + + + Extend selection left one character + Auswahl um ein Zeichen nach links erweitern + + + + Extend selection right one character + Auswahl um ein Zeichen nach rechts erweitern + + + + Extend selection up one line + Auswahl um eine Zeile nach oben erweitern + + + + Extend selection down one line + Auswahl um eine Zeile nach unten erweitern + + + + Extend selection left one word part + Auswahl um einen Wortteil nach links erweitern + + + + Extend selection right one word part + Auswahl um einen Wortteil nach rechts erweitern + + + + Extend selection left one word + Auswahl um ein Wort nach links erweitern + + + + Extend selection right one word + Auswahl um ein Wort nach rechts erweitern + + + + Extend selection up one page + Auswahl um eine Seite nach oben erweitern + + + + Extend selection down one page + Auswahl um eine Seite nach unten erweitern + + + + Delete previous character + Zeichen links löschen + + + + Delete current character + Aktuelles Zeichen löschen + + + + Delete word to left + Wort links löschen + + + + Delete word to right + Wort rechts löschen + + + + Delete line to left + Zeile links löschen + + + + Delete line to right + Zeile rechts löschen + + + + Delete current line + Aktuelle Zeile löschen + + + + Cut current line + Aktuelle Zeile ausschneiden + + + + Cut selection + Auswahl ausschneiden + + + + Copy selection + Auswahl kopieren + + + + Paste + Einfügen + + + + Redo last command + Letzten Befehl wiederholen + + + + Cancel + Abbrechen + + + + Toggle insert/overtype + Einfügen/Überschreiben umschalten + + + + Scroll to start of document + Zum Dokumentenanfang rollen + + + + Scroll to end of document + Zum Dokumentenende rollen + + + + Scroll vertically to centre current line + Vertical rollen, um aktuelle Zeile zu zentrieren + + + + Move to end of previous word + Zum Ende des vorigen Wortes springen + + + + Extend selection to end of previous word + Auswahl bis zum Ende des vorigen Wortes erweitern + + + + Move to end of next word + Zum Ende des nächsten Wortes springen + + + + Extend selection to end of next word + Auswahl bis zum Ende des nächsten Wortes erweitern + + + + Move to start of document line + Zum Beginn der Dokumentenzeile springen + + + + Extend selection to start of document line + Auswahl zum Beginn der Dokumentenzeile erweitern + + + + Extend rectangular selection to start of document line + Rechteckige Auswahl zum Beginn der Dokumentenzeile erweitern + + + + Move to start of display line + Zum Beginn der Anzeigezeile springen + + + + Extend selection to start of display line + Auswahl zum Beginn der Anzeigezeile erweitern + + + + Move to start of display or document line + Zum Beginn der Dokumenten- oder Anzeigezeile springen + + + + Extend selection to start of display or document line + Rechteckige Auswahl zum Beginn der Dokumenten- oder Anzeigezeile erweitern + + + + Move to first visible character in document line + Zum ersten sichtbaren Zeichen der Dokumentzeile springen + + + + Extend selection to first visible character in document line + Auswahl zum ersten sichtbaren Zeichen der Dokumentzeile erweitern + + + + Extend rectangular selection to first visible character in document line + Rechteckige Auswahl zum ersten sichtbaren Zeichen der Dokumentzeile erweitern + + + + Move to first visible character of display in document line + Zum ersten angezeigten Zeichen der Dokumentzeile springen + + + + Extend selection to first visible character in display or document line + Auswahl zum ersten sichtbaren Zeichen der Dokument- oder Anzeigezeile erweitern + + + + Move to end of document line + Zum Ende der Dokumentzeile springen + + + + Extend selection to end of document line + Auswahl zum Ende der Dokumentenzeile erweitern + + + + Extend rectangular selection to end of document line + Rechteckige Auswahl zum Ende der Dokumentenzeile erweitern + + + + Move to end of display line + Zum Ende der Anzeigezeile springen + + + + Extend selection to end of display line + Auswahl zum Ende der Anzeigezeile erweitern + + + + Move to end of display or document line + Zum Ende der Dokumenten- oder Anzeigezeile springen + + + + Extend selection to end of display or document line + Rechteckige Auswahl zum Ende der Dokumenten- oder Anzeigezeile erweitern + + + + Move to start of document + Zum Dokumentenanfang springen + + + + Extend selection to start of document + Auswahl zum Dokumentenanfang erweitern + + + + Move to end of document + Zum Dokumentenende springen + + + + Extend selection to end of document + Auswahl zum Dokumentenende erweitern + + + + Stuttered move up one page + "Stotternd" um eine Seite nach oben + + + + Stuttered extend selection up one page + Auswahl "stotternd" um eine Seite nach oben erweitern + + + + Stuttered move down one page + "Stotternd" um eine Seite nach unten + + + + Stuttered extend selection down one page + Auswahl "stotternd" um eine Seite nach unten erweitern + + + + Delete previous character if not at start of line + Zeichen links löschen, wenn nicht am Zeilenanfang + + + + Delete right to end of next word + Rechts bis zum Ende des nächsten Wortes löschen + + + + Transpose current and previous lines + Aktuelle und vorherige Zeile tauschen + + + + Duplicate the current line + Aktuelle Zeile duplizieren + + + + Select all + Select document + Alle auswählen + + + + Move selected lines up one line + Ausgewählte Zeilen um eine Zeile nach oben + + + + Move selected lines down one line + Ausgewählte Zeilen um eine Zeile nach unten + + + + Convert selection to lower case + Auswahl in Kleinbuchstaben umwandeln + + + + Convert selection to upper case + Auswahl in Großbuchstaben umwandeln + + + + Insert newline + Neue Zeile einfügen + + + + De-indent one level + Eine Ebene ausrücken + + + + Undo last command + Letzten Befehl rückgängig machen + + + + Zoom in + Vergrößern + + + + Zoom out + Verkleinern + + + + Move up one paragraph + Einen Absatz nach oben + + + + Move down one paragraph + Einen Absatz nach unten + + + + Extend selection up one paragraph + Auswahl um einen Absatz nach oben erweitern + + + + Extend selection down one paragraph + Auswahl um einen Absatz nach unten erweitern + + + + Copy current line + Aktuelle Zeile kopieren + + + + Extend rectangular selection down one line + Rechteckige Auswahl um eine Zeile nach unten erweitern + + + + Extend rectangular selection up one line + Rechteckige Auswahl um eine Zeile nach oben erweitern + + + + Extend rectangular selection left one character + Rechteckige Auswahl um ein Zeichen nach links erweitern + + + + Extend rectangular selection right one character + Rechteckige Auswahl um ein Zeichen nach rechts erweitern + + + + Extend rectangular selection up one page + Rechteckige Auswahl um eine Seite nach oben erweitern + + + + Extend rectangular selection down one page + Rechteckige Auswahl um eine Seite nach unten erweitern + + + + Formfeed + Seitenumbruch + + + + Duplicate selection + Auswahl duplizieren + + + + QsciLexerAVS + + + Default + Standard + + + + Block comment + Blockkommentar + + + + Nested block comment + Verschachtelter Blockkommentar + + + + Line comment + Zeilenkommentar + + + + Number + Zahl + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Triple double-quoted string + Zeichenkette in dreifachen Anführungszeichen + + + + Keyword + Schlüsselwort + + + + Filter + Filter + + + + Plugin + Plugin + + + + Function + Funktion + + + + Clip property + Clip Eigenschaft + + + + User defined + Nutzer definiert + + + + QsciLexerAsm + + + Default + Standard + + + + Comment + Kommentar + + + + Number + Zahl + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + CPU instruction + CPU Instruktion + + + + FPU instruction + FPU Instruktion + + + + Register + Register + + + + Directive + Direktive + + + + Directive operand + Richtlinienoperand + + + + Block comment + Blockkommentar + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Unclosed string + Unbeendete Zeichenkette + + + + Extended instruction + Erweitere Instruktion + + + + Comment directive + Richtlinienkommentar + + + + QsciLexerBash + + + Default + Standard + + + + Error + Fehler + + + + Comment + Kommentar + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Scalar + Skalar + + + + Parameter expansion + Parametererweiterung + + + + Backticks + Backticks + + + + Here document delimiter + Here Dokument-Begrenzer + + + + Single-quoted here document + Here Dokument in Hochkommata + + + + QsciLexerBatch + + + Default + Standard + + + + Comment + Kommentar + + + + Keyword + Schlüsselwort + + + + Label + Marke + + + + Variable + Variable + + + + Operator + Operator + + + + Hide command character + "Befehl verbergen" Zeichen + + + + External command + Externer Befehl + + + + QsciLexerCMake + + + Default + Standard + + + + Comment + Kommentar + + + + String + Zeichenkette + + + + Left quoted string + Links quotierte Zeichenkette + + + + Right quoted string + Rechts quotierte Zeichenkette + + + + Function + Funktion + + + + Variable + Variable + + + + Label + Marke + + + + User defined + Nutzer definiert + + + + WHILE block + WHILE Block + + + + FOREACH block + FOREACH Block + + + + IF block + IF Block + + + + MACRO block + MACRO Block + + + + Variable within a string + Variable in einer Zeichenkette + + + + Number + Zahl + + + + QsciLexerCPP + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + IDL UUID + IDL UUID + + + + Pre-processor block + Präprozessorblock + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Unclosed string + Unbeendete Zeichenkette + + + + Default + Standard + + + + Inactive default + Inaktiver Standard + + + + C comment + C Kommentar + + + + Inactive C comment + Inaktiver C Kommentar + + + + C++ comment + C++ Kommentar + + + + Inactive C++ comment + Inaktiver C++ Kommentar + + + + JavaDoc style C comment + JavaDoc C Kommentar + + + + Inactive JavaDoc style C comment + Inaktiver JavaDoc C Kommentar + + + + Inactive number + Inaktive Zahl + + + + Inactive keyword + Inaktives Schlüsselwort + + + + Inactive double-quoted string + Inaktive Zeichenkette in Anführungszeichen + + + + Inactive single-quoted string + Inaktive Zeichenkette in Hochkommata + + + + Inactive IDL UUID + Inaktive IDL UUID + + + + Inactive pre-processor block + Inaktiver Präprozessorblock + + + + Inactive operator + Inaktiver Operator + + + + Inactive identifier + Inaktiver Bezeichner + + + + Inactive unclosed string + Inaktive unbeendete Zeichenkette + + + + C# verbatim string + Uninterpretierte C# Zeichenkette + + + + Inactive C# verbatim string + Inaktive, Uninterpretierte C# Zeichenkette + + + + JavaScript regular expression + JavaScript Regulärer Ausdruck + + + + Inactive JavaScript regular expression + JavaScript Inaktiver Regulärer Ausdruck + + + + JavaDoc style C++ comment + JavaDoc C++ Kommentar + + + + Inactive JavaDoc style C++ comment + Inaktiver JavaDoc C++ Kommentar + + + + Inactive secondary keywords and identifiers + Inaktive sekundäre Schlusselwörter und Bezeichner + + + + JavaDoc keyword + JavaDoc Schlüsselwort + + + + Inactive JavaDoc keyword + Inaktives JavaDoc Schlüsselwort + + + + JavaDoc keyword error + JavaDoc Schlüsselwortfehler + + + + Inactive global classes and typedefs + Inaktive globale Klassen und Typdefinitionen + + + + C++ raw string + Rohe C++ Zeichenkette + + + + Inactive C++ raw string + Inaktive rohe C++ Zeichenkette + + + + Vala triple-quoted verbatim string + Vala Zeichenkette in dreifachen Hochkommata + + + + Inactive Vala triple-quoted verbatim string + Inaktive Vala Zeichenkette in dreifachen Hochkommata + + + + Pike hash-quoted string + Pike Zeichenkette in '#-Anführungszeichen' + + + + Inactive Pike hash-quoted string + Inaktive Pike Zeichenkette in '#-Anführungszeichen' + + + + Pre-processor C comment + C Präprozessorkommentar + + + + Inactive pre-processor C comment + Inaktiver C Präprozessorkommentar + + + + JavaDoc style pre-processor comment + JavaDoc Präprozessorkommentar + + + + Inactive JavaDoc style pre-processor comment + Inaktiver JavaDoc Präprozessorkommentar + + + + User-defined literal + Nutzer definiertes Literal + + + + Inactive user-defined literal + Inaktives Nutzer definiertes Literal + + + + Task marker + Aufgabenmarkierung + + + + Inactive task marker + Inaktive Aufgabenmarkierung + + + + Escape sequence + Escape-Sequenz + + + + Inactive escape sequence + Inaktive Escape-Sequenz + + + + Secondary keywords and identifiers + Sekundäre Schlusselwörter und Bezeichner + + + + Inactive JavaDoc keyword error + Inaktiver JavaDoc Schlüsselwortfehler + + + + Global classes and typedefs + Globale Klassen und Typdefinitionen + + + + QsciLexerCSS + + + Default + Standard + + + + Tag + Tag + + + + Class selector + Klassenselektor + + + + Pseudo-class + Pseudoklasse + + + + Unknown pseudo-class + Unbekannte Pseudoklasse + + + + Operator + Operator + + + + CSS1 property + CSS1 Eigenschaft + + + + Unknown property + Unbekannte Eigenschaft + + + + Value + Wert + + + + Comment + Kommentar + + + + ID selector + ID-Selektor + + + + Important + Wichtig + + + + @-rule + @-Regel + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + CSS2 property + CSS2 Eigenschaft + + + + Attribute + Attribut + + + + CSS3 property + CSS3 Eigenschaft + + + + Pseudo-element + Pseudoelement + + + + Extended CSS property + Erweiterte CSS Eigenschaft + + + + Extended pseudo-class + Erweiterte Pseudoklasse + + + + Extended pseudo-element + Erweitertes Pseudoelement + + + + Media rule + Medienregel + + + + Variable + Variable + + + + QsciLexerCSharp + + + Verbatim string + Uninterpretierte Zeichenkette + + + + QsciLexerCoffeeScript + + + Default + Standard + + + + C-style comment + C Kommentar + + + + C++-style comment + C++ Kommentar + + + + JavaDoc C-style comment + JavaDoc C Kommentar + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + IDL UUID + IDL UUID + + + + Pre-processor block + Präprozessorblock + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Unclosed string + Unbeendete Zeichenkette + + + + C# verbatim string + Uninterpretierte C# Zeichenkette + + + + Regular expression + Regulärer Ausdruck + + + + JavaDoc C++-style comment + JavaDoc C++ Kommentar + + + + Secondary keywords and identifiers + Sekundäre Schlusselwörter und Bezeichner + + + + JavaDoc keyword + JavaDoc Schlüsselwort + + + + JavaDoc keyword error + JavaDoc Schlüsselwortfehler + + + + Global classes + Globale Klassen + + + + Block comment + Blockkommentar + + + + Block regular expression + Regulärer Ausdrucksblock + + + + Block regular expression comment + Regulärer Ausdrucksblockkommentar + + + + Instance property + Instanz-Eigenschaft + + + + QsciLexerD + + + Default + Standard + + + + Block comment + Blockkommentar + + + + Line comment + Zeilenkommentar + + + + DDoc style block comment + DDoc Blockkommentar + + + + Nesting comment + schachtelbarer Kommentar + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Secondary keyword + Sekundäres Schlüsselwort + + + + Documentation keyword + Dokumentationsschlüsselwort + + + + Type definition + Typdefinition + + + + String + Zeichenkette + + + + Unclosed string + Unbeendete Zeichenkette + + + + Character + Zeichen + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + DDoc style line comment + DDoc Zeilenkommentar + + + + DDoc keyword + DDoc Schlüsselwort + + + + DDoc keyword error + DDoc Schlüsselwortfehler + + + + Backquoted string + Zeichenkette in Rückwärtsstrichen + + + + Raw string + Rohe Zeichenkette + + + + User defined 1 + Nutzer definiert 1 + + + + User defined 2 + Nutzer definiert 2 + + + + User defined 3 + Nutzer definiert 3 + + + + QsciLexerDiff + + + Default + Standard + + + + Comment + Kommentar + + + + Command + Befehl + + + + Header + Kopfzeilen + + + + Position + Position + + + + Removed line + Entfernte Zeile + + + + Added line + Hinzugefügte Zeile + + + + Changed line + Geänderte Zeile + + + + Added adding patch + Hinzugefügter Ergänzungspatch + + + + Removed adding patch + Entfernter Ergänzungspatch + + + + Added removing patch + Hinzugefügter Entfernungspatch + + + + Removed removing patch + Entfernter Entfernungspatch + + + + QsciLexerEDIFACT + + + Default + Standard + + + + Segment start + Segmentstart + + + + Segment end + Segmentende + + + + Element separator + Elementtrenner + + + + Composite separator + Zusammengesetzter Trenner + + + + Release separator + Freigabetrenner + + + + UNA segment header + UNA Segmentkopf + + + + UNH segment header + UNH Segmentkopf + + + + Badly formed segment + Schlecht geformtes Segment + + + + QsciLexerFortran77 + + + Default + Standard + + + + Comment + Kommentar + + + + Number + Zahl + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Unclosed string + Unbeendete Zeichenkette + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Keyword + Schlüsselwort + + + + Intrinsic function + Intrinsic-Funktion + + + + Extended function + Erweiterte Funktion + + + + Pre-processor block + Präprozessorblock + + + + Dotted operator + Dotted Operator + + + + Label + Marke + + + + Continuation + Fortsetzung + + + + QsciLexerHTML + + + HTML default + HTML Standard + + + + Tag + Tag + + + + Unknown tag + Unbekanntes Tag + + + + Attribute + Attribut + + + + Unknown attribute + Unbekanntes Attribut + + + + HTML number + HTML Zahl + + + + HTML double-quoted string + HTML Zeichenkette in Anführungszeichen + + + + HTML single-quoted string + HTML Zeichenkette in Hochkommata + + + + Other text in a tag + Anderer Text in einem Tag + + + + HTML comment + HTML Kommentar + + + + Entity + Entität + + + + End of a tag + Tagende + + + + Start of an XML fragment + Beginn eines XML Fragmentes + + + + End of an XML fragment + Ende eines XML Fragmentes + + + + Script tag + Skript Tag + + + + Start of an ASP fragment with @ + Beginn eines ASP Fragmentes mit @ + + + + Start of an ASP fragment + Beginn eines ASP Fragmentes + + + + CDATA + CDATA + + + + Start of a PHP fragment + Beginn eines PHP Fragmentes + + + + Unquoted HTML value + HTML Wert ohne Anführungszeichen + + + + ASP X-Code comment + ASP X-Code Kommentar + + + + SGML default + SGML Standard + + + + SGML command + SGML Befehl + + + + First parameter of an SGML command + Erster Parameter eines SGML Befehls + + + + SGML double-quoted string + SGML Zeichenkette in Anführungszeichen + + + + SGML single-quoted string + SGML Zeichenkette in Hochkommata + + + + SGML error + SGML Fehler + + + + SGML special entity + SGML Spezielle Entität + + + + SGML comment + SGML Kommentar + + + + First parameter comment of an SGML command + Kommentar des ersten Parameters eines SGML Befehls + + + + SGML block default + SGML Standardblock + + + + Start of a JavaScript fragment + Beginn eines JavaScript Fragmentes + + + + JavaScript default + JavaScript Standard + + + + JavaScript comment + JavaScript Kommentar + + + + JavaScript line comment + JavaScript Zeilenkommentar + + + + JavaDoc style JavaScript comment + JavaDoc JavaScript Kommentar + + + + JavaScript number + JavaScript Zahl + + + + JavaScript word + JavaScript Wort + + + + JavaScript keyword + JavaScript Schlüsselwort + + + + JavaScript double-quoted string + JavaScript Zeichenkette in Anführungszeichen + + + + JavaScript single-quoted string + JavaScript Zeichenkette in Hochkommata + + + + JavaScript symbol + JavaScript Symbol + + + + JavaScript unclosed string + JavaScript Unbeendete Zeichenkette + + + + JavaScript regular expression + JavaScript Regulärer Ausdruck + + + + Start of an ASP JavaScript fragment + Beginn eines ASP JavaScript Fragmentes + + + + ASP JavaScript default + ASP JavaScript Standard + + + + ASP JavaScript comment + ASP JavaScript Kommentar + + + + ASP JavaScript line comment + ASP JavaScript Zeilenkommentar + + + + JavaDoc style ASP JavaScript comment + JavaDoc ASP JavaScript Kommentar + + + + ASP JavaScript number + ASP JavaScript Zahl + + + + ASP JavaScript word + ASP JavaScript Wort + + + + ASP JavaScript keyword + ASP JavaScript Schlüsselwort + + + + ASP JavaScript double-quoted string + ASP JavaScript Zeichenkette in Anführungszeichen + + + + ASP JavaScript single-quoted string + ASP JavaScript Zeichenkette in Hochkommata + + + + ASP JavaScript symbol + ASP JavaScript Symbol + + + + ASP JavaScript unclosed string + ASP JavaScript Unbeendete Zeichenkette + + + + ASP JavaScript regular expression + ASP JavaScript Regulärer Ausdruck + + + + Start of a VBScript fragment + Beginn eines VBScript Fragmentes + + + + VBScript default + VBScript Standard + + + + VBScript comment + VBScript Kommentar + + + + VBScript number + VBScript Zahl + + + + VBScript keyword + VBScript Schlüsselwort + + + + VBScript string + VBScript Zeichenkette + + + + VBScript identifier + VBScript Bezeichner + + + + VBScript unclosed string + VBScript Unbeendete Zeichenkette + + + + Start of an ASP VBScript fragment + Beginn eines ASP VBScript Fragmentes + + + + ASP VBScript default + ASP VBScript Standard + + + + ASP VBScript comment + ASP VBScript Kommentar + + + + ASP VBScript number + ASP VBScript Zahl + + + + ASP VBScript keyword + ASP VBScript Schlüsselwort + + + + ASP VBScript string + ASP VBScript Zeichenkette + + + + ASP VBScript identifier + ASP VBScript Bezeichner + + + + ASP VBScript unclosed string + ASP VBScript Unbeendete Zeichenkette + + + + Start of a Python fragment + Beginn eines Python Fragmentes + + + + Python default + Python Standard + + + + Python comment + Python Kommentar + + + + Python number + Python Zahl + + + + Python double-quoted string + Python Zeichenkette in Anführungszeichen + + + + Python single-quoted string + Python Zeichenkette in Hochkommata + + + + Python keyword + Python Schlüsselwort + + + + Python triple double-quoted string + Python Zeichenkette in dreifachen Anführungszeichen + + + + Python triple single-quoted string + Python Zeichenkette in dreifachen Hochkommata + + + + Python class name + Python Klassenname + + + + Python function or method name + Python Funktions- oder Methodenname + + + + Python operator + Python Operator + + + + Python identifier + Python Bezeichner + + + + Start of an ASP Python fragment + Beginn eines ASP Python Fragmentes + + + + ASP Python default + ASP Python Standard + + + + ASP Python comment + ASP Python Kommentar + + + + ASP Python number + ASP Python Zahl + + + + ASP Python double-quoted string + ASP Python Zeichenkette in Anführungszeichen + + + + ASP Python single-quoted string + ASP Python Zeichenkette in Hochkommata + + + + ASP Python keyword + ASP Python Schlüsselwort + + + + ASP Python triple double-quoted string + ASP Python Zeichenkette in dreifachen Anführungszeichen + + + + ASP Python triple single-quoted string + ASP Python Zeichenkette in dreifachen Hochkommata + + + + ASP Python class name + ASP Python Klassenname + + + + ASP Python function or method name + ASP Python Funktions- oder Methodenname + + + + ASP Python operator + ASP Python Operator + + + + ASP Python identifier + ASP Python Bezeichner + + + + PHP default + PHP Standard + + + + PHP double-quoted string + PHP Zeichenkette in Anführungszeichen + + + + PHP single-quoted string + PHP Zeichenkette in Hochkommata + + + + PHP keyword + PHP Schlüsselwort + + + + PHP number + PHP Zahl + + + + PHP comment + PHP Kommentar + + + + PHP line comment + PHP Zeilenkommentar + + + + PHP double-quoted variable + PHP Variable in Anführungszeichen + + + + PHP operator + PHP Operator + + + + PHP variable + PHP Variable + + + + QsciLexerHex + + + Default + Standard + + + + Record start + Datensatzanfang + + + + Record type + Datensatzende + + + + Unknown record type + Unbekanter Datensatztyp + + + + Byte count + Anzahl Bytes + + + + Incorrect byte count + Anzahl inkorrekter Bytes + + + + No address + keine Adresse + + + + Data address + Datenadresse + + + + Record count + Anzahl Datensätze + + + + Start address + Startadresse + + + + Extended address + Erweiterte Adresse + + + + Odd data + Ungerade Daten + + + + Even data + Gerade Daten + + + + Unknown data + Unbekannte Daten + + + + Checksum + Checksumme + + + + Incorrect checksum + Inkorrekte Checksumme + + + + Trailing garbage after a record + Müll nach einem Datensatz + + + + QsciLexerIDL + + + UUID + UUID + + + + QsciLexerJSON + + + Default + Standard + + + + Number + Zahl + + + + String + Zeichenkette + + + + Unclosed string + Unbeendete Zeichenkette + + + + Property + Eigenschaft + + + + Escape sequence + Escape-Sequenz + + + + Line comment + Zeilenkommentar + + + + Block comment + Blockkommentar + + + + Operator + Operator + + + + IRI + IRI + + + + JSON-LD compact IRI + JSON-LD kompaktes IRI + + + + JSON keyword + JSON Schlüsselwort + + + + JSON-LD keyword + JSON-LD Schlüsselwort + + + + Parsing error + Analysefehler + + + + QsciLexerJavaScript + + + Regular expression + Regulärer Ausdruck + + + + QsciLexerLua + + + Default + Standard + + + + Comment + Kommentar + + + + Line comment + Zeilenkommentar + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + String + Zeichenkette + + + + Character + Zeichen + + + + Literal string + Uninterpretierte Zeichenkette + + + + Preprocessor + Präprozessor + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Unclosed string + Unbeendete Zeichenkette + + + + Basic functions + Basisfunktionen + + + + String, table and maths functions + Zeichenketten-, Tabelle- und mathematische Funktionen + + + + Coroutines, i/o and system facilities + Koroutinen, I/O- und Systemfunktionen + + + + User defined 1 + Nutzer definiert 1 + + + + User defined 2 + Nutzer definiert 2 + + + + User defined 3 + Nutzer definiert 3 + + + + User defined 4 + Nutzer definiert 4 + + + + Label + Marke + + + + QsciLexerMakefile + + + Default + Standard + + + + Comment + Kommentar + + + + Preprocessor + Präprozessor + + + + Variable + Variable + + + + Operator + Operator + + + + Target + Ziel + + + + Error + Fehler + + + + QsciLexerMarkdown + + + Default + Standard + + + + Special + Spezial + + + + Strong emphasis using double asterisks + Fettschrift mit doppelten Sternen + + + + Strong emphasis using double underscores + Fettschrift mit doppelten Unterstrichen + + + + Emphasis using single asterisks + Kursive Schrift mit einfachen Sternen + + + + Emphasis using single underscores + Kursive Schrift mit einfachen Unterstrichen + + + + Level 1 header + Überschrift Ebene 1 + + + + Level 2 header + Überschrift Ebene 2 + + + + Level 3 header + Überschrift Ebene 3 + + + + Level 4 header + Überschrift Ebene 4 + + + + Level 5 header + Überschrift Ebene 5 + + + + Level 6 header + Überschrift Ebene 6 + + + + Pre-char + Einleitungszeichen + + + + Unordered list item + Nicht nummeriertes Listenelement + + + + Ordered list item + Nummeriertes Listenelement + + + + Block quote + Blockzitat + + + + Strike out + Durchgestrichen + + + + Horizontal rule + Horizontale Linie + + + + Link + Hyperlink + + + + Code between backticks + Code zwischen Backticks + + + + Code between double backticks + Code zwischen doppelten Backticks + + + + Code block + Codeblock + + + + QsciLexerMatlab + + + Default + Standard + + + + Comment + Kommentar + + + + Command + Befehl + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + QsciLexerPO + + + Default + Standard + + + + Comment + Kommentar + + + + Message identifier + Meldungsbezeichner + + + + Message identifier text + Meldungsbezeichnertext + + + + Message string + Meldungszeichenkette + + + + Message string text + Meldungszeichenkettentext + + + + Message context + Meldungskontext + + + + Message context text + Meldungskontexttext + + + + Fuzzy flag + Unschrfmarkierung + + + + Programmer comment + Programmiererkommentar + + + + Reference + Referenz + + + + Flags + Markierung + + + + Message identifier text end-of-line + Meldungsbezeichnertext Zeilenende + + + + Message string text end-of-line + Meldungszeichenkettentext Zeilenende + + + + Message context text end-of-line + Meldungskontexttext Zeilenende + + + + QsciLexerPOV + + + Default + Standard + + + + Comment + Kommentar + + + + Comment line + Kommentarzeile + + + + Number + Zahl + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + String + Zeichenkette + + + + Unclosed string + Unbeendete Zeichenkette + + + + Directive + Direktive + + + + Bad directive + Ungültige Direktive + + + + Objects, CSG and appearance + Objekte, CSG und Erscheinung + + + + Types, modifiers and items + Typen, Modifizierer und Items + + + + Predefined identifiers + Vordefinierter Bezeichner + + + + Predefined functions + Vordefinierte Funktion + + + + User defined 1 + Nutzer definiert 1 + + + + User defined 2 + Nutzer definiert 2 + + + + User defined 3 + Nutzer definiert 3 + + + + QsciLexerPascal + + + Default + Standard + + + + Line comment + Zeilenkommentar + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + '{ ... }' style comment + '{ ... }' Kommentar + + + + '(* ... *)' style comment + '(* ... *)' Kommentar + + + + '{$ ... }' style pre-processor block + '{$ ... }' Präprozessorblock + + + + '(*$ ... *)' style pre-processor block + '(*$ ... *)' Präprozessorblock + + + + Hexadecimal number + Hexadezimale Zahl + + + + Unclosed string + Unbeendete Zeichenkette + + + + Character + Zeichen + + + + Inline asm + Inline Assembler + + + + QsciLexerPerl + + + Default + Standard + + + + Error + Fehler + + + + Comment + Kommentar + + + + POD + POD + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Scalar + Skalar + + + + Array + Feld + + + + Hash + Hash + + + + Symbol table + Symboltabelle + + + + Regular expression + Regulärer Ausdruck + + + + Substitution + Ersetzung + + + + Backticks + Backticks + + + + Data section + Datensektion + + + + Here document delimiter + Here Dokument-Begrenzer + + + + Single-quoted here document + Here Dokument in Hochkommata + + + + Double-quoted here document + Here Dokument in Anführungszeichen + + + + Backtick here document + Here Dokument in Backticks + + + + Quoted string (q) + Zeichenkette (q) + + + + Quoted string (qq) + Zeichenkette (qq) + + + + Quoted string (qx) + Zeichenkette (qx) + + + + Quoted string (qr) + Zeichenkette (qr) + + + + Quoted string (qw) + Zeichenkette (qw) + + + + POD verbatim + POD wörtlich + + + + Subroutine prototype + Subroutinen Prototyp + + + + Format identifier + Formatidentifikator + + + + Format body + Formatzweig + + + + Double-quoted string (interpolated variable) + Zeichenkette in Anführungszeichen (interpolierte Variable) + + + + Translation + Übersetzung + + + + Regular expression (interpolated variable) + Regulärer Ausdruck (interpolierte Variable) + + + + Substitution (interpolated variable) + Ersetzung (interpolierte Variable) + + + + Backticks (interpolated variable) + Backticks (interpolierte Variable) + + + + Double-quoted here document (interpolated variable) + Here Dokument in Anführungszeichen (interpolierte Variable) + + + + Backtick here document (interpolated variable) + Here Dokument in Backticks (interpolierte Variable) + + + + Quoted string (qq, interpolated variable) + Zeichenkette (qq, interpolierte Variable) + + + + Quoted string (qx, interpolated variable) + Zeichenkette (qx, interpolierte Variable) + + + + Quoted string (qr, interpolated variable) + Zeichenkette (qr, interpolierte Variable) + + + + QsciLexerPostScript + + + Default + Standard + + + + Comment + Kommentar + + + + DSC comment + DSC Kommentar + + + + DSC comment value + DSC Kommentarwert + + + + Number + Zahl + + + + Name + Name + + + + Keyword + Schlüsselwort + + + + Literal + Literal + + + + Immediately evaluated literal + Direkt ausgeführtes Literal + + + + Array parenthesis + Feldklammern + + + + Dictionary parenthesis + Dictionary-Klammern + + + + Procedure parenthesis + Prozedurklammern + + + + Text + Text + + + + Hexadecimal string + Hexadezimale Zeichenkette + + + + Base85 string + Base85 Zeichenkette + + + + Bad string character + Ungültiges Zeichen für Zeichenkette + + + + QsciLexerProperties + + + Default + Standard + + + + Comment + Kommentar + + + + Section + Abschnitt + + + + Assignment + Zuweisung + + + + Default value + Standardwert + + + + Key + Schlüssel + + + + QsciLexerPython + + + Comment + Kommentar + + + + Number + Zahl + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Keyword + Schlüsselwort + + + + Triple single-quoted string + Zeichenkette in dreifachen Hochkommata + + + + Triple double-quoted string + Zeichenkette in dreifachen Anführungszeichen + + + + Class name + Klassenname + + + + Function or method name + Funktions- oder Methodenname + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Comment block + Kommentarblock + + + + Unclosed string + Unbeendete Zeichenkette + + + + Double-quoted f-string + F-Zeichenkette in Anführungszeichen + + + + Single-quoted f-string + F-Zeichenkette in Hochkommata + + + + Triple single-quoted f-string + F-Zeichenkette in dreifachen Hochkommata + + + + Triple double-quoted f-string + F-Zeichenkette in dreifachen Anführungszeichen + + + + Default + Standard + + + + Highlighted identifier + Hervorgehobener Bezeichner + + + + Decorator + Dekorator + + + + QsciLexerRuby + + + Default + Standard + + + + Comment + Kommentar + + + + Number + Zahl + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Keyword + Schlüsselwort + + + + Class name + Klassenname + + + + Function or method name + Funktions- oder Methodenname + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Error + Fehler + + + + POD + POD + + + + Regular expression + Regulärer Ausdruck + + + + Global + Global + + + + Symbol + Symbol + + + + Module name + Modulname + + + + Instance variable + Instanzvariable + + + + Class variable + Klassenvariable + + + + Backticks + Backticks + + + + Data section + Datensektion + + + + Here document delimiter + Here Dokument-Begrenzer + + + + Here document + Here Dokument + + + + %q string + %q Zeichenkette + + + + %Q string + %Q Zeichenkette + + + + %x string + %x Zeichenkette + + + + %r string + %r Zeichenkette + + + + %w string + %w Zeichenkette + + + + Demoted keyword + zurückgestuftes Schlüsselwort + + + + stdin + Stdin + + + + stdout + Stdout + + + + stderr + Stderr + + + + QsciLexerSQL + + + Default + Standard + + + + Comment + Kommentar + + + + Number + Zahl + + + + Keyword + Schlüsselwort + + + + Single-quoted string + Zeichenkette in Hochkommata + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Comment line + Kommentarzeile + + + + JavaDoc style comment + JavaDoc Kommentar + + + + Double-quoted string + Zeichenkette in Anführungszeichen + + + + SQL*Plus keyword + SQL*Plus Schlüsselwort + + + + SQL*Plus prompt + SQL*Plus Eingabe + + + + SQL*Plus comment + SQL*Plus Kommentar + + + + # comment line + # Kommentarzeile + + + + JavaDoc keyword + JavaDoc Schlüsselwort + + + + JavaDoc keyword error + JavaDoc Schlüsselwortfehler + + + + User defined 1 + Nutzer definiert 1 + + + + User defined 2 + Nutzer definiert 2 + + + + User defined 3 + Nutzer definiert 3 + + + + User defined 4 + Nutzer definiert 4 + + + + Quoted identifier + Bezeichner in Anführungszeichen + + + + Quoted operator + Operator in Anführungszeichen + + + + QsciLexerSpice + + + Default + Standard + + + + Identifier + Bezeichner + + + + Command + Befehl + + + + Function + Funktion + + + + Parameter + Parameter + + + + Number + Zahl + + + + Delimiter + Delimiter + + + + Value + Wert + + + + Comment + Kommentar + + + + QsciLexerTCL + + + Default + Standard + + + + Comment + Kommentar + + + + Comment line + Kommentarzeile + + + + Number + Zahl + + + + Quoted keyword + angeführtes Schlüsselwort + + + + Quoted string + Zeichenkette + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Substitution + Ersetzung + + + + Brace substitution + Klammerersetzung + + + + Modifier + Modifizierer + + + + Expand keyword + Erweiterungsschlüsselwort + + + + TCL keyword + TCL Schlüsselwort + + + + Tk keyword + Tk Schlüsselwort + + + + iTCL keyword + iTCL Schlüsselwort + + + + Tk command + Tk Befehl + + + + User defined 1 + Nutzer definiert 1 + + + + User defined 2 + Nutzer definiert 2 + + + + User defined 3 + Nutzer definiert 3 + + + + User defined 4 + Nutzer definiert 4 + + + + Comment box + Kommentarbox + + + + Comment block + Kommentarblock + + + + QsciLexerTeX + + + Default + Standard + + + + Special + Spezial + + + + Group + Gruppe + + + + Symbol + Symbol + + + + Command + Befehl + + + + Text + Text + + + + QsciLexerVHDL + + + Default + Standard + + + + Comment + Kommentar + + + + Comment line + Kommentarzeile + + + + Number + Zahl + + + + String + Zeichenkette + + + + Operator + Operator + + + + Identifier + Bezeichner + + + + Unclosed string + Unbeendete Zeichenkette + + + + Keyword + Schlüsselwort + + + + Standard operator + Standardoperator + + + + Attribute + Attribut + + + + Standard function + Standardfunktion + + + + Standard package + Standardpaket + + + + Standard type + Standardtyp + + + + User defined + Nutzer definiert + + + + Comment block + Kommentarblock + + + + QsciLexerVerilog + + + Default + Standard + + + + Inactive default + Inaktiver Standard + + + + Comment + Kommentar + + + + Inactive comment + Inaktiver Kommentar + + + + Line comment + Zeilenkommentar + + + + Inactive line comment + Inaktiver Zeilenkommentar + + + + Bang comment + Bang Kommentar + + + + Inactive bang comment + Inaktiver Bang Kommentar + + + + Number + Zahl + + + + Inactive number + Inaktive Zahl + + + + Primary keywords and identifiers + Primäre Schlusselwörter und Bezeichner + + + + Inactive primary keywords and identifiers + Inaktive primäre Schlusselwörter und Bezeichner + + + + String + Zeichenkette + + + + Inactive string + Inaktive Zeichenkette + + + + Secondary keywords and identifiers + Sekundäre Schlusselwörter und Bezeichner + + + + Inactive secondary keywords and identifiers + Inaktive sekundäre Schlusselwörter und Bezeichner + + + + System task + Systemtask + + + + Inactive system task + Inaktiver Systemtask + + + + Preprocessor block + Präprozessorblock + + + + Inactive preprocessor block + Inaktiver Präprozessorblock + + + + Operator + Operator + + + + Inactive operator + Inaktiver Operator + + + + Identifier + Bezeichner + + + + Inactive identifier + Inaktiver Bezeichner + + + + Unclosed string + Unbeendete Zeichenkette + + + + Inactive unclosed string + Inaktive unbeendete Zeichenkette + + + + User defined tasks and identifiers + Nutzerdefinierte Tasks und Bezeichner + + + + Inactive user defined tasks and identifiers + Inaktive nutzerdefinierte Tasks und Bezeichner + + + + Keyword comment + Schlüsselwortkommentar + + + + Inactive keyword comment + Inaktiver Schlüsselwortkommentar + + + + Input port declaration + Eingabeportdefinition + + + + Inactive input port declaration + Inaktive Eingabeportdefinition + + + + Output port declaration + Ausgabeportdefinition + + + + Inactive output port declaration + Inaktive Ausgabeportdefinition + + + + Input/output port declaration + Ein-/Ausgabeportdefinition + + + + Inactive input/output port declaration + Inaktive Ein-/Ausgabeportdefinition + + + + Port connection + Portverbindung + + + + Inactive port connection + Inaktive Portverbindung + + + + QsciLexerYAML + + + Default + Standard + + + + Comment + Kommentar + + + + Identifier + Bezeichner + + + + Keyword + Schlüsselwort + + + + Number + Zahl + + + + Reference + Referenz + + + + Document delimiter + Dokumentbegrenzer + + + + Text block marker + Textblock Markierung + + + + Syntax error marker + Syntaxfehler Markierung + + + + Operator + Operator + + + + QsciScintilla + + + &Undo + &Rückgängig + + + + &Redo + Wieder&herstellen + + + + Cu&t + &Ausschneiden + + + + &Copy + &Kopieren + + + + &Paste + Ein&fügen + + + + Delete + Löschen + + + + Select All + Alle auswählen + + + diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.qm b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.qm new file mode 100644 index 0000000000000000000000000000000000000000..f626149335c57c82e5e7f13e61c949ec4303789d GIT binary patch literal 81850 zcmd5l33yaR(mhEgnaoTkkOYE&FoZw=0TH62B0>_5C`Tj#SyXhAOp<{~Cd^E@ybpA} zS=V#D*K57j3;fkxUGMAn26T0GJ@Ht@UBz41{j0j>^}G7Lc`tjw=&P@t61JAmofJC@yt8vFvcFahI!}i%h+enGw&^1 z8T;dE=Dq!E#y-EBLr-WPE3B_%tl=>ZJ!QXRC2uz|_UNBj)oE$Qo}10a9{B`gx9`iw z-L#H*Mm@pyI_FNHGlA{(1j1H!K&XJRi=SsTop%5)53@OEoWj@zo7mjT&SLDfSJ}MF zn;Dz-4Z#QAB>2|l1iw3%&9C}^v8Qfe3odztd5Z32i`M>`v6){GtbL2%N#_&XJeVyx z`$oq0p2m(kZ8Kxh(>e6yAHbITf!~|1VJ-JP#ysplEb-tb;A03&z56j^Hy+E@-}(z< zKXHUht=E@a0~&tq)cSW56eA9LvGH9(0k9QA99|lhV_5=kerwOo0+Hoi#b~kfbWYw$=T8ke1xve*>W4;9rj+% zwu45&-yfgzWh>}o;}Q-%<>%z)&B$RMZ(gqdnekv3F31h#_W++q=Js0%?ak>#5G&P+G~@dC}Yr ze+2!y^1R$%Kl}}2+uzDP_w-GSRXmn^!Tg7rCx2z`MIZj1v9>F6Z`?5e^yaU*w;l)U zaCUp{1HZcg^#9S^KR*L_k~ii)n%E5M^o87)hTaJH-^ksze-mS`ZpeM-AMo9CcjUfz zK^bE$Z{>b@2=IB$rMWw&lrpyOySd*#3FFK=FE9U|Da;cdlvnWarHoy8TVCbaUdBc( z$g93`6wK$)yu-f)yn9CTj=XU@V+%r1=PH69Tto1uY2Ko1E@o`*KMCG>fVb!?80Tdlc|)t$GS=^O zZ~1;-F!s@O4n6+EyyY!v#?G4K4L5zr*eM@)E2ljHc0TSMcRu|5=@Y%X#7$(@Sjo>iC=czozyE50y*tn~_$w50AJ1R}E>lh9_;k&)5 zhkk+aJnUUvvj@ZpcX*FG5axN0Io^#!mov|vgT0rZdMaaw>`Cy$-+2FU9?au|mwRv9 zHwWx;fZ)N86RiJ&;EIU^Qv(Q|cs0RIza{v@UkJWXO>paKf`6Yw@XJvIf9NLo%TXM9 zyeAR#T}iO`ZGxpA6C8P;_qL6&&SsrRu;);M_Y5R>-*p6E8p)xjq@3W02JfBEoyt7E z_q=x)d{lcLqRPKH7z-q?6ecb!V!$ZOE9`AkmLs-`Z_j=#F8P?CI-+14@GtJmt z9o{d`-^$o;-}ioh+UbmWAI;z62Uvfjug$Mo^}me0@=pHPt}^iVZ{?4B;&H}a+>}4{ zg;yC{GA;j*-TVCN+SPp--T z?MtnU4gV_PqUGX{pr~JXEwro z9k_wu^pgqJj3&73Q-Up--|K9mKd0jaPtGNH_hAI@8$s~FVuDYeO7O+O1h;J=_)Z?d zFFzspEY5Ufn)zw*#j7~f&}uYNoL?8QIwx1I@do$*oryC1>$ zZaAZ$AO!Yf^YsP3H6X9%Q3b^}gWeV|D=7W~^u73tg7RA`U_L4f#_l(YG2crCV^7)) zu)JX0x?eFCi4;`-bOrd27Yp{i66C+)gM$5zhxpfXbiq`NTY~>6m{AP#JnFlG+S~4h zcz1fiF+J~tU7ugjJg9`Rqt_R-j)V2`-ktzsjJ+EI_$ zgBbhss)Ac@2Y>T(b-}Io!TS06@`BrLC}8aCqXDh~7zX${z~2G<7~ty#x7`Fk-}yno zAARui^z{XI&V%oM)mHG^r*ddd40)#~0fN_6N1s_*N{P3~}fI zz7-Fh%2@y5z7=l(-FX9iD?WjrANQ0mu@BH6v(0z>Ys+E%?Cm>wOF3ibkMo^&#aG~e zX82CKvIgRbpL}P20Q1$ok>I_D5!`aM@9cOJV|X}?-Z>WJ@QihgG`1{iz^?h6Z6Y~u5_`V$m z_|E;__rpyWF_!yB-!C)LjIBGSu<*of@aM&aqbF6tdi#>#R~Hse`5xp@{!ZZ`Qvlzs zRfRK-UkvMZec?=q+t}h94n2G9EUY{HO5o%1!nWr@pYDFMFmchfK>wz~3--=qp0Y`W z8-b1|r+?wqR|EY;mviVT`>ya0*MOd!e_i42-+c%BG+*JJp?hE-w145<%i+)0eo}bP z1LdF}6@{BT@Ox9I5}bAp!MSG;JobBnu}Xp`Y$NzYBf-C&M)05S6Z|fN@83HMAG{0V zhc9LpKD)FM_8+;0f7@{|_>)-S53j?YSGM_C48~phq~AM!7GvMs?9bnM1nf`B{K1#@ zWo&Sbzx1D5Ax^FF5Bf(nW4{~ZAAT_W{o)7x;VYXVo}CF0^y@Dh0A2|21AxD0?BQnt z!Z`m@1@Kk)^Gbh3`2fZOKl-aa20U|a^N;-;#=Gz&|G0Y^89V4Hf`45_@S8IKUJK#( zKKao<=@Y=eb*O*#udZgS=Td+Ds_BePf6(9f(PkLei3Gnn+Q01F6wLqI{$>Ax`I~aK ze|b6JUveXdo*{96>(o5P*8GFuL`I z@7+M~fh7bV-$L-I@dTgWi{KlF6a3_V2=16b@QddNe)9vte~;$SlXnKe{1*v^?ju+l zC0OyAzx5=PUzxxCib~kWz2)zC6y*EQX8+1-Ant$kL=HVg@Ay|mVLr}#$)6en^Z)U3 z|M7We!go9U7rqNWUw^Fs;_qSpFZq-I%FV5?j~U{>?#D&2KZ^Np`Fs?_!6p8?UaMj3 z?0o;9&rO5h`;p+Zc?4(NM6l*ff^+8*JoZ6?9d8p%#t5!mPH_D&f+rk6@Q)e1n-Y&_Wi$+9NU|A>EQDcG%HBm6s;!TK1sIgs-` z*q>*=4HO--iLtBx6$l*ydUpA;z~JA*pZ|A8pyGlJu#brcDlY~(zS111x*g;_X=Y%| zwWl-ohtYwlzXm*G-v}Hu`5D-^JRdk{`Tv02BY~L@gIy0#4$OM}3Gf#K0>@mt754el z0xe6ngB~vlwC(|M<9+`Mv@W;-_7Tei(K5hy`@aI+TWT4LT@qM*^ctA&B?Q~=44lyP zHSEV&;NN-t7RdKE!J@I}fW8-U=qd0M4DAdSzm^8SHY_-JHu$anRl%V}OPQzO*x>ZnfX{0$ z4<35^`CwnS60B|G(BqvQJnRh6^L38|kC?Xs;>P;m5#PQA`JrXOwimyGIN`kDig!K$ zznT|Jcpqcz;L!x%zLntjTY@+53I61Q?ZG?8m%;w}o8Y6xPcpV+bMToVD;aCr5Pat6 zQJ@DmaOkPLBlz-6;N!$kgD-ys^ZeWP;M<-#j2*f$`0)tvBjtMpzsv(XOFs{O{SxFg zDnAc?_s=K5pN$FrRP{RO-|fMlc7j|3mBC-u0-n>S7nKxEWbBRe34Xg@QRz(}r(2&Z zs=6QKx%V?g`}`L4>rbUc2UJgC?A}LM~hn`^-MQhT3X6%TPqEpY>3Vg3EI{hfHBX93f zv>^}V7J0Jh%u6>h&%ld{&OHS5;EaQdE_&ei;NNfH&{O_)(N*>B5Vt);Fp(nI^C`ho zh7i2xP=fz+GQpR25PaXvg}laq(45Ke{rX2ja|hMK{-h|h@DGKI{cT5R$yraszTk(@5u0G$Uv@$0=yO0W zXMYijUeW~lj-x{zYk>s)g%XaiIPdMyjmH!)mUuCA<6kxbUxlGN#;$?5 zxj3{b1o^K4M~3ddp&IseGeb|^R0i?=rqI(}d5o1E8+zuA8yIUZ4ZS=M#@qk7(3X`j zj+c_5caI0Y^S%vzwgTk2t~B&{3cfEL82Z)^`n}irp>OZm4spi7&@Yoi5Rd;t@X~XN z2hF$;@*Q^-6u% zZ(+W9Onvct_dEgnn~#gP9{}@x_lDvhZoe4p{*^H>#)s!Zf~p^@Wf9iJT3D3D;lGkT zOk3sS|7#;%EzvlLp9Kz2wZv)@ot=@cRu6tP1HMYYSF7QxBuldx{5#B297hyzwZKny z!rzAhW0-ZqpSswO@b@jOhf_%jD#L3NU8|$XbT}1_M_badL{~VS2*(p^qRDVeBo*xw z@)5Sq75Sd-Zaea$`RKc0R3I-HU!3iL@kRMqBQVA^j55OFVvPN36W!~=Ej`I(v@0Es z$GYUB3LDUx#3>MlI6@&Ysf>t8oE&FN_N(nlJLOTuYRzL2;^=A|Sm*HX zZq5)|(HQ(UvZm-Q>NCwq#zqL1_pxL-9BT`ACDP#tETD7*Y-6I$+G?Z?Ls6$+HygkZ zDhRTTzd^d+2CO1`>M|q6!J)Qi6o=%EL&V>Uux4C8Vi4iXAo!f3CPlkik=?H7+H`nL zBH1d{su}~&I@}pfQIzUfva2!@vsGo|+R08-CqOY|MV%Fb*6Lgd_N@m57l)ycDocE% zz*}0^(;bhsM8L|}o6T_&v|2+TvtNT%wka7B|a)46K#0)h=Be1sUT6Okxj2&J^*e(N4APh*SgInrP|iv<)|J z>XT8C=R-cxM3^1+YFIw#PMTp{7{}pwl=#Hm$meDod0Q-*N{3g+QnBW^W=g}cE-)O~ zq;Ym1N<$V0kYjZ>;{CFXSVRZe$Je)pQ9BN;X~Do6Lo+bz!mo|79Ys&Ky+Kb(=0yoo zaINTfn^umv&muD$ zt}G?xjw_TDhNJIsU5l_b9&Jl`6*D=~T2|e#k!w#zx;vziYKJR<5o=~6sAZ0n*E*gx zv+B^}9_yM_4Cjndu#=G6Jja4X%aGsQI!3NA$$%aMeWG@qYPKQpb0_@Th?EEMpaSy! zXsc_H%3Pp%_T|A!rAbMh1}I0l=F@)a<@^n|;m>m3-EAa#Gw*U{?SyGR>1`5W%A!5z zQ60rVJSPagaXsj)HWyQ6600VPi>12bk#*L)|1XB8i->dCj(IBA2HP1*Im$@v597Ta|X(rHt8e zv{KLS)1mj>esP-HL1*0~%6wV2Np`juluoZ$LStnkQTKk?d_-?1XcyRatd;vZ8kQp+ zT-FO6G!N09+T3YTi~PC_qn@O}A|GZ^@PAHr5?iPPVavS78c9SjozM8(Yaw`IC^$#>r9K z3vB{Kidzuz%}yjc+oDnV;Y|gr2N#Ms=qy%pYAZ1Ht9NoRJA-4y1)&}+n>W$Kbr(!p z6wZcqN+#%q>bp`{OwbiwV|lbOJ#*@e=Q0r?0;j%0f@ zQnHJ28+s`rTz2+s3^ht2Ys~6KX^i;+>r4ij0#zLL*$cfrl#5@MewSw_j55fckw{DC zBU|2~?>66)lsU7@GGv{{OM0=b%XSp4Ps36%S8tD`56U)5sDx5Xi=$KMCd)}P?^b2$ zMEg9#o(j9__Ai^=v(}m(+>}=su7ldWgnB680vt-CR z7i_&fun#%Rp1dEYp3QY1sFQ*==+$HaKo^vtN45*sQL^0l)bx7eV;CuFIa^-F(i>^1eBopztrkGQyE|C(RE0sMFwknIYXJClRfNH4hmRpCE1@&$M z<`UwfmI_aki9M`2M|YbP;h1bO%E~FnWLU(T3sABdkFP^`673s}@=jF{I^xt5h|rXtK5c^Ifv^U$sc^D=3e8|`xN zH}ZQTVUW309c8IjRKo?q7SXvV7>^kRSVzL<8(KftiX3vsyy}QfCv!c}+a}T^p`+l;B17QLe2mptV>}2REz) z-GNPs_I4<7jPYdW-XM@C9$LfB~IK3Tl0DU6JciZ3^ZjG&T6su*2lF3NC; z;GZBG5quOJ7G0+#G|d?3;+~ZbiFGTm1?S-9f!H*mo$V# z@*Cnk?X=3xpP&&&Dn`Xc{ld#zRHm+1V_YH`B^E@6G$mu*V1!#8Ycd%?x(0v}#@qv% zWL$!j1M30vgZT-5yG>9EE`~F$aBH*;=9wSKnFlp2Gr`Kbqx+H+0jD&z*o8HbmX#2( zuH+`VNLZShNUDRInlhQD2u=#{4sb@xBp3HWwn(5xW z{5wYuTK?%0E*ZSd%P)b6@%xrUlCcPcfvBFcPkW;?weuq@quiDCPG{8bhr%Ug5wF8k z&W0(+s^polYUYYT6wO|^Xx7ZyxfB`cN220#6p^YTP(Lg&Fj3ED3(~&&+4fZ3&9+Lk z&aqvf#4-Nc`a(;|JiIY#iu7fp9b_2od@k%oY@rx)VE)Y7MGNhRoz)G=NMlD6Sy*Vc zh3c4bant?__Oyb<(nZ+cz}bLtzo@0EmA^j6RDoWyt$6mrGeysqw~7 zxe3M%qmp_-`-#Jc?W7p&AjLw2*Tm8taDo=mY!zi38WrdWHWxN^^PpiSm>AyGCUC^u z`gybL6=)F53Z~*IJDdr}fz?`prLb1M;i_$D;I^m2Ft4?2Bz%vK0Wa0_BS?X(q;_N& zGC0kVbgWY|JT=HykPfwCi|xhs66gZ8d+lY<9Bwd$ti?QFUk6M};jW}shcSd0laV#H z%(=0)=ArGT(BDjGG*2|6=f=rZszPbmVR9I?5O$(Mn#HqHEs<{Q$grv>3hj{4z?-om z`;_iL9AOCg(Q#nX721`Z_tIz1S+4sgJYNL)!FE41{TRHLxnF?}BzY zF({bKvT}@?AXzyuY-(GAp%%~Pi{TGZ$v9k86D#bae zI@`j-a$KD**f8B+V76D28tWt$V5ik`C}=kxq|jc+dP)WfnukVKN9qzS;gz!Nmty3a zAi~OQ&4CmyQge|^3tw!Q-7qqPyYd$Jsb0kDtPQhbCLC3E|7LxkYpEj0Al{e4vAhom;kBnmS`#kWg*f;sG?nmf_AOtOd&%`&Hx$3c1LK!F&U>!V;2w2mz}^^A3=p??kau7M0g68Orb7|go06lAFN#SOsJN?=Fb`{Qv5wn(GJfXNI@ z)MI#}B>PaRMwM6DQ+2H&wlW&-fJ~oV+Fg;(1Cy}g9=mOx4+ z48biVRTTyug++KeLTW{hHFJ((qNy%FxRsD`M&M%2M;wX>Y78PksiQeUc`NNq^fO^S z3wx?0v*wEx`cs|7DyD&|bFbRosFN@T4V~*S#za1$32iFHu-o0nIOD;u;e=um)o>bP zCMg1dQb7=ME7F4+MY`i{eVpEbs1j9G$JUDt)1HCYuv;wH?UEdiD6Cc(k4J1UsxBVS z{>&#Q3QlWZqWDxh1Fjd3y0TPbqc_S~9NP@TzCXJMv0`AT5U8F3er_d?iQ_hkhF*e# zcg!f`+TiW)_)oP_2%g~MrUFa1l>H)pX<$>cGE}>linb)WS|iDIN?=4g09Ai2HUZAE zG`eK5i6d39RRfjM<&o8-uGx82LxCTTmbUJy4aThw{+v3Z8e|}rsv1G3BdL|)&PZ~l z@qAEGR^z4sT{j&zV*&=VuIRS)gw&y_RuGPV<50QKYP*wdfQ=QN@gQoPb0cDOw&ZD$ zpqqm{RmMGVqBkLPq6Y<=kaLdkawfBkC)t`QS}01q!lPdy-(pAccFnHG+k)Z%14X-_ zdK&l|X^tf$UE9!FP%Kv{I*Ok$$0w&r@iR#i*StkYFX--JpqnjJZnB`9-OxGVW~81Q zz2&owho|;79u|_=6KT5)dflF6m{&#C6tDRchX;-34`;*N^+AX(Bv$S!4nNRBb85vp zvGmg#in<+A7H2%soii3xN*i=kY&`DL-Q{rwFBOfwbgH}UNYt!X71_O~7*C)nn~OAN zoFy(&U@Kni#1Bq4`N7_Ky)rCcapvqWDAg{tUD|Yt;a2o^XBpxJ`gmcTcnJzFbGxgW35_L9FJi*Y^0)Y2+PGN zGE|^?U#TFIt$;?rCDRe@8AqVLE{kfEfrG*N7}PS{its`#A=$$E&hA7K+DjWsTa_8B z&@6jpGh78vUf_XXD+K%zRwZ!x=SN#(k+7XPa8x;AmIbP}DswTXf^x7S>$IU6P*E7B zO&|(o5ZTVmf5R^d18P;HlG_w96bUO+h6})KI?-R@kshY)FbS<+VEq<%t?a^v;_@pc1S;W!>4s3m4za9Taa<3=GNN9XWnox&4jt$)=eX@x=* zFEO7+7mK2-+D3T#qMN&!zNmH|pdwDRLC+c5N^tc1Ioh1i7D`rHKZr`}<*9fZx{EAA zZlZ*?jzVth0|aZH!d5(K&n;|tGlqGR<54k>7KH^i*e7Kfxprf$KeOx)H3Ac86Rz2C z+K?LWhLjjmajh#NZbAebUUyThU_%k>6>T!{LLMP~=>U3f8>|k?25d0&qJF>z8>Zmp zR-1BesBY-Id6|Y7Gi12oS}4?F=nS_F8LPC9vYxeCt)$ZGxWh1>%!{;-TWz<>b~$1} zj9g^9+^qsPDMUVQK~R=Lv=Q{KZv}M+DMBKaCGa-%j6U3Ls>TNObVozMU9JAU zEha49)0|HA$9qDil3l-u)#~~z{xjmF_Xv@jOd-7xbz!ac%{Ak9mEcRXCv-|$fvSY+ zs7y)V3f374k&Ngt_Hlitltm6<@pY3f{_**rH9n#)t z4eujk*FAbQv8_ixxo^;`*={}hDKhkf;p{|hfE;08as}4spZqghTOqrv^r=#$&xAWT217t>V@4T5j%YPZK0$`}CSH8g&y7i!LN91Qgf2ADeOHbMP*RO1CcyEU14a!h`ck;U4c$AS2T>4ul3onWuv%_nf; zsbv)w<~9OG&4dcB1C2CS_yj7hCAmB*;b;OKE-Ix`No0+)NWsY)VOe9H2H`5^Nz{dc z<-t@usZv27r{NsNvKZzJf-Q&b|>3bZm$ zL&uu^_vfpHZgx>gDRvS!2Z=#=j~oJ@9v&m2z^zcZSsGS2WQCo$XsL04-Yyi^C7`zy zJg%!L>$JkVn-Z2*2)1dOu~=d5MIdg4s?x+H##XrTMMq8H zpUNiOSHgRisaQ+c8K3T=eJduN+}O4HHfuO;^`XPC-0Jhb&Q)2_*=VY#G8^W5xJI#@c8qdsanm>;ly=tgPvBU|K=$u?BYRz1q zu%xBAG9jUbXJ^{InmuKCrp>D8Vx(czR-JbwY)!RIAlNWzDF#jUKtk_OS+L;UZyUoZ%XR6EXt~WYmiZ5&|=_Cy!y&PRNchkd>d>N?2&>BaOqILZ+vR zCJ}1XIjiD$31j17(d__~%@F6&^*|?bFp595uCqD8Yr`cZFn#EJwb|vFhZ)2#sg#${ zH{YRgGQ?5?Eu|Hjgg`YYFeWN7*`wa})D~eV1RLOTbsDnTQ0pPqESF`&x^xF*`*?Lz zxCyJ?+dQ){eRCXJY++M`~^ zvCy9VY#of=$jgXnXWHJiR9M(_8P@(9vDw=3(UKcxcJslPa7OX98xqM9HrDh?(1J2p zYo^>TYjx9wO}26t8sTY}vA^Mpn#`|(3XK`95jS0Awd@Wk5!4b_OW2+_jnM44b0In0 zQd%DwDU-Sc?heQT)-sgLlA6pt5&Lj;k}#D9Y%nwSp{kyWy}_(@WETt^2w9fv#*@`L zRNGnycfzx`4x=rsgVjLzLKYKaYa?n5`bkC&b53|qPT%${+mQ5R)jNigWr3wLGS6lh z5h#aUd^1!xVa}qPY!SgyxDt;61wD3;jBxy{g?-I6wlQo13&Vn{H@O}y0$)~DY2_q9Tc$JL};zY-e3ZYLl zVvF#3LP`S_++E?N^XG-zk`a;RmQcYijFhtDt&atk{8^BxqwdC%ubTPXn436}+F}JK z#`}25lNyX5&-iCFtZK@XMugr;yvzW<-^k|Z#xrhqED7&3U^<-|OJ*z_mtR-7aSjX; ze`Gpk5!x^tEJR;&RAJ-@XVMWTc-ks6^m9Sov~w6l-nGZWk~s)N`z`(zm$7>1!`y6| zu-ThzV{wa$8|R1a10&~3Uks}}!XBJ+7ZL41gHbh#BES*a8c*X+%?a-sC$8C%68A1V zH^vpR2~}*gB+&%ZMazUvkEHEw#4@bZ-#$e{>o_&Fz=F43<%x5EB|cOT% zjK9P&_VKc$Ue=|d#c#hrjGI6S*FeqPVi~R(or@)7Uu+>^Oe#+MSO)_VnPQXbYO9#& zCw5eMX>BGvb&yyyZo=$P_t!|!)<*m{E@MlKv~hzb8H=sf$jy{iZ(JCwN>kEI!j8}t zt!Ql%Wtei;29Xk^Fh;uoa41>r9J^}9RH*Xx3y?rxo z1r)^YEZQLC*@Y>aA!%LOJIaI2lvit7AWPO}h3&>sG8gt1)2i8_*<$KZ_d~`Vn8h+f zprps*M=Z7$aF8SorN#yF8<0R6L86S)cFisHg{4YE=cv0OO!S*CnE$PgEv zb;?_ltP+^}D_LlMaoQ%$jfa}@b#2a{hZLl?scp1#;@hmtT)}C-(v7(WJq7ED6gfFf zz&s=~3KvVhMmh)CQ`j0d#mo%Lkaw519%GxHlF?B#AZs!TFSJ@$%9AOO5m08%-oy+x znE;_1LL@~Qk=WXTVNzRQMpm3bmc=L-yJcxc*bCF3=#&fVU<|Y54A`f2g?bB7R%Ax+ zKHZF4FKtNF8-6r)(~2V(5;7K&WU?$-O-c#Ruh69jd$U62Uv`rCMjq+)%J+baW z>&EG`i!cu=aZG<;$8Idv1d}Oryp#_p)g5h#MdDEJX_JPm1oXNDD-a+Xi>(7P-DL%0 ze`W_@opP;_){j~zUhVcA!y40(WSWw^n(a-NbS$2nm@8PVInW1i_%HYt-$GEZN%V11Dk>K4ltjWh||+MT>eDqQBCjC8BN2 zB}FYa;zrbJ{cu1*ZEeXXs$E}zQ}sYV%|hWmO&n$j-6>t%mARSAj~!MkePSehTU{cw zS`Gb#_S+xPj{(+o2mLSr`|OU2**=1?@A_<@s)|JLoptwPE?J{$GP);hML=cWe)nVS z`)q};STJn62g2r$+8CW|eGB}|eB_>;l#T#0tYEoVK`&i&LJn3|j#i5}2NGya59UfFk@Yf#D|ne z8`En3x)+zeWJoOSjVjo~WG@jZlVTl&s&8eQ>F%;IGNZ(!IPJp1`^Y$37z3y|iO@W1 zBQNc3uZ$_HSu<02Xw}RgVlyVJ+DG$ccmhbwKoELHi>G_g&6&~cQd0SgiroAxci{H92$i^f>@8DscqTkN7C^~GY>hO2cOc<-8fV!0%Iy! zIfO!}4|i0(Qgbb3brug~N@?{XS73q1UAjPuB4`jx|wTl(#8>xm+z=3KD?Vpr3! zkn5xyrILJ%J-4uj9y$V48nn2o%6MnTBkeq#F?~v{we+82K#OhkFvwE_H~;LO_3NSU z8lXbEX~IN_9qP=4Z?<3%NIL_%V}=1E>{f);DV`7S{zlrdCu$cKTuYHo1rtual2mlG zT+j?VAyZ}`!;8D6w3Zq!>xsm;7>JpsJ6^&vUa%e7ghbl}EFYHgWq(88PQ)b&J^iVl zY3iowq>Nn{F?PporP@mob;^E1%gxlRg?*GOVfU7$krpgvmANtNWGCg2LL|jAT+%tL z)=8MKVW3Zv#$d~iLaCmDwN#s2N!2YI!zFBFl_WL~H>K{ycq#YU4!VVxOEb1hn1~WM zg=vQ?qn&UkLv!G6(%&+^8^cSJX!nfoArvl(wn4ZG4d+B*RH|4^iM{ZQO0C zF>eucoea0elF^oQY_;LpnTCZ+T*eh@#!dNlw63S7GBYN@3DH0sJ`hV+TC_(sqjcj^ z%wLzl@n($6(=3d_I(tF%BIqzPkTqB^e==E<62sP}n5D+&;pPCu40Qx{5?C5QogaD8 zq7dkih0QBqa^Wnews8(mPe;1Dqi|t4qc>)14&xH@hvPLVcJ;Igmjb?@rFJ#O+uW)X zFN5t8)P{hUXtm0jE6Ow#j-e5e%!bo3o{X6GUGjk%Vyg2nr05lLeRKk$pql}t4pn4>vF$U=XlJ4|))s@b4xd-tuv(17X!e!;3hb?6cF;(v zyA|0Ht$D6@+hKzuE%yX8=^b60Y2F9AFGes$EGqq3z!bE(-r%=r|1@C$K6O7V}YFbsXp71gGLz z+DGC!j%kGhObM1MtBxbd2%g*s#%W1`RH|+qq!dA=;Vw@HsLEQdDpV4W5si8PT{1Vi z7W#3w#5y4rtd_M&G55lQO7RQ?4pIJRB)b#w2==E|uD6c07>9CuDw}i)6>2<|kxW}t#%ZXC`f{)%1bLU^bDkuV zjET}!EucusK_5j4I1&2TFIX2zN1$^$?APeM4+%Cm4nXqxirv00a1H5O=nc_lf1NCh zc&`?QAl=KwFvW&Zmm0I1^5v2lT@FhIS2b>(Fe#(hE3Gi_XKI!nZJv8eFah6jR#=X>7o^8X@CXy9P0d>3pR^BP^~#9}PRi$MeG98_z$^{6eftzmMHMvB-|jEYy5t zek0_xsF+4FqWEr)RWVnZc^^QS`yq``@*R&(;6U3x{VNQK&;j&eTg# z@bq1pdQ9;2Fa;Ev*LDSJ{pl^w^l5bjj|(%=1eUnL-9HKqEh!B)c>Nk+8*6B%GPURs z4k1&~srzOS+cNHamu<$lUI-T@<+Y!3dhSjuW5eEyz52Vo5aXp2_md{cIIU zJzzp%V^V>Zg1QeM02L4|(bgVFe>yc;eznv@9b!|az{--*GDr%e?QG{7Z8XIGnWtaWo&KW`m`gkkGRm|79!*vpo24|cUxLtBv2exvK7tE>t*)=3ChyN*_i;Hn($B|8 zj{+qYTrgFn)Tr>*V<;pkVyrYl0b#Btld};h3hSb96+?N0RrRkf#e^$`(-#XQX5A!vj&(FqRm`G>RQARzl&Z!!_Zyx`$lU)4YyroB88a znvYkx{aD@47miB0{dkRr@*1}vuho3K*8byNJ)#uC>!o{>Oapm*{dujj$3T}2TPZQV z5IIZbAQl~y1f%mEl;q<+Ij0n2a^vD8%w%t9tDNEE%2wn3;yQT09X)`wy^P>)H~CM= zK%5?VX;|A`?pDHG5b8{^N)4}`s>c@jbK;3++8s&0ncX*OIicD`x>G3&&Hn#*P$s6V z7omhiuHz)F#>pJu_LeR<8tcUS*LS7TSnexIG%V!jb~7vCFD#AgJNYH=9@HW+qk;K} z)*kTE=9c9`WLX0q2?Gwp9m$v3kMsm%eVUvXSa(~rB^fMk-ZXF2ido60+@^(s1i6Nx zzCrp?{U()$YqN#}VlgUz<{QvY@r4(@h;?Nll7Re8T6~fZpJZ;fN`^Czjf6nae6h)H z7Z)0-r1vCu4H^%p7Ie;?rCR^1eA|at9~6{s9HyC}-Q>{BgnD7?%t-8C5+b9gG&$xa z5JFe@lPdTKl*YfC@z=n46K2t=lmZh}^d1~WRhUSlI+;vbM5HL>6bE3BF%3nvKbx7Z z{VVXeb5+a26>4?BWs4Y}phk~eX-dJ()ZE&1Glr~I*!+n@BW(WA?t%xsbwe#wXk9A> zfH3<)HcG{Vesgc8G!bet@cO+-&A<#>7bK|oi!-GK+E)k6*sZF98`?-XyRkl41ejQ_-3yAyJN}gIFV{ z+QpI@IAM;4Q-)#!)dn=x_C8KizU_+x05eB)^tpnE5frT01)~9Rq>xyvUttQDeHcwD zDBUa{^8m+ZYKf>#30|qSiJyd~gl4VnhSzZAp_#&1FBXTHzkzW78Q*9&T=o~7_+SId zZ%@kQopoiIDY_1Ol<`jG3(_j^v<^$ulvXGcmPkFkLIxi>)#kXJATH9CQp!c;x){hT zI{WwTnt<_nV&VcY9((;!yo%b%t%t%@$?2P(a^wwbT}kc7of z&v5216xllm%JsSpYcliu*u*${gE2Fg4iZD=k8Ddb%)j2x_+W<^QQ=JagB(ldW}XC4 zRyLU~V~LWsVYZqj5+C=4qnDuFWzQ_Z=|)*3pZCInO0l>*wU(gB>P02rICP_uFT?t1 zoNwtdo$?+eckot$nzQT=@9=cBMv`jF30y`JloirEK{lk??0^I*Iha+joGIYN)Po#l zKfxzFv#=7nN?EWu7_695=WB(lNZ>LT_G;FMK1NVNS6piJ76jczRbzDN;{XERt{!Yl zq&Jb*)nErFY#oZJKlKqB+|5xFLoEKoV^h^!2DKYm3ppw$z&iT^7_n-#i?s_w6|9Ls z!$VExt)JN3E`ffp@kBef`OeLi{ChWMK#rjomOzdO?`L3g$U-t8Bb*OX5q;a{0rg!_ zCJfz$piQt7q2Uv#I!v1RMRmk}NZ7kao!NeZg65GS`7rF?8L}EesUV=wE6Qms$P|8I zKu@bisX?XH)Xf(@cHC62D{MqRt4#Bx5>*x6 z_;j{>c8rfl=?9~#d9fIb+GRtIQRcO*u)^_hW_fD8mK<+GFZ9Tn?u1n?+-eP`nyKB? zT39-eg)>hL{6x_qrP-}2R#iv%f`YbJ9Jcn6+sT;!ZA&$q+K( z{6yj3ih9s38_YrC+!;ruQYll%L=WSnBPrgOT289kz&w&cE!DK&vLUAGr{s+_Il7!CTE(w|7i(S)Jb!CT=6~RS;)DDJJ)O;T zeN6JJXvU12FY&2wVK>~(Nhf&KiTvZ~z0e+wuM(un7rJ#wnEE$5BxQQc?x(l`!#F2i z$M{aVf)j0+dgVs+bQ2?hcBATJOJQ+oK`yqYK5!Cx_owY#7;fmb_gb38=Q^=iQtu_? zQ~@_vdhMXHzMLl)cUWVorCvyI7ie_iYIb$ME$6aX!{u)BCt{ox+HE>qvUTM$oNu_* z#KNy;&Zk2}H@j`g=aaa>F`Xu7+%Hb9p-+n#atV|U_3*B@7VTC9i@n&+OE`5~6eL06 zBC#i!cWBNf)Z8>emVAC7Z-tCU%osvyd*|>vnugS(Xlp`b)AXN} zz-M*v8FV@VVm#W_e7LyF@&l)bU3w`aZ$g>hZ2sc q<+$iN1HKrezxRxnj_~YQofCf};DLv3XU6%3U<3VML$H$L@%$fr#<*Yr literal 0 HcmV?d00001 diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.ts b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.ts new file mode 100644 index 000000000..7232c5173 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_es.ts @@ -0,0 +1,4227 @@ + + + + + QsciCommand + + + Move down one line + Desplazar una línea hacia abajo + + + + Extend selection down one line + Extender la selección una línea hacia abajo + + + + Scroll view down one line + Desplazar la vista una línea hacia abajo + + + + Extend rectangular selection down one line + Extender la selección rectangular una línea hacia abajo + + + + Move up one line + Desplazar una línea hacia arriba + + + + Extend selection up one line + Extender la selección una línea hacia arriba + + + + Scroll view up one line + Desplazar la vista una línea hacia arriba + + + + Extend rectangular selection up one line + Extender la selección rectangular una línea hacia arriba + + + + Move up one paragraph + Desplazar un párrafo hacia arriba + + + + Extend selection up one paragraph + Extender la selección un párrafo hacia arriba + + + + Move down one paragraph + Desplazar un párrafo hacia abajo + + + + Scroll to start of document + Desplazar al principio del documento + + + + Scroll to end of document + Desplazar al final del documento + + + + Scroll vertically to centre current line + Desplazar verticalmente al centro de la línea actual + + + + Extend selection down one paragraph + Extender la selección un párrafo hacia abajo + + + + Move left one character + Mover un carácter hacia la izquierda + + + + Extend selection left one character + Extender la selección un carácter hacia la izquierda + + + + Move left one word + Mover una palabra hacia la izquierda + + + + Extend selection left one word + Extender la selección una palabra a la izquierda + + + + Extend rectangular selection left one character + Extender la selección rectangular un carácter hacia la izquierda + + + + Move right one character + Mover un carácter hacia la derecha + + + + Extend selection right one character + Extender la selección un carácter hacia la derecha + + + + Move right one word + Mover una palabra hacia la derecha + + + + Extend selection right one word + Extender la selección una palabra a la derecha + + + + Extend rectangular selection right one character + Extender la selección rectangular un carácter hacia la derecha + + + + Move to end of previous word + Mover al final de palabra anterior + + + + Extend selection to end of previous word + Extender selección al final de la palabra anterior + + + + Move to end of next word + Mover al final de la palabra siguiente + + + + Extend selection to end of next word + Extender la selección hasta el final de la palabra siguiente + + + + Move left one word part + Mover parte de una palabra hacia la izquierda + + + + Extend selection left one word part + Extender la selección parte de una palabra a la izquierda + + + + Move right one word part + Mover parte de una palabra hacia la derecha + + + + Extend selection right one word part + Extender la selección parte de una palabra a la derecha + + + + Move up one page + Mover hacia arriba una página + + + + Extend selection up one page + Extender la selección hacia arriba una página + + + + Extend rectangular selection up one page + Extender la selección rectangular hacia arriba una página + + + + Move down one page + Mover hacia abajo una página + + + + Extend selection down one page + Extender la selección hacia abajo una página + + + + Extend rectangular selection down one page + Extender la selección rectangular una página hacia abajo + + + + Delete current character + Borrar el carácter actual + + + + Cut selection + Cortar selección + + + + Delete word to right + Borrar palabra hacia la derecha + + + + Move to start of document line + Mover al principio de la línea del documento + + + + Extend selection to start of document line + Extender selección al principio de la línea del documento + + + + Extend rectangular selection to start of document line + Extender selección rectangular al principio de la línea del documento + + + + Move to start of display line + Mover al principio de la línea visualizada + + + + Extend selection to start of display line + Extender selección al principio de la línea visualizada + + + + Move to start of display or document line + Mover al principio de la línea visualizada o del documento + + + + Extend selection to start of display or document line + Extender selección al principio de la línea visualizada o del documento + + + + Move to first visible character in document line + Mover al primer carácter visible en la línea del documento + + + + Extend selection to first visible character in document line + Extender selección al primer carácter visible en la línea del documento + + + + Extend rectangular selection to first visible character in document line + Extender selección rectangular al primer carácter visible en la línea del documento + + + + Move to first visible character of display in document line + Extender selección al primer carácter visualizado en la línea del documento + + + + Extend selection to first visible character in display or document line + Extender selección al primer carácter de línea visualizada o del documento + + + + Move to end of document line + Mover al final de la línea del documento + + + + Extend selection to end of document line + Extender selección al final de la línea del documento + + + + Extend rectangular selection to end of document line + Extender selección rectangular al final de la línea del documento + + + + Move to end of display line + Mover al final de la línea visualizada + + + + Extend selection to end of display line + Extender selección al final de la línea visualizada + + + + Move to end of display or document line + Mover al final de la línea visualizada o del documento + + + + Extend selection to end of display or document line + Extender selección al final de la línea visualizada o del documento + + + + Move to start of document + Mover al principio del documento + + + + Extend selection to start of document + Extender selección al principio del documento + + + + Move to end of document + Mover al final del documento + + + + Extend selection to end of document + Extender selección al final del documento + + + + Stuttered move up one page + Mover progresivamente una página hacia arriba + + + + Stuttered extend selection up one page + Extender progresivamente selección hacia arriba una página + + + + Stuttered move down one page + Mover progresivamente una página hacia abajo + + + + Stuttered extend selection down one page + Extender progresivamente selección hacia abajo una página + + + + Delete previous character if not at start of line + Borrar carácter anterior si no está al principio de una línea + + + + Delete right to end of next word + Borrar a la derecha hasta el final de la siguiente palabra + + + + Delete line to right + Borrar línea hacia la derecha + + + + Transpose current and previous lines + Transponer líneas actual y anterior + + + + Duplicate the current line + Duplicar línea actual + + + + Select all + Select document + Seleccionar todo + + + + Move selected lines up one line + Mover las líneas seleccionadas una línea hacia arriba + + + + Move selected lines down one line + Mover las líneas seleccionadas una línea hacia abajo + + + + Toggle insert/overtype + Conmutar insertar/sobreescribir + + + + Paste + Pegar + + + + Copy selection + Copiar selección + + + + Insert newline + Insertar carácter de nueva línea + + + + De-indent one level + Deshacer un nivel de indentado + + + + Cancel + Cancelar + + + + Delete previous character + Borrar carácter anterior + + + + Delete word to left + Borrar palabra hacia la izquierda + + + + Delete line to left + Borrar línea hacia la izquierda + + + + Undo last command + Deshacer último comando + + + + Redo last command + Rehacer último comando + + + + Indent one level + Indentar un nivel + + + + Zoom in + Aumentar zoom + + + + Zoom out + Disminuir zoom + + + + Formfeed + Carga de la página + + + + Cut current line + Cortar línea actual + + + + Delete current line + Borrar línea actual + + + + Copy current line + Copiar línea actual + + + + Convert selection to lower case + Convertir selección a minúsculas + + + + Convert selection to upper case + Convertir selección a mayúsculas + + + + Duplicate selection + Duplicar selección + + + + QsciLexerAVS + + + Default + Por defecto + + + + Block comment + Comentario de bloque + + + + Nested block comment + Comentario de bloque anidado + + + + Line comment + Comentario de línea + + + + Number + Número + + + + Operator + Operador + + + + Identifier + Identificador + + + + Double-quoted string + Cadena con comillas dobles + + + + Triple double-quoted string + Cadena con triple comilla doble + + + + Keyword + Palabra clave + + + + Filter + Filtro + + + + Plugin + Plugin + + + + Function + Función + + + + Clip property + Propiedad de recorte + + + + User defined + Definido por el usuario + + + + QsciLexerAsm + + + Default + Por defecto + + + + Comment + Comentario + + + + Number + Número + + + + Double-quoted string + Cadena con comillas dobles + + + + Operator + Operador + + + + Identifier + Identificador + + + + CPU instruction + + + + + FPU instruction + + + + + Register + + + + + Directive + Directiva + + + + Directive operand + + + + + Block comment + Comentario de bloque + + + + Single-quoted string + + + + + Unclosed string + Cadena sin cerrar + + + + Extended instruction + + + + + Comment directive + + + + + QsciLexerBash + + + Default + Por defecto + + + + Error + Error + + + + Comment + Comentario + + + + Number + Número + + + + Keyword + Palabra clave + + + + Double-quoted string + Cadena con comillas dobles + + + + Single-quoted string + Cadena con comillas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Scalar + Escalar + + + + Parameter expansion + Expansión de parámetros + + + + Backticks + Comilla inversa + + + + Here document delimiter + Delimitador de documento integrado (here document) + + + + Single-quoted here document + Documento integrado (here document) con comilla simple + + + + QsciLexerBatch + + + Default + Por defecto + + + + Comment + Comentario + + + + Keyword + Palabra clave + + + + Label + Etiqueta + + + + Hide command character + Ocultar caracteres de comando + + + + External command + Comando externo + + + + Variable + Variable + + + + Operator + Operador + + + + QsciLexerCMake + + + Default + Por defecto + + + + Comment + Comentario + + + + String + Cadena de caracteres + + + + Left quoted string + Cadena con comillas a la izquierda + + + + Right quoted string + Cadena con comillas a la derecha + + + + Function + Función + + + + Variable + Variable + + + + Label + Etiqueta + + + + User defined + Definido por el usuario + + + + WHILE block + Bloque WHILE + + + + FOREACH block + Bloque FOREACH + + + + IF block + Bloque IF + + + + MACRO block + Bloque MACRO + + + + Variable within a string + Variable en una cadena + + + + Number + Número + + + + QsciLexerCPP + + + Default + Por defecto + + + + Inactive default + Por defecto inactivo + + + + C comment + Comentario C + + + + Inactive C comment + Comentario C inactivo + + + + C++ comment + Comentario C++ + + + + Inactive C++ comment + Comentario C++ inactivo + + + + JavaDoc style C comment + Comentario C de estilo JavaDoc + + + + Inactive JavaDoc style C comment + Comentario C estilo JavaDoc inactivo + + + + Number + Número + + + + Inactive number + Número inactivo + + + + Keyword + Palabra clave + + + + Inactive keyword + Palabra clave inactiva + + + + Double-quoted string + Cadena con comillas dobles + + + + Inactive double-quoted string + Cadena con doble comilla inactiva + + + + Single-quoted string + Cadena con comillas simples + + + + Inactive single-quoted string + Cadena con comilla simple inactiva + + + + IDL UUID + IDL UUID + + + + Inactive IDL UUID + IDL UUID inactivo + + + + Pre-processor block + Bloque de preprocesador + + + + Inactive pre-processor block + Bloque de preprocesador inactivo + + + + Operator + Operador + + + + Inactive operator + Operador inactivo + + + + Identifier + Identificador + + + + Inactive identifier + Identificador inactivo + + + + Unclosed string + Cadena sin cerrar + + + + Inactive unclosed string + Cadena sin cerrar inactiva + + + + C# verbatim string + Cadena C# textual + + + + Inactive C# verbatim string + Cadena C# textual inactiva + + + + JavaScript regular expression + Expresión regular JavaScript + + + + Inactive JavaScript regular expression + Expresión regular JavaScript inactiva + + + + JavaDoc style C++ comment + Comentario C++ de estilo JavaDoc + + + + Inactive JavaDoc style C++ comment + Comentario C++ estilo JavaDoc inactivo + + + + Secondary keywords and identifiers + Identificadores y palabras clave secundarios + + + + Inactive secondary keywords and identifiers + Identificadores y palabras clave secundarios inactivos + + + + JavaDoc keyword + Palabra clave de Javadoc + + + + Inactive JavaDoc keyword + Palabra clave de JavaDoc inactiva + + + + JavaDoc keyword error + Error en palabra clave de Javadoc + + + + Inactive JavaDoc keyword error + Error en palabra clave de Javadoc inactivo + + + + Global classes and typedefs + Clases globales y typedefs + + + + Inactive global classes and typedefs + Clases globales y typedefs inactivos + + + + C++ raw string + Cadena en bruto C++ + + + + Inactive C++ raw string + Cadena inactiva C++ + + + + Vala triple-quoted verbatim string + Cadena Vala con triple comilla textual + + + + Inactive Vala triple-quoted verbatim string + Cadena Vala con triple comilla textual inactiva + + + + Pike hash-quoted string + Cadena Pike con hash entrecomillado + + + + Inactive Pike hash-quoted string + Cadena Pike con hash entrecomillado inactiva + + + + Pre-processor C comment + Comentario C de preprocesador + + + + Inactive pre-processor C comment + Comentario C de preprocesador inactivo + + + + JavaDoc style pre-processor comment + Comentario de preprocesador estilo JavaDoc + + + + Inactive JavaDoc style pre-processor comment + Comentario de preprocesador estilo JavaDoc inactivo + + + + User-defined literal + Literal definido por el usuario + + + + Inactive user-defined literal + Literal inactivo definido por el usuario + + + + Task marker + Marcador de tarea + + + + Inactive task marker + Marcador de tarea inactivo + + + + Escape sequence + Secuencia de escape + + + + Inactive escape sequence + Secuencia de escape inactiva + + + + QsciLexerCSS + + + Default + Por defecto + + + + Tag + Etiqueta + + + + Class selector + Selector de clase + + + + Pseudo-class + Pseudoclase + + + + Unknown pseudo-class + Pseudoclase desconocida + + + + Operator + Operador + + + + CSS1 property + Propiedad CSS1 + + + + Unknown property + Propiedad desconocida + + + + Value + Valor + + + + Comment + Comentario + + + + ID selector + Selector de ID + + + + Important + Importante + + + + @-rule + Regla-@ + + + + Double-quoted string + Cadena con comillas dobles + + + + Single-quoted string + Cadena con comillas simples + + + + CSS2 property + Propiedad CSS2 + + + + Attribute + Atributo + + + + CSS3 property + Propiedad CSS3 + + + + Pseudo-element + Pseudoelemento + + + + Extended CSS property + Propiedad CSS extendida + + + + Extended pseudo-class + Pseudoclase extendida + + + + Extended pseudo-element + Pseudoelemento extendido + + + + Media rule + Regla de '@media' + + + + Variable + Variable + + + + QsciLexerCSharp + + + Verbatim string + Cadena textual + + + + QsciLexerCoffeeScript + + + Default + Por defecto + + + + C-style comment + Comentario de estilo C + + + + C++-style comment + Comentario de estilo C++ + + + + JavaDoc C-style comment + Comentario de estilo JavaDoc C + + + + Number + Número + + + + Keyword + Palabra clave + + + + Double-quoted string + Cadena con comillas dobles + + + + Single-quoted string + Cadena con comilla simple + + + + IDL UUID + IDL UUID + + + + Pre-processor block + Bloque de preprocesador + + + + Operator + Operador + + + + Identifier + Identificador + + + + Unclosed string + Cadena sin cerrar + + + + C# verbatim string + Cadena C# textual + + + + Regular expression + Expresión regular + + + + JavaDoc C++-style comment + Comentario de estilo JavaDoc C++ + + + + Secondary keywords and identifiers + Identificadores y palabras clave secundarios + + + + JavaDoc keyword + Palabra clave de JavaDoc + + + + JavaDoc keyword error + Error en palabra clave de JavaDoc + + + + Global classes + Clases globales + + + + Block comment + Comentario de bloque + + + + Block regular expression + Expresión regular de bloque + + + + Block regular expression comment + Comentario de expresión regular de bloque + + + + Instance property + Propiedad de instancia + + + + QsciLexerD + + + Default + Por defecto + + + + Block comment + Comentario de bloque + + + + Line comment + Comentario de línea + + + + DDoc style block comment + Comentario de bloque estilo DDoc + + + + Nesting comment + Comentario anidado + + + + Number + Número + + + + Keyword + Palabra clave + + + + Secondary keyword + Palabra clave secundaria + + + + Documentation keyword + Palabra clave de documentación + + + + Type definition + Definición de tipo + + + + String + Cadena de caracteres + + + + Unclosed string + Cadena sin cerrar + + + + Character + Carácter + + + + Operator + Operador + + + + Identifier + Identificador + + + + DDoc style line comment + Comentario de línea estilo DDoc + + + + DDoc keyword + Palabra clave DDoc + + + + DDoc keyword error + Error en palabra clave DDOC + + + + Backquoted string + Cadena con comillas hacia atrás + + + + Raw string + Cadena en bruto + + + + User defined 1 + Definido por el usuario 1 + + + + User defined 2 + Definido por el usuario 2 + + + + User defined 3 + Definido por el usuario 3 + + + + QsciLexerDiff + + + Default + Por defecto + + + + Comment + Comentario + + + + Command + Comando + + + + Header + Encabezado + + + + Position + Posición + + + + Removed line + Línea eliminada + + + + Added line + Línea añadida + + + + Changed line + Línea modificada + + + + Added adding patch + + + + + Removed adding patch + + + + + Added removing patch + + + + + Removed removing patch + + + + + QsciLexerEDIFACT + + + Default + Por defecto + + + + Segment start + Inicio de Segmento + + + + Segment end + Final de Segmento + + + + Element separator + Separador de elemento + + + + Composite separator + Separador compuesto + + + + Release separator + Separador de release + + + + UNA segment header + Encabezamiento de segmento UNA + + + + UNH segment header + Encabezamiento de segmento UNH + + + + Badly formed segment + Segmento mal formado + + + + QsciLexerFortran77 + + + Default + Por defecto + + + + Comment + Comentario + + + + Number + Número + + + + Single-quoted string + Cadena con comillas simples + + + + Double-quoted string + Cadena con comillas dobles + + + + Unclosed string + Cadena sin cerrar + + + + Operator + Operador + + + + Identifier + Identificador + + + + Keyword + Palabra clave + + + + Intrinsic function + Función intrínseca + + + + Extended function + Función extendida + + + + Pre-processor block + Bloque de preprocesador + + + + Dotted operator + Operador punteado + + + + Label + Etiqueta + + + + Continuation + Continuación + + + + QsciLexerHTML + + + HTML default + HTML por defecto + + + + Tag + Etiqueta + + + + Unknown tag + Etiqueta desconocida + + + + Attribute + Atributo + + + + Unknown attribute + Atributo desconocido + + + + HTML number + Número HTML + + + + HTML double-quoted string + Cadena HTML con comillas dobles + + + + HTML single-quoted string + Cadena HTML con comillas simples + + + + Other text in a tag + Otro texto en una etiqueta + + + + HTML comment + Comentario HTML + + + + Entity + Entidad + + + + End of a tag + Final de una etiqueta + + + + Start of an XML fragment + Inicio de un fragmento XML + + + + End of an XML fragment + Fin de un fragmento XML + + + + Script tag + Etiqueta de script + + + + Start of an ASP fragment with @ + Inicio de un fragmento ASP con @ + + + + Start of an ASP fragment + Inicio de un fragmento ASP + + + + CDATA + CDATA + + + + Start of a PHP fragment + Inicio de un fragmento PHP + + + + Unquoted HTML value + Valor HTML sin comillas + + + + ASP X-Code comment + Comentario ASP X-Code + + + + SGML default + SGML por defecto + + + + SGML command + Comando SGML + + + + First parameter of an SGML command + Primer parametro de un comando SGML + + + + SGML double-quoted string + Cadena SGML con comillas dobles + + + + SGML single-quoted string + Cadena SGML con comillas simples + + + + SGML error + Error SGML + + + + SGML special entity + Entidad SGML especial + + + + SGML comment + Comentario SGML + + + + First parameter comment of an SGML command + Comentario de primer parametro de un comando SGML + + + + SGML block default + Bloque SGML por defecto + + + + Start of a JavaScript fragment + Inicio de un fragmento JavaScript + + + + JavaScript default + JavaScript por defecto + + + + JavaScript comment + Comentario JavaScript + + + + JavaScript line comment + Comentario de línea de JavaScript + + + + JavaDoc style JavaScript comment + Comentario JavaScript de estilo JavaDoc + + + + JavaScript number + Número JavaScript + + + + JavaScript word + Palabra JavaScript + + + + JavaScript keyword + Palabra clave JavaScript + + + + JavaScript double-quoted string + Cadena JavaScript con comillas dobles + + + + JavaScript single-quoted string + Cadena JavaScript con comillas simples + + + + JavaScript symbol + Símbolo JavaScript + + + + JavaScript unclosed string + Cadena JavaScript sin cerrar + + + + JavaScript regular expression + Expresión regular JavaScript + + + + Start of an ASP JavaScript fragment + Inicio de un fragmento de ASP JavaScript + + + + ASP JavaScript default + ASP JavaScript por defecto + + + + ASP JavaScript comment + Comentario de ASP JavaScript + + + + ASP JavaScript line comment + Comentario de línea de ASP JavaScript + + + + JavaDoc style ASP JavaScript comment + Comentario ASP JavaScript de estilo JavaDoc + + + + ASP JavaScript number + Número ASP JavaScript + + + + ASP JavaScript word + Palabra ASP JavaScript + + + + ASP JavaScript keyword + Palabra clave ASP JavaScript + + + + ASP JavaScript double-quoted string + Cadena ASP JavaScript con comillas dobles + + + + ASP JavaScript single-quoted string + Cadena ASP JavaScript con comillas simples + + + + ASP JavaScript symbol + Símbolo ASP JavaScript + + + + ASP JavaScript unclosed string + Cadena ASP JavaScript sin cerrar + + + + ASP JavaScript regular expression + Expresión regular ASP JavaScript + + + + Start of a VBScript fragment + Inicio de un fragmento VBScript + + + + VBScript default + VBScript por defecto + + + + VBScript comment + Comentario VBScript + + + + VBScript number + Número VBScript + + + + VBScript keyword + Palabra clave VBScript + + + + VBScript string + Cadena de caracteres VBScript + + + + VBScript identifier + Identificador VBScript + + + + VBScript unclosed string + Cadena VBScript sin cerrar + + + + Start of an ASP VBScript fragment + Inicio de un fragmento de ASP VBScript + + + + ASP VBScript default + ASP VBScript por defecto + + + + ASP VBScript comment + Comentario de ASP VBScript + + + + ASP VBScript number + Número ASP VBScript + + + + ASP VBScript keyword + Palabra clave ASP VBScript + + + + ASP VBScript string + Cadena de caracteres ASP VBScript + + + + ASP VBScript identifier + Identificador ASP VBScript + + + + ASP VBScript unclosed string + Cadena ASP VBScript sin cerrar + + + + Start of a Python fragment + Inicio de un fragmento Python + + + + Python default + Python por defecto + + + + Python comment + Comentario Python + + + + Python number + Número Python + + + + Python double-quoted string + Cadena Python con comillas dobles + + + + Python single-quoted string + Cadena Python con comillas simples + + + + Python keyword + Palabra clave de Python + + + + Python triple double-quoted string + Cadena Python con triple comilla doble + + + + Python triple single-quoted string + Cadena Python con triple comilla simple + + + + Python class name + Nombre de clase Python + + + + Python function or method name + Nombre de método o función Python + + + + Python operator + Operador Python + + + + Python identifier + Identificador Python + + + + Start of an ASP Python fragment + Inicio de un fragmento ASP Python + + + + ASP Python default + ASP Python por defecto + + + + ASP Python comment + Comentario ASP Python + + + + ASP Python number + Número ASP Python + + + + ASP Python double-quoted string + Cadena ASP Python con comillas dobles + + + + ASP Python single-quoted string + Cadena ASP Python con comillas simples + + + + ASP Python keyword + Palabra clave de ASP Python + + + + ASP Python triple double-quoted string + Cadena ASP Python con triple comilla doble + + + + ASP Python triple single-quoted string + Cadena ASP Python con triple comilla simple + + + + ASP Python class name + Nombre de clase ASP Python + + + + ASP Python function or method name + Nombre de método o función ASP Python + + + + ASP Python operator + Operador ASP Python + + + + ASP Python identifier + Identificador ASP Python + + + + PHP default + PHP por defecto + + + + PHP double-quoted string + Cadena PHP con comillas dobles + + + + PHP single-quoted string + Cadena PHP con comillas simples + + + + PHP keyword + Palabra clave PHP + + + + PHP number + Número PHP + + + + PHP variable + Variable PHP + + + + PHP comment + Comentario PHP + + + + PHP line comment + Comentario de línea PHP + + + + PHP double-quoted variable + Variable PHP con comillas dobles + + + + PHP operator + Operador PHP + + + + QsciLexerHex + + + Default + Por defecto + + + + Record start + + + + + Record type + + + + + Unknown record type + + + + + Byte count + + + + + Incorrect byte count + + + + + No address + + + + + Data address + + + + + Record count + + + + + Start address + + + + + Extended address + + + + + Odd data + + + + + Even data + + + + + Unknown data + + + + + Checksum + + + + + Incorrect checksum + + + + + Trailing garbage after a record + + + + + QsciLexerIDL + + + UUID + UUID + + + + QsciLexerJSON + + + Default + Por defecto + + + + Number + Número + + + + String + Cadena + + + + Unclosed string + Cadena sin cerrar + + + + Property + Propiedad + + + + Escape sequence + Secuencia de escape + + + + Line comment + Comentario de línea + + + + Block comment + Comentario de bloque + + + + Operator + Operador + + + + IRI + IRI + + + + JSON-LD compact IRI + JSON-LD compact IRI + + + + JSON keyword + Palabra clave JSON + + + + JSON-LD keyword + Palabra clave JSON-LD + + + + Parsing error + Error de intérprete + + + + QsciLexerJavaScript + + + Regular expression + Expresión regular + + + + QsciLexerLua + + + Default + Por defecto + + + + Comment + Comentario + + + + Line comment + Comentario de línea + + + + Number + Número + + + + Keyword + Palabra clave + + + + String + Cadena de caracteres + + + + Character + Carácter + + + + Literal string + Cadena literal + + + + Preprocessor + Preprocesador + + + + Operator + Operador + + + + Identifier + Identificador + + + + Unclosed string + Cadena sin cerrar + + + + Basic functions + Funciones basicas + + + + String, table and maths functions + Funcines de cadena, tabla y matemáticas + + + + Coroutines, i/o and system facilities + Co-rutinas, e/s y funciones del sistema + + + + User defined 1 + Definido por el usuario 1 + + + + User defined 2 + Definido por el usuario 2 + + + + User defined 3 + Definido por el usuario 3 + + + + User defined 4 + Definido por el usuario 4 + + + + Label + Etiqueta + + + + QsciLexerMakefile + + + Default + Por defecto + + + + Comment + Comentario + + + + Preprocessor + Preprocesador + + + + Variable + Variable + + + + Operator + Operador + + + + Target + Objetivo + + + + Error + Error + + + + QsciLexerMarkdown + + + Default + Por defecto + + + + Special + Especial + + + + Strong emphasis using double asterisks + Énfasis fuerte usando doble asterisco + + + + Strong emphasis using double underscores + Énfasis fuerte usando doble guión bajo + + + + Emphasis using single asterisks + Énfasis usando asterisco sencillo + + + + Emphasis using single underscores + Énfasis usando guión bajo sencillo + + + + Level 1 header + Encabezado de nivel 1 + + + + Level 2 header + Encabezado de nivel 2 + + + + Level 3 header + Encabezado de nivel 3 + + + + Level 4 header + Encabezado de nivel 4 + + + + Level 5 header + Encabezado de nivel 5 + + + + Level 6 header + Encabezado de nivel 6 + + + + Pre-char + Pre-char + + + + Unordered list item + Elemento de lista sin ordenar + + + + Ordered list item + Elemento de lista ordenada + + + + Block quote + Bloque de cita + + + + Strike out + Tachar + + + + Horizontal rule + Regla horizontal + + + + Link + Enlace + + + + Code between backticks + Código entre comillas hacia atrás + + + + Code between double backticks + Código entre comillas hacia atrás dobles + + + + Code block + Bloque de código + + + + QsciLexerMatlab + + + Default + Por defecto + + + + Comment + Comentario + + + + Command + Comando + + + + Number + Número + + + + Keyword + Palabra clave + + + + Single-quoted string + Cadena con comillas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Double-quoted string + Cadena con comillas dobles + + + + QsciLexerPO + + + Default + Por defecto + + + + Comment + Comentario + + + + Message identifier + Identificador de mensaje + + + + Message identifier text + Texto identificador de mensaje + + + + Message string + Cadena de mensaje + + + + Message string text + Texto de cadena de mensaje + + + + Message context + Contexto de mensaje + + + + Message context text + Texto de contexto de mensaje + + + + Fuzzy flag + Señalador difuso + + + + Programmer comment + Comentario de programador + + + + Reference + Referencia + + + + Flags + Señaladores + + + + Message identifier text end-of-line + Fin de línea de texto identificador de mensaje + + + + Message string text end-of-line + Fin de línea de texto de cadena de mensaje + + + + Message context text end-of-line + Fin de línea de texto de contexto de mensaje + + + + QsciLexerPOV + + + Default + Por defecto + + + + Comment + Comentario + + + + Comment line + Línea de comentario + + + + Number + Número + + + + Operator + Operador + + + + Identifier + Identificador + + + + String + Cadena de caracteres + + + + Unclosed string + Cadena sin cerrar + + + + Directive + Directiva + + + + Bad directive + Mala directiva + + + + Objects, CSG and appearance + Objetos, CSG y apariencia + + + + Types, modifiers and items + Tipos, modificadores y elementos + + + + Predefined identifiers + Identificadores predefinidos + + + + Predefined functions + Funciones predefinidas + + + + User defined 1 + Definido por el usuario 1 + + + + User defined 2 + Definido por el usuario 2 + + + + User defined 3 + Definido por el usuario 3 + + + + QsciLexerPascal + + + Default + Por defecto + + + + Line comment + Comentario de línea + + + + Number + Número + + + + Keyword + Palabra clave + + + + Single-quoted string + Cadena con comillas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + '{ ... }' style comment + Comentario de estilo '{ ... }' + + + + '(* ... *)' style comment + Comentario de estilo '(* ... *)' + + + + '{$ ... }' style pre-processor block + Bloque de preprocesador de estilo '{$ ... }' + + + + '(*$ ... *)' style pre-processor block + Bloque de preprocesador de estilo '(*$ ... *)' + + + + Hexadecimal number + Número hexadecimal + + + + Unclosed string + Cadena sin cerrar + + + + Character + Carácter + + + + Inline asm + asm inline + + + + QsciLexerPerl + + + Default + Por defecto + + + + Error + Error + + + + Comment + Comentario + + + + POD + POD + + + + Number + Número + + + + Keyword + Palabra clave + + + + Double-quoted string + Cadena con comillas dobles + + + + Single-quoted string + Cadena con comillas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Scalar + Escalar + + + + Array + Array + + + + Hash + Hash + + + + Symbol table + Tabla de símbolos + + + + Regular expression + Expresión regular + + + + Substitution + Sustitución + + + + Backticks + Comilla inversa + + + + Data section + Sección de datos + + + + Here document delimiter + Delimitador de documento integrado (here document) + + + + Single-quoted here document + Documento integrado (here document) con comilla simple + + + + Double-quoted here document + Documento integrado (here document) con comilla doble + + + + Backtick here document + Documento integrado (here document) con comilla inversa + + + + Quoted string (q) + Cadena con comillas (q) + + + + Quoted string (qq) + Cadena con comillas (qq) + + + + Quoted string (qx) + Cadena con comillas (qx) + + + + Quoted string (qr) + Cadena con comillas (qr) + + + + Quoted string (qw) + Cadena con comillas (qw) + + + + POD verbatim + POD textual + + + + Subroutine prototype + Prototipo de subrutina + + + + Format identifier + Identificador de formato + + + + Format body + Cuerpo de formato + + + + Double-quoted string (interpolated variable) + Cadena con doble comilla (variable interpolada) + + + + Translation + Traducción + + + + Regular expression (interpolated variable) + Expresión regular (variable interpolada) + + + + Substitution (interpolated variable) + Substitución (variable interpolada) + + + + Backticks (interpolated variable) + Comilla hacia atrás (variable interpolada) + + + + Double-quoted here document (interpolated variable) + Here document con comilla doble (variable interpolada) + + + + Backtick here document (interpolated variable) + Here document con comilla hacia atrás (variable interpolada) + + + + Quoted string (qq, interpolated variable) + Cadena entrecomillada (qq, variable interpolada) + + + + Quoted string (qx, interpolated variable) + Cadena entrecomillada (qx, variable interpolada) + + + + Quoted string (qr, interpolated variable) + Cadena entrecomillada (qr, variable interpolada) + + + + QsciLexerPostScript + + + Default + Por defecto + + + + Comment + Comentario + + + + DSC comment + Comentario DSC + + + + DSC comment value + Valor de comentario DSC + + + + Number + Número + + + + Name + Nombre + + + + Keyword + Palabra clave + + + + Literal + Literal + + + + Immediately evaluated literal + Literal de evaluación inmediata + + + + Array parenthesis + Paréntesis de array + + + + Dictionary parenthesis + Paréntesis de diccionario + + + + Procedure parenthesis + Paréntesis de procedimiento + + + + Text + Texto + + + + Hexadecimal string + Cadena hexadecimal + + + + Base85 string + Cadena Base85 + + + + Bad string character + Carácter de cadena mala + + + + QsciLexerProperties + + + Default + Por defecto + + + + Comment + Comentario + + + + Section + Sección + + + + Assignment + Asignación + + + + Default value + Valor por defecto + + + + Key + Clave + + + + QsciLexerPython + + + Default + Por defecto + + + + Comment + Comentario + + + + Number + Número + + + + Double-quoted string + Cadena con comillas dobles + + + + Single-quoted string + Cadena con comillas simples + + + + Keyword + Palabra clave + + + + Triple single-quoted string + Cadena con triple comilla simple + + + + Triple double-quoted string + Cadena con triple comilla doble + + + + Class name + Nombre de clase + + + + Function or method name + Nombre de método o función + + + + Operator + Operador + + + + Identifier + Identificador + + + + Comment block + Bloque de comentario + + + + Unclosed string + Cadena sin cerrar + + + + Highlighted identifier + Identificador resaltado + + + + Decorator + Decorador + + + + Double-quoted f-string + + + + + Single-quoted f-string + + + + + Triple single-quoted f-string + + + + + Triple double-quoted f-string + + + + + QsciLexerRuby + + + Default + Por defecto + + + + Comment + Comentario + + + + Number + Número + + + + Double-quoted string + Cadena con comillas dobles + + + + Single-quoted string + Cadena con comillas simples + + + + Keyword + Palabra clave + + + + Class name + Nombre de clase + + + + Function or method name + Nombre de método o función + + + + Operator + Operador + + + + Identifier + Identificador + + + + Error + Error + + + + POD + POD + + + + Regular expression + Expresión regular + + + + Global + Global + + + + Symbol + Símbolo + + + + Module name + Nombre de módulo + + + + Instance variable + Variable de instancia + + + + Class variable + Variable de clase + + + + Backticks + Comilla inversa + + + + Data section + Sección de datos + + + + Here document delimiter + Delimitador de documento integrado (here document) + + + + Here document + Documento integrado (here document) + + + + %q string + Cadena %q + + + + %Q string + Cadena %Q + + + + %x string + Cadena %x + + + + %r string + Cadena %r + + + + %w string + Cadena %w + + + + Demoted keyword + Palabra clave degradada + + + + stdin + stdin + + + + stdout + stdout + + + + stderr + stderr + + + + QsciLexerSQL + + + Default + Por defecto + + + + Comment + Comentario + + + + Number + Número + + + + Keyword + Palabra clave + + + + Single-quoted string + Cadena con comillas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Comment line + Línea de comentario + + + + JavaDoc style comment + Comentario de estilo JavaDoc + + + + Double-quoted string + Cadena con comillas dobles + + + + SQL*Plus keyword + Palabra clave SQL*Plus + + + + SQL*Plus prompt + Prompt SQL*Plus + + + + SQL*Plus comment + Comentario SQL*Plus + + + + # comment line + # línea de comentario + + + + JavaDoc keyword + Palabra clave de Javadoc + + + + JavaDoc keyword error + Error en palabra clave de Javadoc + + + + User defined 1 + Definido por el usuario 1 + + + + User defined 2 + Definido por el usuario 2 + + + + User defined 3 + Definido por el usuario 3 + + + + User defined 4 + Definido por el usuario 4 + + + + Quoted identifier + Identificador entrecomillado + + + + Quoted operator + Operador entrecomillado + + + + QsciLexerSpice + + + Default + Por defecto + + + + Identifier + Identificador + + + + Command + Comando + + + + Function + Función + + + + Parameter + Parámetro + + + + Number + Número + + + + Delimiter + Delimitador + + + + Value + Valor + + + + Comment + Comentario + + + + QsciLexerTCL + + + Default + Por defecto + + + + Comment + Comentario + + + + Comment line + Línea de comentario + + + + Number + Número + + + + Quoted keyword + Palabra clave entrecomillada + + + + Quoted string + Cadena entrecomillada + + + + Operator + Operador + + + + Identifier + Identificador + + + + Substitution + Sustitución + + + + Brace substitution + Sustitución de corchetes + + + + Modifier + Modificador + + + + Expand keyword + Expandir palabra clave + + + + TCL keyword + Palabra clave TCL + + + + Tk keyword + Palabra clave Tk + + + + iTCL keyword + Palabra clave iTCL + + + + Tk command + Comando Tk + + + + User defined 1 + Definido por el usuario 1 + + + + User defined 2 + Definido por el usuario 2 + + + + User defined 3 + Definido por el usuario 3 + + + + User defined 4 + Definido por el usuario 4 + + + + Comment box + Caja de comentario + + + + Comment block + Bloque de comentario + + + + QsciLexerTeX + + + Default + Por defecto + + + + Special + Especial + + + + Group + Grupo + + + + Symbol + Símbolo + + + + Command + Comando + + + + Text + Texto + + + + QsciLexerVHDL + + + Default + Por defecto + + + + Comment + Comentario + + + + Comment line + Línea de comentario + + + + Number + Número + + + + String + Cadena de caracteres + + + + Operator + Operador + + + + Identifier + Identificador + + + + Unclosed string + Cadena sin cerrar + + + + Keyword + Palabra clave + + + + Standard operator + Operador estándar + + + + Attribute + Atributo + + + + Standard function + Función estándar + + + + Standard package + Paquete estándar + + + + Standard type + Tipo estándar + + + + User defined + Definido por el usuario + + + + Comment block + Bloque de comentario + + + + QsciLexerVerilog + + + Default + Por defecto + + + + Inactive default + Inactivo por defecto + + + + Comment + Comentario + + + + Inactive comment + + + + + Line comment + Comentario de línea + + + + Inactive line comment + Línea de comentario inactiva + + + + Bang comment + Comentario Bang + + + + Inactive bang comment + Comentario Bang inactivo + + + + Number + + + + + Inactive number + Número inactivo + + + + Primary keywords and identifiers + Identificadores y palabras clave primarios + + + + Inactive primary keywords and identifiers + Palabras clave primarias e identificadores inactivos + + + + String + Cadena + + + + Inactive string + Cadena inactiva + + + + Secondary keywords and identifiers + Palabras clave e identificadores secundarios + + + + Inactive secondary keywords and identifiers + Identificadores y palabras clave secundarios inactivos + + + + System task + Tarea de sistema + + + + Inactive system task + Tarea de sistema inactiva + + + + Preprocessor block + Bloque de preprocesador + + + + Inactive preprocessor block + + + + + Operator + Operador + + + + Inactive operator + Operador inactivo + + + + Identifier + Identificador + + + + Inactive identifier + Identificador inactivo + + + + Unclosed string + Cadena sin cerrar + + + + Inactive unclosed string + Cadena sin cerrar inactiva + + + + User defined tasks and identifiers + Tareas definidas por el usuario e identificadores + + + + Inactive user defined tasks and identifiers + Tareas definidas por el usuario e identificadores inactivos + + + + Keyword comment + Comentario de palabra clave + + + + Inactive keyword comment + Comentario de palabra clave inactiva + + + + Input port declaration + Declaración de puerto de input + + + + Inactive input port declaration + Declaración de puerto de input inactivo + + + + Output port declaration + Declaración de puerto de output + + + + Inactive output port declaration + Declaración de puerto de output inactivo + + + + Input/output port declaration + Declaración de puerto de input/output inactivo + + + + Inactive input/output port declaration + Declaración de puerto de input/output inactivo + + + + Port connection + Conexión de puerto + + + + Inactive port connection + Conexión inactiva de puerto + + + + QsciLexerYAML + + + Default + Por defecto + + + + Comment + Comentario + + + + Identifier + Identificador + + + + Keyword + Palabra clave + + + + Number + Número + + + + Reference + Referencia + + + + Document delimiter + Delimitador de documento + + + + Text block marker + Marcador de bloque de texto + + + + Syntax error marker + Marcador de error de sintaxis + + + + Operator + Operador + + + + QsciScintilla + + + &Undo + &Deshacer + + + + &Redo + &Rehacer + + + + Cu&t + Cor&tar + + + + &Copy + &Copiar + + + + &Paste + &Pegar + + + + Delete + Borrar + + + + Select All + Seleccionar todo + + + diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_fr.qm b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_fr.qm new file mode 100644 index 0000000000000000000000000000000000000000..80f7293ccde842b102b1efd9d91a69ec133a2cf8 GIT binary patch literal 53842 zcmd5l33yaR(jAh?F_}z4!VShD+@}~31yOSWiE;!IkOdVdnMpD-nTc}%5foGq@x%j9 zRJ=vO6K_#;Mcw~jU3WqKU3XX4gOz{R_4inHfA{zQt6t6P_vXERZ{C|s^xu4Lk;!y* zb#+yBRdsdu%%^>W{_TtH+uj&H?8US0*!#yC#!9|tY<_^TbDw5x;jb9G{RqYuPi5?e zI|=T*kg;W}89RO-!T7^0=d&9byS|h;>W^jY)@J6|d62R08<}I*H}LyDf=}Pe#w~w^ zvDLL~x;u}tv(~Yi&fSb{eU;6*_yWLH&+2d7!q~MXZ0=1hjE!z1xbbs>+dd$8?+a}H z_0adz1#Hop=NX$Ykl@5~2{w!*xc&#WJ7N?&{h}urn|?RJ$KPaUI%AAQYFYT% zJ&gTgH;aDw7sk#R%g%k^N5&rbg00;O^vxZ`?t1)pjCsFd_x$cV#un^nyQiMd*qo2p zlfQ>{D<-qohQRoC{|Ec^`+XKvFxK{L)=Qm8&rX65zCm!$jRc>$KkKbS z@coK!367ahaQp`ZD?13ze28H6jRfmIBe;G)!Ap)Jc(se*^*<22bs)hzz9V@5bp#)( zBKT}K!F`LfKD-j<``Bl)KD-U!wCt=8f5hLzSs#7>IAce}vp%g_%ov-R_35LZ0(_%S z!2|mlYkZ;4@Hbv&?8V)EMjY`E#_s?3KJz<3W{2(Q(@|2%Sl-Qj?p*OMV}Y0Z9GDL6 z3+DAX&;{+B{j+nbfNzi8knPTm!}rH$mn;ChLm$gN&UFoARnKS7oDTeS?8rXt@#`2{ zzA*cO-$MJWw(L!1BN;pG&)J(Eg7)pVXJ5W?4`Ty2WWN-Cg0Tlr%Kpu;dthFNW`B7y z;5qw1_V@ci4sxE)$@|L7<|CO`+??6ZYjX7~=X|_$9b@zx7pzd(|4oT!S40r~RF=TiOXeanLcaHO5#|+~H~dgt1efbBvq``g~To zW8w-J=faO2Rqs_ZRy&*Eg`X3=ax=k4S_wWm7+?*2?=FHD%_Vr{A%c&*Oz_Dy0Baem zV+1dHkll-3jA~tJh78t!@=BZf8%4U-@)ANW5? zG!ksMmf+fd5xk%e!A&CxUUD13%NG&6`T)Tj+6dm6fIDZ??+@)H_{2>FpZ$d3-kS;T z+n4*>y~o42#^fH{ypgf-19Lw-1mo$NnwRGWz1^@OulPQ&1J3vJivR9ltZ;4Kz?~If zx1P=$Hx2Ao?!mlq>z@GV%A2+h`1jB!c`M={ft^~B=Npf5w+~9-^UvOUA=s%`^TS8O z_lFG0U-u5It9{nyZ#XcJv8CJdFWO$i*yCICH-8M{sXCe9`7;P!b$9-y!DhzX1M{ys zAMEjjiwRD;g5dOb2yQx*zwNO-jLoaczqhg#fsgAp7lg0d0eJsZu(c}2*uz&A+<*JK;IEVw?E3CI@UNT& z54#_O`8>Pe(KF%q;DCZXS@8Ga&l4Q=CxVl&Avo<7f+yq>oU@qV=H&#poknoSLj>=g zMsQbi!LyIRI&%B`f?q8i3I5rvg7-f^5&Xe7oGbuz7jJNueQ^-h+b-vz|D4L0zn^o= zUjR;aImbWN#Mr381h3so@b34V6BfYVw_oI(@)^wE)(U6CIVUkT<{!?cLonaBUqXGa8v_I{exKl$ zHiDO~BzRpe!R;pzye$E5KS00V(?RgTs|Y?enBbm11fMA(`22|kUp(6BTMy%%^tyB9 z?GqWh*iZ236P)MxK`)k8JELQPzqkC4bKCd8U+;O&?N9g^yY8U#j{jZ+e$hPVBkzD5 zH&-~HzdQ!>yMf@SI|z<@kKn{Cf|HjJoOTJp87~p69!zjnE5X^P6P!~<@Z55O>uU&Z z+(q!>kpwpnBe>-*f|q_n@T!jqUUvh*?FR|ob`ilHVS@Mkli;pF1Rwha!99ugPrX6E zKa;@w{CfKR#V+S>&jmSKw%_^LvSyI470$2A?g2mQu=DF>$1+y7rLbtl9+1Cbh3=C< zUVO_6E3VoEcK+DHF}r||mC?$`)+<+{QXDqm-8K&0@5GoJ!}t}m>90oIZJqYG!f z`wGMZI}2CrI0$~-_l2!Xz#i0{QRo{C>+S^y3VrkM2LI~DLVrKNv--!v4O2&ge|4zv zs)PN(uRE6DvLb>{zg_rZcOU5IyTaGjl`=NvdV(`gB)Ge)@ZW0UFyFfi4{U>eE<05C z#{~|??l_*{yzm+P%+z+b=F_0}Qa;~77=zRc;z*wGQ! zcV7S>m)!6AVGP(I|NX8X*TDDYk1Q%Jnhf$hi{L%?6_wo!yfT6pt|fS7e}dQCLhx=M!RNXN zzVKYpgCEDBpL&8P93r^8qUhzbK81N&TlDVajbOj?ioWayIcRdZ`y4n8;=$Y9MXkX9 z{HVLQ@G!*D|K%R@-0xr=dec4KwTZDsm%C5A+YfQX3ipyNuQAry?mle~$Z2cXea2-l zj>Ti${_C3=JN<2U$7;au9pw&u8euH_l{;AOgShqg?$w9jd*S8owZ*`Pg`3>BAYV`4 z?7k}>@Qv$BaB3dGI4H^B!A2tEwo`v=&kdB1eu z^Wq-pZqPf!p&VG}hP&UI3-lJPb{|*?e*G0Y+ra-iWj{JpRZh39IrYE>*zj$lPU>5 z_i^!-O6afce~Pz`i$U~MS^Pw37R1Z17w9$Em)KVq~AQu2fup&k5~Ht0BeWu;3uu{_c(mh3%|#tPyFyN59@@M z*mD%VLH$R0|3}t_L#zCem?!EF`dedxaL5x2dxGKB{)ng58};`xVP1B&EyChmU1o$$ zkvP@`<3)~H;1TCT-`a3jx2H88iTFb?PcRS?k9@SSgD5*JO=~N#U7940)-9psycKej zh>o)^+eDYt#$#4#*5Ws&xd^eElYA1J#oFM<3lilA`9e910l$4PnJ9-|NeYo2pTWO$ zvdP&qs1Bqq=I3K*?eIpttucQ@$fzpT1o*q)2XRL2YXtANOw+I7eAg!pR1v8zX^1%6 zIJkEBEe^x(kbV=Yr><-4Qc^X4TTD3GC6-2;Oo$IS69%G4`^^dIm*9a+NF>nSA*RHP z?>OJsPXr`D);it%^T7{J^w|~huL^|YQIGkAA8*0}?6?yKOJb*)1>T`N(W}D|pDDNP zb*17n?@H#U+?6pu&j+DeBh69BK!$b734=wMM~y=3-VWl1_CFwfiZd_+TbFm8?u=a?zt3&9MgnCG<&NBdY zQ_^21UH1R*e|RQ3y$bxNU>2S0|? zMtVrC4=8FuKSkoJ)~6v(`yh70bWkFA=akDqK@#QB7+3=2vM<~k?=;Pj_|l@?syCqZ zT!!gXEtSuep1i8*Gxi27Q)lQ61bf6ic{RYm$;=zj(mC9Si{{?Icu0mJs)!V)sk1;N za=4l&n8n2_e|9+1+2;3)m&3`d0gM6W6EL6Th5wYCCq=j(_zM~aKm0Y$v6eK1d?=Mt zxawbJkWZZrg&&83B8;51d8>5d=hAuMRelQ&Xq}~gjm0Y2$<*{}C`$8F_G(pJlKUT+ zJZf_hS!98Tbe%#Xg!@?L!Eoxix99B9Ebz_^P5IK44Ctv7r(uKnYMrV15cv>;B*C!i zko9CjM7@`3djE-LL_~^~5$023%!pL(huBG?-W7Ml+%Y=EP(D-jZtVOFlcqwUAhpA@ z!~zvPacatCiflMC^@cR5odG+^q7sRUR1S)_$|z0sIBcY8cr1fBryL&=$N+7(rHB-Hy)o#5nxaEXy10tYJtq;M$p$?Oy7$e_$a8qj}91P+{L?UXD{b^yR zGo;aBNJRU&xc!9bM+}zK4nBP%cISsGUFu|C*lC9(2sj>TqZ&FRLx8RruGILc;_7t) zak%A-scv%GkTc3YnOZ$G+tYjs#wJL_ZRkL&HyG?j2DO4e7g2Tw4L2dCNi&l?FEl5s zfHGWM)oR1(;l0aqvMS(TZNZnDCYTdD-3^oni`}I%1vRV&IIe8lD||;cIVy2lagmRL z*r648k1hBd@o^4l4!5@l{hmN53Vc2aJl9C9yGyKA{h;(93_qQ~J+Ceb&s!D_cLE-v z_zX&F8Ubiliqc+jBjqC}j7i3$=ZqDs5V z9R=)TAr`{a1sO4|Cbi*z5il|kD%@y-T} zx&mzh+OXI6?`HF${}`JD6a?8}-Z1Y}f4A(Q>06DJmI3{YBNvhLdL?$v#ocr?;D!R= zV)G?2YDwna{CH=J5%r~P0Yr<3p#ess$wSXy0EH;tSXio5&<~+hAII~-=Qal8?W8{X zhNs(*wR+YJ{GDqebyzdhDMh@vcqvjhv^f&!0%PE_EPNCBvVifoVstRcgwh@W{CY0A z7K5?z`21}!JyOK4A8iV|DI6}-k9?T|El zfLLlcf;=p(N{EM`xpe~}X#BHS2mu`~5IeNF$+GI06^W3b3Yts>O>YIRlVQY(#B#BO zxJ#ds$rHO51MB^;NXuRf%ycl&8AzBTL1$^16#*VAc16%Er410Yv1|kcZ71rj0Ou$= z@Mu^%VR=lp=w*$t2iFN@Q4x=SO_w(mg`zwInJ<9?8FI=J9x#{o+$Qj(ypnYi5QZ^E z(u5`yF9y~QQ-_D)ckw!wWKno;Lz`gLQdY4JwNMz4o(YvnB1UE2`X!U2EUE%l*fAS! zmDP#0lG(9tH$<&H+-M~N6JWeQQ5=LNRmwVFf;rkq$QxA0DI%0J0VU=)aU+-Dkqto$>h1DFx#Br-KNQfT*6N4Y2#m(y97~1CyKINw!%`U}<}uLU!~l(aAIjk<&Mk#) zNKcG)OH?S{=+HUAa0}XE$Q(ueQ4bnP45z`>mHbmZEor$vdNk$95fu=33Jef8%B2-u zVbCewRo=RAt7oMs(vq29srDBoHsEk+6Fw2M8TQa$(}Tw^dzpHwaZM7%@VNZRQC(DG zGu5ez$23sxF&gWJ;3b8YRhje&T4tl)!J2+kX(d+2uK|HUKU`gGQY21Zmx|0L zO4^mcp{bZ8CIPBv;mr!FW8gfr#A#nZ-*OnF`|v0P3Q_>b#lQxQO%wba&9M~KHZ>jX z0U3f^POMuaJP8`iFjXdDs_X%#W0Ei(lL8a&lkjzow{+LyVw9-h*CwW5q&D49JySCw zygl(45<|!V^HIk~UD!~UV#uZNeN2LdK^Exvgi@zf(9qcxj=<>$P3l)>S2|WMLFNz; zL3BIfU{S&eOOtR#IPtE=s6XxtPmO+iP5;Etq98VDM4v=vsaU>mKirv zsDNm1$PVLqLvk>XfW@Nzox%D0PzCvBVpUYaPr4 zS1bk+dR4*@Ky83&j|~fLFrC`T1*CY1Kholj1v*tb1I0WGQQHLP<+>!j&dk0^e+6~8 z4XU)r`LJm?Ops(km~C4S6ME8e%1!X~#5*@Z+dFQ$NrzUvNR#F%-AR+SmMyLcj^1@J zO*$TH)$`{HUb;x=*qik6vw5>7G-X1sZ7)(L^z^oWYtnUQ46&0N;yTItmcn|W*>2_{ zR8XrvHLYzqNS83ca#RSaczai!CQqP6f!i2-SBb~X+AM(3DThFxpO|i2J4U(#adT#YjwC8B_wR?(O ziT;w2S7rja5)dXMKSqRn2owP*hraPn4J)+;Iu(PlmM2XaR`Sxl7P$SM#PCJ_PN>x~ zojB_QFX79|th$ET)wRvi#M|L}DaQZ@IbsoS=(yvuvi}$U$4Bmh8)agFP#mHb8ojUy zNPu;+jWA@w?XVqA7!l*q)>?u6!Ne18Yv7S9MW*`FaT}P_HdPUp5#F?xIU{6a1w>-x zjHy_JQApBBdog@EOBEBO|i zYLiCB36LszlYqBRvL)AS)1WD5{aNr=9@SC7@)a#@83 zeBf?yAUc5Wc#uEY)Jptq?2dK7#e&iF)H7|q7*%Li z0yC_ARctb~{$us04N~wzQs9K(;}*7j96_MKy(gPSmRv2HHmvxX3@8x=GkDIQO1#9C z%tnFVXw`&4WqNBhIVHpc)v$1NELJ{_i( z$4(GuuUk`x&CXFLgKj}wQh8FtlBUs`A2rcX36?^N5PcL{Hj`Z)Y5iC_sWzM_oY$Q- z;(mzLx+Z~raYFZX;A1tjYChGD+PdoIYJ)YfTwS;U{E|z!FgL4Cbh>8IJxX3rjA}Xr zonwj%vqZ8Rh$Zw`o`**@mxBDyVtkxX{;P5VqlwK)8qN6Gfe0KB$HVJ%E+=8# z@J1wW$kQ|jhKL{OQrmolb!kv*OizWD9?NuK4V;)4iNl1P`!1wCMMPZAlp}~{W}9%C zn`=APKpC;2QYdVJ`Q;K1at8mmFCJ`7Ea(1wYa z3QB4_rO#Pfp6JkC8h?C>1e=NpyeC;EQl``7RZW<>=jh~_GdDj&bjE>82FFyCV1cQX z@EBMLJ-Xrqx)kOj^D<>*G-R2wVK?mT0;}d47N@b22Z4uKWnaNw3ce!2J^ShR-ly4! z!5W%v@Hx3+Jdt}!;mMRrIVb7ND_*Z;Qd6Q_SYVt_a#_e=8E1~P*)j#2aR#&;{BtSC zmSUWQ%Y1}(@+(TOc8&62iAOd}@&HZMyp~N)2_Zi;FYvrFJ1`@`rGeRyS3Kmxv$ZgP z3Qwb;@px|oUatb0&y8!DG}LI9zct_u!qt~1XwJ6zkXRaU2x%;eDx(st8BPDBgtG*`pO5Az3M9r1SqvTcS-0} z*0oSZXlx0msZTZoWy%H$-r7iM9f6C+X)aqFN?cGXZFj7aPeco-9%~rPX=IxtFX1w5 zUNkUTP&8l`)+u<+{Rez>0+$)1awH?V%Q)RBqZyAbhhl_OA=*5qDc8g_M)-<3k*1N& z3>#^$)Lofw`!}cG6-aKX{OKS*UTfLYe6|>V)E7$REMDADhek&^wck)jmEg&qx}5wK z?WZa?Md>dmR+Q$HrUmn*5_9WEVFZmccY~G|dD6L_?1n`R$+no2uRmjY3V4MJ*nF1SB?P|(cyUs3)Ec9Ro(bejJPJvtxJK<*br%wjtY@;4U53}P*a{Z(ee-k$?`!H zL0gX|iomPU&|>4_)D7u)#mO#$YeUhCSB}~W(3L`3Omi;|AAWwL>LMILTVyDv#?!jt zPk_%(*-+ZRDfiuME$||l$m(mRCn^?Aj`lfi55?-E%w|N;| z2j_z8;P`ED$;-E_4LveodaBxls*Xo_tWwX!ojO0|cqAp*Lt|*+Lk!Ps>ag;KDjvymU})8FQPxk#@gy zQ=CC7i}!&Uw6?y&sS!k0`rzg?$yIQJ*R9IHa>2=KqSPx&j6u^9X{{H%kfgq}LAiQt zo;Mcswn)9&kvJg&>*E$S&%}Xfqr)JE&$9?ANz2U;VzT0C2pgtcn1!t@Yo4%mCMLjW zcf#;0e<3AyM6r+?zs3cU99tJdUDHx{6$)P!LT?HaNpNE=SH6Np{x*0IA#q8yt|`_$ z;+b*0!Wkb?!HlpE{)LF>YFtQ}a%4p{UZ2Moi1^{{o>iJl2^$wIv8|8F@+7xTzL-R= zji>Bb(#0gTRDZ#5l+mNI&QN{ZQb?2=F`=N&oB?U6p`L`4s-$l+1(F^uaQzOw`h<}Z zUO795yLoh-IaUj5rDW)Wma}0}AuOtGnj`sk-mWe`95~QjZZ1!hWu4WNIbP_wqIZ25 zWDf-ybIo|JLdj$G1OFQGsQ8eNk;5rdrcbD1#)96#(s!bCF+kOYl2X-pwQ?sJa^_`p zGvGu`;*xhM!o}OoPz{k4(tV&RXZgZHMs%uYjPfwx2kx*J$<8&BeLV43dWD8 z8f34KF595342)hv@B{vtYQ=Wdd1GF<8=XJ%D8OjlMH4hm{}r*MaEs6V(7L4O2(8Ra zCbTGt81*Y+$>b>MPys7aWjq8;+^`Fe`vI7hZCAPYIrZ?OA=*wso1fybJ}#_jEgJ%& zt(bd3vy?_z(8jV!7PQTUB=Z8*He+_<0%;pq@YO-|RagLx?rnELV-GyBE8X30FqsvJ zlsx*{81>1P3$++)XwOl}V&8@8_hCI_&lzWc6l>{GqKuKM(Uxk__5g20MXnBSBz<~U zo8euZKHfEEc-I)=&Daj2K&))O=ExN_eLI|#by4haQ_`(lKb0L$B1SbihAAKc3kSgp ziO($KQDEHQqK!*f9r@r~P4Si}6rjQ`r1o-F&d>^#b0VL2!3|C2axo=nbu~#hhS8>s zfl~GZe0V?*uL0%H9dU{Zn<2`N2Kjxdf??V58(Ral&)vC$1JVY>{$JF>HyOxQWA%N`K98$PuU9u+;#Fm)hWm zoHlygLoJNXYIw@4JtSX^p~6F@7_b>`JEdocB(3R6rlUerM`%`lS5!ym51(XkvM zX+L2iN3nuE&5bOIw{%P9G!3(?cuE|L9ZyNnJYyLaPLOp=EFdQn8rg&N1|Nj=^agLz z+lE`fEf?&x@#lTH_0OfJdXrsqPUaw}{l@G%t}jWcMc%%s-uN|pj^?LG%<#_ATAl>_ zva&b{nrRi4w#x8XTV04l091=pewVU?V_7 z=YpQf*EAUyCb&n)cf|-w6Pgy%Ne(;9gtC7wx6VL~gpA7i@}MUp6QX2$b|rH z^{rCcSbY=ACRX3nczd>qEd=ew>(_&j0#lM_B`{s%8-wwvtg@*8dc^wUbEy%kj?d{4 zmP-ZYIB)RYI?Rs|x?)Zrl$LjPN#;q9EfacZ+obEs=%v~YS)=Ttw^-YeE_#c#9qFRC zSamIB2isdI6lIqlbqOQN2Pw1h#ACZ#Coo20Sc$pcPfvq|5-U9)QXq-D?1 zTeR9T3+z&F(Q2oQ-lEl((Oa|HDyI6EN~x-}Bt6j-Zjx|(*dEPuTTPFgqI9>9Tsx2T2UMd+H3;Zq;bkjYAIqhFm>3O! z0J9xsQJ#2R;*SJ^;dYxAOWZy!X%wR}juI{3%OFOaQe?%=EK9Apd3|Cl8t2*vGwcCR z8tYG^aBBtbEFYFW!vi5$tBOMu-!r2G#TBrL9S-@tk#6~hi^M?!AKskS7Vt-;;{;-I zdZb5Ul)bG=;$H2@yrMF{s7^fEnU3w{jY*R=Q4!3aQf;fMLFQpYDLgC?$5IZskx>;k m35ZKen*@05*>*m>l!_wg%CeRS+gd#xr)hi%n8Q9 + + + + QsciCommand + + + Move down one line + Déplacement d'une ligne vers le bas + + + + Extend selection down one line + Extension de la sélection d'une ligne vers le bas + + + + Scroll view down one line + Decendre la vue d'une ligne + + + + Extend rectangular selection down one line + Extension de la sélection rectangulaire d'une ligne vers le bas + + + + Move up one line + Déplacement d'une ligne vers le haut + + + + Extend selection up one line + Extension de la sélection d'une ligne vers le haut + + + + Scroll view up one line + Remonter la vue d'une ligne + + + + Extend rectangular selection up one line + Extension de la sélection rectangulaire d'une ligne vers le haut + + + + Move up one paragraph + Déplacement d'un paragraphe vers le haut + + + + Extend selection up one paragraph + Extension de la sélection d'un paragraphe vers le haut + + + + Move down one paragraph + Déplacement d'un paragraphe vers le bas + + + + Scroll to start of document + Remonter au début du document + + + + Scroll to end of document + Descendre à la fin du document + + + + Scroll vertically to centre current line + Défiler verticalement pour centrer la ligne courante + + + + Extend selection down one paragraph + Extension de la sélection d'un paragraphe vers le bas + + + + Move left one character + Déplacement d'un caractère vers la gauche + + + + Extend selection left one character + Extension de la sélection d'un caractère vers la gauche + + + + Move left one word + Déplacement d'un mot vers la gauche + + + + Extend selection left one word + Extension de la sélection d'un mot vers la gauche + + + + Extend rectangular selection left one character + Extension de la sélection rectangulaire d'un caractère vers la gauche + + + + Move right one character + Déplacement d'un caractère vers la droite + + + + Extend selection right one character + Extension de la sélection d'un caractère vers la droite + + + + Move right one word + Déplacement d'un mot vers la droite + + + + Extend selection right one word + Extension de la sélection d'un mot vers la droite + + + + Extend rectangular selection right one character + Extension de la sélection rectangulaire d'un caractère vers la droite + + + + Move to end of previous word + Déplacement vers fin du mot précédent + + + + Extend selection to end of previous word + Extension de la sélection vers fin du mot précédent + + + + Move to end of next word + Déplacement vers fin du mot suivant + + + + Extend selection to end of next word + Extension de la sélection vers fin du mot suivant + + + + Move left one word part + Déplacement d'une part de mot vers la gauche + + + + Extend selection left one word part + Extension de la sélection d'une part de mot vers la gauche + + + + Move right one word part + Déplacement d'une part de mot vers la droite + + + + Extend selection right one word part + Extension de la sélection d'une part de mot vers la droite + + + + Move up one page + Déplacement d'une page vers le haut + + + + Extend selection up one page + Extension de la sélection d'une page vers le haut + + + + Extend rectangular selection up one page + Extension de la sélection rectangulaire d'une page vers le haut + + + + Move down one page + Déplacement d'une page vers le bas + + + + Extend selection down one page + Extension de la sélection d'une page vers le bas + + + + Extend rectangular selection down one page + Extension de la sélection rectangulaire d'une page vers le bas + + + + Delete current character + Effacement du caractère courant + + + + Cut selection + Couper la sélection + + + + Delete word to right + Suppression du mot de droite + + + + Move to start of document line + Déplacement vers début de ligne du document + + + + Extend selection to start of document line + Extension de la sélection vers début de ligne du document + + + + Extend rectangular selection to start of document line + + + + + Move to start of display line + + + + + Extend selection to start of display line + + + + + Move to start of display or document line + + + + + Extend selection to start of display or document line + + + + + Move to first visible character in document line + + + + + Extend selection to first visible character in document line + + + + + Extend rectangular selection to first visible character in document line + + + + + Move to first visible character of display in document line + + + + + Extend selection to first visible character in display or document line + + + + + Move to end of document line + + + + + Extend selection to end of document line + + + + + Extend rectangular selection to end of document line + + + + + Move to end of display line + + + + + Extend selection to end of display line + + + + + Move to end of display or document line + + + + + Extend selection to end of display or document line + + + + + Move to start of document + + + + + Extend selection to start of document + + + + + Move to end of document + + + + + Extend selection to end of document + + + + + Stuttered move up one page + + + + + Stuttered extend selection up one page + + + + + Stuttered move down one page + + + + + Stuttered extend selection down one page + + + + + Delete previous character if not at start of line + + + + + Delete right to end of next word + + + + + Delete line to right + Suppression de la partie droite de la ligne + + + + Transpose current and previous lines + + + + + Duplicate the current line + + + + + Select all + Select document + + + + + Move selected lines up one line + + + + + Move selected lines down one line + + + + + Toggle insert/overtype + Basculement Insertion /Ecrasement + + + + Paste + Coller + + + + Copy selection + Copier la sélection + + + + Insert newline + + + + + De-indent one level + + + + + Cancel + Annuler + + + + Delete previous character + Suppression du dernier caractère + + + + Delete word to left + Suppression du mot de gauche + + + + Delete line to left + Effacer la partie gauche de la ligne + + + + Undo last command + + + + + Redo last command + Refaire la dernière commande + + + + Indent one level + Indentation d'un niveau + + + + Zoom in + Zoom avant + + + + Zoom out + Zoom arrière + + + + Formfeed + Chargement de la page + + + + Cut current line + Couper la ligne courante + + + + Delete current line + Suppression de la ligne courante + + + + Copy current line + Copier la ligne courante + + + + Convert selection to lower case + Conversion de la ligne courante en minuscules + + + + Convert selection to upper case + Conversion de la ligne courante en majuscules + + + + Duplicate selection + + + + + QsciLexerAVS + + + Default + Par défaut + + + + Block comment + Block de commentaires + + + + Nested block comment + + + + + Line comment + Commentaire de ligne + + + + Number + Nombre + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Triple double-quoted string + Chaine de caractères HTML (guillemets simples) + + + + Keyword + Mot-clé + + + + Filter + Filtre + + + + Plugin + Extension + + + + Function + Fonction + + + + Clip property + + + + + User defined + Définition utilisateur + + + + QsciLexerAsm + + + Default + Par défaut + + + + Comment + Commentaire + + + + Number + Nombre + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + CPU instruction + + + + + FPU instruction + + + + + Register + + + + + Directive + Directive + + + + Directive operand + + + + + Block comment + Block de commentaires + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Unclosed string + Chaine de caractères non refermée + + + + Extended instruction + + + + + Comment directive + + + + + QsciLexerBash + + + Default + Par défaut + + + + Error + Erreur + + + + Comment + Commentaire + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Scalar + Scalaire + + + + Parameter expansion + Extension de paramètre + + + + Backticks + Quotes inverses + + + + Here document delimiter + Ici délimiteur de document + + + + Single-quoted here document + Document intégré guillemets simples + + + + QsciLexerBatch + + + Default + Par défaut + + + + Comment + Commentaire + + + + Keyword + Mot-clé + + + + Label + Titre + + + + Hide command character + Cacher le caratère de commande + + + + External command + Commande externe + + + + Variable + Variable + + + + Operator + Opérateur + + + + QsciLexerCMake + + + Default + Par défaut + + + + Comment + Commentaire + + + + String + Chaîne de caractères + + + + Left quoted string + + + + + Right quoted string + + + + + Function + Fonction + + + + Variable + Variable + + + + Label + Titre + + + + User defined + Définition utilisateur + + + + WHILE block + + + + + FOREACH block + + + + + IF block + + + + + MACRO block + + + + + Variable within a string + + + + + Number + Nombre + + + + QsciLexerCPP + + + Default + Par défaut + + + + Inactive default + + + + + C comment + Commentaire C + + + + Inactive C comment + + + + + C++ comment + Commentaire C++ + + + + Inactive C++ comment + + + + + JavaDoc style C comment + Commentaire C de style JavaDoc + + + + Inactive JavaDoc style C comment + + + + + Number + Nombre + + + + Inactive number + + + + + Keyword + Mot-clé + + + + Inactive keyword + + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Inactive double-quoted string + + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Inactive single-quoted string + + + + + IDL UUID + + + + + Inactive IDL UUID + + + + + Pre-processor block + Instructions de pré-processing + + + + Inactive pre-processor block + + + + + Operator + Opérateur + + + + Inactive operator + + + + + Identifier + Identificateur + + + + Inactive identifier + + + + + Unclosed string + Chaine de caractères non refermée + + + + Inactive unclosed string + + + + + C# verbatim string + + + + + Inactive C# verbatim string + + + + + JavaScript regular expression + Expression régulière JavaScript + + + + Inactive JavaScript regular expression + + + + + JavaDoc style C++ comment + Commentaire C++ de style JavaDoc + + + + Inactive JavaDoc style C++ comment + + + + + Secondary keywords and identifiers + Seconds mots-clés et identificateurs + + + + Inactive secondary keywords and identifiers + + + + + JavaDoc keyword + Mot-clé JavaDoc + + + + Inactive JavaDoc keyword + + + + + JavaDoc keyword error + Erreur de mot-clé JavaDoc + + + + Inactive JavaDoc keyword error + + + + + Global classes and typedefs + Classes globales et définitions de types + + + + Inactive global classes and typedefs + + + + + C++ raw string + + + + + Inactive C++ raw string + + + + + Vala triple-quoted verbatim string + + + + + Inactive Vala triple-quoted verbatim string + + + + + Pike hash-quoted string + + + + + Inactive Pike hash-quoted string + + + + + Pre-processor C comment + + + + + Inactive pre-processor C comment + + + + + JavaDoc style pre-processor comment + + + + + Inactive JavaDoc style pre-processor comment + + + + + User-defined literal + + + + + Inactive user-defined literal + + + + + Task marker + + + + + Inactive task marker + + + + + Escape sequence + Séquence d'échappement + + + + Inactive escape sequence + + + + + QsciLexerCSS + + + Default + Par défaut + + + + Tag + Balise + + + + Class selector + Classe + + + + Pseudo-class + Pseudo-classe + + + + Unknown pseudo-class + Peudo-classe inconnue + + + + Operator + Opérateur + + + + CSS1 property + Propriété CSS1 + + + + Unknown property + Propriété inconnue + + + + Value + Valeur + + + + Comment + Commentaire + + + + ID selector + ID + + + + Important + Important + + + + @-rule + règle-@ + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + CSS2 property + Propriété CSS2 + + + + Attribute + Attribut + + + + CSS3 property + Propriété CSS3 + + + + Pseudo-element + + + + + Extended CSS property + + + + + Extended pseudo-class + + + + + Extended pseudo-element + + + + + Media rule + + + + + Variable + Variable + + + + QsciLexerCSharp + + + Verbatim string + Chaine verbatim + + + + QsciLexerCoffeeScript + + + Default + Par défaut + + + + C-style comment + + + + + C++-style comment + + + + + JavaDoc C-style comment + + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + IDL UUID + + + + + Pre-processor block + Instructions de pré-processing + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Unclosed string + Chaine de caractères non refermée + + + + C# verbatim string + + + + + Regular expression + Expression régulière + + + + JavaDoc C++-style comment + + + + + Secondary keywords and identifiers + Seconds mots-clés et identificateurs + + + + JavaDoc keyword + Mot-clé JavaDoc + + + + JavaDoc keyword error + Erreur de mot-clé JavaDoc + + + + Global classes + + + + + Block comment + Block de commentaires + + + + Block regular expression + + + + + Block regular expression comment + + + + + Instance property + + + + + QsciLexerD + + + Default + Par défaut + + + + Block comment + Block de commentaires + + + + Line comment + Commentaire de ligne + + + + DDoc style block comment + + + + + Nesting comment + + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Secondary keyword + + + + + Documentation keyword + + + + + Type definition + + + + + String + Chaîne de caractères + + + + Unclosed string + Chaine de caractères non refermée + + + + Character + Caractère + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + DDoc style line comment + + + + + DDoc keyword + Mot-clé DDoc + + + + DDoc keyword error + Erreur de mot-clé DDoc + + + + Backquoted string + + + + + Raw string + + + + + User defined 1 + Définition utilisateur 1 + + + + User defined 2 + Définition utilisateur 2 + + + + User defined 3 + Définition utilisateur 3 + + + + QsciLexerDiff + + + Default + Par défaut + + + + Comment + Commentaire + + + + Command + Commande + + + + Header + En-tête + + + + Position + Position + + + + Removed line + Ligne supprimée + + + + Added line + Ligne ajoutée + + + + Changed line + Ligne changée + + + + Added adding patch + + + + + Removed adding patch + + + + + Added removing patch + + + + + Removed removing patch + + + + + QsciLexerEDIFACT + + + Default + Par défaut + + + + Segment start + + + + + Segment end + + + + + Element separator + + + + + Composite separator + + + + + Release separator + + + + + UNA segment header + + + + + UNH segment header + + + + + Badly formed segment + + + + + QsciLexerFortran77 + + + Default + Par défaut + + + + Comment + Commentaire + + + + Number + Nombre + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Unclosed string + Chaine de caractères non refermée + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Keyword + Mot-clé + + + + Intrinsic function + Fonction intrinsèque + + + + Extended function + Fonction étendue + + + + Pre-processor block + Instructions de pré-processing + + + + Dotted operator + + + + + Label + Titre + + + + Continuation + + + + + QsciLexerHTML + + + HTML default + HTML par défaut + + + + Tag + Balise + + + + Unknown tag + Balise inconnue + + + + Attribute + Attribut + + + + Unknown attribute + Attribut inconnu + + + + HTML number + Nombre HTML + + + + HTML double-quoted string + Chaine de caractères HTML (guillemets doubles) + + + + HTML single-quoted string + Chaine de caractères HTML (guillemets simples) + + + + Other text in a tag + Autre texte dans les balises + + + + HTML comment + Commentaire HTML + + + + Entity + Entité + + + + End of a tag + Balise fermante + + + + Start of an XML fragment + Début de block XML + + + + End of an XML fragment + Fin de block XML + + + + Script tag + Balise de script + + + + Start of an ASP fragment with @ + Début de block ASP avec @ + + + + Start of an ASP fragment + Début de block ASP + + + + CDATA + CDATA + + + + Start of a PHP fragment + Début de block PHP + + + + Unquoted HTML value + Valeur HTML sans guillemets + + + + ASP X-Code comment + Commentaire X-Code ASP + + + + SGML default + SGML par défaut + + + + SGML command + Commande SGML + + + + First parameter of an SGML command + Premier paramètre de commande SGML + + + + SGML double-quoted string + Chaine de caractères SGML (guillemets doubles) + + + + SGML single-quoted string + Chaine de caractères SGML (guillemets simples) + + + + SGML error + Erreur SGML + + + + SGML special entity + Entité SGML spéciale + + + + SGML comment + Commentaire SGML + + + + First parameter comment of an SGML command + Premier paramètre de commentaire de commande SGML + + + + SGML block default + Block SGML par défaut + + + + Start of a JavaScript fragment + Début de block JavaScript + + + + JavaScript default + JavaScript par défaut + + + + JavaScript comment + Commentaire JavaScript + + + + JavaScript line comment + Commentaire de ligne JavaScript + + + + JavaDoc style JavaScript comment + Commentaire JavaScript de style JavaDoc + + + + JavaScript number + Nombre JavaScript + + + + JavaScript word + Mot JavaScript + + + + JavaScript keyword + Mot-clé JavaScript + + + + JavaScript double-quoted string + Chaine de caractères JavaScript (guillemets doubles) + + + + JavaScript single-quoted string + Chaine de caractères JavaScript (guillemets simples) + + + + JavaScript symbol + Symbole JavaScript + + + + JavaScript unclosed string + Chaine de caractères JavaScript non refermée + + + + JavaScript regular expression + Expression régulière JavaScript + + + + Start of an ASP JavaScript fragment + Début de block JavaScript ASP + + + + ASP JavaScript default + JavaScript ASP par défaut + + + + ASP JavaScript comment + Commentaire JavaScript ASP + + + + ASP JavaScript line comment + Commentaire de ligne JavaScript ASP + + + + JavaDoc style ASP JavaScript comment + Commentaire JavaScript ASP de style JavaDoc + + + + ASP JavaScript number + Nombre JavaScript ASP + + + + ASP JavaScript word + Mot JavaScript ASP + + + + ASP JavaScript keyword + Mot-clé JavaScript ASP + + + + ASP JavaScript double-quoted string + Chaine de caractères JavaScript ASP (guillemets doubles) + + + + ASP JavaScript single-quoted string + Chaine de caractères JavaScript ASP (guillemets simples) + + + + ASP JavaScript symbol + Symbole JavaScript ASP + + + + ASP JavaScript unclosed string + Chaine de caractères JavaScript ASP non refermée + + + + ASP JavaScript regular expression + Expression régulière JavaScript ASP + + + + Start of a VBScript fragment + Début de block VBScript + + + + VBScript default + VBScript par défaut + + + + VBScript comment + Commentaire VBScript + + + + VBScript number + Nombre VBScript + + + + VBScript keyword + Mot-clé VBScript + + + + VBScript string + Chaine de caractères VBScript + + + + VBScript identifier + Identificateur VBScript + + + + VBScript unclosed string + Chaine de caractères VBScript non refermée + + + + Start of an ASP VBScript fragment + Début de block VBScript ASP + + + + ASP VBScript default + VBScript ASP par défaut + + + + ASP VBScript comment + Commentaire VBScript ASP + + + + ASP VBScript number + Nombre VBScript ASP + + + + ASP VBScript keyword + Mot-clé VBScript ASP + + + + ASP VBScript string + Chaine de caractères VBScript ASP + + + + ASP VBScript identifier + Identificateur VBScript ASP + + + + ASP VBScript unclosed string + Chaine de caractères VBScript ASP non refermée + + + + Start of a Python fragment + Début de block Python + + + + Python default + Python par défaut + + + + Python comment + Commentaire Python + + + + Python number + Nombre Python + + + + Python double-quoted string + Chaine de caractères Python (guillemets doubles) + + + + Python single-quoted string + Chaine de caractères Python (guillemets simples) + + + + Python keyword + Mot-clé Python + + + + Python triple double-quoted string + Chaine de caractères Python (triples guillemets doubles) + + + + Python triple single-quoted string + Chaine de caractères Python (triples guillemets simples) + + + + Python class name + Nom de classe Python + + + + Python function or method name + Méthode ou fonction Python + + + + Python operator + Opérateur Python + + + + Python identifier + Identificateur Python + + + + Start of an ASP Python fragment + Début de block Python ASP + + + + ASP Python default + Python ASP par défaut + + + + ASP Python comment + Commentaire Python ASP + + + + ASP Python number + Nombre Python ASP + + + + ASP Python double-quoted string + Chaine de caractères Python ASP (guillemets doubles) + + + + ASP Python single-quoted string + Chaine de caractères Python ASP (guillemets simples) + + + + ASP Python keyword + Mot-clé Python ASP + + + + ASP Python triple double-quoted string + Chaine de caractères Python ASP (triples guillemets doubles) + + + + ASP Python triple single-quoted string + Chaine de caractères Python ASP (triples guillemets simples) + + + + ASP Python class name + Nom de classe Python ASP + + + + ASP Python function or method name + Méthode ou fonction Python ASP + + + + ASP Python operator + Opérateur Python ASP + + + + ASP Python identifier + Identificateur Python ASP + + + + PHP default + PHP par défaut + + + + PHP double-quoted string + Chaine de caractères PHP (guillemets doubles) + + + + PHP single-quoted string + Chaine de caractères PHP (guillemets simples) + + + + PHP keyword + Mot-clé PHP + + + + PHP number + Nombre PHP + + + + PHP variable + Variable PHP + + + + PHP comment + Commentaire PHP + + + + PHP line comment + Commentaire de ligne PHP + + + + PHP double-quoted variable + Variable PHP (guillemets doubles) + + + + PHP operator + Opérateur PHP + + + + QsciLexerHex + + + Default + Par défaut + + + + Record start + + + + + Record type + + + + + Unknown record type + + + + + Byte count + + + + + Incorrect byte count + + + + + No address + + + + + Data address + + + + + Record count + + + + + Start address + + + + + Extended address + + + + + Odd data + + + + + Even data + + + + + Unknown data + + + + + Checksum + + + + + Incorrect checksum + + + + + Trailing garbage after a record + + + + + QsciLexerIDL + + + UUID + UUID + + + + QsciLexerJSON + + + Default + Par défaut + + + + Number + Nombre + + + + String + Chaîne de caractères + + + + Unclosed string + Chaine de caractères non refermée + + + + Property + Propriété + + + + Escape sequence + Séquence d'échappement + + + + Line comment + Commentaire de ligne + + + + Block comment + Block de commentaires + + + + Operator + Opérateur + + + + IRI + + + + + JSON-LD compact IRI + + + + + JSON keyword + Mot-clé JSON + + + + JSON-LD keyword + Mot-clé JSON-LD + + + + Parsing error + Erreur d'analyse + + + + QsciLexerJavaScript + + + Regular expression + Expression régulière + + + + QsciLexerLua + + + Default + Par défaut + + + + Comment + Commentaire + + + + Line comment + Commentaire de ligne + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + String + Chaîne de caractères + + + + Character + Caractère + + + + Literal string + Chaîne littérale + + + + Preprocessor + Préprocessing + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Unclosed string + Chaine de caractères non refermée + + + + Basic functions + Fonctions de base + + + + String, table and maths functions + Fonctions sur les chaines, tables et fonctions math + + + + Coroutines, i/o and system facilities + Coroutines, i/o et fonctions système + + + + User defined 1 + Définition utilisateur 1 + + + + User defined 2 + Définition utilisateur 2 + + + + User defined 3 + Définition utilisateur 3 + + + + User defined 4 + Définition utilisateur 4 + + + + Label + Titre + + + + QsciLexerMakefile + + + Default + Par défaut + + + + Comment + Commentaire + + + + Preprocessor + Préprocessing + + + + Variable + Variable + + + + Operator + Opérateur + + + + Target + Cible + + + + Error + Erreur + + + + QsciLexerMarkdown + + + Default + Par défaut + + + + Special + Spécial + + + + Strong emphasis using double asterisks + + + + + Strong emphasis using double underscores + + + + + Emphasis using single asterisks + + + + + Emphasis using single underscores + + + + + Level 1 header + + + + + Level 2 header + + + + + Level 3 header + + + + + Level 4 header + + + + + Level 5 header + + + + + Level 6 header + + + + + Pre-char + + + + + Unordered list item + + + + + Ordered list item + + + + + Block quote + + + + + Strike out + + + + + Horizontal rule + + + + + Link + + + + + Code between backticks + + + + + Code between double backticks + + + + + Code block + + + + + QsciLexerMatlab + + + Default + Par défaut + + + + Comment + Commentaire + + + + Command + Commande + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + QsciLexerPO + + + Default + Par défaut + + + + Comment + Commentaire + + + + Message identifier + + + + + Message identifier text + + + + + Message string + + + + + Message string text + + + + + Message context + + + + + Message context text + + + + + Fuzzy flag + + + + + Programmer comment + + + + + Reference + Référence + + + + Flags + + + + + Message identifier text end-of-line + + + + + Message string text end-of-line + + + + + Message context text end-of-line + + + + + QsciLexerPOV + + + Default + Par défaut + + + + Comment + Commentaire + + + + Comment line + Ligne commentée + + + + Number + Nombre + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + String + Chaîne de caractères + + + + Unclosed string + Chaine de caractères non refermée + + + + Directive + Directive + + + + Bad directive + Mauvaise directive + + + + Objects, CSG and appearance + Objets, CSG et apparence + + + + Types, modifiers and items + Types, modifieurs et éléments + + + + Predefined identifiers + Identifiants prédéfinis + + + + Predefined functions + Fonctions prédéfinies + + + + User defined 1 + Définition utilisateur 1 + + + + User defined 2 + Définition utilisateur 2 + + + + User defined 3 + Définition utilisateur 3 + + + + QsciLexerPascal + + + Default + Par défaut + + + + Line comment + Commentaire de ligne + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + '{ ... }' style comment + + + + + '(* ... *)' style comment + + + + + '{$ ... }' style pre-processor block + + + + + '(*$ ... *)' style pre-processor block + + + + + Hexadecimal number + Nombre hexadécimal + + + + Unclosed string + Chaine de caractères non refermée + + + + Character + Caractère + + + + Inline asm + Asm en ligne + + + + QsciLexerPerl + + + Default + Par défaut + + + + Error + Erreur + + + + Comment + Commentaire + + + + POD + POD + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Scalar + Scalaire + + + + Array + Tableau + + + + Hash + Hashage + + + + Symbol table + Table de symboles + + + + Regular expression + Expression régulière + + + + Substitution + Substitution + + + + Backticks + Quotes inverses + + + + Data section + Section de données + + + + Here document delimiter + Ici délimiteur de document + + + + Single-quoted here document + Document intégré guillemets simples + + + + Double-quoted here document + Document intégré guillemets doubles + + + + Backtick here document + Document intégré quotes inverses + + + + Quoted string (q) + Chaine quotée (q) + + + + Quoted string (qq) + Chaine quotée (qq) + + + + Quoted string (qx) + Chaine quotée (qx) + + + + Quoted string (qr) + Chaine quotée (qr) + + + + Quoted string (qw) + Chaine quotée (qw) + + + + POD verbatim + POD verbatim + + + + Subroutine prototype + + + + + Format identifier + + + + + Format body + + + + + Double-quoted string (interpolated variable) + + + + + Translation + Traduction + + + + Regular expression (interpolated variable) + + + + + Substitution (interpolated variable) + + + + + Backticks (interpolated variable) + + + + + Double-quoted here document (interpolated variable) + + + + + Backtick here document (interpolated variable) + + + + + Quoted string (qq, interpolated variable) + + + + + Quoted string (qx, interpolated variable) + + + + + Quoted string (qr, interpolated variable) + + + + + QsciLexerPostScript + + + Default + Par défaut + + + + Comment + Commentaire + + + + DSC comment + Commentaire DSC + + + + DSC comment value + + + + + Number + Nombre + + + + Name + Nom + + + + Keyword + Mot-clé + + + + Literal + + + + + Immediately evaluated literal + + + + + Array parenthesis + + + + + Dictionary parenthesis + + + + + Procedure parenthesis + + + + + Text + Texte + + + + Hexadecimal string + + + + + Base85 string + + + + + Bad string character + + + + + QsciLexerProperties + + + Default + Par défaut + + + + Comment + Commentaire + + + + Section + Section + + + + Assignment + Affectation + + + + Default value + Valeur par défaut + + + + Key + Clé + + + + QsciLexerPython + + + Default + Par défaut + + + + Comment + Commentaire + + + + Number + Nombre + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Keyword + Mot-clé + + + + Triple single-quoted string + Chaine de caractères HTML (guillemets simples) + + + + Triple double-quoted string + Chaine de caractères HTML (guillemets simples) + + + + Class name + Nom de classe + + + + Function or method name + Nom de méthode ou de fonction + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Comment block + Block de commentaires + + + + Unclosed string + Chaine de caractères non refermée + + + + Highlighted identifier + + + + + Decorator + + + + + Double-quoted f-string + + + + + Single-quoted f-string + + + + + Triple single-quoted f-string + + + + + Triple double-quoted f-string + + + + + QsciLexerRuby + + + Default + Par défaut + + + + Comment + Commentaire + + + + Number + Nombre + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Keyword + Mot-clé + + + + Class name + Nom de classe + + + + Function or method name + Nom de méthode ou de fonction + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Error + Erreur + + + + POD + POD + + + + Regular expression + Expression régulière + + + + Global + Global + + + + Symbol + Symbole + + + + Module name + Nom de module + + + + Instance variable + + + + + Class variable + + + + + Backticks + Quotes inverses + + + + Data section + Section de données + + + + Here document delimiter + Ici délimiteur de document + + + + Here document + Ici document + + + + %q string + + + + + %Q string + + + + + %x string + + + + + %r string + + + + + %w string + + + + + Demoted keyword + + + + + stdin + + + + + stdout + + + + + stderr + + + + + QsciLexerSQL + + + Default + Par défaut + + + + Comment + Commentaire + + + + Number + Nombre + + + + Keyword + Mot-clé + + + + Single-quoted string + Chaine de caractères (guillemets simples) + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Comment line + Ligne commentée + + + + JavaDoc style comment + Commentaire style JavaDoc + + + + Double-quoted string + Chaine de caractères (guillemets doubles) + + + + SQL*Plus keyword + Mot-clé SQL*Plus + + + + SQL*Plus prompt + Prompt SQL*Plus + + + + SQL*Plus comment + Commentaire SQL*Plus + + + + # comment line + # Ligne commentée + + + + JavaDoc keyword + Mot-clé JavaDoc + + + + JavaDoc keyword error + Erreur de mot-clé JavaDoc + + + + User defined 1 + Définition utilisateur 1 + + + + User defined 2 + Définition utilisateur 2 + + + + User defined 3 + Définition utilisateur 3 + + + + User defined 4 + Définition utilisateur 4 + + + + Quoted identifier + + + + + Quoted operator + + + + + QsciLexerSpice + + + Default + Par défaut + + + + Identifier + Identificateur + + + + Command + Commande + + + + Function + Fonction + + + + Parameter + Paramètre + + + + Number + Nombre + + + + Delimiter + Délimiteur + + + + Value + Valeur + + + + Comment + Commentaire + + + + QsciLexerTCL + + + Default + Par défaut + + + + Comment + Commentaire + + + + Comment line + Ligne commentée + + + + Number + Nombre + + + + Quoted keyword + + + + + Quoted string + + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Substitution + Substitution + + + + Brace substitution + + + + + Modifier + + + + + Expand keyword + + + + + TCL keyword + + + + + Tk keyword + + + + + iTCL keyword + + + + + Tk command + + + + + User defined 1 + Définition utilisateur 1 + + + + User defined 2 + Définition utilisateur 2 + + + + User defined 3 + Définition utilisateur 3 + + + + User defined 4 + Définition utilisateur 4 + + + + Comment box + + + + + Comment block + Block de commentaires + + + + QsciLexerTeX + + + Default + Par défaut + + + + Special + Spécial + + + + Group + Groupe + + + + Symbol + Symbole + + + + Command + Commande + + + + Text + Texte + + + + QsciLexerVHDL + + + Default + Par défaut + + + + Comment + Commentaire + + + + Comment line + Ligne commentée + + + + Number + Nombre + + + + String + Chaîne de caractères + + + + Operator + Opérateur + + + + Identifier + Identificateur + + + + Unclosed string + Chaine de caractères non refermée + + + + Keyword + Mot-clé + + + + Standard operator + + + + + Attribute + Attribut + + + + Standard function + + + + + Standard package + + + + + Standard type + + + + + User defined + Définition utilisateur + + + + Comment block + Block de commentaires + + + + QsciLexerVerilog + + + Default + Par défaut + + + + Inactive default + + + + + Comment + Commentaire + + + + Inactive comment + + + + + Line comment + Commentaire de ligne + + + + Inactive line comment + + + + + Bang comment + + + + + Inactive bang comment + + + + + Number + Nombre + + + + Inactive number + + + + + Primary keywords and identifiers + + + + + Inactive primary keywords and identifiers + + + + + String + Chaîne de caractères + + + + Inactive string + + + + + Secondary keywords and identifiers + Seconds mots-clés et identificateurs + + + + Inactive secondary keywords and identifiers + + + + + System task + + + + + Inactive system task + + + + + Preprocessor block + + + + + Inactive preprocessor block + + + + + Operator + Opérateur + + + + Inactive operator + + + + + Identifier + Identificateur + + + + Inactive identifier + + + + + Unclosed string + Chaine de caractères non refermée + + + + Inactive unclosed string + + + + + User defined tasks and identifiers + + + + + Inactive user defined tasks and identifiers + + + + + Keyword comment + + + + + Inactive keyword comment + + + + + Input port declaration + + + + + Inactive input port declaration + + + + + Output port declaration + + + + + Inactive output port declaration + + + + + Input/output port declaration + + + + + Inactive input/output port declaration + + + + + Port connection + + + + + Inactive port connection + + + + + QsciLexerYAML + + + Default + Par défaut + + + + Comment + Commentaire + + + + Identifier + Identificateur + + + + Keyword + Mot-clé + + + + Number + Nombre + + + + Reference + Référence + + + + Document delimiter + Délimiteur de document + + + + Text block marker + + + + + Syntax error marker + + + + + Operator + Opérateur + + + + QsciScintilla + + + &Undo + + + + + &Redo + + + + + Cu&t + + + + + &Copy + + + + + &Paste + + + + + Delete + + + + + Select All + + + + diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.qm b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.qm new file mode 100644 index 0000000000000000000000000000000000000000..3a03def8ded8c3bea076dbbe3985804acdc7b01a GIT binary patch literal 49459 zcmd5l33!y%wKpV_Wipurh%6z-AuK`&h#?{%0wH0u0U`;Jq6H^26EZTH8D=ISVG+yX zh80vmQA)K6C~lx=SKDf}R=?L)3+l7WS2wh^bw#UBUw!YK|IEM4|KER`gyrLdlOc1@ zIrrRi&pG$pbMKw{WB;HRKiaeNcSB2mdF4G%{dFc|g$;}?u4ZiOKMC&nDPv1lGj?7n z!B7j!`uiP>-RNMB2aYio?PiXLK4a|GO#}~qkBz?kS;oSpY_dCtvF3}|oNK?!*uvkj zxp&;a*tN%5{q7dV&K^Lp`)34ic$F>K^()36_?Ru~`Z;4mKOs1*kl?g)2_}BWns404 z*nsQU6`P)5Y$3z z>$5o{@bA5h4Z161?Z#Ia8+ca6+E3yC`~M?j!>@t9cVWg|BaSgv{QHdiiUIExk7hjG z4tO_AB)Ior#!K(Q?@KBOmSqzh`Y^#!vk6WpBzWPQ1TX#@!NgXA>pmyA`89%Drx3iA z5!@9ZxF?U`Jv9U$O42(#DC3QrVLZnCI^&JK04w`uyzvcw?#OuS%f}fTu{h)SjKz$x zi5bTa9|!o8K6wY9V{F#feHOHR3Gy%L(^gc)SoTAGez^QK#+LuC&(X>7{oK)gjz-~o zxkoeI*&U3X^<-wzLTG-TBq(~&0_+nba5hthrUy+3DuG9B<-`B~+%nQe&0!1tv4P8{XLu&8VTe6op-YCm7?>$yWe0Y0A0dL^%#F@GrQwSV5nSo^bC|6KD7V;608IQ~`)di1&@=P5U1)r|yW zO$4`HKyc4-N5Q9n|J(OE+?`#FId?k-PW+Iu?e7yj@QP!gFTvQ{-#9!??=UvwMaS@| zFi#f$)ls<|_@Co(%y_+qvB_Hru6~8!rd)#e-a+vG5`Z(|d+!kJ8c%SOkKny02;ScT zu$HkY7ZdD4yzqI`F9_bZfZ+Wv0jy)J>s^BPJwWh*F^-zI`!hCfhU4+T z$fM*5f@Sjv4yz?N>Ux3`mJ*!QMsV74f~!Ul?0A&m`Y8mjsUo-~`Tecy>GQ2g{JRd) z=RNfV@7Y9f-xmZA1PMNr{Qe`?(&xjMJ7R-QFgCiCVD({wk9_6moH>}Wn_`aL8#gj` z&H#ejwmR6H;{?zC6~Pg&6FmQK1TWl6@Zuc=6SE1fdzj#c4+w7F zM)1bZ2<|$Y;9b8a_=9H&?mI;Az;J>OCh0!>F?~MtN5_NP=P)*`i{PY}2(G$~V5gtp zcV8v=(2oc{y4!JR@)eAI|7C&)mpDGT`54%}#_Wn`f6dr;S7c9L26}nv53`p?;r|Ey zC42p!hA=kjGlCQTo8Yw9vTyr?pRuAH*?UHv%UI~M?7JTv2lL~(>?d~~VC-Ap$$o14 z^Nh8;pZ(kIAit8o6D(U#uzUo;Q9mO%E{EWRT?8lXCOGX5f~&qwu;VR)-5(NMA0>Fr z%LKRVCAjr4!Ch|<+;a`Vd!8hCU=P8ElKedK6n#FtE&JuCCPBY4vX5Q2nK92lvfp?Y z`qR28C&vx*vSV&e;enluC$BZj;+3t533*MQVw;X<7zb$vh}??89LARH%$=}e2UxMS zxmP{4k+J-$+;y)m1OIek?lngTGPYnu?sabipA$m_W8V7y!A_Q6 zNpRQ;1jk=OaLtk2osS)1Y-S*Lf0YmP#F=|&57_%~BKN0XKL`Ho@!Y?k0RC2Vww$Df~_QOZ>?*GAS!2h1Shraj%{O$*NkGda&cwkE2;bri-WqRI`4EX)v zMFdMX5*+>v!OD*bo?lCF>emF<4J3HOOoBU03Eue|fA|+*;?L_p2cmI^jI`J%Gb!J1ZV*g#JB8@VbKpcdvHN zTQ!ZbvL87c--U78kx6j(Gfw}cEU?RO5nS6wa9altb)OTwWh22`|Bv8~`2_ED65JamxNj=K{mTd*{DR=a zT?7wZ>GW^F{%1K?{-BbvwPOe#^f*@qZUsO7qI2h$Ajiv^oO_<|Gj{!9=RIF7f;eNP z^U$j^8JoAk`SY6+FpgyeOXm~xJWjCub%MihCRq7%g6C%wyf8%YqGp0q=Op3N1f%;2 zCi)TV-birGrv%r&LGbD%9~+Wz^Ah_1>(>#y+|cXiL7Y8RqwtUHSgO;0HS&&kqzs`|vCI*HjOOIJq%@+p)7CUb=|j!dnR* z{CWN_yZZqC)%nk_>&Mv0E`n9t3Eu6?e{p69W4DaYKe`j}UlYjx>p}-(J0Bx>*V6od z{iYiHYCXYiPrLg3_wCS+8(n!H&th!Zf4K@qZ-x1A6T$s=5`3`QHSJZP>;2eu*}wk+ z@%i^$t-t>i?Bga^#PJNQ7v>SXaf0i>*T>s>Fs3vy_D#Pvy5F=OXm z;rikukVE|#*VpHQow$69>zl5d!9L9?=vM&#>iQ~zcg`v3zaRJs-Ci)cdIDqd&Vm^u zf$u<3!Hf!!kN?Gjxx3HN%fOy)bQkzQt~o2+h57%0 zxVXW6?$7=R_N||LvTF;(p|7|vzApgrb*H=ehUXdc9duuI1oZ3M_3rO%g??Oei#xEZ z3F7T_?zYu{zxiW#@OTXTmMSx*JZwTHz8JOTC|dmFytVNt{> z{HC1+p~YA54Ik@3S`wvmY9ry!KrG>j2SNc~A{YsK5)n@*vN{m+_`LBzFS6hTCakm2 z5sezLFkFyA6i{LxJ{}a&c6)psu~;CS@PvY4e!ogpNK*tV zA#)4JBzbWqRGA#4R$yxdFoVNj&Sp_Pa#Y-(RhC`OFz0opf(Z(#X!JKHWl^)mJ6l%v(Vh#Nx zS7cYE!4)klJc1jg(Y42?fd~aZ4ui~(f$WITY<&3!dALUPtQujflR`8XIGlX3@i{xk zfHU3EZ99ph%V*O_fX0JcZ`1J=H4xw%pmH`Z8Ij}4g_f&ipTq0} zA&Vie(~IVX{kTFGLgzrIP6ni!%?B4l`49V%d%yXS&VU7%JdsO9PZ_jMPDMvo38rZ1 zm<_d-*1*(084qzChoEt2jsve3o)c-w4;hEy(=?>hbA%*YiKwo5Y|y1AySVf?P<7kb z@@c!Bp7RLWlvz*7s5=_G@dQ5?P$?uJTfvsEN#@Aq_!Ad@rP7v z8V5J}Vv$hD(-{n`wqW&VvPQ@SwE#i;#MNUkP)XWMt(FLmmr|~n&O!2+%1Xdbn1XEw zp@KN!Croa6fWa`x1Z9M*o(DfifNlIPNe_P#T%%U7*$55fYlXaBHMK&=rW)G&c%+Bg;UQu?=Qn(XNxIw9YLKzr(I|LWe@|ZxFso zegKo|m^X|I*);r~ANY?7k$ha@qPQ;7(Gm)bUDXju1pJv9PwKoUk}U_Sy?dD6*uNcsbr$Ss%VayZg zih9Fw*l5<71#Varqx&a&CmYG^MxPgUS#(-88xC?g47}Rj(+;`T-p2(sLW>WMR8oy0 zjbPzri{GYH6djhX>?P}^bVhvUic^`B-4SQ>tQ#4(!a^l{WTMQi46jvL(y%2%LSZnv zV4mWf3@c1r5#}snVQ)woA@UGTN$LpJL7;O*pRM)svj6ABqXXs!{p9PQvLbc6lt;2e z(0c1Gn1{m!f%6IIH zuW343Qaj(fG9WlIJ6fV_WmP)LHYU-C+&Q_?DDK3p6=bEXdyr>;cB2&G@emdM(|i@o1-itjo;Zw5wZrs zXaXursHz0wrC1;?225JH+I37?45s0uwuwcrq-{7&*bTrDj)6?nQxRqN4>lHLg4&5G zAe5t53f5((*}owc7#od6d?1=g%+nHz_*SAb(^6cbzW`5~0W=V)GXTwoa<-uuIhE{#2FAFYUMQpW{%YyN;sL6YZc^!)tAZ= zyTZj`UnmmSNsx%v$PHtSGX%2(W7!Nzs@XHf#yTiMQ83v^iJl@@b)yOe!CH5~PqJd< z)g-`Iw{%eMQri-@uu!>B#ezT>6F=k!Y9aO4$j+A-D5!00Jl_L4204mEw@SH^e3)UY zO2JlTg00eow<=J}wQK_XJDsgh!92kPb2;=3i;S`Kjg~yrXDs|o`br6(yA~Z?vYJhu zngN+u4Dqz0Ka-+`WH(B5hlmc<2#wqb)UV~+tDR(Hif+p#1ZKU207V`gCkNYeVk=0L2) zn+Ucmvg3tPMxnM5>cyiLEy-DOvq&q{8Bl;EG(PPn#elaoRsjasdTTjgK;l%a3k=BH z4P*^anMSk*Z7rH(0}LlS#x)>aE>sj@Y@=L)EP_wc5=5Gz{T6Xo7zWtSm{8h)$1}j2 z8E|)UgKGoA{RBggF}75FFDXJ^t@7}WQ?j;of{9JX@VM$!NeDI4-ZM4*l%(YRgPNdu zc1ztN4fCxe1`rDZ?>TGrXsHDDdGvzR8K`bfrr?` zBo%|s)<9T`B@1}k49ilKQM0qg?}vViXPo5Crn+Ejt6)3a$t;|@7D(93hCC|L=QOjv z`@m^zKGQjk$UL@ypL`EG8G=QEoKeW08}Rz6wt>^q4Qql3Xb9$&l{=of4Uu>d&(rGk zu{1@@=%KN~Cs~RjjhAatpdAWz425jo;UdYT&#Id@yQa2D7#!8lk3d% zs8%JdFBPB34vez{Az1oG)*u<40X2;c9>s2iq9#l>f^(bZ*9(TAinpsF;si*kG0L*5 zEBe%wz@3T(ejG~cY$PlU`UyO#>p|?){|!?~N3UFr(}79gFZ4It3|Q738pU28haO!Q zAyzxdN(WwGE2M;i8 zWbc*Ojct9x#;oG=(GwegjzS7H?E7rZ$hO0lHs;EykRk$WNz9_-X0mv+j>EiU?aLKx zw1OrJSMpmWa8FpQTjxyg&Qqqjd_SPnT^l}N^C@GS_U@C%DnRbMLlz?y0|{ID zMrHY&A-MLm^@TqqoZi?NnQ_n?@)vlHM2_N`86H@Y3W-3HslK8ZW!OA3SyE&isEvb7 zM=mzNYGlw;X&9UIYD1f(LtnCm15A*}a-Y*0$`S-r&O01UfD{l5DOQ$3} z*|VVBjVh%$oVCGh#F8rvdhy62@`2pwEls0>6nKYB#3P{8T0T_J$mXQ8p^Pp}jd3rwKTY!Oqf^(@$Z}T02qU)zfgcL4dW2FM4=7V0^s4AMGc3p)KTF;P*RZ%(vj7W3c)gZ zipua{CLYfu11v{2dU0w0g$Xzh>q!K<5^x=aVR)Ka(IT&78z3B!H=ptw<~EqbFQp&` zXkube1w_V{wAIE4izItuI|pIkY#7Z2>a&H=<=)_rh8q{C%gP-Vqa~1t(b$fJ zY}pYd?VebZA<5p_FeuYBBV}uYLK1XYlC-@|iBX0LK*gX)bVMyNP4|s5u}_lBCDh`` z8XKw-jUmxuDo6^$(4v%aEs7RdVG@~%X$hZnjpG{_QRi&f7&}!P3LUT!Oj_AcC{N1O z{$_%m{r%qIpD%h<4{VG;1*G=+$b_S{SmbI@l_TC_pr4C#S;)58 z!J?nTErXSSkOwsB9dTsbFFW2_rrHyOK3I^G4RhX4ahPA70Cft;q%--Pn9fd8%YFy> zN=#j}p}UpP#gvS*U>ESxEjr0Z8FY2$`wN|qM+3f~H{`*S*t)6d;gCK}Nx1_73PbVG zp!$%$Gr6A9Pr^?DCx@5YQrWbKi<0}wG`zTS<54MVOu#MKl1lxl@=+d2Ezjt zv@oVMAyQ?Th}O52C`nNbiwU)f7OAN=za%GLs-P%sxtY+MX^|#p06}$9w_u0K^ur!i z!qkKft9q2`a#G2kqb4tgZN|GiRK#np!YZk2dOuW6-s%uo)#TLP4pNgdk?>R_VHGec+h&uaHlcj{8QXKAlaW!R)yA)cb<_yoKHJmqeMq&3tY zpq9@_^cBxGdzH5@aFMGxvVc5aM6Pdf>*NE|fKc9k5wmYA!I?#z;;vhR857tFEG!@ft@osCVevIM63zi5%rjV z(aIpHx7KpVxok1~QQmQpwRrKoIy6=C6#?_=sJ7qykdHhqE@@o2KsXSPn&-vXN^z`A znhcujW;vKl4=-}sSUkYOY1yMAj2wI?_uvPIU@sg1?=PM9lH*QcP|KjUgvwUM3)EVm z6b*xXyrn}npM^8M@u1HmCWcg(AJunw1#H$&B+EJ}wzYnAP209v(+e;3stbBSZ%N`d zcqOQ7K)6(!u8$MTb;W**ivzrt9Cu4#XGBu!5w(#R+-VI*LgSU5;CT_@zPNZdT&CXc zY4!SoAvhHn(2cxSb;9S|5ppu=lDr3qvBsMEe?s?6J-;wC1Yxdv`s7;B5gz5-og_sc&bHt5nAe1I4-yZ zO}Yau)q0D=(j$YW z_mt_hw0P5$PHS`jrfe8niSMWi!9o$pJ0;;K$vvl$GJL2ZI*r}QHJZ^a1oG8X^Sz0X zw?&|8UB9@^&3nsjX6KlkdR=Sh5UcJZ7F@2<2s3o>*o!o{NK9QZx0S^i$ZdND94_bb zWnD#uhvbFVQW_Qt+HJ0$nkMwB3kD|Wpz;1;4+JRqzKi@UOuN%{ zqN&6{R?^rGP!N+7V5&8oNUoP6ZV}xiDDJ2G$!YB99VpdHLcqOv(>X0~;QbAW`;sQO ztQnOh7)oAF4C_&y9-OL>S?uCT2$|DCZ82m{2erkJSww9;H6r^2c&-iJN3m$w zxy{nBP&#s`sk644GO@ZYzt%jNA5%iWU@7J-IWRD+;{IHhJr`WRV;- zv6xr5QCrSnHUwg%y;t*3XV#Rtt9p;JS!|$vpVsG-~R#q2ZnP9#WU` z=$e&rIqgd&j*yH}1Kh9A#lVKONwXtsE<6aQGi=uj3wKOn@?Sc`{Gjr6GmQA~m?hS* z;6@jH#ylHd1==hHjh48z_GX%-{%JTFj?nC0 z70f|l>J&I_EV=|v%WTN!E>zqppV_cb*ly!|bsT+F5H+5?uzKOP3s8FCO;6#{Z5{Pl zVk1*-HMKB`tx~8%-%FKGVtPic8m+^Modf1}SWz<5PtD9J=O(5QjfR`psg})ZBW_lo zYHqrWxard4rWZCiIg`%Tql1z$J98c#lvp|gB2SKZ2SMC|uPRf<86Ut?Uzh4?>}ZKY zi6(5Es;^9y`ZgSv!t$1p=(bX?Et8kMu14W5GTJZFF+$dZF?mxQ?sZL21*pZvmTptK zUQ8E}sV~!Q=>(A`5Bo_TJ*x>0@}a3d9Vn^!64PvH1{jo1ON^ zp3BvE&2Wj8A+#c+%iR>`siYwsI9vbjHZG|&0%aXMX=h_(jhH zvU4KDC~UQ^>?BFtb$}&>2GWR^0v#6t`TQIt5nQu8h zlJHoMLpY6loD`DSFt^nl@~7QWb9g#AcA7&d4J*yXV$Vi%P?%b1P8*B%nbXodogwK| zuddf5tY?6G;E2TyVW8p;Wy$$x(^4dL5hC>k%NO;pK~vt)jW3bNM=Xa)_}#M(U z-Fc3uks8^h@FEOqLI~0$@-nLkgj&%M>WGU|oIjnage9!9fLnPv3nu=pkWd`H(ejTs z4`DSjzI2)ZbjC;vCBC6Txjm|S`&87FGr*2(J9-l85ybx5L2a=fAsy5f>k-mHZLx$` zL~W%u(=8S6Hb#R!s@%2i&3LWNoe!^78n&K?#?Lh=k~s-;+=H?l!m ztmabJwn;B5ErZ zNFm0+5{qenZ5t;PU1GH?oa2=uWyc&iEEY}m=}k!*){5S>bSx}Gw2cgR0<>SZe^Ykz z+~k2$>xM~QVo8mA!!mKunwut0qcm(27fZT}e@Q5&_Kic`{R$2j9s}0dfdh zS3vpUM0m|S7>ca0IQRMO($E(^qBM&m`N&L_hu_Si{_q>0F%L=e+3S&p^HH8$CFj$$ muIKV3`F2h6Nk2OlQEHTihI2^UUDk6@m?|}=jYW-Cwfuij6E&Iu literal 0 HcmV?d00001 diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.ts b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.ts new file mode 100644 index 000000000..a649350be --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscintilla_pt_br.ts @@ -0,0 +1,4227 @@ + + + + + QsciCommand + + + Move down one line + Mover uma linha para baixo + + + + Extend selection down one line + Extender a seleção uma linha para baixo + + + + Scroll view down one line + Descer a visão uma linha para baixo + + + + Extend rectangular selection down one line + Extender a seleção retangular uma linha para baixo + + + + Move up one line + Mover uma linha para cima + + + + Extend selection up one line + Extender a seleção uma linha para cima + + + + Scroll view up one line + Subir a visão uma linha para cima + + + + Extend rectangular selection up one line + Extender a seleção retangular uma linha para cima + + + + Move up one paragraph + Mover um paragrafo para cima + + + + Extend selection up one paragraph + Extender a seleção um paragrafo para cima + + + + Move down one paragraph + Mover um paragrafo para baixo + + + + Scroll to start of document + + + + + Scroll to end of document + + + + + Scroll vertically to centre current line + + + + + Extend selection down one paragraph + Extender a seleção um paragrafo para baixo + + + + Move left one character + Mover um caractere para a esquerda + + + + Extend selection left one character + Extender a seleção um caractere para esquerda + + + + Move left one word + Mover uma palavra para esquerda + + + + Extend selection left one word + Extender a seleção uma palavra para esquerda + + + + Extend rectangular selection left one character + Extender a seleção retangular um caractere para esquerda + + + + Move right one character + Mover um caractere para direita + + + + Extend selection right one character + Extender a seleção um caractere para direita + + + + Move right one word + Mover uma palavra para direita + + + + Extend selection right one word + Extender a seleção uma palavra para direita + + + + Extend rectangular selection right one character + Extender a seleção retangular um caractere para direita + + + + Move to end of previous word + + + + + Extend selection to end of previous word + + + + + Move to end of next word + + + + + Extend selection to end of next word + + + + + Move left one word part + Mover uma parte da palavra para esquerda + + + + Extend selection left one word part + Extender a seleção uma parte de palavra para esquerda + + + + Move right one word part + Mover uma parte da palavra para direita + + + + Extend selection right one word part + Extender a seleção uma parte de palavra para direita + + + + Move up one page + Mover uma página para cima + + + + Extend selection up one page + Extender a seleção uma página para cima + + + + Extend rectangular selection up one page + Extender a seleção retangular uma página para cima + + + + Move down one page + Mover uma página para baixo + + + + Extend selection down one page + Extender a seleção uma página para baixo + + + + Extend rectangular selection down one page + Extender a seleção retangular uma página para baixo + + + + Delete current character + Excluir caractere atual + + + + Cut selection + Recortar seleção + + + + Delete word to right + Excluir palavra para direita + + + + Move to start of document line + + + + + Extend selection to start of document line + + + + + Extend rectangular selection to start of document line + + + + + Move to start of display line + + + + + Extend selection to start of display line + + + + + Move to start of display or document line + + + + + Extend selection to start of display or document line + + + + + Move to first visible character in document line + + + + + Extend selection to first visible character in document line + + + + + Extend rectangular selection to first visible character in document line + + + + + Move to first visible character of display in document line + + + + + Extend selection to first visible character in display or document line + + + + + Move to end of document line + + + + + Extend selection to end of document line + + + + + Extend rectangular selection to end of document line + + + + + Move to end of display line + + + + + Extend selection to end of display line + + + + + Move to end of display or document line + + + + + Extend selection to end of display or document line + + + + + Move to start of document + + + + + Extend selection to start of document + + + + + Move to end of document + + + + + Extend selection to end of document + + + + + Stuttered move up one page + + + + + Stuttered extend selection up one page + + + + + Stuttered move down one page + + + + + Stuttered extend selection down one page + + + + + Delete previous character if not at start of line + + + + + Delete right to end of next word + + + + + Delete line to right + Excluir linha para direita + + + + Transpose current and previous lines + + + + + Duplicate the current line + + + + + Select all + Select document + + + + + Move selected lines up one line + + + + + Move selected lines down one line + + + + + Toggle insert/overtype + Alternar entre modo de inserir/sobreescrever + + + + Paste + Copiar + + + + Copy selection + Copiar seleção + + + + Insert newline + + + + + De-indent one level + + + + + Cancel + Cancelar + + + + Delete previous character + Excluir caractere anterior + + + + Delete word to left + Excluir palavra a esquerda + + + + Delete line to left + Excluir linha a esquerda + + + + Undo last command + + + + + Redo last command + Refazer último comando + + + + Indent one level + Indentar um nível + + + + Zoom in + Aumentar zoom + + + + Zoom out + Diminuir zoom + + + + Formfeed + Alimentação da Página + + + + Cut current line + Configurar linha atual + + + + Delete current line + Excluir linha atual + + + + Copy current line + Copiar linha atual + + + + Convert selection to lower case + Converter a seleção para minúscula + + + + Convert selection to upper case + Converter a seleção para maiúscula + + + + Duplicate selection + + + + + QsciLexerAVS + + + Default + Padrão + + + + Block comment + + + + + Nested block comment + + + + + Line comment + Comentar Linha + + + + Number + Número + + + + Operator + Operador + + + + Identifier + Identificador + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Triple double-quoted string + Cadeia de caracteres envolvida por três aspas duplas + + + + Keyword + Palavra Chave + + + + Filter + + + + + Plugin + + + + + Function + + + + + Clip property + + + + + User defined + + + + + QsciLexerAsm + + + Default + Padrão + + + + Comment + Comentário + + + + Number + Número + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Operator + Operador + + + + Identifier + Identificador + + + + CPU instruction + + + + + FPU instruction + + + + + Register + + + + + Directive + Diretiva + + + + Directive operand + + + + + Block comment + + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Extended instruction + + + + + Comment directive + + + + + QsciLexerBash + + + Default + Padrão + + + + Error + Número + + + + Comment + Comentário + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Scalar + Escalar + + + + Parameter expansion + Parâmetro de Expansão + + + + Backticks + Aspas Invertidas + + + + Here document delimiter + Delimitador de "here documents" + + + + Single-quoted here document + "here document" envolvido por aspas simples + + + + QsciLexerBatch + + + Default + Padrão + + + + Comment + Comentário + + + + Keyword + Palavra Chave + + + + Label + Rótulo + + + + Hide command character + Esconder caractere de comando + + + + External command + Comando externo + + + + Variable + Variável + + + + Operator + Operador + + + + QsciLexerCMake + + + Default + Padrão + + + + Comment + Comentário + + + + String + Cadeia de Caracteres + + + + Left quoted string + + + + + Right quoted string + + + + + Function + + + + + Variable + Variável + + + + Label + Rótulo + + + + User defined + + + + + WHILE block + + + + + FOREACH block + + + + + IF block + + + + + MACRO block + + + + + Variable within a string + + + + + Number + Número + + + + QsciLexerCPP + + + Default + Padrão + + + + Inactive default + + + + + C comment + Comentário C + + + + Inactive C comment + + + + + C++ comment + Comentário C++ + + + + Inactive C++ comment + + + + + JavaDoc style C comment + Comentário JavaDoc estilo C + + + + Inactive JavaDoc style C comment + + + + + Number + Número + + + + Inactive number + + + + + Keyword + Palavra Chave + + + + Inactive keyword + + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Inactive double-quoted string + + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Inactive single-quoted string + + + + + IDL UUID + + + + + Inactive IDL UUID + + + + + Pre-processor block + Instruções de pré-processamento + + + + Inactive pre-processor block + + + + + Operator + Operador + + + + Inactive operator + + + + + Identifier + Identificador + + + + Inactive identifier + + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Inactive unclosed string + + + + + C# verbatim string + + + + + Inactive C# verbatim string + + + + + JavaScript regular expression + Expressão regular JavaScript + + + + Inactive JavaScript regular expression + + + + + JavaDoc style C++ comment + Comentário JavaDoc estilo C++ + + + + Inactive JavaDoc style C++ comment + + + + + Secondary keywords and identifiers + Identificadores e palavras chave secundárias + + + + Inactive secondary keywords and identifiers + + + + + JavaDoc keyword + Palavra chave JavaDoc + + + + Inactive JavaDoc keyword + + + + + JavaDoc keyword error + Erro de palavra chave do JavaDoc + + + + Inactive JavaDoc keyword error + + + + + Global classes and typedefs + Classes e definições de tipo globais + + + + Inactive global classes and typedefs + + + + + C++ raw string + + + + + Inactive C++ raw string + + + + + Vala triple-quoted verbatim string + + + + + Inactive Vala triple-quoted verbatim string + + + + + Pike hash-quoted string + + + + + Inactive Pike hash-quoted string + + + + + Pre-processor C comment + + + + + Inactive pre-processor C comment + + + + + JavaDoc style pre-processor comment + + + + + Inactive JavaDoc style pre-processor comment + + + + + User-defined literal + + + + + Inactive user-defined literal + + + + + Task marker + + + + + Inactive task marker + + + + + Escape sequence + + + + + Inactive escape sequence + + + + + QsciLexerCSS + + + Default + Padrão + + + + Tag + Marcador + + + + Class selector + Seletor de classe + + + + Pseudo-class + Pseudo-classe + + + + Unknown pseudo-class + Pseudo-classe desconhecida + + + + Operator + Operador + + + + CSS1 property + Propriedade CSS1 + + + + Unknown property + Propriedade desconhecida + + + + Value + Valor + + + + Comment + Comentário + + + + ID selector + Seletor de ID + + + + Important + Importante + + + + @-rule + regra-@ + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + CSS2 property + Propriedade CSS2 + + + + Attribute + Atributo + + + + CSS3 property + Propriedade CSS2 {3 ?} + + + + Pseudo-element + + + + + Extended CSS property + + + + + Extended pseudo-class + + + + + Extended pseudo-element + + + + + Media rule + + + + + Variable + Variável + + + + QsciLexerCSharp + + + Verbatim string + Cadeia de caracteres no formato verbatim + + + + QsciLexerCoffeeScript + + + Default + Padrão + + + + C-style comment + + + + + C++-style comment + + + + + JavaDoc C-style comment + + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + IDL UUID + + + + + Pre-processor block + Instruções de pré-processamento + + + + Operator + Operador + + + + Identifier + Identificador + + + + Unclosed string + Cadeia de caracteres não fechada + + + + C# verbatim string + + + + + Regular expression + Expressão Regular + + + + JavaDoc C++-style comment + + + + + Secondary keywords and identifiers + Identificadores e palavras chave secundárias + + + + JavaDoc keyword + Palavra chave JavaDoc + + + + JavaDoc keyword error + Erro de palavra chave do JavaDoc + + + + Global classes + + + + + Block comment + + + + + Block regular expression + + + + + Block regular expression comment + + + + + Instance property + + + + + QsciLexerD + + + Default + Padrão + + + + Block comment + + + + + Line comment + Comentar Linha + + + + DDoc style block comment + + + + + Nesting comment + + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Secondary keyword + + + + + Documentation keyword + + + + + Type definition + + + + + String + Cadeia de Caracteres + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Character + Caractere + + + + Operator + Operador + + + + Identifier + Identificador + + + + DDoc style line comment + + + + + DDoc keyword + Palavra chave JavaDoc + + + + DDoc keyword error + Erro de palavra chave do JavaDoc + + + + Backquoted string + + + + + Raw string + + + + + User defined 1 + Definição de usuário 1 + + + + User defined 2 + Definição de usuário 2 + + + + User defined 3 + Definição de usuário 3 + + + + QsciLexerDiff + + + Default + Padrão + + + + Comment + Comentário + + + + Command + Comando + + + + Header + Cabeçalho + + + + Position + Posição + + + + Removed line + Linha Removida + + + + Added line + Linha Adicionada + + + + Changed line + + + + + Added adding patch + + + + + Removed adding patch + + + + + Added removing patch + + + + + Removed removing patch + + + + + QsciLexerEDIFACT + + + Default + Padrão + + + + Segment start + + + + + Segment end + + + + + Element separator + + + + + Composite separator + + + + + Release separator + + + + + UNA segment header + + + + + UNH segment header + + + + + Badly formed segment + + + + + QsciLexerFortran77 + + + Default + Padrão + + + + Comment + Comentário + + + + Number + Número + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Operator + Operador + + + + Identifier + Identificador + + + + Keyword + Palavra Chave + + + + Intrinsic function + + + + + Extended function + + + + + Pre-processor block + Instruções de pré-processamento + + + + Dotted operator + + + + + Label + Rótulo + + + + Continuation + + + + + QsciLexerHTML + + + HTML default + HTML por padrão + + + + Tag + Marcador + + + + Unknown tag + Marcador desconhecido + + + + Attribute + Atributo + + + + Unknown attribute + Atributo desconhecido + + + + HTML number + Número HTML + + + + HTML double-quoted string + Cadeia de caracteres HTML envolvida por aspas duplas + + + + HTML single-quoted string + Cadeia de caracteres HTML envolvida por aspas simples + + + + Other text in a tag + Outro texto em um marcador + + + + HTML comment + Comentário HTML + + + + Entity + Entidade + + + + End of a tag + Final de um marcador + + + + Start of an XML fragment + Início de um bloco XML + + + + End of an XML fragment + Final de um bloco XML + + + + Script tag + Marcador de script + + + + Start of an ASP fragment with @ + Início de um bloco ASP com @ + + + + Start of an ASP fragment + Início de um bloco ASP + + + + CDATA + CDATA + + + + Start of a PHP fragment + Início de um bloco PHP + + + + Unquoted HTML value + Valor HTML não envolvido por aspas + + + + ASP X-Code comment + Comentário ASP X-Code + + + + SGML default + SGML por padrão + + + + SGML command + Comando SGML + + + + First parameter of an SGML command + Primeiro parâmetro em um comando SGML + + + + SGML double-quoted string + Cadeia de caracteres SGML envolvida por aspas duplas + + + + SGML single-quoted string + Cadeia de caracteres SGML envolvida por aspas simples + + + + SGML error + Erro SGML + + + + SGML special entity + Entidade especial SGML + + + + SGML comment + Comando SGML + + + + First parameter comment of an SGML command + Primeiro comentário de parâmetro de uma comando SGML + + + + SGML block default + Bloco SGML por padrão + + + + Start of a JavaScript fragment + Início de um bloco Javascript + + + + JavaScript default + JavaScript por padrão + + + + JavaScript comment + Comentário JavaScript + + + + JavaScript line comment + Comentário de linha JavaScript + + + + JavaDoc style JavaScript comment + Comentário JavaScript no estilo JavaDoc + + + + JavaScript number + Número JavaScript + + + + JavaScript word + Palavra JavaScript + + + + JavaScript keyword + Palavra chave JavaScript + + + + JavaScript double-quoted string + Cadeia de caracteres JavaScript envolvida por aspas duplas + + + + JavaScript single-quoted string + Cadeia de caracteres JavaScript envolvida por aspas simples + + + + JavaScript symbol + Símbolo JavaScript + + + + JavaScript unclosed string + Cadeia de caracteres JavaScript não fechada + + + + JavaScript regular expression + Expressão regular JavaScript + + + + Start of an ASP JavaScript fragment + Início de um bloco Javascript ASP + + + + ASP JavaScript default + JavaScript ASP por padrão + + + + ASP JavaScript comment + Comentário JavaScript ASP + + + + ASP JavaScript line comment + Comentário de linha JavaScript ASP + + + + JavaDoc style ASP JavaScript comment + Comentário JavaScript ASP no estilo JavaDoc + + + + ASP JavaScript number + Número JavaScript ASP + + + + ASP JavaScript word + Palavra chave JavaScript ASP + + + + ASP JavaScript keyword + Palavra chave JavaScript ASP + + + + ASP JavaScript double-quoted string + Cadeia de caracteres JavaScript ASP envolvida por aspas duplas + + + + ASP JavaScript single-quoted string + Cadeia de caracteres JavaScript ASP envolvida por aspas simples + + + + ASP JavaScript symbol + Símbolo JavaScript ASP + + + + ASP JavaScript unclosed string + Cadeia de caracteres JavaScript ASP não fechada + + + + ASP JavaScript regular expression + Expressão regular JavaScript ASP + + + + Start of a VBScript fragment + Início de um bloco VBScript + + + + VBScript default + VBScript por padrão + + + + VBScript comment + Comentário VBScript + + + + VBScript number + Número VBScript + + + + VBScript keyword + Palavra chave VBScript + + + + VBScript string + Cadeia de caracteres VBScript + + + + VBScript identifier + Identificador VBScript + + + + VBScript unclosed string + Cadeia de caracteres VBScript não fechada + + + + Start of an ASP VBScript fragment + Início de um bloco VBScript ASP + + + + ASP VBScript default + VBScript ASP por padrão + + + + ASP VBScript comment + Comentário VBScript ASP + + + + ASP VBScript number + Número VBScript ASP + + + + ASP VBScript keyword + Palavra chave VBScript ASP + + + + ASP VBScript string + Cadeia de caracteres VBScript ASP + + + + ASP VBScript identifier + Identificador VBScript ASP + + + + ASP VBScript unclosed string + Cadeia de caracteres VBScript ASP não fechada + + + + Start of a Python fragment + Início de um bloco Python + + + + Python default + Python por padrão + + + + Python comment + Comentário Python + + + + Python number + Número Python + + + + Python double-quoted string + Cadeia de caracteres Python envolvida por aspas duplas + + + + Python single-quoted string + Cadeia de caracteres Python envolvida por aspas simples + + + + Python keyword + Palavra chave Python + + + + Python triple double-quoted string + Cadeia de caracteres Python envolvida por aspas triplas duplas + + + + Python triple single-quoted string + Cadeia de caracteres Python envolvida por aspas triplas simples + + + + Python class name + Nome de classe Python + + + + Python function or method name + Nome de método ou função Python + + + + Python operator + Operador Python + + + + Python identifier + Identificador Python + + + + Start of an ASP Python fragment + Início de um bloco Python ASP + + + + ASP Python default + Python ASP por padrão + + + + ASP Python comment + Comentário Python ASP + + + + ASP Python number + Número Python ASP + + + + ASP Python double-quoted string + Cadeia de caracteres Python ASP envolvida por aspas duplas + + + + ASP Python single-quoted string + Cadeia de caracteres Python ASP envolvida por aspas simples + + + + ASP Python keyword + Palavra chave Python ASP + + + + ASP Python triple double-quoted string + Cadeia de caracteres Python ASP envolvida por aspas triplas duplas + + + + ASP Python triple single-quoted string + Cadeia de caracteres Python ASP envolvida por aspas triplas simples + + + + ASP Python class name + Nome de classe Python ASP + + + + ASP Python function or method name + Nome de método ou função Python ASP + + + + ASP Python operator + Operador Python ASP + + + + ASP Python identifier + Identificador Python ASP + + + + PHP default + PHP por padrão + + + + PHP double-quoted string + Cadeia de caracteres PHP envolvida por aspas duplas + + + + PHP single-quoted string + Cadeia de caracteres PHP envolvida por aspas simples + + + + PHP keyword + Palavra chave PHP + + + + PHP number + Número PHP + + + + PHP variable + Variável PHP + + + + PHP comment + Comentário PHP + + + + PHP line comment + Comentário de linha PHP + + + + PHP double-quoted variable + Variável PHP envolvida por aspas duplas + + + + PHP operator + Operador PHP + + + + QsciLexerHex + + + Default + Padrão + + + + Record start + + + + + Record type + + + + + Unknown record type + + + + + Byte count + + + + + Incorrect byte count + + + + + No address + + + + + Data address + + + + + Record count + + + + + Start address + + + + + Extended address + + + + + Odd data + + + + + Even data + + + + + Unknown data + + + + + Checksum + + + + + Incorrect checksum + + + + + Trailing garbage after a record + + + + + QsciLexerIDL + + + UUID + UUID + + + + QsciLexerJSON + + + Default + Padrão + + + + Number + Número + + + + String + Cadeia de Caracteres + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Property + + + + + Escape sequence + + + + + Line comment + Comentar Linha + + + + Block comment + + + + + Operator + Operador + + + + IRI + + + + + JSON-LD compact IRI + + + + + JSON keyword + + + + + JSON-LD keyword + + + + + Parsing error + + + + + QsciLexerJavaScript + + + Regular expression + Expressão Regular + + + + QsciLexerLua + + + Default + Padrão + + + + Comment + Comentário + + + + Line comment + Comentar Linha + + + + Number + Número + + + + Keyword + Palavra Chave + + + + String + Cadeia de Caracteres + + + + Character + Caractere + + + + Literal string + Cadeia de caracteres literal + + + + Preprocessor + Preprocessador + + + + Operator + Operador + + + + Identifier + Identificador + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Basic functions + Funções básicas + + + + String, table and maths functions + Funções de cadeia de caracteres e de tabelas matemáticas + + + + Coroutines, i/o and system facilities + Funções auxiiares, e/s e funções de sistema + + + + User defined 1 + Definição de usuário 1 + + + + User defined 2 + Definição de usuário 2 + + + + User defined 3 + Definição de usuário 3 + + + + User defined 4 + Definição de usuário 4 + + + + Label + Rótulo + + + + QsciLexerMakefile + + + Default + Padrão + + + + Comment + Comentário + + + + Preprocessor + Preprocessador + + + + Variable + Variável + + + + Operator + Operador + + + + Target + Destino + + + + Error + Erro + + + + QsciLexerMarkdown + + + Default + Padrão + + + + Special + Especial + + + + Strong emphasis using double asterisks + + + + + Strong emphasis using double underscores + + + + + Emphasis using single asterisks + + + + + Emphasis using single underscores + + + + + Level 1 header + + + + + Level 2 header + + + + + Level 3 header + + + + + Level 4 header + + + + + Level 5 header + + + + + Level 6 header + + + + + Pre-char + + + + + Unordered list item + + + + + Ordered list item + + + + + Block quote + + + + + Strike out + + + + + Horizontal rule + + + + + Link + + + + + Code between backticks + + + + + Code between double backticks + + + + + Code block + + + + + QsciLexerMatlab + + + Default + Padrão + + + + Comment + Comentário + + + + Command + Comando + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + QsciLexerPO + + + Default + Padrão + + + + Comment + Comentário + + + + Message identifier + + + + + Message identifier text + + + + + Message string + + + + + Message string text + + + + + Message context + + + + + Message context text + + + + + Fuzzy flag + + + + + Programmer comment + + + + + Reference + + + + + Flags + + + + + Message identifier text end-of-line + + + + + Message string text end-of-line + + + + + Message context text end-of-line + + + + + QsciLexerPOV + + + Default + Padrão + + + + Comment + Comentário + + + + Comment line + Comentar Linha + + + + Number + Número + + + + Operator + Operador + + + + Identifier + Identificador + + + + String + Cadeia de Caracteres + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Directive + Diretiva + + + + Bad directive + Diretiva ruim + + + + Objects, CSG and appearance + Objetos, CSG e aparência + + + + Types, modifiers and items + Tipos, modificadores e itens + + + + Predefined identifiers + Identificadores predefinidos + + + + Predefined functions + Funções predefinidas + + + + User defined 1 + Definição de usuário 1 + + + + User defined 2 + Definição de usuário 2 + + + + User defined 3 + Definição de usuário 3 + + + + QsciLexerPascal + + + Default + Padrão + + + + Line comment + Comentar Linha + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + '{ ... }' style comment + + + + + '(* ... *)' style comment + + + + + '{$ ... }' style pre-processor block + + + + + '(*$ ... *)' style pre-processor block + + + + + Hexadecimal number + + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Character + Caractere + + + + Inline asm + + + + + QsciLexerPerl + + + Default + Padrão + + + + Error + Erro + + + + Comment + Comentário + + + + POD + POD + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Scalar + Escalar + + + + Array + Vetor + + + + Hash + Hash + + + + Symbol table + Tabela de Símbolos + + + + Regular expression + Expressão Regular + + + + Substitution + Substituição + + + + Backticks + Aspas Invertidas + + + + Data section + Seção de dados + + + + Here document delimiter + Delimitador de documentos criados através de redicionadores (>> e >) + + + + Single-quoted here document + "here document" envolvido por aspas simples + + + + Double-quoted here document + "here document" envolvido por aspas duplas + + + + Backtick here document + "here document" envolvido por aspas invertidas + + + + Quoted string (q) + Cadeia de caracteres envolvida por aspas (q) + + + + Quoted string (qq) + Cadeia de caracteres envolvida por aspas (qq) + + + + Quoted string (qx) + Cadeia de caracteres envolvida por aspas (qx) + + + + Quoted string (qr) + Cadeia de caracteres envolvida por aspas (qr) + + + + Quoted string (qw) + Cadeia de caracteres envolvida por aspas (qw) + + + + POD verbatim + POD em formato verbatim + + + + Subroutine prototype + + + + + Format identifier + + + + + Format body + + + + + Double-quoted string (interpolated variable) + + + + + Translation + + + + + Regular expression (interpolated variable) + + + + + Substitution (interpolated variable) + + + + + Backticks (interpolated variable) + + + + + Double-quoted here document (interpolated variable) + + + + + Backtick here document (interpolated variable) + + + + + Quoted string (qq, interpolated variable) + + + + + Quoted string (qx, interpolated variable) + + + + + Quoted string (qr, interpolated variable) + + + + + QsciLexerPostScript + + + Default + Padrão + + + + Comment + Comentário + + + + DSC comment + + + + + DSC comment value + + + + + Number + Número + + + + Name + + + + + Keyword + Palavra Chave + + + + Literal + + + + + Immediately evaluated literal + + + + + Array parenthesis + + + + + Dictionary parenthesis + + + + + Procedure parenthesis + + + + + Text + Texto + + + + Hexadecimal string + + + + + Base85 string + + + + + Bad string character + + + + + QsciLexerProperties + + + Default + Padrão + + + + Comment + Comentário + + + + Section + Seção + + + + Assignment + Atribuição + + + + Default value + Valor Padrão + + + + Key + + + + + QsciLexerPython + + + Default + Padrão + + + + Comment + Comentário + + + + Number + Número + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Keyword + Palavra Chave + + + + Triple single-quoted string + Cadeia de caracteres envolvida por três aspas simples + + + + Triple double-quoted string + Cadeia de caracteres envolvida por três aspas duplas + + + + Class name + Nome da classe + + + + Function or method name + Nome da função ou método + + + + Operator + Operador + + + + Identifier + Identificador + + + + Comment block + Bloco de comentários + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Highlighted identifier + + + + + Decorator + + + + + Double-quoted f-string + + + + + Single-quoted f-string + + + + + Triple single-quoted f-string + + + + + Triple double-quoted f-string + + + + + QsciLexerRuby + + + Default + Padrão + + + + Comment + Comentário + + + + Number + Número + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Keyword + Palavra Chave + + + + Class name + Nome da classe + + + + Function or method name + Nome da função ou método + + + + Operator + Operador + + + + Identifier + Identificador + + + + Error + + + + + POD + POD + + + + Regular expression + Expressão Regular + + + + Global + + + + + Symbol + Símbolo + + + + Module name + + + + + Instance variable + + + + + Class variable + + + + + Backticks + Aspas Invertidas + + + + Data section + Seção de dados + + + + Here document delimiter + + + + + Here document + + + + + %q string + + + + + %Q string + + + + + %x string + + + + + %r string + + + + + %w string + + + + + Demoted keyword + + + + + stdin + + + + + stdout + + + + + stderr + + + + + QsciLexerSQL + + + Default + Padrão + + + + Comment + Comentário + + + + Number + Número + + + + Keyword + Palavra Chave + + + + Single-quoted string + Cadeia de caracteres envolvida por aspas simples + + + + Operator + Operador + + + + Identifier + Identificador + + + + Comment line + Comentário de Linha + + + + JavaDoc style comment + Comentário estilo JavaDoc + + + + Double-quoted string + Cadeia de caracteres envolvida por aspas duplas + + + + SQL*Plus keyword + Palavra chave do SQL*Plus + + + + SQL*Plus prompt + Prompt do SQL*Plus + + + + SQL*Plus comment + Comentário do SQL*Plus + + + + # comment line + Comentário de linha usando # + + + + JavaDoc keyword + Palavra chave JavaDoc + + + + JavaDoc keyword error + Erro de palavra chave do JavaDoc + + + + User defined 1 + Definição de usuário 1 + + + + User defined 2 + Definição de usuário 2 + + + + User defined 3 + Definição de usuário 3 + + + + User defined 4 + Definição de usuário 4 + + + + Quoted identifier + + + + + Quoted operator + + + + + QsciLexerSpice + + + Default + Padrão + + + + Identifier + Identificador + + + + Command + Comando + + + + Function + + + + + Parameter + + + + + Number + Número + + + + Delimiter + + + + + Value + Valor + + + + Comment + Comentário + + + + QsciLexerTCL + + + Default + Padrão + + + + Comment + Comentário + + + + Comment line + + + + + Number + Número + + + + Quoted keyword + + + + + Quoted string + + + + + Operator + Operador + + + + Identifier + Identificador + + + + Substitution + Substituição + + + + Brace substitution + + + + + Modifier + + + + + Expand keyword + + + + + TCL keyword + + + + + Tk keyword + + + + + iTCL keyword + + + + + Tk command + + + + + User defined 1 + Definição de usuário 1 + + + + User defined 2 + Definição de usuário 2 + + + + User defined 3 + Definição de usuário 3 + + + + User defined 4 + Definição de usuário 4 + + + + Comment box + + + + + Comment block + Bloco de comentários + + + + QsciLexerTeX + + + Default + Padrão + + + + Special + Especial + + + + Group + Grupo + + + + Symbol + Símbolo + + + + Command + Comando + + + + Text + Texto + + + + QsciLexerVHDL + + + Default + Padrão + + + + Comment + Comentário + + + + Comment line + + + + + Number + Número + + + + String + Cadeia de Caracteres + + + + Operator + Operador + + + + Identifier + Identificador + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Keyword + Palavra Chave + + + + Standard operator + + + + + Attribute + Atributo + + + + Standard function + + + + + Standard package + + + + + Standard type + + + + + User defined + + + + + Comment block + Bloco de comentários + + + + QsciLexerVerilog + + + Default + Padrão + + + + Inactive default + + + + + Comment + Comentário + + + + Inactive comment + + + + + Line comment + Comentar Linha + + + + Inactive line comment + + + + + Bang comment + + + + + Inactive bang comment + + + + + Number + Número + + + + Inactive number + + + + + Primary keywords and identifiers + + + + + Inactive primary keywords and identifiers + + + + + String + Cadeia de Caracteres + + + + Inactive string + + + + + Secondary keywords and identifiers + Identificadores e palavras chave secundárias + + + + Inactive secondary keywords and identifiers + + + + + System task + + + + + Inactive system task + + + + + Preprocessor block + + + + + Inactive preprocessor block + + + + + Operator + Operador + + + + Inactive operator + + + + + Identifier + Identificador + + + + Inactive identifier + + + + + Unclosed string + Cadeia de caracteres não fechada + + + + Inactive unclosed string + + + + + User defined tasks and identifiers + + + + + Inactive user defined tasks and identifiers + + + + + Keyword comment + + + + + Inactive keyword comment + + + + + Input port declaration + + + + + Inactive input port declaration + + + + + Output port declaration + + + + + Inactive output port declaration + + + + + Input/output port declaration + + + + + Inactive input/output port declaration + + + + + Port connection + + + + + Inactive port connection + + + + + QsciLexerYAML + + + Default + Padrão + + + + Comment + Comentário + + + + Identifier + Identificador + + + + Keyword + Palavra Chave + + + + Number + Número + + + + Reference + + + + + Document delimiter + + + + + Text block marker + + + + + Syntax error marker + + + + + Operator + Operador + + + + QsciScintilla + + + &Undo + + + + + &Redo + + + + + Cu&t + + + + + &Copy + + + + + &Paste + + + + + Delete + + + + + Select All + + + + diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qsciprinter.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qsciprinter.cpp new file mode 100644 index 000000000..7f40fde46 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qsciprinter.cpp @@ -0,0 +1,196 @@ +// This module implements the QsciPrinter class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qsciprinter.h" + +#if !defined(QT_NO_PRINTER) + +#include +#include +#include + +#include "Qsci/qsciscintillabase.h" + + +// The ctor. +QsciPrinter::QsciPrinter(QPrinter::PrinterMode mode) + : QPrinter(mode), mag(0), wrap(QsciScintilla::WrapWord) +{ +} + + +// The dtor. +QsciPrinter::~QsciPrinter() +{ +} + + +// Format the page before the document text is drawn. +void QsciPrinter::formatPage(QPainter &, bool, QRect &, int) +{ +} + + +// Print a range of lines to a printer using a supplied QPainter. +int QsciPrinter::printRange(QsciScintillaBase *qsb, QPainter &painter, + int from, int to) +{ + // Sanity check. + if (!qsb) + return false; + + // Setup the printing area. + QRect def_area; + + def_area.setX(0); + def_area.setY(0); + def_area.setWidth(width()); + def_area.setHeight(height()); + + // Get the page range. + int pgFrom, pgTo; + + pgFrom = fromPage(); + pgTo = toPage(); + + // Find the position range. + long startPos, endPos; + + endPos = qsb->SendScintilla(QsciScintillaBase::SCI_GETLENGTH); + + startPos = (from > 0 ? qsb -> SendScintilla(QsciScintillaBase::SCI_POSITIONFROMLINE,from) : 0); + + if (to >= 0) + { + long toPos = qsb -> SendScintilla(QsciScintillaBase::SCI_POSITIONFROMLINE,to + 1); + + if (endPos > toPos) + endPos = toPos; + } + + if (startPos >= endPos) + return false; + + bool reverse = (pageOrder() == LastPageFirst); + bool needNewPage = false; + int nr_copies = supportsMultipleCopies() ? 1 : copyCount(); + + qsb -> SendScintilla(QsciScintillaBase::SCI_SETPRINTMAGNIFICATION,mag); + qsb -> SendScintilla(QsciScintillaBase::SCI_SETPRINTWRAPMODE,wrap); + + for (int i = 1; i <= nr_copies; ++i) + { + // If we are printing in reverse page order then remember the start + // position of each page. + QStack pageStarts; + + int currPage = 1; + long pos = startPos; + + while (pos < endPos) + { + // See if we have finished the requested page range. + if (pgTo > 0 && pgTo < currPage) + break; + + // See if we are going to render this page, or just see how much + // would fit onto it. + bool render = false; + + if (pgFrom == 0 || pgFrom <= currPage) + { + if (reverse) + pageStarts.push(pos); + else + { + render = true; + + if (needNewPage) + { + if (!newPage()) + return false; + } + else + needNewPage = true; + } + } + + QRect area = def_area; + + formatPage(painter,render,area,currPage); + pos = qsb -> SendScintilla(QsciScintillaBase::SCI_FORMATRANGE,render,&painter,area,pos,endPos); + + ++currPage; + } + + // All done if we are printing in normal page order. + if (!reverse) + continue; + + // Now go through each page on the stack and really print it. + while (!pageStarts.isEmpty()) + { + --currPage; + + long ePos = pos; + pos = pageStarts.pop(); + + if (needNewPage) + { + if (!newPage()) + return false; + } + else + needNewPage = true; + + QRect area = def_area; + + formatPage(painter,true,area,currPage); + qsb->SendScintilla(QsciScintillaBase::SCI_FORMATRANGE,true,&painter,area,pos,ePos); + } + } + + return true; +} + + +// Print a range of lines to a printer using a default QPainter. +int QsciPrinter::printRange(QsciScintillaBase *qsb, int from, int to) +{ + QPainter painter(this); + + return printRange(qsb, painter, from, to); +} + + +// Set the print magnification in points. +void QsciPrinter::setMagnification(int magnification) +{ + mag = magnification; +} + + +// Set the line wrap mode. +void QsciPrinter::setWrapMode(QsciScintilla::WrapMode wmode) +{ + wrap = wmode; +} + +#endif diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qsciscintilla.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qsciscintilla.cpp new file mode 100644 index 000000000..d167a9901 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qsciscintilla.cpp @@ -0,0 +1,4569 @@ +// This module implements the "official" high-level API of the Qt port of +// Scintilla. It is modelled on QTextEdit - a method of the same name should +// behave in the same way. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qsciscintilla.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Qsci/qsciabstractapis.h" +#include "Qsci/qscicommandset.h" +#include "Qsci/qscilexer.h" +#include "Qsci/qscistyle.h" +#include "Qsci/qscistyledtext.h" + + +// Make sure these match the values in Scintilla.h. We don't #include that +// file because it just causes more clashes. +#define KEYWORDSET_MAX 8 +#define MARKER_MAX 31 + +// The list separators for auto-completion and user lists. +const char acSeparator = '\x03'; +const char userSeparator = '\x04'; + +// The default fold margin width. +static const int defaultFoldMarginWidth = 14; + +// The default set of characters that make up a word. +static const char *defaultWordChars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + +// Forward declarations. +static QColor asQColor(long sci_colour); + + +// The ctor. +QsciScintilla::QsciScintilla(QWidget *parent) + : QsciScintillaBase(parent), + allocatedMarkers(0), allocatedIndicators(7), oldPos(-1), selText(false), + fold(NoFoldStyle), foldmargin(2), autoInd(false), + braceMode(NoBraceMatch), acSource(AcsNone), acThresh(-1), + wchars(defaultWordChars), call_tips_position(CallTipsBelowText), + call_tips_style(CallTipsNoContext), maxCallTips(-1), + use_single(AcusNever), explicit_fillups(""), fillups_enabled(false) +{ + connect(this,SIGNAL(SCN_MODIFYATTEMPTRO()), + SIGNAL(modificationAttempted())); + + connect(this,SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int,int,int)), + SLOT(handleModified(int,int,const char *,int,int,int,int,int,int,int))); + connect(this,SIGNAL(SCN_CALLTIPCLICK(int)), + SLOT(handleCallTipClick(int))); + connect(this,SIGNAL(SCN_CHARADDED(int)), + SLOT(handleCharAdded(int))); + connect(this,SIGNAL(SCN_INDICATORCLICK(int,int)), + SLOT(handleIndicatorClick(int,int))); + connect(this,SIGNAL(SCN_INDICATORRELEASE(int,int)), + SLOT(handleIndicatorRelease(int,int))); + connect(this,SIGNAL(SCN_MARGINCLICK(int,int,int)), + SLOT(handleMarginClick(int,int,int))); + connect(this,SIGNAL(SCN_MARGINRIGHTCLICK(int,int,int)), + SLOT(handleMarginRightClick(int,int,int))); + connect(this,SIGNAL(SCN_SAVEPOINTREACHED()), + SLOT(handleSavePointReached())); + connect(this,SIGNAL(SCN_SAVEPOINTLEFT()), + SLOT(handleSavePointLeft())); + connect(this,SIGNAL(SCN_UPDATEUI(int)), + SLOT(handleUpdateUI(int))); + connect(this,SIGNAL(QSCN_SELCHANGED(bool)), + SLOT(handleSelectionChanged(bool))); + connect(this,SIGNAL(SCN_AUTOCSELECTION(const char *,int)), + SLOT(handleAutoCompletionSelection())); + connect(this,SIGNAL(SCN_USERLISTSELECTION(const char *,int)), + SLOT(handleUserListSelection(const char *,int))); + + // Set the default font. + setFont(QApplication::font()); + + // Set the default fore and background colours. + QPalette pal = QApplication::palette(); + setColor(pal.text().color()); + setPaper(pal.base().color()); + setSelectionForegroundColor(pal.highlightedText().color()); + setSelectionBackgroundColor(pal.highlight().color()); + +#if defined(Q_OS_WIN) + setEolMode(EolWindows); +#else + // Note that EolMac is pre-OS/X. + setEolMode(EolUnix); +#endif + + // Capturing the mouse seems to cause problems on multi-head systems. Qt + // should do the right thing anyway. + SendScintilla(SCI_SETMOUSEDOWNCAPTURES, 0UL); + + setMatchedBraceForegroundColor(Qt::blue); + setUnmatchedBraceForegroundColor(Qt::red); + + setAnnotationDisplay(AnnotationStandard); + setLexer(); + + // Set the visible policy. These are the same as SciTE's defaults + // which, presumably, are sensible. + SendScintilla(SCI_SETVISIBLEPOLICY, VISIBLE_STRICT | VISIBLE_SLOP, 4); + + // The default behaviour is unexpected. + SendScintilla(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, + SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE); + + // Create the standard command set. + stdCmds = new QsciCommandSet(this); + + doc.display(this,0); +} + + +// The dtor. +QsciScintilla::~QsciScintilla() +{ + // Detach any current lexer. + detachLexer(); + + doc.undisplay(this); + delete stdCmds; +} + + +// Return the current text colour. +QColor QsciScintilla::color() const +{ + return nl_text_colour; +} + + +// Set the text colour. +void QsciScintilla::setColor(const QColor &c) +{ + if (lex.isNull()) + { + // Assume style 0 applies to everything so that we don't need to use + // SCI_STYLECLEARALL which clears everything. + SendScintilla(SCI_STYLESETFORE, 0, c); + nl_text_colour = c; + } +} + + +// Return the overwrite mode. +bool QsciScintilla::overwriteMode() const +{ + return SendScintilla(SCI_GETOVERTYPE); +} + + +// Set the overwrite mode. +void QsciScintilla::setOverwriteMode(bool overwrite) +{ + SendScintilla(SCI_SETOVERTYPE, overwrite); +} + + +// Return the current paper colour. +QColor QsciScintilla::paper() const +{ + return nl_paper_colour; +} + + +// Set the paper colour. +void QsciScintilla::setPaper(const QColor &c) +{ + if (lex.isNull()) + { + // Assume style 0 applies to everything so that we don't need to use + // SCI_STYLECLEARALL which clears everything. We still have to set the + // default style as well for the background without any text. + SendScintilla(SCI_STYLESETBACK, 0, c); + SendScintilla(SCI_STYLESETBACK, STYLE_DEFAULT, c); + nl_paper_colour = c; + } +} + + +// Set the default font. +void QsciScintilla::setFont(const QFont &f) +{ + if (lex.isNull()) + { + // Assume style 0 applies to everything so that we don't need to use + // SCI_STYLECLEARALL which clears everything. + setStylesFont(f, 0); + QWidget::setFont(f); + } +} + + +// Enable/disable auto-indent. +void QsciScintilla::setAutoIndent(bool autoindent) +{ + autoInd = autoindent; +} + + +// Set the brace matching mode. +void QsciScintilla::setBraceMatching(BraceMatch bm) +{ + braceMode = bm; +} + + +// Handle the addition of a character. +void QsciScintilla::handleCharAdded(int ch) +{ + // Ignore if there is a selection. + long pos = SendScintilla(SCI_GETSELECTIONSTART); + + if (pos != SendScintilla(SCI_GETSELECTIONEND) || pos == 0) + return; + + // If auto-completion is already active then see if this character is a + // start character. If it is then create a new list which will be a subset + // of the current one. The case where it isn't a start character seems to + // be handled correctly elsewhere. + if (isListActive() && isStartChar(ch)) + { + cancelList(); + startAutoCompletion(acSource, false, use_single == AcusAlways); + + return; + } + + // Handle call tips. + if (call_tips_style != CallTipsNone && !lex.isNull() && strchr("(),", ch) != NULL) + callTip(); + + // Handle auto-indentation. + if (autoInd) + { + if (lex.isNull() || (lex->autoIndentStyle() & AiMaintain)) + maintainIndentation(ch, pos); + else + autoIndentation(ch, pos); + } + + // See if we might want to start auto-completion. + if (!isCallTipActive() && acSource != AcsNone) + { + if (isStartChar(ch)) + startAutoCompletion(acSource, false, use_single == AcusAlways); + else if (acThresh >= 1 && isWordCharacter(ch)) + startAutoCompletion(acSource, true, use_single == AcusAlways); + } +} + + +// See if a call tip is active. +bool QsciScintilla::isCallTipActive() const +{ + return SendScintilla(SCI_CALLTIPACTIVE); +} + + +// Handle a possible change to any current call tip. +void QsciScintilla::callTip() +{ + QsciAbstractAPIs *apis = lex->apis(); + + if (!apis) + return; + + int pos, commas = 0; + bool found = false; + char ch; + + pos = SendScintilla(SCI_GETCURRENTPOS); + + // Move backwards through the line looking for the start of the current + // call tip and working out which argument it is. + while ((ch = getCharacter(pos)) != '\0') + { + if (ch == ',') + ++commas; + else if (ch == ')') + { + int depth = 1; + + // Ignore everything back to the start of the corresponding + // parenthesis. + while ((ch = getCharacter(pos)) != '\0') + { + if (ch == ')') + ++depth; + else if (ch == '(' && --depth == 0) + break; + } + } + else if (ch == '(') + { + found = true; + break; + } + } + + // Cancel any existing call tip. + SendScintilla(SCI_CALLTIPCANCEL); + + // Done if there is no new call tip to set. + if (!found) + return; + + QStringList context = apiContext(pos, pos, ctPos); + + if (context.isEmpty()) + return; + + // The last word is complete, not partial. + context << QString(); + + ct_cursor = 0; + ct_shifts.clear(); + ct_entries = apis->callTips(context, commas, call_tips_style, ct_shifts); + + int nr_entries = ct_entries.count(); + + if (nr_entries == 0) + return; + + if (maxCallTips > 0 && maxCallTips < nr_entries) + { + ct_entries = ct_entries.mid(0, maxCallTips); + nr_entries = maxCallTips; + } + + int shift; + QString ct; + + int nr_shifts = ct_shifts.count(); + + if (maxCallTips < 0 && nr_entries > 1) + { + shift = (nr_shifts > 0 ? ct_shifts.first() : 0); + ct = ct_entries[0]; + ct.prepend('\002'); + } + else + { + if (nr_shifts > nr_entries) + nr_shifts = nr_entries; + + // Find the biggest shift. + shift = 0; + + for (int i = 0; i < nr_shifts; ++i) + { + int sh = ct_shifts[i]; + + if (shift < sh) + shift = sh; + } + + ct = ct_entries.join("\n"); + } + + QByteArray ct_bytes = textAsBytes(ct); + const char *cts = ct_bytes.constData(); + + SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), cts); + + // Done if there is more than one call tip. + if (nr_entries > 1) + return; + + // Highlight the current argument. + const char *astart; + + if (commas == 0) + astart = strchr(cts, '('); + else + for (astart = strchr(cts, ','); astart && --commas > 0; astart = strchr(astart + 1, ',')) + ; + + if (!astart || !*++astart) + return; + + // The end is at the next comma or unmatched closing parenthesis. + const char *aend; + int depth = 0; + + for (aend = astart; *aend; ++aend) + { + char ch = *aend; + + if (ch == ',' && depth == 0) + break; + else if (ch == '(') + ++depth; + else if (ch == ')') + { + if (depth == 0) + break; + + --depth; + } + } + + if (astart != aend) + SendScintilla(SCI_CALLTIPSETHLT, astart - cts, aend - cts); +} + + +// Handle a call tip click. +void QsciScintilla::handleCallTipClick(int dir) +{ + int nr_entries = ct_entries.count(); + + // Move the cursor while bounds checking. + if (dir == 1) + { + if (ct_cursor - 1 < 0) + return; + + --ct_cursor; + } + else if (dir == 2) + { + if (ct_cursor + 1 >= nr_entries) + return; + + ++ct_cursor; + } + else + return; + + int shift = (ct_shifts.count() > ct_cursor ? ct_shifts[ct_cursor] : 0); + QString ct = ct_entries[ct_cursor]; + + // Add the arrows. + if (ct_cursor < nr_entries - 1) + ct.prepend('\002'); + + if (ct_cursor > 0) + ct.prepend('\001'); + + SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), + textAsBytes(ct).constData()); +} + + +// Shift the position of the call tip (to take any context into account) but +// don't go before the start of the line. +int QsciScintilla::adjustedCallTipPosition(int ctshift) const +{ + int ct = ctPos; + + if (ctshift) + { + int ctmin = SendScintilla(SCI_POSITIONFROMLINE, SendScintilla(SCI_LINEFROMPOSITION, ct)); + + if (ct - ctshift < ctmin) + ct = ctmin; + } + + return ct; +} + + +// Return the list of words that make up the context preceding the given +// position. The list will only have more than one element if there is a lexer +// set and it defines start strings. If so, then the last element might be +// empty if a start string has just been typed. On return pos is at the start +// of the context. +QStringList QsciScintilla::apiContext(int pos, int &context_start, + int &last_word_start) +{ + enum { + Either, + Separator, + Word + }; + + QStringList words; + int good_pos = pos, expecting = Either; + + last_word_start = -1; + + while (pos > 0) + { + if (getSeparator(pos)) + { + if (expecting == Either) + words.prepend(QString()); + else if (expecting == Word) + break; + + good_pos = pos; + expecting = Word; + } + else + { + QString word = getWord(pos); + + if (word.isEmpty() || expecting == Separator) + break; + + words.prepend(word); + good_pos = pos; + expecting = Separator; + + // Return the position of the start of the last word if required. + if (last_word_start < 0) + last_word_start = pos; + } + + // Strip any preceding spaces (mainly around operators). + char ch; + + while ((ch = getCharacter(pos)) != '\0') + { + // This is the same definition of space that Scintilla uses. + if (ch != ' ' && (ch < 0x09 || ch > 0x0d)) + { + ++pos; + break; + } + } + } + + // A valid sequence always starts with a word and so should be expecting a + // separator. + if (expecting != Separator) + words.clear(); + + context_start = good_pos; + + return words; +} + + +// Try and get a lexer's word separator from the text before the current +// position. Return true if one was found and adjust the position accordingly. +bool QsciScintilla::getSeparator(int &pos) const +{ + int opos = pos; + + // Go through each separator. + for (int i = 0; i < wseps.count(); ++i) + { + const QString &ws = wseps[i]; + + // Work backwards. + uint l; + + for (l = ws.length(); l; --l) + { + char ch = getCharacter(pos); + + if (ch == '\0' || ws.at(l - 1) != ch) + break; + } + + if (!l) + return true; + + // Reset for the next separator. + pos = opos; + } + + return false; +} + + +// Try and get a word from the text before the current position. Return the +// word if one was found and adjust the position accordingly. +QString QsciScintilla::getWord(int &pos) const +{ + QString word; + bool numeric = true; + char ch; + + while ((ch = getCharacter(pos)) != '\0') + { + if (!isWordCharacter(ch)) + { + ++pos; + break; + } + + if (ch < '0' || ch > '9') + numeric = false; + + word.prepend(ch); + } + + // We don't auto-complete numbers. + if (numeric) + word.truncate(0); + + return word; +} + + +// Get the "next" character (ie. the one before the current position) in the +// current line. The character will be '\0' if there are no more. +char QsciScintilla::getCharacter(int &pos) const +{ + if (pos <= 0) + return '\0'; + + char ch = SendScintilla(SCI_GETCHARAT, --pos); + + // Don't go past the end of the previous line. + if (ch == '\n' || ch == '\r') + { + ++pos; + return '\0'; + } + + return ch; +} + + +// See if a character is an auto-completion start character, ie. the last +// character of a word separator. +bool QsciScintilla::isStartChar(char ch) const +{ + QString s = QChar(ch); + + for (int i = 0; i < wseps.count(); ++i) + if (wseps[i].endsWith(s)) + return true; + + return false; +} + + +// Possibly start auto-completion. +void QsciScintilla::startAutoCompletion(AutoCompletionSource acs, + bool checkThresh, bool choose_single) +{ + int start, ignore; + QStringList context = apiContext(SendScintilla(SCI_GETCURRENTPOS), start, + ignore); + + if (context.isEmpty()) + return; + + // Get the last word's raw data and length. + QByteArray s = textAsBytes(context.last()); + const char *last_data = s.constData(); + int last_len = s.length(); + + if (checkThresh && last_len < acThresh) + return; + + // Generate the string representing the valid words to select from. + QStringList wlist; + + if ((acs == AcsAll || acs == AcsAPIs) && !lex.isNull()) + { + QsciAbstractAPIs *apis = lex->apis(); + + if (apis) + apis->updateAutoCompletionList(context, wlist); + } + + if (acs == AcsAll || acs == AcsDocument) + { + int sflags = SCFIND_WORDSTART; + + if (!SendScintilla(SCI_AUTOCGETIGNORECASE)) + sflags |= SCFIND_MATCHCASE; + + SendScintilla(SCI_SETSEARCHFLAGS, sflags); + + int pos = 0; + int dlen = SendScintilla(SCI_GETLENGTH); + int caret = SendScintilla(SCI_GETCURRENTPOS); + int clen = caret - start; + char *orig_context = new char[clen + 1]; + + SendScintilla(SCI_GETTEXTRANGE, start, caret, orig_context); + + for (;;) + { + int fstart; + + SendScintilla(SCI_SETTARGETSTART, pos); + SendScintilla(SCI_SETTARGETEND, dlen); + + if ((fstart = SendScintilla(SCI_SEARCHINTARGET, clen, orig_context)) < 0) + break; + + // Move past the root part. + pos = fstart + clen; + + // Skip if this is the context we are auto-completing. + if (pos == caret) + continue; + + // Get the rest of this word. + QString w = last_data; + + while (pos < dlen) + { + char ch = SendScintilla(SCI_GETCHARAT, pos); + + if (!isWordCharacter(ch)) + break; + + w += ch; + ++pos; + } + + // Add the word if it isn't already there. + if (!w.isEmpty()) + { + bool keep; + + // If there are APIs then check if the word is already present + // as an API word (i.e. with a trailing space). + if (acs == AcsAll) + { + QString api_w = w; + api_w.append(' '); + + keep = !wlist.contains(api_w); + } + else + { + keep = true; + } + + if (keep && !wlist.contains(w)) + wlist.append(w); + } + } + + delete []orig_context; + } + + if (wlist.isEmpty()) + return; + + wlist.sort(); + + SendScintilla(SCI_AUTOCSETCHOOSESINGLE, choose_single); + SendScintilla(SCI_AUTOCSETSEPARATOR, acSeparator); + + SendScintilla(SCI_AUTOCSHOW, last_len, + textAsBytes(wlist.join(QChar(acSeparator))).constData()); +} + + +// Maintain the indentation of the previous line. +void QsciScintilla::maintainIndentation(char ch, long pos) +{ + if (ch != '\r' && ch != '\n') + return; + + int curr_line = SendScintilla(SCI_LINEFROMPOSITION, pos); + + // Get the indentation of the preceding non-zero length line. + int ind = 0; + + for (int line = curr_line - 1; line >= 0; --line) + { + if (SendScintilla(SCI_GETLINEENDPOSITION, line) > + SendScintilla(SCI_POSITIONFROMLINE, line)) + { + ind = indentation(line); + break; + } + } + + if (ind > 0) + autoIndentLine(pos, curr_line, ind); +} + + +// Implement auto-indentation. +void QsciScintilla::autoIndentation(char ch, long pos) +{ + int curr_line = SendScintilla(SCI_LINEFROMPOSITION, pos); + int ind_width = indentWidth(); + long curr_line_start = SendScintilla(SCI_POSITIONFROMLINE, curr_line); + + const char *block_start = lex->blockStart(); + bool start_single = (block_start && qstrlen(block_start) == 1); + + const char *block_end = lex->blockEnd(); + bool end_single = (block_end && qstrlen(block_end) == 1); + + if (end_single && block_end[0] == ch) + { + if (!(lex->autoIndentStyle() & AiClosing) && rangeIsWhitespace(curr_line_start, pos - 1)) + autoIndentLine(pos, curr_line, blockIndent(curr_line - 1) - ind_width); + } + else if (start_single && block_start[0] == ch) + { + // De-indent if we have already indented because the previous line was + // a start of block keyword. + if (!(lex->autoIndentStyle() & AiOpening) && curr_line > 0 && getIndentState(curr_line - 1) == isKeywordStart && rangeIsWhitespace(curr_line_start, pos - 1)) + autoIndentLine(pos, curr_line, blockIndent(curr_line - 1) - ind_width); + } + else if (ch == '\r' || ch == '\n') + { + // Don't auto-indent the line (ie. preserve its existing indentation) + // if we have inserted a new line above by pressing return at the start + // of this line - in other words, if the previous line is empty. + long prev_line_length = SendScintilla(SCI_GETLINEENDPOSITION, curr_line - 1) - SendScintilla(SCI_POSITIONFROMLINE, curr_line - 1); + + if (prev_line_length != 0) + autoIndentLine(pos, curr_line, blockIndent(curr_line - 1)); + } +} + + +// Set the indentation for a line. +void QsciScintilla::autoIndentLine(long pos, int line, int indent) +{ + if (indent < 0) + return; + + long pos_before = SendScintilla(SCI_GETLINEINDENTPOSITION, line); + SendScintilla(SCI_SETLINEINDENTATION, line, indent); + long pos_after = SendScintilla(SCI_GETLINEINDENTPOSITION, line); + long new_pos = -1; + + if (pos_after > pos_before) + { + new_pos = pos + (pos_after - pos_before); + } + else if (pos_after < pos_before && pos >= pos_after) + { + if (pos >= pos_before) + new_pos = pos + (pos_after - pos_before); + else + new_pos = pos_after; + } + + if (new_pos >= 0) + SendScintilla(SCI_SETSEL, new_pos, new_pos); +} + + +// Return the indentation of the block defined by the given line (or something +// significant before). +int QsciScintilla::blockIndent(int line) +{ + if (line < 0) + return 0; + + // Handle the trvial case. + if (!lex->blockStartKeyword() && !lex->blockStart() && !lex->blockEnd()) + return indentation(line); + + int line_limit = line - lex->blockLookback(); + + if (line_limit < 0) + line_limit = 0; + + for (int l = line; l >= line_limit; --l) + { + IndentState istate = getIndentState(l); + + if (istate != isNone) + { + int ind_width = indentWidth(); + int ind = indentation(l); + + if (istate == isBlockStart) + { + if (!(lex -> autoIndentStyle() & AiOpening)) + ind += ind_width; + } + else if (istate == isBlockEnd) + { + if (lex -> autoIndentStyle() & AiClosing) + ind -= ind_width; + + if (ind < 0) + ind = 0; + } + else if (line == l) + ind += ind_width; + + return ind; + } + } + + return indentation(line); +} + + +// Return true if all characters starting at spos up to, but not including +// epos, are spaces or tabs. +bool QsciScintilla::rangeIsWhitespace(long spos, long epos) +{ + while (spos < epos) + { + char ch = SendScintilla(SCI_GETCHARAT, spos); + + if (ch != ' ' && ch != '\t') + return false; + + ++spos; + } + + return true; +} + + +// Returns the indentation state of a line. +QsciScintilla::IndentState QsciScintilla::getIndentState(int line) +{ + IndentState istate; + + // Get the styled text. + long spos = SendScintilla(SCI_POSITIONFROMLINE, line); + long epos = SendScintilla(SCI_POSITIONFROMLINE, line + 1); + + char *text = new char[(epos - spos + 1) * 2]; + + SendScintilla(SCI_GETSTYLEDTEXT, spos, epos, text); + + int style, bstart_off, bend_off; + + // Block start/end takes precedence over keywords. + const char *bstart_words = lex->blockStart(&style); + bstart_off = findStyledWord(text, style, bstart_words); + + const char *bend_words = lex->blockEnd(&style); + bend_off = findStyledWord(text, style, bend_words); + + // If there is a block start but no block end characters then ignore it + // unless the block start is the last significant thing on the line, ie. + // assume Python-like blocking. + if (bstart_off >= 0 && !bend_words) + for (int i = bstart_off * 2; text[i] != '\0'; i += 2) + if (!QChar(text[i]).isSpace()) + return isNone; + + if (bstart_off > bend_off) + istate = isBlockStart; + else if (bend_off > bstart_off) + istate = isBlockEnd; + else + { + const char *words = lex->blockStartKeyword(&style); + + istate = (findStyledWord(text,style,words) >= 0) ? isKeywordStart : isNone; + } + + delete[] text; + + return istate; +} + + +// text is a pointer to some styled text (ie. a character byte followed by a +// style byte). style is a style number. words is a space separated list of +// words. Returns the position in the text immediately after the last one of +// the words with the style. The reason we are after the last, and not the +// first, occurance is that we are looking for words that start and end a block +// where the latest one is the most significant. +int QsciScintilla::findStyledWord(const char *text, int style, + const char *words) +{ + if (!words) + return -1; + + // Find the range of text with the style we are looking for. + const char *stext; + + for (stext = text; stext[1] != style; stext += 2) + if (stext[0] == '\0') + return -1; + + // Move to the last character. + const char *etext = stext; + + while (etext[2] != '\0') + etext += 2; + + // Backtrack until we find the style. There will be one. + while (etext[1] != style) + etext -= 2; + + // Look for each word in turn. + while (words[0] != '\0') + { + // Find the end of the word. + const char *eword = words; + + while (eword[1] != ' ' && eword[1] != '\0') + ++eword; + + // Now search the text backwards. + const char *wp = eword; + + for (const char *tp = etext; tp >= stext; tp -= 2) + { + if (tp[0] != wp[0] || tp[1] != style) + { + // Reset the search. + wp = eword; + continue; + } + + // See if all the word has matched. + if (wp-- == words) + return ((tp - text) / 2) + (eword - words) + 1; + } + + // Move to the start of the next word if there is one. + words = eword + 1; + + if (words[0] == ' ') + ++words; + } + + return -1; +} + + +// Return true if the code page is UTF8. +bool QsciScintilla::isUtf8() const +{ + return (SendScintilla(SCI_GETCODEPAGE) == SC_CP_UTF8); +} + + +// Set the code page. +void QsciScintilla::setUtf8(bool cp) +{ + SendScintilla(SCI_SETCODEPAGE, (cp ? SC_CP_UTF8 : 0)); +} + + +// Return the end-of-line mode. +QsciScintilla::EolMode QsciScintilla::eolMode() const +{ + return (EolMode)SendScintilla(SCI_GETEOLMODE); +} + + +// Set the end-of-line mode. +void QsciScintilla::setEolMode(EolMode mode) +{ + SendScintilla(SCI_SETEOLMODE, mode); +} + + +// Convert the end-of-lines to a particular mode. +void QsciScintilla::convertEols(EolMode mode) +{ + SendScintilla(SCI_CONVERTEOLS, mode); +} + + +// Add an edge column. +void QsciScintilla::addEdgeColumn(int colnr, const QColor &col) +{ + SendScintilla(SCI_MULTIEDGEADDLINE, colnr, col); +} + + +// Clear all multi-edge columns. +void QsciScintilla::clearEdgeColumns() +{ + SendScintilla(SCI_MULTIEDGECLEARALL); +} + + +// Return the edge colour. +QColor QsciScintilla::edgeColor() const +{ + return asQColor(SendScintilla(SCI_GETEDGECOLOUR)); +} + + +// Set the edge colour. +void QsciScintilla::setEdgeColor(const QColor &col) +{ + SendScintilla(SCI_SETEDGECOLOUR, col); +} + + +// Return the edge column. +int QsciScintilla::edgeColumn() const +{ + return SendScintilla(SCI_GETEDGECOLUMN); +} + + +// Set the edge column. +void QsciScintilla::setEdgeColumn(int colnr) +{ + SendScintilla(SCI_SETEDGECOLUMN, colnr); +} + + +// Return the edge mode. +QsciScintilla::EdgeMode QsciScintilla::edgeMode() const +{ + return (EdgeMode)SendScintilla(SCI_GETEDGEMODE); +} + + +// Set the edge mode. +void QsciScintilla::setEdgeMode(EdgeMode mode) +{ + SendScintilla(SCI_SETEDGEMODE, mode); +} + + +// Return the end-of-line visibility. +bool QsciScintilla::eolVisibility() const +{ + return SendScintilla(SCI_GETVIEWEOL); +} + + +// Set the end-of-line visibility. +void QsciScintilla::setEolVisibility(bool visible) +{ + SendScintilla(SCI_SETVIEWEOL, visible); +} + + +// Return the extra ascent. +int QsciScintilla::extraAscent() const +{ + return SendScintilla(SCI_GETEXTRAASCENT); +} + + +// Set the extra ascent. +void QsciScintilla::setExtraAscent(int extra) +{ + SendScintilla(SCI_SETEXTRAASCENT, extra); +} + + +// Return the extra descent. +int QsciScintilla::extraDescent() const +{ + return SendScintilla(SCI_GETEXTRADESCENT); +} + + +// Set the extra descent. +void QsciScintilla::setExtraDescent(int extra) +{ + SendScintilla(SCI_SETEXTRADESCENT, extra); +} + + +// Return the whitespace size. +int QsciScintilla::whitespaceSize() const +{ + return SendScintilla(SCI_GETWHITESPACESIZE); +} + + +// Set the whitespace size. +void QsciScintilla::setWhitespaceSize(int size) +{ + SendScintilla(SCI_SETWHITESPACESIZE, size); +} + + +// Set the whitespace background colour. +void QsciScintilla::setWhitespaceBackgroundColor(const QColor &col) +{ + SendScintilla(SCI_SETWHITESPACEBACK, col.isValid(), col); +} + + +// Set the whitespace foreground colour. +void QsciScintilla::setWhitespaceForegroundColor(const QColor &col) +{ + SendScintilla(SCI_SETWHITESPACEFORE, col.isValid(), col); +} + + +// Return the whitespace visibility. +QsciScintilla::WhitespaceVisibility QsciScintilla::whitespaceVisibility() const +{ + return (WhitespaceVisibility)SendScintilla(SCI_GETVIEWWS); +} + + +// Set the whitespace visibility. +void QsciScintilla::setWhitespaceVisibility(WhitespaceVisibility mode) +{ + SendScintilla(SCI_SETVIEWWS, mode); +} + + +// Return the tab draw mode. +QsciScintilla::TabDrawMode QsciScintilla::tabDrawMode() const +{ + return (TabDrawMode)SendScintilla(SCI_GETTABDRAWMODE); +} + + +// Set the tab draw mode. +void QsciScintilla::setTabDrawMode(TabDrawMode mode) +{ + SendScintilla(SCI_SETTABDRAWMODE, mode); +} + + +// Return the line wrap mode. +QsciScintilla::WrapMode QsciScintilla::wrapMode() const +{ + return (WrapMode)SendScintilla(SCI_GETWRAPMODE); +} + + +// Set the line wrap mode. +void QsciScintilla::setWrapMode(WrapMode mode) +{ + SendScintilla(SCI_SETLAYOUTCACHE, + (mode == WrapNone ? SC_CACHE_CARET : SC_CACHE_DOCUMENT)); + SendScintilla(SCI_SETWRAPMODE, mode); +} + + +// Return the line wrap indent mode. +QsciScintilla::WrapIndentMode QsciScintilla::wrapIndentMode() const +{ + return (WrapIndentMode)SendScintilla(SCI_GETWRAPINDENTMODE); +} + + +// Set the line wrap indent mode. +void QsciScintilla::setWrapIndentMode(WrapIndentMode mode) +{ + SendScintilla(SCI_SETWRAPINDENTMODE, mode); +} + + +// Set the line wrap visual flags. +void QsciScintilla::setWrapVisualFlags(WrapVisualFlag endFlag, + WrapVisualFlag startFlag, int indent) +{ + int flags = SC_WRAPVISUALFLAG_NONE; + int loc = SC_WRAPVISUALFLAGLOC_DEFAULT; + + switch (endFlag) + { + case WrapFlagNone: + break; + + case WrapFlagByText: + flags |= SC_WRAPVISUALFLAG_END; + loc |= SC_WRAPVISUALFLAGLOC_END_BY_TEXT; + break; + + case WrapFlagByBorder: + flags |= SC_WRAPVISUALFLAG_END; + break; + + case WrapFlagInMargin: + flags |= SC_WRAPVISUALFLAG_MARGIN; + break; + } + + switch (startFlag) + { + case WrapFlagNone: + break; + + case WrapFlagByText: + flags |= SC_WRAPVISUALFLAG_START; + loc |= SC_WRAPVISUALFLAGLOC_START_BY_TEXT; + break; + + case WrapFlagByBorder: + flags |= SC_WRAPVISUALFLAG_START; + break; + + case WrapFlagInMargin: + flags |= SC_WRAPVISUALFLAG_MARGIN; + break; + } + + SendScintilla(SCI_SETWRAPVISUALFLAGS, flags); + SendScintilla(SCI_SETWRAPVISUALFLAGSLOCATION, loc); + SendScintilla(SCI_SETWRAPSTARTINDENT, indent); +} + + +// Set the folding style. +void QsciScintilla::setFolding(FoldStyle folding, int margin) +{ + fold = folding; + foldmargin = margin; + + if (folding == NoFoldStyle) + { + SendScintilla(SCI_SETMARGINWIDTHN, margin, 0L); + return; + } + + int mask = SendScintilla(SCI_GETMODEVENTMASK); + SendScintilla(SCI_SETMODEVENTMASK, mask | SC_MOD_CHANGEFOLD); + + SendScintilla(SCI_SETFOLDFLAGS, SC_FOLDFLAG_LINEAFTER_CONTRACTED); + + SendScintilla(SCI_SETMARGINTYPEN, margin, (long)SC_MARGIN_SYMBOL); + SendScintilla(SCI_SETMARGINMASKN, margin, SC_MASK_FOLDERS); + SendScintilla(SCI_SETMARGINSENSITIVEN, margin, 1); + + // Set the marker symbols to use. + switch (folding) + { + case NoFoldStyle: + break; + + case PlainFoldStyle: + setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_MINUS); + setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_PLUS); + setFoldMarker(SC_MARKNUM_FOLDERSUB); + setFoldMarker(SC_MARKNUM_FOLDERTAIL); + setFoldMarker(SC_MARKNUM_FOLDEREND); + setFoldMarker(SC_MARKNUM_FOLDEROPENMID); + setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL); + break; + + case CircledFoldStyle: + setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS); + setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS); + setFoldMarker(SC_MARKNUM_FOLDERSUB); + setFoldMarker(SC_MARKNUM_FOLDERTAIL); + setFoldMarker(SC_MARKNUM_FOLDEREND); + setFoldMarker(SC_MARKNUM_FOLDEROPENMID); + setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL); + break; + + case BoxedFoldStyle: + setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS); + setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS); + setFoldMarker(SC_MARKNUM_FOLDERSUB); + setFoldMarker(SC_MARKNUM_FOLDERTAIL); + setFoldMarker(SC_MARKNUM_FOLDEREND); + setFoldMarker(SC_MARKNUM_FOLDEROPENMID); + setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL); + break; + + case CircledTreeFoldStyle: + setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS); + setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS); + setFoldMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE); + setFoldMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNERCURVE); + setFoldMarker(SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED); + setFoldMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED); + setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNERCURVE); + break; + + case BoxedTreeFoldStyle: + setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS); + setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS); + setFoldMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE); + setFoldMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNER); + setFoldMarker(SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED); + setFoldMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED); + setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNER); + break; + } + + SendScintilla(SCI_SETMARGINWIDTHN, margin, defaultFoldMarginWidth); +} + + +// Clear all current folds. +void QsciScintilla::clearFolds() +{ + recolor(); + + int maxLine = SendScintilla(SCI_GETLINECOUNT); + + for (int line = 0; line < maxLine; line++) + { + int level = SendScintilla(SCI_GETFOLDLEVEL, line); + + if (level & SC_FOLDLEVELHEADERFLAG) + { + SendScintilla(SCI_SETFOLDEXPANDED, line, 1); + foldExpand(line, true, false, 0, level); + line--; + } + } +} + + +// Set up a folder marker. +void QsciScintilla::setFoldMarker(int marknr, int mark) +{ + SendScintilla(SCI_MARKERDEFINE, marknr, mark); + + if (mark != SC_MARK_EMPTY) + { + SendScintilla(SCI_MARKERSETFORE, marknr, QColor(Qt::white)); + SendScintilla(SCI_MARKERSETBACK, marknr, QColor(Qt::black)); + } +} + + +// Handle a click in the fold margin. This is mostly taken from SciTE. +void QsciScintilla::foldClick(int lineClick, int bstate) +{ + bool shift = bstate & Qt::ShiftModifier; + bool ctrl = bstate & Qt::ControlModifier; + + if (shift && ctrl) + { + foldAll(); + return; + } + + int levelClick = SendScintilla(SCI_GETFOLDLEVEL, lineClick); + + if (levelClick & SC_FOLDLEVELHEADERFLAG) + { + if (shift) + { + // Ensure all children are visible. + SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 1); + foldExpand(lineClick, true, true, 100, levelClick); + } + else if (ctrl) + { + if (SendScintilla(SCI_GETFOLDEXPANDED, lineClick)) + { + // Contract this line and all its children. + SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 0L); + foldExpand(lineClick, false, true, 0, levelClick); + } + else + { + // Expand this line and all its children. + SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 1); + foldExpand(lineClick, true, true, 100, levelClick); + } + } + else + { + // Toggle this line. + SendScintilla(SCI_TOGGLEFOLD, lineClick); + } + } +} + + +// Do the hard work of hiding and showing lines. This is mostly taken from +// SciTE. +void QsciScintilla::foldExpand(int &line, bool doExpand, bool force, + int visLevels, int level) +{ + int lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, line, + level & SC_FOLDLEVELNUMBERMASK); + + line++; + + while (line <= lineMaxSubord) + { + if (force) + { + if (visLevels > 0) + SendScintilla(SCI_SHOWLINES, line, line); + else + SendScintilla(SCI_HIDELINES, line, line); + } + else if (doExpand) + SendScintilla(SCI_SHOWLINES, line, line); + + int levelLine = level; + + if (levelLine == -1) + levelLine = SendScintilla(SCI_GETFOLDLEVEL, line); + + if (levelLine & SC_FOLDLEVELHEADERFLAG) + { + if (force) + { + if (visLevels > 1) + SendScintilla(SCI_SETFOLDEXPANDED, line, 1); + else + SendScintilla(SCI_SETFOLDEXPANDED, line, 0L); + + foldExpand(line, doExpand, force, visLevels - 1); + } + else if (doExpand) + { + if (!SendScintilla(SCI_GETFOLDEXPANDED, line)) + SendScintilla(SCI_SETFOLDEXPANDED, line, 1); + + foldExpand(line, true, force, visLevels - 1); + } + else + foldExpand(line, false, force, visLevels - 1); + } + else + line++; + } +} + + +// Fully expand (if there is any line currently folded) all text. Otherwise, +// fold all text. This is mostly taken from SciTE. +void QsciScintilla::foldAll(bool children) +{ + recolor(); + + int maxLine = SendScintilla(SCI_GETLINECOUNT); + bool expanding = true; + + for (int lineSeek = 0; lineSeek < maxLine; lineSeek++) + { + if (SendScintilla(SCI_GETFOLDLEVEL,lineSeek) & SC_FOLDLEVELHEADERFLAG) + { + expanding = !SendScintilla(SCI_GETFOLDEXPANDED, lineSeek); + break; + } + } + + for (int line = 0; line < maxLine; line++) + { + int level = SendScintilla(SCI_GETFOLDLEVEL, line); + + if (!(level & SC_FOLDLEVELHEADERFLAG)) + continue; + + if (children || + (SC_FOLDLEVELBASE == (level & SC_FOLDLEVELNUMBERMASK))) + { + if (expanding) + { + SendScintilla(SCI_SETFOLDEXPANDED, line, 1); + foldExpand(line, true, false, 0, level); + line--; + } + else + { + int lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, line, -1); + + SendScintilla(SCI_SETFOLDEXPANDED, line, 0L); + + if (lineMaxSubord > line) + SendScintilla(SCI_HIDELINES, line + 1, lineMaxSubord); + } + } + } +} + + +// Handle a fold change. This is mostly taken from SciTE. +void QsciScintilla::foldChanged(int line,int levelNow,int levelPrev) +{ + if (levelNow & SC_FOLDLEVELHEADERFLAG) + { + if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) + SendScintilla(SCI_SETFOLDEXPANDED, line, 1); + } + else if (levelPrev & SC_FOLDLEVELHEADERFLAG) + { + if (!SendScintilla(SCI_GETFOLDEXPANDED, line)) + { + // Removing the fold from one that has been contracted so should + // expand. Otherwise lines are left invisible with no way to make + // them visible. + foldExpand(line, true, false, 0, levelPrev); + } + } +} + + +// Toggle the fold for a line if it contains a fold marker. +void QsciScintilla::foldLine(int line) +{ + SendScintilla(SCI_TOGGLEFOLD, line); +} + + +// Return the list of folded lines. +QList QsciScintilla::contractedFolds() const +{ + QList folds; + int linenr = 0, fold_line; + + while ((fold_line = SendScintilla(SCI_CONTRACTEDFOLDNEXT, linenr)) >= 0) + { + folds.append(fold_line); + linenr = fold_line + 1; + } + + return folds; +} + + +// Set the fold state from a list. +void QsciScintilla::setContractedFolds(const QList &folds) +{ + for (int i = 0; i < folds.count(); ++i) + { + int line = folds[i]; + int last_line = SendScintilla(SCI_GETLASTCHILD, line, -1); + + SendScintilla(SCI_SETFOLDEXPANDED, line, 0L); + SendScintilla(SCI_HIDELINES, line + 1, last_line); + } +} + + +// Handle the SCN_MODIFIED notification. +void QsciScintilla::handleModified(int pos, int mtype, const char *text, + int len, int added, int line, int foldNow, int foldPrev, int token, + int annotationLinesAdded) +{ + Q_UNUSED(pos); + Q_UNUSED(text); + Q_UNUSED(len); + Q_UNUSED(token); + Q_UNUSED(annotationLinesAdded); + + if (mtype & SC_MOD_CHANGEFOLD) + { + if (fold) + foldChanged(line, foldNow, foldPrev); + } + + if (mtype & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) + { + emit textChanged(); + + if (added != 0) + emit linesChanged(); + } +} + + +// Zoom in a number of points. +void QsciScintilla::zoomIn(int range) +{ + zoomTo(SendScintilla(SCI_GETZOOM) + range); +} + + +// Zoom in a single point. +void QsciScintilla::zoomIn() +{ + SendScintilla(SCI_ZOOMIN); +} + + +// Zoom out a number of points. +void QsciScintilla::zoomOut(int range) +{ + zoomTo(SendScintilla(SCI_GETZOOM) - range); +} + + +// Zoom out a single point. +void QsciScintilla::zoomOut() +{ + SendScintilla(SCI_ZOOMOUT); +} + + +// Set the zoom to a number of points. +void QsciScintilla::zoomTo(int size) +{ + if (size < -10) + size = -10; + else if (size > 20) + size = 20; + + SendScintilla(SCI_SETZOOM, size); +} + + +// Find the first occurrence of a string. +bool QsciScintilla::findFirst(const QString &expr, bool re, bool cs, bool wo, + bool wrap, bool forward, int line, int index, bool show, bool posix, + bool cxx11) +{ + if (expr.isEmpty()) + { + findState.status = FindState::Idle; + return false; + } + + findState.status = FindState::Finding; + findState.expr = expr; + findState.wrap = wrap; + findState.forward = forward; + + findState.flags = + (cs ? SCFIND_MATCHCASE : 0) | + (wo ? SCFIND_WHOLEWORD : 0) | + (re ? SCFIND_REGEXP : 0) | + (posix ? SCFIND_POSIX : 0) | + (cxx11 ? SCFIND_CXX11REGEX : 0); + + if (line < 0 || index < 0) + findState.startpos = SendScintilla(SCI_GETCURRENTPOS); + else + findState.startpos = positionFromLineIndex(line, index); + + if (forward) + findState.endpos = SendScintilla(SCI_GETLENGTH); + else + findState.endpos = 0; + + findState.show = show; + + return doFind(); +} + + +// Find the first occurrence of a string in the current selection. +bool QsciScintilla::findFirstInSelection(const QString &expr, bool re, bool cs, + bool wo, bool forward, bool show, bool posix, bool cxx11) +{ + if (expr.isEmpty()) + { + findState.status = FindState::Idle; + return false; + } + + findState.status = FindState::FindingInSelection; + findState.expr = expr; + findState.wrap = false; + findState.forward = forward; + + findState.flags = + (cs ? SCFIND_MATCHCASE : 0) | + (wo ? SCFIND_WHOLEWORD : 0) | + (re ? SCFIND_REGEXP : 0) | + (posix ? SCFIND_POSIX : 0) | + (cxx11 ? SCFIND_CXX11REGEX : 0); + + findState.startpos_orig = SendScintilla(SCI_GETSELECTIONSTART); + findState.endpos_orig = SendScintilla(SCI_GETSELECTIONEND); + + if (forward) + { + findState.startpos = findState.startpos_orig; + findState.endpos = findState.endpos_orig; + } + else + { + findState.startpos = findState.endpos_orig; + findState.endpos = findState.startpos_orig; + } + + findState.show = show; + + return doFind(); +} + + +// Cancel any current search. +void QsciScintilla::cancelFind() +{ + findState.status = FindState::Idle; +} + + +// Find the next occurrence of a string. +bool QsciScintilla::findNext() +{ + if (findState.status == FindState::Idle) + return false; + + return doFind(); +} + + +// Do the hard work of the find methods. +bool QsciScintilla::doFind() +{ + SendScintilla(SCI_SETSEARCHFLAGS, findState.flags); + + int pos = simpleFind(); + + // See if it was found. If not and wraparound is wanted, try again. + if (pos == -1 && findState.wrap) + { + if (findState.forward) + { + findState.startpos = 0; + findState.endpos = SendScintilla(SCI_GETLENGTH); + } + else + { + findState.startpos = SendScintilla(SCI_GETLENGTH); + findState.endpos = 0; + } + + pos = simpleFind(); + } + + if (pos == -1) + { + // Restore the original selection. + if (findState.status == FindState::FindingInSelection) + SendScintilla(SCI_SETSEL, findState.startpos_orig, + findState.endpos_orig); + + findState.status = FindState::Idle; + return false; + } + + // It was found. + long targstart = SendScintilla(SCI_GETTARGETSTART); + long targend = SendScintilla(SCI_GETTARGETEND); + + // Ensure the text found is visible if required. + if (findState.show) + { + int startLine = SendScintilla(SCI_LINEFROMPOSITION, targstart); + int endLine = SendScintilla(SCI_LINEFROMPOSITION, targend); + + for (int i = startLine; i <= endLine; ++i) + SendScintilla(SCI_ENSUREVISIBLEENFORCEPOLICY, i); + } + + // Now set the selection. + SendScintilla(SCI_SETSEL, targstart, targend); + + // Finally adjust the start position so that we don't find the same one + // again. + if (findState.forward) + findState.startpos = targend; + else if ((findState.startpos = targstart - 1) < 0) + findState.startpos = 0; + + return true; +} + + +// Do a simple find between the start and end positions. +int QsciScintilla::simpleFind() +{ + if (findState.startpos == findState.endpos) + return -1; + + SendScintilla(SCI_SETTARGETSTART, findState.startpos); + SendScintilla(SCI_SETTARGETEND, findState.endpos); + + QByteArray s = textAsBytes(findState.expr); + + return SendScintilla(SCI_SEARCHINTARGET, s.length(), s.constData()); +} + + +// Replace the text found with the previous find method. +void QsciScintilla::replace(const QString &replaceStr) +{ + if (findState.status == FindState::Idle) + return; + + long start = SendScintilla(SCI_GETSELECTIONSTART); + long orig_len = SendScintilla(SCI_GETSELECTIONEND) - start; + + SendScintilla(SCI_TARGETFROMSELECTION); + + int cmd = (findState.flags & SCFIND_REGEXP) ? SCI_REPLACETARGETRE : SCI_REPLACETARGET; + + long len = SendScintilla(cmd, -1, textAsBytes(replaceStr).constData()); + + // Reset the selection. + SendScintilla(SCI_SETSELECTIONSTART, start); + SendScintilla(SCI_SETSELECTIONEND, start + len); + + // Fix the original selection. + findState.endpos_orig += (len - orig_len); + + if (findState.forward) + { + findState.startpos = start + len; + findState.endpos += (len - orig_len); + } +} + + +// Query the modified state. +bool QsciScintilla::isModified() const +{ + return doc.isModified(); +} + + +// Set the modified state. +void QsciScintilla::setModified(bool m) +{ + if (!m) + SendScintilla(SCI_SETSAVEPOINT); +} + + +// Handle the SCN_INDICATORCLICK notification. +void QsciScintilla::handleIndicatorClick(int pos, int modifiers) +{ + int state = mapModifiers(modifiers); + int line, index; + + lineIndexFromPosition(pos, &line, &index); + + emit indicatorClicked(line, index, Qt::KeyboardModifiers(state)); +} + + +// Handle the SCN_INDICATORRELEASE notification. +void QsciScintilla::handleIndicatorRelease(int pos, int modifiers) +{ + int state = mapModifiers(modifiers); + int line, index; + + lineIndexFromPosition(pos, &line, &index); + + emit indicatorReleased(line, index, Qt::KeyboardModifiers(state)); +} + + +// Handle the SCN_MARGINCLICK notification. +void QsciScintilla::handleMarginClick(int pos, int modifiers, int margin) +{ + int state = mapModifiers(modifiers); + int line = SendScintilla(SCI_LINEFROMPOSITION, pos); + + if (fold && margin == foldmargin) + foldClick(line, state); + else + emit marginClicked(margin, line, Qt::KeyboardModifiers(state)); +} + + +// Handle the SCN_MARGINRIGHTCLICK notification. +void QsciScintilla::handleMarginRightClick(int pos, int modifiers, int margin) +{ + int state = mapModifiers(modifiers); + int line = SendScintilla(SCI_LINEFROMPOSITION, pos); + + emit marginRightClicked(margin, line, Qt::KeyboardModifiers(state)); +} + + +// Handle the SCN_SAVEPOINTREACHED notification. +void QsciScintilla::handleSavePointReached() +{ + doc.setModified(false); + emit modificationChanged(false); +} + + +// Handle the SCN_SAVEPOINTLEFT notification. +void QsciScintilla::handleSavePointLeft() +{ + doc.setModified(true); + emit modificationChanged(true); +} + + +// Handle the QSCN_SELCHANGED signal. +void QsciScintilla::handleSelectionChanged(bool yes) +{ + selText = yes; + + emit copyAvailable(yes); + emit selectionChanged(); +} + + +// Get the current selection. +void QsciScintilla::getSelection(int *lineFrom, int *indexFrom, int *lineTo, + int *indexTo) const +{ + if (selText) + { + lineIndexFromPosition(SendScintilla(SCI_GETSELECTIONSTART), lineFrom, + indexFrom); + lineIndexFromPosition(SendScintilla(SCI_GETSELECTIONEND), lineTo, + indexTo); + } + else + *lineFrom = *indexFrom = *lineTo = *indexTo = -1; +} + + +// Sets the current selection. +void QsciScintilla::setSelection(int lineFrom, int indexFrom, int lineTo, + int indexTo) +{ + SendScintilla(SCI_SETSEL, positionFromLineIndex(lineFrom, indexFrom), + positionFromLineIndex(lineTo, indexTo)); +} + + +// Set the background colour of selected text. +void QsciScintilla::setSelectionBackgroundColor(const QColor &col) +{ + int alpha = col.alpha(); + + if (alpha == 255) + alpha = SC_ALPHA_NOALPHA; + + SendScintilla(SCI_SETSELBACK, 1, col); + SendScintilla(SCI_SETSELALPHA, alpha); +} + + +// Set the foreground colour of selected text. +void QsciScintilla::setSelectionForegroundColor(const QColor &col) +{ + SendScintilla(SCI_SETSELFORE, 1, col); +} + + +// Reset the background colour of selected text to the default. +void QsciScintilla::resetSelectionBackgroundColor() +{ + SendScintilla(SCI_SETSELALPHA, SC_ALPHA_NOALPHA); + SendScintilla(SCI_SETSELBACK, 0UL); +} + + +// Reset the foreground colour of selected text to the default. +void QsciScintilla::resetSelectionForegroundColor() +{ + SendScintilla(SCI_SETSELFORE, 0UL); +} + + +// Set the fill to the end-of-line for the selection. +void QsciScintilla::setSelectionToEol(bool filled) +{ + SendScintilla(SCI_SETSELEOLFILLED, filled); +} + + +// Return the fill to the end-of-line for the selection. +bool QsciScintilla::selectionToEol() const +{ + return SendScintilla(SCI_GETSELEOLFILLED); +} + + +// Set the width of the caret. +void QsciScintilla::setCaretWidth(int width) +{ + SendScintilla(SCI_SETCARETWIDTH, width); +} + + +// Set the width of the frame of the line containing the caret. +void QsciScintilla::setCaretLineFrameWidth(int width) +{ + SendScintilla(SCI_SETCARETLINEFRAME, width); +} + + +// Set the foreground colour of the caret. +void QsciScintilla::setCaretForegroundColor(const QColor &col) +{ + SendScintilla(SCI_SETCARETFORE, col); +} + + +// Set the background colour of the line containing the caret. +void QsciScintilla::setCaretLineBackgroundColor(const QColor &col) +{ + int alpha = col.alpha(); + + if (alpha == 255) + alpha = SC_ALPHA_NOALPHA; + + SendScintilla(SCI_SETCARETLINEBACK, col); + SendScintilla(SCI_SETCARETLINEBACKALPHA, alpha); +} + + +// Set the state of the background colour of the line containing the caret. +void QsciScintilla::setCaretLineVisible(bool enable) +{ + SendScintilla(SCI_SETCARETLINEVISIBLE, enable); +} + + +// Set the background colour of a hotspot area. +void QsciScintilla::setHotspotBackgroundColor(const QColor &col) +{ + SendScintilla(SCI_SETHOTSPOTACTIVEBACK, 1, col); +} + + +// Set the foreground colour of a hotspot area. +void QsciScintilla::setHotspotForegroundColor(const QColor &col) +{ + SendScintilla(SCI_SETHOTSPOTACTIVEFORE, 1, col); +} + + +// Reset the background colour of a hotspot area to the default. +void QsciScintilla::resetHotspotBackgroundColor() +{ + SendScintilla(SCI_SETHOTSPOTACTIVEBACK, 0UL); +} + + +// Reset the foreground colour of a hotspot area to the default. +void QsciScintilla::resetHotspotForegroundColor() +{ + SendScintilla(SCI_SETHOTSPOTACTIVEFORE, 0UL); +} + + +// Set the underline of a hotspot area. +void QsciScintilla::setHotspotUnderline(bool enable) +{ + SendScintilla(SCI_SETHOTSPOTACTIVEUNDERLINE, enable); +} + + +// Set the wrapping of a hotspot area. +void QsciScintilla::setHotspotWrap(bool enable) +{ + SendScintilla(SCI_SETHOTSPOTSINGLELINE, !enable); +} + + +// Query the read-only state. +bool QsciScintilla::isReadOnly() const +{ + return SendScintilla(SCI_GETREADONLY); +} + + +// Set the read-only state. +void QsciScintilla::setReadOnly(bool ro) +{ + setAttribute(Qt::WA_InputMethodEnabled, !ro); + SendScintilla(SCI_SETREADONLY, ro); +} + + +// Append the given text. +void QsciScintilla::append(const QString &text) +{ + bool ro = ensureRW(); + + QByteArray s = textAsBytes(text); + SendScintilla(SCI_APPENDTEXT, s.length(), s.constData()); + + SendScintilla(SCI_EMPTYUNDOBUFFER); + + setReadOnly(ro); +} + + +// Insert the given text at the current position. +void QsciScintilla::insert(const QString &text) +{ + insertAtPos(text, -1); +} + + +// Insert the given text at the given line and offset. +void QsciScintilla::insertAt(const QString &text, int line, int index) +{ + insertAtPos(text, positionFromLineIndex(line, index)); +} + + +// Insert the given text at the given position. +void QsciScintilla::insertAtPos(const QString &text, int pos) +{ + bool ro = ensureRW(); + + SendScintilla(SCI_BEGINUNDOACTION); + SendScintilla(SCI_INSERTTEXT, pos, textAsBytes(text).constData()); + SendScintilla(SCI_ENDUNDOACTION); + + setReadOnly(ro); +} + + +// Begin a sequence of undoable actions. +void QsciScintilla::beginUndoAction() +{ + SendScintilla(SCI_BEGINUNDOACTION); +} + + +// End a sequence of undoable actions. +void QsciScintilla::endUndoAction() +{ + SendScintilla(SCI_ENDUNDOACTION); +} + + +// Redo a sequence of actions. +void QsciScintilla::redo() +{ + SendScintilla(SCI_REDO); +} + + +// Undo a sequence of actions. +void QsciScintilla::undo() +{ + SendScintilla(SCI_UNDO); +} + + +// See if there is something to redo. +bool QsciScintilla::isRedoAvailable() const +{ + return SendScintilla(SCI_CANREDO); +} + + +// See if there is something to undo. +bool QsciScintilla::isUndoAvailable() const +{ + return SendScintilla(SCI_CANUNDO); +} + + +// Return the number of lines. +int QsciScintilla::lines() const +{ + return SendScintilla(SCI_GETLINECOUNT); +} + + +// Return the line at a position. +int QsciScintilla::lineAt(const QPoint &pos) const +{ + long chpos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE, pos.x(), pos.y()); + + if (chpos < 0) + return -1; + + return SendScintilla(SCI_LINEFROMPOSITION, chpos); +} + + +// Return the length of a line. +int QsciScintilla::lineLength(int line) const +{ + if (line < 0 || line >= SendScintilla(SCI_GETLINECOUNT)) + return -1; + + return SendScintilla(SCI_LINELENGTH, line); +} + + +// Return the length of the current text. +int QsciScintilla::length() const +{ + return SendScintilla(SCI_GETTEXTLENGTH); +} + + +// Remove any selected text. +void QsciScintilla::removeSelectedText() +{ + SendScintilla(SCI_REPLACESEL, ""); +} + + +// Replace any selected text. +void QsciScintilla::replaceSelectedText(const QString &text) +{ + SendScintilla(SCI_REPLACESEL, textAsBytes(text).constData()); +} + + +// Return the current selected text. +QString QsciScintilla::selectedText() const +{ + if (!selText) + return QString(); + + int size = SendScintilla(SCI_GETSELECTIONEND) - SendScintilla(SCI_GETSELECTIONSTART); + char *buf = new char[size + 1]; + + SendScintilla(SCI_GETSELTEXT, buf); + + QString qs = bytesAsText(buf, size); + delete[] buf; + + return qs; +} + + +// Return the current text. +QString QsciScintilla::text() const +{ + int size = length(); + char *buf = new char[size + 1]; + + // Note that the docs seem to be wrong and we need to ask for the length + // plus the '\0'. + SendScintilla(SCI_GETTEXT, size + 1, buf); + + QString qs = bytesAsText(buf, size); + delete[] buf; + + return qs; +} + + +// Return the text of a line. +QString QsciScintilla::text(int line) const +{ + int size = lineLength(line); + + if (size < 1) + return QString(); + + char *buf = new char[size]; + + SendScintilla(SCI_GETLINE, line, buf); + + QString qs = bytesAsText(buf, size); + delete[] buf; + + return qs; +} + + +// Return the text between two positions. +QString QsciScintilla::text(int start, int end) const +{ + int size = end - start; + char *buf = new char[size + 1]; + SendScintilla(SCI_GETTEXTRANGE, start, end, buf); + QString text = bytesAsText(buf, size); + delete[] buf; + + return text; +} + + +// Return the text as encoded bytes between two positions. +QByteArray QsciScintilla::bytes(int start, int end) const +{ + QByteArray bytes(end - start + 1, '\0'); + + SendScintilla(SCI_GETTEXTRANGE, start, end, bytes.data()); + + return bytes; +} + + +// Set the given text. +void QsciScintilla::setText(const QString &text) +{ + bool ro = ensureRW(); + + SendScintilla(SCI_CLEARALL); + QByteArray bytes = textAsBytes(text); + SendScintilla(SCI_ADDTEXT, bytes.size(), bytes.constData()); + SendScintilla(SCI_EMPTYUNDOBUFFER); + + setReadOnly(ro); +} + + +// Get the cursor position +void QsciScintilla::getCursorPosition(int *line, int *index) const +{ + lineIndexFromPosition(SendScintilla(SCI_GETCURRENTPOS), line, index); +} + + +// Set the cursor position +void QsciScintilla::setCursorPosition(int line, int index) +{ + SendScintilla(SCI_GOTOPOS, positionFromLineIndex(line, index)); +} + + +// Ensure the cursor is visible. +void QsciScintilla::ensureCursorVisible() +{ + SendScintilla(SCI_SCROLLCARET); +} + + +// Ensure a line is visible. +void QsciScintilla::ensureLineVisible(int line) +{ + SendScintilla(SCI_ENSUREVISIBLEENFORCEPOLICY, line); +} + + +// Copy text to the clipboard. +void QsciScintilla::copy() +{ + SendScintilla(SCI_COPY); +} + + +// Cut text to the clipboard. +void QsciScintilla::cut() +{ + SendScintilla(SCI_CUT); +} + + +// Paste text from the clipboard. +void QsciScintilla::paste() +{ + SendScintilla(SCI_PASTE); +} + + +// Select all text, or deselect any selected text. +void QsciScintilla::selectAll(bool select) +{ + if (select) + SendScintilla(SCI_SELECTALL); + else + SendScintilla(SCI_SETANCHOR, SendScintilla(SCI_GETCURRENTPOS)); +} + + +// Delete all text. +void QsciScintilla::clear() +{ + bool ro = ensureRW(); + + SendScintilla(SCI_CLEARALL); + SendScintilla(SCI_EMPTYUNDOBUFFER); + + setReadOnly(ro); +} + + +// Return the indentation of a line. +int QsciScintilla::indentation(int line) const +{ + return SendScintilla(SCI_GETLINEINDENTATION, line); +} + + +// Set the indentation of a line. +void QsciScintilla::setIndentation(int line, int indentation) +{ + SendScintilla(SCI_BEGINUNDOACTION); + SendScintilla(SCI_SETLINEINDENTATION, line, indentation); + SendScintilla(SCI_ENDUNDOACTION); +} + + +// Indent a line. +void QsciScintilla::indent(int line) +{ + setIndentation(line, indentation(line) + indentWidth()); +} + + +// Unindent a line. +void QsciScintilla::unindent(int line) +{ + int newIndent = indentation(line) - indentWidth(); + + if (newIndent < 0) + newIndent = 0; + + setIndentation(line, newIndent); +} + + +// Return the indentation of the current line. +int QsciScintilla::currentIndent() const +{ + return indentation(SendScintilla(SCI_LINEFROMPOSITION, + SendScintilla(SCI_GETCURRENTPOS))); +} + + +// Return the current indentation width. +int QsciScintilla::indentWidth() const +{ + int w = indentationWidth(); + + if (w == 0) + w = tabWidth(); + + return w; +} + + +// Return the state of indentation guides. +bool QsciScintilla::indentationGuides() const +{ + return (SendScintilla(SCI_GETINDENTATIONGUIDES) != SC_IV_NONE); +} + + +// Enable and disable indentation guides. +void QsciScintilla::setIndentationGuides(bool enable) +{ + int iv; + + if (!enable) + iv = SC_IV_NONE; + else if (lex.isNull()) + iv = SC_IV_REAL; + else + iv = lex->indentationGuideView(); + + SendScintilla(SCI_SETINDENTATIONGUIDES, iv); +} + + +// Set the background colour of indentation guides. +void QsciScintilla::setIndentationGuidesBackgroundColor(const QColor &col) +{ + SendScintilla(SCI_STYLESETBACK, STYLE_INDENTGUIDE, col); +} + + +// Set the foreground colour of indentation guides. +void QsciScintilla::setIndentationGuidesForegroundColor(const QColor &col) +{ + SendScintilla(SCI_STYLESETFORE, STYLE_INDENTGUIDE, col); +} + + +// Return the indentation width. +int QsciScintilla::indentationWidth() const +{ + return SendScintilla(SCI_GETINDENT); +} + + +// Set the indentation width. +void QsciScintilla::setIndentationWidth(int width) +{ + SendScintilla(SCI_SETINDENT, width); +} + + +// Return the tab width. +int QsciScintilla::tabWidth() const +{ + return SendScintilla(SCI_GETTABWIDTH); +} + + +// Set the tab width. +void QsciScintilla::setTabWidth(int width) +{ + SendScintilla(SCI_SETTABWIDTH, width); +} + + +// Return the effect of the backspace key. +bool QsciScintilla::backspaceUnindents() const +{ + return SendScintilla(SCI_GETBACKSPACEUNINDENTS); +} + + +// Set the effect of the backspace key. +void QsciScintilla::setBackspaceUnindents(bool unindents) +{ + SendScintilla(SCI_SETBACKSPACEUNINDENTS, unindents); +} + + +// Return the effect of the tab key. +bool QsciScintilla::tabIndents() const +{ + return SendScintilla(SCI_GETTABINDENTS); +} + + +// Set the effect of the tab key. +void QsciScintilla::setTabIndents(bool indents) +{ + SendScintilla(SCI_SETTABINDENTS, indents); +} + + +// Return the indentation use of tabs. +bool QsciScintilla::indentationsUseTabs() const +{ + return SendScintilla(SCI_GETUSETABS); +} + + +// Set the indentation use of tabs. +void QsciScintilla::setIndentationsUseTabs(bool tabs) +{ + SendScintilla(SCI_SETUSETABS, tabs); +} + + +// Return the number of margins. +int QsciScintilla::margins() const +{ + return SendScintilla(SCI_GETMARGINS); +} + + +// Set the number of margins. +void QsciScintilla::setMargins(int margins) +{ + SendScintilla(SCI_SETMARGINS, margins); +} + + +// Return the margin background colour. +QColor QsciScintilla::marginBackgroundColor(int margin) const +{ + return asQColor(SendScintilla(SCI_GETMARGINBACKN, margin)); +} + + +// Set the margin background colour. +void QsciScintilla::setMarginBackgroundColor(int margin, const QColor &col) +{ + SendScintilla(SCI_SETMARGINBACKN, margin, col); +} + + +// Return the margin options. +int QsciScintilla::marginOptions() const +{ + return SendScintilla(SCI_GETMARGINOPTIONS); +} + + +// Set the margin options. +void QsciScintilla::setMarginOptions(int options) +{ + SendScintilla(SCI_SETMARGINOPTIONS, options); +} + + +// Return the margin type. +QsciScintilla::MarginType QsciScintilla::marginType(int margin) const +{ + return (MarginType)SendScintilla(SCI_GETMARGINTYPEN, margin); +} + + +// Set the margin type. +void QsciScintilla::setMarginType(int margin, QsciScintilla::MarginType type) +{ + SendScintilla(SCI_SETMARGINTYPEN, margin, type); +} + + +// Clear margin text. +void QsciScintilla::clearMarginText(int line) +{ + if (line < 0) + SendScintilla(SCI_MARGINTEXTCLEARALL); + else + SendScintilla(SCI_MARGINSETTEXT, line, (const char *)0); +} + + +// Annotate a line. +void QsciScintilla::setMarginText(int line, const QString &text, int style) +{ + int style_offset = SendScintilla(SCI_MARGINGETSTYLEOFFSET); + + SendScintilla(SCI_MARGINSETTEXT, line, textAsBytes(text).constData()); + SendScintilla(SCI_MARGINSETSTYLE, line, style - style_offset); +} + + +// Annotate a line. +void QsciScintilla::setMarginText(int line, const QString &text, const QsciStyle &style) +{ + style.apply(this); + + setMarginText(line, text, style.style()); +} + + +// Annotate a line. +void QsciScintilla::setMarginText(int line, const QsciStyledText &text) +{ + text.apply(this); + + setMarginText(line, text.text(), text.style()); +} + + +// Annotate a line. +void QsciScintilla::setMarginText(int line, const QList &text) +{ + char *styles; + QByteArray styled_text = styleText(text, &styles, + SendScintilla(SCI_MARGINGETSTYLEOFFSET)); + + SendScintilla(SCI_MARGINSETTEXT, line, styled_text.constData()); + SendScintilla(SCI_MARGINSETSTYLES, line, styles); + + delete[] styles; +} + + +// Return the state of line numbers in a margin. +bool QsciScintilla::marginLineNumbers(int margin) const +{ + return SendScintilla(SCI_GETMARGINTYPEN, margin); +} + + +// Enable and disable line numbers in a margin. +void QsciScintilla::setMarginLineNumbers(int margin, bool lnrs) +{ + SendScintilla(SCI_SETMARGINTYPEN, margin, + lnrs ? SC_MARGIN_NUMBER : SC_MARGIN_SYMBOL); +} + + +// Return the marker mask of a margin. +int QsciScintilla::marginMarkerMask(int margin) const +{ + return SendScintilla(SCI_GETMARGINMASKN, margin); +} + + +// Set the marker mask of a margin. +void QsciScintilla::setMarginMarkerMask(int margin,int mask) +{ + SendScintilla(SCI_SETMARGINMASKN, margin, mask); +} + + +// Return the state of a margin's sensitivity. +bool QsciScintilla::marginSensitivity(int margin) const +{ + return SendScintilla(SCI_GETMARGINSENSITIVEN, margin); +} + + +// Enable and disable a margin's sensitivity. +void QsciScintilla::setMarginSensitivity(int margin,bool sens) +{ + SendScintilla(SCI_SETMARGINSENSITIVEN, margin, sens); +} + + +// Return the width of a margin. +int QsciScintilla::marginWidth(int margin) const +{ + return SendScintilla(SCI_GETMARGINWIDTHN, margin); +} + + +// Set the width of a margin. +void QsciScintilla::setMarginWidth(int margin, int width) +{ + SendScintilla(SCI_SETMARGINWIDTHN, margin, width); +} + + +// Set the width of a margin to the width of some text. +void QsciScintilla::setMarginWidth(int margin, const QString &s) +{ + int width = SendScintilla(SCI_TEXTWIDTH, STYLE_LINENUMBER, + textAsBytes(s).constData()); + + setMarginWidth(margin, width); +} + + +// Set the background colour of all margins. +void QsciScintilla::setMarginsBackgroundColor(const QColor &col) +{ + handleStylePaperChange(col, STYLE_LINENUMBER); +} + + +// Set the foreground colour of all margins. +void QsciScintilla::setMarginsForegroundColor(const QColor &col) +{ + handleStyleColorChange(col, STYLE_LINENUMBER); +} + + +// Set the font of all margins. +void QsciScintilla::setMarginsFont(const QFont &f) +{ + setStylesFont(f, STYLE_LINENUMBER); +} + + +// Define an indicator. +int QsciScintilla::indicatorDefine(IndicatorStyle style, int indicatorNumber) +{ + checkIndicator(indicatorNumber); + + if (indicatorNumber >= 0) + SendScintilla(SCI_INDICSETSTYLE, indicatorNumber, + static_cast(style)); + + return indicatorNumber; +} + + +// Return the state of an indicator being drawn under the text. +bool QsciScintilla::indicatorDrawUnder(int indicatorNumber) const +{ + if (indicatorNumber < 0 || indicatorNumber >= INDIC_IME) + return false; + + return SendScintilla(SCI_INDICGETUNDER, indicatorNumber); +} + + +// Set the state of indicators being drawn under the text. +void QsciScintilla::setIndicatorDrawUnder(bool under, int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + SendScintilla(SCI_INDICSETUNDER, i, under); + } + else + { + SendScintilla(SCI_INDICSETUNDER, indicatorNumber, under); + } + } +} + + +// Set the indicator foreground colour. +void QsciScintilla::setIndicatorForegroundColor(const QColor &col, + int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + int alpha = col.alpha(); + + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + { + SendScintilla(SCI_INDICSETFORE, i, col); + SendScintilla(SCI_INDICSETALPHA, i, alpha); + } + } + else + { + SendScintilla(SCI_INDICSETFORE, indicatorNumber, col); + SendScintilla(SCI_INDICSETALPHA, indicatorNumber, alpha); + } + } +} + + +// Set the indicator hover foreground colour. +void QsciScintilla::setIndicatorHoverForegroundColor(const QColor &col, + int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + SendScintilla(SCI_INDICSETHOVERFORE, i, col); + } + else + { + SendScintilla(SCI_INDICSETHOVERFORE, indicatorNumber, col); + } + } +} + + +// Set the indicator hover style. +void QsciScintilla::setIndicatorHoverStyle(IndicatorStyle style, + int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + SendScintilla(SCI_INDICSETHOVERSTYLE, i, + static_cast(style)); + } + else + { + SendScintilla(SCI_INDICSETHOVERSTYLE, indicatorNumber, + static_cast(style)); + } + } +} + + +// Set the indicator outline colour. +void QsciScintilla::setIndicatorOutlineColor(const QColor &col, int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + int alpha = col.alpha(); + + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + SendScintilla(SCI_INDICSETOUTLINEALPHA, i, alpha); + } + else + { + SendScintilla(SCI_INDICSETOUTLINEALPHA, indicatorNumber, alpha); + } + } +} + + +// Fill a range with an indicator. +void QsciScintilla::fillIndicatorRange(int lineFrom, int indexFrom, + int lineTo, int indexTo, int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + int start = positionFromLineIndex(lineFrom, indexFrom); + int finish = positionFromLineIndex(lineTo, indexTo); + + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + { + SendScintilla(SCI_SETINDICATORCURRENT, i); + SendScintilla(SCI_INDICATORFILLRANGE, start, finish - start); + } + } + else + { + SendScintilla(SCI_SETINDICATORCURRENT, indicatorNumber); + SendScintilla(SCI_INDICATORFILLRANGE, start, finish - start); + } + } +} + + +// Clear a range with an indicator. +void QsciScintilla::clearIndicatorRange(int lineFrom, int indexFrom, + int lineTo, int indexTo, int indicatorNumber) +{ + if (indicatorNumber < INDIC_IME) + { + int start = positionFromLineIndex(lineFrom, indexFrom); + int finish = positionFromLineIndex(lineTo, indexTo); + + // We ignore allocatedIndicators to allow any indicators defined + // elsewhere (e.g. in lexers) to be set. + if (indicatorNumber < 0) + { + for (int i = 0; i < INDIC_IME; ++i) + { + SendScintilla(SCI_SETINDICATORCURRENT, i); + SendScintilla(SCI_INDICATORCLEARRANGE, start, finish - start); + } + } + else + { + SendScintilla(SCI_SETINDICATORCURRENT, indicatorNumber); + SendScintilla(SCI_INDICATORCLEARRANGE, start, finish - start); + } + } +} + + +// Define a marker based on a symbol. +int QsciScintilla::markerDefine(MarkerSymbol sym, int markerNumber) +{ + checkMarker(markerNumber); + + if (markerNumber >= 0) + SendScintilla(SCI_MARKERDEFINE, markerNumber, static_cast(sym)); + + return markerNumber; +} + + +// Define a marker based on a character. +int QsciScintilla::markerDefine(char ch, int markerNumber) +{ + checkMarker(markerNumber); + + if (markerNumber >= 0) + SendScintilla(SCI_MARKERDEFINE, markerNumber, + static_cast(SC_MARK_CHARACTER) + ch); + + return markerNumber; +} + + +// Define a marker based on a QPixmap. +int QsciScintilla::markerDefine(const QPixmap &pm, int markerNumber) +{ + checkMarker(markerNumber); + + if (markerNumber >= 0) + SendScintilla(SCI_MARKERDEFINEPIXMAP, markerNumber, pm); + + return markerNumber; +} + + +// Define a marker based on a QImage. +int QsciScintilla::markerDefine(const QImage &im, int markerNumber) +{ + checkMarker(markerNumber); + + if (markerNumber >= 0) + { + SendScintilla(SCI_RGBAIMAGESETHEIGHT, im.height()); + SendScintilla(SCI_RGBAIMAGESETWIDTH, im.width()); + SendScintilla(SCI_MARKERDEFINERGBAIMAGE, markerNumber, im); + } + + return markerNumber; +} + + +// Add a marker to a line. +int QsciScintilla::markerAdd(int linenr, int markerNumber) +{ + if (markerNumber < 0 || markerNumber > MARKER_MAX || (allocatedMarkers & (1 << markerNumber)) == 0) + return -1; + + return SendScintilla(SCI_MARKERADD, linenr, markerNumber); +} + + +// Get the marker mask for a line. +unsigned QsciScintilla::markersAtLine(int linenr) const +{ + return SendScintilla(SCI_MARKERGET, linenr); +} + + +// Delete a marker from a line. +void QsciScintilla::markerDelete(int linenr, int markerNumber) +{ + if (markerNumber <= MARKER_MAX) + { + if (markerNumber < 0) + { + unsigned am = allocatedMarkers; + + for (int m = 0; m <= MARKER_MAX; ++m) + { + if (am & 1) + SendScintilla(SCI_MARKERDELETE, linenr, m); + + am >>= 1; + } + } + else if (allocatedMarkers & (1 << markerNumber)) + SendScintilla(SCI_MARKERDELETE, linenr, markerNumber); + } +} + + +// Delete a marker from the text. +void QsciScintilla::markerDeleteAll(int markerNumber) +{ + if (markerNumber <= MARKER_MAX) + { + if (markerNumber < 0) + SendScintilla(SCI_MARKERDELETEALL, -1); + else if (allocatedMarkers & (1 << markerNumber)) + SendScintilla(SCI_MARKERDELETEALL, markerNumber); + } +} + + +// Delete a marker handle from the text. +void QsciScintilla::markerDeleteHandle(int mhandle) +{ + SendScintilla(SCI_MARKERDELETEHANDLE, mhandle); +} + + +// Return the line containing a marker instance. +int QsciScintilla::markerLine(int mhandle) const +{ + return SendScintilla(SCI_MARKERLINEFROMHANDLE, mhandle); +} + + +// Search forwards for a marker. +int QsciScintilla::markerFindNext(int linenr, unsigned mask) const +{ + return SendScintilla(SCI_MARKERNEXT, linenr, mask); +} + + +// Search backwards for a marker. +int QsciScintilla::markerFindPrevious(int linenr, unsigned mask) const +{ + return SendScintilla(SCI_MARKERPREVIOUS, linenr, mask); +} + + +// Set the marker background colour. +void QsciScintilla::setMarkerBackgroundColor(const QColor &col, int markerNumber) +{ + if (markerNumber <= MARKER_MAX) + { + int alpha = col.alpha(); + + // An opaque background would make the text invisible. + if (alpha == 255) + alpha = SC_ALPHA_NOALPHA; + + if (markerNumber < 0) + { + unsigned am = allocatedMarkers; + + for (int m = 0; m <= MARKER_MAX; ++m) + { + if (am & 1) + { + SendScintilla(SCI_MARKERSETBACK, m, col); + SendScintilla(SCI_MARKERSETALPHA, m, alpha); + } + + am >>= 1; + } + } + else if (allocatedMarkers & (1 << markerNumber)) + { + SendScintilla(SCI_MARKERSETBACK, markerNumber, col); + SendScintilla(SCI_MARKERSETALPHA, markerNumber, alpha); + } + } +} + + +// Set the marker foreground colour. +void QsciScintilla::setMarkerForegroundColor(const QColor &col, int markerNumber) +{ + if (markerNumber <= MARKER_MAX) + { + if (markerNumber < 0) + { + unsigned am = allocatedMarkers; + + for (int m = 0; m <= MARKER_MAX; ++m) + { + if (am & 1) + SendScintilla(SCI_MARKERSETFORE, m, col); + + am >>= 1; + } + } + else if (allocatedMarkers & (1 << markerNumber)) + { + SendScintilla(SCI_MARKERSETFORE, markerNumber, col); + } + } +} + + +// Check a marker, allocating a marker number if necessary. +void QsciScintilla::checkMarker(int &markerNumber) +{ + allocateId(markerNumber, allocatedMarkers, 0, MARKER_MAX); +} + + +// Check an indicator, allocating an indicator number if necessary. +void QsciScintilla::checkIndicator(int &indicatorNumber) +{ + allocateId(indicatorNumber, allocatedIndicators, INDIC_CONTAINER, + INDIC_IME - 1); +} + + +// Make sure an identifier is valid and allocate it if necessary. +void QsciScintilla::allocateId(int &id, unsigned &allocated, int min, int max) +{ + if (id >= 0) + { + // Note that we allow existing identifiers to be explicitly redefined. + if (id > max) + id = -1; + } + else + { + unsigned aids = allocated >> min; + + // Find the smallest unallocated identifier. + for (id = min; id <= max; ++id) + { + if ((aids & 1) == 0) + break; + + aids >>= 1; + } + } + + // Allocate the identifier if it is valid. + if (id >= 0) + allocated |= (1 << id); +} + + +// Reset the fold margin colours. +void QsciScintilla::resetFoldMarginColors() +{ + SendScintilla(SCI_SETFOLDMARGINHICOLOUR, 0, 0L); + SendScintilla(SCI_SETFOLDMARGINCOLOUR, 0, 0L); +} + + +// Set the fold margin colours. +void QsciScintilla::setFoldMarginColors(const QColor &fore, const QColor &back) +{ + SendScintilla(SCI_SETFOLDMARGINHICOLOUR, 1, fore); + SendScintilla(SCI_SETFOLDMARGINCOLOUR, 1, back); +} + + +// Set the call tips background colour. +void QsciScintilla::setCallTipsBackgroundColor(const QColor &col) +{ + SendScintilla(SCI_CALLTIPSETBACK, col); +} + + +// Set the call tips foreground colour. +void QsciScintilla::setCallTipsForegroundColor(const QColor &col) +{ + SendScintilla(SCI_CALLTIPSETFORE, col); +} + + +// Set the call tips highlight colour. +void QsciScintilla::setCallTipsHighlightColor(const QColor &col) +{ + SendScintilla(SCI_CALLTIPSETFOREHLT, col); +} + + +// Set the matched brace background colour. +void QsciScintilla::setMatchedBraceBackgroundColor(const QColor &col) +{ + SendScintilla(SCI_STYLESETBACK, STYLE_BRACELIGHT, col); +} + + +// Set the matched brace foreground colour. +void QsciScintilla::setMatchedBraceForegroundColor(const QColor &col) +{ + SendScintilla(SCI_STYLESETFORE, STYLE_BRACELIGHT, col); +} + + +// Set the matched brace indicator. +void QsciScintilla::setMatchedBraceIndicator(int indicatorNumber) +{ + SendScintilla(SCI_BRACEHIGHLIGHTINDICATOR, 1, indicatorNumber); +} + + +// Reset the matched brace indicator. +void QsciScintilla::resetMatchedBraceIndicator() +{ + SendScintilla(SCI_BRACEHIGHLIGHTINDICATOR, 0, 0L); +} + + +// Set the unmatched brace background colour. +void QsciScintilla::setUnmatchedBraceBackgroundColor(const QColor &col) +{ + SendScintilla(SCI_STYLESETBACK, STYLE_BRACEBAD, col); +} + + +// Set the unmatched brace foreground colour. +void QsciScintilla::setUnmatchedBraceForegroundColor(const QColor &col) +{ + SendScintilla(SCI_STYLESETFORE, STYLE_BRACEBAD, col); +} + + +// Set the unmatched brace indicator. +void QsciScintilla::setUnmatchedBraceIndicator(int indicatorNumber) +{ + SendScintilla(SCI_BRACEBADLIGHTINDICATOR, 1, indicatorNumber); +} + + +// Reset the unmatched brace indicator. +void QsciScintilla::resetUnmatchedBraceIndicator() +{ + SendScintilla(SCI_BRACEBADLIGHTINDICATOR, 0, 0L); +} + + +// Detach any lexer. +void QsciScintilla::detachLexer() +{ + if (!lex.isNull()) + { + lex->setEditor(0); + lex->disconnect(this); + + SendScintilla(SCI_STYLERESETDEFAULT); + SendScintilla(SCI_STYLECLEARALL); + } +} + + +// Set the lexer. +void QsciScintilla::setLexer(QsciLexer *lexer) +{ + // Detach any current lexer. + detachLexer(); + + // Connect up the new lexer. + lex = lexer; + + if (lex) + { + SendScintilla(SCI_CLEARDOCUMENTSTYLE); + + if (lex->lexer()) + SendScintilla(SCI_SETLEXERLANGUAGE, lex->lexer()); + else + SendScintilla(SCI_SETLEXER, lex->lexerId()); + + lex->setEditor(this); + + connect(lex,SIGNAL(colorChanged(const QColor &, int)), + SLOT(handleStyleColorChange(const QColor &, int))); + connect(lex,SIGNAL(eolFillChanged(bool, int)), + SLOT(handleStyleEolFillChange(bool, int))); + connect(lex,SIGNAL(fontChanged(const QFont &, int)), + SLOT(handleStyleFontChange(const QFont &, int))); + connect(lex,SIGNAL(paperChanged(const QColor &, int)), + SLOT(handleStylePaperChange(const QColor &, int))); + connect(lex,SIGNAL(propertyChanged(const char *, const char *)), + SLOT(handlePropertyChange(const char *, const char *))); + + SendScintilla(SCI_SETPROPERTY, "fold", "1"); + SendScintilla(SCI_SETPROPERTY, "fold.html", "1"); + + // Set the keywords. Scintilla allows for sets numbered 0 to + // KEYWORDSET_MAX (although the lexers only seem to exploit 0 to + // KEYWORDSET_MAX - 1). We number from 1 in line with SciTE's property + // files. + for (int k = 0; k <= KEYWORDSET_MAX; ++k) + { + const char *kw = lex -> keywords(k + 1); + + if (!kw) + kw = ""; + + SendScintilla(SCI_SETKEYWORDS, k, kw); + } + + // Initialise each style. Do the default first so its (possibly + // incorrect) font setting gets reset when style 0 is set. + setLexerStyle(STYLE_DEFAULT); + + for (int s = 0; s <= STYLE_MAX; ++s) + if (!lex->description(s).isEmpty()) + setLexerStyle(s); + + // Initialise the properties. + lex->refreshProperties(); + + // Set the auto-completion fillups and word separators. + setAutoCompletionFillupsEnabled(fillups_enabled); + wseps = lex->autoCompletionWordSeparators(); + + wchars = lex->wordCharacters(); + + if (!wchars) + wchars = defaultWordChars; + + SendScintilla(SCI_AUTOCSETIGNORECASE, !lex->caseSensitive()); + + recolor(); + } + else + { + SendScintilla(SCI_SETLEXER, SCLEX_CONTAINER); + + setColor(nl_text_colour); + setPaper(nl_paper_colour); + + SendScintilla(SCI_AUTOCSETFILLUPS, ""); + SendScintilla(SCI_AUTOCSETIGNORECASE, false); + wseps.clear(); + wchars = defaultWordChars; + } +} + + +// Set a particular style of the current lexer. +void QsciScintilla::setLexerStyle(int style) +{ + handleStyleColorChange(lex->color(style), style); + handleStyleEolFillChange(lex->eolFill(style), style); + handleStyleFontChange(lex->font(style), style); + handleStylePaperChange(lex->paper(style), style); +} + + +// Get the current lexer. +QsciLexer *QsciScintilla::lexer() const +{ + return lex; +} + + +// Handle a change in lexer style foreground colour. +void QsciScintilla::handleStyleColorChange(const QColor &c, int style) +{ + SendScintilla(SCI_STYLESETFORE, style, c); +} + + +// Handle a change in lexer style end-of-line fill. +void QsciScintilla::handleStyleEolFillChange(bool eolfill, int style) +{ + SendScintilla(SCI_STYLESETEOLFILLED, style, eolfill); +} + + +// Handle a change in lexer style font. +void QsciScintilla::handleStyleFontChange(const QFont &f, int style) +{ + setStylesFont(f, style); + + if (style == lex->braceStyle()) + { + setStylesFont(f, STYLE_BRACELIGHT); + setStylesFont(f, STYLE_BRACEBAD); + } +} + + +// Set the font for a style. +void QsciScintilla::setStylesFont(const QFont &f, int style) +{ + SendScintilla(SCI_STYLESETFONT, style, f.family().toLatin1().data()); + SendScintilla(SCI_STYLESETSIZEFRACTIONAL, style, + long(f.pointSizeF() * SC_FONT_SIZE_MULTIPLIER)); + + // Pass the Qt weight via the back door. + SendScintilla(SCI_STYLESETWEIGHT, style, -f.weight()); + + SendScintilla(SCI_STYLESETITALIC, style, f.italic()); + SendScintilla(SCI_STYLESETUNDERLINE, style, f.underline()); + + // Tie the font settings of the default style to that of style 0 (the style + // conventionally used for whitespace by lexers). This is needed so that + // fold marks, indentations, edge columns etc are set properly. + if (style == 0) + setStylesFont(f, STYLE_DEFAULT); +} + + +// Handle a change in lexer style background colour. +void QsciScintilla::handleStylePaperChange(const QColor &c, int style) +{ + SendScintilla(SCI_STYLESETBACK, style, c); +} + + +// Handle a change in lexer property. +void QsciScintilla::handlePropertyChange(const char *prop, const char *val) +{ + SendScintilla(SCI_SETPROPERTY, prop, val); +} + + +// Handle a change to the user visible user interface. +void QsciScintilla::handleUpdateUI(int) +{ + int newPos = SendScintilla(SCI_GETCURRENTPOS); + + if (newPos != oldPos) + { + oldPos = newPos; + + int line = SendScintilla(SCI_LINEFROMPOSITION, newPos); + int col = SendScintilla(SCI_GETCOLUMN, newPos); + + emit cursorPositionChanged(line, col); + } + + if (braceMode != NoBraceMatch) + braceMatch(); +} + + +// Handle brace matching. +void QsciScintilla::braceMatch() +{ + long braceAtCaret, braceOpposite; + + findMatchingBrace(braceAtCaret, braceOpposite, braceMode); + + if (braceAtCaret >= 0 && braceOpposite < 0) + { + SendScintilla(SCI_BRACEBADLIGHT, braceAtCaret); + SendScintilla(SCI_SETHIGHLIGHTGUIDE, 0UL); + } + else + { + char chBrace = SendScintilla(SCI_GETCHARAT, braceAtCaret); + + SendScintilla(SCI_BRACEHIGHLIGHT, braceAtCaret, braceOpposite); + + long columnAtCaret = SendScintilla(SCI_GETCOLUMN, braceAtCaret); + long columnOpposite = SendScintilla(SCI_GETCOLUMN, braceOpposite); + + if (chBrace == ':') + { + long lineStart = SendScintilla(SCI_LINEFROMPOSITION, braceAtCaret); + long indentPos = SendScintilla(SCI_GETLINEINDENTPOSITION, + lineStart); + long indentPosNext = SendScintilla(SCI_GETLINEINDENTPOSITION, + lineStart + 1); + + columnAtCaret = SendScintilla(SCI_GETCOLUMN, indentPos); + + long columnAtCaretNext = SendScintilla(SCI_GETCOLUMN, + indentPosNext); + long indentSize = SendScintilla(SCI_GETINDENT); + + if (columnAtCaretNext - indentSize > 1) + columnAtCaret = columnAtCaretNext - indentSize; + + if (columnOpposite == 0) + columnOpposite = columnAtCaret; + } + + long column = columnAtCaret; + + if (column > columnOpposite) + column = columnOpposite; + + SendScintilla(SCI_SETHIGHLIGHTGUIDE, column); + } +} + + +// Check if the character at a position is a brace. +long QsciScintilla::checkBrace(long pos, int brace_style, bool &colonMode) +{ + long brace_pos = -1; + char ch = SendScintilla(SCI_GETCHARAT, pos); + + if (ch == ':') + { + // A bit of a hack, we should really use a virtual. + if (!lex.isNull() && qstrcmp(lex->lexer(), "python") == 0) + { + brace_pos = pos; + colonMode = true; + } + } + else if (ch && strchr("[](){}<>", ch)) + { + if (brace_style < 0) + brace_pos = pos; + else + { + int style = SendScintilla(SCI_GETSTYLEAT, pos) & 0x1f; + + if (style == brace_style) + brace_pos = pos; + } + } + + return brace_pos; +} + + +// Find a brace and it's match. Return true if the current position is inside +// a pair of braces. +bool QsciScintilla::findMatchingBrace(long &brace, long &other, BraceMatch mode) +{ + bool colonMode = false; + int brace_style = (lex.isNull() ? -1 : lex->braceStyle()); + + brace = -1; + other = -1; + + long caretPos = SendScintilla(SCI_GETCURRENTPOS); + + if (caretPos > 0) + brace = checkBrace(caretPos - 1, brace_style, colonMode); + + bool isInside = false; + + if (brace < 0 && mode == SloppyBraceMatch) + { + brace = checkBrace(caretPos, brace_style, colonMode); + + if (brace >= 0 && !colonMode) + isInside = true; + } + + if (brace >= 0) + { + if (colonMode) + { + // Find the end of the Python indented block. + long lineStart = SendScintilla(SCI_LINEFROMPOSITION, brace); + long lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, lineStart, -1); + + other = SendScintilla(SCI_GETLINEENDPOSITION, lineMaxSubord); + } + else + other = SendScintilla(SCI_BRACEMATCH, brace, 0L); + + if (other > brace) + isInside = !isInside; + } + + return isInside; +} + + +// Move to the matching brace. +void QsciScintilla::moveToMatchingBrace() +{ + gotoMatchingBrace(false); +} + + +// Select to the matching brace. +void QsciScintilla::selectToMatchingBrace() +{ + gotoMatchingBrace(true); +} + + +// Move to the matching brace and optionally select the text. +void QsciScintilla::gotoMatchingBrace(bool select) +{ + long braceAtCaret; + long braceOpposite; + + bool isInside = findMatchingBrace(braceAtCaret, braceOpposite, + SloppyBraceMatch); + + if (braceOpposite >= 0) + { + // Convert the character positions into caret positions based on + // whether the caret position was inside or outside the braces. + if (isInside) + { + if (braceOpposite > braceAtCaret) + braceAtCaret++; + else + braceOpposite++; + } + else + { + if (braceOpposite > braceAtCaret) + braceOpposite++; + else + braceAtCaret++; + } + + ensureLineVisible(SendScintilla(SCI_LINEFROMPOSITION, braceOpposite)); + + if (select) + SendScintilla(SCI_SETSEL, braceAtCaret, braceOpposite); + else + SendScintilla(SCI_SETSEL, braceOpposite, braceOpposite); + } +} + + +// Return a position from a line number and an index within the line. +int QsciScintilla::positionFromLineIndex(int line, int index) const +{ + int pos = SendScintilla(SCI_POSITIONFROMLINE, line); + + // Allow for multi-byte characters. + for(int i = 0; i < index; i++) + pos = SendScintilla(SCI_POSITIONAFTER, pos); + + return pos; +} + + +// Return a line number and an index within the line from a position. +void QsciScintilla::lineIndexFromPosition(int position, int *line, int *index) const +{ + int lin = SendScintilla(SCI_LINEFROMPOSITION, position); + int linpos = SendScintilla(SCI_POSITIONFROMLINE, lin); + int indx = 0; + + // Allow for multi-byte characters. + while (linpos < position) + { + int new_linpos = SendScintilla(SCI_POSITIONAFTER, linpos); + + // If the position hasn't moved then we must be at the end of the text + // (which implies that the position passed was beyond the end of the + // text). + if (new_linpos == linpos) + break; + + linpos = new_linpos; + ++indx; + } + + *line = lin; + *index = indx; +} + + +// Set the source of the automatic auto-completion list. +void QsciScintilla::setAutoCompletionSource(AutoCompletionSource source) +{ + acSource = source; +} + + +// Set the threshold for automatic auto-completion. +void QsciScintilla::setAutoCompletionThreshold(int thresh) +{ + acThresh = thresh; +} + + +// Set the auto-completion word separators if there is no current lexer. +void QsciScintilla::setAutoCompletionWordSeparators(const QStringList &separators) +{ + if (lex.isNull()) + wseps = separators; +} + + +// Explicitly auto-complete from all sources. +void QsciScintilla::autoCompleteFromAll() +{ + startAutoCompletion(AcsAll, false, use_single != AcusNever); +} + + +// Explicitly auto-complete from the APIs. +void QsciScintilla::autoCompleteFromAPIs() +{ + startAutoCompletion(AcsAPIs, false, use_single != AcusNever); +} + + +// Explicitly auto-complete from the document. +void QsciScintilla::autoCompleteFromDocument() +{ + startAutoCompletion(AcsDocument, false, use_single != AcusNever); +} + + +// Check if a character can be in a word. +bool QsciScintilla::isWordCharacter(char ch) const +{ + return (strchr(wchars, ch) != NULL); +} + + +// Return the set of valid word characters. +const char *QsciScintilla::wordCharacters() const +{ + return wchars; +} + + +// Recolour the document. +void QsciScintilla::recolor(int start, int end) +{ + SendScintilla(SCI_COLOURISE, start, end); +} + + +// Registered a QPixmap image. +void QsciScintilla::registerImage(int id, const QPixmap &pm) +{ + SendScintilla(SCI_REGISTERIMAGE, id, pm); +} + + +// Registered a QImage image. +void QsciScintilla::registerImage(int id, const QImage &im) +{ + SendScintilla(SCI_RGBAIMAGESETHEIGHT, im.height()); + SendScintilla(SCI_RGBAIMAGESETWIDTH, im.width()); + SendScintilla(SCI_REGISTERRGBAIMAGE, id, im); +} + + +// Clear all registered images. +void QsciScintilla::clearRegisteredImages() +{ + SendScintilla(SCI_CLEARREGISTEREDIMAGES); +} + + +// Enable auto-completion fill-ups. +void QsciScintilla::setAutoCompletionFillupsEnabled(bool enable) +{ + const char *fillups; + + if (!enable) + fillups = ""; + else if (!lex.isNull()) + fillups = lex->autoCompletionFillups(); + else + fillups = explicit_fillups.data(); + + SendScintilla(SCI_AUTOCSETFILLUPS, fillups); + + fillups_enabled = enable; +} + + +// See if auto-completion fill-ups are enabled. +bool QsciScintilla::autoCompletionFillupsEnabled() const +{ + return fillups_enabled; +} + + +// Set the fill-up characters for auto-completion if there is no current lexer. +void QsciScintilla::setAutoCompletionFillups(const char *fillups) +{ + explicit_fillups = fillups; + setAutoCompletionFillupsEnabled(fillups_enabled); +} + + +// Set the case sensitivity for auto-completion. +void QsciScintilla::setAutoCompletionCaseSensitivity(bool cs) +{ + SendScintilla(SCI_AUTOCSETIGNORECASE, !cs); +} + + +// Return the case sensitivity for auto-completion. +bool QsciScintilla::autoCompletionCaseSensitivity() const +{ + return !SendScintilla(SCI_AUTOCGETIGNORECASE); +} + + +// Set the replace word mode for auto-completion. +void QsciScintilla::setAutoCompletionReplaceWord(bool replace) +{ + SendScintilla(SCI_AUTOCSETDROPRESTOFWORD, replace); +} + + +// Return the replace word mode for auto-completion. +bool QsciScintilla::autoCompletionReplaceWord() const +{ + return SendScintilla(SCI_AUTOCGETDROPRESTOFWORD); +} + + +// Set the single item mode for auto-completion. +void QsciScintilla::setAutoCompletionUseSingle(AutoCompletionUseSingle single) +{ + use_single = single; +} + + +// Return the single item mode for auto-completion. +QsciScintilla::AutoCompletionUseSingle QsciScintilla::autoCompletionUseSingle() const +{ + return use_single; +} + + +// Set the single item mode for auto-completion (deprecated). +void QsciScintilla::setAutoCompletionShowSingle(bool single) +{ + use_single = (single ? AcusExplicit : AcusNever); +} + + +// Return the single item mode for auto-completion (deprecated). +bool QsciScintilla::autoCompletionShowSingle() const +{ + return (use_single != AcusNever); +} + + +// Set current call tip position. +void QsciScintilla::setCallTipsPosition(CallTipsPosition position) +{ + SendScintilla(SCI_CALLTIPSETPOSITION, (position == CallTipsAboveText)); + call_tips_position = position; +} + + +// Set current call tip style. +void QsciScintilla::setCallTipsStyle(CallTipsStyle style) +{ + call_tips_style = style; +} + + +// Set maximum number of call tips displayed. +void QsciScintilla::setCallTipsVisible(int nr) +{ + maxCallTips = nr; +} + + +// Set the document to display. +void QsciScintilla::setDocument(const QsciDocument &document) +{ + if (doc.pdoc != document.pdoc) + { + doc.undisplay(this); + doc.attach(document); + doc.display(this,&document); + } +} + + +// Ensure the document is read-write and return true if was was read-only. +bool QsciScintilla::ensureRW() +{ + bool ro = isReadOnly(); + + if (ro) + setReadOnly(false); + + return ro; +} + + +// Return the number of the first visible line. +int QsciScintilla::firstVisibleLine() const +{ + return SendScintilla(SCI_GETFIRSTVISIBLELINE); +} + + +// Set the number of the first visible line. +void QsciScintilla::setFirstVisibleLine(int linenr) +{ + SendScintilla(SCI_SETFIRSTVISIBLELINE, linenr); +} + + +// Return the height in pixels of the text in a particular line. +int QsciScintilla::textHeight(int linenr) const +{ + return SendScintilla(SCI_TEXTHEIGHT, linenr); +} + + +// See if auto-completion or user list is active. +bool QsciScintilla::isListActive() const +{ + return SendScintilla(SCI_AUTOCACTIVE); +} + + +// Cancel any current auto-completion or user list. +void QsciScintilla::cancelList() +{ + SendScintilla(SCI_AUTOCCANCEL); +} + + +// Handle a selection from the auto-completion list. +void QsciScintilla::handleAutoCompletionSelection() +{ + if (!lex.isNull()) + { + QsciAbstractAPIs *apis = lex->apis(); + + if (apis) + apis->autoCompletionSelected(acSelection); + } +} + + +// Display a user list. +void QsciScintilla::showUserList(int id, const QStringList &list) +{ + // Sanity check to make sure auto-completion doesn't get confused. + if (id <= 0) + return; + + SendScintilla(SCI_AUTOCSETSEPARATOR, userSeparator); + + SendScintilla(SCI_USERLISTSHOW, id, + textAsBytes(list.join(QChar(userSeparator))).constData()); +} + + +// Translate the SCN_USERLISTSELECTION notification into something more useful. +void QsciScintilla::handleUserListSelection(const char *text, int id) +{ + emit userListActivated(id, QString(text)); + + // Make sure the editor hasn't been deactivated as a side effect. + activateWindow(); +} + + +// Return the case sensitivity of any lexer. +bool QsciScintilla::caseSensitive() const +{ + return lex.isNull() ? true : lex->caseSensitive(); +} + + +// Return true if the current list is an auto-completion list rather than a +// user list. +bool QsciScintilla::isAutoCompletionList() const +{ + return (SendScintilla(SCI_AUTOCGETSEPARATOR) == acSeparator); +} + + +// Read the text from a QIODevice. +bool QsciScintilla::read(QIODevice *io) +{ + const int min_size = 1024 * 8; + + int buf_size = min_size; + char *buf = new char[buf_size]; + + int data_len = 0; + bool ok = true; + + qint64 part; + + // Read the whole lot in so we don't have to worry about character + // boundaries. + do + { + // Make sure there is a minimum amount of room. + if (buf_size - data_len < min_size) + { + buf_size *= 2; + char *new_buf = new char[buf_size * 2]; + + memcpy(new_buf, buf, data_len); + delete[] buf; + buf = new_buf; + } + + part = io->read(buf + data_len, buf_size - data_len - 1); + data_len += part; + } + while (part > 0); + + if (part < 0) + ok = false; + else + { + buf[data_len] = '\0'; + + bool ro = ensureRW(); + + SendScintilla(SCI_SETTEXT, buf); + SendScintilla(SCI_EMPTYUNDOBUFFER); + + setReadOnly(ro); + } + + delete[] buf; + + return ok; +} + + +// Write the text to a QIODevice. +bool QsciScintilla::write(QIODevice *io) const +{ + const char *buf = reinterpret_cast(SendScintillaPtrResult(SCI_GETCHARACTERPOINTER)); + + const char *bp = buf; + uint buflen = qstrlen(buf); + + while (buflen > 0) + { + qint64 part = io->write(bp, buflen); + + if (part < 0) + return false; + + bp += part; + buflen -= part; + } + + return true; +} + + +// Return the word at the given coordinates. +QString QsciScintilla::wordAtLineIndex(int line, int index) const +{ + return wordAtPosition(positionFromLineIndex(line, index)); +} + + +// Return the word at the given coordinates. +QString QsciScintilla::wordAtPoint(const QPoint &point) const +{ + long close_pos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE, point.x(), + point.y()); + + return wordAtPosition(close_pos); +} + + +// Return the word at the given position. +QString QsciScintilla::wordAtPosition(int position) const +{ + if (position < 0) + return QString(); + + long start_pos = SendScintilla(SCI_WORDSTARTPOSITION, position, true); + long end_pos = SendScintilla(SCI_WORDENDPOSITION, position, true); + + if (start_pos >= end_pos) + return QString(); + + return text(start_pos, end_pos); +} + + +// Return the display style for annotations. +QsciScintilla::AnnotationDisplay QsciScintilla::annotationDisplay() const +{ + return (AnnotationDisplay)SendScintilla(SCI_ANNOTATIONGETVISIBLE); +} + + +// Set the display style for annotations. +void QsciScintilla::setAnnotationDisplay(QsciScintilla::AnnotationDisplay display) +{ + SendScintilla(SCI_ANNOTATIONSETVISIBLE, display); + setScrollBars(); +} + + +// Clear annotations. +void QsciScintilla::clearAnnotations(int line) +{ + if (line >= 0) + SendScintilla(SCI_ANNOTATIONSETTEXT, line, (const char *)0); + else + SendScintilla(SCI_ANNOTATIONCLEARALL); + + setScrollBars(); +} + + +// Annotate a line. +void QsciScintilla::annotate(int line, const QString &text, int style) +{ + int style_offset = SendScintilla(SCI_ANNOTATIONGETSTYLEOFFSET); + + SendScintilla(SCI_ANNOTATIONSETTEXT, line, textAsBytes(text).constData()); + SendScintilla(SCI_ANNOTATIONSETSTYLE, line, style - style_offset); + + setScrollBars(); +} + + +// Annotate a line. +void QsciScintilla::annotate(int line, const QString &text, const QsciStyle &style) +{ + style.apply(this); + + annotate(line, text, style.style()); +} + + +// Annotate a line. +void QsciScintilla::annotate(int line, const QsciStyledText &text) +{ + text.apply(this); + + annotate(line, text.text(), text.style()); +} + + +// Annotate a line. +void QsciScintilla::annotate(int line, const QList &text) +{ + char *styles; + QByteArray styled_text = styleText(text, &styles, + SendScintilla(SCI_ANNOTATIONGETSTYLEOFFSET)); + + SendScintilla(SCI_ANNOTATIONSETTEXT, line, styled_text.constData()); + SendScintilla(SCI_ANNOTATIONSETSTYLES, line, styles); + + delete[] styles; +} + + +// Get the annotation for a line, if any. +QString QsciScintilla::annotation(int line) const +{ + int size = SendScintilla(SCI_ANNOTATIONGETTEXT, line, (const char *)0); + char *buf = new char[size + 1]; + + QString qs = bytesAsText(buf, size); + delete[] buf; + + return qs; +} + + +// Convert a list of styled text to the low-level arrays. +QByteArray QsciScintilla::styleText(const QList &styled_text, + char **styles, int style_offset) +{ + QString text; + int i; + + // Build the full text. + for (i = 0; i < styled_text.count(); ++i) + { + const QsciStyledText &st = styled_text[i]; + + st.apply(this); + + text.append(st.text()); + } + + QByteArray s = textAsBytes(text); + + // There is a style byte for every byte. + char *sp = *styles = new char[s.length()]; + + for (i = 0; i < styled_text.count(); ++i) + { + const QsciStyledText &st = styled_text[i]; + QByteArray part = textAsBytes(st.text()); + int part_length = part.length(); + + for (int c = 0; c < part_length; ++c) + *sp++ = (char)(st.style() - style_offset); + } + + return s; +} + + +// Convert Scintilla modifiers to the Qt equivalent. +int QsciScintilla::mapModifiers(int modifiers) +{ + int state = 0; + + if (modifiers & SCMOD_SHIFT) + state |= Qt::ShiftModifier; + + if (modifiers & SCMOD_CTRL) + state |= Qt::ControlModifier; + + if (modifiers & SCMOD_ALT) + state |= Qt::AltModifier; + + if (modifiers & (SCMOD_SUPER | SCMOD_META)) + state |= Qt::MetaModifier; + + return state; +} + + +// Re-implemented to handle shortcut overrides. +bool QsciScintilla::event(QEvent *e) +{ + if (e->type() == QEvent::ShortcutOverride && !isReadOnly()) + { + QKeyEvent *ke = static_cast(e); + + if (ke->key()) + { + // We want ordinary characters. + if ((ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::ShiftModifier || ke->modifiers() == Qt::KeypadModifier) && ke->key() < Qt::Key_Escape) + { + ke->accept(); + return true; + } + + // We want any key that is bound. + QsciCommand *cmd = stdCmds->boundTo(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)); + + if (cmd) + { + ke->accept(); + return true; + } + } + } + + return QsciScintillaBase::event(e); +} + + +// Re-implemented to zoom when the Control modifier is pressed. +void QsciScintilla::wheelEvent(QWheelEvent *e) +{ +#if defined(Q_OS_MAC) + const Qt::KeyboardModifier zoom_modifier = Qt::MetaModifier; +#else + const Qt::KeyboardModifier zoom_modifier = Qt::ControlModifier; +#endif + + if ((e->modifiers() & zoom_modifier) != 0) + { + QPoint ad = e->angleDelta(); + int delta = (qAbs(ad.x()) > qAbs(ad.y())) ? ad.x() : ad.y(); + + if (delta > 0) + zoomIn(); + else + zoomOut(); + } + else + { + QsciScintillaBase::wheelEvent(e); + } +} + + +// Re-implemented to handle chenges to the enabled state. +void QsciScintilla::changeEvent(QEvent *e) +{ + QsciScintillaBase::changeEvent(e); + + if (e->type() != QEvent::EnabledChange) + return; + + if (isEnabled()) + SendScintilla(SCI_SETCARETSTYLE, CARETSTYLE_LINE); + else + SendScintilla(SCI_SETCARETSTYLE, CARETSTYLE_INVISIBLE); + + QColor fore = palette().color(QPalette::Disabled, QPalette::Text); + QColor back = palette().color(QPalette::Disabled, QPalette::Base); + + if (lex.isNull()) + { + if (isEnabled()) + { + fore = nl_text_colour; + back = nl_paper_colour; + } + + SendScintilla(SCI_STYLESETFORE, 0, fore); + + // Assume style 0 applies to everything so that we don't need to use + // SCI_STYLECLEARALL which clears everything. We still have to set the + // default style as well for the background without any text. + SendScintilla(SCI_STYLESETBACK, 0, back); + SendScintilla(SCI_STYLESETBACK, STYLE_DEFAULT, back); + } + else + { + setEnabledColors(STYLE_DEFAULT, fore, back); + + for (int s = 0; s <= STYLE_MAX; ++s) + if (!lex->description(s).isNull()) + setEnabledColors(s, fore, back); + } +} + + +// Set the foreground and background colours for a style. +void QsciScintilla::setEnabledColors(int style, QColor &fore, QColor &back) +{ + if (isEnabled()) + { + fore = lex->color(style); + back = lex->paper(style); + } + + handleStyleColorChange(fore, style); + handleStylePaperChange(back, style); +} + + +// Re-implemented to implement a more Qt-like context menu. +void QsciScintilla::contextMenuEvent(QContextMenuEvent *e) +{ + if (contextMenuNeeded(e->x(), e->y())) + { + QMenu *menu = createStandardContextMenu(); + + if (menu) + { + menu->setAttribute(Qt::WA_DeleteOnClose); + menu->popup(e->globalPos()); + } + } +} + + +// Create an instance of the standard context menu. +QMenu *QsciScintilla::createStandardContextMenu() +{ + bool read_only = isReadOnly(); + bool has_selection = hasSelectedText(); + QMenu *menu = new QMenu(this); + QAction *action; + + if (!read_only) + { + action = menu->addAction(tr("&Undo"), this, SLOT(undo())); + set_shortcut(action, QsciCommand::Undo); + action->setEnabled(isUndoAvailable()); + + action = menu->addAction(tr("&Redo"), this, SLOT(redo())); + set_shortcut(action, QsciCommand::Redo); + action->setEnabled(isRedoAvailable()); + + menu->addSeparator(); + + action = menu->addAction(tr("Cu&t"), this, SLOT(cut())); + set_shortcut(action, QsciCommand::SelectionCut); + action->setEnabled(has_selection); + } + + action = menu->addAction(tr("&Copy"), this, SLOT(copy())); + set_shortcut(action, QsciCommand::SelectionCopy); + action->setEnabled(has_selection); + + if (!read_only) + { + action = menu->addAction(tr("&Paste"), this, SLOT(paste())); + set_shortcut(action, QsciCommand::Paste); + action->setEnabled(SendScintilla(SCI_CANPASTE)); + + action = menu->addAction(tr("Delete"), this, SLOT(delete_selection())); + action->setEnabled(has_selection); + } + + if (!menu->isEmpty()) + menu->addSeparator(); + + action = menu->addAction(tr("Select All"), this, SLOT(selectAll())); + set_shortcut(action, QsciCommand::SelectAll); + action->setEnabled(length() != 0); + + return menu; +} + + +// Set the shortcut for an action using any current key binding. +void QsciScintilla::set_shortcut(QAction *action, QsciCommand::Command cmd_id) const +{ + QsciCommand *cmd = stdCmds->find(cmd_id); + + if (cmd && cmd->key()) + action->setShortcut(QKeySequence(cmd->key())); +} + + +// Delete the current selection. +void QsciScintilla::delete_selection() +{ + SendScintilla(SCI_CLEAR); +} + + +// Convert a Scintilla colour to a QColor. +static QColor asQColor(long sci_colour) +{ + return QColor( + ((int)sci_colour) & 0x00ff, + ((int)(sci_colour >> 8)) & 0x00ff, + ((int)(sci_colour >> 16)) & 0x00ff); +} + + +// Set the scroll width. +void QsciScintilla::setScrollWidth(int pixelWidth) +{ + SendScintilla(SCI_SETSCROLLWIDTH, pixelWidth); +} + +// Get the scroll width. +int QsciScintilla::scrollWidth() const +{ + return SendScintilla(SCI_GETSCROLLWIDTH); +} + + +// Set scroll width tracking. +void QsciScintilla::setScrollWidthTracking(bool enabled) +{ + SendScintilla(SCI_SETSCROLLWIDTHTRACKING, enabled); +} + + +// Get scroll width tracking. +bool QsciScintilla::scrollWidthTracking() const +{ + return SendScintilla(SCI_GETSCROLLWIDTHTRACKING); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qsciscintillabase.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qsciscintillabase.cpp new file mode 100644 index 000000000..2e3f06348 --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qsciscintillabase.cpp @@ -0,0 +1,867 @@ +// This module implements the "official" low-level API. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SciAccessibility.h" +#include "ScintillaQt.h" + + +// The #defines in Scintilla.h and the enums in qsciscintillabase.h conflict +// (because we want to use the same names) so we have to undefine those we use +// in this file. +#undef SCI_SETCARETPERIOD +#undef SCK_DOWN +#undef SCK_UP +#undef SCK_LEFT +#undef SCK_RIGHT +#undef SCK_HOME +#undef SCK_END +#undef SCK_PRIOR +#undef SCK_NEXT +#undef SCK_DELETE +#undef SCK_INSERT +#undef SCK_ESCAPE +#undef SCK_BACK +#undef SCK_TAB +#undef SCK_RETURN +#undef SCK_ADD +#undef SCK_SUBTRACT +#undef SCK_DIVIDE +#undef SCK_WIN +#undef SCK_RWIN +#undef SCK_MENU +#undef SCN_URIDROPPED + + +// Remember if we have linked the lexers. +static bool lexersLinked = false; + +// The list of instances. +static QList poolList; + +// Mime support. +static const QLatin1String mimeTextPlain("text/plain"); +static const QLatin1String mimeRectangularWin("MSDEVColumnSelect"); +static const QLatin1String mimeRectangular("text/x-qscintilla-rectangular"); + +#if QT_VERSION < 0x060000 && defined(Q_OS_OSX) +extern void initialiseRectangularPasteboardMime(); +#endif + + +// The ctor. +QsciScintillaBase::QsciScintillaBase(QWidget *parent) + : QAbstractScrollArea(parent), preeditPos(-1), preeditNrBytes(0), + clickCausedFocus(false) +{ +#if !defined(QT_NO_ACCESSIBILITY) + QsciAccessibleScintillaBase::initialise(); +#endif + + connectVerticalScrollBar(); + connectHorizontalScrollBar(); + + setAcceptDrops(true); + setFocusPolicy(Qt::WheelFocus); + setAttribute(Qt::WA_KeyCompression); + setAttribute(Qt::WA_InputMethodEnabled); + setInputMethodHints( + Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhMultiLine); + + viewport()->setBackgroundRole(QPalette::Base); + viewport()->setMouseTracking(true); + viewport()->setAttribute(Qt::WA_NoSystemBackground); + + triple_click.setSingleShot(true); + +#if QT_VERSION < 0x060000 && defined(Q_OS_OSX) + initialiseRectangularPasteboardMime(); +#endif + + sci = new QsciScintillaQt(this); + + SendScintilla(SCI_SETCARETPERIOD, QApplication::cursorFlashTime() / 2); + + // Make sure the lexers are linked in. + if (!lexersLinked) + { + Scintilla_LinkLexers(); + lexersLinked = true; + } + + // Add it to the pool. + poolList.append(this); +} + + +// The dtor. +QsciScintillaBase::~QsciScintillaBase() +{ + // The QsciScintillaQt object isn't a child so delete it explicitly. + delete sci; + + // Remove it from the pool. + poolList.removeAt(poolList.indexOf(this)); +} + + +// Return an instance from the pool. +QsciScintillaBase *QsciScintillaBase::pool() +{ + return poolList.first(); +} + + +// Tell Scintilla to update the scroll bars. Scintilla should be doing this +// itself. +void QsciScintillaBase::setScrollBars() +{ + sci->SetScrollBars(); +} + + +// Send a message to the real Scintilla widget using the low level Scintilla +// API. +long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, + long lParam) const +{ + return sci->WndProc(msg, wParam, lParam); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, + void *lParam) const +{ + return sci->WndProc(msg, wParam, reinterpret_cast(lParam)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, uintptr_t wParam, + const char *lParam) const +{ + return sci->WndProc(msg, wParam, reinterpret_cast(lParam)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, + const char *lParam) const +{ + return sci->WndProc(msg, static_cast(0), + reinterpret_cast(lParam)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, const char *wParam, + const char *lParam) const +{ + return sci->WndProc(msg, reinterpret_cast(wParam), + reinterpret_cast(lParam)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, long wParam) const +{ + return sci->WndProc(msg, static_cast(wParam), + static_cast(0)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, int wParam) const +{ + return sci->WndProc(msg, static_cast(wParam), + static_cast(0)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, long cpMin, long cpMax, + char *lpstrText) const +{ + Sci_TextRange tr; + + tr.chrg.cpMin = cpMin; + tr.chrg.cpMax = cpMax; + tr.lpstrText = lpstrText; + + return sci->WndProc(msg, static_cast(0), + reinterpret_cast(&tr)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, + const QColor &col) const +{ + sptr_t lParam = (col.blue() << 16) | (col.green() << 8) | col.red(); + + return sci->WndProc(msg, wParam, lParam); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, const QColor &col) const +{ + uptr_t wParam = (col.blue() << 16) | (col.green() << 8) | col.red(); + + return sci->WndProc(msg, wParam, static_cast(0)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, + QPainter *hdc, const QRect &rc, long cpMin, long cpMax) const +{ + Sci_RangeToFormat rf; + + rf.hdc = rf.hdcTarget = reinterpret_cast(hdc); + + rf.rc.left = rc.left(); + rf.rc.top = rc.top(); + rf.rc.right = rc.right() + 1; + rf.rc.bottom = rc.bottom() + 1; + + rf.chrg.cpMin = cpMin; + rf.chrg.cpMax = cpMax; + + return sci->WndProc(msg, wParam, reinterpret_cast(&rf)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, + const QPixmap &lParam) const +{ + return sci->WndProc(msg, wParam, reinterpret_cast(&lParam)); +} + + +// Overloaded message send. +long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, + const QImage &lParam) const +{ + return sci->WndProc(msg, wParam, reinterpret_cast(&lParam)); +} + + +// Send a message to the real Scintilla widget using the low level Scintilla +// API that returns a pointer result. +void *QsciScintillaBase::SendScintillaPtrResult(unsigned int msg) const +{ + return reinterpret_cast(sci->WndProc(msg, static_cast(0), + static_cast(0))); +} + + +// Re-implemented to handle font changes +void QsciScintillaBase::changeEvent(QEvent *e) +{ + if (e->type() == QEvent::FontChange || e->type() == QEvent::ApplicationFontChange) + sci->InvalidateStyleRedraw(); + + QAbstractScrollArea::changeEvent(e); +} + + +// Re-implemented to handle the context menu. +void QsciScintillaBase::contextMenuEvent(QContextMenuEvent *e) +{ + sci->ContextMenu(Scintilla::Point(e->globalX(), e->globalY())); +} + + +// Re-implemented to tell the widget it has the focus. +void QsciScintillaBase::focusInEvent(QFocusEvent *e) +{ + sci->SetFocusState(true); + clickCausedFocus = (e->reason() == Qt::MouseFocusReason); + QAbstractScrollArea::focusInEvent(e); +} + + +// Re-implemented to tell the widget it has lost the focus. +void QsciScintillaBase::focusOutEvent(QFocusEvent *e) +{ + if (e->reason() == Qt::ActiveWindowFocusReason) + { + // Only tell Scintilla we have lost focus if the new active window + // isn't our auto-completion list. This is probably only an issue on + // Linux and there are still problems because subsequent focus out + // events don't always seem to get generated (at least with Qt5). + + QWidget *aw = QApplication::activeWindow(); + + if (!aw || aw->parent() != this || !aw->inherits("QsciSciListBox")) + sci->SetFocusState(false); + } + else + { + sci->SetFocusState(false); + } + + QAbstractScrollArea::focusOutEvent(e); +} + + +// Re-implemented to make sure tabs are passed to the editor. +bool QsciScintillaBase::focusNextPrevChild(bool next) +{ + if (!sci->pdoc->IsReadOnly()) + return false; + + return QAbstractScrollArea::focusNextPrevChild(next); +} + + +// Handle key presses. +void QsciScintillaBase::keyPressEvent(QKeyEvent *e) +{ + int modifiers = 0; + + if (e->modifiers() & Qt::ShiftModifier) + modifiers |= SCMOD_SHIFT; + + if (e->modifiers() & Qt::ControlModifier) + modifiers |= SCMOD_CTRL; + + if (e->modifiers() & Qt::AltModifier) + modifiers |= SCMOD_ALT; + + if (e->modifiers() & Qt::MetaModifier) + modifiers |= SCMOD_META; + + int key = commandKey(e->key(), modifiers); + + if (key) + { + bool consumed = false; + + sci->KeyDownWithModifiers(key, modifiers, &consumed); + + if (consumed) + { + e->accept(); + return; + } + } + + QString text = e->text(); + + if (!text.isEmpty() && text[0].isPrint()) + { + QByteArray bytes = textAsBytes(text); + sci->AddCharUTF(bytes.data(), bytes.length()); + e->accept(); + } + else + { + QAbstractScrollArea::keyPressEvent(e); + } +} + + +// Map a Qt key to a valid Scintilla command key, or 0 if none. +int QsciScintillaBase::commandKey(int qt_key, int &modifiers) +{ + int key; + + switch (qt_key) + { + case Qt::Key_Down: + key = SCK_DOWN; + break; + + case Qt::Key_Up: + key = SCK_UP; + break; + + case Qt::Key_Left: + key = SCK_LEFT; + break; + + case Qt::Key_Right: + key = SCK_RIGHT; + break; + + case Qt::Key_Home: + key = SCK_HOME; + break; + + case Qt::Key_End: + key = SCK_END; + break; + + case Qt::Key_PageUp: + key = SCK_PRIOR; + break; + + case Qt::Key_PageDown: + key = SCK_NEXT; + break; + + case Qt::Key_Delete: + key = SCK_DELETE; + break; + + case Qt::Key_Insert: + key = SCK_INSERT; + break; + + case Qt::Key_Escape: + key = SCK_ESCAPE; + break; + + case Qt::Key_Backspace: + key = SCK_BACK; + break; + + case Qt::Key_Tab: + key = SCK_TAB; + break; + + case Qt::Key_Backtab: + // Scintilla assumes a backtab is shift-tab. + key = SCK_TAB; + modifiers |= SCMOD_SHIFT; + break; + + case Qt::Key_Return: + case Qt::Key_Enter: + key = SCK_RETURN; + break; + + case Qt::Key_Super_L: + key = SCK_WIN; + break; + + case Qt::Key_Super_R: + key = SCK_RWIN; + break; + + case Qt::Key_Menu: + key = SCK_MENU; + break; + + default: + if ((key = qt_key) > 0x7f) + key = 0; + } + + return key; +} + + +// Encode a QString as bytes. +QByteArray QsciScintillaBase::textAsBytes(const QString &text) const +{ + if (sci->IsUnicodeMode()) + return text.toUtf8(); + + return text.toLatin1(); +} + + +// Decode bytes as a QString. +QString QsciScintillaBase::bytesAsText(const char *bytes, int size) const +{ + if (sci->IsUnicodeMode()) + return QString::fromUtf8(bytes, size); + + return QString::fromLatin1(bytes, size); +} + + +// Handle a mouse button double click. +void QsciScintillaBase::mouseDoubleClickEvent(QMouseEvent *e) +{ + if (e->button() != Qt::LeftButton) + { + e->ignore(); + return; + } + + setFocus(); + + // Make sure Scintilla will interpret this as a double-click. + unsigned clickTime = sci->lastClickTime + Scintilla::Platform::DoubleClickTime() - 1; + + sci->ButtonDownWithModifiers(Scintilla::Point(e->x(), e->y()), clickTime, + eventModifiers(e)); + + // Remember the current position and time in case it turns into a triple + // click. + triple_click_at = e->globalPos(); + triple_click.start(QApplication::doubleClickInterval()); +} + + +// Handle a mouse move. +void QsciScintillaBase::mouseMoveEvent(QMouseEvent *e) +{ + sci->ButtonMoveWithModifiers(Scintilla::Point(e->x(), e->y()), 0, + eventModifiers(e)); +} + + +// Handle a mouse button press. +void QsciScintillaBase::mousePressEvent(QMouseEvent *e) +{ + setFocus(); + + Scintilla::Point pt(e->x(), e->y()); + + if (e->button() == Qt::LeftButton || e->button() == Qt::RightButton) + { + unsigned clickTime; + + // It is a triple click if the timer is running and the mouse hasn't + // moved too much. + if (triple_click.isActive() && (e->globalPos() - triple_click_at).manhattanLength() < QApplication::startDragDistance()) + clickTime = sci->lastClickTime + Scintilla::Platform::DoubleClickTime() - 1; + else + clickTime = sci->lastClickTime + Scintilla::Platform::DoubleClickTime() + 1; + + triple_click.stop(); + + // Scintilla uses the Alt modifier to initiate rectangular selection. + // However the GTK port (under X11, not Windows) uses the Control + // modifier (by default, although it is configurable). It does this + // because most X11 window managers hijack Alt-drag to move the window. + // We do the same, except that (for the moment at least) we don't allow + // the modifier to be configured. + bool shift = e->modifiers() & Qt::ShiftModifier; + bool ctrl = e->modifiers() & Qt::ControlModifier; +#if defined(Q_OS_MAC) || defined(Q_OS_WIN) + bool alt = e->modifiers() & Qt::AltModifier; +#else + bool alt = ctrl; +#endif + + if (e->button() == Qt::LeftButton) + sci->ButtonDownWithModifiers(pt, clickTime, + QsciScintillaQt::ModifierFlags(shift, ctrl, alt)); + else + sci->RightButtonDownWithModifiers(pt, clickTime, + QsciScintillaQt::ModifierFlags(shift, ctrl, alt)); + } + else if (e->button() == Qt::MiddleButton) + { + QClipboard *cb = QApplication::clipboard(); + + if (cb->supportsSelection()) + { + int pos = sci->PositionFromLocation(pt); + + sci->sel.Clear(); + sci->SetSelection(pos, pos); + + sci->pasteFromClipboard(QClipboard::Selection); + } + } +} + + +// Handle a mouse button releases. +void QsciScintillaBase::mouseReleaseEvent(QMouseEvent *e) +{ + if (e->button() != Qt::LeftButton) + return; + + Scintilla::Point pt(e->x(), e->y()); + + if (sci->HaveMouseCapture()) + { + bool ctrl = e->modifiers() & Qt::ControlModifier; + + sci->ButtonUpWithModifiers(pt, 0, + QsciScintillaQt::ModifierFlags(false, ctrl, false)); + } + + if (!sci->pdoc->IsReadOnly() && !sci->PointInSelMargin(pt) && qApp->autoSipEnabled()) + { + QStyle::RequestSoftwareInputPanel rsip = QStyle::RequestSoftwareInputPanel(style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); + + if (!clickCausedFocus || rsip == QStyle::RSIP_OnMouseClick) + qApp->inputMethod()->show(); + } + + clickCausedFocus = false; +} + + +// Handle paint events. +void QsciScintillaBase::paintEvent(QPaintEvent *e) +{ + sci->paintEvent(e); +} + + +// Handle resize events. +void QsciScintillaBase::resizeEvent(QResizeEvent *) +{ + sci->ChangeSize(); +} + + +// Re-implemented to suppress the default behaviour as Scintilla works at a +// more fundamental level. Note that this means that replacing the scrollbars +// with custom versions does not work. +void QsciScintillaBase::scrollContentsBy(int, int) +{ +} + + +// Handle the vertical scrollbar. +void QsciScintillaBase::handleVSb(int value) +{ + sci->ScrollTo(value); +} + + +// Handle the horizontal scrollbar. +void QsciScintillaBase::handleHSb(int value) +{ + sci->HorizontalScrollTo(value); +} + + +// Handle drag enters. +void QsciScintillaBase::dragEnterEvent(QDragEnterEvent *e) +{ + QsciScintillaBase::dragMoveEvent(e); +} + + +// Handle drag leaves. +void QsciScintillaBase::dragLeaveEvent(QDragLeaveEvent *) +{ + sci->SetDragPosition(Scintilla::SelectionPosition()); +} + + +// Handle drag moves. +void QsciScintillaBase::dragMoveEvent(QDragMoveEvent *e) +{ + if (e->mimeData()->hasUrls()) + { + e->acceptProposedAction(); + } + else + { + sci->SetDragPosition( + sci->SPositionFromLocation( + Scintilla::Point(e->pos().x(), e->pos().y()), false, + false, sci->UserVirtualSpace())); + + acceptAction(e); + } +} + + +// Handle drops. +void QsciScintillaBase::dropEvent(QDropEvent *e) +{ + if (e->mimeData()->hasUrls()) + { + e->acceptProposedAction(); + + foreach (const QUrl &url, e->mimeData()->urls()) + emit SCN_URIDROPPED(url); + + return; + } + + acceptAction(e); + + if (!e->isAccepted()) + return; + + bool moving; + int len; + const char *s; + bool rectangular; + + moving = (e->dropAction() == Qt::MoveAction); + + QByteArray text = fromMimeData(e->mimeData(), rectangular); + len = text.length(); + s = text.data(); + + std::string dest = Scintilla::Document::TransformLineEnds(s, len, + sci->pdoc->eolMode); + + sci->DropAt(sci->posDrop, dest.c_str(), dest.length(), moving, + rectangular); + + sci->Redraw(); +} + + +void QsciScintillaBase::acceptAction(QDropEvent *e) +{ + if (sci->pdoc->IsReadOnly() || !canInsertFromMimeData(e->mimeData())) + e->ignore(); + else + e->acceptProposedAction(); +} + + +// See if a MIME data object can be decoded. +bool QsciScintillaBase::canInsertFromMimeData(const QMimeData *source) const +{ + return source->hasFormat(mimeTextPlain); +} + + +// Create text from a MIME data object. +QByteArray QsciScintillaBase::fromMimeData(const QMimeData *source, bool &rectangular) const +{ + // See if it is rectangular. We try all of the different formats that + // Scintilla supports in case we are working across different platforms. + if (source->hasFormat(mimeRectangularWin)) + rectangular = true; + else if (source->hasFormat(mimeRectangular)) + rectangular = true; + else + rectangular = false; + + // Note that we don't support Scintilla's hack of adding a '\0' as Qt + // strips it off under the covers when pasting from another process. + QString utf8 = source->text(); + QByteArray text; + + if (sci->IsUnicodeMode()) + text = utf8.toUtf8(); + else + text = utf8.toLatin1(); + + return text; +} + + +// Create a MIME data object for some text. +QMimeData *QsciScintillaBase::toMimeData(const QByteArray &text, bool rectangular) const +{ + QMimeData *mime = new QMimeData; + + QString utf8; + + if (sci->IsUnicodeMode()) + utf8 = QString::fromUtf8(text.constData(), text.size()); + else + utf8 = QString::fromLatin1(text.constData(), text.size()); + + mime->setText(utf8); + + if (rectangular) + { + // Use the platform specific "standard" for specifying a rectangular + // selection. +#if defined(Q_OS_WIN) + mime->setData(mimeRectangularWin, QByteArray()); +#else + mime->setData(mimeRectangular, QByteArray()); +#endif + } + + return mime; +} + + +// Connect up the vertical scroll bar. +void QsciScintillaBase::connectVerticalScrollBar() +{ + connect(verticalScrollBar(), SIGNAL(valueChanged(int)), + SLOT(handleVSb(int))); +} + + +// Connect up the horizontal scroll bar. +void QsciScintillaBase::connectHorizontalScrollBar() +{ + connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), + SLOT(handleHSb(int))); +} + + +//! Replace the vertical scroll bar. +void QsciScintillaBase::replaceVerticalScrollBar(QScrollBar *scrollBar) +{ + setVerticalScrollBar(scrollBar); + connectVerticalScrollBar(); +} + + +// Replace the horizontal scroll bar. +void QsciScintillaBase::replaceHorizontalScrollBar(QScrollBar *scrollBar) +{ + setHorizontalScrollBar(scrollBar); + connectHorizontalScrollBar(); +} + + +// Return true if a context menu should be displayed. This is provided as a +// helper to QsciScintilla::contextMenuEvent(). A proper design would break +// backwards compatibility. +bool QsciScintillaBase::contextMenuNeeded(int x, int y) const +{ + Scintilla::Point pt(x, y); + + // Clear any selection if the mouse is outside. + if (!sci->PointInSelection(pt)) + sci->SetEmptySelection(sci->PositionFromLocation(pt)); + + // Respect SC_POPUP_*. + return sci->ShouldDisplayPopup(pt); +} + + +// Return the Scintilla keyboard modifiers set for a mouse event. +int QsciScintillaBase::eventModifiers(QMouseEvent *e) +{ + bool shift = e->modifiers() & Qt::ShiftModifier; + bool ctrl = e->modifiers() & Qt::ControlModifier; + bool alt = e->modifiers() & Qt::AltModifier; + + return QsciScintillaQt::ModifierFlags(shift, ctrl, alt); +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscistyle.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscistyle.cpp new file mode 100644 index 000000000..b863ada6f --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscistyle.cpp @@ -0,0 +1,184 @@ +// This module implements the QsciStyle class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscistyle.h" + +#include + +#include "Qsci/qsciscintillabase.h" + + +// A ctor. +QsciStyle::QsciStyle(int style) +{ + init(style); + + QPalette pal = QApplication::palette(); + setColor(pal.text().color()); + setPaper(pal.base().color()); + + setFont(QApplication::font()); + setEolFill(false); +} + + +// A ctor. +QsciStyle::QsciStyle(int style, const QString &description, + const QColor &color, const QColor &paper, const QFont &font, + bool eolFill) +{ + init(style); + + setDescription(description); + + setColor(color); + setPaper(paper); + + setFont(font); + setEolFill(eolFill); +} + + +// Initialisation common to all ctors. +void QsciStyle::init(int style) +{ + // The next style number to allocate. The initial values corresponds to + // the amount of space that Scintilla initially creates for styles. + static int next_style_nr = 63; + + // See if a new style should be allocated. Note that we allow styles to be + // passed in that are bigger than STYLE_MAX because the styles used for + // annotations are allowed to be. + if (style < 0) + { + // Note that we don't deal with the situation where the newly allocated + // style number has already been used explicitly. + if (next_style_nr > QsciScintillaBase::STYLE_LASTPREDEFINED) + style = next_style_nr--; + } + + style_nr = style; + + // Initialise the minor attributes. + setTextCase(QsciStyle::OriginalCase); + setVisible(true); + setChangeable(true); + setHotspot(false); +} + + +// Apply the style to a particular editor. +void QsciStyle::apply(QsciScintillaBase *sci) const +{ + // Don't do anything if the style is invalid. + if (style_nr < 0) + return; + + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETFORE, style_nr, + style_color); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETBACK, style_nr, + style_paper); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETFONT, style_nr, + style_font.family().toLatin1().data()); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETSIZEFRACTIONAL, style_nr, + long(style_font.pointSizeF() * QsciScintillaBase::SC_FONT_SIZE_MULTIPLIER)); + + // Pass the Qt weight via the back door. + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETWEIGHT, style_nr, + -style_font.weight()); + + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETITALIC, style_nr, + style_font.italic()); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETUNDERLINE, style_nr, + style_font.underline()); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETEOLFILLED, style_nr, + style_eol_fill); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETCASE, style_nr, + (long)style_case); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETVISIBLE, style_nr, + style_visible); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETCHANGEABLE, style_nr, + style_changeable); + sci->SendScintilla(QsciScintillaBase::SCI_STYLESETHOTSPOT, style_nr, + style_hotspot); +} + + +// Set the color attribute. +void QsciStyle::setColor(const QColor &color) +{ + style_color = color; +} + + +// Set the paper attribute. +void QsciStyle::setPaper(const QColor &paper) +{ + style_paper = paper; +} + + +// Set the font attribute. +void QsciStyle::setFont(const QFont &font) +{ + style_font = font; +} + + +// Set the eol fill attribute. +void QsciStyle::setEolFill(bool eolFill) +{ + style_eol_fill = eolFill; +} + + +// Set the text case attribute. +void QsciStyle::setTextCase(QsciStyle::TextCase text_case) +{ + style_case = text_case; +} + + +// Set the visible attribute. +void QsciStyle::setVisible(bool visible) +{ + style_visible = visible; +} + + +// Set the changeable attribute. +void QsciStyle::setChangeable(bool changeable) +{ + style_changeable = changeable; +} + + +// Set the hotspot attribute. +void QsciStyle::setHotspot(bool hotspot) +{ + style_hotspot = hotspot; +} + + +// Refresh the style. Note that since we had to add apply() then this can't do +// anything useful so we leave it as a no-op. +void QsciStyle::refresh() +{ +} diff --git a/libs/qscintilla_2.14.1/Qt5Qt6/qscistyledtext.cpp b/libs/qscintilla_2.14.1/Qt5Qt6/qscistyledtext.cpp new file mode 100644 index 000000000..8aa37f53c --- /dev/null +++ b/libs/qscintilla_2.14.1/Qt5Qt6/qscistyledtext.cpp @@ -0,0 +1,54 @@ +// This module implements the QsciStyledText class. +// +// Copyright (c) 2023 Riverbank Computing Limited +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public License +// version 3.0 as published by the Free Software Foundation and appearing in +// the file LICENSE included in the packaging of this file. Please review the +// following information to ensure the GNU General Public License version 3.0 +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. +// +// If you do not wish to use this file under the terms of the GPL version 3.0 +// then you may purchase a commercial license. For more information contact +// info@riverbankcomputing.com. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include "Qsci/qscistyledtext.h" + +#include "Qsci/qsciscintillabase.h" +#include "Qsci/qscistyle.h" + + +// A ctor. +QsciStyledText::QsciStyledText(const QString &text, int style) + : styled_text(text), style_nr(style), explicit_style(0) +{ +} + + +// A ctor. +QsciStyledText::QsciStyledText(const QString &text, const QsciStyle &style) + : styled_text(text), style_nr(-1) +{ + explicit_style = new QsciStyle(style); +} + + +// Return the number of the style. +int QsciStyledText::style() const +{ + return explicit_style ? explicit_style->style() : style_nr; +} + + +// Apply any explicit style to an editor. +void QsciStyledText::apply(QsciScintillaBase *sci) const +{ + if (explicit_style) + explicit_style->apply(sci); +} diff --git a/libs/qscintilla_2.14.1/scintilla/include/ILexer.h b/libs/qscintilla_2.14.1/scintilla/include/ILexer.h new file mode 100644 index 000000000..42f980f89 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/ILexer.h @@ -0,0 +1,90 @@ +// Scintilla source code edit control +/** @file ILexer.h + ** Interface between Scintilla and lexers. + **/ +// Copyright 1998-2010 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef ILEXER_H +#define ILEXER_H + +#include "Sci_Position.h" + +namespace Scintilla { + +enum { dvOriginal=0, dvLineEnd=1 }; + +class IDocument { +public: + virtual int SCI_METHOD Version() const = 0; + virtual void SCI_METHOD SetErrorStatus(int status) = 0; + virtual Sci_Position SCI_METHOD Length() const = 0; + virtual void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const = 0; + virtual char SCI_METHOD StyleAt(Sci_Position position) const = 0; + virtual Sci_Position SCI_METHOD LineFromPosition(Sci_Position position) const = 0; + virtual Sci_Position SCI_METHOD LineStart(Sci_Position line) const = 0; + virtual int SCI_METHOD GetLevel(Sci_Position line) const = 0; + virtual int SCI_METHOD SetLevel(Sci_Position line, int level) = 0; + virtual int SCI_METHOD GetLineState(Sci_Position line) const = 0; + virtual int SCI_METHOD SetLineState(Sci_Position line, int state) = 0; + virtual void SCI_METHOD StartStyling(Sci_Position position, char mask) = 0; + virtual bool SCI_METHOD SetStyleFor(Sci_Position length, char style) = 0; + virtual bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) = 0; + virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0; + virtual void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) = 0; + virtual void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) = 0; + virtual int SCI_METHOD CodePage() const = 0; + virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0; + virtual const char * SCI_METHOD BufferPointer() = 0; + virtual int SCI_METHOD GetLineIndentation(Sci_Position line) = 0; +}; + +class IDocumentWithLineEnd : public IDocument { +public: + virtual Sci_Position SCI_METHOD LineEnd(Sci_Position line) const = 0; + virtual Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const = 0; + virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0; +}; + +enum { lvOriginal=0, lvSubStyles=1, lvMetaData=2 }; + +class ILexer { +public: + virtual int SCI_METHOD Version() const = 0; + virtual void SCI_METHOD Release() = 0; + virtual const char * SCI_METHOD PropertyNames() = 0; + virtual int SCI_METHOD PropertyType(const char *name) = 0; + virtual const char * SCI_METHOD DescribeProperty(const char *name) = 0; + virtual Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) = 0; + virtual const char * SCI_METHOD DescribeWordListSets() = 0; + virtual Sci_Position SCI_METHOD WordListSet(int n, const char *wl) = 0; + virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; + virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; + virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0; +}; + +class ILexerWithSubStyles : public ILexer { +public: + virtual int SCI_METHOD LineEndTypesSupported() = 0; + virtual int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) = 0; + virtual int SCI_METHOD SubStylesStart(int styleBase) = 0; + virtual int SCI_METHOD SubStylesLength(int styleBase) = 0; + virtual int SCI_METHOD StyleFromSubStyle(int subStyle) = 0; + virtual int SCI_METHOD PrimaryStyleFromStyle(int style) = 0; + virtual void SCI_METHOD FreeSubStyles() = 0; + virtual void SCI_METHOD SetIdentifiers(int style, const char *identifiers) = 0; + virtual int SCI_METHOD DistanceToSecondaryStyles() = 0; + virtual const char * SCI_METHOD GetSubStyleBases() = 0; +}; + +class ILexerWithMetaData : public ILexerWithSubStyles { +public: + 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; +}; + +} + +#endif diff --git a/libs/qscintilla_2.14.1/scintilla/include/ILoader.h b/libs/qscintilla_2.14.1/scintilla/include/ILoader.h new file mode 100644 index 000000000..e989de873 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/ILoader.h @@ -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 +// 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 diff --git a/libs/qscintilla_2.14.1/scintilla/include/License.txt b/libs/qscintilla_2.14.1/scintilla/include/License.txt new file mode 100644 index 000000000..47c792655 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/License.txt @@ -0,0 +1,20 @@ +License for Scintilla and SciTE + +Copyright 1998-2003 by Neil Hodgson + +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. \ No newline at end of file diff --git a/libs/qscintilla_2.14.1/scintilla/include/Platform.h b/libs/qscintilla_2.14.1/scintilla/include/Platform.h new file mode 100644 index 000000000..887ed4b8d --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/Platform.h @@ -0,0 +1,553 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2009 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform +// PLAT_TK = Tcl/TK on Linux or Win32 + +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_GTK_MACOSX 0 +#define PLAT_MACOSX 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_QT 0 +#define PLAT_FOX 0 +#define PLAT_CURSES 0 +#define PLAT_TK 0 +#define PLAT_HAIKU 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(CURSES) +#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 + +#include +QT_BEGIN_NAMESPACE +class QPainter; +QT_END_NAMESPACE + +// This is needed to work around an HP-UX bug with Qt4. +#include + +#elif defined(TK) +#undef PLAT_TK +#define PLAT_TK 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#if defined(__WIN32__) || defined(_MSC_VER) +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#if defined(__APPLE__) +#undef PLAT_GTK_MACOSX +#define PLAT_GTK_MACOSX 1 +#endif + +#elif defined(__APPLE__) + +#undef PLAT_MACOSX +#define PLAT_MACOSX 1 + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + +namespace Scintilla { + +typedef float XYPOSITION; +typedef double XYACCUMULATOR; + +// 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 + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is similar to the Win32 POINT and GTK+ GdkPoint types. + */ +class Point { +public: + XYPOSITION x; + XYPOSITION y; + + constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) { + } + + static Point FromInts(int x_, int y_) noexcept { + return Point(static_cast(x_), static_cast(y_)); + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine +}; + +/** + * A geometric rectangle class. + * PRectangle is similar to Win32 RECT. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + XYPOSITION left; + XYPOSITION top; + XYPOSITION right; + XYPOSITION bottom; + + 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_) noexcept { + return PRectangle(static_cast(left_), static_cast(top_), + static_cast(right_), static_cast(bottom_)); + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + 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 noexcept { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + 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 noexcept { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + 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) noexcept { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + XYPOSITION Width() const noexcept { return right - left; } + XYPOSITION Height() const noexcept { return bottom - top; } + bool Empty() const noexcept { + return (Height() <= 0) || (Width() <= 0); + } +}; + +/** + * Holds an RGB colour with 8 bits for each component. + */ +constexpr const float componentMaximum = 255.0f; +class ColourDesired { + int co; +public: + explicit ColourDesired(int co_=0) noexcept : co(co_) { + } + + ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept : + co(red | (green << 8) | (blue << 16)) { + } + + bool operator==(const ColourDesired &other) const noexcept { + return co == other.co; + } + + int AsInteger() const noexcept { + return co; + } + + // Red, green and blue values as bytes 0..255 + unsigned char GetRed() const noexcept { + return co & 0xff; + } + unsigned char GetGreen() const noexcept { + return (co >> 8) & 0xff; + } + 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_) { + } +}; + +/** + * Font management. + */ + +struct FontParameters { + const char *faceName; + float size; + int weight; + bool italic; + int extraFontFlag; + int technology; + int characterSet; + + FontParameters( + const char *faceName_, + float size_=10, + int weight_=400, + bool italic_=false, + int extraFontFlag_=0, + int technology_=0, + int characterSet_=0) noexcept : + + faceName(faceName_), + size(size_), + weight(weight_), + italic(italic_), + extraFontFlag(extraFontFlag_), + technology(technology_), + characterSet(characterSet_) + { + } + +}; + +class Font { +protected: + FontID fid; +public: + 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() const noexcept { return fid; } + // Alias another font - caller guarantees not to Release + void SetID(FontID fid_) noexcept { fid = fid_; } + friend class Surface; + friend class SurfaceImpl; +}; + +/** + * A surface abstracts a place to draw. + */ +#if defined(PLAT_QT) +class XPM; +#endif +class Surface { +public: + 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); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=0; + virtual void PenColour(ColourDesired fore)=0; + virtual int LogPixelsY()=0; + 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, 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 &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; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0; + 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 Ascent(Font &font_)=0; + virtual XYPOSITION Descent(Font &font_)=0; + virtual XYPOSITION InternalLeading(Font &font_)=0; + virtual XYPOSITION Height(Font &font_)=0; + virtual XYPOSITION AverageCharWidth(Font &font_)=0; + + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; + +#if defined(PLAT_QT) + virtual void Init(QPainter *p)=0; + virtual void DrawXPM(PRectangle rc, const XPM *xpm)=0; +#endif +}; + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID wid; +public: + Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) { + } + Window(const Window &source) = delete; + Window(Window &&) = delete; + Window &operator=(WindowID wid_) noexcept { + wid = wid_; + cursorLast = cursorInvalid; + return *this; + } + 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(); + PRectangle GetPosition() const; + void SetPosition(PRectangle rc); + 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); + PRectangle GetMonitorRect(Point pt); +private: + Cursor cursorLast; +}; + +/** + * 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() noexcept; + ~ListBox() override; + static ListBox *Allocate(); + + 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; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + 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 SetDelegate(IListBoxDelegate *lbDelegate)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID mid; +public: + Menu() noexcept; + MenuID GetID() const noexcept { return mid; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() = default; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +#if defined(__clang__) +# if __has_feature(attribute_analyzer_noreturn) +# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +# else +# define CLANG_ANALYZER_NORETURN +# endif +#else +# define CLANG_ANALYZER_NORETURN +#endif + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { +public: + 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 void DebugDisplay(const char *s); + static constexpr long LongFromTwoShorts(short a,short b) noexcept { + return (a) | ((b) << 16); + } + + 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; +}; + +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) +#endif + +} + +#endif diff --git a/libs/qscintilla_2.14.1/scintilla/include/SciLexer.h b/libs/qscintilla_2.14.1/scintilla/include/SciLexer.h new file mode 100644 index 000000000..0335bf4dd --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/SciLexer.h @@ -0,0 +1,1861 @@ +/* Scintilla source code edit control */ +/** @file SciLexer.h + ** Interface to the added lexer functions in the SciLexer version of the edit control. + **/ +/* Copyright 1998-2002 by Neil Hodgson + * The License.txt file describes the conditions under which this software may be distributed. */ + +/* Most of this file is automatically generated from the Scintilla.iface interface definition + * file which contains any comments about the definitions. HFacer.py does the generation. */ + +#ifndef SCILEXER_H +#define SCILEXER_H + +/* SciLexer features - not in standard Scintilla */ + +/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ +#define SCLEX_CONTAINER 0 +#define SCLEX_NULL 1 +#define SCLEX_PYTHON 2 +#define SCLEX_CPP 3 +#define SCLEX_HTML 4 +#define SCLEX_XML 5 +#define SCLEX_PERL 6 +#define SCLEX_SQL 7 +#define SCLEX_VB 8 +#define SCLEX_PROPERTIES 9 +#define SCLEX_ERRORLIST 10 +#define SCLEX_MAKEFILE 11 +#define SCLEX_BATCH 12 +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 +#define SCLEX_CONF 17 +#define SCLEX_PASCAL 18 +#define SCLEX_AVE 19 +#define SCLEX_ADA 20 +#define SCLEX_LISP 21 +#define SCLEX_RUBY 22 +#define SCLEX_EIFFEL 23 +#define SCLEX_EIFFELKW 24 +#define SCLEX_TCL 25 +#define SCLEX_NNCRONTAB 26 +#define SCLEX_BULLANT 27 +#define SCLEX_VBSCRIPT 28 +#define SCLEX_BAAN 31 +#define SCLEX_MATLAB 32 +#define SCLEX_SCRIPTOL 33 +#define SCLEX_ASM 34 +#define SCLEX_CPPNOCASE 35 +#define SCLEX_FORTRAN 36 +#define SCLEX_F77 37 +#define SCLEX_CSS 38 +#define SCLEX_POV 39 +#define SCLEX_LOUT 40 +#define SCLEX_ESCRIPT 41 +#define SCLEX_PS 42 +#define SCLEX_NSIS 43 +#define SCLEX_MMIXAL 44 +#define SCLEX_CLW 45 +#define SCLEX_CLWNOCASE 46 +#define SCLEX_LOT 47 +#define SCLEX_YAML 48 +#define SCLEX_TEX 49 +#define SCLEX_METAPOST 50 +#define SCLEX_POWERBASIC 51 +#define SCLEX_FORTH 52 +#define SCLEX_ERLANG 53 +#define SCLEX_OCTAVE 54 +#define SCLEX_MSSQL 55 +#define SCLEX_VERILOG 56 +#define SCLEX_KIX 57 +#define SCLEX_GUI4CLI 58 +#define SCLEX_SPECMAN 59 +#define SCLEX_AU3 60 +#define SCLEX_APDL 61 +#define SCLEX_BASH 62 +#define SCLEX_ASN1 63 +#define SCLEX_VHDL 64 +#define SCLEX_CAML 65 +#define SCLEX_BLITZBASIC 66 +#define SCLEX_PUREBASIC 67 +#define SCLEX_HASKELL 68 +#define SCLEX_PHPSCRIPT 69 +#define SCLEX_TADS3 70 +#define SCLEX_REBOL 71 +#define SCLEX_SMALLTALK 72 +#define SCLEX_FLAGSHIP 73 +#define SCLEX_CSOUND 74 +#define SCLEX_FREEBASIC 75 +#define SCLEX_INNOSETUP 76 +#define SCLEX_OPAL 77 +#define SCLEX_SPICE 78 +#define SCLEX_D 79 +#define SCLEX_CMAKE 80 +#define SCLEX_GAP 81 +#define SCLEX_PLM 82 +#define SCLEX_PROGRESS 83 +#define SCLEX_ABAQUS 84 +#define SCLEX_ASYMPTOTE 85 +#define SCLEX_R 86 +#define SCLEX_MAGIK 87 +#define SCLEX_POWERSHELL 88 +#define SCLEX_MYSQL 89 +#define SCLEX_PO 90 +#define SCLEX_TAL 91 +#define SCLEX_COBOL 92 +#define SCLEX_TACL 93 +#define SCLEX_SORCUS 94 +#define SCLEX_POWERPRO 95 +#define SCLEX_NIMROD 96 +#define SCLEX_SML 97 +#define SCLEX_MARKDOWN 98 +#define SCLEX_TXT2TAGS 99 +#define SCLEX_A68K 100 +#define SCLEX_MODULA 101 +#define SCLEX_COFFEESCRIPT 102 +#define SCLEX_TCMD 103 +#define SCLEX_AVS 104 +#define SCLEX_ECL 105 +#define SCLEX_OSCRIPT 106 +#define SCLEX_VISUALPROLOG 107 +#define SCLEX_LITERATEHASKELL 108 +#define SCLEX_STTXT 109 +#define SCLEX_KVIRC 110 +#define SCLEX_RUST 111 +#define SCLEX_DMAP 112 +#define SCLEX_AS 113 +#define SCLEX_DMIS 114 +#define SCLEX_REGISTRY 115 +#define SCLEX_BIBTEX 116 +#define SCLEX_SREC 117 +#define SCLEX_IHEX 118 +#define SCLEX_TEHEX 119 +#define SCLEX_JSON 120 +#define SCLEX_EDIFACT 121 +#define SCLEX_INDENT 122 +#define SCLEX_MAXIMA 123 +#define SCLEX_STATA 124 +#define SCLEX_SAS 125 +#define SCLEX_LPEG 999 +#define SCLEX_AUTOMATIC 1000 +#define SCE_P_DEFAULT 0 +#define SCE_P_COMMENTLINE 1 +#define SCE_P_NUMBER 2 +#define SCE_P_STRING 3 +#define SCE_P_CHARACTER 4 +#define SCE_P_WORD 5 +#define SCE_P_TRIPLE 6 +#define SCE_P_TRIPLEDOUBLE 7 +#define SCE_P_CLASSNAME 8 +#define SCE_P_DEFNAME 9 +#define SCE_P_OPERATOR 10 +#define SCE_P_IDENTIFIER 11 +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 +#define SCE_P_WORD2 14 +#define SCE_P_DECORATOR 15 +#define SCE_P_FSTRING 16 +#define SCE_P_FCHARACTER 17 +#define SCE_P_FTRIPLE 18 +#define SCE_P_FTRIPLEDOUBLE 19 +#define SCE_C_DEFAULT 0 +#define SCE_C_COMMENT 1 +#define SCE_C_COMMENTLINE 2 +#define SCE_C_COMMENTDOC 3 +#define SCE_C_NUMBER 4 +#define SCE_C_WORD 5 +#define SCE_C_STRING 6 +#define SCE_C_CHARACTER 7 +#define SCE_C_UUID 8 +#define SCE_C_PREPROCESSOR 9 +#define SCE_C_OPERATOR 10 +#define SCE_C_IDENTIFIER 11 +#define SCE_C_STRINGEOL 12 +#define SCE_C_VERBATIM 13 +#define SCE_C_REGEX 14 +#define SCE_C_COMMENTLINEDOC 15 +#define SCE_C_WORD2 16 +#define SCE_C_COMMENTDOCKEYWORD 17 +#define SCE_C_COMMENTDOCKEYWORDERROR 18 +#define SCE_C_GLOBALCLASS 19 +#define SCE_C_STRINGRAW 20 +#define SCE_C_TRIPLEVERBATIM 21 +#define SCE_C_HASHQUOTEDSTRING 22 +#define SCE_C_PREPROCESSORCOMMENT 23 +#define SCE_C_PREPROCESSORCOMMENTDOC 24 +#define SCE_C_USERLITERAL 25 +#define SCE_C_TASKMARKER 26 +#define SCE_C_ESCAPESEQUENCE 27 +#define SCE_D_DEFAULT 0 +#define SCE_D_COMMENT 1 +#define SCE_D_COMMENTLINE 2 +#define SCE_D_COMMENTDOC 3 +#define SCE_D_COMMENTNESTED 4 +#define SCE_D_NUMBER 5 +#define SCE_D_WORD 6 +#define SCE_D_WORD2 7 +#define SCE_D_WORD3 8 +#define SCE_D_TYPEDEF 9 +#define SCE_D_STRING 10 +#define SCE_D_STRINGEOL 11 +#define SCE_D_CHARACTER 12 +#define SCE_D_OPERATOR 13 +#define SCE_D_IDENTIFIER 14 +#define SCE_D_COMMENTLINEDOC 15 +#define SCE_D_COMMENTDOCKEYWORD 16 +#define SCE_D_COMMENTDOCKEYWORDERROR 17 +#define SCE_D_STRINGB 18 +#define SCE_D_STRINGR 19 +#define SCE_D_WORD5 20 +#define SCE_D_WORD6 21 +#define SCE_D_WORD7 22 +#define SCE_TCL_DEFAULT 0 +#define SCE_TCL_COMMENT 1 +#define SCE_TCL_COMMENTLINE 2 +#define SCE_TCL_NUMBER 3 +#define SCE_TCL_WORD_IN_QUOTE 4 +#define SCE_TCL_IN_QUOTE 5 +#define SCE_TCL_OPERATOR 6 +#define SCE_TCL_IDENTIFIER 7 +#define SCE_TCL_SUBSTITUTION 8 +#define SCE_TCL_SUB_BRACE 9 +#define SCE_TCL_MODIFIER 10 +#define SCE_TCL_EXPAND 11 +#define SCE_TCL_WORD 12 +#define SCE_TCL_WORD2 13 +#define SCE_TCL_WORD3 14 +#define SCE_TCL_WORD4 15 +#define SCE_TCL_WORD5 16 +#define SCE_TCL_WORD6 17 +#define SCE_TCL_WORD7 18 +#define SCE_TCL_WORD8 19 +#define SCE_TCL_COMMENT_BOX 20 +#define SCE_TCL_BLOCK_COMMENT 21 +#define SCE_H_DEFAULT 0 +#define SCE_H_TAG 1 +#define SCE_H_TAGUNKNOWN 2 +#define SCE_H_ATTRIBUTE 3 +#define SCE_H_ATTRIBUTEUNKNOWN 4 +#define SCE_H_NUMBER 5 +#define SCE_H_DOUBLESTRING 6 +#define SCE_H_SINGLESTRING 7 +#define SCE_H_OTHER 8 +#define SCE_H_COMMENT 9 +#define SCE_H_ENTITY 10 +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_H_XCCOMMENT 20 +#define SCE_H_SGML_DEFAULT 21 +#define SCE_H_SGML_COMMAND 22 +#define SCE_H_SGML_1ST_PARAM 23 +#define SCE_H_SGML_DOUBLESTRING 24 +#define SCE_H_SGML_SIMPLESTRING 25 +#define SCE_H_SGML_ERROR 26 +#define SCE_H_SGML_SPECIAL 27 +#define SCE_H_SGML_ENTITY 28 +#define SCE_H_SGML_COMMENT 29 +#define SCE_H_SGML_1ST_PARAM_COMMENT 30 +#define SCE_H_SGML_BLOCK_DEFAULT 31 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJ_REGEX 52 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HJA_REGEX 67 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPHP_COMPLEX_VARIABLE 104 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_HSTRING_VARIABLE 126 +#define SCE_HPHP_OPERATOR 127 +#define SCE_PL_DEFAULT 0 +#define SCE_PL_ERROR 1 +#define SCE_PL_COMMENTLINE 2 +#define SCE_PL_POD 3 +#define SCE_PL_NUMBER 4 +#define SCE_PL_WORD 5 +#define SCE_PL_STRING 6 +#define SCE_PL_CHARACTER 7 +#define SCE_PL_PUNCTUATION 8 +#define SCE_PL_PREPROCESSOR 9 +#define SCE_PL_OPERATOR 10 +#define SCE_PL_IDENTIFIER 11 +#define SCE_PL_SCALAR 12 +#define SCE_PL_ARRAY 13 +#define SCE_PL_HASH 14 +#define SCE_PL_SYMBOLTABLE 15 +#define SCE_PL_VARIABLE_INDEXER 16 +#define SCE_PL_REGEX 17 +#define SCE_PL_REGSUBST 18 +#define SCE_PL_LONGQUOTE 19 +#define SCE_PL_BACKTICKS 20 +#define SCE_PL_DATASECTION 21 +#define SCE_PL_HERE_DELIM 22 +#define SCE_PL_HERE_Q 23 +#define SCE_PL_HERE_QQ 24 +#define SCE_PL_HERE_QX 25 +#define SCE_PL_STRING_Q 26 +#define SCE_PL_STRING_QQ 27 +#define SCE_PL_STRING_QX 28 +#define SCE_PL_STRING_QR 29 +#define SCE_PL_STRING_QW 30 +#define SCE_PL_POD_VERB 31 +#define SCE_PL_SUB_PROTOTYPE 40 +#define SCE_PL_FORMAT_IDENT 41 +#define SCE_PL_FORMAT 42 +#define SCE_PL_STRING_VAR 43 +#define SCE_PL_XLAT 44 +#define SCE_PL_REGEX_VAR 54 +#define SCE_PL_REGSUBST_VAR 55 +#define SCE_PL_BACKTICKS_VAR 57 +#define SCE_PL_HERE_QQ_VAR 61 +#define SCE_PL_HERE_QX_VAR 62 +#define SCE_PL_STRING_QQ_VAR 64 +#define SCE_PL_STRING_QX_VAR 65 +#define SCE_PL_STRING_QR_VAR 66 +#define SCE_RB_DEFAULT 0 +#define SCE_RB_ERROR 1 +#define SCE_RB_COMMENTLINE 2 +#define SCE_RB_POD 3 +#define SCE_RB_NUMBER 4 +#define SCE_RB_WORD 5 +#define SCE_RB_STRING 6 +#define SCE_RB_CHARACTER 7 +#define SCE_RB_CLASSNAME 8 +#define SCE_RB_DEFNAME 9 +#define SCE_RB_OPERATOR 10 +#define SCE_RB_IDENTIFIER 11 +#define SCE_RB_REGEX 12 +#define SCE_RB_GLOBAL 13 +#define SCE_RB_SYMBOL 14 +#define SCE_RB_MODULE_NAME 15 +#define SCE_RB_INSTANCE_VAR 16 +#define SCE_RB_CLASS_VAR 17 +#define SCE_RB_BACKTICKS 18 +#define SCE_RB_DATASECTION 19 +#define SCE_RB_HERE_DELIM 20 +#define SCE_RB_HERE_Q 21 +#define SCE_RB_HERE_QQ 22 +#define SCE_RB_HERE_QX 23 +#define SCE_RB_STRING_Q 24 +#define SCE_RB_STRING_QQ 25 +#define SCE_RB_STRING_QX 26 +#define SCE_RB_STRING_QR 27 +#define SCE_RB_STRING_QW 28 +#define SCE_RB_WORD_DEMOTED 29 +#define SCE_RB_STDIN 30 +#define SCE_RB_STDOUT 31 +#define SCE_RB_STDERR 40 +#define SCE_RB_UPPER_BOUND 41 +#define SCE_B_DEFAULT 0 +#define SCE_B_COMMENT 1 +#define SCE_B_NUMBER 2 +#define SCE_B_KEYWORD 3 +#define SCE_B_STRING 4 +#define SCE_B_PREPROCESSOR 5 +#define SCE_B_OPERATOR 6 +#define SCE_B_IDENTIFIER 7 +#define SCE_B_DATE 8 +#define SCE_B_STRINGEOL 9 +#define SCE_B_KEYWORD2 10 +#define SCE_B_KEYWORD3 11 +#define SCE_B_KEYWORD4 12 +#define SCE_B_CONSTANT 13 +#define SCE_B_ASM 14 +#define SCE_B_LABEL 15 +#define SCE_B_ERROR 16 +#define SCE_B_HEXNUMBER 17 +#define SCE_B_BINNUMBER 18 +#define SCE_B_COMMENTBLOCK 19 +#define SCE_B_DOCLINE 20 +#define SCE_B_DOCBLOCK 21 +#define SCE_B_DOCKEYWORD 22 +#define SCE_PROPS_DEFAULT 0 +#define SCE_PROPS_COMMENT 1 +#define SCE_PROPS_SECTION 2 +#define SCE_PROPS_ASSIGNMENT 3 +#define SCE_PROPS_DEFVAL 4 +#define SCE_PROPS_KEY 5 +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +#define SCE_L_TAG2 5 +#define SCE_L_MATH2 6 +#define SCE_L_COMMENT2 7 +#define SCE_L_VERBATIM 8 +#define SCE_L_SHORTCMD 9 +#define SCE_L_SPECIAL 10 +#define SCE_L_CMDOPT 11 +#define SCE_L_ERROR 12 +#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_LUA_WORD2 13 +#define SCE_LUA_WORD3 14 +#define SCE_LUA_WORD4 15 +#define SCE_LUA_WORD5 16 +#define SCE_LUA_WORD6 17 +#define SCE_LUA_WORD7 18 +#define SCE_LUA_WORD8 19 +#define SCE_LUA_LABEL 20 +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +#define SCE_ERR_NET 7 +#define SCE_ERR_LUA 8 +#define SCE_ERR_CTAG 9 +#define SCE_ERR_DIFF_CHANGED 10 +#define SCE_ERR_DIFF_ADDITION 11 +#define SCE_ERR_DIFF_DELETION 12 +#define SCE_ERR_DIFF_MESSAGE 13 +#define SCE_ERR_PHP 14 +#define SCE_ERR_ELF 15 +#define SCE_ERR_IFC 16 +#define SCE_ERR_IFORT 17 +#define SCE_ERR_ABSF 18 +#define SCE_ERR_TIDY 19 +#define SCE_ERR_JAVA_STACK 20 +#define SCE_ERR_VALUE 21 +#define SCE_ERR_GCC_INCLUDED_FROM 22 +#define SCE_ERR_ESCSEQ 23 +#define SCE_ERR_ESCSEQ_UNKNOWN 24 +#define SCE_ERR_ES_BLACK 40 +#define SCE_ERR_ES_RED 41 +#define SCE_ERR_ES_GREEN 42 +#define SCE_ERR_ES_BROWN 43 +#define SCE_ERR_ES_BLUE 44 +#define SCE_ERR_ES_MAGENTA 45 +#define SCE_ERR_ES_CYAN 46 +#define SCE_ERR_ES_GRAY 47 +#define SCE_ERR_ES_DARK_GRAY 48 +#define SCE_ERR_ES_BRIGHT_RED 49 +#define SCE_ERR_ES_BRIGHT_GREEN 50 +#define SCE_ERR_ES_YELLOW 51 +#define SCE_ERR_ES_BRIGHT_BLUE 52 +#define SCE_ERR_ES_BRIGHT_MAGENTA 53 +#define SCE_ERR_ES_BRIGHT_CYAN 54 +#define SCE_ERR_ES_WHITE 55 +#define SCE_BAT_DEFAULT 0 +#define SCE_BAT_COMMENT 1 +#define SCE_BAT_WORD 2 +#define SCE_BAT_LABEL 3 +#define SCE_BAT_HIDE 4 +#define SCE_BAT_COMMAND 5 +#define SCE_BAT_IDENTIFIER 6 +#define SCE_BAT_OPERATOR 7 +#define SCE_TCMD_DEFAULT 0 +#define SCE_TCMD_COMMENT 1 +#define SCE_TCMD_WORD 2 +#define SCE_TCMD_LABEL 3 +#define SCE_TCMD_HIDE 4 +#define SCE_TCMD_COMMAND 5 +#define SCE_TCMD_IDENTIFIER 6 +#define SCE_TCMD_OPERATOR 7 +#define SCE_TCMD_ENVIRONMENT 8 +#define SCE_TCMD_EXPANSION 9 +#define SCE_TCMD_CLABEL 10 +#define SCE_MAKE_DEFAULT 0 +#define SCE_MAKE_COMMENT 1 +#define SCE_MAKE_PREPROCESSOR 2 +#define SCE_MAKE_IDENTIFIER 3 +#define SCE_MAKE_OPERATOR 4 +#define SCE_MAKE_TARGET 5 +#define SCE_MAKE_IDEOL 9 +#define SCE_DIFF_DEFAULT 0 +#define SCE_DIFF_COMMENT 1 +#define SCE_DIFF_COMMAND 2 +#define SCE_DIFF_HEADER 3 +#define SCE_DIFF_POSITION 4 +#define SCE_DIFF_DELETED 5 +#define SCE_DIFF_ADDED 6 +#define SCE_DIFF_CHANGED 7 +#define SCE_DIFF_PATCH_ADD 8 +#define SCE_DIFF_PATCH_DELETE 9 +#define SCE_DIFF_REMOVED_PATCH_ADD 10 +#define SCE_DIFF_REMOVED_PATCH_DELETE 11 +#define SCE_CONF_DEFAULT 0 +#define SCE_CONF_COMMENT 1 +#define SCE_CONF_NUMBER 2 +#define SCE_CONF_IDENTIFIER 3 +#define SCE_CONF_EXTENSION 4 +#define SCE_CONF_PARAMETER 5 +#define SCE_CONF_STRING 6 +#define SCE_CONF_OPERATOR 7 +#define SCE_CONF_IP 8 +#define SCE_CONF_DIRECTIVE 9 +#define SCE_AVE_DEFAULT 0 +#define SCE_AVE_COMMENT 1 +#define SCE_AVE_NUMBER 2 +#define SCE_AVE_WORD 3 +#define SCE_AVE_STRING 6 +#define SCE_AVE_ENUM 7 +#define SCE_AVE_STRINGEOL 8 +#define SCE_AVE_IDENTIFIER 9 +#define SCE_AVE_OPERATOR 10 +#define SCE_AVE_WORD1 11 +#define SCE_AVE_WORD2 12 +#define SCE_AVE_WORD3 13 +#define SCE_AVE_WORD4 14 +#define SCE_AVE_WORD5 15 +#define SCE_AVE_WORD6 16 +#define SCE_ADA_DEFAULT 0 +#define SCE_ADA_WORD 1 +#define SCE_ADA_IDENTIFIER 2 +#define SCE_ADA_NUMBER 3 +#define SCE_ADA_DELIMITER 4 +#define SCE_ADA_CHARACTER 5 +#define SCE_ADA_CHARACTEREOL 6 +#define SCE_ADA_STRING 7 +#define SCE_ADA_STRINGEOL 8 +#define SCE_ADA_LABEL 9 +#define SCE_ADA_COMMENTLINE 10 +#define SCE_ADA_ILLEGAL 11 +#define SCE_BAAN_DEFAULT 0 +#define SCE_BAAN_COMMENT 1 +#define SCE_BAAN_COMMENTDOC 2 +#define SCE_BAAN_NUMBER 3 +#define SCE_BAAN_WORD 4 +#define SCE_BAAN_STRING 5 +#define SCE_BAAN_PREPROCESSOR 6 +#define SCE_BAAN_OPERATOR 7 +#define SCE_BAAN_IDENTIFIER 8 +#define SCE_BAAN_STRINGEOL 9 +#define SCE_BAAN_WORD2 10 +#define SCE_BAAN_WORD3 11 +#define SCE_BAAN_WORD4 12 +#define SCE_BAAN_WORD5 13 +#define SCE_BAAN_WORD6 14 +#define SCE_BAAN_WORD7 15 +#define SCE_BAAN_WORD8 16 +#define SCE_BAAN_WORD9 17 +#define SCE_BAAN_TABLEDEF 18 +#define SCE_BAAN_TABLESQL 19 +#define SCE_BAAN_FUNCTION 20 +#define SCE_BAAN_DOMDEF 21 +#define SCE_BAAN_FUNCDEF 22 +#define SCE_BAAN_OBJECTDEF 23 +#define SCE_BAAN_DEFINEDEF 24 +#define SCE_LISP_DEFAULT 0 +#define SCE_LISP_COMMENT 1 +#define SCE_LISP_NUMBER 2 +#define SCE_LISP_KEYWORD 3 +#define SCE_LISP_KEYWORD_KW 4 +#define SCE_LISP_SYMBOL 5 +#define SCE_LISP_STRING 6 +#define SCE_LISP_STRINGEOL 8 +#define SCE_LISP_IDENTIFIER 9 +#define SCE_LISP_OPERATOR 10 +#define SCE_LISP_SPECIAL 11 +#define SCE_LISP_MULTI_COMMENT 12 +#define SCE_EIFFEL_DEFAULT 0 +#define SCE_EIFFEL_COMMENTLINE 1 +#define SCE_EIFFEL_NUMBER 2 +#define SCE_EIFFEL_WORD 3 +#define SCE_EIFFEL_STRING 4 +#define SCE_EIFFEL_CHARACTER 5 +#define SCE_EIFFEL_OPERATOR 6 +#define SCE_EIFFEL_IDENTIFIER 7 +#define SCE_EIFFEL_STRINGEOL 8 +#define SCE_NNCRONTAB_DEFAULT 0 +#define SCE_NNCRONTAB_COMMENT 1 +#define SCE_NNCRONTAB_TASK 2 +#define SCE_NNCRONTAB_SECTION 3 +#define SCE_NNCRONTAB_KEYWORD 4 +#define SCE_NNCRONTAB_MODIFIER 5 +#define SCE_NNCRONTAB_ASTERISK 6 +#define SCE_NNCRONTAB_NUMBER 7 +#define SCE_NNCRONTAB_STRING 8 +#define SCE_NNCRONTAB_ENVIRONMENT 9 +#define SCE_NNCRONTAB_IDENTIFIER 10 +#define SCE_FORTH_DEFAULT 0 +#define SCE_FORTH_COMMENT 1 +#define SCE_FORTH_COMMENT_ML 2 +#define SCE_FORTH_IDENTIFIER 3 +#define SCE_FORTH_CONTROL 4 +#define SCE_FORTH_KEYWORD 5 +#define SCE_FORTH_DEFWORD 6 +#define SCE_FORTH_PREWORD1 7 +#define SCE_FORTH_PREWORD2 8 +#define SCE_FORTH_NUMBER 9 +#define SCE_FORTH_STRING 10 +#define SCE_FORTH_LOCALE 11 +#define SCE_MATLAB_DEFAULT 0 +#define SCE_MATLAB_COMMENT 1 +#define SCE_MATLAB_COMMAND 2 +#define SCE_MATLAB_NUMBER 3 +#define SCE_MATLAB_KEYWORD 4 +#define SCE_MATLAB_STRING 5 +#define SCE_MATLAB_OPERATOR 6 +#define SCE_MATLAB_IDENTIFIER 7 +#define SCE_MATLAB_DOUBLEQUOTESTRING 8 +#define SCE_MAXIMA_OPERATOR 0 +#define SCE_MAXIMA_COMMANDENDING 1 +#define SCE_MAXIMA_COMMENT 2 +#define SCE_MAXIMA_NUMBER 3 +#define SCE_MAXIMA_STRING 4 +#define SCE_MAXIMA_COMMAND 5 +#define SCE_MAXIMA_VARIABLE 6 +#define SCE_MAXIMA_UNKNOWN 7 +#define SCE_SCRIPTOL_DEFAULT 0 +#define SCE_SCRIPTOL_WHITE 1 +#define SCE_SCRIPTOL_COMMENTLINE 2 +#define SCE_SCRIPTOL_PERSISTENT 3 +#define SCE_SCRIPTOL_CSTYLE 4 +#define SCE_SCRIPTOL_COMMENTBLOCK 5 +#define SCE_SCRIPTOL_NUMBER 6 +#define SCE_SCRIPTOL_STRING 7 +#define SCE_SCRIPTOL_CHARACTER 8 +#define SCE_SCRIPTOL_STRINGEOL 9 +#define SCE_SCRIPTOL_KEYWORD 10 +#define SCE_SCRIPTOL_OPERATOR 11 +#define SCE_SCRIPTOL_IDENTIFIER 12 +#define SCE_SCRIPTOL_TRIPLE 13 +#define SCE_SCRIPTOL_CLASSNAME 14 +#define SCE_SCRIPTOL_PREPROCESSOR 15 +#define SCE_ASM_DEFAULT 0 +#define SCE_ASM_COMMENT 1 +#define SCE_ASM_NUMBER 2 +#define SCE_ASM_STRING 3 +#define SCE_ASM_OPERATOR 4 +#define SCE_ASM_IDENTIFIER 5 +#define SCE_ASM_CPUINSTRUCTION 6 +#define SCE_ASM_MATHINSTRUCTION 7 +#define SCE_ASM_REGISTER 8 +#define SCE_ASM_DIRECTIVE 9 +#define SCE_ASM_DIRECTIVEOPERAND 10 +#define SCE_ASM_COMMENTBLOCK 11 +#define SCE_ASM_CHARACTER 12 +#define SCE_ASM_STRINGEOL 13 +#define SCE_ASM_EXTINSTRUCTION 14 +#define SCE_ASM_COMMENTDIRECTIVE 15 +#define SCE_F_DEFAULT 0 +#define SCE_F_COMMENT 1 +#define SCE_F_NUMBER 2 +#define SCE_F_STRING1 3 +#define SCE_F_STRING2 4 +#define SCE_F_STRINGEOL 5 +#define SCE_F_OPERATOR 6 +#define SCE_F_IDENTIFIER 7 +#define SCE_F_WORD 8 +#define SCE_F_WORD2 9 +#define SCE_F_WORD3 10 +#define SCE_F_PREPROCESSOR 11 +#define SCE_F_OPERATOR2 12 +#define SCE_F_LABEL 13 +#define SCE_F_CONTINUATION 14 +#define SCE_CSS_DEFAULT 0 +#define SCE_CSS_TAG 1 +#define SCE_CSS_CLASS 2 +#define SCE_CSS_PSEUDOCLASS 3 +#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 +#define SCE_CSS_OPERATOR 5 +#define SCE_CSS_IDENTIFIER 6 +#define SCE_CSS_UNKNOWN_IDENTIFIER 7 +#define SCE_CSS_VALUE 8 +#define SCE_CSS_COMMENT 9 +#define SCE_CSS_ID 10 +#define SCE_CSS_IMPORTANT 11 +#define SCE_CSS_DIRECTIVE 12 +#define SCE_CSS_DOUBLESTRING 13 +#define SCE_CSS_SINGLESTRING 14 +#define SCE_CSS_IDENTIFIER2 15 +#define SCE_CSS_ATTRIBUTE 16 +#define SCE_CSS_IDENTIFIER3 17 +#define SCE_CSS_PSEUDOELEMENT 18 +#define SCE_CSS_EXTENDED_IDENTIFIER 19 +#define SCE_CSS_EXTENDED_PSEUDOCLASS 20 +#define SCE_CSS_EXTENDED_PSEUDOELEMENT 21 +#define SCE_CSS_MEDIA 22 +#define SCE_CSS_VARIABLE 23 +#define SCE_POV_DEFAULT 0 +#define SCE_POV_COMMENT 1 +#define SCE_POV_COMMENTLINE 2 +#define SCE_POV_NUMBER 3 +#define SCE_POV_OPERATOR 4 +#define SCE_POV_IDENTIFIER 5 +#define SCE_POV_STRING 6 +#define SCE_POV_STRINGEOL 7 +#define SCE_POV_DIRECTIVE 8 +#define SCE_POV_BADDIRECTIVE 9 +#define SCE_POV_WORD2 10 +#define SCE_POV_WORD3 11 +#define SCE_POV_WORD4 12 +#define SCE_POV_WORD5 13 +#define SCE_POV_WORD6 14 +#define SCE_POV_WORD7 15 +#define SCE_POV_WORD8 16 +#define SCE_LOUT_DEFAULT 0 +#define SCE_LOUT_COMMENT 1 +#define SCE_LOUT_NUMBER 2 +#define SCE_LOUT_WORD 3 +#define SCE_LOUT_WORD2 4 +#define SCE_LOUT_WORD3 5 +#define SCE_LOUT_WORD4 6 +#define SCE_LOUT_STRING 7 +#define SCE_LOUT_OPERATOR 8 +#define SCE_LOUT_IDENTIFIER 9 +#define SCE_LOUT_STRINGEOL 10 +#define SCE_ESCRIPT_DEFAULT 0 +#define SCE_ESCRIPT_COMMENT 1 +#define SCE_ESCRIPT_COMMENTLINE 2 +#define SCE_ESCRIPT_COMMENTDOC 3 +#define SCE_ESCRIPT_NUMBER 4 +#define SCE_ESCRIPT_WORD 5 +#define SCE_ESCRIPT_STRING 6 +#define SCE_ESCRIPT_OPERATOR 7 +#define SCE_ESCRIPT_IDENTIFIER 8 +#define SCE_ESCRIPT_BRACE 9 +#define SCE_ESCRIPT_WORD2 10 +#define SCE_ESCRIPT_WORD3 11 +#define SCE_PS_DEFAULT 0 +#define SCE_PS_COMMENT 1 +#define SCE_PS_DSC_COMMENT 2 +#define SCE_PS_DSC_VALUE 3 +#define SCE_PS_NUMBER 4 +#define SCE_PS_NAME 5 +#define SCE_PS_KEYWORD 6 +#define SCE_PS_LITERAL 7 +#define SCE_PS_IMMEVAL 8 +#define SCE_PS_PAREN_ARRAY 9 +#define SCE_PS_PAREN_DICT 10 +#define SCE_PS_PAREN_PROC 11 +#define SCE_PS_TEXT 12 +#define SCE_PS_HEXSTRING 13 +#define SCE_PS_BASE85STRING 14 +#define SCE_PS_BADSTRINGCHAR 15 +#define SCE_NSIS_DEFAULT 0 +#define SCE_NSIS_COMMENT 1 +#define SCE_NSIS_STRINGDQ 2 +#define SCE_NSIS_STRINGLQ 3 +#define SCE_NSIS_STRINGRQ 4 +#define SCE_NSIS_FUNCTION 5 +#define SCE_NSIS_VARIABLE 6 +#define SCE_NSIS_LABEL 7 +#define SCE_NSIS_USERDEFINED 8 +#define SCE_NSIS_SECTIONDEF 9 +#define SCE_NSIS_SUBSECTIONDEF 10 +#define SCE_NSIS_IFDEFINEDEF 11 +#define SCE_NSIS_MACRODEF 12 +#define SCE_NSIS_STRINGVAR 13 +#define SCE_NSIS_NUMBER 14 +#define SCE_NSIS_SECTIONGROUP 15 +#define SCE_NSIS_PAGEEX 16 +#define SCE_NSIS_FUNCTIONDEF 17 +#define SCE_NSIS_COMMENTBOX 18 +#define SCE_MMIXAL_LEADWS 0 +#define SCE_MMIXAL_COMMENT 1 +#define SCE_MMIXAL_LABEL 2 +#define SCE_MMIXAL_OPCODE 3 +#define SCE_MMIXAL_OPCODE_PRE 4 +#define SCE_MMIXAL_OPCODE_VALID 5 +#define SCE_MMIXAL_OPCODE_UNKNOWN 6 +#define SCE_MMIXAL_OPCODE_POST 7 +#define SCE_MMIXAL_OPERANDS 8 +#define SCE_MMIXAL_NUMBER 9 +#define SCE_MMIXAL_REF 10 +#define SCE_MMIXAL_CHAR 11 +#define SCE_MMIXAL_STRING 12 +#define SCE_MMIXAL_REGISTER 13 +#define SCE_MMIXAL_HEX 14 +#define SCE_MMIXAL_OPERATOR 15 +#define SCE_MMIXAL_SYMBOL 16 +#define SCE_MMIXAL_INCLUDE 17 +#define SCE_CLW_DEFAULT 0 +#define SCE_CLW_LABEL 1 +#define SCE_CLW_COMMENT 2 +#define SCE_CLW_STRING 3 +#define SCE_CLW_USER_IDENTIFIER 4 +#define SCE_CLW_INTEGER_CONSTANT 5 +#define SCE_CLW_REAL_CONSTANT 6 +#define SCE_CLW_PICTURE_STRING 7 +#define SCE_CLW_KEYWORD 8 +#define SCE_CLW_COMPILER_DIRECTIVE 9 +#define SCE_CLW_RUNTIME_EXPRESSIONS 10 +#define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 +#define SCE_CLW_STRUCTURE_DATA_TYPE 12 +#define SCE_CLW_ATTRIBUTE 13 +#define SCE_CLW_STANDARD_EQUATE 14 +#define SCE_CLW_ERROR 15 +#define SCE_CLW_DEPRECATED 16 +#define SCE_LOT_DEFAULT 0 +#define SCE_LOT_HEADER 1 +#define SCE_LOT_BREAK 2 +#define SCE_LOT_SET 3 +#define SCE_LOT_PASS 4 +#define SCE_LOT_FAIL 5 +#define SCE_LOT_ABORT 6 +#define SCE_YAML_DEFAULT 0 +#define SCE_YAML_COMMENT 1 +#define SCE_YAML_IDENTIFIER 2 +#define SCE_YAML_KEYWORD 3 +#define SCE_YAML_NUMBER 4 +#define SCE_YAML_REFERENCE 5 +#define SCE_YAML_DOCUMENT 6 +#define SCE_YAML_TEXT 7 +#define SCE_YAML_ERROR 8 +#define SCE_YAML_OPERATOR 9 +#define SCE_TEX_DEFAULT 0 +#define SCE_TEX_SPECIAL 1 +#define SCE_TEX_GROUP 2 +#define SCE_TEX_SYMBOL 3 +#define SCE_TEX_COMMAND 4 +#define SCE_TEX_TEXT 5 +#define SCE_METAPOST_DEFAULT 0 +#define SCE_METAPOST_SPECIAL 1 +#define SCE_METAPOST_GROUP 2 +#define SCE_METAPOST_SYMBOL 3 +#define SCE_METAPOST_COMMAND 4 +#define SCE_METAPOST_TEXT 5 +#define SCE_METAPOST_EXTRA 6 +#define SCE_ERLANG_DEFAULT 0 +#define SCE_ERLANG_COMMENT 1 +#define SCE_ERLANG_VARIABLE 2 +#define SCE_ERLANG_NUMBER 3 +#define SCE_ERLANG_KEYWORD 4 +#define SCE_ERLANG_STRING 5 +#define SCE_ERLANG_OPERATOR 6 +#define SCE_ERLANG_ATOM 7 +#define SCE_ERLANG_FUNCTION_NAME 8 +#define SCE_ERLANG_CHARACTER 9 +#define SCE_ERLANG_MACRO 10 +#define SCE_ERLANG_RECORD 11 +#define SCE_ERLANG_PREPROC 12 +#define SCE_ERLANG_NODE_NAME 13 +#define SCE_ERLANG_COMMENT_FUNCTION 14 +#define SCE_ERLANG_COMMENT_MODULE 15 +#define SCE_ERLANG_COMMENT_DOC 16 +#define SCE_ERLANG_COMMENT_DOC_MACRO 17 +#define SCE_ERLANG_ATOM_QUOTED 18 +#define SCE_ERLANG_MACRO_QUOTED 19 +#define SCE_ERLANG_RECORD_QUOTED 20 +#define SCE_ERLANG_NODE_NAME_QUOTED 21 +#define SCE_ERLANG_BIFS 22 +#define SCE_ERLANG_MODULES 23 +#define SCE_ERLANG_MODULES_ATT 24 +#define SCE_ERLANG_UNKNOWN 31 +#define SCE_MSSQL_DEFAULT 0 +#define SCE_MSSQL_COMMENT 1 +#define SCE_MSSQL_LINE_COMMENT 2 +#define SCE_MSSQL_NUMBER 3 +#define SCE_MSSQL_STRING 4 +#define SCE_MSSQL_OPERATOR 5 +#define SCE_MSSQL_IDENTIFIER 6 +#define SCE_MSSQL_VARIABLE 7 +#define SCE_MSSQL_COLUMN_NAME 8 +#define SCE_MSSQL_STATEMENT 9 +#define SCE_MSSQL_DATATYPE 10 +#define SCE_MSSQL_SYSTABLE 11 +#define SCE_MSSQL_GLOBAL_VARIABLE 12 +#define SCE_MSSQL_FUNCTION 13 +#define SCE_MSSQL_STORED_PROCEDURE 14 +#define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 +#define SCE_MSSQL_COLUMN_NAME_2 16 +#define SCE_V_DEFAULT 0 +#define SCE_V_COMMENT 1 +#define SCE_V_COMMENTLINE 2 +#define SCE_V_COMMENTLINEBANG 3 +#define SCE_V_NUMBER 4 +#define SCE_V_WORD 5 +#define SCE_V_STRING 6 +#define SCE_V_WORD2 7 +#define SCE_V_WORD3 8 +#define SCE_V_PREPROCESSOR 9 +#define SCE_V_OPERATOR 10 +#define SCE_V_IDENTIFIER 11 +#define SCE_V_STRINGEOL 12 +#define SCE_V_USER 19 +#define SCE_V_COMMENT_WORD 20 +#define SCE_V_INPUT 21 +#define SCE_V_OUTPUT 22 +#define SCE_V_INOUT 23 +#define SCE_V_PORT_CONNECT 24 +#define SCE_KIX_DEFAULT 0 +#define SCE_KIX_COMMENT 1 +#define SCE_KIX_STRING1 2 +#define SCE_KIX_STRING2 3 +#define SCE_KIX_NUMBER 4 +#define SCE_KIX_VAR 5 +#define SCE_KIX_MACRO 6 +#define SCE_KIX_KEYWORD 7 +#define SCE_KIX_FUNCTIONS 8 +#define SCE_KIX_OPERATOR 9 +#define SCE_KIX_COMMENTSTREAM 10 +#define SCE_KIX_IDENTIFIER 31 +#define SCE_GC_DEFAULT 0 +#define SCE_GC_COMMENTLINE 1 +#define SCE_GC_COMMENTBLOCK 2 +#define SCE_GC_GLOBAL 3 +#define SCE_GC_EVENT 4 +#define SCE_GC_ATTRIBUTE 5 +#define SCE_GC_CONTROL 6 +#define SCE_GC_COMMAND 7 +#define SCE_GC_STRING 8 +#define SCE_GC_OPERATOR 9 +#define SCE_SN_DEFAULT 0 +#define SCE_SN_CODE 1 +#define SCE_SN_COMMENTLINE 2 +#define SCE_SN_COMMENTLINEBANG 3 +#define SCE_SN_NUMBER 4 +#define SCE_SN_WORD 5 +#define SCE_SN_STRING 6 +#define SCE_SN_WORD2 7 +#define SCE_SN_WORD3 8 +#define SCE_SN_PREPROCESSOR 9 +#define SCE_SN_OPERATOR 10 +#define SCE_SN_IDENTIFIER 11 +#define SCE_SN_STRINGEOL 12 +#define SCE_SN_REGEXTAG 13 +#define SCE_SN_SIGNAL 14 +#define SCE_SN_USER 19 +#define SCE_AU3_DEFAULT 0 +#define SCE_AU3_COMMENT 1 +#define SCE_AU3_COMMENTBLOCK 2 +#define SCE_AU3_NUMBER 3 +#define SCE_AU3_FUNCTION 4 +#define SCE_AU3_KEYWORD 5 +#define SCE_AU3_MACRO 6 +#define SCE_AU3_STRING 7 +#define SCE_AU3_OPERATOR 8 +#define SCE_AU3_VARIABLE 9 +#define SCE_AU3_SENT 10 +#define SCE_AU3_PREPROCESSOR 11 +#define SCE_AU3_SPECIAL 12 +#define SCE_AU3_EXPAND 13 +#define SCE_AU3_COMOBJ 14 +#define SCE_AU3_UDF 15 +#define SCE_APDL_DEFAULT 0 +#define SCE_APDL_COMMENT 1 +#define SCE_APDL_COMMENTBLOCK 2 +#define SCE_APDL_NUMBER 3 +#define SCE_APDL_STRING 4 +#define SCE_APDL_OPERATOR 5 +#define SCE_APDL_WORD 6 +#define SCE_APDL_PROCESSOR 7 +#define SCE_APDL_COMMAND 8 +#define SCE_APDL_SLASHCOMMAND 9 +#define SCE_APDL_STARCOMMAND 10 +#define SCE_APDL_ARGUMENT 11 +#define SCE_APDL_FUNCTION 12 +#define SCE_SH_DEFAULT 0 +#define SCE_SH_ERROR 1 +#define SCE_SH_COMMENTLINE 2 +#define SCE_SH_NUMBER 3 +#define SCE_SH_WORD 4 +#define SCE_SH_STRING 5 +#define SCE_SH_CHARACTER 6 +#define SCE_SH_OPERATOR 7 +#define SCE_SH_IDENTIFIER 8 +#define SCE_SH_SCALAR 9 +#define SCE_SH_PARAM 10 +#define SCE_SH_BACKTICKS 11 +#define SCE_SH_HERE_DELIM 12 +#define SCE_SH_HERE_Q 13 +#define SCE_ASN1_DEFAULT 0 +#define SCE_ASN1_COMMENT 1 +#define SCE_ASN1_IDENTIFIER 2 +#define SCE_ASN1_STRING 3 +#define SCE_ASN1_OID 4 +#define SCE_ASN1_SCALAR 5 +#define SCE_ASN1_KEYWORD 6 +#define SCE_ASN1_ATTRIBUTE 7 +#define SCE_ASN1_DESCRIPTOR 8 +#define SCE_ASN1_TYPE 9 +#define SCE_ASN1_OPERATOR 10 +#define SCE_VHDL_DEFAULT 0 +#define SCE_VHDL_COMMENT 1 +#define SCE_VHDL_COMMENTLINEBANG 2 +#define SCE_VHDL_NUMBER 3 +#define SCE_VHDL_STRING 4 +#define SCE_VHDL_OPERATOR 5 +#define SCE_VHDL_IDENTIFIER 6 +#define SCE_VHDL_STRINGEOL 7 +#define SCE_VHDL_KEYWORD 8 +#define SCE_VHDL_STDOPERATOR 9 +#define SCE_VHDL_ATTRIBUTE 10 +#define SCE_VHDL_STDFUNCTION 11 +#define SCE_VHDL_STDPACKAGE 12 +#define SCE_VHDL_STDTYPE 13 +#define SCE_VHDL_USERWORD 14 +#define SCE_VHDL_BLOCK_COMMENT 15 +#define SCE_CAML_DEFAULT 0 +#define SCE_CAML_IDENTIFIER 1 +#define SCE_CAML_TAGNAME 2 +#define SCE_CAML_KEYWORD 3 +#define SCE_CAML_KEYWORD2 4 +#define SCE_CAML_KEYWORD3 5 +#define SCE_CAML_LINENUM 6 +#define SCE_CAML_OPERATOR 7 +#define SCE_CAML_NUMBER 8 +#define SCE_CAML_CHAR 9 +#define SCE_CAML_WHITE 10 +#define SCE_CAML_STRING 11 +#define SCE_CAML_COMMENT 12 +#define SCE_CAML_COMMENT1 13 +#define SCE_CAML_COMMENT2 14 +#define SCE_CAML_COMMENT3 15 +#define SCE_HA_DEFAULT 0 +#define SCE_HA_IDENTIFIER 1 +#define SCE_HA_KEYWORD 2 +#define SCE_HA_NUMBER 3 +#define SCE_HA_STRING 4 +#define SCE_HA_CHARACTER 5 +#define SCE_HA_CLASS 6 +#define SCE_HA_MODULE 7 +#define SCE_HA_CAPITAL 8 +#define SCE_HA_DATA 9 +#define SCE_HA_IMPORT 10 +#define SCE_HA_OPERATOR 11 +#define SCE_HA_INSTANCE 12 +#define SCE_HA_COMMENTLINE 13 +#define SCE_HA_COMMENTBLOCK 14 +#define SCE_HA_COMMENTBLOCK2 15 +#define SCE_HA_COMMENTBLOCK3 16 +#define SCE_HA_PRAGMA 17 +#define SCE_HA_PREPROCESSOR 18 +#define SCE_HA_STRINGEOL 19 +#define SCE_HA_RESERVED_OPERATOR 20 +#define SCE_HA_LITERATE_COMMENT 21 +#define SCE_HA_LITERATE_CODEDELIM 22 +#define SCE_T3_DEFAULT 0 +#define SCE_T3_X_DEFAULT 1 +#define SCE_T3_PREPROCESSOR 2 +#define SCE_T3_BLOCK_COMMENT 3 +#define SCE_T3_LINE_COMMENT 4 +#define SCE_T3_OPERATOR 5 +#define SCE_T3_KEYWORD 6 +#define SCE_T3_NUMBER 7 +#define SCE_T3_IDENTIFIER 8 +#define SCE_T3_S_STRING 9 +#define SCE_T3_D_STRING 10 +#define SCE_T3_X_STRING 11 +#define SCE_T3_LIB_DIRECTIVE 12 +#define SCE_T3_MSG_PARAM 13 +#define SCE_T3_HTML_TAG 14 +#define SCE_T3_HTML_DEFAULT 15 +#define SCE_T3_HTML_STRING 16 +#define SCE_T3_USER1 17 +#define SCE_T3_USER2 18 +#define SCE_T3_USER3 19 +#define SCE_T3_BRACE 20 +#define SCE_REBOL_DEFAULT 0 +#define SCE_REBOL_COMMENTLINE 1 +#define SCE_REBOL_COMMENTBLOCK 2 +#define SCE_REBOL_PREFACE 3 +#define SCE_REBOL_OPERATOR 4 +#define SCE_REBOL_CHARACTER 5 +#define SCE_REBOL_QUOTEDSTRING 6 +#define SCE_REBOL_BRACEDSTRING 7 +#define SCE_REBOL_NUMBER 8 +#define SCE_REBOL_PAIR 9 +#define SCE_REBOL_TUPLE 10 +#define SCE_REBOL_BINARY 11 +#define SCE_REBOL_MONEY 12 +#define SCE_REBOL_ISSUE 13 +#define SCE_REBOL_TAG 14 +#define SCE_REBOL_FILE 15 +#define SCE_REBOL_EMAIL 16 +#define SCE_REBOL_URL 17 +#define SCE_REBOL_DATE 18 +#define SCE_REBOL_TIME 19 +#define SCE_REBOL_IDENTIFIER 20 +#define SCE_REBOL_WORD 21 +#define SCE_REBOL_WORD2 22 +#define SCE_REBOL_WORD3 23 +#define SCE_REBOL_WORD4 24 +#define SCE_REBOL_WORD5 25 +#define SCE_REBOL_WORD6 26 +#define SCE_REBOL_WORD7 27 +#define SCE_REBOL_WORD8 28 +#define SCE_SQL_DEFAULT 0 +#define SCE_SQL_COMMENT 1 +#define SCE_SQL_COMMENTLINE 2 +#define SCE_SQL_COMMENTDOC 3 +#define SCE_SQL_NUMBER 4 +#define SCE_SQL_WORD 5 +#define SCE_SQL_STRING 6 +#define SCE_SQL_CHARACTER 7 +#define SCE_SQL_SQLPLUS 8 +#define SCE_SQL_SQLPLUS_PROMPT 9 +#define SCE_SQL_OPERATOR 10 +#define SCE_SQL_IDENTIFIER 11 +#define SCE_SQL_SQLPLUS_COMMENT 13 +#define SCE_SQL_COMMENTLINEDOC 15 +#define SCE_SQL_WORD2 16 +#define SCE_SQL_COMMENTDOCKEYWORD 17 +#define SCE_SQL_COMMENTDOCKEYWORDERROR 18 +#define SCE_SQL_USER1 19 +#define SCE_SQL_USER2 20 +#define SCE_SQL_USER3 21 +#define SCE_SQL_USER4 22 +#define SCE_SQL_QUOTEDIDENTIFIER 23 +#define SCE_SQL_QOPERATOR 24 +#define SCE_ST_DEFAULT 0 +#define SCE_ST_STRING 1 +#define SCE_ST_NUMBER 2 +#define SCE_ST_COMMENT 3 +#define SCE_ST_SYMBOL 4 +#define SCE_ST_BINARY 5 +#define SCE_ST_BOOL 6 +#define SCE_ST_SELF 7 +#define SCE_ST_SUPER 8 +#define SCE_ST_NIL 9 +#define SCE_ST_GLOBAL 10 +#define SCE_ST_RETURN 11 +#define SCE_ST_SPECIAL 12 +#define SCE_ST_KWSEND 13 +#define SCE_ST_ASSIGN 14 +#define SCE_ST_CHARACTER 15 +#define SCE_ST_SPEC_SEL 16 +#define SCE_FS_DEFAULT 0 +#define SCE_FS_COMMENT 1 +#define SCE_FS_COMMENTLINE 2 +#define SCE_FS_COMMENTDOC 3 +#define SCE_FS_COMMENTLINEDOC 4 +#define SCE_FS_COMMENTDOCKEYWORD 5 +#define SCE_FS_COMMENTDOCKEYWORDERROR 6 +#define SCE_FS_KEYWORD 7 +#define SCE_FS_KEYWORD2 8 +#define SCE_FS_KEYWORD3 9 +#define SCE_FS_KEYWORD4 10 +#define SCE_FS_NUMBER 11 +#define SCE_FS_STRING 12 +#define SCE_FS_PREPROCESSOR 13 +#define SCE_FS_OPERATOR 14 +#define SCE_FS_IDENTIFIER 15 +#define SCE_FS_DATE 16 +#define SCE_FS_STRINGEOL 17 +#define SCE_FS_CONSTANT 18 +#define SCE_FS_WORDOPERATOR 19 +#define SCE_FS_DISABLEDCODE 20 +#define SCE_FS_DEFAULT_C 21 +#define SCE_FS_COMMENTDOC_C 22 +#define SCE_FS_COMMENTLINEDOC_C 23 +#define SCE_FS_KEYWORD_C 24 +#define SCE_FS_KEYWORD2_C 25 +#define SCE_FS_NUMBER_C 26 +#define SCE_FS_STRING_C 27 +#define SCE_FS_PREPROCESSOR_C 28 +#define SCE_FS_OPERATOR_C 29 +#define SCE_FS_IDENTIFIER_C 30 +#define SCE_FS_STRINGEOL_C 31 +#define SCE_CSOUND_DEFAULT 0 +#define SCE_CSOUND_COMMENT 1 +#define SCE_CSOUND_NUMBER 2 +#define SCE_CSOUND_OPERATOR 3 +#define SCE_CSOUND_INSTR 4 +#define SCE_CSOUND_IDENTIFIER 5 +#define SCE_CSOUND_OPCODE 6 +#define SCE_CSOUND_HEADERSTMT 7 +#define SCE_CSOUND_USERKEYWORD 8 +#define SCE_CSOUND_COMMENTBLOCK 9 +#define SCE_CSOUND_PARAM 10 +#define SCE_CSOUND_ARATE_VAR 11 +#define SCE_CSOUND_KRATE_VAR 12 +#define SCE_CSOUND_IRATE_VAR 13 +#define SCE_CSOUND_GLOBAL_VAR 14 +#define SCE_CSOUND_STRINGEOL 15 +#define SCE_INNO_DEFAULT 0 +#define SCE_INNO_COMMENT 1 +#define SCE_INNO_KEYWORD 2 +#define SCE_INNO_PARAMETER 3 +#define SCE_INNO_SECTION 4 +#define SCE_INNO_PREPROC 5 +#define SCE_INNO_INLINE_EXPANSION 6 +#define SCE_INNO_COMMENT_PASCAL 7 +#define SCE_INNO_KEYWORD_PASCAL 8 +#define SCE_INNO_KEYWORD_USER 9 +#define SCE_INNO_STRING_DOUBLE 10 +#define SCE_INNO_STRING_SINGLE 11 +#define SCE_INNO_IDENTIFIER 12 +#define SCE_OPAL_SPACE 0 +#define SCE_OPAL_COMMENT_BLOCK 1 +#define SCE_OPAL_COMMENT_LINE 2 +#define SCE_OPAL_INTEGER 3 +#define SCE_OPAL_KEYWORD 4 +#define SCE_OPAL_SORT 5 +#define SCE_OPAL_STRING 6 +#define SCE_OPAL_PAR 7 +#define SCE_OPAL_BOOL_CONST 8 +#define SCE_OPAL_DEFAULT 32 +#define SCE_SPICE_DEFAULT 0 +#define SCE_SPICE_IDENTIFIER 1 +#define SCE_SPICE_KEYWORD 2 +#define SCE_SPICE_KEYWORD2 3 +#define SCE_SPICE_KEYWORD3 4 +#define SCE_SPICE_NUMBER 5 +#define SCE_SPICE_DELIMITER 6 +#define SCE_SPICE_VALUE 7 +#define SCE_SPICE_COMMENTLINE 8 +#define SCE_CMAKE_DEFAULT 0 +#define SCE_CMAKE_COMMENT 1 +#define SCE_CMAKE_STRINGDQ 2 +#define SCE_CMAKE_STRINGLQ 3 +#define SCE_CMAKE_STRINGRQ 4 +#define SCE_CMAKE_COMMANDS 5 +#define SCE_CMAKE_PARAMETERS 6 +#define SCE_CMAKE_VARIABLE 7 +#define SCE_CMAKE_USERDEFINED 8 +#define SCE_CMAKE_WHILEDEF 9 +#define SCE_CMAKE_FOREACHDEF 10 +#define SCE_CMAKE_IFDEFINEDEF 11 +#define SCE_CMAKE_MACRODEF 12 +#define SCE_CMAKE_STRINGVAR 13 +#define SCE_CMAKE_NUMBER 14 +#define SCE_GAP_DEFAULT 0 +#define SCE_GAP_IDENTIFIER 1 +#define SCE_GAP_KEYWORD 2 +#define SCE_GAP_KEYWORD2 3 +#define SCE_GAP_KEYWORD3 4 +#define SCE_GAP_KEYWORD4 5 +#define SCE_GAP_STRING 6 +#define SCE_GAP_CHAR 7 +#define SCE_GAP_OPERATOR 8 +#define SCE_GAP_COMMENT 9 +#define SCE_GAP_NUMBER 10 +#define SCE_GAP_STRINGEOL 11 +#define SCE_PLM_DEFAULT 0 +#define SCE_PLM_COMMENT 1 +#define SCE_PLM_STRING 2 +#define SCE_PLM_NUMBER 3 +#define SCE_PLM_IDENTIFIER 4 +#define SCE_PLM_OPERATOR 5 +#define SCE_PLM_CONTROL 6 +#define SCE_PLM_KEYWORD 7 +#define SCE_ABL_DEFAULT 0 +#define SCE_ABL_NUMBER 1 +#define SCE_ABL_WORD 2 +#define SCE_ABL_STRING 3 +#define SCE_ABL_CHARACTER 4 +#define SCE_ABL_PREPROCESSOR 5 +#define SCE_ABL_OPERATOR 6 +#define SCE_ABL_IDENTIFIER 7 +#define SCE_ABL_BLOCK 8 +#define SCE_ABL_END 9 +#define SCE_ABL_COMMENT 10 +#define SCE_ABL_TASKMARKER 11 +#define SCE_ABL_LINECOMMENT 12 +#define SCE_ABAQUS_DEFAULT 0 +#define SCE_ABAQUS_COMMENT 1 +#define SCE_ABAQUS_COMMENTBLOCK 2 +#define SCE_ABAQUS_NUMBER 3 +#define SCE_ABAQUS_STRING 4 +#define SCE_ABAQUS_OPERATOR 5 +#define SCE_ABAQUS_WORD 6 +#define SCE_ABAQUS_PROCESSOR 7 +#define SCE_ABAQUS_COMMAND 8 +#define SCE_ABAQUS_SLASHCOMMAND 9 +#define SCE_ABAQUS_STARCOMMAND 10 +#define SCE_ABAQUS_ARGUMENT 11 +#define SCE_ABAQUS_FUNCTION 12 +#define SCE_ASY_DEFAULT 0 +#define SCE_ASY_COMMENT 1 +#define SCE_ASY_COMMENTLINE 2 +#define SCE_ASY_NUMBER 3 +#define SCE_ASY_WORD 4 +#define SCE_ASY_STRING 5 +#define SCE_ASY_CHARACTER 6 +#define SCE_ASY_OPERATOR 7 +#define SCE_ASY_IDENTIFIER 8 +#define SCE_ASY_STRINGEOL 9 +#define SCE_ASY_COMMENTLINEDOC 10 +#define SCE_ASY_WORD2 11 +#define SCE_R_DEFAULT 0 +#define SCE_R_COMMENT 1 +#define SCE_R_KWORD 2 +#define SCE_R_BASEKWORD 3 +#define SCE_R_OTHERKWORD 4 +#define SCE_R_NUMBER 5 +#define SCE_R_STRING 6 +#define SCE_R_STRING2 7 +#define SCE_R_OPERATOR 8 +#define SCE_R_IDENTIFIER 9 +#define SCE_R_INFIX 10 +#define SCE_R_INFIXEOL 11 +#define SCE_MAGIK_DEFAULT 0 +#define SCE_MAGIK_COMMENT 1 +#define SCE_MAGIK_HYPER_COMMENT 16 +#define SCE_MAGIK_STRING 2 +#define SCE_MAGIK_CHARACTER 3 +#define SCE_MAGIK_NUMBER 4 +#define SCE_MAGIK_IDENTIFIER 5 +#define SCE_MAGIK_OPERATOR 6 +#define SCE_MAGIK_FLOW 7 +#define SCE_MAGIK_CONTAINER 8 +#define SCE_MAGIK_BRACKET_BLOCK 9 +#define SCE_MAGIK_BRACE_BLOCK 10 +#define SCE_MAGIK_SQBRACKET_BLOCK 11 +#define SCE_MAGIK_UNKNOWN_KEYWORD 12 +#define SCE_MAGIK_KEYWORD 13 +#define SCE_MAGIK_PRAGMA 14 +#define SCE_MAGIK_SYMBOL 15 +#define SCE_POWERSHELL_DEFAULT 0 +#define SCE_POWERSHELL_COMMENT 1 +#define SCE_POWERSHELL_STRING 2 +#define SCE_POWERSHELL_CHARACTER 3 +#define SCE_POWERSHELL_NUMBER 4 +#define SCE_POWERSHELL_VARIABLE 5 +#define SCE_POWERSHELL_OPERATOR 6 +#define SCE_POWERSHELL_IDENTIFIER 7 +#define SCE_POWERSHELL_KEYWORD 8 +#define SCE_POWERSHELL_CMDLET 9 +#define SCE_POWERSHELL_ALIAS 10 +#define SCE_POWERSHELL_FUNCTION 11 +#define SCE_POWERSHELL_USER1 12 +#define SCE_POWERSHELL_COMMENTSTREAM 13 +#define SCE_POWERSHELL_HERE_STRING 14 +#define SCE_POWERSHELL_HERE_CHARACTER 15 +#define SCE_POWERSHELL_COMMENTDOCKEYWORD 16 +#define SCE_MYSQL_DEFAULT 0 +#define SCE_MYSQL_COMMENT 1 +#define SCE_MYSQL_COMMENTLINE 2 +#define SCE_MYSQL_VARIABLE 3 +#define SCE_MYSQL_SYSTEMVARIABLE 4 +#define SCE_MYSQL_KNOWNSYSTEMVARIABLE 5 +#define SCE_MYSQL_NUMBER 6 +#define SCE_MYSQL_MAJORKEYWORD 7 +#define SCE_MYSQL_KEYWORD 8 +#define SCE_MYSQL_DATABASEOBJECT 9 +#define SCE_MYSQL_PROCEDUREKEYWORD 10 +#define SCE_MYSQL_STRING 11 +#define SCE_MYSQL_SQSTRING 12 +#define SCE_MYSQL_DQSTRING 13 +#define SCE_MYSQL_OPERATOR 14 +#define SCE_MYSQL_FUNCTION 15 +#define SCE_MYSQL_IDENTIFIER 16 +#define SCE_MYSQL_QUOTEDIDENTIFIER 17 +#define SCE_MYSQL_USER1 18 +#define SCE_MYSQL_USER2 19 +#define SCE_MYSQL_USER3 20 +#define SCE_MYSQL_HIDDENCOMMAND 21 +#define SCE_MYSQL_PLACEHOLDER 22 +#define SCE_PO_DEFAULT 0 +#define SCE_PO_COMMENT 1 +#define SCE_PO_MSGID 2 +#define SCE_PO_MSGID_TEXT 3 +#define SCE_PO_MSGSTR 4 +#define SCE_PO_MSGSTR_TEXT 5 +#define SCE_PO_MSGCTXT 6 +#define SCE_PO_MSGCTXT_TEXT 7 +#define SCE_PO_FUZZY 8 +#define SCE_PO_PROGRAMMER_COMMENT 9 +#define SCE_PO_REFERENCE 10 +#define SCE_PO_FLAGS 11 +#define SCE_PO_MSGID_TEXT_EOL 12 +#define SCE_PO_MSGSTR_TEXT_EOL 13 +#define SCE_PO_MSGCTXT_TEXT_EOL 14 +#define SCE_PO_ERROR 15 +#define SCE_PAS_DEFAULT 0 +#define SCE_PAS_IDENTIFIER 1 +#define SCE_PAS_COMMENT 2 +#define SCE_PAS_COMMENT2 3 +#define SCE_PAS_COMMENTLINE 4 +#define SCE_PAS_PREPROCESSOR 5 +#define SCE_PAS_PREPROCESSOR2 6 +#define SCE_PAS_NUMBER 7 +#define SCE_PAS_HEXNUMBER 8 +#define SCE_PAS_WORD 9 +#define SCE_PAS_STRING 10 +#define SCE_PAS_STRINGEOL 11 +#define SCE_PAS_CHARACTER 12 +#define SCE_PAS_OPERATOR 13 +#define SCE_PAS_ASM 14 +#define SCE_SORCUS_DEFAULT 0 +#define SCE_SORCUS_COMMAND 1 +#define SCE_SORCUS_PARAMETER 2 +#define SCE_SORCUS_COMMENTLINE 3 +#define SCE_SORCUS_STRING 4 +#define SCE_SORCUS_STRINGEOL 5 +#define SCE_SORCUS_IDENTIFIER 6 +#define SCE_SORCUS_OPERATOR 7 +#define SCE_SORCUS_NUMBER 8 +#define SCE_SORCUS_CONSTANT 9 +#define SCE_POWERPRO_DEFAULT 0 +#define SCE_POWERPRO_COMMENTBLOCK 1 +#define SCE_POWERPRO_COMMENTLINE 2 +#define SCE_POWERPRO_NUMBER 3 +#define SCE_POWERPRO_WORD 4 +#define SCE_POWERPRO_WORD2 5 +#define SCE_POWERPRO_WORD3 6 +#define SCE_POWERPRO_WORD4 7 +#define SCE_POWERPRO_DOUBLEQUOTEDSTRING 8 +#define SCE_POWERPRO_SINGLEQUOTEDSTRING 9 +#define SCE_POWERPRO_LINECONTINUE 10 +#define SCE_POWERPRO_OPERATOR 11 +#define SCE_POWERPRO_IDENTIFIER 12 +#define SCE_POWERPRO_STRINGEOL 13 +#define SCE_POWERPRO_VERBATIM 14 +#define SCE_POWERPRO_ALTQUOTE 15 +#define SCE_POWERPRO_FUNCTION 16 +#define SCE_SML_DEFAULT 0 +#define SCE_SML_IDENTIFIER 1 +#define SCE_SML_TAGNAME 2 +#define SCE_SML_KEYWORD 3 +#define SCE_SML_KEYWORD2 4 +#define SCE_SML_KEYWORD3 5 +#define SCE_SML_LINENUM 6 +#define SCE_SML_OPERATOR 7 +#define SCE_SML_NUMBER 8 +#define SCE_SML_CHAR 9 +#define SCE_SML_STRING 11 +#define SCE_SML_COMMENT 12 +#define SCE_SML_COMMENT1 13 +#define SCE_SML_COMMENT2 14 +#define SCE_SML_COMMENT3 15 +#define SCE_MARKDOWN_DEFAULT 0 +#define SCE_MARKDOWN_LINE_BEGIN 1 +#define SCE_MARKDOWN_STRONG1 2 +#define SCE_MARKDOWN_STRONG2 3 +#define SCE_MARKDOWN_EM1 4 +#define SCE_MARKDOWN_EM2 5 +#define SCE_MARKDOWN_HEADER1 6 +#define SCE_MARKDOWN_HEADER2 7 +#define SCE_MARKDOWN_HEADER3 8 +#define SCE_MARKDOWN_HEADER4 9 +#define SCE_MARKDOWN_HEADER5 10 +#define SCE_MARKDOWN_HEADER6 11 +#define SCE_MARKDOWN_PRECHAR 12 +#define SCE_MARKDOWN_ULIST_ITEM 13 +#define SCE_MARKDOWN_OLIST_ITEM 14 +#define SCE_MARKDOWN_BLOCKQUOTE 15 +#define SCE_MARKDOWN_STRIKEOUT 16 +#define SCE_MARKDOWN_HRULE 17 +#define SCE_MARKDOWN_LINK 18 +#define SCE_MARKDOWN_CODE 19 +#define SCE_MARKDOWN_CODE2 20 +#define SCE_MARKDOWN_CODEBK 21 +#define SCE_TXT2TAGS_DEFAULT 0 +#define SCE_TXT2TAGS_LINE_BEGIN 1 +#define SCE_TXT2TAGS_STRONG1 2 +#define SCE_TXT2TAGS_STRONG2 3 +#define SCE_TXT2TAGS_EM1 4 +#define SCE_TXT2TAGS_EM2 5 +#define SCE_TXT2TAGS_HEADER1 6 +#define SCE_TXT2TAGS_HEADER2 7 +#define SCE_TXT2TAGS_HEADER3 8 +#define SCE_TXT2TAGS_HEADER4 9 +#define SCE_TXT2TAGS_HEADER5 10 +#define SCE_TXT2TAGS_HEADER6 11 +#define SCE_TXT2TAGS_PRECHAR 12 +#define SCE_TXT2TAGS_ULIST_ITEM 13 +#define SCE_TXT2TAGS_OLIST_ITEM 14 +#define SCE_TXT2TAGS_BLOCKQUOTE 15 +#define SCE_TXT2TAGS_STRIKEOUT 16 +#define SCE_TXT2TAGS_HRULE 17 +#define SCE_TXT2TAGS_LINK 18 +#define SCE_TXT2TAGS_CODE 19 +#define SCE_TXT2TAGS_CODE2 20 +#define SCE_TXT2TAGS_CODEBK 21 +#define SCE_TXT2TAGS_COMMENT 22 +#define SCE_TXT2TAGS_OPTION 23 +#define SCE_TXT2TAGS_PREPROC 24 +#define SCE_TXT2TAGS_POSTPROC 25 +#define SCE_A68K_DEFAULT 0 +#define SCE_A68K_COMMENT 1 +#define SCE_A68K_NUMBER_DEC 2 +#define SCE_A68K_NUMBER_BIN 3 +#define SCE_A68K_NUMBER_HEX 4 +#define SCE_A68K_STRING1 5 +#define SCE_A68K_OPERATOR 6 +#define SCE_A68K_CPUINSTRUCTION 7 +#define SCE_A68K_EXTINSTRUCTION 8 +#define SCE_A68K_REGISTER 9 +#define SCE_A68K_DIRECTIVE 10 +#define SCE_A68K_MACRO_ARG 11 +#define SCE_A68K_LABEL 12 +#define SCE_A68K_STRING2 13 +#define SCE_A68K_IDENTIFIER 14 +#define SCE_A68K_MACRO_DECLARATION 15 +#define SCE_A68K_COMMENT_WORD 16 +#define SCE_A68K_COMMENT_SPECIAL 17 +#define SCE_A68K_COMMENT_DOXYGEN 18 +#define SCE_MODULA_DEFAULT 0 +#define SCE_MODULA_COMMENT 1 +#define SCE_MODULA_DOXYCOMM 2 +#define SCE_MODULA_DOXYKEY 3 +#define SCE_MODULA_KEYWORD 4 +#define SCE_MODULA_RESERVED 5 +#define SCE_MODULA_NUMBER 6 +#define SCE_MODULA_BASENUM 7 +#define SCE_MODULA_FLOAT 8 +#define SCE_MODULA_STRING 9 +#define SCE_MODULA_STRSPEC 10 +#define SCE_MODULA_CHAR 11 +#define SCE_MODULA_CHARSPEC 12 +#define SCE_MODULA_PROC 13 +#define SCE_MODULA_PRAGMA 14 +#define SCE_MODULA_PRGKEY 15 +#define SCE_MODULA_OPERATOR 16 +#define SCE_MODULA_BADSTR 17 +#define SCE_COFFEESCRIPT_DEFAULT 0 +#define SCE_COFFEESCRIPT_COMMENT 1 +#define SCE_COFFEESCRIPT_COMMENTLINE 2 +#define SCE_COFFEESCRIPT_COMMENTDOC 3 +#define SCE_COFFEESCRIPT_NUMBER 4 +#define SCE_COFFEESCRIPT_WORD 5 +#define SCE_COFFEESCRIPT_STRING 6 +#define SCE_COFFEESCRIPT_CHARACTER 7 +#define SCE_COFFEESCRIPT_UUID 8 +#define SCE_COFFEESCRIPT_PREPROCESSOR 9 +#define SCE_COFFEESCRIPT_OPERATOR 10 +#define SCE_COFFEESCRIPT_IDENTIFIER 11 +#define SCE_COFFEESCRIPT_STRINGEOL 12 +#define SCE_COFFEESCRIPT_VERBATIM 13 +#define SCE_COFFEESCRIPT_REGEX 14 +#define SCE_COFFEESCRIPT_COMMENTLINEDOC 15 +#define SCE_COFFEESCRIPT_WORD2 16 +#define SCE_COFFEESCRIPT_COMMENTDOCKEYWORD 17 +#define SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR 18 +#define SCE_COFFEESCRIPT_GLOBALCLASS 19 +#define SCE_COFFEESCRIPT_STRINGRAW 20 +#define SCE_COFFEESCRIPT_TRIPLEVERBATIM 21 +#define SCE_COFFEESCRIPT_COMMENTBLOCK 22 +#define SCE_COFFEESCRIPT_VERBOSE_REGEX 23 +#define SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT 24 +#define SCE_COFFEESCRIPT_INSTANCEPROPERTY 25 +#define SCE_AVS_DEFAULT 0 +#define SCE_AVS_COMMENTBLOCK 1 +#define SCE_AVS_COMMENTBLOCKN 2 +#define SCE_AVS_COMMENTLINE 3 +#define SCE_AVS_NUMBER 4 +#define SCE_AVS_OPERATOR 5 +#define SCE_AVS_IDENTIFIER 6 +#define SCE_AVS_STRING 7 +#define SCE_AVS_TRIPLESTRING 8 +#define SCE_AVS_KEYWORD 9 +#define SCE_AVS_FILTER 10 +#define SCE_AVS_PLUGIN 11 +#define SCE_AVS_FUNCTION 12 +#define SCE_AVS_CLIPPROP 13 +#define SCE_AVS_USERDFN 14 +#define SCE_ECL_DEFAULT 0 +#define SCE_ECL_COMMENT 1 +#define SCE_ECL_COMMENTLINE 2 +#define SCE_ECL_NUMBER 3 +#define SCE_ECL_STRING 4 +#define SCE_ECL_WORD0 5 +#define SCE_ECL_OPERATOR 6 +#define SCE_ECL_CHARACTER 7 +#define SCE_ECL_UUID 8 +#define SCE_ECL_PREPROCESSOR 9 +#define SCE_ECL_UNKNOWN 10 +#define SCE_ECL_IDENTIFIER 11 +#define SCE_ECL_STRINGEOL 12 +#define SCE_ECL_VERBATIM 13 +#define SCE_ECL_REGEX 14 +#define SCE_ECL_COMMENTLINEDOC 15 +#define SCE_ECL_WORD1 16 +#define SCE_ECL_COMMENTDOCKEYWORD 17 +#define SCE_ECL_COMMENTDOCKEYWORDERROR 18 +#define SCE_ECL_WORD2 19 +#define SCE_ECL_WORD3 20 +#define SCE_ECL_WORD4 21 +#define SCE_ECL_WORD5 22 +#define SCE_ECL_COMMENTDOC 23 +#define SCE_ECL_ADDED 24 +#define SCE_ECL_DELETED 25 +#define SCE_ECL_CHANGED 26 +#define SCE_ECL_MOVED 27 +#define SCE_OSCRIPT_DEFAULT 0 +#define SCE_OSCRIPT_LINE_COMMENT 1 +#define SCE_OSCRIPT_BLOCK_COMMENT 2 +#define SCE_OSCRIPT_DOC_COMMENT 3 +#define SCE_OSCRIPT_PREPROCESSOR 4 +#define SCE_OSCRIPT_NUMBER 5 +#define SCE_OSCRIPT_SINGLEQUOTE_STRING 6 +#define SCE_OSCRIPT_DOUBLEQUOTE_STRING 7 +#define SCE_OSCRIPT_CONSTANT 8 +#define SCE_OSCRIPT_IDENTIFIER 9 +#define SCE_OSCRIPT_GLOBAL 10 +#define SCE_OSCRIPT_KEYWORD 11 +#define SCE_OSCRIPT_OPERATOR 12 +#define SCE_OSCRIPT_LABEL 13 +#define SCE_OSCRIPT_TYPE 14 +#define SCE_OSCRIPT_FUNCTION 15 +#define SCE_OSCRIPT_OBJECT 16 +#define SCE_OSCRIPT_PROPERTY 17 +#define SCE_OSCRIPT_METHOD 18 +#define SCE_VISUALPROLOG_DEFAULT 0 +#define SCE_VISUALPROLOG_KEY_MAJOR 1 +#define SCE_VISUALPROLOG_KEY_MINOR 2 +#define SCE_VISUALPROLOG_KEY_DIRECTIVE 3 +#define SCE_VISUALPROLOG_COMMENT_BLOCK 4 +#define SCE_VISUALPROLOG_COMMENT_LINE 5 +#define SCE_VISUALPROLOG_COMMENT_KEY 6 +#define SCE_VISUALPROLOG_COMMENT_KEY_ERROR 7 +#define SCE_VISUALPROLOG_IDENTIFIER 8 +#define SCE_VISUALPROLOG_VARIABLE 9 +#define SCE_VISUALPROLOG_ANONYMOUS 10 +#define SCE_VISUALPROLOG_NUMBER 11 +#define SCE_VISUALPROLOG_OPERATOR 12 +#define SCE_VISUALPROLOG_CHARACTER 13 +#define SCE_VISUALPROLOG_CHARACTER_TOO_MANY 14 +#define SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR 15 +#define SCE_VISUALPROLOG_STRING 16 +#define SCE_VISUALPROLOG_STRING_ESCAPE 17 +#define SCE_VISUALPROLOG_STRING_ESCAPE_ERROR 18 +#define SCE_VISUALPROLOG_STRING_EOL_OPEN 19 +#define SCE_VISUALPROLOG_STRING_VERBATIM 20 +#define SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL 21 +#define SCE_VISUALPROLOG_STRING_VERBATIM_EOL 22 +#define SCE_STTXT_DEFAULT 0 +#define SCE_STTXT_COMMENT 1 +#define SCE_STTXT_COMMENTLINE 2 +#define SCE_STTXT_KEYWORD 3 +#define SCE_STTXT_TYPE 4 +#define SCE_STTXT_FUNCTION 5 +#define SCE_STTXT_FB 6 +#define SCE_STTXT_NUMBER 7 +#define SCE_STTXT_HEXNUMBER 8 +#define SCE_STTXT_PRAGMA 9 +#define SCE_STTXT_OPERATOR 10 +#define SCE_STTXT_CHARACTER 11 +#define SCE_STTXT_STRING1 12 +#define SCE_STTXT_STRING2 13 +#define SCE_STTXT_STRINGEOL 14 +#define SCE_STTXT_IDENTIFIER 15 +#define SCE_STTXT_DATETIME 16 +#define SCE_STTXT_VARS 17 +#define SCE_STTXT_PRAGMAS 18 +#define SCE_KVIRC_DEFAULT 0 +#define SCE_KVIRC_COMMENT 1 +#define SCE_KVIRC_COMMENTBLOCK 2 +#define SCE_KVIRC_STRING 3 +#define SCE_KVIRC_WORD 4 +#define SCE_KVIRC_KEYWORD 5 +#define SCE_KVIRC_FUNCTION_KEYWORD 6 +#define SCE_KVIRC_FUNCTION 7 +#define SCE_KVIRC_VARIABLE 8 +#define SCE_KVIRC_NUMBER 9 +#define SCE_KVIRC_OPERATOR 10 +#define SCE_KVIRC_STRING_FUNCTION 11 +#define SCE_KVIRC_STRING_VARIABLE 12 +#define SCE_RUST_DEFAULT 0 +#define SCE_RUST_COMMENTBLOCK 1 +#define SCE_RUST_COMMENTLINE 2 +#define SCE_RUST_COMMENTBLOCKDOC 3 +#define SCE_RUST_COMMENTLINEDOC 4 +#define SCE_RUST_NUMBER 5 +#define SCE_RUST_WORD 6 +#define SCE_RUST_WORD2 7 +#define SCE_RUST_WORD3 8 +#define SCE_RUST_WORD4 9 +#define SCE_RUST_WORD5 10 +#define SCE_RUST_WORD6 11 +#define SCE_RUST_WORD7 12 +#define SCE_RUST_STRING 13 +#define SCE_RUST_STRINGR 14 +#define SCE_RUST_CHARACTER 15 +#define SCE_RUST_OPERATOR 16 +#define SCE_RUST_IDENTIFIER 17 +#define SCE_RUST_LIFETIME 18 +#define SCE_RUST_MACRO 19 +#define SCE_RUST_LEXERROR 20 +#define SCE_RUST_BYTESTRING 21 +#define SCE_RUST_BYTESTRINGR 22 +#define SCE_RUST_BYTECHARACTER 23 +#define SCE_DMAP_DEFAULT 0 +#define SCE_DMAP_COMMENT 1 +#define SCE_DMAP_NUMBER 2 +#define SCE_DMAP_STRING1 3 +#define SCE_DMAP_STRING2 4 +#define SCE_DMAP_STRINGEOL 5 +#define SCE_DMAP_OPERATOR 6 +#define SCE_DMAP_IDENTIFIER 7 +#define SCE_DMAP_WORD 8 +#define SCE_DMAP_WORD2 9 +#define SCE_DMAP_WORD3 10 +#define SCE_DMIS_DEFAULT 0 +#define SCE_DMIS_COMMENT 1 +#define SCE_DMIS_STRING 2 +#define SCE_DMIS_NUMBER 3 +#define SCE_DMIS_KEYWORD 4 +#define SCE_DMIS_MAJORWORD 5 +#define SCE_DMIS_MINORWORD 6 +#define SCE_DMIS_UNSUPPORTED_MAJOR 7 +#define SCE_DMIS_UNSUPPORTED_MINOR 8 +#define SCE_DMIS_LABEL 9 +#define SCE_REG_DEFAULT 0 +#define SCE_REG_COMMENT 1 +#define SCE_REG_VALUENAME 2 +#define SCE_REG_STRING 3 +#define SCE_REG_HEXDIGIT 4 +#define SCE_REG_VALUETYPE 5 +#define SCE_REG_ADDEDKEY 6 +#define SCE_REG_DELETEDKEY 7 +#define SCE_REG_ESCAPED 8 +#define SCE_REG_KEYPATH_GUID 9 +#define SCE_REG_STRING_GUID 10 +#define SCE_REG_PARAMETER 11 +#define SCE_REG_OPERATOR 12 +#define SCE_BIBTEX_DEFAULT 0 +#define SCE_BIBTEX_ENTRY 1 +#define SCE_BIBTEX_UNKNOWN_ENTRY 2 +#define SCE_BIBTEX_KEY 3 +#define SCE_BIBTEX_PARAMETER 4 +#define SCE_BIBTEX_VALUE 5 +#define SCE_BIBTEX_COMMENT 6 +#define SCE_HEX_DEFAULT 0 +#define SCE_HEX_RECSTART 1 +#define SCE_HEX_RECTYPE 2 +#define SCE_HEX_RECTYPE_UNKNOWN 3 +#define SCE_HEX_BYTECOUNT 4 +#define SCE_HEX_BYTECOUNT_WRONG 5 +#define SCE_HEX_NOADDRESS 6 +#define SCE_HEX_DATAADDRESS 7 +#define SCE_HEX_RECCOUNT 8 +#define SCE_HEX_STARTADDRESS 9 +#define SCE_HEX_ADDRESSFIELD_UNKNOWN 10 +#define SCE_HEX_EXTENDEDADDRESS 11 +#define SCE_HEX_DATA_ODD 12 +#define SCE_HEX_DATA_EVEN 13 +#define SCE_HEX_DATA_UNKNOWN 14 +#define SCE_HEX_DATA_EMPTY 15 +#define SCE_HEX_CHECKSUM 16 +#define SCE_HEX_CHECKSUM_WRONG 17 +#define SCE_HEX_GARBAGE 18 +#define SCE_JSON_DEFAULT 0 +#define SCE_JSON_NUMBER 1 +#define SCE_JSON_STRING 2 +#define SCE_JSON_STRINGEOL 3 +#define SCE_JSON_PROPERTYNAME 4 +#define SCE_JSON_ESCAPESEQUENCE 5 +#define SCE_JSON_LINECOMMENT 6 +#define SCE_JSON_BLOCKCOMMENT 7 +#define SCE_JSON_OPERATOR 8 +#define SCE_JSON_URI 9 +#define SCE_JSON_COMPACTIRI 10 +#define SCE_JSON_KEYWORD 11 +#define SCE_JSON_LDKEYWORD 12 +#define SCE_JSON_ERROR 13 +#define SCE_EDI_DEFAULT 0 +#define SCE_EDI_SEGMENTSTART 1 +#define SCE_EDI_SEGMENTEND 2 +#define SCE_EDI_SEP_ELEMENT 3 +#define SCE_EDI_SEP_COMPOSITE 4 +#define SCE_EDI_SEP_RELEASE 5 +#define SCE_EDI_UNA 6 +#define SCE_EDI_UNH 7 +#define SCE_EDI_BADSEGMENT 8 +#define SCE_STATA_DEFAULT 0 +#define SCE_STATA_COMMENT 1 +#define SCE_STATA_COMMENTLINE 2 +#define SCE_STATA_COMMENTBLOCK 3 +#define SCE_STATA_NUMBER 4 +#define SCE_STATA_OPERATOR 5 +#define SCE_STATA_IDENTIFIER 6 +#define SCE_STATA_STRING 7 +#define SCE_STATA_TYPE 8 +#define SCE_STATA_WORD 9 +#define SCE_STATA_GLOBAL_MACRO 10 +#define SCE_STATA_MACRO 11 +#define SCE_SAS_DEFAULT 0 +#define SCE_SAS_COMMENT 1 +#define SCE_SAS_COMMENTLINE 2 +#define SCE_SAS_COMMENTBLOCK 3 +#define SCE_SAS_NUMBER 4 +#define SCE_SAS_OPERATOR 5 +#define SCE_SAS_IDENTIFIER 6 +#define SCE_SAS_STRING 7 +#define SCE_SAS_TYPE 8 +#define SCE_SAS_WORD 9 +#define SCE_SAS_GLOBAL_MACRO 10 +#define SCE_SAS_MACRO 11 +#define SCE_SAS_MACRO_KEYWORD 12 +#define SCE_SAS_BLOCK_KEYWORD 13 +#define SCE_SAS_MACRO_FUNCTION 14 +#define SCE_SAS_STATEMENT 15 +/* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + +#endif diff --git a/libs/qscintilla_2.14.1/scintilla/include/Sci_Position.h b/libs/qscintilla_2.14.1/scintilla/include/Sci_Position.h new file mode 100644 index 000000000..abd0f3408 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/Sci_Position.h @@ -0,0 +1,29 @@ +// Scintilla source code edit control +/** @file Sci_Position.h + ** Define the Sci_Position type used in Scintilla's external interfaces. + ** These need to be available to clients written in C so are not in a C++ namespace. + **/ +// Copyright 2015 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SCI_POSITION_H +#define SCI_POSITION_H + +#include + +// Basic signed type used throughout interface +typedef ptrdiff_t Sci_Position; + +// Unsigned variant used for ILexer::Lex and ILexer::Fold +typedef size_t Sci_PositionU; + +// For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE +typedef long Sci_PositionCR; + +#ifdef _WIN32 + #define SCI_METHOD __stdcall +#else + #define SCI_METHOD +#endif + +#endif diff --git a/libs/qscintilla_2.14.1/scintilla/include/Scintilla.h b/libs/qscintilla_2.14.1/scintilla/include/Scintilla.h new file mode 100644 index 000000000..298103cea --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/Scintilla.h @@ -0,0 +1,1239 @@ +/* Scintilla source code edit control */ +/** @file Scintilla.h + ** Interface to the edit control. + **/ +/* Copyright 1998-2003 by Neil Hodgson + * The License.txt file describes the conditions under which this software may be distributed. */ + +/* Most of this file is automatically generated from the Scintilla.iface interface definition + * file which contains any comments about the definitions. HFacer.py does the generation. */ + +#ifndef SCINTILLA_H +#define SCINTILLA_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_WIN32) +/* Return false on failure: */ +int Scintilla_RegisterClasses(void *hInstance); +int Scintilla_ReleaseResources(void); +#endif +int Scintilla_LinkLexers(void); + +#ifdef __cplusplus +} +#endif + +// Include header that defines basic numeric types. +#include + +// Define uptr_t, an unsigned integer type large enough to hold a pointer. +typedef uintptr_t uptr_t; +// Define sptr_t, a signed integer large enough to hold a pointer. +typedef intptr_t sptr_t; + +#include "Sci_Position.h" + +typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); + +/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ +#define INVALID_POSITION -1 +#define SCI_START 2000 +#define SCI_OPTIONAL_START 3000 +#define SCI_LEXER_START 4000 +#define SCI_ADDTEXT 2001 +#define SCI_ADDSTYLEDTEXT 2002 +#define SCI_INSERTTEXT 2003 +#define SCI_CHANGEINSERTION 2672 +#define SCI_CLEARALL 2004 +#define SCI_DELETERANGE 2645 +#define SCI_CLEARDOCUMENTSTYLE 2005 +#define SCI_GETLENGTH 2006 +#define SCI_GETCHARAT 2007 +#define SCI_GETCURRENTPOS 2008 +#define SCI_GETANCHOR 2009 +#define SCI_GETSTYLEAT 2010 +#define SCI_REDO 2011 +#define SCI_SETUNDOCOLLECTION 2012 +#define SCI_SELECTALL 2013 +#define SCI_SETSAVEPOINT 2014 +#define SCI_GETSTYLEDTEXT 2015 +#define SCI_CANREDO 2016 +#define SCI_MARKERLINEFROMHANDLE 2017 +#define SCI_MARKERDELETEHANDLE 2018 +#define SCI_GETUNDOCOLLECTION 2019 +#define SCWS_INVISIBLE 0 +#define SCWS_VISIBLEALWAYS 1 +#define SCWS_VISIBLEAFTERINDENT 2 +#define SCWS_VISIBLEONLYININDENT 3 +#define SCI_GETVIEWWS 2020 +#define SCI_SETVIEWWS 2021 +#define SCTD_LONGARROW 0 +#define SCTD_STRIKEOUT 1 +#define SCI_GETTABDRAWMODE 2698 +#define SCI_SETTABDRAWMODE 2699 +#define SCI_POSITIONFROMPOINT 2022 +#define SCI_POSITIONFROMPOINTCLOSE 2023 +#define SCI_GOTOLINE 2024 +#define SCI_GOTOPOS 2025 +#define SCI_SETANCHOR 2026 +#define SCI_GETCURLINE 2027 +#define SCI_GETENDSTYLED 2028 +#define SC_EOL_CRLF 0 +#define SC_EOL_CR 1 +#define SC_EOL_LF 2 +#define SCI_CONVERTEOLS 2029 +#define SCI_GETEOLMODE 2030 +#define SCI_SETEOLMODE 2031 +#define SCI_STARTSTYLING 2032 +#define SCI_SETSTYLING 2033 +#define SCI_GETBUFFEREDDRAW 2034 +#define SCI_SETBUFFEREDDRAW 2035 +#define SCI_SETTABWIDTH 2036 +#define SCI_GETTABWIDTH 2121 +#define SCI_CLEARTABSTOPS 2675 +#define SCI_ADDTABSTOP 2676 +#define SCI_GETNEXTTABSTOP 2677 +#define SC_CP_UTF8 65001 +#define SCI_SETCODEPAGE 2037 +#define SC_IME_WINDOWED 0 +#define SC_IME_INLINE 1 +#define SCI_GETIMEINTERACTION 2678 +#define SCI_SETIMEINTERACTION 2679 +#define MARKER_MAX 31 +#define SC_MARK_CIRCLE 0 +#define SC_MARK_ROUNDRECT 1 +#define SC_MARK_ARROW 2 +#define SC_MARK_SMALLRECT 3 +#define SC_MARK_SHORTARROW 4 +#define SC_MARK_EMPTY 5 +#define SC_MARK_ARROWDOWN 6 +#define SC_MARK_MINUS 7 +#define SC_MARK_PLUS 8 +#define SC_MARK_VLINE 9 +#define SC_MARK_LCORNER 10 +#define SC_MARK_TCORNER 11 +#define SC_MARK_BOXPLUS 12 +#define SC_MARK_BOXPLUSCONNECTED 13 +#define SC_MARK_BOXMINUS 14 +#define SC_MARK_BOXMINUSCONNECTED 15 +#define SC_MARK_LCORNERCURVE 16 +#define SC_MARK_TCORNERCURVE 17 +#define SC_MARK_CIRCLEPLUS 18 +#define SC_MARK_CIRCLEPLUSCONNECTED 19 +#define SC_MARK_CIRCLEMINUS 20 +#define SC_MARK_CIRCLEMINUSCONNECTED 21 +#define SC_MARK_BACKGROUND 22 +#define SC_MARK_DOTDOTDOT 23 +#define SC_MARK_ARROWS 24 +#define SC_MARK_PIXMAP 25 +#define SC_MARK_FULLRECT 26 +#define SC_MARK_LEFTRECT 27 +#define SC_MARK_AVAILABLE 28 +#define SC_MARK_UNDERLINE 29 +#define SC_MARK_RGBAIMAGE 30 +#define SC_MARK_BOOKMARK 31 +#define SC_MARK_CHARACTER 10000 +#define SC_MARKNUM_FOLDEREND 25 +#define SC_MARKNUM_FOLDEROPENMID 26 +#define SC_MARKNUM_FOLDERMIDTAIL 27 +#define SC_MARKNUM_FOLDERTAIL 28 +#define SC_MARKNUM_FOLDERSUB 29 +#define SC_MARKNUM_FOLDER 30 +#define SC_MARKNUM_FOLDEROPEN 31 +#define SC_MASK_FOLDERS 0xFE000000 +#define SCI_MARKERDEFINE 2040 +#define SCI_MARKERSETFORE 2041 +#define SCI_MARKERSETBACK 2042 +#define SCI_MARKERSETBACKSELECTED 2292 +#define SCI_MARKERENABLEHIGHLIGHT 2293 +#define SCI_MARKERADD 2043 +#define SCI_MARKERDELETE 2044 +#define SCI_MARKERDELETEALL 2045 +#define SCI_MARKERGET 2046 +#define SCI_MARKERNEXT 2047 +#define SCI_MARKERPREVIOUS 2048 +#define SCI_MARKERDEFINEPIXMAP 2049 +#define SCI_MARKERADDSET 2466 +#define SCI_MARKERSETALPHA 2476 +#define SC_MAX_MARGIN 4 +#define SC_MARGIN_SYMBOL 0 +#define SC_MARGIN_NUMBER 1 +#define SC_MARGIN_BACK 2 +#define SC_MARGIN_FORE 3 +#define SC_MARGIN_TEXT 4 +#define SC_MARGIN_RTEXT 5 +#define SC_MARGIN_COLOUR 6 +#define SCI_SETMARGINTYPEN 2240 +#define SCI_GETMARGINTYPEN 2241 +#define SCI_SETMARGINWIDTHN 2242 +#define SCI_GETMARGINWIDTHN 2243 +#define SCI_SETMARGINMASKN 2244 +#define SCI_GETMARGINMASKN 2245 +#define SCI_SETMARGINSENSITIVEN 2246 +#define SCI_GETMARGINSENSITIVEN 2247 +#define SCI_SETMARGINCURSORN 2248 +#define SCI_GETMARGINCURSORN 2249 +#define SCI_SETMARGINBACKN 2250 +#define SCI_GETMARGINBACKN 2251 +#define SCI_SETMARGINS 2252 +#define SCI_GETMARGINS 2253 +#define STYLE_DEFAULT 32 +#define STYLE_LINENUMBER 33 +#define STYLE_BRACELIGHT 34 +#define STYLE_BRACEBAD 35 +#define STYLE_CONTROLCHAR 36 +#define STYLE_INDENTGUIDE 37 +#define STYLE_CALLTIP 38 +#define STYLE_FOLDDISPLAYTEXT 39 +#define STYLE_LASTPREDEFINED 39 +#define STYLE_MAX 255 +#define SC_CHARSET_ANSI 0 +#define SC_CHARSET_DEFAULT 1 +#define SC_CHARSET_BALTIC 186 +#define SC_CHARSET_CHINESEBIG5 136 +#define SC_CHARSET_EASTEUROPE 238 +#define SC_CHARSET_GB2312 134 +#define SC_CHARSET_GREEK 161 +#define SC_CHARSET_HANGUL 129 +#define SC_CHARSET_MAC 77 +#define SC_CHARSET_OEM 255 +#define SC_CHARSET_RUSSIAN 204 +#define SC_CHARSET_OEM866 866 +#define SC_CHARSET_CYRILLIC 1251 +#define SC_CHARSET_SHIFTJIS 128 +#define SC_CHARSET_SYMBOL 2 +#define SC_CHARSET_TURKISH 162 +#define SC_CHARSET_JOHAB 130 +#define SC_CHARSET_HEBREW 177 +#define SC_CHARSET_ARABIC 178 +#define SC_CHARSET_VIETNAMESE 163 +#define SC_CHARSET_THAI 222 +#define SC_CHARSET_8859_15 1000 +#define SCI_STYLECLEARALL 2050 +#define SCI_STYLESETFORE 2051 +#define SCI_STYLESETBACK 2052 +#define SCI_STYLESETBOLD 2053 +#define SCI_STYLESETITALIC 2054 +#define SCI_STYLESETSIZE 2055 +#define SCI_STYLESETFONT 2056 +#define SCI_STYLESETEOLFILLED 2057 +#define SCI_STYLERESETDEFAULT 2058 +#define SCI_STYLESETUNDERLINE 2059 +#define SC_CASE_MIXED 0 +#define SC_CASE_UPPER 1 +#define SC_CASE_LOWER 2 +#define SC_CASE_CAMEL 3 +#define SCI_STYLEGETFORE 2481 +#define SCI_STYLEGETBACK 2482 +#define SCI_STYLEGETBOLD 2483 +#define SCI_STYLEGETITALIC 2484 +#define SCI_STYLEGETSIZE 2485 +#define SCI_STYLEGETFONT 2486 +#define SCI_STYLEGETEOLFILLED 2487 +#define SCI_STYLEGETUNDERLINE 2488 +#define SCI_STYLEGETCASE 2489 +#define SCI_STYLEGETCHARACTERSET 2490 +#define SCI_STYLEGETVISIBLE 2491 +#define SCI_STYLEGETCHANGEABLE 2492 +#define SCI_STYLEGETHOTSPOT 2493 +#define SCI_STYLESETCASE 2060 +#define SC_FONT_SIZE_MULTIPLIER 100 +#define SCI_STYLESETSIZEFRACTIONAL 2061 +#define SCI_STYLEGETSIZEFRACTIONAL 2062 +#define SC_WEIGHT_NORMAL 400 +#define SC_WEIGHT_SEMIBOLD 600 +#define SC_WEIGHT_BOLD 700 +#define SCI_STYLESETWEIGHT 2063 +#define SCI_STYLEGETWEIGHT 2064 +#define SCI_STYLESETCHARACTERSET 2066 +#define SCI_STYLESETHOTSPOT 2409 +#define SCI_SETSELFORE 2067 +#define SCI_SETSELBACK 2068 +#define SCI_GETSELALPHA 2477 +#define SCI_SETSELALPHA 2478 +#define SCI_GETSELEOLFILLED 2479 +#define SCI_SETSELEOLFILLED 2480 +#define SCI_SETCARETFORE 2069 +#define SCI_ASSIGNCMDKEY 2070 +#define SCI_CLEARCMDKEY 2071 +#define SCI_CLEARALLCMDKEYS 2072 +#define SCI_SETSTYLINGEX 2073 +#define SCI_STYLESETVISIBLE 2074 +#define SCI_GETCARETPERIOD 2075 +#define SCI_SETCARETPERIOD 2076 +#define SCI_SETWORDCHARS 2077 +#define SCI_GETWORDCHARS 2646 +#define SCI_BEGINUNDOACTION 2078 +#define SCI_ENDUNDOACTION 2079 +#define INDIC_PLAIN 0 +#define INDIC_SQUIGGLE 1 +#define INDIC_TT 2 +#define INDIC_DIAGONAL 3 +#define INDIC_STRIKE 4 +#define INDIC_HIDDEN 5 +#define INDIC_BOX 6 +#define INDIC_ROUNDBOX 7 +#define INDIC_STRAIGHTBOX 8 +#define INDIC_DASH 9 +#define INDIC_DOTS 10 +#define INDIC_SQUIGGLELOW 11 +#define INDIC_DOTBOX 12 +#define INDIC_SQUIGGLEPIXMAP 13 +#define INDIC_COMPOSITIONTHICK 14 +#define INDIC_COMPOSITIONTHIN 15 +#define INDIC_FULLBOX 16 +#define INDIC_TEXTFORE 17 +#define INDIC_POINT 18 +#define INDIC_POINTCHARACTER 19 +#define INDIC_GRADIENT 20 +#define INDIC_GRADIENTCENTRE 21 +#define INDIC_IME 32 +#define INDIC_IME_MAX 35 +#define INDIC_MAX 35 +#define INDIC_CONTAINER 8 +#define INDIC0_MASK 0x20 +#define INDIC1_MASK 0x40 +#define INDIC2_MASK 0x80 +#define INDICS_MASK 0xE0 +#define SCI_INDICSETSTYLE 2080 +#define SCI_INDICGETSTYLE 2081 +#define SCI_INDICSETFORE 2082 +#define SCI_INDICGETFORE 2083 +#define SCI_INDICSETUNDER 2510 +#define SCI_INDICGETUNDER 2511 +#define SCI_INDICSETHOVERSTYLE 2680 +#define SCI_INDICGETHOVERSTYLE 2681 +#define SCI_INDICSETHOVERFORE 2682 +#define SCI_INDICGETHOVERFORE 2683 +#define SC_INDICVALUEBIT 0x1000000 +#define SC_INDICVALUEMASK 0xFFFFFF +#define SC_INDICFLAG_VALUEFORE 1 +#define SCI_INDICSETFLAGS 2684 +#define SCI_INDICGETFLAGS 2685 +#define SCI_SETWHITESPACEFORE 2084 +#define SCI_SETWHITESPACEBACK 2085 +#define SCI_SETWHITESPACESIZE 2086 +#define SCI_GETWHITESPACESIZE 2087 +#define SCI_SETLINESTATE 2092 +#define SCI_GETLINESTATE 2093 +#define SCI_GETMAXLINESTATE 2094 +#define SCI_GETCARETLINEVISIBLE 2095 +#define SCI_SETCARETLINEVISIBLE 2096 +#define SCI_GETCARETLINEBACK 2097 +#define SCI_SETCARETLINEBACK 2098 +#define SCI_GETCARETLINEFRAME 2704 +#define SCI_SETCARETLINEFRAME 2705 +#define SCI_STYLESETCHANGEABLE 2099 +#define SCI_AUTOCSHOW 2100 +#define SCI_AUTOCCANCEL 2101 +#define SCI_AUTOCACTIVE 2102 +#define SCI_AUTOCPOSSTART 2103 +#define SCI_AUTOCCOMPLETE 2104 +#define SCI_AUTOCSTOPS 2105 +#define SCI_AUTOCSETSEPARATOR 2106 +#define SCI_AUTOCGETSEPARATOR 2107 +#define SCI_AUTOCSELECT 2108 +#define SCI_AUTOCSETCANCELATSTART 2110 +#define SCI_AUTOCGETCANCELATSTART 2111 +#define SCI_AUTOCSETFILLUPS 2112 +#define SCI_AUTOCSETCHOOSESINGLE 2113 +#define SCI_AUTOCGETCHOOSESINGLE 2114 +#define SCI_AUTOCSETIGNORECASE 2115 +#define SCI_AUTOCGETIGNORECASE 2116 +#define SCI_USERLISTSHOW 2117 +#define SCI_AUTOCSETAUTOHIDE 2118 +#define SCI_AUTOCGETAUTOHIDE 2119 +#define SCI_AUTOCSETDROPRESTOFWORD 2270 +#define SCI_AUTOCGETDROPRESTOFWORD 2271 +#define SCI_REGISTERIMAGE 2405 +#define SCI_CLEARREGISTEREDIMAGES 2408 +#define SCI_AUTOCGETTYPESEPARATOR 2285 +#define SCI_AUTOCSETTYPESEPARATOR 2286 +#define SCI_AUTOCSETMAXWIDTH 2208 +#define SCI_AUTOCGETMAXWIDTH 2209 +#define SCI_AUTOCSETMAXHEIGHT 2210 +#define SCI_AUTOCGETMAXHEIGHT 2211 +#define SCI_SETINDENT 2122 +#define SCI_GETINDENT 2123 +#define SCI_SETUSETABS 2124 +#define SCI_GETUSETABS 2125 +#define SCI_SETLINEINDENTATION 2126 +#define SCI_GETLINEINDENTATION 2127 +#define SCI_GETLINEINDENTPOSITION 2128 +#define SCI_GETCOLUMN 2129 +#define SCI_COUNTCHARACTERS 2633 +#define SCI_COUNTCODEUNITS 2715 +#define SCI_SETHSCROLLBAR 2130 +#define SCI_GETHSCROLLBAR 2131 +#define SC_IV_NONE 0 +#define SC_IV_REAL 1 +#define SC_IV_LOOKFORWARD 2 +#define SC_IV_LOOKBOTH 3 +#define SCI_SETINDENTATIONGUIDES 2132 +#define SCI_GETINDENTATIONGUIDES 2133 +#define SCI_SETHIGHLIGHTGUIDE 2134 +#define SCI_GETHIGHLIGHTGUIDE 2135 +#define SCI_GETLINEENDPOSITION 2136 +#define SCI_GETCODEPAGE 2137 +#define SCI_GETCARETFORE 2138 +#define SCI_GETREADONLY 2140 +#define SCI_SETCURRENTPOS 2141 +#define SCI_SETSELECTIONSTART 2142 +#define SCI_GETSELECTIONSTART 2143 +#define SCI_SETSELECTIONEND 2144 +#define SCI_GETSELECTIONEND 2145 +#define SCI_SETEMPTYSELECTION 2556 +#define SCI_SETPRINTMAGNIFICATION 2146 +#define SCI_GETPRINTMAGNIFICATION 2147 +#define SC_PRINT_NORMAL 0 +#define SC_PRINT_INVERTLIGHT 1 +#define SC_PRINT_BLACKONWHITE 2 +#define SC_PRINT_COLOURONWHITE 3 +#define SC_PRINT_COLOURONWHITEDEFAULTBG 4 +#define SC_PRINT_SCREENCOLOURS 5 +#define SCI_SETPRINTCOLOURMODE 2148 +#define SCI_GETPRINTCOLOURMODE 2149 +#define SCFIND_WHOLEWORD 0x2 +#define SCFIND_MATCHCASE 0x4 +#define SCFIND_WORDSTART 0x00100000 +#define SCFIND_REGEXP 0x00200000 +#define SCFIND_POSIX 0x00400000 +#define SCFIND_CXX11REGEX 0x00800000 +#define SCI_FINDTEXT 2150 +#define SCI_FORMATRANGE 2151 +#define SCI_GETFIRSTVISIBLELINE 2152 +#define SCI_GETLINE 2153 +#define SCI_GETLINECOUNT 2154 +#define SCI_SETMARGINLEFT 2155 +#define SCI_GETMARGINLEFT 2156 +#define SCI_SETMARGINRIGHT 2157 +#define SCI_GETMARGINRIGHT 2158 +#define SCI_GETMODIFY 2159 +#define SCI_SETSEL 2160 +#define SCI_GETSELTEXT 2161 +#define SCI_GETTEXTRANGE 2162 +#define SCI_HIDESELECTION 2163 +#define SCI_POINTXFROMPOSITION 2164 +#define SCI_POINTYFROMPOSITION 2165 +#define SCI_LINEFROMPOSITION 2166 +#define SCI_POSITIONFROMLINE 2167 +#define SCI_LINESCROLL 2168 +#define SCI_SCROLLCARET 2169 +#define SCI_SCROLLRANGE 2569 +#define SCI_REPLACESEL 2170 +#define SCI_SETREADONLY 2171 +#define SCI_NULL 2172 +#define SCI_CANPASTE 2173 +#define SCI_CANUNDO 2174 +#define SCI_EMPTYUNDOBUFFER 2175 +#define SCI_UNDO 2176 +#define SCI_CUT 2177 +#define SCI_COPY 2178 +#define SCI_PASTE 2179 +#define SCI_CLEAR 2180 +#define SCI_SETTEXT 2181 +#define SCI_GETTEXT 2182 +#define SCI_GETTEXTLENGTH 2183 +#define SCI_GETDIRECTFUNCTION 2184 +#define SCI_GETDIRECTPOINTER 2185 +#define SCI_SETOVERTYPE 2186 +#define SCI_GETOVERTYPE 2187 +#define SCI_SETCARETWIDTH 2188 +#define SCI_GETCARETWIDTH 2189 +#define SCI_SETTARGETSTART 2190 +#define SCI_GETTARGETSTART 2191 +#define SCI_SETTARGETEND 2192 +#define SCI_GETTARGETEND 2193 +#define SCI_SETTARGETRANGE 2686 +#define SCI_GETTARGETTEXT 2687 +#define SCI_TARGETFROMSELECTION 2287 +#define SCI_TARGETWHOLEDOCUMENT 2690 +#define SCI_REPLACETARGET 2194 +#define SCI_REPLACETARGETRE 2195 +#define SCI_SEARCHINTARGET 2197 +#define SCI_SETSEARCHFLAGS 2198 +#define SCI_GETSEARCHFLAGS 2199 +#define SCI_CALLTIPSHOW 2200 +#define SCI_CALLTIPCANCEL 2201 +#define SCI_CALLTIPACTIVE 2202 +#define SCI_CALLTIPPOSSTART 2203 +#define SCI_CALLTIPSETPOSSTART 2214 +#define SCI_CALLTIPSETHLT 2204 +#define SCI_CALLTIPSETBACK 2205 +#define SCI_CALLTIPSETFORE 2206 +#define SCI_CALLTIPSETFOREHLT 2207 +#define SCI_CALLTIPUSESTYLE 2212 +#define SCI_CALLTIPSETPOSITION 2213 +#define SCI_VISIBLEFROMDOCLINE 2220 +#define SCI_DOCLINEFROMVISIBLE 2221 +#define SCI_WRAPCOUNT 2235 +#define SC_FOLDLEVELBASE 0x400 +#define SC_FOLDLEVELWHITEFLAG 0x1000 +#define SC_FOLDLEVELHEADERFLAG 0x2000 +#define SC_FOLDLEVELNUMBERMASK 0x0FFF +#define SCI_SETFOLDLEVEL 2222 +#define SCI_GETFOLDLEVEL 2223 +#define SCI_GETLASTCHILD 2224 +#define SCI_GETFOLDPARENT 2225 +#define SCI_SHOWLINES 2226 +#define SCI_HIDELINES 2227 +#define SCI_GETLINEVISIBLE 2228 +#define SCI_GETALLLINESVISIBLE 2236 +#define SCI_SETFOLDEXPANDED 2229 +#define SCI_GETFOLDEXPANDED 2230 +#define SCI_TOGGLEFOLD 2231 +#define SCI_TOGGLEFOLDSHOWTEXT 2700 +#define SC_FOLDDISPLAYTEXT_HIDDEN 0 +#define SC_FOLDDISPLAYTEXT_STANDARD 1 +#define SC_FOLDDISPLAYTEXT_BOXED 2 +#define SCI_FOLDDISPLAYTEXTSETSTYLE 2701 +#define SC_FOLDACTION_CONTRACT 0 +#define SC_FOLDACTION_EXPAND 1 +#define SC_FOLDACTION_TOGGLE 2 +#define SCI_FOLDLINE 2237 +#define SCI_FOLDCHILDREN 2238 +#define SCI_EXPANDCHILDREN 2239 +#define SCI_FOLDALL 2662 +#define SCI_ENSUREVISIBLE 2232 +#define SC_AUTOMATICFOLD_SHOW 0x0001 +#define SC_AUTOMATICFOLD_CLICK 0x0002 +#define SC_AUTOMATICFOLD_CHANGE 0x0004 +#define SCI_SETAUTOMATICFOLD 2663 +#define SCI_GETAUTOMATICFOLD 2664 +#define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define SC_FOLDFLAG_LEVELNUMBERS 0x0040 +#define SC_FOLDFLAG_LINESTATE 0x0080 +#define SCI_SETFOLDFLAGS 2233 +#define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 +#define SCI_SETTABINDENTS 2260 +#define SCI_GETTABINDENTS 2261 +#define SCI_SETBACKSPACEUNINDENTS 2262 +#define SCI_GETBACKSPACEUNINDENTS 2263 +#define SC_TIME_FOREVER 10000000 +#define SCI_SETMOUSEDWELLTIME 2264 +#define SCI_GETMOUSEDWELLTIME 2265 +#define SCI_WORDSTARTPOSITION 2266 +#define SCI_WORDENDPOSITION 2267 +#define SCI_ISRANGEWORD 2691 +#define SC_IDLESTYLING_NONE 0 +#define SC_IDLESTYLING_TOVISIBLE 1 +#define SC_IDLESTYLING_AFTERVISIBLE 2 +#define SC_IDLESTYLING_ALL 3 +#define SCI_SETIDLESTYLING 2692 +#define SCI_GETIDLESTYLING 2693 +#define SC_WRAP_NONE 0 +#define SC_WRAP_WORD 1 +#define SC_WRAP_CHAR 2 +#define SC_WRAP_WHITESPACE 3 +#define SCI_SETWRAPMODE 2268 +#define SCI_GETWRAPMODE 2269 +#define SC_WRAPVISUALFLAG_NONE 0x0000 +#define SC_WRAPVISUALFLAG_END 0x0001 +#define SC_WRAPVISUALFLAG_START 0x0002 +#define SC_WRAPVISUALFLAG_MARGIN 0x0004 +#define SCI_SETWRAPVISUALFLAGS 2460 +#define SCI_GETWRAPVISUALFLAGS 2461 +#define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 +#define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 +#define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 +#define SCI_SETWRAPVISUALFLAGSLOCATION 2462 +#define SCI_GETWRAPVISUALFLAGSLOCATION 2463 +#define SCI_SETWRAPSTARTINDENT 2464 +#define SCI_GETWRAPSTARTINDENT 2465 +#define SC_WRAPINDENT_FIXED 0 +#define SC_WRAPINDENT_SAME 1 +#define SC_WRAPINDENT_INDENT 2 +#define SC_WRAPINDENT_DEEPINDENT 3 +#define SCI_SETWRAPINDENTMODE 2472 +#define SCI_GETWRAPINDENTMODE 2473 +#define SC_CACHE_NONE 0 +#define SC_CACHE_CARET 1 +#define SC_CACHE_PAGE 2 +#define SC_CACHE_DOCUMENT 3 +#define SCI_SETLAYOUTCACHE 2272 +#define SCI_GETLAYOUTCACHE 2273 +#define SCI_SETSCROLLWIDTH 2274 +#define SCI_GETSCROLLWIDTH 2275 +#define SCI_SETSCROLLWIDTHTRACKING 2516 +#define SCI_GETSCROLLWIDTHTRACKING 2517 +#define SCI_TEXTWIDTH 2276 +#define SCI_SETENDATLASTLINE 2277 +#define SCI_GETENDATLASTLINE 2278 +#define SCI_TEXTHEIGHT 2279 +#define SCI_SETVSCROLLBAR 2280 +#define SCI_GETVSCROLLBAR 2281 +#define SCI_APPENDTEXT 2282 +#define SCI_GETTWOPHASEDRAW 2283 +#define SCI_SETTWOPHASEDRAW 2284 +#define SC_PHASES_ONE 0 +#define SC_PHASES_TWO 1 +#define SC_PHASES_MULTIPLE 2 +#define SCI_GETPHASESDRAW 2673 +#define SCI_SETPHASESDRAW 2674 +#define SC_EFF_QUALITY_MASK 0xF +#define SC_EFF_QUALITY_DEFAULT 0 +#define SC_EFF_QUALITY_NON_ANTIALIASED 1 +#define SC_EFF_QUALITY_ANTIALIASED 2 +#define SC_EFF_QUALITY_LCD_OPTIMIZED 3 +#define SCI_SETFONTQUALITY 2611 +#define SCI_GETFONTQUALITY 2612 +#define SCI_SETFIRSTVISIBLELINE 2613 +#define SC_MULTIPASTE_ONCE 0 +#define SC_MULTIPASTE_EACH 1 +#define SCI_SETMULTIPASTE 2614 +#define SCI_GETMULTIPASTE 2615 +#define SCI_GETTAG 2616 +#define SCI_LINESJOIN 2288 +#define SCI_LINESSPLIT 2289 +#define SCI_SETFOLDMARGINCOLOUR 2290 +#define SCI_SETFOLDMARGINHICOLOUR 2291 +#define SC_ACCESSIBILITY_DISABLED 0 +#define SC_ACCESSIBILITY_ENABLED 1 +#define SCI_SETACCESSIBILITY 2702 +#define SCI_GETACCESSIBILITY 2703 +#define SCI_LINEDOWN 2300 +#define SCI_LINEDOWNEXTEND 2301 +#define SCI_LINEUP 2302 +#define SCI_LINEUPEXTEND 2303 +#define SCI_CHARLEFT 2304 +#define SCI_CHARLEFTEXTEND 2305 +#define SCI_CHARRIGHT 2306 +#define SCI_CHARRIGHTEXTEND 2307 +#define SCI_WORDLEFT 2308 +#define SCI_WORDLEFTEXTEND 2309 +#define SCI_WORDRIGHT 2310 +#define SCI_WORDRIGHTEXTEND 2311 +#define SCI_HOME 2312 +#define SCI_HOMEEXTEND 2313 +#define SCI_LINEEND 2314 +#define SCI_LINEENDEXTEND 2315 +#define SCI_DOCUMENTSTART 2316 +#define SCI_DOCUMENTSTARTEXTEND 2317 +#define SCI_DOCUMENTEND 2318 +#define SCI_DOCUMENTENDEXTEND 2319 +#define SCI_PAGEUP 2320 +#define SCI_PAGEUPEXTEND 2321 +#define SCI_PAGEDOWN 2322 +#define SCI_PAGEDOWNEXTEND 2323 +#define SCI_EDITTOGGLEOVERTYPE 2324 +#define SCI_CANCEL 2325 +#define SCI_DELETEBACK 2326 +#define SCI_TAB 2327 +#define SCI_BACKTAB 2328 +#define SCI_NEWLINE 2329 +#define SCI_FORMFEED 2330 +#define SCI_VCHOME 2331 +#define SCI_VCHOMEEXTEND 2332 +#define SCI_ZOOMIN 2333 +#define SCI_ZOOMOUT 2334 +#define SCI_DELWORDLEFT 2335 +#define SCI_DELWORDRIGHT 2336 +#define SCI_DELWORDRIGHTEND 2518 +#define SCI_LINECUT 2337 +#define SCI_LINEDELETE 2338 +#define SCI_LINETRANSPOSE 2339 +#define SCI_LINEREVERSE 2354 +#define SCI_LINEDUPLICATE 2404 +#define SCI_LOWERCASE 2340 +#define SCI_UPPERCASE 2341 +#define SCI_LINESCROLLDOWN 2342 +#define SCI_LINESCROLLUP 2343 +#define SCI_DELETEBACKNOTLINE 2344 +#define SCI_HOMEDISPLAY 2345 +#define SCI_HOMEDISPLAYEXTEND 2346 +#define SCI_LINEENDDISPLAY 2347 +#define SCI_LINEENDDISPLAYEXTEND 2348 +#define SCI_HOMEWRAP 2349 +#define SCI_HOMEWRAPEXTEND 2450 +#define SCI_LINEENDWRAP 2451 +#define SCI_LINEENDWRAPEXTEND 2452 +#define SCI_VCHOMEWRAP 2453 +#define SCI_VCHOMEWRAPEXTEND 2454 +#define SCI_LINECOPY 2455 +#define SCI_MOVECARETINSIDEVIEW 2401 +#define SCI_LINELENGTH 2350 +#define SCI_BRACEHIGHLIGHT 2351 +#define SCI_BRACEHIGHLIGHTINDICATOR 2498 +#define SCI_BRACEBADLIGHT 2352 +#define SCI_BRACEBADLIGHTINDICATOR 2499 +#define SCI_BRACEMATCH 2353 +#define SCI_GETVIEWEOL 2355 +#define SCI_SETVIEWEOL 2356 +#define SCI_GETDOCPOINTER 2357 +#define SCI_SETDOCPOINTER 2358 +#define SCI_SETMODEVENTMASK 2359 +#define EDGE_NONE 0 +#define EDGE_LINE 1 +#define EDGE_BACKGROUND 2 +#define EDGE_MULTILINE 3 +#define SCI_GETEDGECOLUMN 2360 +#define SCI_SETEDGECOLUMN 2361 +#define SCI_GETEDGEMODE 2362 +#define SCI_SETEDGEMODE 2363 +#define SCI_GETEDGECOLOUR 2364 +#define SCI_SETEDGECOLOUR 2365 +#define SCI_MULTIEDGEADDLINE 2694 +#define SCI_MULTIEDGECLEARALL 2695 +#define SCI_SEARCHANCHOR 2366 +#define SCI_SEARCHNEXT 2367 +#define SCI_SEARCHPREV 2368 +#define SCI_LINESONSCREEN 2370 +#define SC_POPUP_NEVER 0 +#define SC_POPUP_ALL 1 +#define SC_POPUP_TEXT 2 +#define SCI_USEPOPUP 2371 +#define SCI_SELECTIONISRECTANGLE 2372 +#define SCI_SETZOOM 2373 +#define SCI_GETZOOM 2374 +#define SC_DOCUMENTOPTION_DEFAULT 0 +#define SC_DOCUMENTOPTION_STYLES_NONE 0x1 +#define SC_DOCUMENTOPTION_TEXT_LARGE 0x100 +#define SCI_CREATEDOCUMENT 2375 +#define SCI_ADDREFDOCUMENT 2376 +#define SCI_RELEASEDOCUMENT 2377 +#define SCI_GETDOCUMENTOPTIONS 2379 +#define SCI_GETMODEVENTMASK 2378 +#define SCI_SETCOMMANDEVENTS 2717 +#define SCI_GETCOMMANDEVENTS 2718 +#define SCI_SETFOCUS 2380 +#define SCI_GETFOCUS 2381 +#define SC_STATUS_OK 0 +#define SC_STATUS_FAILURE 1 +#define SC_STATUS_BADALLOC 2 +#define SC_STATUS_WARN_START 1000 +#define SC_STATUS_WARN_REGEX 1001 +#define SCI_SETSTATUS 2382 +#define SCI_GETSTATUS 2383 +#define SCI_SETMOUSEDOWNCAPTURES 2384 +#define SCI_GETMOUSEDOWNCAPTURES 2385 +#define SCI_SETMOUSEWHEELCAPTURES 2696 +#define SCI_GETMOUSEWHEELCAPTURES 2697 +#define SC_CURSORNORMAL -1 +#define SC_CURSORARROW 2 +#define SC_CURSORWAIT 4 +#define SC_CURSORREVERSEARROW 7 +#define SCI_SETCURSOR 2386 +#define SCI_GETCURSOR 2387 +#define SCI_SETCONTROLCHARSYMBOL 2388 +#define SCI_GETCONTROLCHARSYMBOL 2389 +#define SCI_WORDPARTLEFT 2390 +#define SCI_WORDPARTLEFTEXTEND 2391 +#define SCI_WORDPARTRIGHT 2392 +#define SCI_WORDPARTRIGHTEXTEND 2393 +#define VISIBLE_SLOP 0x01 +#define VISIBLE_STRICT 0x04 +#define SCI_SETVISIBLEPOLICY 2394 +#define SCI_DELLINELEFT 2395 +#define SCI_DELLINERIGHT 2396 +#define SCI_SETXOFFSET 2397 +#define SCI_GETXOFFSET 2398 +#define SCI_CHOOSECARETX 2399 +#define SCI_GRABFOCUS 2400 +#define CARET_SLOP 0x01 +#define CARET_STRICT 0x04 +#define CARET_JUMPS 0x10 +#define CARET_EVEN 0x08 +#define SCI_SETXCARETPOLICY 2402 +#define SCI_SETYCARETPOLICY 2403 +#define SCI_SETPRINTWRAPMODE 2406 +#define SCI_GETPRINTWRAPMODE 2407 +#define SCI_SETHOTSPOTACTIVEFORE 2410 +#define SCI_GETHOTSPOTACTIVEFORE 2494 +#define SCI_SETHOTSPOTACTIVEBACK 2411 +#define SCI_GETHOTSPOTACTIVEBACK 2495 +#define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 +#define SCI_GETHOTSPOTACTIVEUNDERLINE 2496 +#define SCI_SETHOTSPOTSINGLELINE 2421 +#define SCI_GETHOTSPOTSINGLELINE 2497 +#define SCI_PARADOWN 2413 +#define SCI_PARADOWNEXTEND 2414 +#define SCI_PARAUP 2415 +#define SCI_PARAUPEXTEND 2416 +#define SCI_POSITIONBEFORE 2417 +#define SCI_POSITIONAFTER 2418 +#define SCI_POSITIONRELATIVE 2670 +#define SCI_POSITIONRELATIVECODEUNITS 2716 +#define SCI_COPYRANGE 2419 +#define SCI_COPYTEXT 2420 +#define SC_SEL_STREAM 0 +#define SC_SEL_RECTANGLE 1 +#define SC_SEL_LINES 2 +#define SC_SEL_THIN 3 +#define SCI_SETSELECTIONMODE 2422 +#define SCI_GETSELECTIONMODE 2423 +#define SCI_GETMOVEEXTENDSSELECTION 2706 +#define SCI_GETLINESELSTARTPOSITION 2424 +#define SCI_GETLINESELENDPOSITION 2425 +#define SCI_LINEDOWNRECTEXTEND 2426 +#define SCI_LINEUPRECTEXTEND 2427 +#define SCI_CHARLEFTRECTEXTEND 2428 +#define SCI_CHARRIGHTRECTEXTEND 2429 +#define SCI_HOMERECTEXTEND 2430 +#define SCI_VCHOMERECTEXTEND 2431 +#define SCI_LINEENDRECTEXTEND 2432 +#define SCI_PAGEUPRECTEXTEND 2433 +#define SCI_PAGEDOWNRECTEXTEND 2434 +#define SCI_STUTTEREDPAGEUP 2435 +#define SCI_STUTTEREDPAGEUPEXTEND 2436 +#define SCI_STUTTEREDPAGEDOWN 2437 +#define SCI_STUTTEREDPAGEDOWNEXTEND 2438 +#define SCI_WORDLEFTEND 2439 +#define SCI_WORDLEFTENDEXTEND 2440 +#define SCI_WORDRIGHTEND 2441 +#define SCI_WORDRIGHTENDEXTEND 2442 +#define SCI_SETWHITESPACECHARS 2443 +#define SCI_GETWHITESPACECHARS 2647 +#define SCI_SETPUNCTUATIONCHARS 2648 +#define SCI_GETPUNCTUATIONCHARS 2649 +#define SCI_SETCHARSDEFAULT 2444 +#define SCI_AUTOCGETCURRENT 2445 +#define SCI_AUTOCGETCURRENTTEXT 2610 +#define SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE 0 +#define SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE 1 +#define SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR 2634 +#define SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR 2635 +#define SC_MULTIAUTOC_ONCE 0 +#define SC_MULTIAUTOC_EACH 1 +#define SCI_AUTOCSETMULTI 2636 +#define SCI_AUTOCGETMULTI 2637 +#define SC_ORDER_PRESORTED 0 +#define SC_ORDER_PERFORMSORT 1 +#define SC_ORDER_CUSTOM 2 +#define SCI_AUTOCSETORDER 2660 +#define SCI_AUTOCGETORDER 2661 +#define SCI_ALLOCATE 2446 +#define SCI_TARGETASUTF8 2447 +#define SCI_SETLENGTHFORENCODE 2448 +#define SCI_ENCODEDFROMUTF8 2449 +#define SCI_FINDCOLUMN 2456 +#define SCI_GETCARETSTICKY 2457 +#define SCI_SETCARETSTICKY 2458 +#define SC_CARETSTICKY_OFF 0 +#define SC_CARETSTICKY_ON 1 +#define SC_CARETSTICKY_WHITESPACE 2 +#define SCI_TOGGLECARETSTICKY 2459 +#define SCI_SETPASTECONVERTENDINGS 2467 +#define SCI_GETPASTECONVERTENDINGS 2468 +#define SCI_SELECTIONDUPLICATE 2469 +#define SC_ALPHA_TRANSPARENT 0 +#define SC_ALPHA_OPAQUE 255 +#define SC_ALPHA_NOALPHA 256 +#define SCI_SETCARETLINEBACKALPHA 2470 +#define SCI_GETCARETLINEBACKALPHA 2471 +#define CARETSTYLE_INVISIBLE 0 +#define CARETSTYLE_LINE 1 +#define CARETSTYLE_BLOCK 2 +#define SCI_SETCARETSTYLE 2512 +#define SCI_GETCARETSTYLE 2513 +#define SCI_SETINDICATORCURRENT 2500 +#define SCI_GETINDICATORCURRENT 2501 +#define SCI_SETINDICATORVALUE 2502 +#define SCI_GETINDICATORVALUE 2503 +#define SCI_INDICATORFILLRANGE 2504 +#define SCI_INDICATORCLEARRANGE 2505 +#define SCI_INDICATORALLONFOR 2506 +#define SCI_INDICATORVALUEAT 2507 +#define SCI_INDICATORSTART 2508 +#define SCI_INDICATOREND 2509 +#define SCI_SETPOSITIONCACHE 2514 +#define SCI_GETPOSITIONCACHE 2515 +#define SCI_COPYALLOWLINE 2519 +#define SCI_GETCHARACTERPOINTER 2520 +#define SCI_GETRANGEPOINTER 2643 +#define SCI_GETGAPPOSITION 2644 +#define SCI_INDICSETALPHA 2523 +#define SCI_INDICGETALPHA 2524 +#define SCI_INDICSETOUTLINEALPHA 2558 +#define SCI_INDICGETOUTLINEALPHA 2559 +#define SCI_SETEXTRAASCENT 2525 +#define SCI_GETEXTRAASCENT 2526 +#define SCI_SETEXTRADESCENT 2527 +#define SCI_GETEXTRADESCENT 2528 +#define SCI_MARKERSYMBOLDEFINED 2529 +#define SCI_MARGINSETTEXT 2530 +#define SCI_MARGINGETTEXT 2531 +#define SCI_MARGINSETSTYLE 2532 +#define SCI_MARGINGETSTYLE 2533 +#define SCI_MARGINSETSTYLES 2534 +#define SCI_MARGINGETSTYLES 2535 +#define SCI_MARGINTEXTCLEARALL 2536 +#define SCI_MARGINSETSTYLEOFFSET 2537 +#define SCI_MARGINGETSTYLEOFFSET 2538 +#define SC_MARGINOPTION_NONE 0 +#define SC_MARGINOPTION_SUBLINESELECT 1 +#define SCI_SETMARGINOPTIONS 2539 +#define SCI_GETMARGINOPTIONS 2557 +#define SCI_ANNOTATIONSETTEXT 2540 +#define SCI_ANNOTATIONGETTEXT 2541 +#define SCI_ANNOTATIONSETSTYLE 2542 +#define SCI_ANNOTATIONGETSTYLE 2543 +#define SCI_ANNOTATIONSETSTYLES 2544 +#define SCI_ANNOTATIONGETSTYLES 2545 +#define SCI_ANNOTATIONGETLINES 2546 +#define SCI_ANNOTATIONCLEARALL 2547 +#define ANNOTATION_HIDDEN 0 +#define ANNOTATION_STANDARD 1 +#define ANNOTATION_BOXED 2 +#define ANNOTATION_INDENTED 3 +#define SCI_ANNOTATIONSETVISIBLE 2548 +#define SCI_ANNOTATIONGETVISIBLE 2549 +#define SCI_ANNOTATIONSETSTYLEOFFSET 2550 +#define SCI_ANNOTATIONGETSTYLEOFFSET 2551 +#define SCI_RELEASEALLEXTENDEDSTYLES 2552 +#define SCI_ALLOCATEEXTENDEDSTYLES 2553 +#define UNDO_MAY_COALESCE 1 +#define SCI_ADDUNDOACTION 2560 +#define SCI_CHARPOSITIONFROMPOINT 2561 +#define SCI_CHARPOSITIONFROMPOINTCLOSE 2562 +#define SCI_SETMOUSESELECTIONRECTANGULARSWITCH 2668 +#define SCI_GETMOUSESELECTIONRECTANGULARSWITCH 2669 +#define SCI_SETMULTIPLESELECTION 2563 +#define SCI_GETMULTIPLESELECTION 2564 +#define SCI_SETADDITIONALSELECTIONTYPING 2565 +#define SCI_GETADDITIONALSELECTIONTYPING 2566 +#define SCI_SETADDITIONALCARETSBLINK 2567 +#define SCI_GETADDITIONALCARETSBLINK 2568 +#define SCI_SETADDITIONALCARETSVISIBLE 2608 +#define SCI_GETADDITIONALCARETSVISIBLE 2609 +#define SCI_GETSELECTIONS 2570 +#define SCI_GETSELECTIONEMPTY 2650 +#define SCI_CLEARSELECTIONS 2571 +#define SCI_SETSELECTION 2572 +#define SCI_ADDSELECTION 2573 +#define SCI_DROPSELECTIONN 2671 +#define SCI_SETMAINSELECTION 2574 +#define SCI_GETMAINSELECTION 2575 +#define SCI_SETSELECTIONNCARET 2576 +#define SCI_GETSELECTIONNCARET 2577 +#define SCI_SETSELECTIONNANCHOR 2578 +#define SCI_GETSELECTIONNANCHOR 2579 +#define SCI_SETSELECTIONNCARETVIRTUALSPACE 2580 +#define SCI_GETSELECTIONNCARETVIRTUALSPACE 2581 +#define SCI_SETSELECTIONNANCHORVIRTUALSPACE 2582 +#define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583 +#define SCI_SETSELECTIONNSTART 2584 +#define SCI_GETSELECTIONNSTART 2585 +#define SCI_SETSELECTIONNEND 2586 +#define SCI_GETSELECTIONNEND 2587 +#define SCI_SETRECTANGULARSELECTIONCARET 2588 +#define SCI_GETRECTANGULARSELECTIONCARET 2589 +#define SCI_SETRECTANGULARSELECTIONANCHOR 2590 +#define SCI_GETRECTANGULARSELECTIONANCHOR 2591 +#define SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE 2592 +#define SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE 2593 +#define SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2594 +#define SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2595 +#define SCVS_NONE 0 +#define SCVS_RECTANGULARSELECTION 1 +#define SCVS_USERACCESSIBLE 2 +#define SCVS_NOWRAPLINESTART 4 +#define SCI_SETVIRTUALSPACEOPTIONS 2596 +#define SCI_GETVIRTUALSPACEOPTIONS 2597 +#define SCI_SETRECTANGULARSELECTIONMODIFIER 2598 +#define SCI_GETRECTANGULARSELECTIONMODIFIER 2599 +#define SCI_SETADDITIONALSELFORE 2600 +#define SCI_SETADDITIONALSELBACK 2601 +#define SCI_SETADDITIONALSELALPHA 2602 +#define SCI_GETADDITIONALSELALPHA 2603 +#define SCI_SETADDITIONALCARETFORE 2604 +#define SCI_GETADDITIONALCARETFORE 2605 +#define SCI_ROTATESELECTION 2606 +#define SCI_SWAPMAINANCHORCARET 2607 +#define SCI_MULTIPLESELECTADDNEXT 2688 +#define SCI_MULTIPLESELECTADDEACH 2689 +#define SCI_CHANGELEXERSTATE 2617 +#define SCI_CONTRACTEDFOLDNEXT 2618 +#define SCI_VERTICALCENTRECARET 2619 +#define SCI_MOVESELECTEDLINESUP 2620 +#define SCI_MOVESELECTEDLINESDOWN 2621 +#define SCI_SETIDENTIFIER 2622 +#define SCI_GETIDENTIFIER 2623 +#define SCI_RGBAIMAGESETWIDTH 2624 +#define SCI_RGBAIMAGESETHEIGHT 2625 +#define SCI_RGBAIMAGESETSCALE 2651 +#define SCI_MARKERDEFINERGBAIMAGE 2626 +#define SCI_REGISTERRGBAIMAGE 2627 +#define SCI_SCROLLTOSTART 2628 +#define SCI_SCROLLTOEND 2629 +#define SC_TECHNOLOGY_DEFAULT 0 +#define SC_TECHNOLOGY_DIRECTWRITE 1 +#define SC_TECHNOLOGY_DIRECTWRITERETAIN 2 +#define SC_TECHNOLOGY_DIRECTWRITEDC 3 +#define SCI_SETTECHNOLOGY 2630 +#define SCI_GETTECHNOLOGY 2631 +#define SCI_CREATELOADER 2632 +#define SCI_FINDINDICATORSHOW 2640 +#define SCI_FINDINDICATORFLASH 2641 +#define SCI_FINDINDICATORHIDE 2642 +#define SCI_VCHOMEDISPLAY 2652 +#define SCI_VCHOMEDISPLAYEXTEND 2653 +#define SCI_GETCARETLINEVISIBLEALWAYS 2654 +#define SCI_SETCARETLINEVISIBLEALWAYS 2655 +#define SC_LINE_END_TYPE_DEFAULT 0 +#define SC_LINE_END_TYPE_UNICODE 1 +#define SCI_SETLINEENDTYPESALLOWED 2656 +#define SCI_GETLINEENDTYPESALLOWED 2657 +#define SCI_GETLINEENDTYPESACTIVE 2658 +#define SCI_SETREPRESENTATION 2665 +#define SCI_GETREPRESENTATION 2666 +#define SCI_CLEARREPRESENTATION 2667 +#define SCI_STARTRECORD 3001 +#define SCI_STOPRECORD 3002 +#define SCI_SETLEXER 4001 +#define SCI_GETLEXER 4002 +#define SCI_COLOURISE 4003 +#define SCI_SETPROPERTY 4004 +#define KEYWORDSET_MAX 8 +#define SCI_SETKEYWORDS 4005 +#define SCI_SETLEXERLANGUAGE 4006 +#define SCI_LOADLEXERLIBRARY 4007 +#define SCI_GETPROPERTY 4008 +#define SCI_GETPROPERTYEXPANDED 4009 +#define SCI_GETPROPERTYINT 4010 +#define SCI_GETLEXERLANGUAGE 4012 +#define SCI_PRIVATELEXERCALL 4013 +#define SCI_PROPERTYNAMES 4014 +#define SC_TYPE_BOOLEAN 0 +#define SC_TYPE_INTEGER 1 +#define SC_TYPE_STRING 2 +#define SCI_PROPERTYTYPE 4015 +#define SCI_DESCRIBEPROPERTY 4016 +#define SCI_DESCRIBEKEYWORDSETS 4017 +#define SCI_GETLINEENDTYPESSUPPORTED 4018 +#define SCI_ALLOCATESUBSTYLES 4020 +#define SCI_GETSUBSTYLESSTART 4021 +#define SCI_GETSUBSTYLESLENGTH 4022 +#define SCI_GETSTYLEFROMSUBSTYLE 4027 +#define SCI_GETPRIMARYSTYLEFROMSTYLE 4028 +#define SCI_FREESUBSTYLES 4023 +#define SCI_SETIDENTIFIERS 4024 +#define SCI_DISTANCETOSECONDARYSTYLES 4025 +#define SCI_GETSUBSTYLEBASES 4026 +#define SCI_GETNAMEDSTYLES 4029 +#define SCI_NAMEOFSTYLE 4030 +#define SCI_TAGSOFSTYLE 4031 +#define SCI_DESCRIPTIONOFSTYLE 4032 +#define SC_MOD_INSERTTEXT 0x1 +#define SC_MOD_DELETETEXT 0x2 +#define SC_MOD_CHANGESTYLE 0x4 +#define SC_MOD_CHANGEFOLD 0x8 +#define SC_PERFORMED_USER 0x10 +#define SC_PERFORMED_UNDO 0x20 +#define SC_PERFORMED_REDO 0x40 +#define SC_MULTISTEPUNDOREDO 0x80 +#define SC_LASTSTEPINUNDOREDO 0x100 +#define SC_MOD_CHANGEMARKER 0x200 +#define SC_MOD_BEFOREINSERT 0x400 +#define SC_MOD_BEFOREDELETE 0x800 +#define SC_MULTILINEUNDOREDO 0x1000 +#define SC_STARTACTION 0x2000 +#define SC_MOD_CHANGEINDICATOR 0x4000 +#define SC_MOD_CHANGELINESTATE 0x8000 +#define SC_MOD_CHANGEMARGIN 0x10000 +#define SC_MOD_CHANGEANNOTATION 0x20000 +#define SC_MOD_CONTAINER 0x40000 +#define SC_MOD_LEXERSTATE 0x80000 +#define SC_MOD_INSERTCHECK 0x100000 +#define SC_MOD_CHANGETABSTOPS 0x200000 +#define SC_MODEVENTMASKALL 0x3FFFFF +#define SC_UPDATE_CONTENT 0x1 +#define SC_UPDATE_SELECTION 0x2 +#define SC_UPDATE_V_SCROLL 0x4 +#define SC_UPDATE_H_SCROLL 0x8 +#define SCEN_CHANGE 768 +#define SCEN_SETFOCUS 512 +#define SCEN_KILLFOCUS 256 +#define SCK_DOWN 300 +#define SCK_UP 301 +#define SCK_LEFT 302 +#define SCK_RIGHT 303 +#define SCK_HOME 304 +#define SCK_END 305 +#define SCK_PRIOR 306 +#define SCK_NEXT 307 +#define SCK_DELETE 308 +#define SCK_INSERT 309 +#define SCK_ESCAPE 7 +#define SCK_BACK 8 +#define SCK_TAB 9 +#define SCK_RETURN 13 +#define SCK_ADD 310 +#define SCK_SUBTRACT 311 +#define SCK_DIVIDE 312 +#define SCK_WIN 313 +#define SCK_RWIN 314 +#define SCK_MENU 315 +#define SCMOD_NORM 0 +#define SCMOD_SHIFT 1 +#define SCMOD_CTRL 2 +#define SCMOD_ALT 4 +#define SCMOD_SUPER 8 +#define SCMOD_META 16 +#define SC_AC_FILLUP 1 +#define SC_AC_DOUBLECLICK 2 +#define SC_AC_TAB 3 +#define SC_AC_NEWLINE 4 +#define SC_AC_COMMAND 5 +#define SCN_STYLENEEDED 2000 +#define SCN_CHARADDED 2001 +#define SCN_SAVEPOINTREACHED 2002 +#define SCN_SAVEPOINTLEFT 2003 +#define SCN_MODIFYATTEMPTRO 2004 +#define SCN_KEY 2005 +#define SCN_DOUBLECLICK 2006 +#define SCN_UPDATEUI 2007 +#define SCN_MODIFIED 2008 +#define SCN_MACRORECORD 2009 +#define SCN_MARGINCLICK 2010 +#define SCN_NEEDSHOWN 2011 +#define SCN_PAINTED 2013 +#define SCN_USERLISTSELECTION 2014 +#define SCN_URIDROPPED 2015 +#define SCN_DWELLSTART 2016 +#define SCN_DWELLEND 2017 +#define SCN_ZOOM 2018 +#define SCN_HOTSPOTCLICK 2019 +#define SCN_HOTSPOTDOUBLECLICK 2020 +#define SCN_CALLTIPCLICK 2021 +#define SCN_AUTOCSELECTION 2022 +#define SCN_INDICATORCLICK 2023 +#define SCN_INDICATORRELEASE 2024 +#define SCN_AUTOCCANCELLED 2025 +#define SCN_AUTOCCHARDELETED 2026 +#define SCN_HOTSPOTRELEASECLICK 2027 +#define SCN_FOCUSIN 2028 +#define SCN_FOCUSOUT 2029 +#define SCN_AUTOCCOMPLETED 2030 +#define SCN_MARGINRIGHTCLICK 2031 +#define SCN_AUTOCSELECTIONCHANGE 2032 +#ifndef SCI_DISABLE_PROVISIONAL +#define SC_LINECHARACTERINDEX_NONE 0 +#define SC_LINECHARACTERINDEX_UTF32 1 +#define SC_LINECHARACTERINDEX_UTF16 2 +#define SCI_GETLINECHARACTERINDEX 2710 +#define SCI_ALLOCATELINECHARACTERINDEX 2711 +#define SCI_RELEASELINECHARACTERINDEX 2712 +#define SCI_LINEFROMINDEXPOSITION 2713 +#define SCI_INDEXPOSITIONFROMLINE 2714 +#endif +/* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + +/* These structures are defined to be exactly the same shape as the Win32 + * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. + * So older code that treats Scintilla as a RichEdit will work. */ + +struct Sci_CharacterRange { + Sci_PositionCR cpMin; + Sci_PositionCR cpMax; +}; + +struct Sci_TextRange { + struct Sci_CharacterRange chrg; + char *lpstrText; +}; + +struct Sci_TextToFind { + struct Sci_CharacterRange chrg; + const char *lpstrText; + struct Sci_CharacterRange chrgText; +}; + +typedef void *Sci_SurfaceID; + +struct Sci_Rectangle { + int left; + int top; + int right; + int bottom; +}; + +/* This structure is used in printing and requires some of the graphics types + * from Platform.h. Not needed by most client code. */ + +struct Sci_RangeToFormat { + Sci_SurfaceID hdc; + Sci_SurfaceID hdcTarget; + struct Sci_Rectangle rc; + struct Sci_Rectangle rcPage; + struct Sci_CharacterRange chrg; +}; + +#ifndef __cplusplus +/* For the GTK+ platform, g-ir-scanner needs to have these typedefs. This + * is not required in C++ code and actually seems to break ScintillaEditPy */ +typedef struct Sci_NotifyHeader Sci_NotifyHeader; +typedef struct SCNotification SCNotification; +#endif + +struct Sci_NotifyHeader { + /* Compatible with Windows NMHDR. + * hwndFrom is really an environment specific window handle or pointer + * but most clients of Scintilla.h do not have this type visible. */ + void *hwndFrom; + uptr_t idFrom; + unsigned int code; +}; + +struct SCNotification { + Sci_NotifyHeader nmhdr; + Sci_Position position; + /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */ + /* SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, */ + /* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */ + /* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */ + /* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ + + int ch; + /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */ + /* SCN_USERLISTSELECTION */ + int modifiers; + /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */ + /* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */ + + int modificationType; /* SCN_MODIFIED */ + const char *text; + /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */ + + Sci_Position length; /* SCN_MODIFIED */ + Sci_Position linesAdded; /* SCN_MODIFIED */ + int message; /* SCN_MACRORECORD */ + uptr_t wParam; /* SCN_MACRORECORD */ + sptr_t lParam; /* SCN_MACRORECORD */ + Sci_Position line; /* SCN_MODIFIED */ + int foldLevelNow; /* SCN_MODIFIED */ + int foldLevelPrev; /* SCN_MODIFIED */ + int margin; /* SCN_MARGINCLICK */ + int listType; /* SCN_USERLISTSELECTION */ + int x; /* SCN_DWELLSTART, SCN_DWELLEND */ + int y; /* SCN_DWELLSTART, SCN_DWELLEND */ + int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ + Sci_Position annotationLinesAdded; /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */ + int updated; /* SCN_UPDATEUI */ + int listCompletionMethod; + /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */ +}; + +#ifdef INCLUDE_DEPRECATED_FEATURES + +#define SCI_SETKEYSUNICODE 2521 +#define SCI_GETKEYSUNICODE 2522 + +#define CharacterRange Sci_CharacterRange +#define TextRange Sci_TextRange +#define TextToFind Sci_TextToFind +#define RangeToFormat Sci_RangeToFormat +#define NotifyHeader Sci_NotifyHeader + +#define SCI_SETSTYLEBITS 2090 +#define SCI_GETSTYLEBITS 2091 +#define SCI_GETSTYLEBITSNEEDED 4011 + +#endif + +#endif diff --git a/libs/qscintilla_2.14.1/scintilla/include/Scintilla.iface b/libs/qscintilla_2.14.1/scintilla/include/Scintilla.iface new file mode 100644 index 000000000..0281f92f5 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/Scintilla.iface @@ -0,0 +1,4990 @@ +## First line may be used for shbang + +## This file defines the interface to Scintilla + +## Copyright 2000-2003 by Neil Hodgson +## The License.txt file describes the conditions under which this software may be distributed. + +## A line starting with ## is a pure comment and should be stripped by readers. +## A line starting with #! is for future shbang use +## A line starting with # followed by a space is a documentation comment and refers +## to the next feature definition. + +## Each feature is defined by a line starting with fun, get, set, val or evt. +## cat -> start a category +## fun -> a function +## get -> a property get function +## set -> a property set function +## val -> definition of a constant +## evt -> an event +## enu -> associate an enumeration with a set of vals with a prefix +## lex -> associate a lexer with the lexical classes it produces +## +## All other feature names should be ignored. They may be defined in the future. +## A property may have a set function, a get function or both. Each will have +## "Get" or "Set" in their names and the corresponding name will have the obvious switch. +## A property may be subscripted, in which case the first parameter is the subscript. +## fun, get, and set features have a strict syntax: +## [=,) +## where stands for white space. +## param may be empty (null value) or is [=] +## Additional white space is allowed between elements. +## The syntax for evt is [=[,]*]) +## Feature names that contain an underscore are defined by Windows, so in these +## cases, using the Windows definition is preferred where available. +## The feature numbers are stable so features will not be renumbered. +## Features may be removed but they will go through a period of deprecation +## before removal which is signalled by moving them into the Deprecated category. +## +## enu has the syntax enu=[]* where all the val +## features in this file starting with a given are considered part of the +## enumeration. +## +## lex has the syntax lex=[]* +## where name is a reasonably capitalised (Python, XML) identifier or UI name, +## lexerVal is the val used to specify the lexer, and the list of prefixes is similar +## to enu. The name may not be the same as that used within the lexer so the lexerVal +## should be used to tie these entities together. + +## Types: +## void +## int +## bool -> integer, 1=true, 0=false +## position -> integer position in a document +## colour -> colour integer containing red, green and blue bytes. +## string -> pointer to const character +## stringresult -> pointer to character, NULL-> return size of result +## cells -> pointer to array of cells, each cell containing a style byte and character byte +## textrange -> range of a min and a max position with an output string +## findtext -> searchrange, text -> foundposition +## keymod -> integer containing key in low half and modifiers in high half +## formatrange +## Types no longer used: +## findtextex -> searchrange +## charrange -> range of a min and a max position +## charrangeresult -> like charrange, but output param +## countedstring +## point -> x,y +## pointresult -> like point, but output param +## rectangle -> left,top,right,bottom +## Client code should ignore definitions containing types it does not understand, except +## for possibly #defining the constants + +## Line numbers and positions start at 0. +## String arguments may contain NUL ('\0') characters where the calls provide a length +## argument and retrieve NUL characters. APIs marked as NUL-terminated also have a +## NUL appended but client code should calculate the size that will be returned rather +## than relying upon the NUL whenever possible. Allow for the extra NUL character when +## allocating buffers. The size to allocate for a stringresult (not including NUL) can be +## determined by calling with a NULL (0) pointer. + +cat Basics + +################################################ +## For Scintilla.h +val INVALID_POSITION=-1 +# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages +# as many EM_ messages can be used although that use is deprecated. +val SCI_START=2000 +val SCI_OPTIONAL_START=3000 +val SCI_LEXER_START=4000 + +# Add text to the document at current position. +fun void AddText=2001(int length, string text) + +# Add array of cells to document. +fun void AddStyledText=2002(int length, cells c) + +# Insert string at a position. +fun void InsertText=2003(position pos, string text) + +# Change the text that is being inserted in response to SC_MOD_INSERTCHECK +fun void ChangeInsertion=2672(int length, string text) + +# Delete all text in the document. +fun void ClearAll=2004(,) + +# Delete a range of text in the document. +fun void DeleteRange=2645(position start, int lengthDelete) + +# Set all style bytes to 0, remove all folding information. +fun void ClearDocumentStyle=2005(,) + +# Returns the number of bytes in the document. +get int GetLength=2006(,) + +# Returns the character byte at the position. +get int GetCharAt=2007(position pos,) + +# Returns the position of the caret. +get position GetCurrentPos=2008(,) + +# Returns the position of the opposite end of the selection to the caret. +get position GetAnchor=2009(,) + +# Returns the style byte at the position. +get int GetStyleAt=2010(position pos,) + +# Redoes the next action on the undo history. +fun void Redo=2011(,) + +# Choose between collecting actions into the undo +# history and discarding them. +set void SetUndoCollection=2012(bool collectUndo,) + +# Select all the text in the document. +fun void SelectAll=2013(,) + +# Remember the current position in the undo history as the position +# at which the document was saved. +fun void SetSavePoint=2014(,) + +# Retrieve a buffer of cells. +# Returns the number of bytes in the buffer not including terminating NULs. +fun int GetStyledText=2015(, textrange tr) + +# Are there any redoable actions in the undo history? +fun bool CanRedo=2016(,) + +# Retrieve the line number at which a particular marker is located. +fun int MarkerLineFromHandle=2017(int markerHandle,) + +# Delete a marker. +fun void MarkerDeleteHandle=2018(int markerHandle,) + +# Is undo history being collected? +get bool GetUndoCollection=2019(,) + +enu WhiteSpace=SCWS_ +val SCWS_INVISIBLE=0 +val SCWS_VISIBLEALWAYS=1 +val SCWS_VISIBLEAFTERINDENT=2 +val SCWS_VISIBLEONLYININDENT=3 + +# Are white space characters currently visible? +# Returns one of SCWS_* constants. +get int GetViewWS=2020(,) + +# Make white space characters invisible, always visible or visible outside indentation. +set void SetViewWS=2021(int viewWS,) + +enu TabDrawMode=SCTD_ +val SCTD_LONGARROW=0 +val SCTD_STRIKEOUT=1 + +# Retrieve the current tab draw mode. +# Returns one of SCTD_* constants. +get int GetTabDrawMode=2698(,) + +# Set how tabs are drawn when visible. +set void SetTabDrawMode=2699(int tabDrawMode,) + +# Find the position from a point within the window. +fun position PositionFromPoint=2022(int x, int y) + +# Find the position from a point within the window but return +# INVALID_POSITION if not close to text. +fun position PositionFromPointClose=2023(int x, int y) + +# Set caret to start of a line and ensure it is visible. +fun void GotoLine=2024(int line,) + +# Set caret to a position and ensure it is visible. +fun void GotoPos=2025(position caret,) + +# Set the selection anchor to a position. The anchor is the opposite +# end of the selection from the caret. +set void SetAnchor=2026(position anchor,) + +# Retrieve the text of the line containing the caret. +# Returns the index of the caret on the line. +# Result is NUL-terminated. +fun int GetCurLine=2027(int length, stringresult text) + +# Retrieve the position of the last correctly styled character. +get position GetEndStyled=2028(,) + +enu EndOfLine=SC_EOL_ +val SC_EOL_CRLF=0 +val SC_EOL_CR=1 +val SC_EOL_LF=2 + +# Convert all line endings in the document to one mode. +fun void ConvertEOLs=2029(int eolMode,) + +# Retrieve the current end of line mode - one of CRLF, CR, or LF. +get int GetEOLMode=2030(,) + +# Set the current end of line mode. +set void SetEOLMode=2031(int eolMode,) + +# Set the current styling position to start. +# The unused parameter is no longer used and should be set to 0. +fun void StartStyling=2032(position start, int unused) + +# Change style from current styling position for length characters to a style +# and move the current styling position to after this newly styled segment. +fun void SetStyling=2033(int length, int style) + +# Is drawing done first into a buffer or direct to the screen? +get bool GetBufferedDraw=2034(,) + +# If drawing is buffered then each line of text is drawn into a bitmap buffer +# before drawing it to the screen to avoid flicker. +set void SetBufferedDraw=2035(bool buffered,) + +# Change the visible size of a tab to be a multiple of the width of a space character. +set void SetTabWidth=2036(int tabWidth,) + +# Retrieve the visible size of a tab. +get int GetTabWidth=2121(,) + +# Clear explicit tabstops on a line. +fun void ClearTabStops=2675(int line,) + +# Add an explicit tab stop for a line. +fun void AddTabStop=2676(int line, int x) + +# Find the next explicit tab stop position on a line after a position. +fun int GetNextTabStop=2677(int line, int x) + +# The SC_CP_UTF8 value can be used to enter Unicode mode. +# This is the same value as CP_UTF8 in Windows +val SC_CP_UTF8=65001 + +# Set the code page used to interpret the bytes of the document as characters. +# The SC_CP_UTF8 value can be used to enter Unicode mode. +set void SetCodePage=2037(int codePage,) + +enu IMEInteraction=SC_IME_ +val SC_IME_WINDOWED=0 +val SC_IME_INLINE=1 + +# Is the IME displayed in a window or inline? +get int GetIMEInteraction=2678(,) + +# Choose to display the the IME in a winow or inline. +set void SetIMEInteraction=2679(int imeInteraction,) + +enu MarkerSymbol=SC_MARK_ +val MARKER_MAX=31 +val SC_MARK_CIRCLE=0 +val SC_MARK_ROUNDRECT=1 +val SC_MARK_ARROW=2 +val SC_MARK_SMALLRECT=3 +val SC_MARK_SHORTARROW=4 +val SC_MARK_EMPTY=5 +val SC_MARK_ARROWDOWN=6 +val SC_MARK_MINUS=7 +val SC_MARK_PLUS=8 + +# Shapes used for outlining column. +val SC_MARK_VLINE=9 +val SC_MARK_LCORNER=10 +val SC_MARK_TCORNER=11 +val SC_MARK_BOXPLUS=12 +val SC_MARK_BOXPLUSCONNECTED=13 +val SC_MARK_BOXMINUS=14 +val SC_MARK_BOXMINUSCONNECTED=15 +val SC_MARK_LCORNERCURVE=16 +val SC_MARK_TCORNERCURVE=17 +val SC_MARK_CIRCLEPLUS=18 +val SC_MARK_CIRCLEPLUSCONNECTED=19 +val SC_MARK_CIRCLEMINUS=20 +val SC_MARK_CIRCLEMINUSCONNECTED=21 + +# Invisible mark that only sets the line background colour. +val SC_MARK_BACKGROUND=22 +val SC_MARK_DOTDOTDOT=23 +val SC_MARK_ARROWS=24 +val SC_MARK_PIXMAP=25 +val SC_MARK_FULLRECT=26 +val SC_MARK_LEFTRECT=27 +val SC_MARK_AVAILABLE=28 +val SC_MARK_UNDERLINE=29 +val SC_MARK_RGBAIMAGE=30 +val SC_MARK_BOOKMARK=31 + +val SC_MARK_CHARACTER=10000 + +enu MarkerOutline=SC_MARKNUM_ +# Markers used for outlining column. +val SC_MARKNUM_FOLDEREND=25 +val SC_MARKNUM_FOLDEROPENMID=26 +val SC_MARKNUM_FOLDERMIDTAIL=27 +val SC_MARKNUM_FOLDERTAIL=28 +val SC_MARKNUM_FOLDERSUB=29 +val SC_MARKNUM_FOLDER=30 +val SC_MARKNUM_FOLDEROPEN=31 + +val SC_MASK_FOLDERS=0xFE000000 + +# Set the symbol used for a particular marker number. +fun void MarkerDefine=2040(int markerNumber, int markerSymbol) + +# Set the foreground colour used for a particular marker number. +set void MarkerSetFore=2041(int markerNumber, colour fore) + +# Set the background colour used for a particular marker number. +set void MarkerSetBack=2042(int markerNumber, colour back) + +# Set the background colour used for a particular marker number when its folding block is selected. +set void MarkerSetBackSelected=2292(int markerNumber, colour back) + +# Enable/disable highlight for current folding bloc (smallest one that contains the caret) +fun void MarkerEnableHighlight=2293(bool enabled,) + +# Add a marker to a line, returning an ID which can be used to find or delete the marker. +fun int MarkerAdd=2043(int line, int markerNumber) + +# Delete a marker from a line. +fun void MarkerDelete=2044(int line, int markerNumber) + +# Delete all markers with a particular number from all lines. +fun void MarkerDeleteAll=2045(int markerNumber,) + +# Get a bit mask of all the markers set on a line. +fun int MarkerGet=2046(int line,) + +# Find the next line at or after lineStart that includes a marker in mask. +# Return -1 when no more lines. +fun int MarkerNext=2047(int lineStart, int markerMask) + +# Find the previous line before lineStart that includes a marker in mask. +fun int MarkerPrevious=2048(int lineStart, int markerMask) + +# Define a marker from a pixmap. +fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) + +# Add a set of markers to a line. +fun void MarkerAddSet=2466(int line, int markerSet) + +# Set the alpha used for a marker that is drawn in the text area, not the margin. +set void MarkerSetAlpha=2476(int markerNumber, int alpha) + +val SC_MAX_MARGIN=4 + +enu MarginType=SC_MARGIN_ +val SC_MARGIN_SYMBOL=0 +val SC_MARGIN_NUMBER=1 +val SC_MARGIN_BACK=2 +val SC_MARGIN_FORE=3 +val SC_MARGIN_TEXT=4 +val SC_MARGIN_RTEXT=5 +val SC_MARGIN_COLOUR=6 + +# Set a margin to be either numeric or symbolic. +set void SetMarginTypeN=2240(int margin, int marginType) + +# Retrieve the type of a margin. +get int GetMarginTypeN=2241(int margin,) + +# Set the width of a margin to a width expressed in pixels. +set void SetMarginWidthN=2242(int margin, int pixelWidth) + +# Retrieve the width of a margin in pixels. +get int GetMarginWidthN=2243(int margin,) + +# Set a mask that determines which markers are displayed in a margin. +set void SetMarginMaskN=2244(int margin, int mask) + +# Retrieve the marker mask of a margin. +get int GetMarginMaskN=2245(int margin,) + +# Make a margin sensitive or insensitive to mouse clicks. +set void SetMarginSensitiveN=2246(int margin, bool sensitive) + +# Retrieve the mouse click sensitivity of a margin. +get bool GetMarginSensitiveN=2247(int margin,) + +# Set the cursor shown when the mouse is inside a margin. +set void SetMarginCursorN=2248(int margin, int cursor) + +# Retrieve the cursor shown in a margin. +get int GetMarginCursorN=2249(int margin,) + +# Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. +set void SetMarginBackN=2250(int margin, colour back) + +# Retrieve the background colour of a margin +get colour GetMarginBackN=2251(int margin,) + +# Allocate a non-standard number of margins. +set void SetMargins=2252(int margins,) + +# How many margins are there?. +get int GetMargins=2253(,) + +# Styles in range 32..39 are predefined for parts of the UI and are not used as normal styles. +enu StylesCommon=STYLE_ +val STYLE_DEFAULT=32 +val STYLE_LINENUMBER=33 +val STYLE_BRACELIGHT=34 +val STYLE_BRACEBAD=35 +val STYLE_CONTROLCHAR=36 +val STYLE_INDENTGUIDE=37 +val STYLE_CALLTIP=38 +val STYLE_FOLDDISPLAYTEXT=39 +val STYLE_LASTPREDEFINED=39 +val STYLE_MAX=255 + +# Character set identifiers are used in StyleSetCharacterSet. +# The values are the same as the Windows *_CHARSET values. +enu CharacterSet=SC_CHARSET_ +val SC_CHARSET_ANSI=0 +val SC_CHARSET_DEFAULT=1 +val SC_CHARSET_BALTIC=186 +val SC_CHARSET_CHINESEBIG5=136 +val SC_CHARSET_EASTEUROPE=238 +val SC_CHARSET_GB2312=134 +val SC_CHARSET_GREEK=161 +val SC_CHARSET_HANGUL=129 +val SC_CHARSET_MAC=77 +val SC_CHARSET_OEM=255 +val SC_CHARSET_RUSSIAN=204 +val SC_CHARSET_OEM866=866 +val SC_CHARSET_CYRILLIC=1251 +val SC_CHARSET_SHIFTJIS=128 +val SC_CHARSET_SYMBOL=2 +val SC_CHARSET_TURKISH=162 +val SC_CHARSET_JOHAB=130 +val SC_CHARSET_HEBREW=177 +val SC_CHARSET_ARABIC=178 +val SC_CHARSET_VIETNAMESE=163 +val SC_CHARSET_THAI=222 +val SC_CHARSET_8859_15=1000 + +# Clear all the styles and make equivalent to the global default style. +fun void StyleClearAll=2050(,) + +# Set the foreground colour of a style. +set void StyleSetFore=2051(int style, colour fore) + +# Set the background colour of a style. +set void StyleSetBack=2052(int style, colour back) + +# Set a style to be bold or not. +set void StyleSetBold=2053(int style, bool bold) + +# Set a style to be italic or not. +set void StyleSetItalic=2054(int style, bool italic) + +# Set the size of characters of a style. +set void StyleSetSize=2055(int style, int sizePoints) + +# Set the font of a style. +set void StyleSetFont=2056(int style, string fontName) + +# Set a style to have its end of line filled or not. +set void StyleSetEOLFilled=2057(int style, bool eolFilled) + +# Reset the default style to its state at startup +fun void StyleResetDefault=2058(,) + +# Set a style to be underlined or not. +set void StyleSetUnderline=2059(int style, bool underline) + +enu CaseVisible=SC_CASE_ +val SC_CASE_MIXED=0 +val SC_CASE_UPPER=1 +val SC_CASE_LOWER=2 +val SC_CASE_CAMEL=3 + +# Get the foreground colour of a style. +get colour StyleGetFore=2481(int style,) + +# Get the background colour of a style. +get colour StyleGetBack=2482(int style,) + +# Get is a style bold or not. +get bool StyleGetBold=2483(int style,) + +# Get is a style italic or not. +get bool StyleGetItalic=2484(int style,) + +# Get the size of characters of a style. +get int StyleGetSize=2485(int style,) + +# Get the font of a style. +# Returns the length of the fontName +# Result is NUL-terminated. +get int StyleGetFont=2486(int style, stringresult fontName) + +# Get is a style to have its end of line filled or not. +get bool StyleGetEOLFilled=2487(int style,) + +# Get is a style underlined or not. +get bool StyleGetUnderline=2488(int style,) + +# Get is a style mixed case, or to force upper or lower case. +get int StyleGetCase=2489(int style,) + +# Get the character get of the font in a style. +get int StyleGetCharacterSet=2490(int style,) + +# Get is a style visible or not. +get bool StyleGetVisible=2491(int style,) + +# Get is a style changeable or not (read only). +# Experimental feature, currently buggy. +get bool StyleGetChangeable=2492(int style,) + +# Get is a style a hotspot or not. +get bool StyleGetHotSpot=2493(int style,) + +# Set a style to be mixed case, or to force upper or lower case. +set void StyleSetCase=2060(int style, int caseVisible) + +val SC_FONT_SIZE_MULTIPLIER=100 + +# Set the size of characters of a style. Size is in points multiplied by 100. +set void StyleSetSizeFractional=2061(int style, int sizeHundredthPoints) + +# Get the size of characters of a style in points multiplied by 100 +get int StyleGetSizeFractional=2062(int style,) + +enu FontWeight=SC_WEIGHT_ +val SC_WEIGHT_NORMAL=400 +val SC_WEIGHT_SEMIBOLD=600 +val SC_WEIGHT_BOLD=700 + +# Set the weight of characters of a style. +set void StyleSetWeight=2063(int style, int weight) + +# Get the weight of characters of a style. +get int StyleGetWeight=2064(int style,) + +# Set the character set of the font in a style. +set void StyleSetCharacterSet=2066(int style, int characterSet) + +# Set a style to be a hotspot or not. +set void StyleSetHotSpot=2409(int style, bool hotspot) + +# Set the foreground colour of the main and additional selections and whether to use this setting. +fun void SetSelFore=2067(bool useSetting, colour fore) + +# Set the background colour of the main and additional selections and whether to use this setting. +fun void SetSelBack=2068(bool useSetting, colour back) + +# Get the alpha of the selection. +get int GetSelAlpha=2477(,) + +# Set the alpha of the selection. +set void SetSelAlpha=2478(int alpha,) + +# Is the selection end of line filled? +get bool GetSelEOLFilled=2479(,) + +# Set the selection to have its end of line filled or not. +set void SetSelEOLFilled=2480(bool filled,) + +# Set the foreground colour of the caret. +set void SetCaretFore=2069(colour fore,) + +# When key+modifier combination keyDefinition is pressed perform sciCommand. +fun void AssignCmdKey=2070(keymod keyDefinition, int sciCommand) + +# When key+modifier combination keyDefinition is pressed do nothing. +fun void ClearCmdKey=2071(keymod keyDefinition,) + +# Drop all key mappings. +fun void ClearAllCmdKeys=2072(,) + +# Set the styles for a segment of the document. +fun void SetStylingEx=2073(int length, string styles) + +# Set a style to be visible or not. +set void StyleSetVisible=2074(int style, bool visible) + +# Get the time in milliseconds that the caret is on and off. +get int GetCaretPeriod=2075(,) + +# Get the time in milliseconds that the caret is on and off. 0 = steady on. +set void SetCaretPeriod=2076(int periodMilliseconds,) + +# Set the set of characters making up words for when moving or selecting by word. +# First sets defaults like SetCharsDefault. +set void SetWordChars=2077(, string characters) + +# Get the set of characters making up words for when moving or selecting by word. +# Returns the number of characters +get int GetWordChars=2646(, stringresult characters) + +# Start a sequence of actions that is undone and redone as a unit. +# May be nested. +fun void BeginUndoAction=2078(,) + +# End a sequence of actions that is undone and redone as a unit. +fun void EndUndoAction=2079(,) + +# Indicator style enumeration and some constants +enu IndicatorStyle=INDIC_ +val INDIC_PLAIN=0 +val INDIC_SQUIGGLE=1 +val INDIC_TT=2 +val INDIC_DIAGONAL=3 +val INDIC_STRIKE=4 +val INDIC_HIDDEN=5 +val INDIC_BOX=6 +val INDIC_ROUNDBOX=7 +val INDIC_STRAIGHTBOX=8 +val INDIC_DASH=9 +val INDIC_DOTS=10 +val INDIC_SQUIGGLELOW=11 +val INDIC_DOTBOX=12 +val INDIC_SQUIGGLEPIXMAP=13 +val INDIC_COMPOSITIONTHICK=14 +val INDIC_COMPOSITIONTHIN=15 +val INDIC_FULLBOX=16 +val INDIC_TEXTFORE=17 +val INDIC_POINT=18 +val INDIC_POINTCHARACTER=19 +val INDIC_GRADIENT=20 +val INDIC_GRADIENTCENTRE=21 +val INDIC_IME=32 +val INDIC_IME_MAX=35 +val INDIC_MAX=35 +val INDIC_CONTAINER=8 +val INDIC0_MASK=0x20 +val INDIC1_MASK=0x40 +val INDIC2_MASK=0x80 +val INDICS_MASK=0xE0 + +# Set an indicator to plain, squiggle or TT. +set void IndicSetStyle=2080(int indicator, int indicatorStyle) + +# Retrieve the style of an indicator. +get int IndicGetStyle=2081(int indicator,) + +# Set the foreground colour of an indicator. +set void IndicSetFore=2082(int indicator, colour fore) + +# Retrieve the foreground colour of an indicator. +get colour IndicGetFore=2083(int indicator,) + +# Set an indicator to draw under text or over(default). +set void IndicSetUnder=2510(int indicator, bool under) + +# Retrieve whether indicator drawn under or over text. +get bool IndicGetUnder=2511(int indicator,) + +# Set a hover indicator to plain, squiggle or TT. +set void IndicSetHoverStyle=2680(int indicator, int indicatorStyle) + +# Retrieve the hover style of an indicator. +get int IndicGetHoverStyle=2681(int indicator,) + +# Set the foreground hover colour of an indicator. +set void IndicSetHoverFore=2682(int indicator, colour fore) + +# Retrieve the foreground hover colour of an indicator. +get colour IndicGetHoverFore=2683(int indicator,) + +val SC_INDICVALUEBIT=0x1000000 +val SC_INDICVALUEMASK=0xFFFFFF + +enu IndicFlag=SC_INDICFLAG_ +val SC_INDICFLAG_VALUEFORE=1 + +# Set the attributes of an indicator. +set void IndicSetFlags=2684(int indicator, int flags) + +# Retrieve the attributes of an indicator. +get int IndicGetFlags=2685(int indicator,) + +# Set the foreground colour of all whitespace and whether to use this setting. +fun void SetWhitespaceFore=2084(bool useSetting, colour fore) + +# Set the background colour of all whitespace and whether to use this setting. +fun void SetWhitespaceBack=2085(bool useSetting, colour back) + +# Set the size of the dots used to mark space characters. +set void SetWhitespaceSize=2086(int size,) + +# Get the size of the dots used to mark space characters. +get int GetWhitespaceSize=2087(,) + +# Used to hold extra styling information for each line. +set void SetLineState=2092(int line, int state) + +# Retrieve the extra styling information for a line. +get int GetLineState=2093(int line,) + +# Retrieve the last line number that has line state. +get int GetMaxLineState=2094(,) + +# Is the background of the line containing the caret in a different colour? +get bool GetCaretLineVisible=2095(,) + +# Display the background of the line containing the caret in a different colour. +set void SetCaretLineVisible=2096(bool show,) + +# Get the colour of the background of the line containing the caret. +get colour GetCaretLineBack=2097(,) + +# Set the colour of the background of the line containing the caret. +set void SetCaretLineBack=2098(colour back,) + +# Retrieve the caret line frame width. +# Width = 0 means this option is disabled. +get int GetCaretLineFrame=2704(,) + +# Display the caret line framed. +# Set width != 0 to enable this option and width = 0 to disable it. +set void SetCaretLineFrame=2705(int width,) + +# Set a style to be changeable or not (read only). +# Experimental feature, currently buggy. +set void StyleSetChangeable=2099(int style, bool changeable) + +# Display a auto-completion list. +# The lengthEntered parameter indicates how many characters before +# the caret should be used to provide context. +fun void AutoCShow=2100(int lengthEntered, string itemList) + +# Remove the auto-completion list from the screen. +fun void AutoCCancel=2101(,) + +# Is there an auto-completion list visible? +fun bool AutoCActive=2102(,) + +# Retrieve the position of the caret when the auto-completion list was displayed. +fun position AutoCPosStart=2103(,) + +# User has selected an item so remove the list and insert the selection. +fun void AutoCComplete=2104(,) + +# Define a set of character that when typed cancel the auto-completion list. +fun void AutoCStops=2105(, string characterSet) + +# Change the separator character in the string setting up an auto-completion list. +# Default is space but can be changed if items contain space. +set void AutoCSetSeparator=2106(int separatorCharacter,) + +# Retrieve the auto-completion list separator character. +get int AutoCGetSeparator=2107(,) + +# Select the item in the auto-completion list that starts with a string. +fun void AutoCSelect=2108(, string select) + +# Should the auto-completion list be cancelled if the user backspaces to a +# position before where the box was created. +set void AutoCSetCancelAtStart=2110(bool cancel,) + +# Retrieve whether auto-completion cancelled by backspacing before start. +get bool AutoCGetCancelAtStart=2111(,) + +# Define a set of characters that when typed will cause the autocompletion to +# choose the selected item. +set void AutoCSetFillUps=2112(, string characterSet) + +# Should a single item auto-completion list automatically choose the item. +set void AutoCSetChooseSingle=2113(bool chooseSingle,) + +# Retrieve whether a single item auto-completion list automatically choose the item. +get bool AutoCGetChooseSingle=2114(,) + +# Set whether case is significant when performing auto-completion searches. +set void AutoCSetIgnoreCase=2115(bool ignoreCase,) + +# Retrieve state of ignore case flag. +get bool AutoCGetIgnoreCase=2116(,) + +# Display a list of strings and send notification when user chooses one. +fun void UserListShow=2117(int listType, string itemList) + +# Set whether or not autocompletion is hidden automatically when nothing matches. +set void AutoCSetAutoHide=2118(bool autoHide,) + +# Retrieve whether or not autocompletion is hidden automatically when nothing matches. +get bool AutoCGetAutoHide=2119(,) + +# Set whether or not autocompletion deletes any word characters +# after the inserted text upon completion. +set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,) + +# Retrieve whether or not autocompletion deletes any word characters +# after the inserted text upon completion. +get bool AutoCGetDropRestOfWord=2271(,) + +# Register an XPM image for use in autocompletion lists. +fun void RegisterImage=2405(int type, string xpmData) + +# Clear all the registered XPM images. +fun void ClearRegisteredImages=2408(,) + +# Retrieve the auto-completion list type-separator character. +get int AutoCGetTypeSeparator=2285(,) + +# Change the type-separator character in the string setting up an auto-completion list. +# Default is '?' but can be changed if items contain '?'. +set void AutoCSetTypeSeparator=2286(int separatorCharacter,) + +# Set the maximum width, in characters, of auto-completion and user lists. +# Set to 0 to autosize to fit longest item, which is the default. +set void AutoCSetMaxWidth=2208(int characterCount,) + +# Get the maximum width, in characters, of auto-completion and user lists. +get int AutoCGetMaxWidth=2209(,) + +# Set the maximum height, in rows, of auto-completion and user lists. +# The default is 5 rows. +set void AutoCSetMaxHeight=2210(int rowCount,) + +# Set the maximum height, in rows, of auto-completion and user lists. +get int AutoCGetMaxHeight=2211(,) + +# Set the number of spaces used for one level of indentation. +set void SetIndent=2122(int indentSize,) + +# Retrieve indentation size. +get int GetIndent=2123(,) + +# Indentation will only use space characters if useTabs is false, otherwise +# it will use a combination of tabs and spaces. +set void SetUseTabs=2124(bool useTabs,) + +# Retrieve whether tabs will be used in indentation. +get bool GetUseTabs=2125(,) + +# Change the indentation of a line to a number of columns. +set void SetLineIndentation=2126(int line, int indentation) + +# Retrieve the number of columns that a line is indented. +get int GetLineIndentation=2127(int line,) + +# Retrieve the position before the first non indentation character on a line. +get position GetLineIndentPosition=2128(int line,) + +# Retrieve the column number of a position, taking tab width into account. +get int GetColumn=2129(position pos,) + +# Count characters between two positions. +fun int CountCharacters=2633(position start, position end) + +# Count code units between two positions. +fun int CountCodeUnits=2715(position start, position end) + +# Show or hide the horizontal scroll bar. +set void SetHScrollBar=2130(bool visible,) +# Is the horizontal scroll bar visible? +get bool GetHScrollBar=2131(,) + +enu IndentView=SC_IV_ +val SC_IV_NONE=0 +val SC_IV_REAL=1 +val SC_IV_LOOKFORWARD=2 +val SC_IV_LOOKBOTH=3 + +# Show or hide indentation guides. +set void SetIndentationGuides=2132(int indentView,) + +# Are the indentation guides visible? +get int GetIndentationGuides=2133(,) + +# Set the highlighted indentation guide column. +# 0 = no highlighted guide. +set void SetHighlightGuide=2134(int column,) + +# Get the highlighted indentation guide column. +get int GetHighlightGuide=2135(,) + +# Get the position after the last visible characters on a line. +get position GetLineEndPosition=2136(int line,) + +# Get the code page used to interpret the bytes of the document as characters. +get int GetCodePage=2137(,) + +# Get the foreground colour of the caret. +get colour GetCaretFore=2138(,) + +# In read-only mode? +get bool GetReadOnly=2140(,) + +# Sets the position of the caret. +set void SetCurrentPos=2141(position caret,) + +# Sets the position that starts the selection - this becomes the anchor. +set void SetSelectionStart=2142(position anchor,) + +# Returns the position at the start of the selection. +get position GetSelectionStart=2143(,) + +# Sets the position that ends the selection - this becomes the caret. +set void SetSelectionEnd=2144(position caret,) + +# Returns the position at the end of the selection. +get position GetSelectionEnd=2145(,) + +# Set caret to a position, while removing any existing selection. +fun void SetEmptySelection=2556(position caret,) + +# Sets the print magnification added to the point size of each style for printing. +set void SetPrintMagnification=2146(int magnification,) + +# Returns the print magnification. +get int GetPrintMagnification=2147(,) + +enu PrintOption=SC_PRINT_ +# PrintColourMode - use same colours as screen. +# with the exception of line number margins, which use a white background +val SC_PRINT_NORMAL=0 +# PrintColourMode - invert the light value of each style for printing. +val SC_PRINT_INVERTLIGHT=1 +# PrintColourMode - force black text on white background for printing. +val SC_PRINT_BLACKONWHITE=2 +# PrintColourMode - text stays coloured, but all background is forced to be white for printing. +val SC_PRINT_COLOURONWHITE=3 +# PrintColourMode - only the default-background is forced to be white for printing. +val SC_PRINT_COLOURONWHITEDEFAULTBG=4 +# PrintColourMode - use same colours as screen, including line number margins. +val SC_PRINT_SCREENCOLOURS=5 + +# Modify colours when printing for clearer printed text. +set void SetPrintColourMode=2148(int mode,) + +# Returns the print colour mode. +get int GetPrintColourMode=2149(,) + +enu FindOption=SCFIND_ +val SCFIND_WHOLEWORD=0x2 +val SCFIND_MATCHCASE=0x4 +val SCFIND_WORDSTART=0x00100000 +val SCFIND_REGEXP=0x00200000 +val SCFIND_POSIX=0x00400000 +val SCFIND_CXX11REGEX=0x00800000 + +# Find some text in the document. +fun position FindText=2150(int searchFlags, findtext ft) + +# On Windows, will draw the document into a display context such as a printer. +fun position FormatRange=2151(bool draw, formatrange fr) + +# Retrieve the display line at the top of the display. +get int GetFirstVisibleLine=2152(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int GetLine=2153(int line, stringresult text) + +# Returns the number of lines in the document. There is always at least one. +get int GetLineCount=2154(,) + +# Sets the size in pixels of the left margin. +set void SetMarginLeft=2155(, int pixelWidth) + +# Returns the size in pixels of the left margin. +get int GetMarginLeft=2156(,) + +# Sets the size in pixels of the right margin. +set void SetMarginRight=2157(, int pixelWidth) + +# Returns the size in pixels of the right margin. +get int GetMarginRight=2158(,) + +# Is the document different from when it was last saved? +get bool GetModify=2159(,) + +# Select a range of text. +fun void SetSel=2160(position anchor, position caret) + +# Retrieve the selected text. +# Return the length of the text. +# Result is NUL-terminated. +fun int GetSelText=2161(, stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int GetTextRange=2162(, textrange tr) + +# Draw the selection either highlighted or in normal (non-highlighted) style. +fun void HideSelection=2163(bool hide,) + +# Retrieve the x value of the point in the window where a position is displayed. +fun int PointXFromPosition=2164(, position pos) + +# Retrieve the y value of the point in the window where a position is displayed. +fun int PointYFromPosition=2165(, position pos) + +# Retrieve the line containing a position. +fun int LineFromPosition=2166(position pos,) + +# Retrieve the position at the start of a line. +fun position PositionFromLine=2167(int line,) + +# Scroll horizontally and vertically. +fun void LineScroll=2168(int columns, int lines) + +# Ensure the caret is visible. +fun void ScrollCaret=2169(,) + +# Scroll the argument positions and the range between them into view giving +# priority to the primary position then the secondary position. +# This may be used to make a search match visible. +fun void ScrollRange=2569(position secondary, position primary) + +# Replace the selected text with the argument text. +fun void ReplaceSel=2170(, string text) + +# Set to read only or read write. +set void SetReadOnly=2171(bool readOnly,) + +# Null operation. +fun void Null=2172(,) + +# Will a paste succeed? +fun bool CanPaste=2173(,) + +# Are there any undoable actions in the undo history? +fun bool CanUndo=2174(,) + +# Delete the undo history. +fun void EmptyUndoBuffer=2175(,) + +# Undo one action in the undo history. +fun void Undo=2176(,) + +# Cut the selection to the clipboard. +fun void Cut=2177(,) + +# Copy the selection to the clipboard. +fun void Copy=2178(,) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void Paste=2179(,) + +# Clear the selection. +fun void Clear=2180(,) + +# Replace the contents of the document with the argument text. +fun void SetText=2181(, string text) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +# Result is NUL-terminated. +fun int GetText=2182(int length, stringresult text) + +# Retrieve the number of characters in the document. +get int GetTextLength=2183(,) + +# Retrieve a pointer to a function that processes messages for this Scintilla. +get int GetDirectFunction=2184(,) + +# Retrieve a pointer value to use as the first argument when calling +# the function returned by GetDirectFunction. +get int GetDirectPointer=2185(,) + +# Set to overtype (true) or insert mode. +set void SetOvertype=2186(bool overType,) + +# Returns true if overtype mode is active otherwise false is returned. +get bool GetOvertype=2187(,) + +# Set the width of the insert mode caret. +set void SetCaretWidth=2188(int pixelWidth,) + +# Returns the width of the insert mode caret. +get int GetCaretWidth=2189(,) + +# Sets the position that starts the target which is used for updating the +# document without affecting the scroll position. +set void SetTargetStart=2190(position start,) + +# Get the position that starts the target. +get position GetTargetStart=2191(,) + +# Sets the position that ends the target which is used for updating the +# document without affecting the scroll position. +set void SetTargetEnd=2192(position end,) + +# Get the position that ends the target. +get position GetTargetEnd=2193(,) + +# Sets both the start and end of the target in one call. +fun void SetTargetRange=2686(position start, position end) + +# Retrieve the text in the target. +get int GetTargetText=2687(, stringresult text) + +# Make the target range start and end be the same as the selection range start and end. +fun void TargetFromSelection=2287(,) + +# Sets the target to the whole document. +fun void TargetWholeDocument=2690(,) + +# Replace the target text with the argument text. +# Text is counted so it can contain NULs. +# Returns the length of the replacement text. +fun int ReplaceTarget=2194(int length, string text) + +# Replace the target text with the argument text after \d processing. +# Text is counted so it can contain NULs. +# Looks for \d where d is between 1 and 9 and replaces these with the strings +# matched in the last search operation which were surrounded by \( and \). +# Returns the length of the replacement text including any change +# caused by processing the \d patterns. +fun int ReplaceTargetRE=2195(int length, string text) + +# Search for a counted string in the target and set the target to the found +# range. Text is counted so it can contain NULs. +# Returns length of range or -1 for failure in which case target is not moved. +fun int SearchInTarget=2197(int length, string text) + +# Set the search flags used by SearchInTarget. +set void SetSearchFlags=2198(int searchFlags,) + +# Get the search flags used by SearchInTarget. +get int GetSearchFlags=2199(,) + +# Show a call tip containing a definition near position pos. +fun void CallTipShow=2200(position pos, string definition) + +# Remove the call tip from the screen. +fun void CallTipCancel=2201(,) + +# Is there an active call tip? +fun bool CallTipActive=2202(,) + +# Retrieve the position where the caret was before displaying the call tip. +fun position CallTipPosStart=2203(,) + +# Set the start position in order to change when backspacing removes the calltip. +set void CallTipSetPosStart=2214(int posStart,) + +# Highlight a segment of the definition. +fun void CallTipSetHlt=2204(int highlightStart, int highlightEnd) + +# Set the background colour for the call tip. +set void CallTipSetBack=2205(colour back,) + +# Set the foreground colour for the call tip. +set void CallTipSetFore=2206(colour fore,) + +# Set the foreground colour for the highlighted part of the call tip. +set void CallTipSetForeHlt=2207(colour fore,) + +# Enable use of STYLE_CALLTIP and set call tip tab size in pixels. +set void CallTipUseStyle=2212(int tabSize,) + +# Set position of calltip, above or below text. +set void CallTipSetPosition=2213(bool above,) + +# Find the display line of a document line taking hidden lines into account. +fun int VisibleFromDocLine=2220(int docLine,) + +# Find the document line of a display line taking hidden lines into account. +fun int DocLineFromVisible=2221(int displayLine,) + +# The number of display lines needed to wrap a document line +fun int WrapCount=2235(int docLine,) + +enu FoldLevel=SC_FOLDLEVEL +val SC_FOLDLEVELBASE=0x400 +val SC_FOLDLEVELWHITEFLAG=0x1000 +val SC_FOLDLEVELHEADERFLAG=0x2000 +val SC_FOLDLEVELNUMBERMASK=0x0FFF + +# Set the fold level of a line. +# This encodes an integer level along with flags indicating whether the +# line is a header and whether it is effectively white space. +set void SetFoldLevel=2222(int line, int level) + +# Retrieve the fold level of a line. +get int GetFoldLevel=2223(int line,) + +# Find the last child line of a header line. +get int GetLastChild=2224(int line, int level) + +# Find the parent line of a child line. +get int GetFoldParent=2225(int line,) + +# Make a range of lines visible. +fun void ShowLines=2226(int lineStart, int lineEnd) + +# Make a range of lines invisible. +fun void HideLines=2227(int lineStart, int lineEnd) + +# Is a line visible? +get bool GetLineVisible=2228(int line,) + +# Are all lines visible? +get bool GetAllLinesVisible=2236(,) + +# Show the children of a header line. +set void SetFoldExpanded=2229(int line, bool expanded) + +# Is a header line expanded? +get bool GetFoldExpanded=2230(int line,) + +# Switch a header line between expanded and contracted. +fun void ToggleFold=2231(int line,) + +# Switch a header line between expanded and contracted and show some text after the line. +fun void ToggleFoldShowText=2700(int line, string text) + +enu FoldDisplayTextStyle=SC_FOLDDISPLAYTEXT_ +val SC_FOLDDISPLAYTEXT_HIDDEN=0 +val SC_FOLDDISPLAYTEXT_STANDARD=1 +val SC_FOLDDISPLAYTEXT_BOXED=2 + +# Set the style of fold display text +set void FoldDisplayTextSetStyle=2701(int style,) + +enu FoldAction=SC_FOLDACTION_ +val SC_FOLDACTION_CONTRACT=0 +val SC_FOLDACTION_EXPAND=1 +val SC_FOLDACTION_TOGGLE=2 + +# Expand or contract a fold header. +fun void FoldLine=2237(int line, int action) + +# Expand or contract a fold header and its children. +fun void FoldChildren=2238(int line, int action) + +# Expand a fold header and all children. Use the level argument instead of the line's current level. +fun void ExpandChildren=2239(int line, int level) + +# Expand or contract all fold headers. +fun void FoldAll=2662(int action,) + +# Ensure a particular line is visible by expanding any header line hiding it. +fun void EnsureVisible=2232(int line,) + +enu AutomaticFold=SC_AUTOMATICFOLD_ +val SC_AUTOMATICFOLD_SHOW=0x0001 +val SC_AUTOMATICFOLD_CLICK=0x0002 +val SC_AUTOMATICFOLD_CHANGE=0x0004 + +# Set automatic folding behaviours. +set void SetAutomaticFold=2663(int automaticFold,) + +# Get automatic folding behaviours. +get int GetAutomaticFold=2664(,) + +enu FoldFlag=SC_FOLDFLAG_ +val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002 +val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004 +val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008 +val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 +val SC_FOLDFLAG_LEVELNUMBERS=0x0040 +val SC_FOLDFLAG_LINESTATE=0x0080 + +# Set some style options for folding. +set void SetFoldFlags=2233(int flags,) + +# Ensure a particular line is visible by expanding any header line hiding it. +# Use the currently set visibility policy to determine which range to display. +fun void EnsureVisibleEnforcePolicy=2234(int line,) + +# Sets whether a tab pressed when caret is within indentation indents. +set void SetTabIndents=2260(bool tabIndents,) + +# Does a tab pressed when caret is within indentation indent? +get bool GetTabIndents=2261(,) + +# Sets whether a backspace pressed when caret is within indentation unindents. +set void SetBackSpaceUnIndents=2262(bool bsUnIndents,) + +# Does a backspace pressed when caret is within indentation unindent? +get bool GetBackSpaceUnIndents=2263(,) + +val SC_TIME_FOREVER=10000000 + +# Sets the time the mouse must sit still to generate a mouse dwell event. +set void SetMouseDwellTime=2264(int periodMilliseconds,) + +# Retrieve the time the mouse must sit still to generate a mouse dwell event. +get int GetMouseDwellTime=2265(,) + +# Get position of start of word. +fun int WordStartPosition=2266(position pos, bool onlyWordCharacters) + +# Get position of end of word. +fun int WordEndPosition=2267(position pos, bool onlyWordCharacters) + +# Is the range start..end considered a word? +fun bool IsRangeWord=2691(position start, position end) + +enu IdleStyling=SC_IDLESTYLING_ +val SC_IDLESTYLING_NONE=0 +val SC_IDLESTYLING_TOVISIBLE=1 +val SC_IDLESTYLING_AFTERVISIBLE=2 +val SC_IDLESTYLING_ALL=3 + +# Sets limits to idle styling. +set void SetIdleStyling=2692(int idleStyling,) + +# Retrieve the limits to idle styling. +get int GetIdleStyling=2693(,) + +enu Wrap=SC_WRAP_ +val SC_WRAP_NONE=0 +val SC_WRAP_WORD=1 +val SC_WRAP_CHAR=2 +val SC_WRAP_WHITESPACE=3 + +# Sets whether text is word wrapped. +set void SetWrapMode=2268(int wrapMode,) + +# Retrieve whether text is word wrapped. +get int GetWrapMode=2269(,) + +enu WrapVisualFlag=SC_WRAPVISUALFLAG_ +val SC_WRAPVISUALFLAG_NONE=0x0000 +val SC_WRAPVISUALFLAG_END=0x0001 +val SC_WRAPVISUALFLAG_START=0x0002 +val SC_WRAPVISUALFLAG_MARGIN=0x0004 + +# Set the display mode of visual flags for wrapped lines. +set void SetWrapVisualFlags=2460(int wrapVisualFlags,) + +# Retrive the display mode of visual flags for wrapped lines. +get int GetWrapVisualFlags=2461(,) + +enu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_ +val SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000 +val SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001 +val SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002 + +# Set the location of visual flags for wrapped lines. +set void SetWrapVisualFlagsLocation=2462(int wrapVisualFlagsLocation,) + +# Retrive the location of visual flags for wrapped lines. +get int GetWrapVisualFlagsLocation=2463(,) + +# Set the start indent for wrapped lines. +set void SetWrapStartIndent=2464(int indent,) + +# Retrive the start indent for wrapped lines. +get int GetWrapStartIndent=2465(,) + +enu WrapIndentMode=SC_WRAPINDENT_ +val SC_WRAPINDENT_FIXED=0 +val SC_WRAPINDENT_SAME=1 +val SC_WRAPINDENT_INDENT=2 +val SC_WRAPINDENT_DEEPINDENT=3 + +# Sets how wrapped sublines are placed. Default is fixed. +set void SetWrapIndentMode=2472(int wrapIndentMode,) + +# Retrieve how wrapped sublines are placed. Default is fixed. +get int GetWrapIndentMode=2473(,) + +enu LineCache=SC_CACHE_ +val SC_CACHE_NONE=0 +val SC_CACHE_CARET=1 +val SC_CACHE_PAGE=2 +val SC_CACHE_DOCUMENT=3 + +# Sets the degree of caching of layout information. +set void SetLayoutCache=2272(int cacheMode,) + +# Retrieve the degree of caching of layout information. +get int GetLayoutCache=2273(,) + +# Sets the document width assumed for scrolling. +set void SetScrollWidth=2274(int pixelWidth,) + +# Retrieve the document width assumed for scrolling. +get int GetScrollWidth=2275(,) + +# Sets whether the maximum width line displayed is used to set scroll width. +set void SetScrollWidthTracking=2516(bool tracking,) + +# Retrieve whether the scroll width tracks wide lines. +get bool GetScrollWidthTracking=2517(,) + +# Measure the pixel width of some text in a particular style. +# NUL terminated text argument. +# Does not handle tab or control characters. +fun int TextWidth=2276(int style, string text) + +# Sets the scroll range so that maximum scroll position has +# the last line at the bottom of the view (default). +# Setting this to false allows scrolling one page below the last line. +set void SetEndAtLastLine=2277(bool endAtLastLine,) + +# Retrieve whether the maximum scroll position has the last +# line at the bottom of the view. +get bool GetEndAtLastLine=2278(,) + +# Retrieve the height of a particular line of text in pixels. +fun int TextHeight=2279(int line,) + +# Show or hide the vertical scroll bar. +set void SetVScrollBar=2280(bool visible,) + +# Is the vertical scroll bar visible? +get bool GetVScrollBar=2281(,) + +# Append a string to the end of the document without changing the selection. +fun void AppendText=2282(int length, string text) + +# Is drawing done in two phases with backgrounds drawn before foregrounds? +get bool GetTwoPhaseDraw=2283(,) + +# In twoPhaseDraw mode, drawing is performed in two phases, first the background +# and then the foreground. This avoids chopping off characters that overlap the next run. +set void SetTwoPhaseDraw=2284(bool twoPhase,) + +enu PhasesDraw=SC_PHASES_ +val SC_PHASES_ONE=0 +val SC_PHASES_TWO=1 +val SC_PHASES_MULTIPLE=2 + +# How many phases is drawing done in? +get int GetPhasesDraw=2673(,) + +# In one phase draw, text is drawn in a series of rectangular blocks with no overlap. +# In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. +# In multiple phase draw, each element is drawn over the whole drawing area, allowing text +# to overlap from one line to the next. +set void SetPhasesDraw=2674(int phases,) + +# Control font anti-aliasing. + +enu FontQuality=SC_EFF_ +val SC_EFF_QUALITY_MASK=0xF +val SC_EFF_QUALITY_DEFAULT=0 +val SC_EFF_QUALITY_NON_ANTIALIASED=1 +val SC_EFF_QUALITY_ANTIALIASED=2 +val SC_EFF_QUALITY_LCD_OPTIMIZED=3 + +# Choose the quality level for text from the FontQuality enumeration. +set void SetFontQuality=2611(int fontQuality,) + +# Retrieve the quality level for text. +get int GetFontQuality=2612(,) + +# Scroll so that a display line is at the top of the display. +set void SetFirstVisibleLine=2613(int displayLine,) + +enu MultiPaste=SC_MULTIPASTE_ +val SC_MULTIPASTE_ONCE=0 +val SC_MULTIPASTE_EACH=1 + +# Change the effect of pasting when there are multiple selections. +set void SetMultiPaste=2614(int multiPaste,) + +# Retrieve the effect of pasting when there are multiple selections. +get int GetMultiPaste=2615(,) + +# Retrieve the value of a tag from a regular expression search. +# Result is NUL-terminated. +get int GetTag=2616(int tagNumber, stringresult tagValue) + +# Join the lines in the target. +fun void LinesJoin=2288(,) + +# Split the lines in the target into lines that are less wide than pixelWidth +# where possible. +fun void LinesSplit=2289(int pixelWidth,) + +# Set one of the colours used as a chequerboard pattern in the fold margin +fun void SetFoldMarginColour=2290(bool useSetting, colour back) +# Set the other colour used as a chequerboard pattern in the fold margin +fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore) + +enu Accessibility=SC_ACCESSIBILITY_ +val SC_ACCESSIBILITY_DISABLED=0 +val SC_ACCESSIBILITY_ENABLED=1 + +# Enable or disable accessibility. +set void SetAccessibility=2702(int accessibility,) + +# Report accessibility status. +get int GetAccessibility=2703(,) + +## New messages go here + +## Start of key messages +# Move caret down one line. +fun void LineDown=2300(,) + +# Move caret down one line extending selection to new caret position. +fun void LineDownExtend=2301(,) + +# Move caret up one line. +fun void LineUp=2302(,) + +# Move caret up one line extending selection to new caret position. +fun void LineUpExtend=2303(,) + +# Move caret left one character. +fun void CharLeft=2304(,) + +# Move caret left one character extending selection to new caret position. +fun void CharLeftExtend=2305(,) + +# Move caret right one character. +fun void CharRight=2306(,) + +# Move caret right one character extending selection to new caret position. +fun void CharRightExtend=2307(,) + +# Move caret left one word. +fun void WordLeft=2308(,) + +# Move caret left one word extending selection to new caret position. +fun void WordLeftExtend=2309(,) + +# Move caret right one word. +fun void WordRight=2310(,) + +# Move caret right one word extending selection to new caret position. +fun void WordRightExtend=2311(,) + +# Move caret to first position on line. +fun void Home=2312(,) + +# Move caret to first position on line extending selection to new caret position. +fun void HomeExtend=2313(,) + +# Move caret to last position on line. +fun void LineEnd=2314(,) + +# Move caret to last position on line extending selection to new caret position. +fun void LineEndExtend=2315(,) + +# Move caret to first position in document. +fun void DocumentStart=2316(,) + +# Move caret to first position in document extending selection to new caret position. +fun void DocumentStartExtend=2317(,) + +# Move caret to last position in document. +fun void DocumentEnd=2318(,) + +# Move caret to last position in document extending selection to new caret position. +fun void DocumentEndExtend=2319(,) + +# Move caret one page up. +fun void PageUp=2320(,) + +# Move caret one page up extending selection to new caret position. +fun void PageUpExtend=2321(,) + +# Move caret one page down. +fun void PageDown=2322(,) + +# Move caret one page down extending selection to new caret position. +fun void PageDownExtend=2323(,) + +# Switch from insert to overtype mode or the reverse. +fun void EditToggleOvertype=2324(,) + +# Cancel any modes such as call tip or auto-completion list display. +fun void Cancel=2325(,) + +# Delete the selection or if no selection, the character before the caret. +fun void DeleteBack=2326(,) + +# If selection is empty or all on one line replace the selection with a tab character. +# If more than one line selected, indent the lines. +fun void Tab=2327(,) + +# Dedent the selected lines. +fun void BackTab=2328(,) + +# Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +fun void NewLine=2329(,) + +# Insert a Form Feed character. +fun void FormFeed=2330(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +fun void VCHome=2331(,) + +# Like VCHome but extending selection to new caret position. +fun void VCHomeExtend=2332(,) + +# Magnify the displayed text by increasing the sizes by 1 point. +fun void ZoomIn=2333(,) + +# Make the displayed text smaller by decreasing the sizes by 1 point. +fun void ZoomOut=2334(,) + +# Delete the word to the left of the caret. +fun void DelWordLeft=2335(,) + +# Delete the word to the right of the caret. +fun void DelWordRight=2336(,) + +# Delete the word to the right of the caret, but not the trailing non-word characters. +fun void DelWordRightEnd=2518(,) + +# Cut the line containing the caret. +fun void LineCut=2337(,) + +# Delete the line containing the caret. +fun void LineDelete=2338(,) + +# Switch the current line with the previous. +fun void LineTranspose=2339(,) + +# Reverse order of selected lines. +fun void LineReverse=2354(,) + +# Duplicate the current line. +fun void LineDuplicate=2404(,) + +# Transform the selection to lower case. +fun void LowerCase=2340(,) + +# Transform the selection to upper case. +fun void UpperCase=2341(,) + +# Scroll the document down, keeping the caret visible. +fun void LineScrollDown=2342(,) + +# Scroll the document up, keeping the caret visible. +fun void LineScrollUp=2343(,) + +# Delete the selection or if no selection, the character before the caret. +# Will not delete the character before at the start of a line. +fun void DeleteBackNotLine=2344(,) + +# Move caret to first position on display line. +fun void HomeDisplay=2345(,) + +# Move caret to first position on display line extending selection to +# new caret position. +fun void HomeDisplayExtend=2346(,) + +# Move caret to last position on display line. +fun void LineEndDisplay=2347(,) + +# Move caret to last position on display line extending selection to new +# caret position. +fun void LineEndDisplayExtend=2348(,) + +# Like Home but when word-wrap is enabled goes first to start of display line +# HomeDisplay, then to start of document line Home. +fun void HomeWrap=2349(,) + +# Like HomeExtend but when word-wrap is enabled extends first to start of display line +# HomeDisplayExtend, then to start of document line HomeExtend. +fun void HomeWrapExtend=2450(,) + +# Like LineEnd but when word-wrap is enabled goes first to end of display line +# LineEndDisplay, then to start of document line LineEnd. +fun void LineEndWrap=2451(,) + +# Like LineEndExtend but when word-wrap is enabled extends first to end of display line +# LineEndDisplayExtend, then to start of document line LineEndExtend. +fun void LineEndWrapExtend=2452(,) + +# Like VCHome but when word-wrap is enabled goes first to start of display line +# VCHomeDisplay, then behaves like VCHome. +fun void VCHomeWrap=2453(,) + +# Like VCHomeExtend but when word-wrap is enabled extends first to start of display line +# VCHomeDisplayExtend, then behaves like VCHomeExtend. +fun void VCHomeWrapExtend=2454(,) + +# Copy the line containing the caret. +fun void LineCopy=2455(,) + +# Move the caret inside current view if it's not there already. +fun void MoveCaretInsideView=2401(,) + +# How many characters are on a line, including end of line characters? +fun int LineLength=2350(int line,) + +# Highlight the characters at two positions. +fun void BraceHighlight=2351(position posA, position posB) + +# Use specified indicator to highlight matching braces instead of changing their style. +fun void BraceHighlightIndicator=2498(bool useSetting, int indicator) + +# Highlight the character at a position indicating there is no matching brace. +fun void BraceBadLight=2352(position pos,) + +# Use specified indicator to highlight non matching brace instead of changing its style. +fun void BraceBadLightIndicator=2499(bool useSetting, int indicator) + +# Find the position of a matching brace or INVALID_POSITION if no match. +# The maxReStyle must be 0 for now. It may be defined in a future release. +fun position BraceMatch=2353(position pos, int maxReStyle) + +# Are the end of line characters visible? +get bool GetViewEOL=2355(,) + +# Make the end of line characters visible or invisible. +set void SetViewEOL=2356(bool visible,) + +# Retrieve a pointer to the document object. +get int GetDocPointer=2357(,) + +# Change the document object used. +set void SetDocPointer=2358(, int doc) + +# Set which document modification events are sent to the container. +set void SetModEventMask=2359(int eventMask,) + +enu EdgeVisualStyle=EDGE_ +val EDGE_NONE=0 +val EDGE_LINE=1 +val EDGE_BACKGROUND=2 +val EDGE_MULTILINE=3 + +# Retrieve the column number which text should be kept within. +get int GetEdgeColumn=2360(,) + +# Set the column number of the edge. +# If text goes past the edge then it is highlighted. +set void SetEdgeColumn=2361(int column,) + +# Retrieve the edge highlight mode. +get int GetEdgeMode=2362(,) + +# The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that +# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +set void SetEdgeMode=2363(int edgeMode,) + +# Retrieve the colour used in edge indication. +get colour GetEdgeColour=2364(,) + +# Change the colour used in edge indication. +set void SetEdgeColour=2365(colour edgeColour,) + +# Add a new vertical edge to the view. +fun void MultiEdgeAddLine=2694(int column, colour edgeColour) + +# Clear all vertical edges. +fun void MultiEdgeClearAll=2695(,) + +# Sets the current caret position to be the search anchor. +fun void SearchAnchor=2366(,) + +# Find some text starting at the search anchor. +# Does not ensure the selection is visible. +fun int SearchNext=2367(int searchFlags, string text) + +# Find some text starting at the search anchor and moving backwards. +# Does not ensure the selection is visible. +fun int SearchPrev=2368(int searchFlags, string text) + +# Retrieves the number of lines completely visible. +get int LinesOnScreen=2370(,) + +enu PopUp=SC_POPUP_ +val SC_POPUP_NEVER=0 +val SC_POPUP_ALL=1 +val SC_POPUP_TEXT=2 + +# Set whether a pop up menu is displayed automatically when the user presses +# the wrong mouse button on certain areas. +fun void UsePopUp=2371(int popUpMode,) + +# Is the selection rectangular? The alternative is the more common stream selection. +get bool SelectionIsRectangle=2372(,) + +# Set the zoom level. This number of points is added to the size of all fonts. +# It may be positive to magnify or negative to reduce. +set void SetZoom=2373(int zoomInPoints,) +# Retrieve the zoom level. +get int GetZoom=2374(,) + +enu DocumentOption=SC_DOCUMENTOPTION_ +val SC_DOCUMENTOPTION_DEFAULT=0 +val SC_DOCUMENTOPTION_STYLES_NONE=0x1 +val SC_DOCUMENTOPTION_TEXT_LARGE=0x100 + +# Create a new document object. +# Starts with reference count of 1 and not selected into editor. +fun int CreateDocument=2375(int bytes, int documentOptions) +# Extend life of document. +fun void AddRefDocument=2376(, int doc) +# Release a reference to the document, deleting document if it fades to black. +fun void ReleaseDocument=2377(, int doc) + +# Get which document options are set. +get int GetDocumentOptions=2379(,) + +# Get which document modification events are sent to the container. +get int GetModEventMask=2378(,) + +# Set whether command events are sent to the container. +set void SetCommandEvents=2717(bool commandEvents,) + +# Get whether command events are sent to the container. +get bool GetCommandEvents=2718(,) + +# Change internal focus flag. +set void SetFocus=2380(bool focus,) +# Get internal focus flag. +get bool GetFocus=2381(,) + +enu Status=SC_STATUS_ +val SC_STATUS_OK=0 +val SC_STATUS_FAILURE=1 +val SC_STATUS_BADALLOC=2 +val SC_STATUS_WARN_START=1000 +val SC_STATUS_WARN_REGEX=1001 + +# Change error status - 0 = OK. +set void SetStatus=2382(int status,) +# Get error status. +get int GetStatus=2383(,) + +# Set whether the mouse is captured when its button is pressed. +set void SetMouseDownCaptures=2384(bool captures,) +# Get whether mouse gets captured. +get bool GetMouseDownCaptures=2385(,) + +# Set whether the mouse wheel can be active outside the window. +set void SetMouseWheelCaptures=2696(bool captures,) +# Get whether mouse wheel can be active outside the window. +get bool GetMouseWheelCaptures=2697(,) + +enu CursorShape=SC_CURSOR +val SC_CURSORNORMAL=-1 +val SC_CURSORARROW=2 +val SC_CURSORWAIT=4 +val SC_CURSORREVERSEARROW=7 +# Sets the cursor to one of the SC_CURSOR* values. +set void SetCursor=2386(int cursorType,) +# Get cursor type. +get int GetCursor=2387(,) + +# Change the way control characters are displayed: +# If symbol is < 32, keep the drawn way, else, use the given character. +set void SetControlCharSymbol=2388(int symbol,) +# Get the way control characters are displayed. +get int GetControlCharSymbol=2389(,) + +# Move to the previous change in capitalisation. +fun void WordPartLeft=2390(,) +# Move to the previous change in capitalisation extending selection +# to new caret position. +fun void WordPartLeftExtend=2391(,) +# Move to the change next in capitalisation. +fun void WordPartRight=2392(,) +# Move to the next change in capitalisation extending selection +# to new caret position. +fun void WordPartRightExtend=2393(,) + +# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. +enu VisiblePolicy=VISIBLE_ +val VISIBLE_SLOP=0x01 +val VISIBLE_STRICT=0x04 +# Set the way the display area is determined when a particular line +# is to be moved to by Find, FindNext, GotoLine, etc. +fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop) + +# Delete back from the current position to the start of the line. +fun void DelLineLeft=2395(,) + +# Delete forwards from the current position to the end of the line. +fun void DelLineRight=2396(,) + +# Set the xOffset (ie, horizontal scroll position). +set void SetXOffset=2397(int xOffset,) + +# Get the xOffset (ie, horizontal scroll position). +get int GetXOffset=2398(,) + +# Set the last x chosen value to be the caret x position. +fun void ChooseCaretX=2399(,) + +# Set the focus to this Scintilla widget. +fun void GrabFocus=2400(,) + +enu CaretPolicy=CARET_ +# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy. +# If CARET_SLOP is set, we can define a slop value: caretSlop. +# This value defines an unwanted zone (UZ) where the caret is... unwanted. +# This zone is defined as a number of pixels near the vertical margins, +# and as a number of lines near the horizontal margins. +# By keeping the caret away from the edges, it is seen within its context, +# so it is likely that the identifier that the caret is on can be completely seen, +# and that the current line is seen with some of the lines following it which are +# often dependent on that line. +val CARET_SLOP=0x01 +# If CARET_STRICT is set, the policy is enforced... strictly. +# The caret is centred on the display if slop is not set, +# and cannot go in the UZ if slop is set. +val CARET_STRICT=0x04 +# If CARET_JUMPS is set, the display is moved more energetically +# so the caret can move in the same direction longer before the policy is applied again. +val CARET_JUMPS=0x10 +# If CARET_EVEN is not set, instead of having symmetrical UZs, +# the left and bottom UZs are extended up to right and top UZs respectively. +# This way, we favour the displaying of useful information: the beginning of lines, +# where most code reside, and the lines after the caret, eg. the body of a function. +val CARET_EVEN=0x08 + +# Set the way the caret is kept visible when going sideways. +# The exclusion zone is given in pixels. +fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop) + +# Set the way the line the caret is on is kept visible. +# The exclusion zone is given in lines. +fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) + +# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +set void SetPrintWrapMode=2406(int wrapMode,) + +# Is printing line wrapped? +get int GetPrintWrapMode=2407(,) + +# Set a fore colour for active hotspots. +set void SetHotspotActiveFore=2410(bool useSetting, colour fore) + +# Get the fore colour for active hotspots. +get colour GetHotspotActiveFore=2494(,) + +# Set a back colour for active hotspots. +set void SetHotspotActiveBack=2411(bool useSetting, colour back) + +# Get the back colour for active hotspots. +get colour GetHotspotActiveBack=2495(,) + +# Enable / Disable underlining active hotspots. +set void SetHotspotActiveUnderline=2412(bool underline,) + +# Get whether underlining for active hotspots. +get bool GetHotspotActiveUnderline=2496(,) + +# Limit hotspots to single line so hotspots on two lines don't merge. +set void SetHotspotSingleLine=2421(bool singleLine,) + +# Get the HotspotSingleLine property +get bool GetHotspotSingleLine=2497(,) + +# Move caret down one paragraph (delimited by empty lines). +fun void ParaDown=2413(,) +# Extend selection down one paragraph (delimited by empty lines). +fun void ParaDownExtend=2414(,) +# Move caret up one paragraph (delimited by empty lines). +fun void ParaUp=2415(,) +# Extend selection up one paragraph (delimited by empty lines). +fun void ParaUpExtend=2416(,) + +# Given a valid document position, return the previous position taking code +# page into account. Returns 0 if passed 0. +fun position PositionBefore=2417(position pos,) + +# Given a valid document position, return the next position taking code +# page into account. Maximum value returned is the last position in the document. +fun position PositionAfter=2418(position pos,) + +# Given a valid document position, return a position that differs in a number +# of characters. Returned value is always between 0 and last position in document. +fun position PositionRelative=2670(position pos, int relative) + +# Given a valid document position, return a position that differs in a number +# of UTF-16 code units. Returned value is always between 0 and last position in document. +# The result may point half way (2 bytes) inside a non-BMP character. +fun position PositionRelativeCodeUnits=2716(position pos, int relative) + +# Copy a range of text to the clipboard. Positions are clipped into the document. +fun void CopyRange=2419(position start, position end) + +# Copy argument text to the clipboard. +fun void CopyText=2420(int length, string text) + +enu SelectionMode=SC_SEL_ +val SC_SEL_STREAM=0 +val SC_SEL_RECTANGLE=1 +val SC_SEL_LINES=2 +val SC_SEL_THIN=3 + +# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or +# by lines (SC_SEL_LINES). +set void SetSelectionMode=2422(int selectionMode,) + +# Get the mode of the current selection. +get int GetSelectionMode=2423(,) + +# Get whether or not regular caret moves will extend or reduce the selection. +get bool GetMoveExtendsSelection=2706(,) + +# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). +fun position GetLineSelStartPosition=2424(int line,) + +# Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). +fun position GetLineSelEndPosition=2425(int line,) + +## RectExtended rectangular selection moves +# Move caret down one line, extending rectangular selection to new caret position. +fun void LineDownRectExtend=2426(,) + +# Move caret up one line, extending rectangular selection to new caret position. +fun void LineUpRectExtend=2427(,) + +# Move caret left one character, extending rectangular selection to new caret position. +fun void CharLeftRectExtend=2428(,) + +# Move caret right one character, extending rectangular selection to new caret position. +fun void CharRightRectExtend=2429(,) + +# Move caret to first position on line, extending rectangular selection to new caret position. +fun void HomeRectExtend=2430(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +# In either case, extend rectangular selection to new caret position. +fun void VCHomeRectExtend=2431(,) + +# Move caret to last position on line, extending rectangular selection to new caret position. +fun void LineEndRectExtend=2432(,) + +# Move caret one page up, extending rectangular selection to new caret position. +fun void PageUpRectExtend=2433(,) + +# Move caret one page down, extending rectangular selection to new caret position. +fun void PageDownRectExtend=2434(,) + + +# Move caret to top of page, or one page up if already at top of page. +fun void StutteredPageUp=2435(,) + +# Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. +fun void StutteredPageUpExtend=2436(,) + +# Move caret to bottom of page, or one page down if already at bottom of page. +fun void StutteredPageDown=2437(,) + +# Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. +fun void StutteredPageDownExtend=2438(,) + + +# Move caret left one word, position cursor at end of word. +fun void WordLeftEnd=2439(,) + +# Move caret left one word, position cursor at end of word, extending selection to new caret position. +fun void WordLeftEndExtend=2440(,) + +# Move caret right one word, position cursor at end of word. +fun void WordRightEnd=2441(,) + +# Move caret right one word, position cursor at end of word, extending selection to new caret position. +fun void WordRightEndExtend=2442(,) + +# Set the set of characters making up whitespace for when moving or selecting by word. +# Should be called after SetWordChars. +set void SetWhitespaceChars=2443(, string characters) + +# Get the set of characters making up whitespace for when moving or selecting by word. +get int GetWhitespaceChars=2647(, stringresult characters) + +# Set the set of characters making up punctuation characters +# Should be called after SetWordChars. +set void SetPunctuationChars=2648(, string characters) + +# Get the set of characters making up punctuation characters +get int GetPunctuationChars=2649(, stringresult characters) + +# Reset the set of characters for whitespace and word characters to the defaults. +fun void SetCharsDefault=2444(,) + +# Get currently selected item position in the auto-completion list +get int AutoCGetCurrent=2445(,) + +# Get currently selected item text in the auto-completion list +# Returns the length of the item text +# Result is NUL-terminated. +get int AutoCGetCurrentText=2610(, stringresult text) + +enu CaseInsensitiveBehaviour=SC_CASEINSENSITIVEBEHAVIOUR_ +val SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0 +val SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE=1 + +# Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. +set void AutoCSetCaseInsensitiveBehaviour=2634(int behaviour,) + +# Get auto-completion case insensitive behaviour. +get int AutoCGetCaseInsensitiveBehaviour=2635(,) + +enu MultiAutoComplete=SC_MULTIAUTOC_ +val SC_MULTIAUTOC_ONCE=0 +val SC_MULTIAUTOC_EACH=1 + +# Change the effect of autocompleting when there are multiple selections. +set void AutoCSetMulti=2636(int multi,) + +# Retrieve the effect of autocompleting when there are multiple selections. +get int AutoCGetMulti=2637(,) + +enu Ordering=SC_ORDER_ +val SC_ORDER_PRESORTED=0 +val SC_ORDER_PERFORMSORT=1 +val SC_ORDER_CUSTOM=2 + +# Set the way autocompletion lists are ordered. +set void AutoCSetOrder=2660(int order,) + +# Get the way autocompletion lists are ordered. +get int AutoCGetOrder=2661(,) + +# Enlarge the document to a particular size of text bytes. +fun void Allocate=2446(int bytes,) + +# Returns the target converted to UTF8. +# Return the length in bytes. +fun int TargetAsUTF8=2447(, stringresult s) + +# Set the length of the utf8 argument for calling EncodedFromUTF8. +# Set to -1 and the string will be measured to the first nul. +fun void SetLengthForEncode=2448(int bytes,) + +# Translates a UTF8 string into the document encoding. +# Return the length of the result in bytes. +# On error return 0. +fun int EncodedFromUTF8=2449(string utf8, stringresult encoded) + +# Find the position of a column on a line taking into account tabs and +# multi-byte characters. If beyond end of line, return line end position. +fun int FindColumn=2456(int line, int column) + +# Can the caret preferred x position only be changed by explicit movement commands? +get int GetCaretSticky=2457(,) + +# Stop the caret preferred x position changing when the user types. +set void SetCaretSticky=2458(int useCaretStickyBehaviour,) + +enu CaretSticky=SC_CARETSTICKY_ +val SC_CARETSTICKY_OFF=0 +val SC_CARETSTICKY_ON=1 +val SC_CARETSTICKY_WHITESPACE=2 + +# Switch between sticky and non-sticky: meant to be bound to a key. +fun void ToggleCaretSticky=2459(,) + +# Enable/Disable convert-on-paste for line endings +set void SetPasteConvertEndings=2467(bool convert,) + +# Get convert-on-paste setting +get bool GetPasteConvertEndings=2468(,) + +# Duplicate the selection. If selection empty duplicate the line containing the caret. +fun void SelectionDuplicate=2469(,) + +enu Alpha=SC_ALPHA_ +val SC_ALPHA_TRANSPARENT=0 +val SC_ALPHA_OPAQUE=255 +val SC_ALPHA_NOALPHA=256 + +# Set background alpha of the caret line. +set void SetCaretLineBackAlpha=2470(int alpha,) + +# Get the background alpha of the caret line. +get int GetCaretLineBackAlpha=2471(,) + +enu CaretStyle=CARETSTYLE_ +val CARETSTYLE_INVISIBLE=0 +val CARETSTYLE_LINE=1 +val CARETSTYLE_BLOCK=2 + +# Set the style of the caret to be drawn. +set void SetCaretStyle=2512(int caretStyle,) + +# Returns the current style of the caret. +get int GetCaretStyle=2513(,) + +# Set the indicator used for IndicatorFillRange and IndicatorClearRange +set void SetIndicatorCurrent=2500(int indicator,) + +# Get the current indicator +get int GetIndicatorCurrent=2501(,) + +# Set the value used for IndicatorFillRange +set void SetIndicatorValue=2502(int value,) + +# Get the current indicator value +get int GetIndicatorValue=2503(,) + +# Turn a indicator on over a range. +fun void IndicatorFillRange=2504(position start, int lengthFill) + +# Turn a indicator off over a range. +fun void IndicatorClearRange=2505(position start, int lengthClear) + +# Are any indicators present at pos? +fun int IndicatorAllOnFor=2506(position pos,) + +# What value does a particular indicator have at a position? +fun int IndicatorValueAt=2507(int indicator, position pos) + +# Where does a particular indicator start? +fun int IndicatorStart=2508(int indicator, position pos) + +# Where does a particular indicator end? +fun int IndicatorEnd=2509(int indicator, position pos) + +# Set number of entries in position cache +set void SetPositionCache=2514(int size,) + +# How many entries are allocated to the position cache? +get int GetPositionCache=2515(,) + +# Copy the selection, if selection empty copy the line with the caret +fun void CopyAllowLine=2519(,) + +# Compact the document buffer and return a read-only pointer to the +# characters in the document. +get int GetCharacterPointer=2520(,) + +# Return a read-only pointer to a range of characters in the document. +# May move the gap so that the range is contiguous, but will only move up +# to lengthRange bytes. +get int GetRangePointer=2643(position start, int lengthRange) + +# Return a position which, to avoid performance costs, should not be within +# the range of a call to GetRangePointer. +get position GetGapPosition=2644(,) + +# Set the alpha fill colour of the given indicator. +set void IndicSetAlpha=2523(int indicator, int alpha) + +# Get the alpha fill colour of the given indicator. +get int IndicGetAlpha=2524(int indicator,) + +# Set the alpha outline colour of the given indicator. +set void IndicSetOutlineAlpha=2558(int indicator, int alpha) + +# Get the alpha outline colour of the given indicator. +get int IndicGetOutlineAlpha=2559(int indicator,) + +# Set extra ascent for each line +set void SetExtraAscent=2525(int extraAscent,) + +# Get extra ascent for each line +get int GetExtraAscent=2526(,) + +# Set extra descent for each line +set void SetExtraDescent=2527(int extraDescent,) + +# Get extra descent for each line +get int GetExtraDescent=2528(,) + +# Which symbol was defined for markerNumber with MarkerDefine +fun int MarkerSymbolDefined=2529(int markerNumber,) + +# Set the text in the text margin for a line +set void MarginSetText=2530(int line, string text) + +# Get the text in the text margin for a line +get int MarginGetText=2531(int line, stringresult text) + +# Set the style number for the text margin for a line +set void MarginSetStyle=2532(int line, int style) + +# Get the style number for the text margin for a line +get int MarginGetStyle=2533(int line,) + +# Set the style in the text margin for a line +set void MarginSetStyles=2534(int line, string styles) + +# Get the styles in the text margin for a line +get int MarginGetStyles=2535(int line, stringresult styles) + +# Clear the margin text on all lines +fun void MarginTextClearAll=2536(,) + +# Get the start of the range of style numbers used for margin text +set void MarginSetStyleOffset=2537(int style,) + +# Get the start of the range of style numbers used for margin text +get int MarginGetStyleOffset=2538(,) + +enu MarginOption=SC_MARGINOPTION_ +val SC_MARGINOPTION_NONE=0 +val SC_MARGINOPTION_SUBLINESELECT=1 + +# Set the margin options. +set void SetMarginOptions=2539(int marginOptions,) + +# Get the margin options. +get int GetMarginOptions=2557(,) + +# Set the annotation text for a line +set void AnnotationSetText=2540(int line, string text) + +# Get the annotation text for a line +get int AnnotationGetText=2541(int line, stringresult text) + +# Set the style number for the annotations for a line +set void AnnotationSetStyle=2542(int line, int style) + +# Get the style number for the annotations for a line +get int AnnotationGetStyle=2543(int line,) + +# Set the annotation styles for a line +set void AnnotationSetStyles=2544(int line, string styles) + +# Get the annotation styles for a line +get int AnnotationGetStyles=2545(int line, stringresult styles) + +# Get the number of annotation lines for a line +get int AnnotationGetLines=2546(int line,) + +# Clear the annotations from all lines +fun void AnnotationClearAll=2547(,) + +enu AnnotationVisible=ANNOTATION_ +val ANNOTATION_HIDDEN=0 +val ANNOTATION_STANDARD=1 +val ANNOTATION_BOXED=2 +val ANNOTATION_INDENTED=3 + +# Set the visibility for the annotations for a view +set void AnnotationSetVisible=2548(int visible,) + +# Get the visibility for the annotations for a view +get int AnnotationGetVisible=2549(,) + +# Get the start of the range of style numbers used for annotations +set void AnnotationSetStyleOffset=2550(int style,) + +# Get the start of the range of style numbers used for annotations +get int AnnotationGetStyleOffset=2551(,) + +# Release all extended (>255) style numbers +fun void ReleaseAllExtendedStyles=2552(,) + +# Allocate some extended (>255) style numbers and return the start of the range +fun int AllocateExtendedStyles=2553(int numberStyles,) + +val UNDO_MAY_COALESCE=1 + +# Add a container action to the undo stack +fun void AddUndoAction=2560(int token, int flags) + +# Find the position of a character from a point within the window. +fun position CharPositionFromPoint=2561(int x, int y) + +# Find the position of a character from a point within the window. +# Return INVALID_POSITION if not close to text. +fun position CharPositionFromPointClose=2562(int x, int y) + +# Set whether switching to rectangular mode while selecting with the mouse is allowed. +set void SetMouseSelectionRectangularSwitch=2668(bool mouseSelectionRectangularSwitch,) + +# Whether switching to rectangular mode while selecting with the mouse is allowed. +get bool GetMouseSelectionRectangularSwitch=2669(,) + +# Set whether multiple selections can be made +set void SetMultipleSelection=2563(bool multipleSelection,) + +# Whether multiple selections can be made +get bool GetMultipleSelection=2564(,) + +# Set whether typing can be performed into multiple selections +set void SetAdditionalSelectionTyping=2565(bool additionalSelectionTyping,) + +# Whether typing can be performed into multiple selections +get bool GetAdditionalSelectionTyping=2566(,) + +# Set whether additional carets will blink +set void SetAdditionalCaretsBlink=2567(bool additionalCaretsBlink,) + +# Whether additional carets will blink +get bool GetAdditionalCaretsBlink=2568(,) + +# Set whether additional carets are visible +set void SetAdditionalCaretsVisible=2608(bool additionalCaretsVisible,) + +# Whether additional carets are visible +get bool GetAdditionalCaretsVisible=2609(,) + +# How many selections are there? +get int GetSelections=2570(,) + +# Is every selected range empty? +get bool GetSelectionEmpty=2650(,) + +# Clear selections to a single empty stream selection +fun void ClearSelections=2571(,) + +# Set a simple selection +fun void SetSelection=2572(position caret, position anchor) + +# Add a selection +fun void AddSelection=2573(position caret, position anchor) + +# Drop one selection +fun void DropSelectionN=2671(int selection,) + +# Set the main selection +set void SetMainSelection=2574(int selection,) + +# Which selection is the main selection +get int GetMainSelection=2575(,) + +# Set the caret position of the nth selection. +set void SetSelectionNCaret=2576(int selection, position caret) +# Return the caret position of the nth selection. +get position GetSelectionNCaret=2577(int selection,) +# Set the anchor position of the nth selection. +set void SetSelectionNAnchor=2578(int selection, position anchor) +# Return the anchor position of the nth selection. +get position GetSelectionNAnchor=2579(int selection,) +# Set the virtual space of the caret of the nth selection. +set void SetSelectionNCaretVirtualSpace=2580(int selection, int space) +# Return the virtual space of the caret of the nth selection. +get int GetSelectionNCaretVirtualSpace=2581(int selection,) +# Set the virtual space of the anchor of the nth selection. +set void SetSelectionNAnchorVirtualSpace=2582(int selection, int space) +# Return the virtual space of the anchor of the nth selection. +get int GetSelectionNAnchorVirtualSpace=2583(int selection,) + +# Sets the position that starts the selection - this becomes the anchor. +set void SetSelectionNStart=2584(int selection, position anchor) + +# Returns the position at the start of the selection. +get position GetSelectionNStart=2585(int selection,) + +# Sets the position that ends the selection - this becomes the currentPosition. +set void SetSelectionNEnd=2586(int selection, position caret) + +# Returns the position at the end of the selection. +get position GetSelectionNEnd=2587(int selection,) + +# Set the caret position of the rectangular selection. +set void SetRectangularSelectionCaret=2588(position caret,) +# Return the caret position of the rectangular selection. +get position GetRectangularSelectionCaret=2589(,) +# Set the anchor position of the rectangular selection. +set void SetRectangularSelectionAnchor=2590(position anchor,) +# Return the anchor position of the rectangular selection. +get position GetRectangularSelectionAnchor=2591(,) +# Set the virtual space of the caret of the rectangular selection. +set void SetRectangularSelectionCaretVirtualSpace=2592(int space,) +# Return the virtual space of the caret of the rectangular selection. +get int GetRectangularSelectionCaretVirtualSpace=2593(,) +# Set the virtual space of the anchor of the rectangular selection. +set void SetRectangularSelectionAnchorVirtualSpace=2594(int space,) +# Return the virtual space of the anchor of the rectangular selection. +get int GetRectangularSelectionAnchorVirtualSpace=2595(,) + +enu VirtualSpace=SCVS_ +val SCVS_NONE=0 +val SCVS_RECTANGULARSELECTION=1 +val SCVS_USERACCESSIBLE=2 +val SCVS_NOWRAPLINESTART=4 + +# Set options for virtual space behaviour. +set void SetVirtualSpaceOptions=2596(int virtualSpaceOptions,) +# Return options for virtual space behaviour. +get int GetVirtualSpaceOptions=2597(,) + +# On GTK+, allow selecting the modifier key to use for mouse-based +# rectangular selection. Often the window manager requires Alt+Mouse Drag +# for moving windows. +# Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + +set void SetRectangularSelectionModifier=2598(int modifier,) + +# Get the modifier key used for rectangular selection. +get int GetRectangularSelectionModifier=2599(,) + +# Set the foreground colour of additional selections. +# Must have previously called SetSelFore with non-zero first argument for this to have an effect. +set void SetAdditionalSelFore=2600(colour fore,) + +# Set the background colour of additional selections. +# Must have previously called SetSelBack with non-zero first argument for this to have an effect. +set void SetAdditionalSelBack=2601(colour back,) + +# Set the alpha of the selection. +set void SetAdditionalSelAlpha=2602(int alpha,) + +# Get the alpha of the selection. +get int GetAdditionalSelAlpha=2603(,) + +# Set the foreground colour of additional carets. +set void SetAdditionalCaretFore=2604(colour fore,) + +# Get the foreground colour of additional carets. +get colour GetAdditionalCaretFore=2605(,) + +# Set the main selection to the next selection. +fun void RotateSelection=2606(,) + +# Swap that caret and anchor of the main selection. +fun void SwapMainAnchorCaret=2607(,) + +# Add the next occurrence of the main selection to the set of selections as main. +# If the current selection is empty then select word around caret. +fun void MultipleSelectAddNext=2688(,) + +# Add each occurrence of the main selection in the target to the set of selections. +# If the current selection is empty then select word around caret. +fun void MultipleSelectAddEach=2689(,) + +# Indicate that the internal state of a lexer has changed over a range and therefore +# there may be a need to redraw. +fun int ChangeLexerState=2617(position start, position end) + +# Find the next line at or after lineStart that is a contracted fold header line. +# Return -1 when no more lines. +fun int ContractedFoldNext=2618(int lineStart,) + +# Centre current line in window. +fun void VerticalCentreCaret=2619(,) + +# Move the selected lines up one line, shifting the line above after the selection +fun void MoveSelectedLinesUp=2620(,) + +# Move the selected lines down one line, shifting the line below before the selection +fun void MoveSelectedLinesDown=2621(,) + +# Set the identifier reported as idFrom in notification messages. +set void SetIdentifier=2622(int identifier,) + +# Get the identifier. +get int GetIdentifier=2623(,) + +# Set the width for future RGBA image data. +set void RGBAImageSetWidth=2624(int width,) + +# Set the height for future RGBA image data. +set void RGBAImageSetHeight=2625(int height,) + +# Set the scale factor in percent for future RGBA image data. +set void RGBAImageSetScale=2651(int scalePercent,) + +# Define a marker from RGBA data. +# It has the width and height from RGBAImageSetWidth/Height +fun void MarkerDefineRGBAImage=2626(int markerNumber, string pixels) + +# Register an RGBA image for use in autocompletion lists. +# It has the width and height from RGBAImageSetWidth/Height +fun void RegisterRGBAImage=2627(int type, string pixels) + +# Scroll to start of document. +fun void ScrollToStart=2628(,) + +# Scroll to end of document. +fun void ScrollToEnd=2629(,) + +enu Technology=SC_TECHNOLOGY_ +val SC_TECHNOLOGY_DEFAULT=0 +val SC_TECHNOLOGY_DIRECTWRITE=1 +val SC_TECHNOLOGY_DIRECTWRITERETAIN=2 +val SC_TECHNOLOGY_DIRECTWRITEDC=3 + +# Set the technology used. +set void SetTechnology=2630(int technology,) + +# Get the tech. +get int GetTechnology=2631(,) + +# Create an ILoader*. +fun int CreateLoader=2632(int bytes, int documentOptions) + +# On OS X, show a find indicator. +fun void FindIndicatorShow=2640(position start, position end) + +# On OS X, flash a find indicator, then fade out. +fun void FindIndicatorFlash=2641(position start, position end) + +# On OS X, hide the find indicator. +fun void FindIndicatorHide=2642(,) + +# Move caret to before first visible character on display line. +# If already there move to first character on display line. +fun void VCHomeDisplay=2652(,) + +# Like VCHomeDisplay but extending selection to new caret position. +fun void VCHomeDisplayExtend=2653(,) + +# Is the caret line always visible? +get bool GetCaretLineVisibleAlways=2654(,) + +# Sets the caret line to always visible. +set void SetCaretLineVisibleAlways=2655(bool alwaysVisible,) + +# Line end types which may be used in addition to LF, CR, and CRLF +# SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator, +# U+2029 Paragraph Separator, and U+0085 Next Line +enu LineEndType=SC_LINE_END_TYPE_ +val SC_LINE_END_TYPE_DEFAULT=0 +val SC_LINE_END_TYPE_UNICODE=1 + +# Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. +set void SetLineEndTypesAllowed=2656(int lineEndBitSet,) + +# Get the line end types currently allowed. +get int GetLineEndTypesAllowed=2657(,) + +# Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. +get int GetLineEndTypesActive=2658(,) + +# Set the way a character is drawn. +set void SetRepresentation=2665(string encodedCharacter, string representation) + +# Set the way a character is drawn. +# Result is NUL-terminated. +get int GetRepresentation=2666(string encodedCharacter, stringresult representation) + +# Remove a character representation. +fun void ClearRepresentation=2667(string encodedCharacter,) + +# Start notifying the container of all key presses and commands. +fun void StartRecord=3001(,) + +# Stop notifying the container of all key presses and commands. +fun void StopRecord=3002(,) + +# Set the lexing language of the document. +set void SetLexer=4001(int lexer,) + +# Retrieve the lexing language of the document. +get int GetLexer=4002(,) + +# Colourise a segment of the document using the current lexing language. +fun void Colourise=4003(position start, position end) + +# Set up a value that may be used by a lexer for some optional feature. +set void SetProperty=4004(string key, string value) + +# Maximum value of keywordSet parameter of SetKeyWords. +val KEYWORDSET_MAX=8 + +# Set up the key words used by the lexer. +set void SetKeyWords=4005(int keyWordSet, string keyWords) + +# Set the lexing language of the document based on string name. +set void SetLexerLanguage=4006(, string language) + +# Load a lexer library (dll / so). +fun void LoadLexerLibrary=4007(, string path) + +# Retrieve a "property" value previously set with SetProperty. +# Result is NUL-terminated. +get int GetProperty=4008(string key, stringresult value) + +# Retrieve a "property" value previously set with SetProperty, +# with "$()" variable replacement on returned buffer. +# Result is NUL-terminated. +get int GetPropertyExpanded=4009(string key, stringresult value) + +# Retrieve a "property" value previously set with SetProperty, +# interpreted as an int AFTER any "$()" variable replacement. +get int GetPropertyInt=4010(string key, int defaultValue) + +# Retrieve the name of the lexer. +# Return the length of the text. +# Result is NUL-terminated. +get int GetLexerLanguage=4012(, stringresult language) + +# For private communication between an application and a known lexer. +fun int PrivateLexerCall=4013(int operation, int pointer) + +# Retrieve a '\n' separated list of properties understood by the current lexer. +# Result is NUL-terminated. +fun int PropertyNames=4014(, stringresult names) + +enu TypeProperty=SC_TYPE_ +val SC_TYPE_BOOLEAN=0 +val SC_TYPE_INTEGER=1 +val SC_TYPE_STRING=2 + +# Retrieve the type of a property. +fun int PropertyType=4015(string name,) + +# Describe a property. +# Result is NUL-terminated. +fun int DescribeProperty=4016(string name, stringresult description) + +# Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. +# Result is NUL-terminated. +fun int DescribeKeyWordSets=4017(, stringresult descriptions) + +# Bit set of LineEndType enumertion for which line ends beyond the standard +# LF, CR, and CRLF are supported by the lexer. +get int GetLineEndTypesSupported=4018(,) + +# Allocate a set of sub styles for a particular base style, returning start of range +fun int AllocateSubStyles=4020(int styleBase, int numberStyles) + +# The starting style number for the sub styles associated with a base style +get int GetSubStylesStart=4021(int styleBase,) + +# The number of sub styles associated with a base style +get int GetSubStylesLength=4022(int styleBase,) + +# For a sub style, return the base style, else return the argument. +get int GetStyleFromSubStyle=4027(int subStyle,) + +# For a secondary style, return the primary style, else return the argument. +get int GetPrimaryStyleFromStyle=4028(int style,) + +# Free allocated sub styles +fun void FreeSubStyles=4023(,) + +# Set the identifiers that are shown in a particular style +set void SetIdentifiers=4024(int style, string identifiers) + +# Where styles are duplicated by a feature such as active/inactive code +# return the distance between the two types. +get int DistanceToSecondaryStyles=4025(,) + +# Get the set of base styles that can be extended with sub styles +# Result is NUL-terminated. +get int GetSubStyleBases=4026(, stringresult styles) + +# Retrieve the number of named styles for the lexer. +get int GetNamedStyles=4029(,) + +# Retrieve the name of a style. +# Result is NUL-terminated. +fun int NameOfStyle=4030(int style, stringresult name) + +# Retrieve a ' ' separated list of style tags like "literal quoted string". +# Result is NUL-terminated. +fun int TagsOfStyle=4031(int style, stringresult tags) + +# Retrieve a description of a style. +# Result is NUL-terminated. +fun int DescriptionOfStyle=4032(int style, stringresult description) + +# Notifications +# Type of modification and the action which caused the modification. +# These are defined as a bit mask to make it easy to specify which notifications are wanted. +# One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL +val SC_MOD_INSERTTEXT=0x1 +val SC_MOD_DELETETEXT=0x2 +val SC_MOD_CHANGESTYLE=0x4 +val SC_MOD_CHANGEFOLD=0x8 +val SC_PERFORMED_USER=0x10 +val SC_PERFORMED_UNDO=0x20 +val SC_PERFORMED_REDO=0x40 +val SC_MULTISTEPUNDOREDO=0x80 +val SC_LASTSTEPINUNDOREDO=0x100 +val SC_MOD_CHANGEMARKER=0x200 +val SC_MOD_BEFOREINSERT=0x400 +val SC_MOD_BEFOREDELETE=0x800 +val SC_MULTILINEUNDOREDO=0x1000 +val SC_STARTACTION=0x2000 +val SC_MOD_CHANGEINDICATOR=0x4000 +val SC_MOD_CHANGELINESTATE=0x8000 +val SC_MOD_CHANGEMARGIN=0x10000 +val SC_MOD_CHANGEANNOTATION=0x20000 +val SC_MOD_CONTAINER=0x40000 +val SC_MOD_LEXERSTATE=0x80000 +val SC_MOD_INSERTCHECK=0x100000 +val SC_MOD_CHANGETABSTOPS=0x200000 +val SC_MODEVENTMASKALL=0x3FFFFF + +enu Update=SC_UPDATE_ +val SC_UPDATE_CONTENT=0x1 +val SC_UPDATE_SELECTION=0x2 +val SC_UPDATE_V_SCROLL=0x4 +val SC_UPDATE_H_SCROLL=0x8 + +# For compatibility, these go through the COMMAND notification rather than NOTIFY +# and should have had exactly the same values as the EN_* constants. +# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_* +# As clients depend on these constants, this will not be changed. +val SCEN_CHANGE=768 +val SCEN_SETFOCUS=512 +val SCEN_KILLFOCUS=256 + +# Symbolic key codes and modifier flags. +# ASCII and other printable characters below 256. +# Extended keys above 300. + +enu Keys=SCK_ +val SCK_DOWN=300 +val SCK_UP=301 +val SCK_LEFT=302 +val SCK_RIGHT=303 +val SCK_HOME=304 +val SCK_END=305 +val SCK_PRIOR=306 +val SCK_NEXT=307 +val SCK_DELETE=308 +val SCK_INSERT=309 +val SCK_ESCAPE=7 +val SCK_BACK=8 +val SCK_TAB=9 +val SCK_RETURN=13 +val SCK_ADD=310 +val SCK_SUBTRACT=311 +val SCK_DIVIDE=312 +val SCK_WIN=313 +val SCK_RWIN=314 +val SCK_MENU=315 + +enu KeyMod=SCMOD_ +val SCMOD_NORM=0 +val SCMOD_SHIFT=1 +val SCMOD_CTRL=2 +val SCMOD_ALT=4 +val SCMOD_SUPER=8 +val SCMOD_META=16 + +enu CompletionMethods=SC_AC_ +val SC_AC_FILLUP=1 +val SC_AC_DOUBLECLICK=2 +val SC_AC_TAB=3 +val SC_AC_NEWLINE=4 +val SC_AC_COMMAND=5 + +################################################ +# For SciLexer.h +enu Lexer=SCLEX_ +val SCLEX_CONTAINER=0 +val SCLEX_NULL=1 +val SCLEX_PYTHON=2 +val SCLEX_CPP=3 +val SCLEX_HTML=4 +val SCLEX_XML=5 +val SCLEX_PERL=6 +val SCLEX_SQL=7 +val SCLEX_VB=8 +val SCLEX_PROPERTIES=9 +val SCLEX_ERRORLIST=10 +val SCLEX_MAKEFILE=11 +val SCLEX_BATCH=12 +val SCLEX_XCODE=13 +val SCLEX_LATEX=14 +val SCLEX_LUA=15 +val SCLEX_DIFF=16 +val SCLEX_CONF=17 +val SCLEX_PASCAL=18 +val SCLEX_AVE=19 +val SCLEX_ADA=20 +val SCLEX_LISP=21 +val SCLEX_RUBY=22 +val SCLEX_EIFFEL=23 +val SCLEX_EIFFELKW=24 +val SCLEX_TCL=25 +val SCLEX_NNCRONTAB=26 +val SCLEX_BULLANT=27 +val SCLEX_VBSCRIPT=28 +val SCLEX_BAAN=31 +val SCLEX_MATLAB=32 +val SCLEX_SCRIPTOL=33 +val SCLEX_ASM=34 +val SCLEX_CPPNOCASE=35 +val SCLEX_FORTRAN=36 +val SCLEX_F77=37 +val SCLEX_CSS=38 +val SCLEX_POV=39 +val SCLEX_LOUT=40 +val SCLEX_ESCRIPT=41 +val SCLEX_PS=42 +val SCLEX_NSIS=43 +val SCLEX_MMIXAL=44 +val SCLEX_CLW=45 +val SCLEX_CLWNOCASE=46 +val SCLEX_LOT=47 +val SCLEX_YAML=48 +val SCLEX_TEX=49 +val SCLEX_METAPOST=50 +val SCLEX_POWERBASIC=51 +val SCLEX_FORTH=52 +val SCLEX_ERLANG=53 +val SCLEX_OCTAVE=54 +val SCLEX_MSSQL=55 +val SCLEX_VERILOG=56 +val SCLEX_KIX=57 +val SCLEX_GUI4CLI=58 +val SCLEX_SPECMAN=59 +val SCLEX_AU3=60 +val SCLEX_APDL=61 +val SCLEX_BASH=62 +val SCLEX_ASN1=63 +val SCLEX_VHDL=64 +val SCLEX_CAML=65 +val SCLEX_BLITZBASIC=66 +val SCLEX_PUREBASIC=67 +val SCLEX_HASKELL=68 +val SCLEX_PHPSCRIPT=69 +val SCLEX_TADS3=70 +val SCLEX_REBOL=71 +val SCLEX_SMALLTALK=72 +val SCLEX_FLAGSHIP=73 +val SCLEX_CSOUND=74 +val SCLEX_FREEBASIC=75 +val SCLEX_INNOSETUP=76 +val SCLEX_OPAL=77 +val SCLEX_SPICE=78 +val SCLEX_D=79 +val SCLEX_CMAKE=80 +val SCLEX_GAP=81 +val SCLEX_PLM=82 +val SCLEX_PROGRESS=83 +val SCLEX_ABAQUS=84 +val SCLEX_ASYMPTOTE=85 +val SCLEX_R=86 +val SCLEX_MAGIK=87 +val SCLEX_POWERSHELL=88 +val SCLEX_MYSQL=89 +val SCLEX_PO=90 +val SCLEX_TAL=91 +val SCLEX_COBOL=92 +val SCLEX_TACL=93 +val SCLEX_SORCUS=94 +val SCLEX_POWERPRO=95 +val SCLEX_NIMROD=96 +val SCLEX_SML=97 +val SCLEX_MARKDOWN=98 +val SCLEX_TXT2TAGS=99 +val SCLEX_A68K=100 +val SCLEX_MODULA=101 +val SCLEX_COFFEESCRIPT=102 +val SCLEX_TCMD=103 +val SCLEX_AVS=104 +val SCLEX_ECL=105 +val SCLEX_OSCRIPT=106 +val SCLEX_VISUALPROLOG=107 +val SCLEX_LITERATEHASKELL=108 +val SCLEX_STTXT=109 +val SCLEX_KVIRC=110 +val SCLEX_RUST=111 +val SCLEX_DMAP=112 +val SCLEX_AS=113 +val SCLEX_DMIS=114 +val SCLEX_REGISTRY=115 +val SCLEX_BIBTEX=116 +val SCLEX_SREC=117 +val SCLEX_IHEX=118 +val SCLEX_TEHEX=119 +val SCLEX_JSON=120 +val SCLEX_EDIFACT=121 +val SCLEX_INDENT=122 +val SCLEX_MAXIMA=123 +val SCLEX_STATA=124 +val SCLEX_SAS=125 +val SCLEX_LPEG=999 + +# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a +# value assigned in sequence from SCLEX_AUTOMATIC+1. +val SCLEX_AUTOMATIC=1000 +# Lexical states for SCLEX_PYTHON +lex Python=SCLEX_PYTHON SCE_P_ +lex Nimrod=SCLEX_NIMROD SCE_P_ +val SCE_P_DEFAULT=0 +val SCE_P_COMMENTLINE=1 +val SCE_P_NUMBER=2 +val SCE_P_STRING=3 +val SCE_P_CHARACTER=4 +val SCE_P_WORD=5 +val SCE_P_TRIPLE=6 +val SCE_P_TRIPLEDOUBLE=7 +val SCE_P_CLASSNAME=8 +val SCE_P_DEFNAME=9 +val SCE_P_OPERATOR=10 +val SCE_P_IDENTIFIER=11 +val SCE_P_COMMENTBLOCK=12 +val SCE_P_STRINGEOL=13 +val SCE_P_WORD2=14 +val SCE_P_DECORATOR=15 +val SCE_P_FSTRING=16 +val SCE_P_FCHARACTER=17 +val SCE_P_FTRIPLE=18 +val SCE_P_FTRIPLEDOUBLE=19 +# Lexical states for SCLEX_CPP +# Lexical states for SCLEX_BULLANT +# Lexical states for SCLEX_COBOL +# Lexical states for SCLEX_TACL +# Lexical states for SCLEX_TAL +lex Cpp=SCLEX_CPP SCE_C_ +lex BullAnt=SCLEX_BULLANT SCE_C_ +lex COBOL=SCLEX_COBOL SCE_C_ +lex TACL=SCLEX_TACL SCE_C_ +lex TAL=SCLEX_TAL SCE_C_ +val SCE_C_DEFAULT=0 +val SCE_C_COMMENT=1 +val SCE_C_COMMENTLINE=2 +val SCE_C_COMMENTDOC=3 +val SCE_C_NUMBER=4 +val SCE_C_WORD=5 +val SCE_C_STRING=6 +val SCE_C_CHARACTER=7 +val SCE_C_UUID=8 +val SCE_C_PREPROCESSOR=9 +val SCE_C_OPERATOR=10 +val SCE_C_IDENTIFIER=11 +val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13 +val SCE_C_REGEX=14 +val SCE_C_COMMENTLINEDOC=15 +val SCE_C_WORD2=16 +val SCE_C_COMMENTDOCKEYWORD=17 +val SCE_C_COMMENTDOCKEYWORDERROR=18 +val SCE_C_GLOBALCLASS=19 +val SCE_C_STRINGRAW=20 +val SCE_C_TRIPLEVERBATIM=21 +val SCE_C_HASHQUOTEDSTRING=22 +val SCE_C_PREPROCESSORCOMMENT=23 +val SCE_C_PREPROCESSORCOMMENTDOC=24 +val SCE_C_USERLITERAL=25 +val SCE_C_TASKMARKER=26 +val SCE_C_ESCAPESEQUENCE=27 +# Lexical states for SCLEX_D +lex D=SCLEX_D SCE_D_ +val SCE_D_DEFAULT=0 +val SCE_D_COMMENT=1 +val SCE_D_COMMENTLINE=2 +val SCE_D_COMMENTDOC=3 +val SCE_D_COMMENTNESTED=4 +val SCE_D_NUMBER=5 +val SCE_D_WORD=6 +val SCE_D_WORD2=7 +val SCE_D_WORD3=8 +val SCE_D_TYPEDEF=9 +val SCE_D_STRING=10 +val SCE_D_STRINGEOL=11 +val SCE_D_CHARACTER=12 +val SCE_D_OPERATOR=13 +val SCE_D_IDENTIFIER=14 +val SCE_D_COMMENTLINEDOC=15 +val SCE_D_COMMENTDOCKEYWORD=16 +val SCE_D_COMMENTDOCKEYWORDERROR=17 +val SCE_D_STRINGB=18 +val SCE_D_STRINGR=19 +val SCE_D_WORD5=20 +val SCE_D_WORD6=21 +val SCE_D_WORD7=22 +# Lexical states for SCLEX_TCL +lex TCL=SCLEX_TCL SCE_TCL_ +val SCE_TCL_DEFAULT=0 +val SCE_TCL_COMMENT=1 +val SCE_TCL_COMMENTLINE=2 +val SCE_TCL_NUMBER=3 +val SCE_TCL_WORD_IN_QUOTE=4 +val SCE_TCL_IN_QUOTE=5 +val SCE_TCL_OPERATOR=6 +val SCE_TCL_IDENTIFIER=7 +val SCE_TCL_SUBSTITUTION=8 +val SCE_TCL_SUB_BRACE=9 +val SCE_TCL_MODIFIER=10 +val SCE_TCL_EXPAND=11 +val SCE_TCL_WORD=12 +val SCE_TCL_WORD2=13 +val SCE_TCL_WORD3=14 +val SCE_TCL_WORD4=15 +val SCE_TCL_WORD5=16 +val SCE_TCL_WORD6=17 +val SCE_TCL_WORD7=18 +val SCE_TCL_WORD8=19 +val SCE_TCL_COMMENT_BOX=20 +val SCE_TCL_BLOCK_COMMENT=21 +# Lexical states for SCLEX_HTML, SCLEX_XML +lex HTML=SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ +lex XML=SCLEX_XML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ +val SCE_H_DEFAULT=0 +val SCE_H_TAG=1 +val SCE_H_TAGUNKNOWN=2 +val SCE_H_ATTRIBUTE=3 +val SCE_H_ATTRIBUTEUNKNOWN=4 +val SCE_H_NUMBER=5 +val SCE_H_DOUBLESTRING=6 +val SCE_H_SINGLESTRING=7 +val SCE_H_OTHER=8 +val SCE_H_COMMENT=9 +val SCE_H_ENTITY=10 +# XML and ASP +val SCE_H_TAGEND=11 +val SCE_H_XMLSTART=12 +val SCE_H_XMLEND=13 +val SCE_H_SCRIPT=14 +val SCE_H_ASP=15 +val SCE_H_ASPAT=16 +val SCE_H_CDATA=17 +val SCE_H_QUESTION=18 +# More HTML +val SCE_H_VALUE=19 +# X-Code +val SCE_H_XCCOMMENT=20 +# SGML +val SCE_H_SGML_DEFAULT=21 +val SCE_H_SGML_COMMAND=22 +val SCE_H_SGML_1ST_PARAM=23 +val SCE_H_SGML_DOUBLESTRING=24 +val SCE_H_SGML_SIMPLESTRING=25 +val SCE_H_SGML_ERROR=26 +val SCE_H_SGML_SPECIAL=27 +val SCE_H_SGML_ENTITY=28 +val SCE_H_SGML_COMMENT=29 +val SCE_H_SGML_1ST_PARAM_COMMENT=30 +val SCE_H_SGML_BLOCK_DEFAULT=31 +# Embedded Javascript +val SCE_HJ_START=40 +val SCE_HJ_DEFAULT=41 +val SCE_HJ_COMMENT=42 +val SCE_HJ_COMMENTLINE=43 +val SCE_HJ_COMMENTDOC=44 +val SCE_HJ_NUMBER=45 +val SCE_HJ_WORD=46 +val SCE_HJ_KEYWORD=47 +val SCE_HJ_DOUBLESTRING=48 +val SCE_HJ_SINGLESTRING=49 +val SCE_HJ_SYMBOLS=50 +val SCE_HJ_STRINGEOL=51 +val SCE_HJ_REGEX=52 +# ASP Javascript +val SCE_HJA_START=55 +val SCE_HJA_DEFAULT=56 +val SCE_HJA_COMMENT=57 +val SCE_HJA_COMMENTLINE=58 +val SCE_HJA_COMMENTDOC=59 +val SCE_HJA_NUMBER=60 +val SCE_HJA_WORD=61 +val SCE_HJA_KEYWORD=62 +val SCE_HJA_DOUBLESTRING=63 +val SCE_HJA_SINGLESTRING=64 +val SCE_HJA_SYMBOLS=65 +val SCE_HJA_STRINGEOL=66 +val SCE_HJA_REGEX=67 +# Embedded VBScript +val SCE_HB_START=70 +val SCE_HB_DEFAULT=71 +val SCE_HB_COMMENTLINE=72 +val SCE_HB_NUMBER=73 +val SCE_HB_WORD=74 +val SCE_HB_STRING=75 +val SCE_HB_IDENTIFIER=76 +val SCE_HB_STRINGEOL=77 +# ASP VBScript +val SCE_HBA_START=80 +val SCE_HBA_DEFAULT=81 +val SCE_HBA_COMMENTLINE=82 +val SCE_HBA_NUMBER=83 +val SCE_HBA_WORD=84 +val SCE_HBA_STRING=85 +val SCE_HBA_IDENTIFIER=86 +val SCE_HBA_STRINGEOL=87 +# Embedded Python +val SCE_HP_START=90 +val SCE_HP_DEFAULT=91 +val SCE_HP_COMMENTLINE=92 +val SCE_HP_NUMBER=93 +val SCE_HP_STRING=94 +val SCE_HP_CHARACTER=95 +val SCE_HP_WORD=96 +val SCE_HP_TRIPLE=97 +val SCE_HP_TRIPLEDOUBLE=98 +val SCE_HP_CLASSNAME=99 +val SCE_HP_DEFNAME=100 +val SCE_HP_OPERATOR=101 +val SCE_HP_IDENTIFIER=102 +# PHP +val SCE_HPHP_COMPLEX_VARIABLE=104 +# ASP Python +val SCE_HPA_START=105 +val SCE_HPA_DEFAULT=106 +val SCE_HPA_COMMENTLINE=107 +val SCE_HPA_NUMBER=108 +val SCE_HPA_STRING=109 +val SCE_HPA_CHARACTER=110 +val SCE_HPA_WORD=111 +val SCE_HPA_TRIPLE=112 +val SCE_HPA_TRIPLEDOUBLE=113 +val SCE_HPA_CLASSNAME=114 +val SCE_HPA_DEFNAME=115 +val SCE_HPA_OPERATOR=116 +val SCE_HPA_IDENTIFIER=117 +# PHP +val SCE_HPHP_DEFAULT=118 +val SCE_HPHP_HSTRING=119 +val SCE_HPHP_SIMPLESTRING=120 +val SCE_HPHP_WORD=121 +val SCE_HPHP_NUMBER=122 +val SCE_HPHP_VARIABLE=123 +val SCE_HPHP_COMMENT=124 +val SCE_HPHP_COMMENTLINE=125 +val SCE_HPHP_HSTRING_VARIABLE=126 +val SCE_HPHP_OPERATOR=127 +# Lexical states for SCLEX_PERL +lex Perl=SCLEX_PERL SCE_PL_ +val SCE_PL_DEFAULT=0 +val SCE_PL_ERROR=1 +val SCE_PL_COMMENTLINE=2 +val SCE_PL_POD=3 +val SCE_PL_NUMBER=4 +val SCE_PL_WORD=5 +val SCE_PL_STRING=6 +val SCE_PL_CHARACTER=7 +val SCE_PL_PUNCTUATION=8 +val SCE_PL_PREPROCESSOR=9 +val SCE_PL_OPERATOR=10 +val SCE_PL_IDENTIFIER=11 +val SCE_PL_SCALAR=12 +val SCE_PL_ARRAY=13 +val SCE_PL_HASH=14 +val SCE_PL_SYMBOLTABLE=15 +val SCE_PL_VARIABLE_INDEXER=16 +val SCE_PL_REGEX=17 +val SCE_PL_REGSUBST=18 +val SCE_PL_LONGQUOTE=19 +val SCE_PL_BACKTICKS=20 +val SCE_PL_DATASECTION=21 +val SCE_PL_HERE_DELIM=22 +val SCE_PL_HERE_Q=23 +val SCE_PL_HERE_QQ=24 +val SCE_PL_HERE_QX=25 +val SCE_PL_STRING_Q=26 +val SCE_PL_STRING_QQ=27 +val SCE_PL_STRING_QX=28 +val SCE_PL_STRING_QR=29 +val SCE_PL_STRING_QW=30 +val SCE_PL_POD_VERB=31 +val SCE_PL_SUB_PROTOTYPE=40 +val SCE_PL_FORMAT_IDENT=41 +val SCE_PL_FORMAT=42 +val SCE_PL_STRING_VAR=43 +val SCE_PL_XLAT=44 +val SCE_PL_REGEX_VAR=54 +val SCE_PL_REGSUBST_VAR=55 +val SCE_PL_BACKTICKS_VAR=57 +val SCE_PL_HERE_QQ_VAR=61 +val SCE_PL_HERE_QX_VAR=62 +val SCE_PL_STRING_QQ_VAR=64 +val SCE_PL_STRING_QX_VAR=65 +val SCE_PL_STRING_QR_VAR=66 +# Lexical states for SCLEX_RUBY +lex Ruby=SCLEX_RUBY SCE_RB_ +val SCE_RB_DEFAULT=0 +val SCE_RB_ERROR=1 +val SCE_RB_COMMENTLINE=2 +val SCE_RB_POD=3 +val SCE_RB_NUMBER=4 +val SCE_RB_WORD=5 +val SCE_RB_STRING=6 +val SCE_RB_CHARACTER=7 +val SCE_RB_CLASSNAME=8 +val SCE_RB_DEFNAME=9 +val SCE_RB_OPERATOR=10 +val SCE_RB_IDENTIFIER=11 +val SCE_RB_REGEX=12 +val SCE_RB_GLOBAL=13 +val SCE_RB_SYMBOL=14 +val SCE_RB_MODULE_NAME=15 +val SCE_RB_INSTANCE_VAR=16 +val SCE_RB_CLASS_VAR=17 +val SCE_RB_BACKTICKS=18 +val SCE_RB_DATASECTION=19 +val SCE_RB_HERE_DELIM=20 +val SCE_RB_HERE_Q=21 +val SCE_RB_HERE_QQ=22 +val SCE_RB_HERE_QX=23 +val SCE_RB_STRING_Q=24 +val SCE_RB_STRING_QQ=25 +val SCE_RB_STRING_QX=26 +val SCE_RB_STRING_QR=27 +val SCE_RB_STRING_QW=28 +val SCE_RB_WORD_DEMOTED=29 +val SCE_RB_STDIN=30 +val SCE_RB_STDOUT=31 +val SCE_RB_STDERR=40 +val SCE_RB_UPPER_BOUND=41 +# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC, SCLEX_BLITZBASIC, SCLEX_PUREBASIC, SCLEX_FREEBASIC +lex VB=SCLEX_VB SCE_B_ +lex VBScript=SCLEX_VBSCRIPT SCE_B_ +lex PowerBasic=SCLEX_POWERBASIC SCE_B_ +lex BlitzBasic=SCLEX_BLITZBASIC SCE_B_ +lex PureBasic=SCLEX_PUREBASIC SCE_B_ +lex FreeBasic=SCLEX_FREEBASIC SCE_B_ +val SCE_B_DEFAULT=0 +val SCE_B_COMMENT=1 +val SCE_B_NUMBER=2 +val SCE_B_KEYWORD=3 +val SCE_B_STRING=4 +val SCE_B_PREPROCESSOR=5 +val SCE_B_OPERATOR=6 +val SCE_B_IDENTIFIER=7 +val SCE_B_DATE=8 +val SCE_B_STRINGEOL=9 +val SCE_B_KEYWORD2=10 +val SCE_B_KEYWORD3=11 +val SCE_B_KEYWORD4=12 +val SCE_B_CONSTANT=13 +val SCE_B_ASM=14 +val SCE_B_LABEL=15 +val SCE_B_ERROR=16 +val SCE_B_HEXNUMBER=17 +val SCE_B_BINNUMBER=18 +val SCE_B_COMMENTBLOCK=19 +val SCE_B_DOCLINE=20 +val SCE_B_DOCBLOCK=21 +val SCE_B_DOCKEYWORD=22 +# Lexical states for SCLEX_PROPERTIES +lex Properties=SCLEX_PROPERTIES SCE_PROPS_ +val SCE_PROPS_DEFAULT=0 +val SCE_PROPS_COMMENT=1 +val SCE_PROPS_SECTION=2 +val SCE_PROPS_ASSIGNMENT=3 +val SCE_PROPS_DEFVAL=4 +val SCE_PROPS_KEY=5 +# Lexical states for SCLEX_LATEX +lex LaTeX=SCLEX_LATEX SCE_L_ +val SCE_L_DEFAULT=0 +val SCE_L_COMMAND=1 +val SCE_L_TAG=2 +val SCE_L_MATH=3 +val SCE_L_COMMENT=4 +val SCE_L_TAG2=5 +val SCE_L_MATH2=6 +val SCE_L_COMMENT2=7 +val SCE_L_VERBATIM=8 +val SCE_L_SHORTCMD=9 +val SCE_L_SPECIAL=10 +val SCE_L_CMDOPT=11 +val SCE_L_ERROR=12 +# Lexical states for SCLEX_LUA +lex Lua=SCLEX_LUA SCE_LUA_ +val SCE_LUA_DEFAULT=0 +val SCE_LUA_COMMENT=1 +val SCE_LUA_COMMENTLINE=2 +val SCE_LUA_COMMENTDOC=3 +val SCE_LUA_NUMBER=4 +val SCE_LUA_WORD=5 +val SCE_LUA_STRING=6 +val SCE_LUA_CHARACTER=7 +val SCE_LUA_LITERALSTRING=8 +val SCE_LUA_PREPROCESSOR=9 +val SCE_LUA_OPERATOR=10 +val SCE_LUA_IDENTIFIER=11 +val SCE_LUA_STRINGEOL=12 +val SCE_LUA_WORD2=13 +val SCE_LUA_WORD3=14 +val SCE_LUA_WORD4=15 +val SCE_LUA_WORD5=16 +val SCE_LUA_WORD6=17 +val SCE_LUA_WORD7=18 +val SCE_LUA_WORD8=19 +val SCE_LUA_LABEL=20 +# Lexical states for SCLEX_ERRORLIST +lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ +val SCE_ERR_DEFAULT=0 +val SCE_ERR_PYTHON=1 +val SCE_ERR_GCC=2 +val SCE_ERR_MS=3 +val SCE_ERR_CMD=4 +val SCE_ERR_BORLAND=5 +val SCE_ERR_PERL=6 +val SCE_ERR_NET=7 +val SCE_ERR_LUA=8 +val SCE_ERR_CTAG=9 +val SCE_ERR_DIFF_CHANGED=10 +val SCE_ERR_DIFF_ADDITION=11 +val SCE_ERR_DIFF_DELETION=12 +val SCE_ERR_DIFF_MESSAGE=13 +val SCE_ERR_PHP=14 +val SCE_ERR_ELF=15 +val SCE_ERR_IFC=16 +val SCE_ERR_IFORT=17 +val SCE_ERR_ABSF=18 +val SCE_ERR_TIDY=19 +val SCE_ERR_JAVA_STACK=20 +val SCE_ERR_VALUE=21 +val SCE_ERR_GCC_INCLUDED_FROM=22 +val SCE_ERR_ESCSEQ=23 +val SCE_ERR_ESCSEQ_UNKNOWN=24 +val SCE_ERR_ES_BLACK=40 +val SCE_ERR_ES_RED=41 +val SCE_ERR_ES_GREEN=42 +val SCE_ERR_ES_BROWN=43 +val SCE_ERR_ES_BLUE=44 +val SCE_ERR_ES_MAGENTA=45 +val SCE_ERR_ES_CYAN=46 +val SCE_ERR_ES_GRAY=47 +val SCE_ERR_ES_DARK_GRAY=48 +val SCE_ERR_ES_BRIGHT_RED=49 +val SCE_ERR_ES_BRIGHT_GREEN=50 +val SCE_ERR_ES_YELLOW=51 +val SCE_ERR_ES_BRIGHT_BLUE=52 +val SCE_ERR_ES_BRIGHT_MAGENTA=53 +val SCE_ERR_ES_BRIGHT_CYAN=54 +val SCE_ERR_ES_WHITE=55 +# Lexical states for SCLEX_BATCH +lex Batch=SCLEX_BATCH SCE_BAT_ +val SCE_BAT_DEFAULT=0 +val SCE_BAT_COMMENT=1 +val SCE_BAT_WORD=2 +val SCE_BAT_LABEL=3 +val SCE_BAT_HIDE=4 +val SCE_BAT_COMMAND=5 +val SCE_BAT_IDENTIFIER=6 +val SCE_BAT_OPERATOR=7 +# Lexical states for SCLEX_TCMD +lex TCMD=SCLEX_TCMD SCE_TCMD_ +val SCE_TCMD_DEFAULT=0 +val SCE_TCMD_COMMENT=1 +val SCE_TCMD_WORD=2 +val SCE_TCMD_LABEL=3 +val SCE_TCMD_HIDE=4 +val SCE_TCMD_COMMAND=5 +val SCE_TCMD_IDENTIFIER=6 +val SCE_TCMD_OPERATOR=7 +val SCE_TCMD_ENVIRONMENT=8 +val SCE_TCMD_EXPANSION=9 +val SCE_TCMD_CLABEL=10 +# Lexical states for SCLEX_MAKEFILE +lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_ +val SCE_MAKE_DEFAULT=0 +val SCE_MAKE_COMMENT=1 +val SCE_MAKE_PREPROCESSOR=2 +val SCE_MAKE_IDENTIFIER=3 +val SCE_MAKE_OPERATOR=4 +val SCE_MAKE_TARGET=5 +val SCE_MAKE_IDEOL=9 +# Lexical states for SCLEX_DIFF +lex Diff=SCLEX_DIFF SCE_DIFF_ +val SCE_DIFF_DEFAULT=0 +val SCE_DIFF_COMMENT=1 +val SCE_DIFF_COMMAND=2 +val SCE_DIFF_HEADER=3 +val SCE_DIFF_POSITION=4 +val SCE_DIFF_DELETED=5 +val SCE_DIFF_ADDED=6 +val SCE_DIFF_CHANGED=7 +val SCE_DIFF_PATCH_ADD=8 +val SCE_DIFF_PATCH_DELETE=9 +val SCE_DIFF_REMOVED_PATCH_ADD=10 +val SCE_DIFF_REMOVED_PATCH_DELETE=11 +# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) +lex Conf=SCLEX_CONF SCE_CONF_ +val SCE_CONF_DEFAULT=0 +val SCE_CONF_COMMENT=1 +val SCE_CONF_NUMBER=2 +val SCE_CONF_IDENTIFIER=3 +val SCE_CONF_EXTENSION=4 +val SCE_CONF_PARAMETER=5 +val SCE_CONF_STRING=6 +val SCE_CONF_OPERATOR=7 +val SCE_CONF_IP=8 +val SCE_CONF_DIRECTIVE=9 +# Lexical states for SCLEX_AVE, Avenue +lex Avenue=SCLEX_AVE SCE_AVE_ +val SCE_AVE_DEFAULT=0 +val SCE_AVE_COMMENT=1 +val SCE_AVE_NUMBER=2 +val SCE_AVE_WORD=3 +val SCE_AVE_STRING=6 +val SCE_AVE_ENUM=7 +val SCE_AVE_STRINGEOL=8 +val SCE_AVE_IDENTIFIER=9 +val SCE_AVE_OPERATOR=10 +val SCE_AVE_WORD1=11 +val SCE_AVE_WORD2=12 +val SCE_AVE_WORD3=13 +val SCE_AVE_WORD4=14 +val SCE_AVE_WORD5=15 +val SCE_AVE_WORD6=16 +# Lexical states for SCLEX_ADA +lex Ada=SCLEX_ADA SCE_ADA_ +val SCE_ADA_DEFAULT=0 +val SCE_ADA_WORD=1 +val SCE_ADA_IDENTIFIER=2 +val SCE_ADA_NUMBER=3 +val SCE_ADA_DELIMITER=4 +val SCE_ADA_CHARACTER=5 +val SCE_ADA_CHARACTEREOL=6 +val SCE_ADA_STRING=7 +val SCE_ADA_STRINGEOL=8 +val SCE_ADA_LABEL=9 +val SCE_ADA_COMMENTLINE=10 +val SCE_ADA_ILLEGAL=11 +# Lexical states for SCLEX_BAAN +lex Baan=SCLEX_BAAN SCE_BAAN_ +val SCE_BAAN_DEFAULT=0 +val SCE_BAAN_COMMENT=1 +val SCE_BAAN_COMMENTDOC=2 +val SCE_BAAN_NUMBER=3 +val SCE_BAAN_WORD=4 +val SCE_BAAN_STRING=5 +val SCE_BAAN_PREPROCESSOR=6 +val SCE_BAAN_OPERATOR=7 +val SCE_BAAN_IDENTIFIER=8 +val SCE_BAAN_STRINGEOL=9 +val SCE_BAAN_WORD2=10 +val SCE_BAAN_WORD3=11 +val SCE_BAAN_WORD4=12 +val SCE_BAAN_WORD5=13 +val SCE_BAAN_WORD6=14 +val SCE_BAAN_WORD7=15 +val SCE_BAAN_WORD8=16 +val SCE_BAAN_WORD9=17 +val SCE_BAAN_TABLEDEF=18 +val SCE_BAAN_TABLESQL=19 +val SCE_BAAN_FUNCTION=20 +val SCE_BAAN_DOMDEF=21 +val SCE_BAAN_FUNCDEF=22 +val SCE_BAAN_OBJECTDEF=23 +val SCE_BAAN_DEFINEDEF=24 +# Lexical states for SCLEX_LISP +lex Lisp=SCLEX_LISP SCE_LISP_ +val SCE_LISP_DEFAULT=0 +val SCE_LISP_COMMENT=1 +val SCE_LISP_NUMBER=2 +val SCE_LISP_KEYWORD=3 +val SCE_LISP_KEYWORD_KW=4 +val SCE_LISP_SYMBOL=5 +val SCE_LISP_STRING=6 +val SCE_LISP_STRINGEOL=8 +val SCE_LISP_IDENTIFIER=9 +val SCE_LISP_OPERATOR=10 +val SCE_LISP_SPECIAL=11 +val SCE_LISP_MULTI_COMMENT=12 +# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW +lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_ +lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_ +val SCE_EIFFEL_DEFAULT=0 +val SCE_EIFFEL_COMMENTLINE=1 +val SCE_EIFFEL_NUMBER=2 +val SCE_EIFFEL_WORD=3 +val SCE_EIFFEL_STRING=4 +val SCE_EIFFEL_CHARACTER=5 +val SCE_EIFFEL_OPERATOR=6 +val SCE_EIFFEL_IDENTIFIER=7 +val SCE_EIFFEL_STRINGEOL=8 +# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) +lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_ +val SCE_NNCRONTAB_DEFAULT=0 +val SCE_NNCRONTAB_COMMENT=1 +val SCE_NNCRONTAB_TASK=2 +val SCE_NNCRONTAB_SECTION=3 +val SCE_NNCRONTAB_KEYWORD=4 +val SCE_NNCRONTAB_MODIFIER=5 +val SCE_NNCRONTAB_ASTERISK=6 +val SCE_NNCRONTAB_NUMBER=7 +val SCE_NNCRONTAB_STRING=8 +val SCE_NNCRONTAB_ENVIRONMENT=9 +val SCE_NNCRONTAB_IDENTIFIER=10 +# Lexical states for SCLEX_FORTH (Forth Lexer) +lex Forth=SCLEX_FORTH SCE_FORTH_ +val SCE_FORTH_DEFAULT=0 +val SCE_FORTH_COMMENT=1 +val SCE_FORTH_COMMENT_ML=2 +val SCE_FORTH_IDENTIFIER=3 +val SCE_FORTH_CONTROL=4 +val SCE_FORTH_KEYWORD=5 +val SCE_FORTH_DEFWORD=6 +val SCE_FORTH_PREWORD1=7 +val SCE_FORTH_PREWORD2=8 +val SCE_FORTH_NUMBER=9 +val SCE_FORTH_STRING=10 +val SCE_FORTH_LOCALE=11 +# Lexical states for SCLEX_MATLAB +lex MatLab=SCLEX_MATLAB SCE_MATLAB_ +val SCE_MATLAB_DEFAULT=0 +val SCE_MATLAB_COMMENT=1 +val SCE_MATLAB_COMMAND=2 +val SCE_MATLAB_NUMBER=3 +val SCE_MATLAB_KEYWORD=4 +# single quoted string +val SCE_MATLAB_STRING=5 +val SCE_MATLAB_OPERATOR=6 +val SCE_MATLAB_IDENTIFIER=7 +val SCE_MATLAB_DOUBLEQUOTESTRING=8 +# Lexical states for SCLEX_MAXIMA +lex Maxima=SCLEX_MAXIMA SCE_MAXIMA_ +val SCE_MAXIMA_OPERATOR=0 +val SCE_MAXIMA_COMMANDENDING=1 +val SCE_MAXIMA_COMMENT=2 +val SCE_MAXIMA_NUMBER=3 +val SCE_MAXIMA_STRING=4 +val SCE_MAXIMA_COMMAND=5 +val SCE_MAXIMA_VARIABLE=6 +val SCE_MAXIMA_UNKNOWN=7 +# Lexical states for SCLEX_SCRIPTOL +lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_ +val SCE_SCRIPTOL_DEFAULT=0 +val SCE_SCRIPTOL_WHITE=1 +val SCE_SCRIPTOL_COMMENTLINE=2 +val SCE_SCRIPTOL_PERSISTENT=3 +val SCE_SCRIPTOL_CSTYLE=4 +val SCE_SCRIPTOL_COMMENTBLOCK=5 +val SCE_SCRIPTOL_NUMBER=6 +val SCE_SCRIPTOL_STRING=7 +val SCE_SCRIPTOL_CHARACTER=8 +val SCE_SCRIPTOL_STRINGEOL=9 +val SCE_SCRIPTOL_KEYWORD=10 +val SCE_SCRIPTOL_OPERATOR=11 +val SCE_SCRIPTOL_IDENTIFIER=12 +val SCE_SCRIPTOL_TRIPLE=13 +val SCE_SCRIPTOL_CLASSNAME=14 +val SCE_SCRIPTOL_PREPROCESSOR=15 +# Lexical states for SCLEX_ASM, SCLEX_AS +lex Asm=SCLEX_ASM SCE_ASM_ +lex As=SCLEX_AS SCE_ASM_ +val SCE_ASM_DEFAULT=0 +val SCE_ASM_COMMENT=1 +val SCE_ASM_NUMBER=2 +val SCE_ASM_STRING=3 +val SCE_ASM_OPERATOR=4 +val SCE_ASM_IDENTIFIER=5 +val SCE_ASM_CPUINSTRUCTION=6 +val SCE_ASM_MATHINSTRUCTION=7 +val SCE_ASM_REGISTER=8 +val SCE_ASM_DIRECTIVE=9 +val SCE_ASM_DIRECTIVEOPERAND=10 +val SCE_ASM_COMMENTBLOCK=11 +val SCE_ASM_CHARACTER=12 +val SCE_ASM_STRINGEOL=13 +val SCE_ASM_EXTINSTRUCTION=14 +val SCE_ASM_COMMENTDIRECTIVE=15 +# Lexical states for SCLEX_FORTRAN +lex Fortran=SCLEX_FORTRAN SCE_F_ +lex F77=SCLEX_F77 SCE_F_ +val SCE_F_DEFAULT=0 +val SCE_F_COMMENT=1 +val SCE_F_NUMBER=2 +val SCE_F_STRING1=3 +val SCE_F_STRING2=4 +val SCE_F_STRINGEOL=5 +val SCE_F_OPERATOR=6 +val SCE_F_IDENTIFIER=7 +val SCE_F_WORD=8 +val SCE_F_WORD2=9 +val SCE_F_WORD3=10 +val SCE_F_PREPROCESSOR=11 +val SCE_F_OPERATOR2=12 +val SCE_F_LABEL=13 +val SCE_F_CONTINUATION=14 +# Lexical states for SCLEX_CSS +lex CSS=SCLEX_CSS SCE_CSS_ +val SCE_CSS_DEFAULT=0 +val SCE_CSS_TAG=1 +val SCE_CSS_CLASS=2 +val SCE_CSS_PSEUDOCLASS=3 +val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 +val SCE_CSS_OPERATOR=5 +val SCE_CSS_IDENTIFIER=6 +val SCE_CSS_UNKNOWN_IDENTIFIER=7 +val SCE_CSS_VALUE=8 +val SCE_CSS_COMMENT=9 +val SCE_CSS_ID=10 +val SCE_CSS_IMPORTANT=11 +val SCE_CSS_DIRECTIVE=12 +val SCE_CSS_DOUBLESTRING=13 +val SCE_CSS_SINGLESTRING=14 +val SCE_CSS_IDENTIFIER2=15 +val SCE_CSS_ATTRIBUTE=16 +val SCE_CSS_IDENTIFIER3=17 +val SCE_CSS_PSEUDOELEMENT=18 +val SCE_CSS_EXTENDED_IDENTIFIER=19 +val SCE_CSS_EXTENDED_PSEUDOCLASS=20 +val SCE_CSS_EXTENDED_PSEUDOELEMENT=21 +val SCE_CSS_MEDIA=22 +val SCE_CSS_VARIABLE=23 +# Lexical states for SCLEX_POV +lex POV=SCLEX_POV SCE_POV_ +val SCE_POV_DEFAULT=0 +val SCE_POV_COMMENT=1 +val SCE_POV_COMMENTLINE=2 +val SCE_POV_NUMBER=3 +val SCE_POV_OPERATOR=4 +val SCE_POV_IDENTIFIER=5 +val SCE_POV_STRING=6 +val SCE_POV_STRINGEOL=7 +val SCE_POV_DIRECTIVE=8 +val SCE_POV_BADDIRECTIVE=9 +val SCE_POV_WORD2=10 +val SCE_POV_WORD3=11 +val SCE_POV_WORD4=12 +val SCE_POV_WORD5=13 +val SCE_POV_WORD6=14 +val SCE_POV_WORD7=15 +val SCE_POV_WORD8=16 +# Lexical states for SCLEX_LOUT +lex LOUT=SCLEX_LOUT SCE_LOUT_ +val SCE_LOUT_DEFAULT=0 +val SCE_LOUT_COMMENT=1 +val SCE_LOUT_NUMBER=2 +val SCE_LOUT_WORD=3 +val SCE_LOUT_WORD2=4 +val SCE_LOUT_WORD3=5 +val SCE_LOUT_WORD4=6 +val SCE_LOUT_STRING=7 +val SCE_LOUT_OPERATOR=8 +val SCE_LOUT_IDENTIFIER=9 +val SCE_LOUT_STRINGEOL=10 +# Lexical states for SCLEX_ESCRIPT +lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ +val SCE_ESCRIPT_DEFAULT=0 +val SCE_ESCRIPT_COMMENT=1 +val SCE_ESCRIPT_COMMENTLINE=2 +val SCE_ESCRIPT_COMMENTDOC=3 +val SCE_ESCRIPT_NUMBER=4 +val SCE_ESCRIPT_WORD=5 +val SCE_ESCRIPT_STRING=6 +val SCE_ESCRIPT_OPERATOR=7 +val SCE_ESCRIPT_IDENTIFIER=8 +val SCE_ESCRIPT_BRACE=9 +val SCE_ESCRIPT_WORD2=10 +val SCE_ESCRIPT_WORD3=11 +# Lexical states for SCLEX_PS +lex PS=SCLEX_PS SCE_PS_ +val SCE_PS_DEFAULT=0 +val SCE_PS_COMMENT=1 +val SCE_PS_DSC_COMMENT=2 +val SCE_PS_DSC_VALUE=3 +val SCE_PS_NUMBER=4 +val SCE_PS_NAME=5 +val SCE_PS_KEYWORD=6 +val SCE_PS_LITERAL=7 +val SCE_PS_IMMEVAL=8 +val SCE_PS_PAREN_ARRAY=9 +val SCE_PS_PAREN_DICT=10 +val SCE_PS_PAREN_PROC=11 +val SCE_PS_TEXT=12 +val SCE_PS_HEXSTRING=13 +val SCE_PS_BASE85STRING=14 +val SCE_PS_BADSTRINGCHAR=15 +# Lexical states for SCLEX_NSIS +lex NSIS=SCLEX_NSIS SCE_NSIS_ +val SCE_NSIS_DEFAULT=0 +val SCE_NSIS_COMMENT=1 +val SCE_NSIS_STRINGDQ=2 +val SCE_NSIS_STRINGLQ=3 +val SCE_NSIS_STRINGRQ=4 +val SCE_NSIS_FUNCTION=5 +val SCE_NSIS_VARIABLE=6 +val SCE_NSIS_LABEL=7 +val SCE_NSIS_USERDEFINED=8 +val SCE_NSIS_SECTIONDEF=9 +val SCE_NSIS_SUBSECTIONDEF=10 +val SCE_NSIS_IFDEFINEDEF=11 +val SCE_NSIS_MACRODEF=12 +val SCE_NSIS_STRINGVAR=13 +val SCE_NSIS_NUMBER=14 +val SCE_NSIS_SECTIONGROUP=15 +val SCE_NSIS_PAGEEX=16 +val SCE_NSIS_FUNCTIONDEF=17 +val SCE_NSIS_COMMENTBOX=18 +# Lexical states for SCLEX_MMIXAL +lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ +val SCE_MMIXAL_LEADWS=0 +val SCE_MMIXAL_COMMENT=1 +val SCE_MMIXAL_LABEL=2 +val SCE_MMIXAL_OPCODE=3 +val SCE_MMIXAL_OPCODE_PRE=4 +val SCE_MMIXAL_OPCODE_VALID=5 +val SCE_MMIXAL_OPCODE_UNKNOWN=6 +val SCE_MMIXAL_OPCODE_POST=7 +val SCE_MMIXAL_OPERANDS=8 +val SCE_MMIXAL_NUMBER=9 +val SCE_MMIXAL_REF=10 +val SCE_MMIXAL_CHAR=11 +val SCE_MMIXAL_STRING=12 +val SCE_MMIXAL_REGISTER=13 +val SCE_MMIXAL_HEX=14 +val SCE_MMIXAL_OPERATOR=15 +val SCE_MMIXAL_SYMBOL=16 +val SCE_MMIXAL_INCLUDE=17 +# Lexical states for SCLEX_CLW +lex Clarion=SCLEX_CLW SCE_CLW_ +val SCE_CLW_DEFAULT=0 +val SCE_CLW_LABEL=1 +val SCE_CLW_COMMENT=2 +val SCE_CLW_STRING=3 +val SCE_CLW_USER_IDENTIFIER=4 +val SCE_CLW_INTEGER_CONSTANT=5 +val SCE_CLW_REAL_CONSTANT=6 +val SCE_CLW_PICTURE_STRING=7 +val SCE_CLW_KEYWORD=8 +val SCE_CLW_COMPILER_DIRECTIVE=9 +val SCE_CLW_RUNTIME_EXPRESSIONS=10 +val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11 +val SCE_CLW_STRUCTURE_DATA_TYPE=12 +val SCE_CLW_ATTRIBUTE=13 +val SCE_CLW_STANDARD_EQUATE=14 +val SCE_CLW_ERROR=15 +val SCE_CLW_DEPRECATED=16 +# Lexical states for SCLEX_LOT +lex LOT=SCLEX_LOT SCE_LOT_ +val SCE_LOT_DEFAULT=0 +val SCE_LOT_HEADER=1 +val SCE_LOT_BREAK=2 +val SCE_LOT_SET=3 +val SCE_LOT_PASS=4 +val SCE_LOT_FAIL=5 +val SCE_LOT_ABORT=6 +# Lexical states for SCLEX_YAML +lex YAML=SCLEX_YAML SCE_YAML_ +val SCE_YAML_DEFAULT=0 +val SCE_YAML_COMMENT=1 +val SCE_YAML_IDENTIFIER=2 +val SCE_YAML_KEYWORD=3 +val SCE_YAML_NUMBER=4 +val SCE_YAML_REFERENCE=5 +val SCE_YAML_DOCUMENT=6 +val SCE_YAML_TEXT=7 +val SCE_YAML_ERROR=8 +val SCE_YAML_OPERATOR=9 +# Lexical states for SCLEX_TEX +lex TeX=SCLEX_TEX SCE_TEX_ +val SCE_TEX_DEFAULT=0 +val SCE_TEX_SPECIAL=1 +val SCE_TEX_GROUP=2 +val SCE_TEX_SYMBOL=3 +val SCE_TEX_COMMAND=4 +val SCE_TEX_TEXT=5 +lex Metapost=SCLEX_METAPOST SCE_METAPOST_ +val SCE_METAPOST_DEFAULT=0 +val SCE_METAPOST_SPECIAL=1 +val SCE_METAPOST_GROUP=2 +val SCE_METAPOST_SYMBOL=3 +val SCE_METAPOST_COMMAND=4 +val SCE_METAPOST_TEXT=5 +val SCE_METAPOST_EXTRA=6 +# Lexical states for SCLEX_ERLANG +lex Erlang=SCLEX_ERLANG SCE_ERLANG_ +val SCE_ERLANG_DEFAULT=0 +val SCE_ERLANG_COMMENT=1 +val SCE_ERLANG_VARIABLE=2 +val SCE_ERLANG_NUMBER=3 +val SCE_ERLANG_KEYWORD=4 +val SCE_ERLANG_STRING=5 +val SCE_ERLANG_OPERATOR=6 +val SCE_ERLANG_ATOM=7 +val SCE_ERLANG_FUNCTION_NAME=8 +val SCE_ERLANG_CHARACTER=9 +val SCE_ERLANG_MACRO=10 +val SCE_ERLANG_RECORD=11 +val SCE_ERLANG_PREPROC=12 +val SCE_ERLANG_NODE_NAME=13 +val SCE_ERLANG_COMMENT_FUNCTION=14 +val SCE_ERLANG_COMMENT_MODULE=15 +val SCE_ERLANG_COMMENT_DOC=16 +val SCE_ERLANG_COMMENT_DOC_MACRO=17 +val SCE_ERLANG_ATOM_QUOTED=18 +val SCE_ERLANG_MACRO_QUOTED=19 +val SCE_ERLANG_RECORD_QUOTED=20 +val SCE_ERLANG_NODE_NAME_QUOTED=21 +val SCE_ERLANG_BIFS=22 +val SCE_ERLANG_MODULES=23 +val SCE_ERLANG_MODULES_ATT=24 +val SCE_ERLANG_UNKNOWN=31 +# Lexical states for SCLEX_OCTAVE are identical to MatLab +lex Octave=SCLEX_OCTAVE SCE_MATLAB_ +# Lexical states for SCLEX_MSSQL +lex MSSQL=SCLEX_MSSQL SCE_MSSQL_ +val SCE_MSSQL_DEFAULT=0 +val SCE_MSSQL_COMMENT=1 +val SCE_MSSQL_LINE_COMMENT=2 +val SCE_MSSQL_NUMBER=3 +val SCE_MSSQL_STRING=4 +val SCE_MSSQL_OPERATOR=5 +val SCE_MSSQL_IDENTIFIER=6 +val SCE_MSSQL_VARIABLE=7 +val SCE_MSSQL_COLUMN_NAME=8 +val SCE_MSSQL_STATEMENT=9 +val SCE_MSSQL_DATATYPE=10 +val SCE_MSSQL_SYSTABLE=11 +val SCE_MSSQL_GLOBAL_VARIABLE=12 +val SCE_MSSQL_FUNCTION=13 +val SCE_MSSQL_STORED_PROCEDURE=14 +val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15 +val SCE_MSSQL_COLUMN_NAME_2=16 +# Lexical states for SCLEX_VERILOG +lex Verilog=SCLEX_VERILOG SCE_V_ +val SCE_V_DEFAULT=0 +val SCE_V_COMMENT=1 +val SCE_V_COMMENTLINE=2 +val SCE_V_COMMENTLINEBANG=3 +val SCE_V_NUMBER=4 +val SCE_V_WORD=5 +val SCE_V_STRING=6 +val SCE_V_WORD2=7 +val SCE_V_WORD3=8 +val SCE_V_PREPROCESSOR=9 +val SCE_V_OPERATOR=10 +val SCE_V_IDENTIFIER=11 +val SCE_V_STRINGEOL=12 +val SCE_V_USER=19 +val SCE_V_COMMENT_WORD=20 +val SCE_V_INPUT=21 +val SCE_V_OUTPUT=22 +val SCE_V_INOUT=23 +val SCE_V_PORT_CONNECT=24 +# Lexical states for SCLEX_KIX +lex Kix=SCLEX_KIX SCE_KIX_ +val SCE_KIX_DEFAULT=0 +val SCE_KIX_COMMENT=1 +val SCE_KIX_STRING1=2 +val SCE_KIX_STRING2=3 +val SCE_KIX_NUMBER=4 +val SCE_KIX_VAR=5 +val SCE_KIX_MACRO=6 +val SCE_KIX_KEYWORD=7 +val SCE_KIX_FUNCTIONS=8 +val SCE_KIX_OPERATOR=9 +val SCE_KIX_COMMENTSTREAM=10 +val SCE_KIX_IDENTIFIER=31 +# Lexical states for SCLEX_GUI4CLI +lex Gui4Cli=SCLEX_GUI4CLI SCE_GC_ +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +# Lexical states for SCLEX_SPECMAN +lex Specman=SCLEX_SPECMAN SCE_SN_ +val SCE_SN_DEFAULT=0 +val SCE_SN_CODE=1 +val SCE_SN_COMMENTLINE=2 +val SCE_SN_COMMENTLINEBANG=3 +val SCE_SN_NUMBER=4 +val SCE_SN_WORD=5 +val SCE_SN_STRING=6 +val SCE_SN_WORD2=7 +val SCE_SN_WORD3=8 +val SCE_SN_PREPROCESSOR=9 +val SCE_SN_OPERATOR=10 +val SCE_SN_IDENTIFIER=11 +val SCE_SN_STRINGEOL=12 +val SCE_SN_REGEXTAG=13 +val SCE_SN_SIGNAL=14 +val SCE_SN_USER=19 +# Lexical states for SCLEX_AU3 +lex Au3=SCLEX_AU3 SCE_AU3_ +val SCE_AU3_DEFAULT=0 +val SCE_AU3_COMMENT=1 +val SCE_AU3_COMMENTBLOCK=2 +val SCE_AU3_NUMBER=3 +val SCE_AU3_FUNCTION=4 +val SCE_AU3_KEYWORD=5 +val SCE_AU3_MACRO=6 +val SCE_AU3_STRING=7 +val SCE_AU3_OPERATOR=8 +val SCE_AU3_VARIABLE=9 +val SCE_AU3_SENT=10 +val SCE_AU3_PREPROCESSOR=11 +val SCE_AU3_SPECIAL=12 +val SCE_AU3_EXPAND=13 +val SCE_AU3_COMOBJ=14 +val SCE_AU3_UDF=15 +# Lexical states for SCLEX_APDL +lex APDL=SCLEX_APDL SCE_APDL_ +val SCE_APDL_DEFAULT=0 +val SCE_APDL_COMMENT=1 +val SCE_APDL_COMMENTBLOCK=2 +val SCE_APDL_NUMBER=3 +val SCE_APDL_STRING=4 +val SCE_APDL_OPERATOR=5 +val SCE_APDL_WORD=6 +val SCE_APDL_PROCESSOR=7 +val SCE_APDL_COMMAND=8 +val SCE_APDL_SLASHCOMMAND=9 +val SCE_APDL_STARCOMMAND=10 +val SCE_APDL_ARGUMENT=11 +val SCE_APDL_FUNCTION=12 +# Lexical states for SCLEX_BASH +lex Bash=SCLEX_BASH SCE_SH_ +val SCE_SH_DEFAULT=0 +val SCE_SH_ERROR=1 +val SCE_SH_COMMENTLINE=2 +val SCE_SH_NUMBER=3 +val SCE_SH_WORD=4 +val SCE_SH_STRING=5 +val SCE_SH_CHARACTER=6 +val SCE_SH_OPERATOR=7 +val SCE_SH_IDENTIFIER=8 +val SCE_SH_SCALAR=9 +val SCE_SH_PARAM=10 +val SCE_SH_BACKTICKS=11 +val SCE_SH_HERE_DELIM=12 +val SCE_SH_HERE_Q=13 +# Lexical states for SCLEX_ASN1 +lex Asn1=SCLEX_ASN1 SCE_ASN1_ +val SCE_ASN1_DEFAULT=0 +val SCE_ASN1_COMMENT=1 +val SCE_ASN1_IDENTIFIER=2 +val SCE_ASN1_STRING=3 +val SCE_ASN1_OID=4 +val SCE_ASN1_SCALAR=5 +val SCE_ASN1_KEYWORD=6 +val SCE_ASN1_ATTRIBUTE=7 +val SCE_ASN1_DESCRIPTOR=8 +val SCE_ASN1_TYPE=9 +val SCE_ASN1_OPERATOR=10 +# Lexical states for SCLEX_VHDL +lex VHDL=SCLEX_VHDL SCE_VHDL_ +val SCE_VHDL_DEFAULT=0 +val SCE_VHDL_COMMENT=1 +val SCE_VHDL_COMMENTLINEBANG=2 +val SCE_VHDL_NUMBER=3 +val SCE_VHDL_STRING=4 +val SCE_VHDL_OPERATOR=5 +val SCE_VHDL_IDENTIFIER=6 +val SCE_VHDL_STRINGEOL=7 +val SCE_VHDL_KEYWORD=8 +val SCE_VHDL_STDOPERATOR=9 +val SCE_VHDL_ATTRIBUTE=10 +val SCE_VHDL_STDFUNCTION=11 +val SCE_VHDL_STDPACKAGE=12 +val SCE_VHDL_STDTYPE=13 +val SCE_VHDL_USERWORD=14 +val SCE_VHDL_BLOCK_COMMENT=15 +# Lexical states for SCLEX_CAML +lex Caml=SCLEX_CAML SCE_CAML_ +val SCE_CAML_DEFAULT=0 +val SCE_CAML_IDENTIFIER=1 +val SCE_CAML_TAGNAME=2 +val SCE_CAML_KEYWORD=3 +val SCE_CAML_KEYWORD2=4 +val SCE_CAML_KEYWORD3=5 +val SCE_CAML_LINENUM=6 +val SCE_CAML_OPERATOR=7 +val SCE_CAML_NUMBER=8 +val SCE_CAML_CHAR=9 +val SCE_CAML_WHITE=10 +val SCE_CAML_STRING=11 +val SCE_CAML_COMMENT=12 +val SCE_CAML_COMMENT1=13 +val SCE_CAML_COMMENT2=14 +val SCE_CAML_COMMENT3=15 +# Lexical states for SCLEX_HASKELL +lex Haskell=SCLEX_HASKELL SCE_HA_ +val SCE_HA_DEFAULT=0 +val SCE_HA_IDENTIFIER=1 +val SCE_HA_KEYWORD=2 +val SCE_HA_NUMBER=3 +val SCE_HA_STRING=4 +val SCE_HA_CHARACTER=5 +val SCE_HA_CLASS=6 +val SCE_HA_MODULE=7 +val SCE_HA_CAPITAL=8 +val SCE_HA_DATA=9 +val SCE_HA_IMPORT=10 +val SCE_HA_OPERATOR=11 +val SCE_HA_INSTANCE=12 +val SCE_HA_COMMENTLINE=13 +val SCE_HA_COMMENTBLOCK=14 +val SCE_HA_COMMENTBLOCK2=15 +val SCE_HA_COMMENTBLOCK3=16 +val SCE_HA_PRAGMA=17 +val SCE_HA_PREPROCESSOR=18 +val SCE_HA_STRINGEOL=19 +val SCE_HA_RESERVED_OPERATOR=20 +val SCE_HA_LITERATE_COMMENT=21 +val SCE_HA_LITERATE_CODEDELIM=22 +# Lexical states of SCLEX_TADS3 +lex TADS3=SCLEX_TADS3 SCE_T3_ +val SCE_T3_DEFAULT=0 +val SCE_T3_X_DEFAULT=1 +val SCE_T3_PREPROCESSOR=2 +val SCE_T3_BLOCK_COMMENT=3 +val SCE_T3_LINE_COMMENT=4 +val SCE_T3_OPERATOR=5 +val SCE_T3_KEYWORD=6 +val SCE_T3_NUMBER=7 +val SCE_T3_IDENTIFIER=8 +val SCE_T3_S_STRING=9 +val SCE_T3_D_STRING=10 +val SCE_T3_X_STRING=11 +val SCE_T3_LIB_DIRECTIVE=12 +val SCE_T3_MSG_PARAM=13 +val SCE_T3_HTML_TAG=14 +val SCE_T3_HTML_DEFAULT=15 +val SCE_T3_HTML_STRING=16 +val SCE_T3_USER1=17 +val SCE_T3_USER2=18 +val SCE_T3_USER3=19 +val SCE_T3_BRACE=20 +# Lexical states for SCLEX_REBOL +lex Rebol=SCLEX_REBOL SCE_REBOL_ +val SCE_REBOL_DEFAULT=0 +val SCE_REBOL_COMMENTLINE=1 +val SCE_REBOL_COMMENTBLOCK=2 +val SCE_REBOL_PREFACE=3 +val SCE_REBOL_OPERATOR=4 +val SCE_REBOL_CHARACTER=5 +val SCE_REBOL_QUOTEDSTRING=6 +val SCE_REBOL_BRACEDSTRING=7 +val SCE_REBOL_NUMBER=8 +val SCE_REBOL_PAIR=9 +val SCE_REBOL_TUPLE=10 +val SCE_REBOL_BINARY=11 +val SCE_REBOL_MONEY=12 +val SCE_REBOL_ISSUE=13 +val SCE_REBOL_TAG=14 +val SCE_REBOL_FILE=15 +val SCE_REBOL_EMAIL=16 +val SCE_REBOL_URL=17 +val SCE_REBOL_DATE=18 +val SCE_REBOL_TIME=19 +val SCE_REBOL_IDENTIFIER=20 +val SCE_REBOL_WORD=21 +val SCE_REBOL_WORD2=22 +val SCE_REBOL_WORD3=23 +val SCE_REBOL_WORD4=24 +val SCE_REBOL_WORD5=25 +val SCE_REBOL_WORD6=26 +val SCE_REBOL_WORD7=27 +val SCE_REBOL_WORD8=28 +# Lexical states for SCLEX_SQL +lex SQL=SCLEX_SQL SCE_SQL_ +val SCE_SQL_DEFAULT=0 +val SCE_SQL_COMMENT=1 +val SCE_SQL_COMMENTLINE=2 +val SCE_SQL_COMMENTDOC=3 +val SCE_SQL_NUMBER=4 +val SCE_SQL_WORD=5 +val SCE_SQL_STRING=6 +val SCE_SQL_CHARACTER=7 +val SCE_SQL_SQLPLUS=8 +val SCE_SQL_SQLPLUS_PROMPT=9 +val SCE_SQL_OPERATOR=10 +val SCE_SQL_IDENTIFIER=11 +val SCE_SQL_SQLPLUS_COMMENT=13 +val SCE_SQL_COMMENTLINEDOC=15 +val SCE_SQL_WORD2=16 +val SCE_SQL_COMMENTDOCKEYWORD=17 +val SCE_SQL_COMMENTDOCKEYWORDERROR=18 +val SCE_SQL_USER1=19 +val SCE_SQL_USER2=20 +val SCE_SQL_USER3=21 +val SCE_SQL_USER4=22 +val SCE_SQL_QUOTEDIDENTIFIER=23 +val SCE_SQL_QOPERATOR=24 +# Lexical states for SCLEX_SMALLTALK +lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ +val SCE_ST_DEFAULT=0 +val SCE_ST_STRING=1 +val SCE_ST_NUMBER=2 +val SCE_ST_COMMENT=3 +val SCE_ST_SYMBOL=4 +val SCE_ST_BINARY=5 +val SCE_ST_BOOL=6 +val SCE_ST_SELF=7 +val SCE_ST_SUPER=8 +val SCE_ST_NIL=9 +val SCE_ST_GLOBAL=10 +val SCE_ST_RETURN=11 +val SCE_ST_SPECIAL=12 +val SCE_ST_KWSEND=13 +val SCE_ST_ASSIGN=14 +val SCE_ST_CHARACTER=15 +val SCE_ST_SPEC_SEL=16 +# Lexical states for SCLEX_FLAGSHIP (clipper) +lex FlagShip=SCLEX_FLAGSHIP SCE_FS_ +val SCE_FS_DEFAULT=0 +val SCE_FS_COMMENT=1 +val SCE_FS_COMMENTLINE=2 +val SCE_FS_COMMENTDOC=3 +val SCE_FS_COMMENTLINEDOC=4 +val SCE_FS_COMMENTDOCKEYWORD=5 +val SCE_FS_COMMENTDOCKEYWORDERROR=6 +val SCE_FS_KEYWORD=7 +val SCE_FS_KEYWORD2=8 +val SCE_FS_KEYWORD3=9 +val SCE_FS_KEYWORD4=10 +val SCE_FS_NUMBER=11 +val SCE_FS_STRING=12 +val SCE_FS_PREPROCESSOR=13 +val SCE_FS_OPERATOR=14 +val SCE_FS_IDENTIFIER=15 +val SCE_FS_DATE=16 +val SCE_FS_STRINGEOL=17 +val SCE_FS_CONSTANT=18 +val SCE_FS_WORDOPERATOR=19 +val SCE_FS_DISABLEDCODE=20 +val SCE_FS_DEFAULT_C=21 +val SCE_FS_COMMENTDOC_C=22 +val SCE_FS_COMMENTLINEDOC_C=23 +val SCE_FS_KEYWORD_C=24 +val SCE_FS_KEYWORD2_C=25 +val SCE_FS_NUMBER_C=26 +val SCE_FS_STRING_C=27 +val SCE_FS_PREPROCESSOR_C=28 +val SCE_FS_OPERATOR_C=29 +val SCE_FS_IDENTIFIER_C=30 +val SCE_FS_STRINGEOL_C=31 +# Lexical states for SCLEX_CSOUND +lex Csound=SCLEX_CSOUND SCE_CSOUND_ +val SCE_CSOUND_DEFAULT=0 +val SCE_CSOUND_COMMENT=1 +val SCE_CSOUND_NUMBER=2 +val SCE_CSOUND_OPERATOR=3 +val SCE_CSOUND_INSTR=4 +val SCE_CSOUND_IDENTIFIER=5 +val SCE_CSOUND_OPCODE=6 +val SCE_CSOUND_HEADERSTMT=7 +val SCE_CSOUND_USERKEYWORD=8 +val SCE_CSOUND_COMMENTBLOCK=9 +val SCE_CSOUND_PARAM=10 +val SCE_CSOUND_ARATE_VAR=11 +val SCE_CSOUND_KRATE_VAR=12 +val SCE_CSOUND_IRATE_VAR=13 +val SCE_CSOUND_GLOBAL_VAR=14 +val SCE_CSOUND_STRINGEOL=15 +# Lexical states for SCLEX_INNOSETUP +lex Inno=SCLEX_INNOSETUP SCE_INNO_ +val SCE_INNO_DEFAULT=0 +val SCE_INNO_COMMENT=1 +val SCE_INNO_KEYWORD=2 +val SCE_INNO_PARAMETER=3 +val SCE_INNO_SECTION=4 +val SCE_INNO_PREPROC=5 +val SCE_INNO_INLINE_EXPANSION=6 +val SCE_INNO_COMMENT_PASCAL=7 +val SCE_INNO_KEYWORD_PASCAL=8 +val SCE_INNO_KEYWORD_USER=9 +val SCE_INNO_STRING_DOUBLE=10 +val SCE_INNO_STRING_SINGLE=11 +val SCE_INNO_IDENTIFIER=12 +# Lexical states for SCLEX_OPAL +lex Opal=SCLEX_OPAL SCE_OPAL_ +val SCE_OPAL_SPACE=0 +val SCE_OPAL_COMMENT_BLOCK=1 +val SCE_OPAL_COMMENT_LINE=2 +val SCE_OPAL_INTEGER=3 +val SCE_OPAL_KEYWORD=4 +val SCE_OPAL_SORT=5 +val SCE_OPAL_STRING=6 +val SCE_OPAL_PAR=7 +val SCE_OPAL_BOOL_CONST=8 +val SCE_OPAL_DEFAULT=32 +# Lexical states for SCLEX_SPICE +lex Spice=SCLEX_SPICE SCE_SPICE_ +val SCE_SPICE_DEFAULT=0 +val SCE_SPICE_IDENTIFIER=1 +val SCE_SPICE_KEYWORD=2 +val SCE_SPICE_KEYWORD2=3 +val SCE_SPICE_KEYWORD3=4 +val SCE_SPICE_NUMBER=5 +val SCE_SPICE_DELIMITER=6 +val SCE_SPICE_VALUE=7 +val SCE_SPICE_COMMENTLINE=8 +# Lexical states for SCLEX_CMAKE +lex CMAKE=SCLEX_CMAKE SCE_CMAKE_ +val SCE_CMAKE_DEFAULT=0 +val SCE_CMAKE_COMMENT=1 +val SCE_CMAKE_STRINGDQ=2 +val SCE_CMAKE_STRINGLQ=3 +val SCE_CMAKE_STRINGRQ=4 +val SCE_CMAKE_COMMANDS=5 +val SCE_CMAKE_PARAMETERS=6 +val SCE_CMAKE_VARIABLE=7 +val SCE_CMAKE_USERDEFINED=8 +val SCE_CMAKE_WHILEDEF=9 +val SCE_CMAKE_FOREACHDEF=10 +val SCE_CMAKE_IFDEFINEDEF=11 +val SCE_CMAKE_MACRODEF=12 +val SCE_CMAKE_STRINGVAR=13 +val SCE_CMAKE_NUMBER=14 +# Lexical states for SCLEX_GAP +lex Gap=SCLEX_GAP SCE_GAP_ +val SCE_GAP_DEFAULT=0 +val SCE_GAP_IDENTIFIER=1 +val SCE_GAP_KEYWORD=2 +val SCE_GAP_KEYWORD2=3 +val SCE_GAP_KEYWORD3=4 +val SCE_GAP_KEYWORD4=5 +val SCE_GAP_STRING=6 +val SCE_GAP_CHAR=7 +val SCE_GAP_OPERATOR=8 +val SCE_GAP_COMMENT=9 +val SCE_GAP_NUMBER=10 +val SCE_GAP_STRINGEOL=11 +# Lexical state for SCLEX_PLM +lex PLM=SCLEX_PLM SCE_PLM_ +val SCE_PLM_DEFAULT=0 +val SCE_PLM_COMMENT=1 +val SCE_PLM_STRING=2 +val SCE_PLM_NUMBER=3 +val SCE_PLM_IDENTIFIER=4 +val SCE_PLM_OPERATOR=5 +val SCE_PLM_CONTROL=6 +val SCE_PLM_KEYWORD=7 +# Lexical state for SCLEX_PROGRESS +lex Progress=SCLEX_PROGRESS SCE_ABL_ +val SCE_ABL_DEFAULT=0 +val SCE_ABL_NUMBER=1 +val SCE_ABL_WORD=2 +val SCE_ABL_STRING=3 +val SCE_ABL_CHARACTER=4 +val SCE_ABL_PREPROCESSOR=5 +val SCE_ABL_OPERATOR=6 +val SCE_ABL_IDENTIFIER=7 +val SCE_ABL_BLOCK=8 +val SCE_ABL_END=9 +val SCE_ABL_COMMENT=10 +val SCE_ABL_TASKMARKER=11 +val SCE_ABL_LINECOMMENT=12 +# Lexical states for SCLEX_ABAQUS +lex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_ +val SCE_ABAQUS_DEFAULT=0 +val SCE_ABAQUS_COMMENT=1 +val SCE_ABAQUS_COMMENTBLOCK=2 +val SCE_ABAQUS_NUMBER=3 +val SCE_ABAQUS_STRING=4 +val SCE_ABAQUS_OPERATOR=5 +val SCE_ABAQUS_WORD=6 +val SCE_ABAQUS_PROCESSOR=7 +val SCE_ABAQUS_COMMAND=8 +val SCE_ABAQUS_SLASHCOMMAND=9 +val SCE_ABAQUS_STARCOMMAND=10 +val SCE_ABAQUS_ARGUMENT=11 +val SCE_ABAQUS_FUNCTION=12 +# Lexical states for SCLEX_ASYMPTOTE +lex Asymptote=SCLEX_ASYMPTOTE SCE_ASY_ +val SCE_ASY_DEFAULT=0 +val SCE_ASY_COMMENT=1 +val SCE_ASY_COMMENTLINE=2 +val SCE_ASY_NUMBER=3 +val SCE_ASY_WORD=4 +val SCE_ASY_STRING=5 +val SCE_ASY_CHARACTER=6 +val SCE_ASY_OPERATOR=7 +val SCE_ASY_IDENTIFIER=8 +val SCE_ASY_STRINGEOL=9 +val SCE_ASY_COMMENTLINEDOC=10 +val SCE_ASY_WORD2=11 +# Lexical states for SCLEX_R +lex R=SCLEX_R SCE_R_ +val SCE_R_DEFAULT=0 +val SCE_R_COMMENT=1 +val SCE_R_KWORD=2 +val SCE_R_BASEKWORD=3 +val SCE_R_OTHERKWORD=4 +val SCE_R_NUMBER=5 +val SCE_R_STRING=6 +val SCE_R_STRING2=7 +val SCE_R_OPERATOR=8 +val SCE_R_IDENTIFIER=9 +val SCE_R_INFIX=10 +val SCE_R_INFIXEOL=11 +# Lexical state for SCLEX_MAGIK +lex MagikSF=SCLEX_MAGIK SCE_MAGIK_ +val SCE_MAGIK_DEFAULT=0 +val SCE_MAGIK_COMMENT=1 +val SCE_MAGIK_HYPER_COMMENT=16 +val SCE_MAGIK_STRING=2 +val SCE_MAGIK_CHARACTER=3 +val SCE_MAGIK_NUMBER=4 +val SCE_MAGIK_IDENTIFIER=5 +val SCE_MAGIK_OPERATOR=6 +val SCE_MAGIK_FLOW=7 +val SCE_MAGIK_CONTAINER=8 +val SCE_MAGIK_BRACKET_BLOCK=9 +val SCE_MAGIK_BRACE_BLOCK=10 +val SCE_MAGIK_SQBRACKET_BLOCK=11 +val SCE_MAGIK_UNKNOWN_KEYWORD=12 +val SCE_MAGIK_KEYWORD=13 +val SCE_MAGIK_PRAGMA=14 +val SCE_MAGIK_SYMBOL=15 +# Lexical state for SCLEX_POWERSHELL +lex PowerShell=SCLEX_POWERSHELL SCE_POWERSHELL_ +val SCE_POWERSHELL_DEFAULT=0 +val SCE_POWERSHELL_COMMENT=1 +val SCE_POWERSHELL_STRING=2 +val SCE_POWERSHELL_CHARACTER=3 +val SCE_POWERSHELL_NUMBER=4 +val SCE_POWERSHELL_VARIABLE=5 +val SCE_POWERSHELL_OPERATOR=6 +val SCE_POWERSHELL_IDENTIFIER=7 +val SCE_POWERSHELL_KEYWORD=8 +val SCE_POWERSHELL_CMDLET=9 +val SCE_POWERSHELL_ALIAS=10 +val SCE_POWERSHELL_FUNCTION=11 +val SCE_POWERSHELL_USER1=12 +val SCE_POWERSHELL_COMMENTSTREAM=13 +val SCE_POWERSHELL_HERE_STRING=14 +val SCE_POWERSHELL_HERE_CHARACTER=15 +val SCE_POWERSHELL_COMMENTDOCKEYWORD=16 +# Lexical state for SCLEX_MYSQL +lex MySQL=SCLEX_MYSQL SCE_MYSQL_ +val SCE_MYSQL_DEFAULT=0 +val SCE_MYSQL_COMMENT=1 +val SCE_MYSQL_COMMENTLINE=2 +val SCE_MYSQL_VARIABLE=3 +val SCE_MYSQL_SYSTEMVARIABLE=4 +val SCE_MYSQL_KNOWNSYSTEMVARIABLE=5 +val SCE_MYSQL_NUMBER=6 +val SCE_MYSQL_MAJORKEYWORD=7 +val SCE_MYSQL_KEYWORD=8 +val SCE_MYSQL_DATABASEOBJECT=9 +val SCE_MYSQL_PROCEDUREKEYWORD=10 +val SCE_MYSQL_STRING=11 +val SCE_MYSQL_SQSTRING=12 +val SCE_MYSQL_DQSTRING=13 +val SCE_MYSQL_OPERATOR=14 +val SCE_MYSQL_FUNCTION=15 +val SCE_MYSQL_IDENTIFIER=16 +val SCE_MYSQL_QUOTEDIDENTIFIER=17 +val SCE_MYSQL_USER1=18 +val SCE_MYSQL_USER2=19 +val SCE_MYSQL_USER3=20 +val SCE_MYSQL_HIDDENCOMMAND=21 +val SCE_MYSQL_PLACEHOLDER=22 +# Lexical state for SCLEX_PO +lex Po=SCLEX_PO SCE_PO_ +val SCE_PO_DEFAULT=0 +val SCE_PO_COMMENT=1 +val SCE_PO_MSGID=2 +val SCE_PO_MSGID_TEXT=3 +val SCE_PO_MSGSTR=4 +val SCE_PO_MSGSTR_TEXT=5 +val SCE_PO_MSGCTXT=6 +val SCE_PO_MSGCTXT_TEXT=7 +val SCE_PO_FUZZY=8 +val SCE_PO_PROGRAMMER_COMMENT=9 +val SCE_PO_REFERENCE=10 +val SCE_PO_FLAGS=11 +val SCE_PO_MSGID_TEXT_EOL=12 +val SCE_PO_MSGSTR_TEXT_EOL=13 +val SCE_PO_MSGCTXT_TEXT_EOL=14 +val SCE_PO_ERROR=15 +# Lexical states for SCLEX_PASCAL +lex Pascal=SCLEX_PASCAL SCE_PAS_ +val SCE_PAS_DEFAULT=0 +val SCE_PAS_IDENTIFIER=1 +val SCE_PAS_COMMENT=2 +val SCE_PAS_COMMENT2=3 +val SCE_PAS_COMMENTLINE=4 +val SCE_PAS_PREPROCESSOR=5 +val SCE_PAS_PREPROCESSOR2=6 +val SCE_PAS_NUMBER=7 +val SCE_PAS_HEXNUMBER=8 +val SCE_PAS_WORD=9 +val SCE_PAS_STRING=10 +val SCE_PAS_STRINGEOL=11 +val SCE_PAS_CHARACTER=12 +val SCE_PAS_OPERATOR=13 +val SCE_PAS_ASM=14 +# Lexical state for SCLEX_SORCUS +lex SORCUS=SCLEX_SORCUS SCE_SORCUS_ +val SCE_SORCUS_DEFAULT=0 +val SCE_SORCUS_COMMAND=1 +val SCE_SORCUS_PARAMETER=2 +val SCE_SORCUS_COMMENTLINE=3 +val SCE_SORCUS_STRING=4 +val SCE_SORCUS_STRINGEOL=5 +val SCE_SORCUS_IDENTIFIER=6 +val SCE_SORCUS_OPERATOR=7 +val SCE_SORCUS_NUMBER=8 +val SCE_SORCUS_CONSTANT=9 +# Lexical state for SCLEX_POWERPRO +lex PowerPro=SCLEX_POWERPRO SCE_POWERPRO_ +val SCE_POWERPRO_DEFAULT=0 +val SCE_POWERPRO_COMMENTBLOCK=1 +val SCE_POWERPRO_COMMENTLINE=2 +val SCE_POWERPRO_NUMBER=3 +val SCE_POWERPRO_WORD=4 +val SCE_POWERPRO_WORD2=5 +val SCE_POWERPRO_WORD3=6 +val SCE_POWERPRO_WORD4=7 +val SCE_POWERPRO_DOUBLEQUOTEDSTRING=8 +val SCE_POWERPRO_SINGLEQUOTEDSTRING=9 +val SCE_POWERPRO_LINECONTINUE=10 +val SCE_POWERPRO_OPERATOR=11 +val SCE_POWERPRO_IDENTIFIER=12 +val SCE_POWERPRO_STRINGEOL=13 +val SCE_POWERPRO_VERBATIM=14 +val SCE_POWERPRO_ALTQUOTE=15 +val SCE_POWERPRO_FUNCTION=16 +# Lexical states for SCLEX_SML +lex SML=SCLEX_SML SCE_SML_ +val SCE_SML_DEFAULT=0 +val SCE_SML_IDENTIFIER=1 +val SCE_SML_TAGNAME=2 +val SCE_SML_KEYWORD=3 +val SCE_SML_KEYWORD2=4 +val SCE_SML_KEYWORD3=5 +val SCE_SML_LINENUM=6 +val SCE_SML_OPERATOR=7 +val SCE_SML_NUMBER=8 +val SCE_SML_CHAR=9 +val SCE_SML_STRING=11 +val SCE_SML_COMMENT=12 +val SCE_SML_COMMENT1=13 +val SCE_SML_COMMENT2=14 +val SCE_SML_COMMENT3=15 +# Lexical state for SCLEX_MARKDOWN +lex Markdown=SCLEX_MARKDOWN SCE_MARKDOWN_ +val SCE_MARKDOWN_DEFAULT=0 +val SCE_MARKDOWN_LINE_BEGIN=1 +val SCE_MARKDOWN_STRONG1=2 +val SCE_MARKDOWN_STRONG2=3 +val SCE_MARKDOWN_EM1=4 +val SCE_MARKDOWN_EM2=5 +val SCE_MARKDOWN_HEADER1=6 +val SCE_MARKDOWN_HEADER2=7 +val SCE_MARKDOWN_HEADER3=8 +val SCE_MARKDOWN_HEADER4=9 +val SCE_MARKDOWN_HEADER5=10 +val SCE_MARKDOWN_HEADER6=11 +val SCE_MARKDOWN_PRECHAR=12 +val SCE_MARKDOWN_ULIST_ITEM=13 +val SCE_MARKDOWN_OLIST_ITEM=14 +val SCE_MARKDOWN_BLOCKQUOTE=15 +val SCE_MARKDOWN_STRIKEOUT=16 +val SCE_MARKDOWN_HRULE=17 +val SCE_MARKDOWN_LINK=18 +val SCE_MARKDOWN_CODE=19 +val SCE_MARKDOWN_CODE2=20 +val SCE_MARKDOWN_CODEBK=21 +# Lexical state for SCLEX_TXT2TAGS +lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_ +val SCE_TXT2TAGS_DEFAULT=0 +val SCE_TXT2TAGS_LINE_BEGIN=1 +val SCE_TXT2TAGS_STRONG1=2 +val SCE_TXT2TAGS_STRONG2=3 +val SCE_TXT2TAGS_EM1=4 +val SCE_TXT2TAGS_EM2=5 +val SCE_TXT2TAGS_HEADER1=6 +val SCE_TXT2TAGS_HEADER2=7 +val SCE_TXT2TAGS_HEADER3=8 +val SCE_TXT2TAGS_HEADER4=9 +val SCE_TXT2TAGS_HEADER5=10 +val SCE_TXT2TAGS_HEADER6=11 +val SCE_TXT2TAGS_PRECHAR=12 +val SCE_TXT2TAGS_ULIST_ITEM=13 +val SCE_TXT2TAGS_OLIST_ITEM=14 +val SCE_TXT2TAGS_BLOCKQUOTE=15 +val SCE_TXT2TAGS_STRIKEOUT=16 +val SCE_TXT2TAGS_HRULE=17 +val SCE_TXT2TAGS_LINK=18 +val SCE_TXT2TAGS_CODE=19 +val SCE_TXT2TAGS_CODE2=20 +val SCE_TXT2TAGS_CODEBK=21 +val SCE_TXT2TAGS_COMMENT=22 +val SCE_TXT2TAGS_OPTION=23 +val SCE_TXT2TAGS_PREPROC=24 +val SCE_TXT2TAGS_POSTPROC=25 +# Lexical states for SCLEX_A68K +lex A68k=SCLEX_A68K SCE_A68K_ +val SCE_A68K_DEFAULT=0 +val SCE_A68K_COMMENT=1 +val SCE_A68K_NUMBER_DEC=2 +val SCE_A68K_NUMBER_BIN=3 +val SCE_A68K_NUMBER_HEX=4 +val SCE_A68K_STRING1=5 +val SCE_A68K_OPERATOR=6 +val SCE_A68K_CPUINSTRUCTION=7 +val SCE_A68K_EXTINSTRUCTION=8 +val SCE_A68K_REGISTER=9 +val SCE_A68K_DIRECTIVE=10 +val SCE_A68K_MACRO_ARG=11 +val SCE_A68K_LABEL=12 +val SCE_A68K_STRING2=13 +val SCE_A68K_IDENTIFIER=14 +val SCE_A68K_MACRO_DECLARATION=15 +val SCE_A68K_COMMENT_WORD=16 +val SCE_A68K_COMMENT_SPECIAL=17 +val SCE_A68K_COMMENT_DOXYGEN=18 +# Lexical states for SCLEX_MODULA +lex Modula=SCLEX_MODULA SCE_MODULA_ +val SCE_MODULA_DEFAULT=0 +val SCE_MODULA_COMMENT=1 +val SCE_MODULA_DOXYCOMM=2 +val SCE_MODULA_DOXYKEY=3 +val SCE_MODULA_KEYWORD=4 +val SCE_MODULA_RESERVED=5 +val SCE_MODULA_NUMBER=6 +val SCE_MODULA_BASENUM=7 +val SCE_MODULA_FLOAT=8 +val SCE_MODULA_STRING=9 +val SCE_MODULA_STRSPEC=10 +val SCE_MODULA_CHAR=11 +val SCE_MODULA_CHARSPEC=12 +val SCE_MODULA_PROC=13 +val SCE_MODULA_PRAGMA=14 +val SCE_MODULA_PRGKEY=15 +val SCE_MODULA_OPERATOR=16 +val SCE_MODULA_BADSTR=17 +# Lexical states for SCLEX_COFFEESCRIPT +lex CoffeeScript=SCLEX_COFFEESCRIPT SCE_COFFEESCRIPT_ +val SCE_COFFEESCRIPT_DEFAULT=0 +val SCE_COFFEESCRIPT_COMMENT=1 +val SCE_COFFEESCRIPT_COMMENTLINE=2 +val SCE_COFFEESCRIPT_COMMENTDOC=3 +val SCE_COFFEESCRIPT_NUMBER=4 +val SCE_COFFEESCRIPT_WORD=5 +val SCE_COFFEESCRIPT_STRING=6 +val SCE_COFFEESCRIPT_CHARACTER=7 +val SCE_COFFEESCRIPT_UUID=8 +val SCE_COFFEESCRIPT_PREPROCESSOR=9 +val SCE_COFFEESCRIPT_OPERATOR=10 +val SCE_COFFEESCRIPT_IDENTIFIER=11 +val SCE_COFFEESCRIPT_STRINGEOL=12 +val SCE_COFFEESCRIPT_VERBATIM=13 +val SCE_COFFEESCRIPT_REGEX=14 +val SCE_COFFEESCRIPT_COMMENTLINEDOC=15 +val SCE_COFFEESCRIPT_WORD2=16 +val SCE_COFFEESCRIPT_COMMENTDOCKEYWORD=17 +val SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR=18 +val SCE_COFFEESCRIPT_GLOBALCLASS=19 +val SCE_COFFEESCRIPT_STRINGRAW=20 +val SCE_COFFEESCRIPT_TRIPLEVERBATIM=21 +val SCE_COFFEESCRIPT_COMMENTBLOCK=22 +val SCE_COFFEESCRIPT_VERBOSE_REGEX=23 +val SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT=24 +val SCE_COFFEESCRIPT_INSTANCEPROPERTY=25 +# Lexical states for SCLEX_AVS +lex AVS=SCLEX_AVS SCE_AVS_ +val SCE_AVS_DEFAULT=0 +val SCE_AVS_COMMENTBLOCK=1 +val SCE_AVS_COMMENTBLOCKN=2 +val SCE_AVS_COMMENTLINE=3 +val SCE_AVS_NUMBER=4 +val SCE_AVS_OPERATOR=5 +val SCE_AVS_IDENTIFIER=6 +val SCE_AVS_STRING=7 +val SCE_AVS_TRIPLESTRING=8 +val SCE_AVS_KEYWORD=9 +val SCE_AVS_FILTER=10 +val SCE_AVS_PLUGIN=11 +val SCE_AVS_FUNCTION=12 +val SCE_AVS_CLIPPROP=13 +val SCE_AVS_USERDFN=14 +# Lexical states for SCLEX_ECL +lex ECL=SCLEX_ECL SCE_ECL_ +val SCE_ECL_DEFAULT=0 +val SCE_ECL_COMMENT=1 +val SCE_ECL_COMMENTLINE=2 +val SCE_ECL_NUMBER=3 +val SCE_ECL_STRING=4 +val SCE_ECL_WORD0=5 +val SCE_ECL_OPERATOR=6 +val SCE_ECL_CHARACTER=7 +val SCE_ECL_UUID=8 +val SCE_ECL_PREPROCESSOR=9 +val SCE_ECL_UNKNOWN=10 +val SCE_ECL_IDENTIFIER=11 +val SCE_ECL_STRINGEOL=12 +val SCE_ECL_VERBATIM=13 +val SCE_ECL_REGEX=14 +val SCE_ECL_COMMENTLINEDOC=15 +val SCE_ECL_WORD1=16 +val SCE_ECL_COMMENTDOCKEYWORD=17 +val SCE_ECL_COMMENTDOCKEYWORDERROR=18 +val SCE_ECL_WORD2=19 +val SCE_ECL_WORD3=20 +val SCE_ECL_WORD4=21 +val SCE_ECL_WORD5=22 +val SCE_ECL_COMMENTDOC=23 +val SCE_ECL_ADDED=24 +val SCE_ECL_DELETED=25 +val SCE_ECL_CHANGED=26 +val SCE_ECL_MOVED=27 +# Lexical states for SCLEX_OSCRIPT +lex OScript=SCLEX_OSCRIPT SCE_OSCRIPT_ +val SCE_OSCRIPT_DEFAULT=0 +val SCE_OSCRIPT_LINE_COMMENT=1 +val SCE_OSCRIPT_BLOCK_COMMENT=2 +val SCE_OSCRIPT_DOC_COMMENT=3 +val SCE_OSCRIPT_PREPROCESSOR=4 +val SCE_OSCRIPT_NUMBER=5 +val SCE_OSCRIPT_SINGLEQUOTE_STRING=6 +val SCE_OSCRIPT_DOUBLEQUOTE_STRING=7 +val SCE_OSCRIPT_CONSTANT=8 +val SCE_OSCRIPT_IDENTIFIER=9 +val SCE_OSCRIPT_GLOBAL=10 +val SCE_OSCRIPT_KEYWORD=11 +val SCE_OSCRIPT_OPERATOR=12 +val SCE_OSCRIPT_LABEL=13 +val SCE_OSCRIPT_TYPE=14 +val SCE_OSCRIPT_FUNCTION=15 +val SCE_OSCRIPT_OBJECT=16 +val SCE_OSCRIPT_PROPERTY=17 +val SCE_OSCRIPT_METHOD=18 +# Lexical states for SCLEX_VISUALPROLOG +lex VisualProlog=SCLEX_VISUALPROLOG SCE_VISUALPROLOG_ +val SCE_VISUALPROLOG_DEFAULT=0 +val SCE_VISUALPROLOG_KEY_MAJOR=1 +val SCE_VISUALPROLOG_KEY_MINOR=2 +val SCE_VISUALPROLOG_KEY_DIRECTIVE=3 +val SCE_VISUALPROLOG_COMMENT_BLOCK=4 +val SCE_VISUALPROLOG_COMMENT_LINE=5 +val SCE_VISUALPROLOG_COMMENT_KEY=6 +val SCE_VISUALPROLOG_COMMENT_KEY_ERROR=7 +val SCE_VISUALPROLOG_IDENTIFIER=8 +val SCE_VISUALPROLOG_VARIABLE=9 +val SCE_VISUALPROLOG_ANONYMOUS=10 +val SCE_VISUALPROLOG_NUMBER=11 +val SCE_VISUALPROLOG_OPERATOR=12 +val SCE_VISUALPROLOG_CHARACTER=13 +val SCE_VISUALPROLOG_CHARACTER_TOO_MANY=14 +val SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR=15 +val SCE_VISUALPROLOG_STRING=16 +val SCE_VISUALPROLOG_STRING_ESCAPE=17 +val SCE_VISUALPROLOG_STRING_ESCAPE_ERROR=18 +val SCE_VISUALPROLOG_STRING_EOL_OPEN=19 +val SCE_VISUALPROLOG_STRING_VERBATIM=20 +val SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL=21 +val SCE_VISUALPROLOG_STRING_VERBATIM_EOL=22 +# Lexical states for SCLEX_STTXT +lex StructuredText=SCLEX_STTXT SCE_STTXT_ +val SCE_STTXT_DEFAULT=0 +val SCE_STTXT_COMMENT=1 +val SCE_STTXT_COMMENTLINE=2 +val SCE_STTXT_KEYWORD=3 +val SCE_STTXT_TYPE=4 +val SCE_STTXT_FUNCTION=5 +val SCE_STTXT_FB=6 +val SCE_STTXT_NUMBER=7 +val SCE_STTXT_HEXNUMBER=8 +val SCE_STTXT_PRAGMA=9 +val SCE_STTXT_OPERATOR=10 +val SCE_STTXT_CHARACTER=11 +val SCE_STTXT_STRING1=12 +val SCE_STTXT_STRING2=13 +val SCE_STTXT_STRINGEOL=14 +val SCE_STTXT_IDENTIFIER=15 +val SCE_STTXT_DATETIME=16 +val SCE_STTXT_VARS=17 +val SCE_STTXT_PRAGMAS=18 +# Lexical states for SCLEX_KVIRC +lex KVIrc=SCLEX_KVIRC SCE_KVIRC_ +val SCE_KVIRC_DEFAULT=0 +val SCE_KVIRC_COMMENT=1 +val SCE_KVIRC_COMMENTBLOCK=2 +val SCE_KVIRC_STRING=3 +val SCE_KVIRC_WORD=4 +val SCE_KVIRC_KEYWORD=5 +val SCE_KVIRC_FUNCTION_KEYWORD=6 +val SCE_KVIRC_FUNCTION=7 +val SCE_KVIRC_VARIABLE=8 +val SCE_KVIRC_NUMBER=9 +val SCE_KVIRC_OPERATOR=10 +val SCE_KVIRC_STRING_FUNCTION=11 +val SCE_KVIRC_STRING_VARIABLE=12 +# Lexical states for SCLEX_RUST +lex Rust=SCLEX_RUST SCE_RUST_ +val SCE_RUST_DEFAULT=0 +val SCE_RUST_COMMENTBLOCK=1 +val SCE_RUST_COMMENTLINE=2 +val SCE_RUST_COMMENTBLOCKDOC=3 +val SCE_RUST_COMMENTLINEDOC=4 +val SCE_RUST_NUMBER=5 +val SCE_RUST_WORD=6 +val SCE_RUST_WORD2=7 +val SCE_RUST_WORD3=8 +val SCE_RUST_WORD4=9 +val SCE_RUST_WORD5=10 +val SCE_RUST_WORD6=11 +val SCE_RUST_WORD7=12 +val SCE_RUST_STRING=13 +val SCE_RUST_STRINGR=14 +val SCE_RUST_CHARACTER=15 +val SCE_RUST_OPERATOR=16 +val SCE_RUST_IDENTIFIER=17 +val SCE_RUST_LIFETIME=18 +val SCE_RUST_MACRO=19 +val SCE_RUST_LEXERROR=20 +val SCE_RUST_BYTESTRING=21 +val SCE_RUST_BYTESTRINGR=22 +val SCE_RUST_BYTECHARACTER=23 +# Lexical states for SCLEX_DMAP +lex DMAP=SCLEX_DMAP SCE_DMAP_ +val SCE_DMAP_DEFAULT=0 +val SCE_DMAP_COMMENT=1 +val SCE_DMAP_NUMBER=2 +val SCE_DMAP_STRING1=3 +val SCE_DMAP_STRING2=4 +val SCE_DMAP_STRINGEOL=5 +val SCE_DMAP_OPERATOR=6 +val SCE_DMAP_IDENTIFIER=7 +val SCE_DMAP_WORD=8 +val SCE_DMAP_WORD2=9 +val SCE_DMAP_WORD3=10 +# Lexical states for SCLEX_DMIS +lex DMIS=SCLEX_DMIS SCE_DMIS_ +val SCE_DMIS_DEFAULT=0 +val SCE_DMIS_COMMENT=1 +val SCE_DMIS_STRING=2 +val SCE_DMIS_NUMBER=3 +val SCE_DMIS_KEYWORD=4 +val SCE_DMIS_MAJORWORD=5 +val SCE_DMIS_MINORWORD=6 +val SCE_DMIS_UNSUPPORTED_MAJOR=7 +val SCE_DMIS_UNSUPPORTED_MINOR=8 +val SCE_DMIS_LABEL=9 +# Lexical states for SCLEX_REGISTRY +lex REG=SCLEX_REGISTRY SCE_REG_ +val SCE_REG_DEFAULT=0 +val SCE_REG_COMMENT=1 +val SCE_REG_VALUENAME=2 +val SCE_REG_STRING=3 +val SCE_REG_HEXDIGIT=4 +val SCE_REG_VALUETYPE=5 +val SCE_REG_ADDEDKEY=6 +val SCE_REG_DELETEDKEY=7 +val SCE_REG_ESCAPED=8 +val SCE_REG_KEYPATH_GUID=9 +val SCE_REG_STRING_GUID=10 +val SCE_REG_PARAMETER=11 +val SCE_REG_OPERATOR=12 +# Lexical state for SCLEX_BIBTEX +lex BibTeX=SCLEX_BIBTEX SCE_BIBTEX_ +val SCE_BIBTEX_DEFAULT=0 +val SCE_BIBTEX_ENTRY=1 +val SCE_BIBTEX_UNKNOWN_ENTRY=2 +val SCE_BIBTEX_KEY=3 +val SCE_BIBTEX_PARAMETER=4 +val SCE_BIBTEX_VALUE=5 +val SCE_BIBTEX_COMMENT=6 +# Lexical state for SCLEX_SREC +lex Srec=SCLEX_SREC SCE_HEX_ +val SCE_HEX_DEFAULT=0 +val SCE_HEX_RECSTART=1 +val SCE_HEX_RECTYPE=2 +val SCE_HEX_RECTYPE_UNKNOWN=3 +val SCE_HEX_BYTECOUNT=4 +val SCE_HEX_BYTECOUNT_WRONG=5 +val SCE_HEX_NOADDRESS=6 +val SCE_HEX_DATAADDRESS=7 +val SCE_HEX_RECCOUNT=8 +val SCE_HEX_STARTADDRESS=9 +val SCE_HEX_ADDRESSFIELD_UNKNOWN=10 +val SCE_HEX_EXTENDEDADDRESS=11 +val SCE_HEX_DATA_ODD=12 +val SCE_HEX_DATA_EVEN=13 +val SCE_HEX_DATA_UNKNOWN=14 +val SCE_HEX_DATA_EMPTY=15 +val SCE_HEX_CHECKSUM=16 +val SCE_HEX_CHECKSUM_WRONG=17 +val SCE_HEX_GARBAGE=18 +# Lexical state for SCLEX_IHEX (shared with Srec) +lex IHex=SCLEX_IHEX SCE_HEX_ +# Lexical state for SCLEX_TEHEX (shared with Srec) +lex TEHex=SCLEX_TEHEX SCE_HEX_ +# Lexical states for SCLEX_JSON +lex JSON=SCLEX_JSON SCE_JSON_ +val SCE_JSON_DEFAULT=0 +val SCE_JSON_NUMBER=1 +val SCE_JSON_STRING=2 +val SCE_JSON_STRINGEOL=3 +val SCE_JSON_PROPERTYNAME=4 +val SCE_JSON_ESCAPESEQUENCE=5 +val SCE_JSON_LINECOMMENT=6 +val SCE_JSON_BLOCKCOMMENT=7 +val SCE_JSON_OPERATOR=8 +val SCE_JSON_URI=9 +val SCE_JSON_COMPACTIRI=10 +val SCE_JSON_KEYWORD=11 +val SCE_JSON_LDKEYWORD=12 +val SCE_JSON_ERROR=13 +lex EDIFACT=SCLEX_EDIFACT SCE_EDI_ +val SCE_EDI_DEFAULT=0 +val SCE_EDI_SEGMENTSTART=1 +val SCE_EDI_SEGMENTEND=2 +val SCE_EDI_SEP_ELEMENT=3 +val SCE_EDI_SEP_COMPOSITE=4 +val SCE_EDI_SEP_RELEASE=5 +val SCE_EDI_UNA=6 +val SCE_EDI_UNH=7 +val SCE_EDI_BADSEGMENT=8 +# Lexical states for SCLEX_STATA +lex STATA=SCLEX_STATA SCE_STATA_ +val SCE_STATA_DEFAULT=0 +val SCE_STATA_COMMENT=1 +val SCE_STATA_COMMENTLINE=2 +val SCE_STATA_COMMENTBLOCK=3 +val SCE_STATA_NUMBER=4 +val SCE_STATA_OPERATOR=5 +val SCE_STATA_IDENTIFIER=6 +val SCE_STATA_STRING=7 +val SCE_STATA_TYPE=8 +val SCE_STATA_WORD=9 +val SCE_STATA_GLOBAL_MACRO=10 +val SCE_STATA_MACRO=11 +# Lexical states for SCLEX_SAS +lex SAS=SCLEX_SAS SCE_SAS_ +val SCE_SAS_DEFAULT=0 +val SCE_SAS_COMMENT=1 +val SCE_SAS_COMMENTLINE=2 +val SCE_SAS_COMMENTBLOCK=3 +val SCE_SAS_NUMBER=4 +val SCE_SAS_OPERATOR=5 +val SCE_SAS_IDENTIFIER=6 +val SCE_SAS_STRING=7 +val SCE_SAS_TYPE=8 +val SCE_SAS_WORD=9 +val SCE_SAS_GLOBAL_MACRO=10 +val SCE_SAS_MACRO=11 +val SCE_SAS_MACRO_KEYWORD=12 +val SCE_SAS_BLOCK_KEYWORD=13 +val SCE_SAS_MACRO_FUNCTION=14 +val SCE_SAS_STATEMENT=15 + +# Events + +evt void StyleNeeded=2000(int position) +evt void CharAdded=2001(int ch) +evt void SavePointReached=2002(void) +evt void SavePointLeft=2003(void) +evt void ModifyAttemptRO=2004(void) +# GTK+ Specific to work around focus and accelerator problems: +evt void Key=2005(int ch, int modifiers) +evt void DoubleClick=2006(int modifiers, int position, int line) +evt void UpdateUI=2007(int updated) +evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev, int token, int annotationLinesAdded) +evt void MacroRecord=2009(int message, int wParam, int lParam) +evt void MarginClick=2010(int modifiers, int position, int margin) +evt void NeedShown=2011(int position, int length) +evt void Painted=2013(void) +evt void UserListSelection=2014(int listType, string text, int position, int ch, CompletionMethods listCompletionMethod) +evt void URIDropped=2015(string text) +evt void DwellStart=2016(int position, int x, int y) +evt void DwellEnd=2017(int position, int x, int y) +evt void Zoom=2018(void) +evt void HotSpotClick=2019(int modifiers, int position) +evt void HotSpotDoubleClick=2020(int modifiers, int position) +evt void CallTipClick=2021(int position) +evt void AutoCSelection=2022(string text, int position, int ch, CompletionMethods listCompletionMethod) +evt void IndicatorClick=2023(int modifiers, int position) +evt void IndicatorRelease=2024(int modifiers, int position) +evt void AutoCCancelled=2025(void) +evt void AutoCCharDeleted=2026(void) +evt void HotSpotReleaseClick=2027(int modifiers, int position) +evt void FocusIn=2028(void) +evt void FocusOut=2029(void) +evt void AutoCCompleted=2030(string text, int position, int ch, CompletionMethods listCompletionMethod) +evt void MarginRightClick=2031(int modifiers, int position, int margin) +evt void AutoCSelectionChange=2032(int listType, string text, int position) + +cat Provisional + +enu LineCharacterIndexType=SC_LINECHARACTERINDEX_ +val SC_LINECHARACTERINDEX_NONE=0 +val SC_LINECHARACTERINDEX_UTF32=1 +val SC_LINECHARACTERINDEX_UTF16=2 + +# Retrieve line character index state. +get int GetLineCharacterIndex=2710(,) + +# Request line character index be created or its use count increased. +fun void AllocateLineCharacterIndex=2711(int lineCharacterIndex,) + +# Decrease use count of line character index and remove if 0. +fun void ReleaseLineCharacterIndex=2712(int lineCharacterIndex,) + +# Retrieve the document line containing a position measured in index units. +fun int LineFromIndexPosition=2713(position pos, int lineCharacterIndex) + +# Retrieve the position measured in index units at the start of a document line. +fun position IndexPositionFromLine=2714(int line, int lineCharacterIndex) + +cat Deprecated + +# Divide each styling byte into lexical class bits (default: 5) and indicator +# bits (default: 3). If a lexer requires more than 32 lexical states, then this +# is used to expand the possible states. +set void SetStyleBits=2090(int bits,) + +# Retrieve number of bits in style bytes used to hold the lexical state. +get int GetStyleBits=2091(,) + +# Retrieve the number of bits the current lexer needs for styling. +get int GetStyleBitsNeeded=4011(,) + +# Deprecated in 3.5.5 + +# Always interpret keyboard input as Unicode +set void SetKeysUnicode=2521(bool keysUnicode,) + +# Are keys always interpreted as Unicode? +get bool GetKeysUnicode=2522(,) diff --git a/libs/qscintilla_2.14.1/scintilla/include/ScintillaWidget.h b/libs/qscintilla_2.14.1/scintilla/include/ScintillaWidget.h new file mode 100644 index 000000000..1721f65d9 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/include/ScintillaWidget.h @@ -0,0 +1,72 @@ +/* Scintilla source code edit control */ +/* @file ScintillaWidget.h + * Definition of Scintilla widget for GTK+. + * Only needed by GTK+ code but is harmless on other platforms. + * This comment is not a doc-comment as that causes warnings from g-ir-scanner. + */ +/* Copyright 1998-2001 by Neil Hodgson + * The License.txt file describes the conditions under which this software may be distributed. */ + +#ifndef SCINTILLAWIDGET_H +#define SCINTILLAWIDGET_H + +#if defined(GTK) + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject) +#define SCINTILLA_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) +#define IS_SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ()) + +#define SCINTILLA_TYPE_OBJECT (scintilla_object_get_type()) +#define SCINTILLA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT, ScintillaObject)) +#define SCINTILLA_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCINTILLA_TYPE_OBJECT)) +#define SCINTILLA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass)) +#define SCINTILLA_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SCINTILLA_TYPE_OBJECT)) +#define SCINTILLA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass)) + +typedef struct _ScintillaObject ScintillaObject; +typedef struct _ScintillaClass ScintillaObjectClass; + +struct _ScintillaObject { + GtkContainer cont; + void *pscin; +}; + +struct _ScintillaClass { + GtkContainerClass parent_class; + + void (* command) (ScintillaObject *sci, int cmd, GtkWidget *window); + void (* notify) (ScintillaObject *sci, int id, SCNotification *scn); +}; + +GType scintilla_object_get_type (void); +GtkWidget* scintilla_object_new (void); +gintptr scintilla_object_send_message (ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam); + + +GType scnotification_get_type (void); +#define SCINTILLA_TYPE_NOTIFICATION (scnotification_get_type()) + +#ifndef G_IR_SCANNING +/* The legacy names confuse the g-ir-scanner program */ +typedef struct _ScintillaClass ScintillaClass; + +GType scintilla_get_type (void); +GtkWidget* scintilla_new (void); +void scintilla_set_id (ScintillaObject *sci, uptr_t id); +sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); +void scintilla_release_resources(void); +#endif + +#define SCINTILLA_NOTIFY "sci-notify" + +#ifdef __cplusplus +} +#endif + +#endif + +#endif diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexA68k.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexA68k.cpp new file mode 100644 index 000000000..1475ad078 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexA68k.cpp @@ -0,0 +1,345 @@ +// Scintilla source code edit control +/** @file LexA68k.cxx + ** Lexer for Assembler, just for the MASM syntax + ** Written by Martial Demolins AKA Folco + **/ +// Copyright 2010 Martial Demolins +// The License.txt file describes the conditions under which this software +// may be distributed. + + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + + +// Return values for GetOperatorType +#define NO_OPERATOR 0 +#define OPERATOR_1CHAR 1 +#define OPERATOR_2CHAR 2 + + +/** + * IsIdentifierStart + * + * Return true if the given char is a valid identifier first char + */ + +static inline bool IsIdentifierStart (const int ch) +{ + return (isalpha(ch) || (ch == '_') || (ch == '\\')); +} + + +/** + * IsIdentifierChar + * + * Return true if the given char is a valid identifier char + */ + +static inline bool IsIdentifierChar (const int ch) +{ + return (isalnum(ch) || (ch == '_') || (ch == '@') || (ch == ':') || (ch == '.')); +} + + +/** + * GetOperatorType + * + * Return: + * NO_OPERATOR if char is not an operator + * OPERATOR_1CHAR if the operator is one char long + * OPERATOR_2CHAR if the operator is two chars long + */ + +static inline int GetOperatorType (const int ch1, const int ch2) +{ + int OpType = NO_OPERATOR; + + if ((ch1 == '+') || (ch1 == '-') || (ch1 == '*') || (ch1 == '/') || (ch1 == '#') || + (ch1 == '(') || (ch1 == ')') || (ch1 == '~') || (ch1 == '&') || (ch1 == '|') || (ch1 == ',')) + OpType = OPERATOR_1CHAR; + + else if ((ch1 == ch2) && (ch1 == '<' || ch1 == '>')) + OpType = OPERATOR_2CHAR; + + return OpType; +} + + +/** + * IsBin + * + * Return true if the given char is 0 or 1 + */ + +static inline bool IsBin (const int ch) +{ + return (ch == '0') || (ch == '1'); +} + + +/** + * IsDoxygenChar + * + * Return true if the char may be part of a Doxygen keyword + */ + +static inline bool IsDoxygenChar (const int ch) +{ + return isalpha(ch) || (ch == '$') || (ch == '[') || (ch == ']') || (ch == '{') || (ch == '}'); +} + + +/** + * ColouriseA68kDoc + * + * Main function, which colourises a 68k source + */ + +static void ColouriseA68kDoc (Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) +{ + // Used to buffer a string, to be able to compare it using built-in functions + char Buffer[100]; + + + // Used to know the length of an operator + int OpType; + + + // Get references to keywords lists + WordList &cpuInstruction = *keywordlists[0]; + WordList ®isters = *keywordlists[1]; + WordList &directive = *keywordlists[2]; + WordList &extInstruction = *keywordlists[3]; + WordList &alert = *keywordlists[4]; + WordList &doxygenKeyword = *keywordlists[5]; + + + // Instanciate a context for our source + StyleContext sc(startPos, length, initStyle, styler); + + + /************************************************************ + * + * Parse the source + * + ************************************************************/ + + for ( ; sc.More(); sc.Forward()) + { + /************************************************************ + * + * A style always terminates at the end of a line, even for + * comments (no multi-lines comments) + * + ************************************************************/ + if (sc.atLineStart) { + sc.SetState(SCE_A68K_DEFAULT); + } + + + /************************************************************ + * + * If we are not in "default style", check if the style continues + * In this case, we just have to loop + * + ************************************************************/ + + if (sc.state != SCE_A68K_DEFAULT) + { + if ( ((sc.state == SCE_A68K_NUMBER_DEC) && isdigit(sc.ch)) // Decimal number + || ((sc.state == SCE_A68K_NUMBER_BIN) && IsBin(sc.ch)) // Binary number + || ((sc.state == SCE_A68K_NUMBER_HEX) && isxdigit(sc.ch)) // Hexa number + || ((sc.state == SCE_A68K_MACRO_ARG) && isdigit(sc.ch)) // Macro argument + || ((sc.state == SCE_A68K_STRING1) && (sc.ch != '\'')) // String single-quoted + || ((sc.state == SCE_A68K_STRING2) && (sc.ch != '\"')) // String double-quoted + || ((sc.state == SCE_A68K_MACRO_DECLARATION) && IsIdentifierChar(sc.ch)) // Macro declaration (or global label, we don't know at this point) + || ((sc.state == SCE_A68K_IDENTIFIER) && IsIdentifierChar(sc.ch)) // Identifier + || ((sc.state == SCE_A68K_LABEL) && IsIdentifierChar(sc.ch)) // Label (local) + || ((sc.state == SCE_A68K_COMMENT_DOXYGEN) && IsDoxygenChar(sc.ch)) // Doxygen keyword + || ((sc.state == SCE_A68K_COMMENT_SPECIAL) && isalpha(sc.ch)) // Alert + || ((sc.state == SCE_A68K_COMMENT) && !isalpha(sc.ch) && (sc.ch != '\\'))) // Normal comment + { + continue; + } + + /************************************************************ + * + * Check if current state terminates + * + ************************************************************/ + + // Strings: include terminal ' or " in the current string by skipping it + if ((sc.state == SCE_A68K_STRING1) || (sc.state == SCE_A68K_STRING2)) { + sc.Forward(); + } + + + // If a macro declaration was terminated with ':', it was a label + else if ((sc.state == SCE_A68K_MACRO_DECLARATION) && (sc.chPrev == ':')) { + sc.ChangeState(SCE_A68K_LABEL); + } + + + // If it wasn't a Doxygen keyword, change it to normal comment + else if (sc.state == SCE_A68K_COMMENT_DOXYGEN) { + sc.GetCurrent(Buffer, sizeof(Buffer)); + if (!doxygenKeyword.InList(Buffer)) { + sc.ChangeState(SCE_A68K_COMMENT); + } + sc.SetState(SCE_A68K_COMMENT); + continue; + } + + + // If it wasn't an Alert, change it to normal comment + else if (sc.state == SCE_A68K_COMMENT_SPECIAL) { + sc.GetCurrent(Buffer, sizeof(Buffer)); + if (!alert.InList(Buffer)) { + sc.ChangeState(SCE_A68K_COMMENT); + } + // Reset style to normal comment, or to Doxygen keyword if it begins with '\' + if (sc.ch == '\\') { + sc.SetState(SCE_A68K_COMMENT_DOXYGEN); + } + else { + sc.SetState(SCE_A68K_COMMENT); + } + continue; + } + + + // If we are in a comment, it's a Doxygen keyword or an Alert + else if (sc.state == SCE_A68K_COMMENT) { + if (sc.ch == '\\') { + sc.SetState(SCE_A68K_COMMENT_DOXYGEN); + } + else { + sc.SetState(SCE_A68K_COMMENT_SPECIAL); + } + continue; + } + + + // Check if we are at the end of an identifier + // In this case, colourise it if was a keyword. + else if ((sc.state == SCE_A68K_IDENTIFIER) && !IsIdentifierChar(sc.ch)) { + sc.GetCurrentLowered(Buffer, sizeof(Buffer)); // Buffer the string of the current context + if (cpuInstruction.InList(Buffer)) { // And check if it belongs to a keyword list + sc.ChangeState(SCE_A68K_CPUINSTRUCTION); + } + else if (extInstruction.InList(Buffer)) { + sc.ChangeState(SCE_A68K_EXTINSTRUCTION); + } + else if (registers.InList(Buffer)) { + sc.ChangeState(SCE_A68K_REGISTER); + } + else if (directive.InList(Buffer)) { + sc.ChangeState(SCE_A68K_DIRECTIVE); + } + } + + // All special contexts are now handled.Come back to default style + sc.SetState(SCE_A68K_DEFAULT); + } + + + /************************************************************ + * + * Check if we must enter a new state + * + ************************************************************/ + + // Something which begins at the beginning of a line, and with + // - '\' + an identifier start char, or + // - '\\@' + an identifier start char + // is a local label (second case is used for macro local labels). We set it already as a label, it can't be a macro/equ declaration + if (sc.atLineStart && (sc.ch < 0x80) && IsIdentifierStart(sc.chNext) && (sc.ch == '\\')) { + sc.SetState(SCE_A68K_LABEL); + } + + if (sc.atLineStart && (sc.ch < 0x80) && (sc.ch == '\\') && (sc.chNext == '\\')) { + sc.Forward(2); + if ((sc.ch == '@') && IsIdentifierStart(sc.chNext)) { + sc.ChangeState(SCE_A68K_LABEL); + sc.SetState(SCE_A68K_LABEL); + } + } + + // Label and macro identifiers start at the beginning of a line + // We set both as a macro id, but if it wasn't one (':' at the end), + // it will be changed as a label. + if (sc.atLineStart && (sc.ch < 0x80) && IsIdentifierStart(sc.ch)) { + sc.SetState(SCE_A68K_MACRO_DECLARATION); + } + else if ((sc.ch < 0x80) && (sc.ch == ';')) { // Default: alert in a comment. If it doesn't match + sc.SetState(SCE_A68K_COMMENT); // with an alert, it will be toggle to a normal comment + } + else if ((sc.ch < 0x80) && isdigit(sc.ch)) { // Decimal numbers haven't prefix + sc.SetState(SCE_A68K_NUMBER_DEC); + } + else if ((sc.ch < 0x80) && (sc.ch == '%')) { // Binary numbers are prefixed with '%' + sc.SetState(SCE_A68K_NUMBER_BIN); + } + else if ((sc.ch < 0x80) && (sc.ch == '$')) { // Hexadecimal numbers are prefixed with '$' + sc.SetState(SCE_A68K_NUMBER_HEX); + } + else if ((sc.ch < 0x80) && (sc.ch == '\'')) { // String (single-quoted) + sc.SetState(SCE_A68K_STRING1); + } + else if ((sc.ch < 0x80) && (sc.ch == '\"')) { // String (double-quoted) + sc.SetState(SCE_A68K_STRING2); + } + else if ((sc.ch < 0x80) && (sc.ch == '\\') && (isdigit(sc.chNext))) { // Replacement symbols in macro are prefixed with '\' + sc.SetState(SCE_A68K_MACRO_ARG); + } + else if ((sc.ch < 0x80) && IsIdentifierStart(sc.ch)) { // An identifier: constant, label, etc... + sc.SetState(SCE_A68K_IDENTIFIER); + } + else { + if (sc.ch < 0x80) { + OpType = GetOperatorType(sc.ch, sc.chNext); // Check if current char is an operator + if (OpType != NO_OPERATOR) { + sc.SetState(SCE_A68K_OPERATOR); + if (OpType == OPERATOR_2CHAR) { // Check if the operator is 2 bytes long + sc.ForwardSetState(SCE_A68K_OPERATOR); // (>> or <<) + } + } + } + } + } // End of for() + sc.Complete(); +} + + +// Names of the keyword lists + +static const char * const a68kWordListDesc[] = +{ + "CPU instructions", + "Registers", + "Directives", + "Extended instructions", + "Comment special words", + "Doxygen keywords", + 0 +}; + +LexerModule lmA68k(SCLEX_A68K, ColouriseA68kDoc, "a68k", 0, a68kWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAPDL.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAPDL.cpp new file mode 100644 index 000000000..447e40d58 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAPDL.cpp @@ -0,0 +1,257 @@ +// Scintilla source code edit control +/** @file LexAPDL.cxx + ** Lexer for APDL. Based on the lexer for Assembler by The Black Horus. + ** By Hadar Raz. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80 && (isalnum(ch) || ch == '_')); +} + +static inline bool IsAnOperator(char ch) { + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '$' || ch == ':' || ch == '%') + return true; + return false; +} + +static void ColouriseAPDLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + int stringStart = ' '; + + WordList &processors = *keywordlists[0]; + WordList &commands = *keywordlists[1]; + WordList &slashcommands = *keywordlists[2]; + WordList &starcommands = *keywordlists[3]; + WordList &arguments = *keywordlists[4]; + WordList &functions = *keywordlists[5]; + + // Do not leak onto next line + initStyle = SCE_APDL_DEFAULT; + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + // Determine if the current state should terminate. + if (sc.state == SCE_APDL_NUMBER) { + if (!(IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') || + ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) { + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_COMMENTBLOCK) { + if (sc.atLineEnd) { + if (sc.ch == '\r') { + sc.Forward(); + } + sc.ForwardSetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_STRING) { + if (sc.atLineEnd) { + sc.SetState(SCE_APDL_DEFAULT); + } else if ((sc.ch == '\'' && stringStart == '\'') || (sc.ch == '\"' && stringStart == '\"')) { + sc.ForwardSetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_WORD) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (processors.InList(s)) { + sc.ChangeState(SCE_APDL_PROCESSOR); + } else if (slashcommands.InList(s)) { + sc.ChangeState(SCE_APDL_SLASHCOMMAND); + } else if (starcommands.InList(s)) { + sc.ChangeState(SCE_APDL_STARCOMMAND); + } else if (commands.InList(s)) { + sc.ChangeState(SCE_APDL_COMMAND); + } else if (arguments.InList(s)) { + sc.ChangeState(SCE_APDL_ARGUMENT); + } else if (functions.InList(s)) { + sc.ChangeState(SCE_APDL_FUNCTION); + } + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_OPERATOR) { + if (!IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_APDL_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_APDL_DEFAULT) { + if (sc.ch == '!' && sc.chNext == '!') { + sc.SetState(SCE_APDL_COMMENTBLOCK); + } else if (sc.ch == '!') { + sc.SetState(SCE_APDL_COMMENT); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_APDL_NUMBER); + } else if (sc.ch == '\'' || sc.ch == '\"') { + sc.SetState(SCE_APDL_STRING); + stringStart = sc.ch; + } else if (IsAWordChar(sc.ch) || ((sc.ch == '*' || sc.ch == '/') && !isgraph(sc.chPrev))) { + sc.SetState(SCE_APDL_WORD); + } else if (IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_APDL_OPERATOR); + } + } + } + sc.Complete(); +} + +//------------------------------------------------------------------------------ +// 06-27-07 Sergio Lucato +// - Included code folding for Ansys APDL lexer +// - Copyied from LexBasic.cxx and modified for APDL +//------------------------------------------------------------------------------ + +/* Bits: + * 1 - whitespace + * 2 - operator + * 4 - identifier + * 8 - decimal digit + * 16 - hex digit + * 32 - bin digit + */ +static int character_classification[128] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 10, 6, + 60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0 +}; + +static bool IsSpace(int c) { + return c < 128 && (character_classification[c] & 1); +} + +static bool IsIdentifier(int c) { + return c < 128 && (character_classification[c] & 4); +} + +static int LowerCase(int c) +{ + if (c >= 'A' && c <= 'Z') + return 'a' + c - 'A'; + return c; +} + +static int CheckAPDLFoldPoint(char const *token, int &level) { + if (!strcmp(token, "*if") || + !strcmp(token, "*do") || + !strcmp(token, "*dowhile") ) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "*endif") || + !strcmp(token, "*enddo") ) { + return -1; + } + return 0; +} + +static void FoldAPDLDoc(Sci_PositionU startPos, Sci_Position length, int, + WordList *[], Accessor &styler) { + + Sci_Position line = styler.GetLine(startPos); + int level = styler.LevelAt(line); + int go = 0, done = 0; + Sci_Position endPos = startPos + length; + char word[256]; + int wordlen = 0; + Sci_Position i; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + // Scan for tokens at the start of the line (they may include + // whitespace, for tokens like "End Function" + for (i = startPos; i < endPos; i++) { + int c = styler.SafeGetCharAt(i); + if (!done && !go) { + if (wordlen) { // are we scanning a token already? + word[wordlen] = static_cast(LowerCase(c)); + if (!IsIdentifier(c)) { // done with token + word[wordlen] = '\0'; + go = CheckAPDLFoldPoint(word, level); + if (!go) { + // Treat any whitespace as single blank, for + // things like "End Function". + if (IsSpace(c) && IsIdentifier(word[wordlen - 1])) { + word[wordlen] = ' '; + if (wordlen < 255) + wordlen++; + } + else // done with this line + done = 1; + } + } else if (wordlen < 255) { + wordlen++; + } + } else { // start scanning at first non-whitespace character + if (!IsSpace(c)) { + if (IsIdentifier(c)) { + word[0] = static_cast(LowerCase(c)); + wordlen = 1; + } else // done with this line + done = 1; + } + } + } + if (c == '\n') { // line end + if (!done && wordlen == 0 && foldCompact) // line was only space + level |= SC_FOLDLEVELWHITEFLAG; + if (level != styler.LevelAt(line)) + styler.SetLevel(line, level); + level += go; + line++; + // reset state + wordlen = 0; + level &= ~SC_FOLDLEVELHEADERFLAG; + level &= ~SC_FOLDLEVELWHITEFLAG; + go = 0; + done = 0; + } + } +} + +static const char * const apdlWordListDesc[] = { + "processors", + "commands", + "slashommands", + "starcommands", + "arguments", + "functions", + 0 +}; + +LexerModule lmAPDL(SCLEX_APDL, ColouriseAPDLDoc, "apdl", FoldAPDLDoc, apdlWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexASY.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexASY.cpp new file mode 100644 index 000000000..3ec522729 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexASY.cpp @@ -0,0 +1,269 @@ +// Scintilla source code edit control +//Author: instanton (email: soft_share126com) +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void ColouriseAsyDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + + CharacterSet setWordStart(CharacterSet::setAlpha, "_", 0x80, true); + CharacterSet setWord(CharacterSet::setAlphaNum, "._", 0x80, true); + + int visibleChars = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart) { + if (sc.state == SCE_ASY_STRING) { + sc.SetState(SCE_ASY_STRING); + } + visibleChars = 0; + } + + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } +// continuationLine = true; + continue; + } + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_ASY_OPERATOR: + sc.SetState(SCE_ASY_DEFAULT); + break; + case SCE_ASY_NUMBER: + if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_ASY_DEFAULT); + } + break; + case SCE_ASY_IDENTIFIER: + if (!setWord.Contains(sc.ch) || (sc.ch == '.')) { + char s[1000]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_ASY_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_ASY_WORD2); + } + sc.SetState(SCE_ASY_DEFAULT); + } + break; + case SCE_ASY_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ASY_DEFAULT); + } + break; + case SCE_ASY_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_ASY_DEFAULT); + } + break; + case SCE_ASY_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_ASY_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ASY_DEFAULT); + } + break; + case SCE_ASY_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_ASY_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ASY_DEFAULT); + } + break; + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ASY_DEFAULT) { + if (setWordStart.Contains(sc.ch) || (sc.ch == '@')) { + sc.SetState(SCE_ASY_IDENTIFIER); + } else if (sc.Match('/', '*')) { + sc.SetState(SCE_ASY_COMMENT); + sc.Forward(); // + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_ASY_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ASY_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_ASY_CHARACTER); + } else if (sc.ch == '#' && visibleChars == 0) { + do { + sc.Forward(); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); + if (sc.atLineEnd) { + sc.SetState(SCE_ASY_DEFAULT); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_ASY_OPERATOR); + } + } + + } + sc.Complete(); +} + +static bool IsAsyCommentStyle(int style) { + return style == SCE_ASY_COMMENT; +} + + +static inline bool isASYidentifier(int ch) { + return + ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')) ; +} + +static int ParseASYWord(Sci_PositionU pos, Accessor &styler, char *word) +{ + int length=0; + char ch=styler.SafeGetCharAt(pos); + *word=0; + + while(isASYidentifier(ch) && length<100){ + word[length]=ch; + length++; + ch=styler.SafeGetCharAt(pos+length); + } + word[length]=0; + return length; +} + +static bool IsASYDrawingLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + + Sci_Position startpos = pos; + char buffer[100]=""; + + while (startpos 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsAsyCommentStyle(style)) { + if (!IsAsyCommentStyle(stylePrev) && (stylePrev != SCE_ASY_COMMENTLINEDOC)) { + levelNext++; + } else if (!IsAsyCommentStyle(styleNext) && (styleNext != SCE_ASY_COMMENTLINEDOC) && !atEOL) { + levelNext--; + } + } + if (style == SCE_ASY_OPERATOR) { + if (ch == '{') { + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + + if (atEOL && IsASYDrawingLine(lineCurrent, styler)){ + if (lineCurrent==0 && IsASYDrawingLine(lineCurrent + 1, styler)) + levelNext++; + else if (lineCurrent!=0 && !IsASYDrawingLine(lineCurrent - 1, styler) + && IsASYDrawingLine(lineCurrent + 1, styler) + ) + levelNext++; + else if (lineCurrent!=0 && IsASYDrawingLine(lineCurrent - 1, styler) && + !IsASYDrawingLine(lineCurrent+1, styler)) + levelNext--; + } + + if (atEOL) { + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +static const char * const asyWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + 0, + }; + +LexerModule lmASY(SCLEX_ASYMPTOTE, ColouriseAsyDoc, "asy", FoldAsyDoc, asyWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAU3.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAU3.cpp new file mode 100644 index 000000000..b4029413c --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAU3.cpp @@ -0,0 +1,908 @@ +// Scintilla source code edit control +// @file LexAU3.cxx +// Lexer for AutoIt3 http://www.hiddensoft.com/autoit3 +// by Jos van der Zande, jvdzande@yahoo.com +// +// Changes: +// March 28, 2004 - Added the standard Folding code +// April 21, 2004 - Added Preprosessor Table + Syntax Highlighting +// Fixed Number highlighting +// Changed default isoperator to IsAOperator to have a better match to AutoIt3 +// Fixed "#comments_start" -> "#comments-start" +// Fixed "#comments_end" -> "#comments-end" +// Fixed Sendkeys in Strings when not terminated with } +// Added support for Sendkey strings that have second parameter e.g. {UP 5} or {a down} +// April 26, 2004 - Fixed # pre-processor statement inside of comment block would invalidly change the color. +// Added logic for #include to treat the <> as string +// Added underscore to IsAOperator. +// May 17, 2004 - Changed the folding logic from indent to keyword folding. +// Added Folding logic for blocks of single-commentlines or commentblock. +// triggered by: fold.comment=1 +// Added Folding logic for preprocessor blocks triggered by fold.preprocessor=1 +// Added Special for #region - #endregion syntax highlight and folding. +// May 30, 2004 - Fixed issue with continuation lines on If statements. +// June 5, 2004 - Added comma to Operators for better readability. +// Added fold.compact support set with fold.compact=1 +// Changed folding inside of #cs-#ce. Default is no keyword folding inside comment blocks when fold.comment=1 +// it will now only happen when fold.comment=2. +// Sep 5, 2004 - Added logic to handle colourizing words on the last line. +// Typed Characters now show as "default" till they match any table. +// Oct 10, 2004 - Added logic to show Comments in "Special" directives. +// Nov 1, 2004 - Added better testing for Numbers supporting x and e notation. +// Nov 28, 2004 - Added logic to handle continuation lines for syntax highlighting. +// Jan 10, 2005 - Added Abbreviations Keyword used for expansion +// Mar 24, 2005 - Updated Abbreviations Keywords to fix when followed by Operator. +// Apr 18, 2005 - Updated #CE/#Comment-End logic to take a linecomment ";" into account +// - Added folding support for With...EndWith +// - Added support for a DOT in variable names +// - Fixed Underscore in CommentBlock +// May 23, 2005 - Fixed the SentKey lexing in case of a missing } +// Aug 11, 2005 - Fixed possible bug with s_save length > 100. +// Aug 23, 2005 - Added Switch/endswitch support to the folding logic. +// Sep 27, 2005 - Fixed the SentKey lexing logic in case of multiple sentkeys. +// Mar 12, 2006 - Fixed issue with <> coloring as String in stead of Operator in rare occasions. +// Apr 8, 2006 - Added support for AutoIt3 Standard UDF library (SCE_AU3_UDF) +// Mar 9, 2007 - Fixed bug with + following a String getting the wrong Color. +// Jun 20, 2007 - Fixed Commentblock issue when LF's are used as EOL. +// Jul 26, 2007 - Fixed #endregion undetected bug. +// +// Copyright for Scintilla: 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. +// Scintilla source code edit control + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsTypeCharacter(const int ch) +{ + return ch == '$'; +} +static inline bool IsAWordChar(const int ch) +{ + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) +{ + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '@' || ch == '#' || ch == '$' || ch == '.'); +} + +static inline bool IsAOperator(char ch) { + if (IsASCII(ch) && isalnum(ch)) + return false; + if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || + ch == '&' || ch == '^' || ch == '=' || ch == '<' || ch == '>' || + ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == ',' ) + return true; + return false; +} + +/////////////////////////////////////////////////////////////////////////////// +// GetSendKey() filters the portion before and after a/multiple space(s) +// and return the first portion to be looked-up in the table +// also check if the second portion is valid... (up,down.on.off,toggle or a number) +/////////////////////////////////////////////////////////////////////////////// + +static int GetSendKey(const char *szLine, char *szKey) +{ + int nFlag = 0; + int nStartFound = 0; + int nKeyPos = 0; + int nSpecPos= 0; + int nSpecNum= 1; + int nPos = 0; + char cTemp; + char szSpecial[100]; + + // split the portion of the sendkey in the part before and after the spaces + while ( ( (cTemp = szLine[nPos]) != '\0')) + { + // skip leading Ctrl/Shift/Alt state + if (cTemp == '{') { + nStartFound = 1; + } + // + if (nStartFound == 1) { + if ((cTemp == ' ') && (nFlag == 0) ) // get the stuff till first space + { + nFlag = 1; + // Add } to the end of the first bit for table lookup later. + szKey[nKeyPos++] = '}'; + } + else if (cTemp == ' ') + { + // skip other spaces + } + else if (nFlag == 0) + { + // save first portion into var till space or } is hit + szKey[nKeyPos++] = cTemp; + } + else if ((nFlag == 1) && (cTemp != '}')) + { + // Save second portion into var... + szSpecial[nSpecPos++] = cTemp; + // check if Second portion is all numbers for repeat fuction + if (isdigit(cTemp) == false) {nSpecNum = 0;} + } + } + nPos++; // skip to next char + + } // End While + + + // Check if the second portion is either a number or one of these keywords + szKey[nKeyPos] = '\0'; + szSpecial[nSpecPos] = '\0'; + if (strcmp(szSpecial,"down")== 0 || strcmp(szSpecial,"up")== 0 || + strcmp(szSpecial,"on")== 0 || strcmp(szSpecial,"off")== 0 || + strcmp(szSpecial,"toggle")== 0 || nSpecNum == 1 ) + { + nFlag = 0; + } + else + { + nFlag = 1; + } + return nFlag; // 1 is bad, 0 is good + +} // GetSendKey() + +// +// Routine to check the last "none comment" character on a line to see if its a continuation +// +static bool IsContinuationLine(Sci_PositionU szLine, Accessor &styler) +{ + Sci_Position nsPos = styler.LineStart(szLine); + Sci_Position nePos = styler.LineStart(szLine+1) - 2; + //int stylech = styler.StyleAt(nsPos); + while (nsPos < nePos) + { + //stylech = styler.StyleAt(nePos); + int stylech = styler.StyleAt(nsPos); + if (!(stylech == SCE_AU3_COMMENT)) { + char ch = styler.SafeGetCharAt(nePos); + if (!isspacechar(ch)) { + if (ch == '_') + return true; + else + return false; + } + } + nePos--; // skip to next char + } // End While + return false; +} // IsContinuationLine() + +// +// syntax highlighting logic +static void ColouriseAU3Doc(Sci_PositionU startPos, + Sci_Position length, int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + WordList &keywords7 = *keywordlists[6]; + WordList &keywords8 = *keywordlists[7]; + // find the first previous line without continuation character at the end + Sci_Position lineCurrent = styler.GetLine(startPos); + Sci_Position s_startPos = startPos; + // When not inside a Block comment: find First line without _ + if (!(initStyle==SCE_AU3_COMMENTBLOCK)) { + while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) || + (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); // get start position + initStyle = 0; // reset the start style to 0 + } + } + // Set the new length to include it from the start and set the start position + length = length + s_startPos - startPos; // correct the total length to process + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + char si; // string indicator "=1 '=2 + char ni; // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 Enot=3 + char ci; // comment indicator 0=not linecomment(;) + char s_save[100] = ""; + si=0; + ni=0; + ci=0; + //$$$ + for (; sc.More(); sc.Forward()) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + // ********************************************** + // save the total current word for eof processing + if (IsAWordChar(sc.ch) || sc.ch == '}') + { + strcpy(s_save,s); + int tp = static_cast(strlen(s_save)); + if (tp < 99) { + s_save[tp] = static_cast(tolower(sc.ch)); + s_save[tp+1] = '\0'; + } + } + // ********************************************** + // + switch (sc.state) + { + case SCE_AU3_COMMENTBLOCK: + { + //Reset at line end + if (sc.atLineEnd) { + ci=0; + if (strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0) { + if (sc.atLineEnd) + sc.SetState(SCE_AU3_DEFAULT); + else + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + break; + } + //skip rest of line when a ; is encountered + if (sc.chPrev == ';') { + ci=2; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + // skip rest of the line + if (ci==2) + break; + // check when first character is detected on the line + if (ci==0) { + if (IsAWordStart(static_cast(sc.ch)) || IsAOperator(static_cast(sc.ch))) { + ci=1; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + break; + } + if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && strcmp(s, "#comments") == 0))) { + if ((strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0)) + sc.SetState(SCE_AU3_COMMENT); // set to comment line for the rest of the line + else + ci=2; // line doesn't begin with #CE so skip the rest of the line + } + break; + } + case SCE_AU3_COMMENT: + { + if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_OPERATOR: + { + // check if its a COMobject + if (sc.chPrev == '.' && IsAWordChar(sc.ch)) { + sc.SetState(SCE_AU3_COMOBJ); + } + else { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_SPECIAL: + { + if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);} + if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_KEYWORD: + { + if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && (strcmp(s, "#comments") == 0 || strcmp(s, "#include") == 0)))) + { + if (!IsTypeCharacter(sc.ch)) + { + if (strcmp(s, "#cs")== 0 || strcmp(s, "#comments-start")== 0 ) + { + sc.ChangeState(SCE_AU3_COMMENTBLOCK); + sc.SetState(SCE_AU3_COMMENTBLOCK); + break; + } + else if (keywords.InList(s)) { + sc.ChangeState(SCE_AU3_KEYWORD); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AU3_FUNCTION); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AU3_MACRO); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AU3_PREPROCESSOR); + sc.SetState(SCE_AU3_DEFAULT); + if (strcmp(s, "#include")== 0) + { + si = 3; // use to determine string start for #inlude <> + } + } + else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AU3_SPECIAL); + sc.SetState(SCE_AU3_SPECIAL); + } + else if ((keywords7.InList(s)) && (!IsAOperator(static_cast(sc.ch)))) { + sc.ChangeState(SCE_AU3_EXPAND); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords8.InList(s)) { + sc.ChangeState(SCE_AU3_UDF); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (strcmp(s, "_") == 0) { + sc.ChangeState(SCE_AU3_OPERATOR); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (!IsAWordChar(sc.ch)) { + sc.ChangeState(SCE_AU3_DEFAULT); + sc.SetState(SCE_AU3_DEFAULT); + } + } + } + if (sc.atLineEnd) { + sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_NUMBER: + { + // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 E-not=3 + // + // test for Hex notation + if (strcmp(s, "0") == 0 && (sc.ch == 'x' || sc.ch == 'X') && ni == 0) + { + ni = 2; + break; + } + // test for E notation + if (IsADigit(sc.chPrev) && (sc.ch == 'e' || sc.ch == 'E') && ni <= 1) + { + ni = 3; + break; + } + // Allow Hex characters inside hex numeric strings + if ((ni == 2) && + (sc.ch == 'a' || sc.ch == 'b' || sc.ch == 'c' || sc.ch == 'd' || sc.ch == 'e' || sc.ch == 'f' || + sc.ch == 'A' || sc.ch == 'B' || sc.ch == 'C' || sc.ch == 'D' || sc.ch == 'E' || sc.ch == 'F' )) + { + break; + } + // test for 1 dec point only + if (sc.ch == '.') + { + if (ni==0) + { + ni=1; + } + else + { + ni=9; + } + break; + } + // end of numeric string ? + if (!(IsADigit(sc.ch))) + { + if (ni==9) + { + sc.ChangeState(SCE_AU3_DEFAULT); + } + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_VARIABLE: + { + // Check if its a COMObject + if (sc.ch == '.' && !IsADigit(sc.chNext)) { + sc.SetState(SCE_AU3_OPERATOR); + } + else if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_COMOBJ: + { + if (!(IsAWordChar(sc.ch))) { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_STRING: + { + // check for " to end a double qouted string or + // check for ' to end a single qouted string + if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'') || (si == 3 && sc.ch == '>')) + { + sc.ForwardSetState(SCE_AU3_DEFAULT); + si=0; + break; + } + if (sc.atLineEnd) + { + si=0; + // at line end and not found a continuation char then reset to default + Sci_Position lineCurrent = styler.GetLine(sc.currentPos); + if (!IsContinuationLine(lineCurrent,styler)) + { + sc.SetState(SCE_AU3_DEFAULT); + break; + } + } + // find Sendkeys in a STRING + if (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ) { + sc.SetState(SCE_AU3_SENT);} + break; + } + + case SCE_AU3_SENT: + { + // Send key string ended + if (sc.chPrev == '}' && sc.ch != '}') + { + // set color to SENDKEY when valid sendkey .. else set back to regular string + char sk[100]; + // split {111 222} and return {111} and check if 222 is valid. + // if return code = 1 then invalid 222 so must be string + if (GetSendKey(s,sk)) + { + sc.ChangeState(SCE_AU3_STRING); + } + // if single char between {?} then its ok as sendkey for a single character + else if (strlen(sk) == 3) + { + sc.ChangeState(SCE_AU3_SENT); + } + // if sendkey {111} is in table then ok as sendkey + else if (keywords4.InList(sk)) + { + sc.ChangeState(SCE_AU3_SENT); + } + else + { + sc.ChangeState(SCE_AU3_STRING); + } + sc.SetState(SCE_AU3_STRING); + } + else + { + // check if the start is a valid SendKey start + Sci_Position nPos = 0; + int nState = 1; + char cTemp; + while (!(nState == 2) && ((cTemp = s[nPos]) != '\0')) + { + if (cTemp == '{' && nState == 1) + { + nState = 2; + } + if (nState == 1 && !(cTemp == '+' || cTemp == '!' || cTemp == '^' || cTemp == '#' )) + { + nState = 0; + } + nPos++; + } + //Verify characters infront of { ... if not assume regular string + if (nState == 1 && (!(sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ))) { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_STRING); + } + // If invalid character found then assume its a regular string + if (nState == 0) { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_STRING); + } + } + // check if next portion is again a sendkey + if (sc.atLineEnd) + { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_DEFAULT); + si = 0; // reset string indicator + } + //* check in next characters following a sentkey are again a sent key + // Need this test incase of 2 sentkeys like {F1}{ENTER} but not detect {{} + if (sc.state == SCE_AU3_STRING && (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' )) { + sc.SetState(SCE_AU3_SENT);} + // check to see if the string ended... + // Sendkey string isn't complete but the string ended.... + if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'')) + { + sc.ChangeState(SCE_AU3_STRING); + sc.ForwardSetState(SCE_AU3_DEFAULT); + } + break; + } + } //switch (sc.state) + + // Determine if a new state should be entered: + + if (sc.state == SCE_AU3_DEFAULT) + { + if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);} + else if (sc.ch == '#') {sc.SetState(SCE_AU3_KEYWORD);} + else if (sc.ch == '$') {sc.SetState(SCE_AU3_VARIABLE);} + else if (sc.ch == '.' && !IsADigit(sc.chNext)) {sc.SetState(SCE_AU3_OPERATOR);} + else if (sc.ch == '@') {sc.SetState(SCE_AU3_KEYWORD);} + //else if (sc.ch == '_') {sc.SetState(SCE_AU3_KEYWORD);} + else if (sc.ch == '<' && si==3) {sc.SetState(SCE_AU3_STRING);} // string after #include + else if (sc.ch == '\"') { + sc.SetState(SCE_AU3_STRING); + si = 1; } + else if (sc.ch == '\'') { + sc.SetState(SCE_AU3_STRING); + si = 2; } + else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) + { + sc.SetState(SCE_AU3_NUMBER); + ni = 0; + } + else if (IsAWordStart(sc.ch)) {sc.SetState(SCE_AU3_KEYWORD);} + else if (IsAOperator(static_cast(sc.ch))) {sc.SetState(SCE_AU3_OPERATOR);} + else if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + } + } //for (; sc.More(); sc.Forward()) + + //************************************* + // Colourize the last word correctly + //************************************* + if (sc.state == SCE_AU3_KEYWORD) + { + if (strcmp(s_save, "#cs")== 0 || strcmp(s_save, "#comments-start")== 0 ) + { + sc.ChangeState(SCE_AU3_COMMENTBLOCK); + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + else if (keywords.InList(s_save)) { + sc.ChangeState(SCE_AU3_KEYWORD); + sc.SetState(SCE_AU3_KEYWORD); + } + else if (keywords2.InList(s_save)) { + sc.ChangeState(SCE_AU3_FUNCTION); + sc.SetState(SCE_AU3_FUNCTION); + } + else if (keywords3.InList(s_save)) { + sc.ChangeState(SCE_AU3_MACRO); + sc.SetState(SCE_AU3_MACRO); + } + else if (keywords5.InList(s_save)) { + sc.ChangeState(SCE_AU3_PREPROCESSOR); + sc.SetState(SCE_AU3_PREPROCESSOR); + } + else if (keywords6.InList(s_save)) { + sc.ChangeState(SCE_AU3_SPECIAL); + sc.SetState(SCE_AU3_SPECIAL); + } + else if (keywords7.InList(s_save) && sc.atLineEnd) { + sc.ChangeState(SCE_AU3_EXPAND); + sc.SetState(SCE_AU3_EXPAND); + } + else if (keywords8.InList(s_save)) { + sc.ChangeState(SCE_AU3_UDF); + sc.SetState(SCE_AU3_UDF); + } + else { + sc.ChangeState(SCE_AU3_DEFAULT); + sc.SetState(SCE_AU3_DEFAULT); + } + } + if (sc.state == SCE_AU3_SENT) + { + // Send key string ended + if (sc.chPrev == '}' && sc.ch != '}') + { + // set color to SENDKEY when valid sendkey .. else set back to regular string + char sk[100]; + // split {111 222} and return {111} and check if 222 is valid. + // if return code = 1 then invalid 222 so must be string + if (GetSendKey(s_save,sk)) + { + sc.ChangeState(SCE_AU3_STRING); + } + // if single char between {?} then its ok as sendkey for a single character + else if (strlen(sk) == 3) + { + sc.ChangeState(SCE_AU3_SENT); + } + // if sendkey {111} is in table then ok as sendkey + else if (keywords4.InList(sk)) + { + sc.ChangeState(SCE_AU3_SENT); + } + else + { + sc.ChangeState(SCE_AU3_STRING); + } + sc.SetState(SCE_AU3_STRING); + } + // check if next portion is again a sendkey + if (sc.atLineEnd) + { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_DEFAULT); + } + } + //************************************* + sc.Complete(); +} + +// +static bool IsStreamCommentStyle(int style) { + return style == SCE_AU3_COMMENT || style == SCE_AU3_COMMENTBLOCK; +} + +// +// Routine to find first none space on the current line and return its Style +// needed for comment lines not starting on pos 1 +static int GetStyleFirstWord(Sci_PositionU szLine, Accessor &styler) +{ + Sci_Position nsPos = styler.LineStart(szLine); + Sci_Position nePos = styler.LineStart(szLine+1) - 1; + while (isspacechar(styler.SafeGetCharAt(nsPos)) && nsPos < nePos) + { + nsPos++; // skip to next char + + } // End While + return styler.StyleAt(nsPos); + +} // GetStyleFirstWord() + + +// +static void FoldAU3Doc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) +{ + Sci_Position endPos = startPos + length; + // get settings from the config files for folding comments and preprocessor lines + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldInComment = styler.GetPropertyInt("fold.comment") == 2; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldpreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; + // Backtrack to previous line in case need to fix its fold status + Sci_Position lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + // vars for style of previous/current/next lines + int style = GetStyleFirstWord(lineCurrent,styler); + int stylePrev = 0; + // find the first previous line without continuation character at the end + while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) || + (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + if (lineCurrent > 0) { + stylePrev = GetStyleFirstWord(lineCurrent-1,styler); + } + // vars for getting first word to check for keywords + bool FirstWordStart = false; + bool FirstWordEnd = false; + char szKeyword[11]=""; + int szKeywordlen = 0; + char szThen[5]=""; + int szThenlen = 0; + bool ThenFoundLast = false; + // var for indentlevel + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + // + int visibleChars = 0; + char chNext = styler.SafeGetCharAt(startPos); + char chPrev = ' '; + // + for (Sci_Position i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + if (IsAWordChar(ch)) { + visibleChars++; + } + // get the syle for the current character neede to check in comment + int stylech = styler.StyleAt(i); + // get first word for the line for indent check max 9 characters + if (FirstWordStart && (!(FirstWordEnd))) { + if (!IsAWordChar(ch)) { + FirstWordEnd = true; + szKeyword[szKeywordlen] = '\0'; + } + else { + if (szKeywordlen < 10) { + szKeyword[szKeywordlen++] = static_cast(tolower(ch)); + } + } + } + // start the capture of the first word + if (!(FirstWordStart)) { + if (IsAWordChar(ch) || IsAWordStart(ch) || ch == ';') { + FirstWordStart = true; + szKeyword[szKeywordlen++] = static_cast(tolower(ch)); + } + } + // only process this logic when not in comment section + if (!(stylech == SCE_AU3_COMMENT)) { + if (ThenFoundLast) { + if (IsAWordChar(ch)) { + ThenFoundLast = false; + } + } + // find out if the word "then" is the last on a "if" line + if (FirstWordEnd && strcmp(szKeyword,"if") == 0) { + if (szThenlen == 4) { + szThen[0] = szThen[1]; + szThen[1] = szThen[2]; + szThen[2] = szThen[3]; + szThen[3] = static_cast(tolower(ch)); + if (strcmp(szThen,"then") == 0 ) { + ThenFoundLast = true; + } + } + else { + szThen[szThenlen++] = static_cast(tolower(ch)); + if (szThenlen == 5) { + szThen[4] = '\0'; + } + } + } + } + // End of Line found so process the information + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) { + // ************************** + // Folding logic for Keywords + // ************************** + // if a keyword is found on the current line and the line doesn't end with _ (continuation) + // and we are not inside a commentblock. + if (szKeywordlen > 0 && (!(chPrev == '_')) && + ((!(IsStreamCommentStyle(style)) || foldInComment)) ) { + szKeyword[szKeywordlen] = '\0'; + // only fold "if" last keyword is "then" (else its a one line if) + if (strcmp(szKeyword,"if") == 0 && ThenFoundLast) { + levelNext++; + } + // create new fold for these words + if (strcmp(szKeyword,"do") == 0 || strcmp(szKeyword,"for") == 0 || + strcmp(szKeyword,"func") == 0 || strcmp(szKeyword,"while") == 0|| + strcmp(szKeyword,"with") == 0 || strcmp(szKeyword,"#region") == 0 ) { + levelNext++; + } + // create double Fold for select&switch because Case will subtract one of the current level + if (strcmp(szKeyword,"select") == 0 || strcmp(szKeyword,"switch") == 0) { + levelNext++; + levelNext++; + } + // end the fold for these words before the current line + if (strcmp(szKeyword,"endfunc") == 0 || strcmp(szKeyword,"endif") == 0 || + strcmp(szKeyword,"next") == 0 || strcmp(szKeyword,"until") == 0 || + strcmp(szKeyword,"endwith") == 0 ||strcmp(szKeyword,"wend") == 0){ + levelNext--; + levelCurrent--; + } + // end the fold for these words before the current line and Start new fold + if (strcmp(szKeyword,"case") == 0 || strcmp(szKeyword,"else") == 0 || + strcmp(szKeyword,"elseif") == 0 ) { + levelCurrent--; + } + // end the double fold for this word before the current line + if (strcmp(szKeyword,"endselect") == 0 || strcmp(szKeyword,"endswitch") == 0 ) { + levelNext--; + levelNext--; + levelCurrent--; + levelCurrent--; + } + // end the fold for these words on the current line + if (strcmp(szKeyword,"#endregion") == 0 ) { + levelNext--; + } + } + // Preprocessor and Comment folding + int styleNext = GetStyleFirstWord(lineCurrent + 1,styler); + // ************************************* + // Folding logic for preprocessor blocks + // ************************************* + // process preprosessor line + if (foldpreprocessor && style == SCE_AU3_PREPROCESSOR) { + if (!(stylePrev == SCE_AU3_PREPROCESSOR) && (styleNext == SCE_AU3_PREPROCESSOR)) { + levelNext++; + } + // fold till the last line for normal comment lines + else if (stylePrev == SCE_AU3_PREPROCESSOR && !(styleNext == SCE_AU3_PREPROCESSOR)) { + levelNext--; + } + } + // ********************************* + // Folding logic for Comment blocks + // ********************************* + if (foldComment && IsStreamCommentStyle(style)) { + // Start of a comment block + if (!(stylePrev==style) && IsStreamCommentStyle(styleNext) && styleNext==style) { + levelNext++; + } + // fold till the last line for normal comment lines + else if (IsStreamCommentStyle(stylePrev) + && !(styleNext == SCE_AU3_COMMENT) + && stylePrev == SCE_AU3_COMMENT + && style == SCE_AU3_COMMENT) { + levelNext--; + } + // fold till the one but last line for Blockcomment lines + else if (IsStreamCommentStyle(stylePrev) + && !(styleNext == SCE_AU3_COMMENTBLOCK) + && style == SCE_AU3_COMMENTBLOCK) { + levelNext--; + levelCurrent--; + } + } + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + // reset values for the next line + lineCurrent++; + stylePrev = style; + style = styleNext; + levelCurrent = levelNext; + visibleChars = 0; + // if the last character is an Underscore then don't reset since the line continues on the next line. + if (!(chPrev == '_')) { + szKeywordlen = 0; + szThenlen = 0; + FirstWordStart = false; + FirstWordEnd = false; + ThenFoundLast = false; + } + } + // save the last processed character + if (!isspacechar(ch)) { + chPrev = ch; + visibleChars++; + } + } +} + + +// + +static const char * const AU3WordLists[] = { + "#autoit keywords", + "#autoit functions", + "#autoit macros", + "#autoit Sent keys", + "#autoit Pre-processors", + "#autoit Special", + "#autoit Expand", + "#autoit UDF", + 0 +}; +LexerModule lmAU3(SCLEX_AU3, ColouriseAU3Doc, "au3", FoldAU3Doc , AU3WordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAVE.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAVE.cpp new file mode 100644 index 000000000..b976734ae --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAVE.cpp @@ -0,0 +1,229 @@ +// SciTE - Scintilla based Text Editor +/** @file LexAVE.cxx + ** Lexer for Avenue. + ** + ** Written by Alexey Yutkin . + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} +static inline bool IsEnumChar(const int ch) { + return (ch < 0x80) && (isalnum(ch)|| ch == '_'); +} +static inline bool IsANumberChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' ); +} + +inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +inline bool isAveOperator(char ch) { + if (IsASCII(ch) && isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' ) + return true; + return false; +} + +static void ColouriseAveDoc( + Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + + // Do not leak onto next line + if (initStyle == SCE_AVE_STRINGEOL) { + initStyle = SCE_AVE_DEFAULT; + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + Sci_Position currentLine = styler.GetLine(sc.currentPos); + styler.SetLineState(currentLine, 0); + } + if (sc.atLineStart && (sc.state == SCE_AVE_STRING)) { + // Prevent SCE_AVE_STRINGEOL from leaking back to previous line + sc.SetState(SCE_AVE_STRING); + } + + + // Determine if the current state should terminate. + if (sc.state == SCE_AVE_OPERATOR) { + sc.SetState(SCE_AVE_DEFAULT); + } else if (sc.state == SCE_AVE_NUMBER) { + if (!IsANumberChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_ENUM) { + if (!IsEnumChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + //sc.GetCurrent(s, sizeof(s)); + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_AVE_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AVE_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AVE_WORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_AVE_WORD4); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AVE_WORD5); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AVE_WORD6); + } + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_AVE_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_AVE_STRINGEOL); + sc.ForwardSetState(SCE_AVE_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_AVE_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_AVE_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_AVE_IDENTIFIER); + } else if (sc.Match('\"')) { + sc.SetState(SCE_AVE_STRING); + } else if (sc.Match('\'')) { + sc.SetState(SCE_AVE_COMMENT); + sc.Forward(); + } else if (isAveOperator(static_cast(sc.ch))) { + sc.SetState(SCE_AVE_OPERATOR); + } else if (sc.Match('#')) { + sc.SetState(SCE_AVE_ENUM); + sc.Forward(); + } + } + } + sc.Complete(); +} + +static void FoldAveDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], + Accessor &styler) { + Sci_PositionU lengthDoc = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = static_cast(tolower(styler[startPos])); + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + int styleNext = styler.StyleAt(startPos); + char s[10] = ""; + + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = static_cast(tolower(chNext)); + chNext = static_cast(tolower(styler.SafeGetCharAt(i + 1))); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (style == SCE_AVE_WORD) { + if (ch == 't' || ch == 'f' || ch == 'w' || ch == 'e') { + for (unsigned int j = 0; j < 6; j++) { + if (!iswordchar(styler[i + j])) { + break; + } + s[j] = static_cast(tolower(styler[i + j])); + s[j + 1] = '\0'; + } + + if ((strcmp(s, "then") == 0) || (strcmp(s, "for") == 0) || (strcmp(s, "while") == 0)) { + levelCurrent++; + } + if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) { + // Normally "elseif" and "then" will be on the same line and will cancel + // each other out. // As implemented, this does not support fold.at.else. + levelCurrent--; + } + } + } else if (style == SCE_AVE_OPERATOR) { + if (ch == '{' || ch == '(') { + levelCurrent++; + } else if (ch == '}' || ch == ')') { + levelCurrent--; + } + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) { + lev |= SC_FOLDLEVELWHITEFLAG; + } + if ((levelCurrent > levelPrev) && (visibleChars > 0)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) { + visibleChars++; + } + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +LexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, "ave", FoldAveDoc); + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAVS.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAVS.cpp new file mode 100644 index 000000000..df5223f8d --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAVS.cpp @@ -0,0 +1,291 @@ +// Scintilla source code edit control +/** @file LexAVS.cxx + ** Lexer for AviSynth. + **/ +// Copyright 2012 by Bruno Barbieri +// Heavily based on LexPOV by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(int ch) { + return isalpha(ch) || (ch != ' ' && ch != '\n' && ch != '(' && ch != '.' && ch != ','); +} + +static inline bool IsANumberChar(int ch) { + // Not exactly following number definition (several dots are seen as OK, etc.) + // but probably enough in most cases. + return (ch < 0x80) && + (isdigit(ch) || ch == '.' || ch == '-' || ch == '+'); +} + +static void ColouriseAvsDoc( + Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &filters = *keywordlists[1]; + WordList &plugins = *keywordlists[2]; + WordList &functions = *keywordlists[3]; + WordList &clipProperties = *keywordlists[4]; + WordList &userDefined = *keywordlists[5]; + + Sci_Position currentLine = styler.GetLine(startPos); + // Initialize the block comment nesting level, if we are inside such a comment. + int blockCommentLevel = 0; + if (initStyle == SCE_AVS_COMMENTBLOCK || initStyle == SCE_AVS_COMMENTBLOCKN) { + blockCommentLevel = styler.GetLineState(currentLine - 1); + } + + // Do not leak onto next line + if (initStyle == SCE_AVS_COMMENTLINE) { + initStyle = SCE_AVS_DEFAULT; + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + currentLine = styler.GetLine(sc.currentPos); + if (sc.state == SCE_AVS_COMMENTBLOCK || sc.state == SCE_AVS_COMMENTBLOCKN) { + // Inside a block comment, we set the line state + styler.SetLineState(currentLine, blockCommentLevel); + } else { + // Reset the line state + styler.SetLineState(currentLine, 0); + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_AVS_OPERATOR) { + sc.SetState(SCE_AVS_DEFAULT); + } else if (sc.state == SCE_AVS_NUMBER) { + // We stop the number definition on non-numerical non-dot non-sign char + if (!IsANumberChar(sc.ch)) { + sc.SetState(SCE_AVS_DEFAULT); + } + } else if (sc.state == SCE_AVS_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_AVS_KEYWORD); + } else if (filters.InList(s)) { + sc.ChangeState(SCE_AVS_FILTER); + } else if (plugins.InList(s)) { + sc.ChangeState(SCE_AVS_PLUGIN); + } else if (functions.InList(s)) { + sc.ChangeState(SCE_AVS_FUNCTION); + } else if (clipProperties.InList(s)) { + sc.ChangeState(SCE_AVS_CLIPPROP); + } else if (userDefined.InList(s)) { + sc.ChangeState(SCE_AVS_USERDFN); + } + sc.SetState(SCE_AVS_DEFAULT); + } + } else if (sc.state == SCE_AVS_COMMENTBLOCK) { + if (sc.Match('/', '*')) { + blockCommentLevel++; + sc.Forward(); + } else if (sc.Match('*', '/') && blockCommentLevel > 0) { + blockCommentLevel--; + sc.Forward(); + if (blockCommentLevel == 0) { + sc.ForwardSetState(SCE_AVS_DEFAULT); + } + } + } else if (sc.state == SCE_AVS_COMMENTBLOCKN) { + if (sc.Match('[', '*')) { + blockCommentLevel++; + sc.Forward(); + } else if (sc.Match('*', ']') && blockCommentLevel > 0) { + blockCommentLevel--; + sc.Forward(); + if (blockCommentLevel == 0) { + sc.ForwardSetState(SCE_AVS_DEFAULT); + } + } + } else if (sc.state == SCE_AVS_COMMENTLINE) { + if (sc.atLineEnd) { + sc.ForwardSetState(SCE_AVS_DEFAULT); + } + } else if (sc.state == SCE_AVS_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_AVS_DEFAULT); + } + } else if (sc.state == SCE_AVS_TRIPLESTRING) { + if (sc.Match("\"\"\"")) { + sc.Forward(); + sc.Forward(); + sc.ForwardSetState(SCE_AVS_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_AVS_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_AVS_NUMBER); + } else if (IsADigit(sc.ch) || (sc.ch == ',' && IsADigit(sc.chNext))) { + sc.Forward(); + sc.SetState(SCE_AVS_NUMBER); + } else if (sc.Match('/', '*')) { + blockCommentLevel = 1; + sc.SetState(SCE_AVS_COMMENTBLOCK); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('[', '*')) { + blockCommentLevel = 1; + sc.SetState(SCE_AVS_COMMENTBLOCKN); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.ch == '#') { + sc.SetState(SCE_AVS_COMMENTLINE); + } else if (sc.ch == '\"') { + if (sc.Match("\"\"\"")) { + sc.SetState(SCE_AVS_TRIPLESTRING); + } else { + sc.SetState(SCE_AVS_STRING); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_AVS_OPERATOR); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_AVS_IDENTIFIER); + } + } + } + + // End of file: complete any pending changeState + if (sc.state == SCE_AVS_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_AVS_KEYWORD); + } else if (filters.InList(s)) { + sc.ChangeState(SCE_AVS_FILTER); + } else if (plugins.InList(s)) { + sc.ChangeState(SCE_AVS_PLUGIN); + } else if (functions.InList(s)) { + sc.ChangeState(SCE_AVS_FUNCTION); + } else if (clipProperties.InList(s)) { + sc.ChangeState(SCE_AVS_CLIPPROP); + } else if (userDefined.InList(s)) { + sc.ChangeState(SCE_AVS_USERDFN); + } + sc.SetState(SCE_AVS_DEFAULT); + } + } + + sc.Complete(); +} + +static void FoldAvsDoc( + Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *[], + Accessor &styler) { + + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && style == SCE_AVS_COMMENTBLOCK) { + if (stylePrev != SCE_AVS_COMMENTBLOCK) { + levelCurrent++; + } else if ((styleNext != SCE_AVS_COMMENTBLOCK) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + + if (foldComment && style == SCE_AVS_COMMENTBLOCKN) { + if (stylePrev != SCE_AVS_COMMENTBLOCKN) { + levelCurrent++; + } else if ((styleNext != SCE_AVS_COMMENTBLOCKN) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + + if (style == SCE_AVS_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const avsWordLists[] = { + "Keywords", + "Filters", + "Plugins", + "Functions", + "Clip properties", + "User defined functions", + 0, +}; + +LexerModule lmAVS(SCLEX_AVS, ColouriseAvsDoc, "avs", FoldAvsDoc, avsWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAbaqus.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAbaqus.cpp new file mode 100644 index 000000000..96a7b886e --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAbaqus.cpp @@ -0,0 +1,603 @@ +// Scintilla source code edit control +/** @file LexABAQUS.cxx + ** Lexer for ABAQUS. Based on the lexer for APDL by Hadar Raz. + ** By Sergio Lucato. + ** Sort of completely rewritten by Gertjan Kloosterman + **/ +// The License.txt file describes the conditions under which this software may be distributed. + +// Code folding copyied and modified from LexBasic.cxx + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsAKeywordChar(const int ch) { + return (ch < 0x80 && (isalnum(ch) || (ch == '_') || (ch == ' '))); +} + +static inline bool IsASetChar(const int ch) { + return (ch < 0x80 && (isalnum(ch) || (ch == '_') || (ch == '.') || (ch == '-'))); +} + +static void ColouriseABAQUSDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList*[] /* *keywordlists[] */, + Accessor &styler) { + enum localState { KW_LINE_KW, KW_LINE_COMMA, KW_LINE_PAR, KW_LINE_EQ, KW_LINE_VAL, \ + DAT_LINE_VAL, DAT_LINE_COMMA,\ + COMMENT_LINE,\ + ST_ERROR, LINE_END } state ; + + // Do not leak onto next line + state = LINE_END ; + initStyle = SCE_ABAQUS_DEFAULT; + StyleContext sc(startPos, length, initStyle, styler); + + // Things are actually quite simple + // we have commentlines + // keywordlines and datalines + // On a data line there will only be colouring of numbers + // a keyword line is constructed as + // *word,[ paramname[=paramvalue]]* + // if the line ends with a , the keyword line continues onto the new line + + for (; sc.More(); sc.Forward()) { + switch ( state ) { + case KW_LINE_KW : + if ( sc.atLineEnd ) { + // finished the line in keyword state, switch to LINE_END + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } else if ( IsAKeywordChar(sc.ch) ) { + // nothing changes + state = KW_LINE_KW ; + } else if ( sc.ch == ',' ) { + // Well well we say a comma, arguments *MUST* follow + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = KW_LINE_COMMA ; + } else { + // Flag an error + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + // Done with processing + break ; + case KW_LINE_COMMA : + // acomma on a keywordline was seen + if ( IsAKeywordChar(sc.ch)) { + sc.SetState(SCE_ABAQUS_ARGUMENT) ; + state = KW_LINE_PAR ; + } else if ( sc.atLineEnd || (sc.ch == ',') ) { + // we remain in keyword mode + state = KW_LINE_COMMA ; + } else if ( sc.ch == ' ' ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = KW_LINE_COMMA ; + } else { + // Anything else constitutes an error + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + break ; + case KW_LINE_PAR : + if ( sc.atLineEnd ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } else if ( IsAKeywordChar(sc.ch) || (sc.ch == '-') ) { + // remain in this state + state = KW_LINE_PAR ; + } else if ( sc.ch == ',' ) { + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = KW_LINE_COMMA ; + } else if ( sc.ch == '=' ) { + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = KW_LINE_EQ ; + } else { + // Anything else constitutes an error + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + break ; + case KW_LINE_EQ : + if ( sc.ch == ' ' ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + // remain in this state + state = KW_LINE_EQ ; + } else if ( IsADigit(sc.ch) || (sc.ch == '-') || (sc.ch == '.' && IsADigit(sc.chNext)) ) { + sc.SetState(SCE_ABAQUS_NUMBER) ; + state = KW_LINE_VAL ; + } else if ( IsAKeywordChar(sc.ch) ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = KW_LINE_VAL ; + } else if ( (sc.ch == '\'') || (sc.ch == '\"') ) { + sc.SetState(SCE_ABAQUS_STRING) ; + state = KW_LINE_VAL ; + } else { + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + break ; + case KW_LINE_VAL : + if ( sc.atLineEnd ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } else if ( IsASetChar(sc.ch) && (sc.state == SCE_ABAQUS_DEFAULT) ) { + // nothing changes + state = KW_LINE_VAL ; + } else if (( (IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') || + ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) && + (sc.state == SCE_ABAQUS_NUMBER)) { + // remain in number mode + state = KW_LINE_VAL ; + } else if (sc.state == SCE_ABAQUS_STRING) { + // accept everything until a closing quote + if ( sc.ch == '\'' || sc.ch == '\"' ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = KW_LINE_VAL ; + } + } else if ( sc.ch == ',' ) { + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = KW_LINE_COMMA ; + } else { + // anything else is an error + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + break ; + case DAT_LINE_VAL : + if ( sc.atLineEnd ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } else if ( IsASetChar(sc.ch) && (sc.state == SCE_ABAQUS_DEFAULT) ) { + // nothing changes + state = DAT_LINE_VAL ; + } else if (( (IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') || + ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) && + (sc.state == SCE_ABAQUS_NUMBER)) { + // remain in number mode + state = DAT_LINE_VAL ; + } else if (sc.state == SCE_ABAQUS_STRING) { + // accept everything until a closing quote + if ( sc.ch == '\'' || sc.ch == '\"' ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = DAT_LINE_VAL ; + } + } else if ( sc.ch == ',' ) { + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = DAT_LINE_COMMA ; + } else { + // anything else is an error + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + break ; + case DAT_LINE_COMMA : + // a comma on a data line was seen + if ( sc.atLineEnd ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } else if ( sc.ch == ' ' ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = DAT_LINE_COMMA ; + } else if (sc.ch == ',') { + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = DAT_LINE_COMMA ; + } else if ( IsADigit(sc.ch) || (sc.ch == '-')|| (sc.ch == '.' && IsADigit(sc.chNext)) ) { + sc.SetState(SCE_ABAQUS_NUMBER) ; + state = DAT_LINE_VAL ; + } else if ( IsAKeywordChar(sc.ch) ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = DAT_LINE_VAL ; + } else if ( (sc.ch == '\'') || (sc.ch == '\"') ) { + sc.SetState(SCE_ABAQUS_STRING) ; + state = DAT_LINE_VAL ; + } else { + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + break ; + case COMMENT_LINE : + if ( sc.atLineEnd ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } + break ; + case ST_ERROR : + if ( sc.atLineEnd ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = LINE_END ; + } + break ; + case LINE_END : + if ( sc.atLineEnd || sc.ch == ' ' ) { + // nothing changes + state = LINE_END ; + } else if ( sc.ch == '*' ) { + if ( sc.chNext == '*' ) { + state = COMMENT_LINE ; + sc.SetState(SCE_ABAQUS_COMMENT) ; + } else { + state = KW_LINE_KW ; + sc.SetState(SCE_ABAQUS_STARCOMMAND) ; + } + } else { + // it must be a data line, things are as if we are in DAT_LINE_COMMA + if ( sc.ch == ',' ) { + sc.SetState(SCE_ABAQUS_OPERATOR) ; + state = DAT_LINE_COMMA ; + } else if ( IsADigit(sc.ch) || (sc.ch == '-')|| (sc.ch == '.' && IsADigit(sc.chNext)) ) { + sc.SetState(SCE_ABAQUS_NUMBER) ; + state = DAT_LINE_VAL ; + } else if ( IsAKeywordChar(sc.ch) ) { + sc.SetState(SCE_ABAQUS_DEFAULT) ; + state = DAT_LINE_VAL ; + } else if ( (sc.ch == '\'') || (sc.ch == '\"') ) { + sc.SetState(SCE_ABAQUS_STRING) ; + state = DAT_LINE_VAL ; + } else { + sc.SetState(SCE_ABAQUS_PROCESSOR) ; + state = ST_ERROR ; + } + } + break ; + } + } + sc.Complete(); +} + +//------------------------------------------------------------------------------ +// This copyied and modified from LexBasic.cxx +//------------------------------------------------------------------------------ + +/* Bits: + * 1 - whitespace + * 2 - operator + * 4 - identifier + * 8 - decimal digit + * 16 - hex digit + * 32 - bin digit + */ +static int character_classification[128] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 10, 6, + 60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0 +}; + +static bool IsSpace(int c) { + return c < 128 && (character_classification[c] & 1); +} + +static bool IsIdentifier(int c) { + return c < 128 && (character_classification[c] & 4); +} + +static int LowerCase(int c) +{ + if (c >= 'A' && c <= 'Z') + return 'a' + c - 'A'; + return c; +} + +static Sci_Position LineEnd(Sci_Position line, Accessor &styler) +{ + const Sci_Position docLines = styler.GetLine(styler.Length() - 1); // Available last line + Sci_Position eol_pos ; + // if the line is the last line, the eol_pos is styler.Length() + // eol will contain a new line, or a virtual new line + if ( docLines == line ) + eol_pos = styler.Length() ; + else + eol_pos = styler.LineStart(line + 1) - 1; + return eol_pos ; +} + +static Sci_Position LineStart(Sci_Position line, Accessor &styler) +{ + return styler.LineStart(line) ; +} + +// LineType +// +// bits determines the line type +// 1 : data line +// 2 : only whitespace +// 3 : data line with only whitespace +// 4 : keyword line +// 5 : block open keyword line +// 6 : block close keyword line +// 7 : keyword line in error +// 8 : comment line +static int LineType(Sci_Position line, Accessor &styler) { + Sci_Position pos = LineStart(line, styler) ; + Sci_Position eol_pos = LineEnd(line, styler) ; + + int c ; + char ch = ' '; + + Sci_Position i = pos ; + while ( i < eol_pos ) { + c = styler.SafeGetCharAt(i); + ch = static_cast(LowerCase(c)); + // We can say something as soon as no whitespace + // was encountered + if ( !IsSpace(c) ) + break ; + i++ ; + } + + if ( i >= eol_pos ) { + // This is a whitespace line, currently + // classifies as data line + return 3 ; + } + + if ( ch != '*' ) { + // This is a data line + return 1 ; + } + + if ( i == eol_pos - 1 ) { + // Only a single *, error but make keyword line + return 4+3 ; + } + + // This means we can have a second character + // if that is also a * this means a comment + // otherwise it is a keyword. + c = styler.SafeGetCharAt(i+1); + ch = static_cast(LowerCase(c)); + if ( ch == '*' ) { + return 8 ; + } + + // At this point we know this is a keyword line + // the character at position i is a * + // it is not a comment line + char word[256] ; + int wlen = 0; + + word[wlen] = '*' ; + wlen++ ; + + i++ ; + while ( (i < eol_pos) && (wlen < 255) ) { + c = styler.SafeGetCharAt(i); + ch = static_cast(LowerCase(c)); + + if ( (!IsSpace(c)) && (!IsIdentifier(c)) ) + break ; + + if ( IsIdentifier(c) ) { + word[wlen] = ch ; + wlen++ ; + } + + i++ ; + } + + word[wlen] = 0 ; + + // Make a comparison + if ( !strcmp(word, "*step") || + !strcmp(word, "*part") || + !strcmp(word, "*instance") || + !strcmp(word, "*assembly")) { + return 4+1 ; + } + + if ( !strcmp(word, "*endstep") || + !strcmp(word, "*endpart") || + !strcmp(word, "*endinstance") || + !strcmp(word, "*endassembly")) { + return 4+2 ; + } + + return 4 ; +} + +static void SafeSetLevel(Sci_Position line, int level, Accessor &styler) +{ + if ( line < 0 ) + return ; + + int mask = ((~SC_FOLDLEVELHEADERFLAG) | (~SC_FOLDLEVELWHITEFLAG)); + + if ( (level & mask) < 0 ) + return ; + + if ( styler.LevelAt(line) != level ) + styler.SetLevel(line, level) ; +} + +static void FoldABAQUSDoc(Sci_PositionU startPos, Sci_Position length, int, +WordList *[], Accessor &styler) { + Sci_Position startLine = styler.GetLine(startPos) ; + Sci_Position endLine = styler.GetLine(startPos+length-1) ; + + // bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + // We want to deal with all the cases + // To know the correct indentlevel, we need to look back to the + // previous command line indentation level + // order of formatting keyline datalines commentlines + Sci_Position beginData = -1 ; + Sci_Position beginComment = -1 ; + Sci_Position prvKeyLine = startLine ; + Sci_Position prvKeyLineTp = 0 ; + + // Scan until we find the previous keyword line + // this will give us the level reference that we need + while ( prvKeyLine > 0 ) { + prvKeyLine-- ; + prvKeyLineTp = LineType(prvKeyLine, styler) ; + if ( prvKeyLineTp & 4 ) + break ; + } + + // Determine the base line level of all lines following + // the previous keyword + // new keyword lines are placed on this level + //if ( prvKeyLineTp & 4 ) { + int level = styler.LevelAt(prvKeyLine) & ~SC_FOLDLEVELHEADERFLAG ; + //} + + // uncomment line below if weird behaviour continues + prvKeyLine = -1 ; + + // Now start scanning over the lines. + for ( Sci_Position line = startLine; line <= endLine; line++ ) { + int lineType = LineType(line, styler) ; + + // Check for comment line + if ( lineType == 8 ) { + if ( beginComment < 0 ) { + beginComment = line ; + } + } + + // Check for data line + if ( (lineType == 1) || (lineType == 3) ) { + if ( beginData < 0 ) { + if ( beginComment >= 0 ) { + beginData = beginComment ; + } else { + beginData = line ; + } + } + beginComment = -1 ; + } + + // Check for keywordline. + // As soon as a keyword line is encountered, we can set the + // levels of everything from the previous keyword line to this one + if ( lineType & 4 ) { + // this is a keyword, we can now place the previous keyword + // all its data lines and the remainder + + // Write comments and data line + if ( beginComment < 0 ) { + beginComment = line ; + } + + if ( beginData < 0 ) { + beginData = beginComment ; + if ( prvKeyLineTp != 5 ) + SafeSetLevel(prvKeyLine, level, styler) ; + else + SafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ; + } else { + SafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ; + } + + int datLevel = level + 1 ; + if ( !(prvKeyLineTp & 4) ) { + datLevel = level ; + } + + for ( Sci_Position ll = beginData; ll < beginComment; ll++ ) + SafeSetLevel(ll, datLevel, styler) ; + + // The keyword we just found is going to be written at another level + // if we have a type 5 and type 6 + if ( prvKeyLineTp == 5 ) { + level += 1 ; + } + + if ( prvKeyLineTp == 6 ) { + level -= 1 ; + if ( level < 0 ) { + level = 0 ; + } + } + + for ( Sci_Position lll = beginComment; lll < line; lll++ ) + SafeSetLevel(lll, level, styler) ; + + // wrap and reset + beginComment = -1 ; + beginData = -1 ; + prvKeyLine = line ; + prvKeyLineTp = lineType ; + } + + } + + if ( beginComment < 0 ) { + beginComment = endLine + 1 ; + } else { + // We need to find out whether this comment block is followed by + // a data line or a keyword line + const Sci_Position docLines = styler.GetLine(styler.Length() - 1); + + for ( Sci_Position line = endLine + 1; line <= docLines; line++ ) { + Sci_Position lineType = LineType(line, styler) ; + + if ( lineType != 8 ) { + if ( !(lineType & 4) ) { + beginComment = endLine + 1 ; + } + break ; + } + } + } + + if ( beginData < 0 ) { + beginData = beginComment ; + if ( prvKeyLineTp != 5 ) + SafeSetLevel(prvKeyLine, level, styler) ; + else + SafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ; + } else { + SafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ; + } + + int datLevel = level + 1 ; + if ( !(prvKeyLineTp & 4) ) { + datLevel = level ; + } + + for ( Sci_Position ll = beginData; ll < beginComment; ll++ ) + SafeSetLevel(ll, datLevel, styler) ; + + if ( prvKeyLineTp == 5 ) { + level += 1 ; + } + + if ( prvKeyLineTp == 6 ) { + level -= 1 ; + } + for ( Sci_Position m = beginComment; m <= endLine; m++ ) + SafeSetLevel(m, level, styler) ; +} + +static const char * const abaqusWordListDesc[] = { + "processors", + "commands", + "slashommands", + "starcommands", + "arguments", + "functions", + 0 +}; + +LexerModule lmAbaqus(SCLEX_ABAQUS, ColouriseABAQUSDoc, "abaqus", FoldABAQUSDoc, abaqusWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAda.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAda.cpp new file mode 100644 index 000000000..9d7f5d0f7 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAda.cpp @@ -0,0 +1,513 @@ +// Scintilla source code edit control +/** @file LexAda.cxx + ** Lexer for Ada 95 + **/ +// Copyright 2002 by Sergey Koshcheyev +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +/* + * Interface + */ + +static void ColouriseDocument( + Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static const char * const adaWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmAda(SCLEX_ADA, ColouriseDocument, "ada", NULL, adaWordListDesc); + +/* + * Implementation + */ + +// Functions that have apostropheStartsAttribute as a parameter set it according to whether +// an apostrophe encountered after processing the current token will start an attribute or +// a character literal. +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseComment(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL); +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWhiteSpace(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); + +static inline bool IsDelimiterCharacter(int ch); +static inline bool IsSeparatorOrDelimiterCharacter(int ch); +static bool IsValidIdentifier(const std::string& identifier); +static bool IsValidNumber(const std::string& number); +static inline bool IsWordStartCharacter(int ch); +static inline bool IsWordCharacter(int ch); + +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_CHARACTER); + + // Skip the apostrophe and one more character (so that '' is shown as non-terminated and ''' + // is handled correctly) + sc.Forward(); + sc.Forward(); + + ColouriseContext(sc, '\'', SCE_ADA_CHARACTEREOL); +} + +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL) { + while (!sc.atLineEnd && !sc.Match(chEnd)) { + sc.Forward(); + } + + if (!sc.atLineEnd) { + sc.ForwardSetState(SCE_ADA_DEFAULT); + } else { + sc.ChangeState(stateEOL); + } +} + +static void ColouriseComment(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + + sc.SetState(SCE_ADA_COMMENTLINE); + + while (!sc.atLineEnd) { + sc.Forward(); + } +} + +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = sc.Match (')'); + sc.SetState(SCE_ADA_DELIMITER); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = false; + + sc.SetState(SCE_ADA_LABEL); + + // Skip "<<" + sc.Forward(); + sc.Forward(); + + std::string identifier; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + identifier += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + // Skip ">>" + if (sc.Match('>', '>')) { + sc.Forward(); + sc.Forward(); + } else { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + // If the name is an invalid identifier or a keyword, then make it invalid label + if (!IsValidIdentifier(identifier) || keywords.InList(identifier.c_str())) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); + +} + +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + std::string number; + sc.SetState(SCE_ADA_NUMBER); + + // Get all characters up to a delimiter or a separator, including points, but excluding + // double points (ranges). + while (!IsSeparatorOrDelimiterCharacter(sc.ch) || (sc.ch == '.' && sc.chNext != '.')) { + number += static_cast(sc.ch); + sc.Forward(); + } + + // Special case: exponent with sign + if ((sc.chPrev == 'e' || sc.chPrev == 'E') && + (sc.ch == '+' || sc.ch == '-')) { + number += static_cast(sc.ch); + sc.Forward (); + + while (!IsSeparatorOrDelimiterCharacter(sc.ch)) { + number += static_cast(sc.ch); + sc.Forward(); + } + } + + if (!IsValidNumber(number)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_STRING); + sc.Forward(); + + ColouriseContext(sc, '"', SCE_ADA_STRINGEOL); +} + +static void ColouriseWhiteSpace(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + sc.SetState(SCE_ADA_DEFAULT); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + sc.SetState(SCE_ADA_IDENTIFIER); + + std::string word; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + word += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + if (!IsValidIdentifier(word)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + + } else if (keywords.InList(word.c_str())) { + sc.ChangeState(SCE_ADA_WORD); + + if (word != "all") { + apostropheStartsAttribute = false; + } + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +// +// ColouriseDocument +// + +static void ColouriseDocument( + Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + + StyleContext sc(startPos, length, initStyle, styler); + + Sci_Position lineCurrent = styler.GetLine(startPos); + bool apostropheStartsAttribute = (styler.GetLineState(lineCurrent) & 1) != 0; + + while (sc.More()) { + if (sc.atLineEnd) { + // Go to the next line + sc.Forward(); + lineCurrent++; + + // Remember the line state for future incremental lexing + styler.SetLineState(lineCurrent, apostropheStartsAttribute); + + // Don't continue any styles on the next line + sc.SetState(SCE_ADA_DEFAULT); + } + + // Comments + if (sc.Match('-', '-')) { + ColouriseComment(sc, apostropheStartsAttribute); + + // Strings + } else if (sc.Match('"')) { + ColouriseString(sc, apostropheStartsAttribute); + + // Characters + } else if (sc.Match('\'') && !apostropheStartsAttribute) { + ColouriseCharacter(sc, apostropheStartsAttribute); + + // Labels + } else if (sc.Match('<', '<')) { + ColouriseLabel(sc, keywords, apostropheStartsAttribute); + + // Whitespace + } else if (IsASpace(sc.ch)) { + ColouriseWhiteSpace(sc, apostropheStartsAttribute); + + // Delimiters + } else if (IsDelimiterCharacter(sc.ch)) { + ColouriseDelimiter(sc, apostropheStartsAttribute); + + // Numbers + } else if (IsADigit(sc.ch) || sc.ch == '#') { + ColouriseNumber(sc, apostropheStartsAttribute); + + // Keywords or identifiers + } else { + ColouriseWord(sc, keywords, apostropheStartsAttribute); + } + } + + sc.Complete(); +} + +static inline bool IsDelimiterCharacter(int ch) { + switch (ch) { + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': + case '/': + case ':': + case ';': + case '<': + case '=': + case '>': + case '|': + return true; + default: + return false; + } +} + +static inline bool IsSeparatorOrDelimiterCharacter(int ch) { + return IsASpace(ch) || IsDelimiterCharacter(ch); +} + +static bool IsValidIdentifier(const std::string& identifier) { + // First character can't be '_', so initialize the flag to true + bool lastWasUnderscore = true; + + size_t length = identifier.length(); + + // Zero-length identifiers are not valid (these can occur inside labels) + if (length == 0) { + return false; + } + + // Check for valid character at the start + if (!IsWordStartCharacter(identifier[0])) { + return false; + } + + // Check for only valid characters and no double underscores + for (size_t i = 0; i < length; i++) { + if (!IsWordCharacter(identifier[i]) || + (identifier[i] == '_' && lastWasUnderscore)) { + return false; + } + lastWasUnderscore = identifier[i] == '_'; + } + + // Check for underscore at the end + if (lastWasUnderscore == true) { + return false; + } + + // All checks passed + return true; +} + +static bool IsValidNumber(const std::string& number) { + size_t hashPos = number.find("#"); + bool seenDot = false; + + size_t i = 0; + size_t length = number.length(); + + if (length == 0) + return false; // Just in case + + // Decimal number + if (hashPos == std::string::npos) { + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (number[i] == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + } else if (IsADigit(number[i])) { + canBeSpecial = true; + } else { + break; + } + } + + if (!canBeSpecial) + return false; + } else { + // Based number + bool canBeSpecial = false; + int base = 0; + + // Parse base + for (; i < length; i++) { + int ch = number[i]; + if (ch == '_') { + if (!canBeSpecial) + return false; + canBeSpecial = false; + } else if (IsADigit(ch)) { + base = base * 10 + (ch - '0'); + if (base > 16) + return false; + canBeSpecial = true; + } else if (ch == '#' && canBeSpecial) { + break; + } else { + return false; + } + } + + if (base < 2) + return false; + if (i == length) + return false; + + i++; // Skip over '#' + + // Parse number + canBeSpecial = false; + + for (; i < length; i++) { + int ch = tolower(number[i]); + + if (ch == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + + } else if (ch == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + + } else if (IsADigit(ch)) { + if (ch - '0' >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch >= 'a' && ch <= 'f') { + if (ch - 'a' + 10 >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch == '#' && canBeSpecial) { + break; + + } else { + return false; + } + } + + if (i == length) { + return false; + } + + i++; + } + + // Exponent (optional) + if (i < length) { + if (number[i] != 'e' && number[i] != 'E') + return false; + + i++; // Move past 'E' + + if (i == length) { + return false; + } + + if (number[i] == '+') + i++; + else if (number[i] == '-') { + if (seenDot) { + i++; + } else { + return false; // Integer literals should not have negative exponents + } + } + + if (i == length) { + return false; + } + + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (IsADigit(number[i])) { + canBeSpecial = true; + } else { + return false; + } + } + + if (!canBeSpecial) + return false; + } + + // if i == length, number was parsed successfully. + return i == length; +} + +static inline bool IsWordCharacter(int ch) { + return IsWordStartCharacter(ch) || IsADigit(ch); +} + +static inline bool IsWordStartCharacter(int ch) { + return (IsASCII(ch) && isalpha(ch)) || ch == '_'; +} diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAsm.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAsm.cpp new file mode 100644 index 000000000..bd82b1621 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAsm.cpp @@ -0,0 +1,466 @@ +// Scintilla source code edit control +/** @file LexAsm.cxx + ** Lexer for Assembler, just for the MASM syntax + ** Written by The Black Horus + ** Enhancements and NASM stuff by Kein-Hong Man, 2003-10 + ** SCE_ASM_COMMENTBLOCK and SCE_ASM_CHARACTER are for future GNU as colouring + ** Converted to lexer object and added further folding features/properties by "Udo Lechner" + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || + ch == '_' || ch == '?'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || + ch == '%' || ch == '@' || ch == '$' || ch == '?'); +} + +static inline bool IsAsmOperator(const int ch) { + if ((ch < 0x80) && (isalnum(ch))) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '%' || ch == ':') + return true; + return false; +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_ASM_COMMENTDIRECTIVE || style == SCE_ASM_COMMENTBLOCK; +} + +static inline int LowerCase(int c) { + if (c >= 'A' && c <= 'Z') + return 'a' + c - 'A'; + return c; +} + +// An individual named option for use in an OptionSet + +// Options used for LexerAsm +struct OptionsAsm { + std::string delimiter; + bool fold; + bool foldSyntaxBased; + bool foldCommentMultiline; + bool foldCommentExplicit; + std::string foldExplicitStart; + std::string foldExplicitEnd; + bool foldExplicitAnywhere; + bool foldCompact; + OptionsAsm() { + delimiter = ""; + fold = false; + foldSyntaxBased = true; + foldCommentMultiline = false; + foldCommentExplicit = false; + foldExplicitStart = ""; + foldExplicitEnd = ""; + foldExplicitAnywhere = false; + foldCompact = true; + } +}; + +static const char * const asmWordListDesc[] = { + "CPU instructions", + "FPU instructions", + "Registers", + "Directives", + "Directive operands", + "Extended instructions", + "Directives4Foldstart", + "Directives4Foldend", + 0 +}; + +struct OptionSetAsm : public OptionSet { + OptionSetAsm() { + DefineProperty("lexer.asm.comment.delimiter", &OptionsAsm::delimiter, + "Character used for COMMENT directive's delimiter, replacing the standard \"~\"."); + + DefineProperty("fold", &OptionsAsm::fold); + + DefineProperty("fold.asm.syntax.based", &OptionsAsm::foldSyntaxBased, + "Set this property to 0 to disable syntax based folding."); + + DefineProperty("fold.asm.comment.multiline", &OptionsAsm::foldCommentMultiline, + "Set this property to 1 to enable folding multi-line comments."); + + DefineProperty("fold.asm.comment.explicit", &OptionsAsm::foldCommentExplicit, + "This option enables folding explicit fold points when using the Asm lexer. " + "Explicit fold points allows adding extra folding by placing a ;{ comment at the start and a ;} " + "at the end of a section that should fold."); + + DefineProperty("fold.asm.explicit.start", &OptionsAsm::foldExplicitStart, + "The string to use for explicit fold start points, replacing the standard ;{."); + + DefineProperty("fold.asm.explicit.end", &OptionsAsm::foldExplicitEnd, + "The string to use for explicit fold end points, replacing the standard ;}."); + + DefineProperty("fold.asm.explicit.anywhere", &OptionsAsm::foldExplicitAnywhere, + "Set this property to 1 to enable explicit fold points anywhere, not just in line comments."); + + DefineProperty("fold.compact", &OptionsAsm::foldCompact); + + DefineWordListSets(asmWordListDesc); + } +}; + +class LexerAsm : public DefaultLexer { + WordList cpuInstruction; + WordList mathInstruction; + WordList registers; + WordList directive; + WordList directiveOperand; + WordList extInstruction; + WordList directives4foldstart; + WordList directives4foldend; + OptionsAsm options; + OptionSetAsm osAsm; + int commentChar; +public: + LexerAsm(int commentChar_) { + commentChar = commentChar_; + } + virtual ~LexerAsm() { + } + void SCI_METHOD Release() override { + delete this; + } + int SCI_METHOD Version() const override { + return lvOriginal; + } + const char * SCI_METHOD PropertyNames() override { + return osAsm.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osAsm.PropertyType(name); + } + const char * SCI_METHOD DescribeProperty(const char *name) override { + return osAsm.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char * SCI_METHOD DescribeWordListSets() override { + return osAsm.DescribeWordListSets(); + } + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + + static ILexer *LexerFactoryAsm() { + return new LexerAsm(';'); + } + + static ILexer *LexerFactoryAs() { + return new LexerAsm('#'); + } +}; + +Sci_Position SCI_METHOD LexerAsm::PropertySet(const char *key, const char *val) { + if (osAsm.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerAsm::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &cpuInstruction; + break; + case 1: + wordListN = &mathInstruction; + break; + case 2: + wordListN = ®isters; + break; + case 3: + wordListN = &directive; + break; + case 4: + wordListN = &directiveOperand; + break; + case 5: + wordListN = &extInstruction; + break; + case 6: + wordListN = &directives4foldstart; + break; + case 7: + wordListN = &directives4foldend; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +void SCI_METHOD LexerAsm::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + LexAccessor styler(pAccess); + + // Do not leak onto next line + if (initStyle == SCE_ASM_STRINGEOL) + initStyle = SCE_ASM_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + + // Prevent SCE_ASM_STRINGEOL from leaking back to previous line + if (sc.atLineStart && (sc.state == SCE_ASM_STRING)) { + sc.SetState(SCE_ASM_STRING); + } else if (sc.atLineStart && (sc.state == SCE_ASM_CHARACTER)) { + sc.SetState(SCE_ASM_CHARACTER); + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ASM_OPERATOR) { + if (!IsAsmOperator(sc.ch)) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + bool IsDirective = false; + + if (cpuInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_CPUINSTRUCTION); + } else if (mathInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_MATHINSTRUCTION); + } else if (registers.InList(s)) { + sc.ChangeState(SCE_ASM_REGISTER); + } else if (directive.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVE); + IsDirective = true; + } else if (directiveOperand.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVEOPERAND); + } else if (extInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_EXTINSTRUCTION); + } + sc.SetState(SCE_ASM_DEFAULT); + if (IsDirective && !strcmp(s, "comment")) { + char delimiter = options.delimiter.empty() ? '~' : options.delimiter.c_str()[0]; + while (IsASpaceOrTab(sc.ch) && !sc.atLineEnd) { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + if (sc.ch == delimiter) { + sc.SetState(SCE_ASM_COMMENTDIRECTIVE); + } + } + } + } else if (sc.state == SCE_ASM_COMMENTDIRECTIVE) { + char delimiter = options.delimiter.empty() ? '~' : options.delimiter.c_str()[0]; + if (sc.ch == delimiter) { + while (!sc.atLineEnd) { + sc.Forward(); + } + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_ASM_STRINGEOL); + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_CHARACTER) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_ASM_STRINGEOL); + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ASM_DEFAULT) { + if (sc.ch == commentChar){ + sc.SetState(SCE_ASM_COMMENT); + } else if (IsASCII(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && IsASCII(sc.chNext) && isdigit(sc.chNext)))) { + sc.SetState(SCE_ASM_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_ASM_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ASM_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_ASM_CHARACTER); + } else if (IsAsmOperator(sc.ch)) { + sc.SetState(SCE_ASM_OPERATOR); + } + } + + } + sc.Complete(); +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "else". + +void SCI_METHOD LexerAsm::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + + if (!options.fold) + return; + + LexAccessor styler(pAccess); + + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + char word[100]; + int wordlen = 0; + const bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty(); + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (options.foldCommentMultiline && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (options.foldCommentExplicit && ((style == SCE_ASM_COMMENT) || options.foldExplicitAnywhere)) { + if (userDefinedFoldMarkers) { + if (styler.Match(i, options.foldExplicitStart.c_str())) { + levelNext++; + } else if (styler.Match(i, options.foldExplicitEnd.c_str())) { + levelNext--; + } + } else { + if (ch == ';') { + if (chNext == '{') { + levelNext++; + } else if (chNext == '}') { + levelNext--; + } + } + } + } + if (options.foldSyntaxBased && (style == SCE_ASM_DIRECTIVE)) { + word[wordlen++] = static_cast(LowerCase(ch)); + if (wordlen == 100) { // prevent overflow + word[0] = '\0'; + wordlen = 1; + } + if (styleNext != SCE_ASM_DIRECTIVE) { // reading directive ready + word[wordlen] = '\0'; + wordlen = 0; + if (directives4foldstart.InList(word)) { + levelNext++; + } else if (directives4foldend.InList(word)){ + levelNext--; + } + } + } + if (!IsASpace(ch)) + visibleChars++; + if (atEOL || (i == endPos-1)) { + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && options.foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + if (atEOL && (i == static_cast(styler.Length() - 1))) { + // There is an empty line at end of file so give it same level and empty + styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG); + } + visibleChars = 0; + } + } +} + +LexerModule lmAsm(SCLEX_ASM, LexerAsm::LexerFactoryAsm, "asm", asmWordListDesc); +LexerModule lmAs(SCLEX_AS, LexerAsm::LexerFactoryAs, "as", asmWordListDesc); + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexAsn1.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexAsn1.cpp new file mode 100644 index 000000000..0ec2a0636 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexAsn1.cpp @@ -0,0 +1,186 @@ +// Scintilla source code edit control +/** @file LexAsn1.cxx + ** Lexer for ASN.1 + **/ +// Copyright 2004 by Herr Pfarrer rpfarrer yahoo de +// Last Updated: 20/07/2004 +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +// Some char test functions +static bool isAsn1Number(int ch) +{ + return (ch >= '0' && ch <= '9'); +} + +static bool isAsn1Letter(int ch) +{ + return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool isAsn1Char(int ch) +{ + return (ch == '-' ) || isAsn1Number(ch) || isAsn1Letter (ch); +} + +// +// Function determining the color of a given code portion +// Based on a "state" +// +static void ColouriseAsn1Doc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordLists[], Accessor &styler) +{ + // The keywords + WordList &Keywords = *keywordLists[0]; + WordList &Attributes = *keywordLists[1]; + WordList &Descriptors = *keywordLists[2]; + WordList &Types = *keywordLists[3]; + + // Parse the whole buffer character by character using StyleContext + StyleContext sc(startPos, length, initStyle, styler); + for (; sc.More(); sc.Forward()) + { + // The state engine + switch (sc.state) + { + case SCE_ASN1_DEFAULT: // Plain characters +asn1_default: + if (sc.ch == '-' && sc.chNext == '-') + // A comment begins here + sc.SetState(SCE_ASN1_COMMENT); + else if (sc.ch == '"') + // A string begins here + sc.SetState(SCE_ASN1_STRING); + else if (isAsn1Number (sc.ch)) + // A number starts here (identifier should start with a letter in ASN.1) + sc.SetState(SCE_ASN1_SCALAR); + else if (isAsn1Char (sc.ch)) + // An identifier starts here (identifier always start with a letter) + sc.SetState(SCE_ASN1_IDENTIFIER); + else if (sc.ch == ':') + // A ::= operator starts here + sc.SetState(SCE_ASN1_OPERATOR); + break; + case SCE_ASN1_COMMENT: // A comment + if (sc.ch == '\r' || sc.ch == '\n') + // A comment ends here + sc.SetState(SCE_ASN1_DEFAULT); + break; + case SCE_ASN1_IDENTIFIER: // An identifier (keyword, attribute, descriptor or type) + if (!isAsn1Char (sc.ch)) + { + // The end of identifier is here: we can look for it in lists by now and change its state + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (Keywords.InList(s)) + // It's a keyword, change its state + sc.ChangeState(SCE_ASN1_KEYWORD); + else if (Attributes.InList(s)) + // It's an attribute, change its state + sc.ChangeState(SCE_ASN1_ATTRIBUTE); + else if (Descriptors.InList(s)) + // It's a descriptor, change its state + sc.ChangeState(SCE_ASN1_DESCRIPTOR); + else if (Types.InList(s)) + // It's a type, change its state + sc.ChangeState(SCE_ASN1_TYPE); + + // Set to default now + sc.SetState(SCE_ASN1_DEFAULT); + } + break; + case SCE_ASN1_STRING: // A string delimited by "" + if (sc.ch == '"') + { + // A string ends here + sc.ForwardSetState(SCE_ASN1_DEFAULT); + + // To correctly manage a char sticking to the string quote + goto asn1_default; + } + break; + case SCE_ASN1_SCALAR: // A plain number + if (!isAsn1Number (sc.ch)) + // A number ends here + sc.SetState(SCE_ASN1_DEFAULT); + break; + case SCE_ASN1_OPERATOR: // The affectation operator ::= and wath follows (eg: ::= { org 6 } OID or ::= 12 trap) + if (sc.ch == '{') + { + // An OID definition starts here: enter the sub loop + for (; sc.More(); sc.Forward()) + { + if (isAsn1Number (sc.ch) && (!isAsn1Char (sc.chPrev) || isAsn1Number (sc.chPrev))) + // The OID number is highlighted + sc.SetState(SCE_ASN1_OID); + else if (isAsn1Char (sc.ch)) + // The OID parent identifier is plain + sc.SetState(SCE_ASN1_IDENTIFIER); + else + sc.SetState(SCE_ASN1_DEFAULT); + + if (sc.ch == '}') + // Here ends the OID and the operator sub loop: go back to main loop + break; + } + } + else if (isAsn1Number (sc.ch)) + { + // A trap number definition starts here: enter the sub loop + for (; sc.More(); sc.Forward()) + { + if (isAsn1Number (sc.ch)) + // The trap number is highlighted + sc.SetState(SCE_ASN1_OID); + else + { + // The number ends here: go back to main loop + sc.SetState(SCE_ASN1_DEFAULT); + break; + } + } + } + else if (sc.ch != ':' && sc.ch != '=' && sc.ch != ' ') + // The operator doesn't imply an OID definition nor a trap, back to main loop + goto asn1_default; // To be sure to handle actually the state change + break; + } + } + sc.Complete(); +} + +static void FoldAsn1Doc(Sci_PositionU, Sci_Position, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if( styler.GetPropertyInt("fold") == 0 ) + return; + + // No folding implemented: doesn't make sense for ASN.1 +} + +static const char * const asn1WordLists[] = { + "Keywords", + "Attributes", + "Descriptors", + "Types", + 0, }; + + +LexerModule lmAsn1(SCLEX_ASN1, ColouriseAsn1Doc, "asn1", FoldAsn1Doc, asn1WordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexBaan.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexBaan.cpp new file mode 100644 index 000000000..fa8b46302 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexBaan.cpp @@ -0,0 +1,988 @@ +// Scintilla source code edit control +/** @file LexBaan.cxx +** Lexer for Baan. +** Based heavily on LexCPP.cxx +**/ +// Copyright 2001- by Vamsi Potluru & Praveen Ambekar +// Maintainer Email: oirfeodent@yahoo.co.in +// The License.txt file describes the conditions under which this software may be distributed. + +// C standard library +#include +#include + +// C++ wrappers of C standard library +#include + +// C++ standard library +#include +#include + +// Scintilla headers + +// Non-platform-specific headers + +// include +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +// lexlib +#include "WordList.h" +#include "LexAccessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +namespace { +// Use an unnamed namespace to protect the functions and classes from name conflicts + +// Options used for LexerBaan +struct OptionsBaan { + bool fold; + bool foldComment; + bool foldPreprocessor; + bool foldCompact; + bool baanFoldSyntaxBased; + bool baanFoldKeywordsBased; + bool baanFoldSections; + bool baanFoldInnerLevel; + bool baanStylingWithinPreprocessor; + OptionsBaan() { + fold = false; + foldComment = false; + foldPreprocessor = false; + foldCompact = false; + baanFoldSyntaxBased = false; + baanFoldKeywordsBased = false; + baanFoldSections = false; + baanFoldInnerLevel = false; + baanStylingWithinPreprocessor = false; + } +}; + +const char *const baanWordLists[] = { + "Baan & BaanSQL Reserved Keywords ", + "Baan Standard functions", + "Baan Functions Abridged", + "Baan Main Sections ", + "Baan Sub Sections", + "PreDefined Variables", + "PreDefined Attributes", + "Enumerates", + 0, +}; + +struct OptionSetBaan : public OptionSet { + OptionSetBaan() { + DefineProperty("fold", &OptionsBaan::fold); + + DefineProperty("fold.comment", &OptionsBaan::foldComment); + + DefineProperty("fold.preprocessor", &OptionsBaan::foldPreprocessor); + + DefineProperty("fold.compact", &OptionsBaan::foldCompact); + + DefineProperty("fold.baan.syntax.based", &OptionsBaan::baanFoldSyntaxBased, + "Set this property to 0 to disable syntax based folding, which is folding based on '{' & '('."); + + DefineProperty("fold.baan.keywords.based", &OptionsBaan::baanFoldKeywordsBased, + "Set this property to 0 to disable keywords based folding, which is folding based on " + " for, if, on (case), repeat, select, while and fold ends based on endfor, endif, endcase, until, endselect, endwhile respectively." + "Also folds declarations which are grouped together."); + + DefineProperty("fold.baan.sections", &OptionsBaan::baanFoldSections, + "Set this property to 0 to disable folding of Main Sections as well as Sub Sections."); + + DefineProperty("fold.baan.inner.level", &OptionsBaan::baanFoldInnerLevel, + "Set this property to 1 to enable folding of inner levels of select statements." + "Disabled by default. case and if statements are also eligible" ); + + DefineProperty("lexer.baan.styling.within.preprocessor", &OptionsBaan::baanStylingWithinPreprocessor, + "For Baan code, determines whether all preprocessor code is styled in the " + "preprocessor style (0, the default) or only from the initial # to the end " + "of the command word(1)."); + + DefineWordListSets(baanWordLists); + } +}; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$'); +} + +static inline bool IsAnOperator(int ch) { + if (IsAlphaNumeric(ch)) + return false; + if (ch == '#' || ch == '^' || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '"' || ch == '~' || + ch == '\\') + return true; + return false; +} + +static inline int IsAnyOtherIdentifier(char *s, Sci_Position sLength) { + + /* IsAnyOtherIdentifier uses standard templates used in baan. + The matching template is shown as comments just above the return condition. + ^ - refers to any character [a-z]. + # - refers to any number [0-9]. + Other characters shown are compared as is. + Tried implementing with Regex... it was too complicated for me. + Any other implementation suggestion welcome. + */ + switch (sLength) { + case 8: + if (isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) { + //^^^^^### + return(SCE_BAAN_TABLEDEF); + } + break; + case 9: + if (s[0] == 't' && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && isalpha(s[5]) && IsADigit(s[6]) && IsADigit(s[7]) && IsADigit(s[8])) { + //t^^^^^### + return(SCE_BAAN_TABLEDEF); + } + else if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) { + //^^^^^###. + return(SCE_BAAN_TABLESQL); + } + break; + case 13: + if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) { + //^^^^^###.**** + return(SCE_BAAN_TABLESQL); + } + else if (s[0] == 'r' && s[1] == 'c' && s[2] == 'd' && s[3] == '.' && s[4] == 't' && isalpha(s[5]) && isalpha(s[6]) && isalpha(s[7]) && isalpha(s[8]) && isalpha(s[9]) && IsADigit(s[10]) && IsADigit(s[11]) && IsADigit(s[12])) { + //rcd.t^^^^^### + return(SCE_BAAN_TABLEDEF); + } + break; + case 14: + case 15: + if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) { + if (s[13] != ':') { + //^^^^^###.****** + return(SCE_BAAN_TABLESQL); + } + } + break; + case 16: + case 17: + if (s[8] == '.' && s[9] == '_' && s[10] == 'i' && s[11] == 'n' && s[12] == 'd' && s[13] == 'e' && s[14] == 'x' && IsADigit(s[15]) && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) { + //^^^^^###._index## + return(SCE_BAAN_TABLEDEF); + } + else if (s[8] == '.' && s[9] == '_' && s[10] == 'c' && s[11] == 'o' && s[12] == 'm' && s[13] == 'p' && s[14] == 'n' && s[15] == 'r' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) { + //^^^^^###._compnr + return(SCE_BAAN_TABLEDEF); + } + break; + default: + break; + } + if (sLength > 14 && s[5] == '.' && s[6] == 'd' && s[7] == 'l' && s[8] == 'l' && s[13] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[9]) && IsADigit(s[10]) && IsADigit(s[11]) && IsADigit(s[12])) { + //^^^^^.dll####. + return(SCE_BAAN_FUNCTION); + } + else if (sLength > 15 && s[2] == 'i' && s[3] == 'n' && s[4] == 't' && s[5] == '.' && s[6] == 'd' && s[7] == 'l' && s[8] == 'l' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[9]) && isalpha(s[10]) && isalpha(s[11]) && isalpha(s[12]) && isalpha(s[13])) { + //^^int.dll^^^^^. + return(SCE_BAAN_FUNCTION); + } + else if (sLength > 11 && s[0] == 'i' && s[10] == '.' && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && isalpha(s[5]) && IsADigit(s[6]) && IsADigit(s[7]) && IsADigit(s[8]) && IsADigit(s[9])) { + //i^^^^^####. + return(SCE_BAAN_FUNCTION); + } + + return(SCE_BAAN_DEFAULT); +} + +static bool IsCommentLine(Sci_Position line, LexAccessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (ch == '|' && style == SCE_BAAN_COMMENT) + return true; + else if (!IsASpaceOrTab(ch)) + return false; + } + return false; +} + +static bool IsPreProcLine(Sci_Position line, LexAccessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (ch == '#' && style == SCE_BAAN_PREPROCESSOR) { + if (styler.Match(i, "#elif") || styler.Match(i, "#else") || styler.Match(i, "#endif") + || styler.Match(i, "#if") || styler.Match(i, "#ifdef") || styler.Match(i, "#ifndef")) + // Above PreProcessors has a seperate fold mechanism. + return false; + else + return true; + } + else if (ch == '^') + return true; + else if (!IsASpaceOrTab(ch)) + return false; + } + return false; +} + +static int mainOrSubSectionLine(Sci_Position line, LexAccessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (style == SCE_BAAN_WORD5 || style == SCE_BAAN_WORD4) + return style; + else if (IsASpaceOrTab(ch)) + continue; + else + break; + } + return 0; +} + +static bool priorSectionIsSubSection(Sci_Position line, LexAccessor &styler){ + while (line > 0) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (style == SCE_BAAN_WORD4) + return true; + else if (style == SCE_BAAN_WORD5) + return false; + else if (IsASpaceOrTab(ch)) + continue; + else + break; + } + line--; + } + return false; +} + +static bool nextSectionIsSubSection(Sci_Position line, LexAccessor &styler) { + while (line > 0) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (style == SCE_BAAN_WORD4) + return true; + else if (style == SCE_BAAN_WORD5) + return false; + else if (IsASpaceOrTab(ch)) + continue; + else + break; + } + line++; + } + return false; +} + +static bool IsDeclarationLine(Sci_Position line, LexAccessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (style == SCE_BAAN_WORD) { + if (styler.Match(i, "table") || styler.Match(i, "extern") || styler.Match(i, "long") + || styler.Match(i, "double") || styler.Match(i, "boolean") || styler.Match(i, "string") + || styler.Match(i, "domain")) { + for (Sci_Position j = eol_pos; j > pos; j--) { + int styleFromEnd = styler.StyleAt(j); + if (styleFromEnd == SCE_BAAN_COMMENT) + continue; + else if (IsASpace(styler[j])) + continue; + else if (styler[j] != ',') + //Above conditions ensures, Declaration is not part of any function parameters. + return true; + else + return false; + } + } + else + return false; + } + else if (!IsASpaceOrTab(ch)) + return false; + } + return false; +} + +static bool IsInnerLevelFold(Sci_Position line, LexAccessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + int style = styler.StyleAt(i); + if (style == SCE_BAAN_WORD && (styler.Match(i, "else" ) || styler.Match(i, "case") + || styler.Match(i, "default") || styler.Match(i, "selectdo") || styler.Match(i, "selecteos") + || styler.Match(i, "selectempty") || styler.Match(i, "selecterror"))) + return true; + else if (IsASpaceOrTab(ch)) + continue; + else + return false; + } + return false; +} + +static inline bool wordInArray(const std::string& value, std::string *array, int length) +{ + for (int i = 0; i < length; i++) + { + if (value == array[i]) + { + return true; + } + } + + return false; +} + +class WordListAbridged : public WordList { +public: + WordListAbridged() { + kwAbridged = false; + kwHasSection = false; + }; + ~WordListAbridged() { + Clear(); + }; + bool kwAbridged; + bool kwHasSection; + bool Contains(const char *s) { + return kwAbridged ? InListAbridged(s, '~') : InList(s); + }; +}; + +} + +class LexerBaan : public DefaultLexer { + WordListAbridged keywords; + WordListAbridged keywords2; + WordListAbridged keywords3; + WordListAbridged keywords4; + WordListAbridged keywords5; + WordListAbridged keywords6; + WordListAbridged keywords7; + WordListAbridged keywords8; + WordListAbridged keywords9; + OptionsBaan options; + OptionSetBaan osBaan; +public: + LexerBaan() { + } + + virtual ~LexerBaan() { + } + + int SCI_METHOD Version() const override { + return lvOriginal; + } + + void SCI_METHOD Release() override { + delete this; + } + + const char * SCI_METHOD PropertyNames() override { + return osBaan.PropertyNames(); + } + + int SCI_METHOD PropertyType(const char * name) override { + return osBaan.PropertyType(name); + } + + const char * SCI_METHOD DescribeProperty(const char * name) override { + return osBaan.DescribeProperty(name); + } + + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + + const char * SCI_METHOD DescribeWordListSets() override { + return osBaan.DescribeWordListSets(); + } + + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return NULL; + } + + static ILexer * LexerFactoryBaan() { + return new LexerBaan(); + } +}; + +Sci_Position SCI_METHOD LexerBaan::PropertySet(const char *key, const char *val) { + if (osBaan.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerBaan::WordListSet(int n, const char *wl) { + WordListAbridged *WordListAbridgedN = 0; + switch (n) { + case 0: + WordListAbridgedN = &keywords; + break; + case 1: + WordListAbridgedN = &keywords2; + break; + case 2: + WordListAbridgedN = &keywords3; + break; + case 3: + WordListAbridgedN = &keywords4; + break; + case 4: + WordListAbridgedN = &keywords5; + break; + case 5: + WordListAbridgedN = &keywords6; + break; + case 6: + WordListAbridgedN = &keywords7; + break; + case 7: + WordListAbridgedN = &keywords8; + break; + case 8: + WordListAbridgedN = &keywords9; + break; + } + Sci_Position firstModification = -1; + if (WordListAbridgedN) { + WordListAbridged wlNew; + wlNew.Set(wl); + if (*WordListAbridgedN != wlNew) { + WordListAbridgedN->Set(wl); + WordListAbridgedN->kwAbridged = strchr(wl, '~') != NULL; + WordListAbridgedN->kwHasSection = strchr(wl, ':') != NULL; + + firstModification = 0; + } + } + return firstModification; +} + +void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + + if (initStyle == SCE_BAAN_STRINGEOL) // Does not leak onto next line + initStyle = SCE_BAAN_DEFAULT; + + int visibleChars = 0; + bool lineHasDomain = false; + bool lineHasFunction = false; + bool lineHasPreProc = false; + bool lineIgnoreString = false; + bool lineHasDefines = false; + bool numberIsHex = false; + char word[1000]; + int wordlen = 0; + + std::string preProcessorTags[13] = { "#context_off", "#context_on", + "#define", "#elif", "#else", "#endif", + "#ident", "#if", "#ifdef", "#ifndef", + "#include", "#pragma", "#undef" }; + LexAccessor styler(pAccess); + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_BAAN_OPERATOR: + sc.SetState(SCE_BAAN_DEFAULT); + break; + case SCE_BAAN_NUMBER: + if (IsASpaceOrTab(sc.ch) || sc.ch == '\r' || sc.ch == '\n' || IsAnOperator(sc.ch)) { + sc.SetState(SCE_BAAN_DEFAULT); + } + else if ((numberIsHex && !(MakeLowerCase(sc.ch) == 'x' || MakeLowerCase(sc.ch) == 'e' || + IsADigit(sc.ch, 16) || sc.ch == '.' || sc.ch == '-' || sc.ch == '+')) || + (!numberIsHex && !(MakeLowerCase(sc.ch) == 'e' || IsADigit(sc.ch) + || sc.ch == '.' || sc.ch == '-' || sc.ch == '+'))) { + // check '-' for possible -10e-5. Add '+' as well. + numberIsHex = false; + sc.ChangeState(SCE_BAAN_IDENTIFIER); + sc.SetState(SCE_BAAN_DEFAULT); + } + break; + case SCE_BAAN_IDENTIFIER: + if (!IsAWordChar(sc.ch)) { + char s[1000]; + char s1[1000]; + sc.GetCurrentLowered(s, sizeof(s)); + if (sc.ch == ':') { + memcpy(s1, s, sizeof(s)); + s1[sc.LengthCurrent()] = sc.ch; + s1[sc.LengthCurrent() + 1] = '\0'; + } + if ((keywords.kwHasSection && (sc.ch == ':')) ? keywords.Contains(s1) : keywords.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD); + if (0 == strcmp(s, "domain")) { + lineHasDomain = true; + } + else if (0 == strcmp(s, "function")) { + lineHasFunction = true; + } + } + else if (lineHasDomain) { + sc.ChangeState(SCE_BAAN_DOMDEF); + lineHasDomain = false; + } + else if (lineHasFunction) { + sc.ChangeState(SCE_BAAN_FUNCDEF); + lineHasFunction = false; + } + else if ((keywords2.kwHasSection && (sc.ch == ':')) ? keywords2.Contains(s1) : keywords2.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD2); + } + else if ((keywords3.kwHasSection && (sc.ch == ':')) ? keywords3.Contains(s1) : keywords3.Contains(s)) { + if (sc.ch == '(') + sc.ChangeState(SCE_BAAN_WORD3); + else + sc.ChangeState(SCE_BAAN_IDENTIFIER); + } + else if ((keywords4.kwHasSection && (sc.ch == ':')) ? keywords4.Contains(s1) : keywords4.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD4); + } + else if ((keywords5.kwHasSection && (sc.ch == ':')) ? keywords5.Contains(s1) : keywords5.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD5); + } + else if ((keywords6.kwHasSection && (sc.ch == ':')) ? keywords6.Contains(s1) : keywords6.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD6); + } + else if ((keywords7.kwHasSection && (sc.ch == ':')) ? keywords7.Contains(s1) : keywords7.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD7); + } + else if ((keywords8.kwHasSection && (sc.ch == ':')) ? keywords8.Contains(s1) : keywords8.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD8); + } + else if ((keywords9.kwHasSection && (sc.ch == ':')) ? keywords9.Contains(s1) : keywords9.Contains(s)) { + sc.ChangeState(SCE_BAAN_WORD9); + } + else if (lineHasPreProc) { + sc.ChangeState(SCE_BAAN_OBJECTDEF); + lineHasPreProc = false; + } + else if (lineHasDefines) { + sc.ChangeState(SCE_BAAN_DEFINEDEF); + lineHasDefines = false; + } + else { + int state = IsAnyOtherIdentifier(s, sc.LengthCurrent()); + if (state > 0) { + sc.ChangeState(state); + } + } + sc.SetState(SCE_BAAN_DEFAULT); + } + break; + case SCE_BAAN_PREPROCESSOR: + if (options.baanStylingWithinPreprocessor) { + if (IsASpace(sc.ch) || IsAnOperator(sc.ch)) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } + else { + if (sc.atLineEnd && (sc.chNext != '^')) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } + break; + case SCE_BAAN_COMMENT: + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_BAAN_DEFAULT); + } + break; + case SCE_BAAN_COMMENTDOC: + if (sc.MatchIgnoreCase("enddllusage")) { + for (unsigned int i = 0; i < 10; i++) { + sc.Forward(); + } + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } + else if (sc.MatchIgnoreCase("endfunctionusage")) { + for (unsigned int i = 0; i < 15; i++) { + sc.Forward(); + } + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } + break; + case SCE_BAAN_STRING: + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } + else if ((sc.atLineEnd) && (sc.chNext != '^')) { + sc.ChangeState(SCE_BAAN_STRINGEOL); + sc.ForwardSetState(SCE_BAAN_DEFAULT); + visibleChars = 0; + } + break; + } + + // Determine if a new state should be entered. + if (sc.state == SCE_BAAN_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)) + || ((sc.ch == '-' || sc.ch == '+') && (IsADigit(sc.chNext) || sc.chNext == '.')) + || (MakeLowerCase(sc.ch) == 'e' && (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-'))) { + if ((sc.ch == '0' && MakeLowerCase(sc.chNext) == 'x') || + ((sc.ch == '-' || sc.ch == '+') && sc.chNext == '0' && MakeLowerCase(sc.GetRelativeCharacter(2)) == 'x')){ + numberIsHex = true; + } + sc.SetState(SCE_BAAN_NUMBER); + } + else if (sc.MatchIgnoreCase("dllusage") || sc.MatchIgnoreCase("functionusage")) { + sc.SetState(SCE_BAAN_COMMENTDOC); + do { + sc.Forward(); + } while ((!sc.atLineEnd) && sc.More()); + } + else if (iswordstart(sc.ch)) { + sc.SetState(SCE_BAAN_IDENTIFIER); + } + else if (sc.Match('|')) { + sc.SetState(SCE_BAAN_COMMENT); + } + else if (sc.ch == '\"' && !(lineIgnoreString)) { + sc.SetState(SCE_BAAN_STRING); + } + else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_BAAN_PREPROCESSOR); + word[0] = '\0'; + wordlen = 0; + while (sc.More() && !(IsASpace(sc.chNext) || IsAnOperator(sc.chNext))) { + sc.Forward(); + wordlen++; + } + sc.GetCurrentLowered(word, sizeof(word)); + if (!sc.atLineEnd) { + word[wordlen++] = sc.ch; + word[wordlen++] = '\0'; + } + if (!wordInArray(word, preProcessorTags, 13)) + // Colorise only preprocessor built in Baan. + sc.ChangeState(SCE_BAAN_IDENTIFIER); + if (strcmp(word, "#pragma") == 0 || strcmp(word, "#include") == 0) { + lineHasPreProc = true; + lineIgnoreString = true; + } + else if (strcmp(word, "#define") == 0 || strcmp(word, "#undef") == 0 || + strcmp(word, "#ifdef") == 0 || strcmp(word, "#if") == 0 || strcmp(word, "#ifndef") == 0) { + lineHasDefines = true; + lineIgnoreString = false; + } + } + else if (IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_BAAN_OPERATOR); + } + } + + if (sc.atLineEnd) { + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + lineHasDomain = false; + lineHasFunction = false; + lineHasPreProc = false; + lineIgnoreString = false; + lineHasDefines = false; + numberIsHex = false; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +void SCI_METHOD LexerBaan::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + if (!options.fold) + return; + + char word[100]; + int wordlen = 0; + bool foldStart = true; + bool foldNextSelect = true; + bool afterFunctionSection = false; + bool beforeDeclarationSection = false; + int currLineStyle = 0; + int nextLineStyle = 0; + + std::string startTags[6] = { "for", "if", "on", "repeat", "select", "while" }; + std::string endTags[6] = { "endcase", "endfor", "endif", "endselect", "endwhile", "until" }; + std::string selectCloseTags[5] = { "selectdo", "selecteos", "selectempty", "selecterror", "endselect" }; + + LexAccessor styler(pAccess); + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + + // Backtrack to previous line in case need to fix its fold status + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + + int levelPrev = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelPrev = styler.LevelAt(lineCurrent - 1) >> 16; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int style = initStyle; + int styleNext = styler.StyleAt(startPos); + + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + style = styleNext; + styleNext = styler.StyleAt(i + 1); + int stylePrev = (i) ? styler.StyleAt(i - 1) : SCE_BAAN_DEFAULT; + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + // Comment folding + if (options.foldComment && style == SCE_BAAN_COMMENTDOC) { + if (style != stylePrev) { + levelCurrent++; + } + else if (style != styleNext) { + levelCurrent--; + } + } + if (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) { + if (!IsCommentLine(lineCurrent - 1, styler) + && IsCommentLine(lineCurrent + 1, styler)) + levelCurrent++; + else if (IsCommentLine(lineCurrent - 1, styler) + && !IsCommentLine(lineCurrent + 1, styler)) + levelCurrent--; + } + // PreProcessor Folding + if (options.foldPreprocessor) { + if (atEOL && IsPreProcLine(lineCurrent, styler)) { + if (!IsPreProcLine(lineCurrent - 1, styler) + && IsPreProcLine(lineCurrent + 1, styler)) + levelCurrent++; + else if (IsPreProcLine(lineCurrent - 1, styler) + && !IsPreProcLine(lineCurrent + 1, styler)) + levelCurrent--; + } + else if (style == SCE_BAAN_PREPROCESSOR) { + // folds #ifdef/#if/#ifndef - they are not part of the IsPreProcLine folding. + if (ch == '#') { + if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef") + || styler.Match(i, "#context_on")) + levelCurrent++; + else if (styler.Match(i, "#endif") || styler.Match(i, "#context_off")) + levelCurrent--; + } + } + } + //Syntax Folding + if (options.baanFoldSyntaxBased && (style == SCE_BAAN_OPERATOR)) { + if (ch == '{' || ch == '(') { + levelCurrent++; + } + else if (ch == '}' || ch == ')') { + levelCurrent--; + } + } + //Keywords Folding + if (options.baanFoldKeywordsBased) { + if (atEOL && IsDeclarationLine(lineCurrent, styler)) { + if (!IsDeclarationLine(lineCurrent - 1, styler) + && IsDeclarationLine(lineCurrent + 1, styler)) + levelCurrent++; + else if (IsDeclarationLine(lineCurrent - 1, styler) + && !IsDeclarationLine(lineCurrent + 1, styler)) + levelCurrent--; + } + else if (style == SCE_BAAN_WORD) { + word[wordlen++] = static_cast(MakeLowerCase(ch)); + if (wordlen == 100) { // prevent overflow + word[0] = '\0'; + wordlen = 1; + } + if (styleNext != SCE_BAAN_WORD) { + word[wordlen] = '\0'; + wordlen = 0; + if (strcmp(word, "for") == 0) { + Sci_PositionU j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (styler.Match(j, "update")) { + // Means this is a "for update" used by Select which is already folded. + foldStart = false; + } + } + else if (strcmp(word, "on") == 0) { + Sci_PositionU j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (!styler.Match(j, "case")) { + // Means this is not a "on Case" statement... could be "on" used by index. + foldStart = false; + } + } + else if (strcmp(word, "select") == 0) { + if (foldNextSelect) { + // Next Selects are sub-clause till reach of selectCloseTags[] array. + foldNextSelect = false; + foldStart = true; + } + else { + foldNextSelect = false; + foldStart = false; + } + } + else if (wordInArray(word, selectCloseTags, 5)) { + // select clause ends, next select clause can be folded. + foldNextSelect = true; + foldStart = true; + } + else { + foldStart = true; + } + if (foldStart) { + if (wordInArray(word, startTags, 6)) { + levelCurrent++; + } + else if (wordInArray(word, endTags, 6)) { + levelCurrent--; + } + } + } + } + } + // Fold inner level of if/select/case statements + if (options.baanFoldInnerLevel && atEOL) { + bool currLineInnerLevel = IsInnerLevelFold(lineCurrent, styler); + bool nextLineInnerLevel = IsInnerLevelFold(lineCurrent + 1, styler); + if (currLineInnerLevel && currLineInnerLevel != nextLineInnerLevel) { + levelCurrent++; + } + else if (nextLineInnerLevel && nextLineInnerLevel != currLineInnerLevel) { + levelCurrent--; + } + } + // Section Foldings. + // One way of implementing Section Foldings, as there is no END markings of sections. + // first section ends on the previous line of next section. + // Re-written whole folding to accomodate this. + if (options.baanFoldSections && atEOL) { + currLineStyle = mainOrSubSectionLine(lineCurrent, styler); + nextLineStyle = mainOrSubSectionLine(lineCurrent + 1, styler); + if (currLineStyle != 0 && currLineStyle != nextLineStyle) { + if (levelCurrent < levelPrev) + --levelPrev; + for (Sci_Position j = styler.LineStart(lineCurrent); j < styler.LineStart(lineCurrent + 1) - 1; j++) { + if (IsASpaceOrTab(styler[j])) + continue; + else if (styler.StyleAt(j) == SCE_BAAN_WORD5) { + if (styler.Match(j, "functions:")) { + // Means functions: is the end of MainSections. + // Nothing to fold after this. + afterFunctionSection = true; + break; + } + else { + afterFunctionSection = false; + break; + } + } + else { + afterFunctionSection = false; + break; + } + } + if (!afterFunctionSection) + levelCurrent++; + } + else if (nextLineStyle != 0 && currLineStyle != nextLineStyle + && (priorSectionIsSubSection(lineCurrent -1 ,styler) + || !nextSectionIsSubSection(lineCurrent + 1, styler))) { + for (Sci_Position j = styler.LineStart(lineCurrent + 1); j < styler.LineStart(lineCurrent + 1 + 1) - 1; j++) { + if (IsASpaceOrTab(styler[j])) + continue; + else if (styler.StyleAt(j) == SCE_BAAN_WORD5) { + if (styler.Match(j, "declaration:")) { + // Means declaration: is the start of MainSections. + // Nothing to fold before this. + beforeDeclarationSection = true; + break; + } + else { + beforeDeclarationSection = false; + break; + } + } + else { + beforeDeclarationSection = false; + break; + } + } + if (!beforeDeclarationSection) { + levelCurrent--; + if (nextLineStyle == SCE_BAAN_WORD5 && priorSectionIsSubSection(lineCurrent-1, styler)) + // next levelCurrent--; is to unfold previous subsection fold. + // On reaching the next main section, the previous main as well sub section ends. + levelCurrent--; + } + } + } + if (atEOL) { + int lev = levelPrev; + lev |= levelCurrent << 16; + if (visibleChars == 0 && options.foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +LexerModule lmBaan(SCLEX_BAAN, LexerBaan::LexerFactoryBaan, "baan", baanWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexBash.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexBash.cpp new file mode 100644 index 000000000..5bbd563d5 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexBash.cpp @@ -0,0 +1,907 @@ +// Scintilla source code edit control +/** @file LexBash.cxx + ** Lexer for Bash. + **/ +// Copyright 2004-2012 by Neil Hodgson +// Adapted from LexPerl by Kein-Hong Man 2004 +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +#define HERE_DELIM_MAX 256 + +// define this if you want 'invalid octals' to be marked as errors +// usually, this is not a good idea, permissive lexing is better +#undef PEDANTIC_OCTAL + +#define BASH_BASE_ERROR 65 +#define BASH_BASE_DECIMAL 66 +#define BASH_BASE_HEX 67 +#ifdef PEDANTIC_OCTAL +#define BASH_BASE_OCTAL 68 +#define BASH_BASE_OCTAL_ERROR 69 +#endif + +// state constants for parts of a bash command segment +#define BASH_CMD_BODY 0 +#define BASH_CMD_START 1 +#define BASH_CMD_WORD 2 +#define BASH_CMD_TEST 3 +#define BASH_CMD_ARITH 4 +#define BASH_CMD_DELIM 5 + +// state constants for nested delimiter pairs, used by +// SCE_SH_STRING and SCE_SH_BACKTICKS processing +#define BASH_DELIM_LITERAL 0 +#define BASH_DELIM_STRING 1 +#define BASH_DELIM_CSTRING 2 +#define BASH_DELIM_LSTRING 3 +#define BASH_DELIM_COMMAND 4 +#define BASH_DELIM_BACKTICK 5 + +#define BASH_DELIM_STACK_MAX 7 + +static inline int translateBashDigit(int ch) { + if (ch >= '0' && ch <= '9') { + return ch - '0'; + } else if (ch >= 'a' && ch <= 'z') { + return ch - 'a' + 10; + } else if (ch >= 'A' && ch <= 'Z') { + return ch - 'A' + 36; + } else if (ch == '@') { + return 62; + } else if (ch == '_') { + return 63; + } + return BASH_BASE_ERROR; +} + +static inline int getBashNumberBase(char *s) { + int i = 0; + int base = 0; + while (*s) { + base = base * 10 + (*s++ - '0'); + i++; + } + if (base > 64 || i > 2) { + return BASH_BASE_ERROR; + } + return base; +} + +static int opposite(int ch) { + if (ch == '(') return ')'; + if (ch == '[') return ']'; + if (ch == '{') return '}'; + if (ch == '<') return '>'; + return ch; +} + +static int GlobScan(StyleContext &sc) { + // forward scan for zsh globs, disambiguate versus bash arrays + // complex expressions may still fail, e.g. unbalanced () '' "" etc + int c, sLen = 0; + int pCount = 0; + int hash = 0; + while ((c = sc.GetRelativeCharacter(++sLen)) != 0) { + if (IsASpace(c)) { + return 0; + } else if (c == '\'' || c == '\"') { + if (hash != 2) return 0; + } else if (c == '#' && hash == 0) { + hash = (sLen == 1) ? 2:1; + } else if (c == '(') { + pCount++; + } else if (c == ')') { + if (pCount == 0) { + if (hash) return sLen; + return 0; + } + pCount--; + } + } + return 0; +} + +static void ColouriseBashDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList cmdDelimiter, bashStruct, bashStruct_in; + cmdDelimiter.Set("| || |& & && ; ;; ( ) { }"); + bashStruct.Set("if elif fi while until else then do done esac eval"); + bashStruct_in.Set("for case select"); + + CharacterSet setWordStart(CharacterSet::setAlpha, "_"); + // note that [+-] are often parts of identifiers in shell scripts + CharacterSet setWord(CharacterSet::setAlphaNum, "._+-"); + CharacterSet setMetaCharacter(CharacterSet::setNone, "|&;()<> \t\r\n"); + setMetaCharacter.Add(0); + CharacterSet setBashOperator(CharacterSet::setNone, "^&%()-+=|{}[]:;>,*/(ch); + Delimiter[DelimiterLength] = '\0'; + } + ~HereDocCls() { + } + }; + HereDocCls HereDoc; + + class QuoteCls { // Class to manage quote pairs (simplified vs LexPerl) + public: + int Count; + int Up, Down; + QuoteCls() { + Count = 0; + Up = '\0'; + Down = '\0'; + } + void Open(int u) { + Count++; + Up = u; + Down = opposite(Up); + } + void Start(int u) { + Count = 0; + Open(u); + } + }; + QuoteCls Quote; + + class QuoteStackCls { // Class to manage quote pairs that nest + public: + int Count; + int Up, Down; + int Style; + int Depth; // levels pushed + int CountStack[BASH_DELIM_STACK_MAX]; + int UpStack [BASH_DELIM_STACK_MAX]; + int StyleStack[BASH_DELIM_STACK_MAX]; + QuoteStackCls() { + Count = 0; + Up = '\0'; + Down = '\0'; + Style = 0; + Depth = 0; + } + void Start(int u, int s) { + Count = 1; + Up = u; + Down = opposite(Up); + Style = s; + } + void Push(int u, int s) { + if (Depth >= BASH_DELIM_STACK_MAX) + return; + CountStack[Depth] = Count; + UpStack [Depth] = Up; + StyleStack[Depth] = Style; + Depth++; + Count = 1; + Up = u; + Down = opposite(Up); + Style = s; + } + void Pop(void) { + if (Depth <= 0) + return; + Depth--; + Count = CountStack[Depth]; + Up = UpStack [Depth]; + Style = StyleStack[Depth]; + Down = opposite(Up); + } + ~QuoteStackCls() { + } + }; + QuoteStackCls QuoteStack; + + int numBase = 0; + int digit; + Sci_PositionU endPos = startPos + length; + int cmdState = BASH_CMD_START; + int testExprType = 0; + + // Always backtracks to the start of a line that is not a continuation + // of the previous line (i.e. start of a bash command segment) + Sci_Position ln = styler.GetLine(startPos); + if (ln > 0 && startPos == static_cast(styler.LineStart(ln))) + ln--; + for (;;) { + startPos = styler.LineStart(ln); + if (ln == 0 || styler.GetLineState(ln) == BASH_CMD_START) + break; + ln--; + } + initStyle = SCE_SH_DEFAULT; + + StyleContext sc(startPos, endPos - startPos, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + // handle line continuation, updates per-line stored state + if (sc.atLineStart) { + ln = styler.GetLine(sc.currentPos); + if (sc.state == SCE_SH_STRING + || sc.state == SCE_SH_BACKTICKS + || sc.state == SCE_SH_CHARACTER + || sc.state == SCE_SH_HERE_Q + || sc.state == SCE_SH_COMMENTLINE + || sc.state == SCE_SH_PARAM) { + // force backtrack while retaining cmdState + styler.SetLineState(ln, BASH_CMD_BODY); + } else { + if (ln > 0) { + if ((sc.GetRelative(-3) == '\\' && sc.GetRelative(-2) == '\r' && sc.chPrev == '\n') + || sc.GetRelative(-2) == '\\') { // handle '\' line continuation + // retain last line's state + } else + cmdState = BASH_CMD_START; + } + styler.SetLineState(ln, cmdState); + } + } + + // controls change of cmdState at the end of a non-whitespace element + // states BODY|TEST|ARITH persist until the end of a command segment + // state WORD persist, but ends with 'in' or 'do' construct keywords + int cmdStateNew = BASH_CMD_BODY; + if (cmdState == BASH_CMD_TEST || cmdState == BASH_CMD_ARITH || cmdState == BASH_CMD_WORD) + cmdStateNew = cmdState; + int stylePrev = sc.state; + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_SH_OPERATOR: + sc.SetState(SCE_SH_DEFAULT); + if (cmdState == BASH_CMD_DELIM) // if command delimiter, start new command + cmdStateNew = BASH_CMD_START; + else if (sc.chPrev == '\\') // propagate command state if line continued + cmdStateNew = cmdState; + break; + case SCE_SH_WORD: + // "." never used in Bash variable names but used in file names + if (!setWord.Contains(sc.ch)) { + char s[500]; + char s2[10]; + sc.GetCurrent(s, sizeof(s)); + // allow keywords ending in a whitespace or command delimiter + s2[0] = static_cast(sc.ch); + s2[1] = '\0'; + bool keywordEnds = IsASpace(sc.ch) || cmdDelimiter.InList(s2); + // 'in' or 'do' may be construct keywords + if (cmdState == BASH_CMD_WORD) { + if (strcmp(s, "in") == 0 && keywordEnds) + cmdStateNew = BASH_CMD_BODY; + else if (strcmp(s, "do") == 0 && keywordEnds) + cmdStateNew = BASH_CMD_START; + else + sc.ChangeState(SCE_SH_IDENTIFIER); + sc.SetState(SCE_SH_DEFAULT); + break; + } + // a 'test' keyword starts a test expression + if (strcmp(s, "test") == 0) { + if (cmdState == BASH_CMD_START && keywordEnds) { + cmdStateNew = BASH_CMD_TEST; + testExprType = 0; + } else + sc.ChangeState(SCE_SH_IDENTIFIER); + } + // detect bash construct keywords + else if (bashStruct.InList(s)) { + if (cmdState == BASH_CMD_START && keywordEnds) + cmdStateNew = BASH_CMD_START; + else + sc.ChangeState(SCE_SH_IDENTIFIER); + } + // 'for'|'case'|'select' needs 'in'|'do' to be highlighted later + else if (bashStruct_in.InList(s)) { + if (cmdState == BASH_CMD_START && keywordEnds) + cmdStateNew = BASH_CMD_WORD; + else + sc.ChangeState(SCE_SH_IDENTIFIER); + } + // disambiguate option items and file test operators + else if (s[0] == '-') { + if (cmdState != BASH_CMD_TEST) + sc.ChangeState(SCE_SH_IDENTIFIER); + } + // disambiguate keywords and identifiers + else if (cmdState != BASH_CMD_START + || !(keywords.InList(s) && keywordEnds)) { + sc.ChangeState(SCE_SH_IDENTIFIER); + } + sc.SetState(SCE_SH_DEFAULT); + } + break; + case SCE_SH_IDENTIFIER: + if (sc.chPrev == '\\') { // for escaped chars + sc.ForwardSetState(SCE_SH_DEFAULT); + } else if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_SH_DEFAULT); + } else if (cmdState == BASH_CMD_ARITH && !setWordStart.Contains(sc.ch)) { + sc.SetState(SCE_SH_DEFAULT); + } + break; + case SCE_SH_NUMBER: + digit = translateBashDigit(sc.ch); + if (numBase == BASH_BASE_DECIMAL) { + if (sc.ch == '#') { + char s[10]; + sc.GetCurrent(s, sizeof(s)); + numBase = getBashNumberBase(s); + if (numBase != BASH_BASE_ERROR) + break; + } else if (IsADigit(sc.ch)) + break; + } else if (numBase == BASH_BASE_HEX) { + if (IsADigit(sc.ch, 16)) + break; +#ifdef PEDANTIC_OCTAL + } else if (numBase == BASH_BASE_OCTAL || + numBase == BASH_BASE_OCTAL_ERROR) { + if (digit <= 7) + break; + if (digit <= 9) { + numBase = BASH_BASE_OCTAL_ERROR; + break; + } +#endif + } else if (numBase == BASH_BASE_ERROR) { + if (digit <= 9) + break; + } else { // DD#DDDD number style handling + if (digit != BASH_BASE_ERROR) { + if (numBase <= 36) { + // case-insensitive if base<=36 + if (digit >= 36) digit -= 26; + } + if (digit < numBase) + break; + if (digit <= 9) { + numBase = BASH_BASE_ERROR; + break; + } + } + } + // fallthrough when number is at an end or error + if (numBase == BASH_BASE_ERROR +#ifdef PEDANTIC_OCTAL + || numBase == BASH_BASE_OCTAL_ERROR +#endif + ) { + sc.ChangeState(SCE_SH_ERROR); + } + sc.SetState(SCE_SH_DEFAULT); + break; + case SCE_SH_COMMENTLINE: + if (sc.atLineEnd && sc.chPrev != '\\') { + sc.SetState(SCE_SH_DEFAULT); + } + break; + case SCE_SH_HERE_DELIM: + // From Bash info: + // --------------- + // Specifier format is: <<[-]WORD + // Optional '-' is for removal of leading tabs from here-doc. + // Whitespace acceptable after <<[-] operator + // + if (HereDoc.State == 0) { // '<<' encountered + HereDoc.Quote = sc.chNext; + HereDoc.Quoted = false; + HereDoc.DelimiterLength = 0; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + if (sc.chNext == '\'' || sc.chNext == '\"') { // a quoted here-doc delimiter (' or ") + sc.Forward(); + HereDoc.Quoted = true; + HereDoc.State = 1; + } else if (setHereDoc.Contains(sc.chNext) || + (sc.chNext == '=' && cmdState != BASH_CMD_ARITH)) { + // an unquoted here-doc delimiter, no special handling + HereDoc.State = 1; + } else if (sc.chNext == '<') { // HERE string <<< + sc.Forward(); + sc.ForwardSetState(SCE_SH_DEFAULT); + } else if (IsASpace(sc.chNext)) { + // eat whitespace + } else if (setLeftShift.Contains(sc.chNext) || + (sc.chNext == '=' && cmdState == BASH_CMD_ARITH)) { + // left shift <<$var or <<= cases + sc.ChangeState(SCE_SH_OPERATOR); + sc.ForwardSetState(SCE_SH_DEFAULT); + } else { + // symbols terminates; deprecated zero-length delimiter + HereDoc.State = 1; + } + } else if (HereDoc.State == 1) { // collect the delimiter + // * if single quoted, there's no escape + // * if double quoted, there are \\ and \" escapes + if ((HereDoc.Quote == '\'' && sc.ch != HereDoc.Quote) || + (HereDoc.Quoted && sc.ch != HereDoc.Quote && sc.ch != '\\') || + (HereDoc.Quote != '\'' && sc.chPrev == '\\') || + (setHereDoc2.Contains(sc.ch))) { + HereDoc.Append(sc.ch); + } else if (HereDoc.Quoted && sc.ch == HereDoc.Quote) { // closing quote => end of delimiter + sc.ForwardSetState(SCE_SH_DEFAULT); + } else if (sc.ch == '\\') { + if (HereDoc.Quoted && sc.chNext != HereDoc.Quote && sc.chNext != '\\') { + // in quoted prefixes only \ and the quote eat the escape + HereDoc.Append(sc.ch); + } else { + // skip escape prefix + } + } else if (!HereDoc.Quoted) { + sc.SetState(SCE_SH_DEFAULT); + } + if (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) { // force blowup + sc.SetState(SCE_SH_ERROR); + HereDoc.State = 0; + } + } + break; + case SCE_SH_HERE_Q: + // HereDoc.State == 2 + if (sc.atLineStart) { + sc.SetState(SCE_SH_HERE_Q); + int prefixws = 0; + while (sc.ch == '\t' && !sc.atLineEnd) { // tabulation prefix + sc.Forward(); + prefixws++; + } + if (prefixws > 0) + sc.SetState(SCE_SH_HERE_Q); + while (!sc.atLineEnd) { + sc.Forward(); + } + char s[HERE_DELIM_MAX]; + sc.GetCurrent(s, sizeof(s)); + if (sc.LengthCurrent() == 0) { // '' or "" delimiters + if ((prefixws == 0 || HereDoc.Indent) && + HereDoc.Quoted && HereDoc.DelimiterLength == 0) + sc.SetState(SCE_SH_DEFAULT); + break; + } + if (s[strlen(s) - 1] == '\r') + s[strlen(s) - 1] = '\0'; + if (strcmp(HereDoc.Delimiter, s) == 0) { + if ((prefixws == 0) || // indentation rule + (prefixws > 0 && HereDoc.Indent)) { + sc.SetState(SCE_SH_DEFAULT); + break; + } + } + } + break; + case SCE_SH_SCALAR: // variable names + if (!setParam.Contains(sc.ch)) { + if (sc.LengthCurrent() == 1) { + // Special variable: $(, $_ etc. + sc.ForwardSetState(SCE_SH_DEFAULT); + } else { + sc.SetState(SCE_SH_DEFAULT); + } + } + break; + case SCE_SH_STRING: // delimited styles, can nest + case SCE_SH_BACKTICKS: + if (sc.ch == '\\' && QuoteStack.Up != '\\') { + if (QuoteStack.Style != BASH_DELIM_LITERAL) + sc.Forward(); + } else if (sc.ch == QuoteStack.Down) { + QuoteStack.Count--; + if (QuoteStack.Count == 0) { + if (QuoteStack.Depth > 0) { + QuoteStack.Pop(); + } else + sc.ForwardSetState(SCE_SH_DEFAULT); + } + } else if (sc.ch == QuoteStack.Up) { + QuoteStack.Count++; + } else { + if (QuoteStack.Style == BASH_DELIM_STRING || + QuoteStack.Style == BASH_DELIM_LSTRING + ) { // do nesting for "string", $"locale-string" + if (sc.ch == '`') { + QuoteStack.Push(sc.ch, BASH_DELIM_BACKTICK); + } else if (sc.ch == '$' && sc.chNext == '(') { + sc.Forward(); + QuoteStack.Push(sc.ch, BASH_DELIM_COMMAND); + } + } else if (QuoteStack.Style == BASH_DELIM_COMMAND || + QuoteStack.Style == BASH_DELIM_BACKTICK + ) { // do nesting for $(command), `command` + if (sc.ch == '\'') { + QuoteStack.Push(sc.ch, BASH_DELIM_LITERAL); + } else if (sc.ch == '\"') { + QuoteStack.Push(sc.ch, BASH_DELIM_STRING); + } else if (sc.ch == '`') { + QuoteStack.Push(sc.ch, BASH_DELIM_BACKTICK); + } else if (sc.ch == '$') { + if (sc.chNext == '\'') { + sc.Forward(); + QuoteStack.Push(sc.ch, BASH_DELIM_CSTRING); + } else if (sc.chNext == '\"') { + sc.Forward(); + QuoteStack.Push(sc.ch, BASH_DELIM_LSTRING); + } else if (sc.chNext == '(') { + sc.Forward(); + QuoteStack.Push(sc.ch, BASH_DELIM_COMMAND); + } + } + } + } + break; + case SCE_SH_PARAM: // ${parameter} + if (sc.ch == '\\' && Quote.Up != '\\') { + sc.Forward(); + } else if (sc.ch == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + sc.ForwardSetState(SCE_SH_DEFAULT); + } + } else if (sc.ch == Quote.Up) { + Quote.Count++; + } + break; + case SCE_SH_CHARACTER: // singly-quoted strings + if (sc.ch == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + sc.ForwardSetState(SCE_SH_DEFAULT); + } + } + break; + } + + // Must check end of HereDoc state 1 before default state is handled + if (HereDoc.State == 1 && sc.atLineEnd) { + // Begin of here-doc (the line after the here-doc delimiter): + // Lexically, the here-doc starts from the next line after the >>, but the + // first line of here-doc seem to follow the style of the last EOL sequence + HereDoc.State = 2; + if (HereDoc.Quoted) { + if (sc.state == SCE_SH_HERE_DELIM) { + // Missing quote at end of string! Syntax error in bash 4.3 + // Mark this bit as an error, do not colour any here-doc + sc.ChangeState(SCE_SH_ERROR); + sc.SetState(SCE_SH_DEFAULT); + } else { + // HereDoc.Quote always == '\'' + sc.SetState(SCE_SH_HERE_Q); + } + } else if (HereDoc.DelimiterLength == 0) { + // no delimiter, illegal (but '' and "" are legal) + sc.ChangeState(SCE_SH_ERROR); + sc.SetState(SCE_SH_DEFAULT); + } else { + sc.SetState(SCE_SH_HERE_Q); + } + } + + // update cmdState about the current command segment + if (stylePrev != SCE_SH_DEFAULT && sc.state == SCE_SH_DEFAULT) { + cmdState = cmdStateNew; + } + // Determine if a new state should be entered. + if (sc.state == SCE_SH_DEFAULT) { + if (sc.ch == '\\') { + // Bash can escape any non-newline as a literal + sc.SetState(SCE_SH_IDENTIFIER); + if (sc.chNext == '\r' || sc.chNext == '\n') + sc.SetState(SCE_SH_OPERATOR); + } else if (IsADigit(sc.ch)) { + sc.SetState(SCE_SH_NUMBER); + numBase = BASH_BASE_DECIMAL; + if (sc.ch == '0') { // hex,octal + if (sc.chNext == 'x' || sc.chNext == 'X') { + numBase = BASH_BASE_HEX; + sc.Forward(); + } else if (IsADigit(sc.chNext)) { +#ifdef PEDANTIC_OCTAL + numBase = BASH_BASE_OCTAL; +#else + numBase = BASH_BASE_HEX; +#endif + } + } + } else if (setWordStart.Contains(sc.ch)) { + sc.SetState(SCE_SH_WORD); + } else if (sc.ch == '#') { + if (stylePrev != SCE_SH_WORD && stylePrev != SCE_SH_IDENTIFIER && + (sc.currentPos == 0 || setMetaCharacter.Contains(sc.chPrev))) { + sc.SetState(SCE_SH_COMMENTLINE); + } else { + sc.SetState(SCE_SH_WORD); + } + // handle some zsh features within arithmetic expressions only + if (cmdState == BASH_CMD_ARITH) { + if (sc.chPrev == '[') { // [#8] [##8] output digit setting + sc.SetState(SCE_SH_WORD); + if (sc.chNext == '#') { + sc.Forward(); + } + } else if (sc.Match("##^") && IsUpperCase(sc.GetRelative(3))) { // ##^A + sc.SetState(SCE_SH_IDENTIFIER); + sc.Forward(3); + } else if (sc.chNext == '#' && !IsASpace(sc.GetRelative(2))) { // ##a + sc.SetState(SCE_SH_IDENTIFIER); + sc.Forward(2); + } else if (setWordStart.Contains(sc.chNext)) { // #name + sc.SetState(SCE_SH_IDENTIFIER); + } + } + } else if (sc.ch == '\"') { + sc.SetState(SCE_SH_STRING); + QuoteStack.Start(sc.ch, BASH_DELIM_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_SH_CHARACTER); + Quote.Start(sc.ch); + } else if (sc.ch == '`') { + sc.SetState(SCE_SH_BACKTICKS); + QuoteStack.Start(sc.ch, BASH_DELIM_BACKTICK); + } else if (sc.ch == '$') { + if (sc.Match("$((")) { + sc.SetState(SCE_SH_OPERATOR); // handle '((' later + continue; + } + sc.SetState(SCE_SH_SCALAR); + sc.Forward(); + if (sc.ch == '{') { + sc.ChangeState(SCE_SH_PARAM); + Quote.Start(sc.ch); + } else if (sc.ch == '\'') { + sc.ChangeState(SCE_SH_STRING); + QuoteStack.Start(sc.ch, BASH_DELIM_CSTRING); + } else if (sc.ch == '"') { + sc.ChangeState(SCE_SH_STRING); + QuoteStack.Start(sc.ch, BASH_DELIM_LSTRING); + } else if (sc.ch == '(') { + sc.ChangeState(SCE_SH_BACKTICKS); + QuoteStack.Start(sc.ch, BASH_DELIM_COMMAND); + } else if (sc.ch == '`') { // $` seen in a configure script, valid? + sc.ChangeState(SCE_SH_BACKTICKS); + QuoteStack.Start(sc.ch, BASH_DELIM_BACKTICK); + } else { + continue; // scalar has no delimiter pair + } + } else if (sc.Match('<', '<')) { + sc.SetState(SCE_SH_HERE_DELIM); + HereDoc.State = 0; + if (sc.GetRelative(2) == '-') { // <<- indent case + HereDoc.Indent = true; + sc.Forward(); + } else { + HereDoc.Indent = false; + } + } else if (sc.ch == '-' && // one-char file test operators + setSingleCharOp.Contains(sc.chNext) && + !setWord.Contains(sc.GetRelative(2)) && + IsASpace(sc.chPrev)) { + sc.SetState(SCE_SH_WORD); + sc.Forward(); + } else if (setBashOperator.Contains(sc.ch)) { + char s[10]; + bool isCmdDelim = false; + sc.SetState(SCE_SH_OPERATOR); + // globs have no whitespace, do not appear in arithmetic expressions + if (cmdState != BASH_CMD_ARITH && sc.ch == '(' && sc.chNext != '(') { + int i = GlobScan(sc); + if (i > 1) { + sc.SetState(SCE_SH_IDENTIFIER); + sc.Forward(i); + continue; + } + } + // handle opening delimiters for test/arithmetic expressions - ((,[[,[ + if (cmdState == BASH_CMD_START + || cmdState == BASH_CMD_BODY) { + if (sc.Match('(', '(')) { + cmdState = BASH_CMD_ARITH; + sc.Forward(); + } else if (sc.Match('[', '[') && IsASpace(sc.GetRelative(2))) { + cmdState = BASH_CMD_TEST; + testExprType = 1; + sc.Forward(); + } else if (sc.ch == '[' && IsASpace(sc.chNext)) { + cmdState = BASH_CMD_TEST; + testExprType = 2; + } + } + // special state -- for ((x;y;z)) in ... looping + if (cmdState == BASH_CMD_WORD && sc.Match('(', '(')) { + cmdState = BASH_CMD_ARITH; + sc.Forward(); + continue; + } + // handle command delimiters in command START|BODY|WORD state, also TEST if 'test' + if (cmdState == BASH_CMD_START + || cmdState == BASH_CMD_BODY + || cmdState == BASH_CMD_WORD + || (cmdState == BASH_CMD_TEST && testExprType == 0)) { + s[0] = static_cast(sc.ch); + if (setBashOperator.Contains(sc.chNext)) { + s[1] = static_cast(sc.chNext); + s[2] = '\0'; + isCmdDelim = cmdDelimiter.InList(s); + if (isCmdDelim) + sc.Forward(); + } + if (!isCmdDelim) { + s[1] = '\0'; + isCmdDelim = cmdDelimiter.InList(s); + } + if (isCmdDelim) { + cmdState = BASH_CMD_DELIM; + continue; + } + } + // handle closing delimiters for test/arithmetic expressions - )),]],] + if (cmdState == BASH_CMD_ARITH && sc.Match(')', ')')) { + cmdState = BASH_CMD_BODY; + sc.Forward(); + } else if (cmdState == BASH_CMD_TEST && IsASpace(sc.chPrev)) { + if (sc.Match(']', ']') && testExprType == 1) { + sc.Forward(); + cmdState = BASH_CMD_BODY; + } else if (sc.ch == ']' && testExprType == 2) { + cmdState = BASH_CMD_BODY; + } + } + } + }// sc.state + } + sc.Complete(); + if (sc.state == SCE_SH_HERE_Q) { + styler.ChangeLexerState(sc.currentPos, styler.Length()); + } + sc.Complete(); +} + +static bool IsCommentLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} + +static void FoldBashDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + int skipHereCh = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + char word[8] = { '\0' }; // we're not interested in long words anyway + unsigned int wordlen = 0; + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + // Comment folding + if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) + { + if (!IsCommentLine(lineCurrent - 1, styler) + && IsCommentLine(lineCurrent + 1, styler)) + levelCurrent++; + else if (IsCommentLine(lineCurrent - 1, styler) + && !IsCommentLine(lineCurrent + 1, styler)) + levelCurrent--; + } + if (style == SCE_SH_WORD) { + if ((wordlen + 1) < sizeof(word)) + word[wordlen++] = ch; + if (styleNext != style) { + word[wordlen] = '\0'; + wordlen = 0; + if (strcmp(word, "if") == 0 || strcmp(word, "case") == 0 || strcmp(word, "do") == 0) { + levelCurrent++; + } else if (strcmp(word, "fi") == 0 || strcmp(word, "esac") == 0 || strcmp(word, "done") == 0) { + levelCurrent--; + } + } + } + if (style == SCE_SH_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + // Here Document folding + if (style == SCE_SH_HERE_DELIM) { + if (ch == '<' && chNext == '<') { + if (styler.SafeGetCharAt(i + 2) == '<') { + skipHereCh = 1; + } else { + if (skipHereCh == 0) { + levelCurrent++; + } else { + skipHereCh = 0; + } + } + } + } else if (style == SCE_SH_HERE_Q && styler.StyleAt(i+1) == SCE_SH_DEFAULT) { + levelCurrent--; + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const bashWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBash(SCLEX_BASH, ColouriseBashDoc, "bash", FoldBashDoc, bashWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexBasic.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexBasic.cpp new file mode 100644 index 000000000..4ec58dcdd --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexBasic.cpp @@ -0,0 +1,565 @@ +// Scintilla source code edit control +/** @file LexBasic.cxx + ** Lexer for BlitzBasic and PureBasic. + ** Converted to lexer object and added further folding features/properties by "Udo Lechner" + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// This tries to be a unified Lexer/Folder for all the BlitzBasic/BlitzMax/PurBasic basics +// and derivatives. Once they diverge enough, might want to split it into multiple +// lexers for more code clearity. +// +// Mail me (elias users sf net) for any bugs. + +// Folding only works for simple things like functions or types. + +// You may want to have a look at my ctags lexer as well, if you additionally to coloring +// and folding need to extract things like label tags in your editor. + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +/* Bits: + * 1 - whitespace + * 2 - operator + * 4 - identifier + * 8 - decimal digit + * 16 - hex digit + * 32 - bin digit + * 64 - letter + */ +static int character_classification[128] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, + 60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, + 2, 84, 84, 84, 84, 84, 84, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 2, 2, 2, 68, + 2, 84, 84, 84, 84, 84, 84, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 2, 2, 2, 0 +}; + +static bool IsSpace(int c) { + return c < 128 && (character_classification[c] & 1); +} + +static bool IsOperator(int c) { + return c < 128 && (character_classification[c] & 2); +} + +static bool IsIdentifier(int c) { + return c < 128 && (character_classification[c] & 4); +} + +static bool IsDigit(int c) { + return c < 128 && (character_classification[c] & 8); +} + +static bool IsHexDigit(int c) { + return c < 128 && (character_classification[c] & 16); +} + +static bool IsBinDigit(int c) { + return c < 128 && (character_classification[c] & 32); +} + +static bool IsLetter(int c) { + return c < 128 && (character_classification[c] & 64); +} + +static int LowerCase(int c) +{ + if (c >= 'A' && c <= 'Z') + return 'a' + c - 'A'; + return c; +} + +static int CheckBlitzFoldPoint(char const *token, int &level) { + if (!strcmp(token, "function") || + !strcmp(token, "type")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "end function") || + !strcmp(token, "end type")) { + return -1; + } + return 0; +} + +static int CheckPureFoldPoint(char const *token, int &level) { + if (!strcmp(token, "procedure") || + !strcmp(token, "enumeration") || + !strcmp(token, "interface") || + !strcmp(token, "structure")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "endprocedure") || + !strcmp(token, "endenumeration") || + !strcmp(token, "endinterface") || + !strcmp(token, "endstructure")) { + return -1; + } + return 0; +} + +static int CheckFreeFoldPoint(char const *token, int &level) { + if (!strcmp(token, "function") || + !strcmp(token, "sub") || + !strcmp(token, "enum") || + !strcmp(token, "type") || + !strcmp(token, "union") || + !strcmp(token, "property") || + !strcmp(token, "destructor") || + !strcmp(token, "constructor")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "end function") || + !strcmp(token, "end sub") || + !strcmp(token, "end enum") || + !strcmp(token, "end type") || + !strcmp(token, "end union") || + !strcmp(token, "end property") || + !strcmp(token, "end destructor") || + !strcmp(token, "end constructor")) { + return -1; + } + return 0; +} + +// An individual named option for use in an OptionSet + +// Options used for LexerBasic +struct OptionsBasic { + bool fold; + bool foldSyntaxBased; + bool foldCommentExplicit; + std::string foldExplicitStart; + std::string foldExplicitEnd; + bool foldExplicitAnywhere; + bool foldCompact; + OptionsBasic() { + fold = false; + foldSyntaxBased = true; + foldCommentExplicit = false; + foldExplicitStart = ""; + foldExplicitEnd = ""; + foldExplicitAnywhere = false; + foldCompact = true; + } +}; + +static const char * const blitzbasicWordListDesc[] = { + "BlitzBasic Keywords", + "user1", + "user2", + "user3", + 0 +}; + +static const char * const purebasicWordListDesc[] = { + "PureBasic Keywords", + "PureBasic PreProcessor Keywords", + "user defined 1", + "user defined 2", + 0 +}; + +static const char * const freebasicWordListDesc[] = { + "FreeBasic Keywords", + "FreeBasic PreProcessor Keywords", + "user defined 1", + "user defined 2", + 0 +}; + +struct OptionSetBasic : public OptionSet { + OptionSetBasic(const char * const wordListDescriptions[]) { + DefineProperty("fold", &OptionsBasic::fold); + + DefineProperty("fold.basic.syntax.based", &OptionsBasic::foldSyntaxBased, + "Set this property to 0 to disable syntax based folding."); + + DefineProperty("fold.basic.comment.explicit", &OptionsBasic::foldCommentExplicit, + "This option enables folding explicit fold points when using the Basic lexer. " + "Explicit fold points allows adding extra folding by placing a ;{ (BB/PB) or '{ (FB) comment at the start " + "and a ;} (BB/PB) or '} (FB) at the end of a section that should be folded."); + + DefineProperty("fold.basic.explicit.start", &OptionsBasic::foldExplicitStart, + "The string to use for explicit fold start points, replacing the standard ;{ (BB/PB) or '{ (FB)."); + + DefineProperty("fold.basic.explicit.end", &OptionsBasic::foldExplicitEnd, + "The string to use for explicit fold end points, replacing the standard ;} (BB/PB) or '} (FB)."); + + DefineProperty("fold.basic.explicit.anywhere", &OptionsBasic::foldExplicitAnywhere, + "Set this property to 1 to enable explicit fold points anywhere, not just in line comments."); + + DefineProperty("fold.compact", &OptionsBasic::foldCompact); + + DefineWordListSets(wordListDescriptions); + } +}; + +class LexerBasic : public DefaultLexer { + char comment_char; + int (*CheckFoldPoint)(char const *, int &); + WordList keywordlists[4]; + OptionsBasic options; + OptionSetBasic osBasic; +public: + LexerBasic(char comment_char_, int (*CheckFoldPoint_)(char const *, int &), const char * const wordListDescriptions[]) : + comment_char(comment_char_), + CheckFoldPoint(CheckFoldPoint_), + osBasic(wordListDescriptions) { + } + virtual ~LexerBasic() { + } + void SCI_METHOD Release() override { + delete this; + } + int SCI_METHOD Version() const override { + return lvOriginal; + } + const char * SCI_METHOD PropertyNames() override { + return osBasic.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osBasic.PropertyType(name); + } + const char * SCI_METHOD DescribeProperty(const char *name) override { + return osBasic.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char * SCI_METHOD DescribeWordListSets() override { + return osBasic.DescribeWordListSets(); + } + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + static ILexer *LexerFactoryBlitzBasic() { + return new LexerBasic(';', CheckBlitzFoldPoint, blitzbasicWordListDesc); + } + static ILexer *LexerFactoryPureBasic() { + return new LexerBasic(';', CheckPureFoldPoint, purebasicWordListDesc); + } + static ILexer *LexerFactoryFreeBasic() { + return new LexerBasic('\'', CheckFreeFoldPoint, freebasicWordListDesc ); + } +}; + +Sci_Position SCI_METHOD LexerBasic::PropertySet(const char *key, const char *val) { + if (osBasic.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerBasic::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywordlists[0]; + break; + case 1: + wordListN = &keywordlists[1]; + break; + case 2: + wordListN = &keywordlists[2]; + break; + case 3: + wordListN = &keywordlists[3]; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +void SCI_METHOD LexerBasic::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + LexAccessor styler(pAccess); + + bool wasfirst = true, isfirst = true; // true if first token in a line + styler.StartAt(startPos); + int styleBeforeKeyword = SCE_B_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + // Can't use sc.More() here else we miss the last character + for (; ; sc.Forward()) { + if (sc.state == SCE_B_IDENTIFIER) { + if (!IsIdentifier(sc.ch)) { + // Labels + if (wasfirst && sc.Match(':')) { + sc.ChangeState(SCE_B_LABEL); + sc.ForwardSetState(SCE_B_DEFAULT); + } else { + char s[100]; + int kstates[4] = { + SCE_B_KEYWORD, + SCE_B_KEYWORD2, + SCE_B_KEYWORD3, + SCE_B_KEYWORD4, + }; + sc.GetCurrentLowered(s, sizeof(s)); + for (int i = 0; i < 4; i++) { + if (keywordlists[i].InList(s)) { + sc.ChangeState(kstates[i]); + } + } + // Types, must set them as operator else they will be + // matched as number/constant + if (sc.Match('.') || sc.Match('$') || sc.Match('%') || + sc.Match('#')) { + sc.SetState(SCE_B_OPERATOR); + } else { + sc.SetState(SCE_B_DEFAULT); + } + } + } + } else if (sc.state == SCE_B_OPERATOR) { + if (!IsOperator(sc.ch) || sc.Match('#')) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_LABEL) { + if (!IsIdentifier(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_CONSTANT) { + if (!IsIdentifier(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_NUMBER) { + if (!IsDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_HEXNUMBER) { + if (!IsHexDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_BINNUMBER) { + if (!IsBinDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_STRING) { + if (sc.ch == '"') { + sc.ForwardSetState(SCE_B_DEFAULT); + } + if (sc.atLineEnd) { + sc.ChangeState(SCE_B_ERROR); + sc.SetState(SCE_B_DEFAULT); + } + } else if (sc.state == SCE_B_COMMENT || sc.state == SCE_B_PREPROCESSOR) { + if (sc.atLineEnd) { + sc.SetState(SCE_B_DEFAULT); + } + } else if (sc.state == SCE_B_DOCLINE) { + if (sc.atLineEnd) { + sc.SetState(SCE_B_DEFAULT); + } else if (sc.ch == '\\' || sc.ch == '@') { + if (IsLetter(sc.chNext) && sc.chPrev != '\\') { + styleBeforeKeyword = sc.state; + sc.SetState(SCE_B_DOCKEYWORD); + }; + } + } else if (sc.state == SCE_B_DOCKEYWORD) { + if (IsSpace(sc.ch)) { + sc.SetState(styleBeforeKeyword); + } else if (sc.atLineEnd && styleBeforeKeyword == SCE_B_DOCLINE) { + sc.SetState(SCE_B_DEFAULT); + } + } else if (sc.state == SCE_B_COMMENTBLOCK) { + if (sc.Match("\'/")) { + sc.Forward(); + sc.ForwardSetState(SCE_B_DEFAULT); + } + } else if (sc.state == SCE_B_DOCBLOCK) { + if (sc.Match("\'/")) { + sc.Forward(); + sc.ForwardSetState(SCE_B_DEFAULT); + } else if (sc.ch == '\\' || sc.ch == '@') { + if (IsLetter(sc.chNext) && sc.chPrev != '\\') { + styleBeforeKeyword = sc.state; + sc.SetState(SCE_B_DOCKEYWORD); + }; + } + } + + if (sc.atLineStart) + isfirst = true; + + if (sc.state == SCE_B_DEFAULT || sc.state == SCE_B_ERROR) { + if (isfirst && sc.Match('.') && comment_char != '\'') { + sc.SetState(SCE_B_LABEL); + } else if (isfirst && sc.Match('#')) { + wasfirst = isfirst; + sc.SetState(SCE_B_IDENTIFIER); + } else if (sc.Match(comment_char)) { + // Hack to make deprecated QBASIC '$Include show + // up in freebasic with SCE_B_PREPROCESSOR. + if (comment_char == '\'' && sc.Match(comment_char, '$')) + sc.SetState(SCE_B_PREPROCESSOR); + else if (sc.Match("\'*") || sc.Match("\'!")) { + sc.SetState(SCE_B_DOCLINE); + } else { + sc.SetState(SCE_B_COMMENT); + } + } else if (sc.Match("/\'")) { + if (sc.Match("/\'*") || sc.Match("/\'!")) { // Support of gtk-doc/Doxygen doc. style + sc.SetState(SCE_B_DOCBLOCK); + } else { + sc.SetState(SCE_B_COMMENTBLOCK); + } + sc.Forward(); // Eat the ' so it isn't used for the end of the comment + } else if (sc.Match('"')) { + sc.SetState(SCE_B_STRING); + } else if (IsDigit(sc.ch)) { + sc.SetState(SCE_B_NUMBER); + } else if (sc.Match('$') || sc.Match("&h") || sc.Match("&H") || sc.Match("&o") || sc.Match("&O")) { + sc.SetState(SCE_B_HEXNUMBER); + } else if (sc.Match('%') || sc.Match("&b") || sc.Match("&B")) { + sc.SetState(SCE_B_BINNUMBER); + } else if (sc.Match('#')) { + sc.SetState(SCE_B_CONSTANT); + } else if (IsOperator(sc.ch)) { + sc.SetState(SCE_B_OPERATOR); + } else if (IsIdentifier(sc.ch)) { + wasfirst = isfirst; + sc.SetState(SCE_B_IDENTIFIER); + } else if (!IsSpace(sc.ch)) { + sc.SetState(SCE_B_ERROR); + } + } + + if (!IsSpace(sc.ch)) + isfirst = false; + + if (!sc.More()) + break; + } + sc.Complete(); +} + + +void SCI_METHOD LexerBasic::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) { + + if (!options.fold) + return; + + LexAccessor styler(pAccess); + + Sci_Position line = styler.GetLine(startPos); + int level = styler.LevelAt(line); + int go = 0, done = 0; + Sci_Position endPos = startPos + length; + char word[256]; + int wordlen = 0; + const bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty(); + int cNext = styler[startPos]; + + // Scan for tokens at the start of the line (they may include + // whitespace, for tokens like "End Function" + for (Sci_Position i = startPos; i < endPos; i++) { + int c = cNext; + cNext = styler.SafeGetCharAt(i + 1); + bool atEOL = (c == '\r' && cNext != '\n') || (c == '\n'); + if (options.foldSyntaxBased && !done && !go) { + if (wordlen) { // are we scanning a token already? + word[wordlen] = static_cast(LowerCase(c)); + if (!IsIdentifier(c)) { // done with token + word[wordlen] = '\0'; + go = CheckFoldPoint(word, level); + if (!go) { + // Treat any whitespace as single blank, for + // things like "End Function". + if (IsSpace(c) && IsIdentifier(word[wordlen - 1])) { + word[wordlen] = ' '; + if (wordlen < 255) + wordlen++; + } + else // done with this line + done = 1; + } + } else if (wordlen < 255) { + wordlen++; + } + } else { // start scanning at first non-whitespace character + if (!IsSpace(c)) { + if (IsIdentifier(c)) { + word[0] = static_cast(LowerCase(c)); + wordlen = 1; + } else // done with this line + done = 1; + } + } + } + if (options.foldCommentExplicit && ((styler.StyleAt(i) == SCE_B_COMMENT) || options.foldExplicitAnywhere)) { + if (userDefinedFoldMarkers) { + if (styler.Match(i, options.foldExplicitStart.c_str())) { + level |= SC_FOLDLEVELHEADERFLAG; + go = 1; + } else if (styler.Match(i, options.foldExplicitEnd.c_str())) { + go = -1; + } + } else { + if (c == comment_char) { + if (cNext == '{') { + level |= SC_FOLDLEVELHEADERFLAG; + go = 1; + } else if (cNext == '}') { + go = -1; + } + } + } + } + if (atEOL) { // line end + if (!done && wordlen == 0 && options.foldCompact) // line was only space + level |= SC_FOLDLEVELWHITEFLAG; + if (level != styler.LevelAt(line)) + styler.SetLevel(line, level); + level += go; + line++; + // reset state + wordlen = 0; + level &= ~SC_FOLDLEVELHEADERFLAG; + level &= ~SC_FOLDLEVELWHITEFLAG; + go = 0; + done = 0; + } + } +} + +LexerModule lmBlitzBasic(SCLEX_BLITZBASIC, LexerBasic::LexerFactoryBlitzBasic, "blitzbasic", blitzbasicWordListDesc); + +LexerModule lmPureBasic(SCLEX_PUREBASIC, LexerBasic::LexerFactoryPureBasic, "purebasic", purebasicWordListDesc); + +LexerModule lmFreeBasic(SCLEX_FREEBASIC, LexerBasic::LexerFactoryFreeBasic, "freebasic", freebasicWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexBatch.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexBatch.cpp new file mode 100644 index 000000000..db7e37688 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexBatch.cpp @@ -0,0 +1,498 @@ +// Scintilla source code edit control +/** @file LexBatch.cxx + ** Lexer for batch files. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static bool Is0To9(char ch) { + return (ch >= '0') && (ch <= '9'); +} + +static bool IsAlphabetic(int ch) { + return IsASCII(ch) && isalpha(ch); +} + +static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { + return (styler[i] == '\n') || + ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); +} + +// Tests for BATCH Operators +static bool IsBOperator(char ch) { + return (ch == '=') || (ch == '+') || (ch == '>') || (ch == '<') || + (ch == '|') || (ch == '?') || (ch == '*'); +} + +// Tests for BATCH Separators +static bool IsBSeparator(char ch) { + return (ch == '\\') || (ch == '.') || (ch == ';') || + (ch == '\"') || (ch == '\'') || (ch == '/'); +} + +static void ColouriseBatchLine( + char *lineBuffer, + Sci_PositionU lengthLine, + Sci_PositionU startLine, + Sci_PositionU endPos, + WordList *keywordlists[], + Accessor &styler) { + + Sci_PositionU offset = 0; // Line Buffer Offset + Sci_PositionU cmdLoc; // External Command / Program Location + char wordBuffer[81]; // Word Buffer - large to catch long paths + Sci_PositionU wbl; // Word Buffer Length + Sci_PositionU wbo; // Word Buffer Offset - also Special Keyword Buffer Length + WordList &keywords = *keywordlists[0]; // Internal Commands + WordList &keywords2 = *keywordlists[1]; // External Commands (optional) + + // CHOICE, ECHO, GOTO, PROMPT and SET have Default Text that may contain Regular Keywords + // Toggling Regular Keyword Checking off improves readability + // Other Regular Keywords and External Commands / Programs might also benefit from toggling + // Need a more robust algorithm to properly toggle Regular Keyword Checking + bool continueProcessing = true; // Used to toggle Regular Keyword Checking + // Special Keywords are those that allow certain characters without whitespace after the command + // Examples are: cd. cd\ md. rd. dir| dir> echo: echo. path= + // Special Keyword Buffer used to determine if the first n characters is a Keyword + char sKeywordBuffer[10]; // Special Keyword Buffer + bool sKeywordFound; // Exit Special Keyword for-loop if found + + // Skip initial spaces + while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) { + offset++; + } + // Colorize Default Text + styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT); + // Set External Command / Program Location + cmdLoc = offset; + + // Check for Fake Label (Comment) or Real Label - return if found + if (lineBuffer[offset] == ':') { + if (lineBuffer[offset + 1] == ':') { + // Colorize Fake Label (Comment) - :: is similar to REM, see http://content.techweb.com/winmag/columns/explorer/2000/21.htm + styler.ColourTo(endPos, SCE_BAT_COMMENT); + } else { + // Colorize Real Label + styler.ColourTo(endPos, SCE_BAT_LABEL); + } + return; + // Check for Drive Change (Drive Change is internal command) - return if found + } else if ((IsAlphabetic(lineBuffer[offset])) && + (lineBuffer[offset + 1] == ':') && + ((isspacechar(lineBuffer[offset + 2])) || + (((lineBuffer[offset + 2] == '\\')) && + (isspacechar(lineBuffer[offset + 3]))))) { + // Colorize Regular Keyword + styler.ColourTo(endPos, SCE_BAT_WORD); + return; + } + + // Check for Hide Command (@ECHO OFF/ON) + if (lineBuffer[offset] == '@') { + styler.ColourTo(startLine + offset, SCE_BAT_HIDE); + offset++; + } + // Skip next spaces + while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) { + offset++; + } + + // Read remainder of line word-at-a-time or remainder-of-word-at-a-time + while (offset < lengthLine) { + if (offset > startLine) { + // Colorize Default Text + styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT); + } + // Copy word from Line Buffer into Word Buffer + wbl = 0; + for (; offset < lengthLine && wbl < 80 && + !isspacechar(lineBuffer[offset]); wbl++, offset++) { + wordBuffer[wbl] = static_cast(tolower(lineBuffer[offset])); + } + wordBuffer[wbl] = '\0'; + wbo = 0; + + // Check for Comment - return if found + if (CompareCaseInsensitive(wordBuffer, "rem") == 0) { + styler.ColourTo(endPos, SCE_BAT_COMMENT); + return; + } + // Check for Separator + if (IsBSeparator(wordBuffer[0])) { + // Check for External Command / Program + if ((cmdLoc == offset - wbl) && + ((wordBuffer[0] == ':') || + (wordBuffer[0] == '\\') || + (wordBuffer[0] == '.'))) { + // Reset Offset to re-process remainder of word + offset -= (wbl - 1); + // Colorize External Command / Program + if (!keywords2) { + styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND); + } else if (keywords2.InList(wordBuffer)) { + styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND); + } else { + styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT); + } + // Reset External Command / Program Location + cmdLoc = offset; + } else { + // Reset Offset to re-process remainder of word + offset -= (wbl - 1); + // Colorize Default Text + styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT); + } + // Check for Regular Keyword in list + } else if ((keywords.InList(wordBuffer)) && + (continueProcessing)) { + // ECHO, GOTO, PROMPT and SET require no further Regular Keyword Checking + if ((CompareCaseInsensitive(wordBuffer, "echo") == 0) || + (CompareCaseInsensitive(wordBuffer, "goto") == 0) || + (CompareCaseInsensitive(wordBuffer, "prompt") == 0) || + (CompareCaseInsensitive(wordBuffer, "set") == 0)) { + continueProcessing = false; + } + // Identify External Command / Program Location for ERRORLEVEL, and EXIST + if ((CompareCaseInsensitive(wordBuffer, "errorlevel") == 0) || + (CompareCaseInsensitive(wordBuffer, "exist") == 0)) { + // Reset External Command / Program Location + cmdLoc = offset; + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Skip comparison + while ((cmdLoc < lengthLine) && + (!isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Identify External Command / Program Location for CALL, DO, LOADHIGH and LH + } else if ((CompareCaseInsensitive(wordBuffer, "call") == 0) || + (CompareCaseInsensitive(wordBuffer, "do") == 0) || + (CompareCaseInsensitive(wordBuffer, "loadhigh") == 0) || + (CompareCaseInsensitive(wordBuffer, "lh") == 0)) { + // Reset External Command / Program Location + cmdLoc = offset; + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + } + // Colorize Regular keyword + styler.ColourTo(startLine + offset - 1, SCE_BAT_WORD); + // No need to Reset Offset + // Check for Special Keyword in list, External Command / Program, or Default Text + } else if ((wordBuffer[0] != '%') && + (wordBuffer[0] != '!') && + (!IsBOperator(wordBuffer[0])) && + (continueProcessing)) { + // Check for Special Keyword + // Affected Commands are in Length range 2-6 + // Good that ERRORLEVEL, EXIST, CALL, DO, LOADHIGH, and LH are unaffected + sKeywordFound = false; + for (Sci_PositionU keywordLength = 2; keywordLength < wbl && keywordLength < 7 && !sKeywordFound; keywordLength++) { + wbo = 0; + // Copy Keyword Length from Word Buffer into Special Keyword Buffer + for (; wbo < keywordLength; wbo++) { + sKeywordBuffer[wbo] = static_cast(wordBuffer[wbo]); + } + sKeywordBuffer[wbo] = '\0'; + // Check for Special Keyword in list + if ((keywords.InList(sKeywordBuffer)) && + ((IsBOperator(wordBuffer[wbo])) || + (IsBSeparator(wordBuffer[wbo])))) { + sKeywordFound = true; + // ECHO requires no further Regular Keyword Checking + if (CompareCaseInsensitive(sKeywordBuffer, "echo") == 0) { + continueProcessing = false; + } + // Colorize Special Keyword as Regular Keyword + styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_WORD); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + } + } + // Check for External Command / Program or Default Text + if (!sKeywordFound) { + wbo = 0; + // Check for External Command / Program + if (cmdLoc == offset - wbl) { + // Read up to %, Operator or Separator + while ((wbo < wbl) && + (wordBuffer[wbo] != '%') && + (wordBuffer[wbo] != '!') && + (!IsBOperator(wordBuffer[wbo])) && + (!IsBSeparator(wordBuffer[wbo]))) { + wbo++; + } + // Reset External Command / Program Location + cmdLoc = offset - (wbl - wbo); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + // CHOICE requires no further Regular Keyword Checking + if (CompareCaseInsensitive(wordBuffer, "choice") == 0) { + continueProcessing = false; + } + // Check for START (and its switches) - What follows is External Command \ Program + if (CompareCaseInsensitive(wordBuffer, "start") == 0) { + // Reset External Command / Program Location + cmdLoc = offset; + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Reset External Command / Program Location if command switch detected + if (lineBuffer[cmdLoc] == '/') { + // Skip command switch + while ((cmdLoc < lengthLine) && + (!isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + } + } + // Colorize External Command / Program + if (!keywords2) { + styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND); + } else if (keywords2.InList(wordBuffer)) { + styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND); + } else { + styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT); + } + // No need to Reset Offset + // Check for Default Text + } else { + // Read up to %, Operator or Separator + while ((wbo < wbl) && + (wordBuffer[wbo] != '%') && + (wordBuffer[wbo] != '!') && + (!IsBOperator(wordBuffer[wbo])) && + (!IsBSeparator(wordBuffer[wbo]))) { + wbo++; + } + // Colorize Default Text + styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + } + } + // Check for Argument (%n), Environment Variable (%x...%) or Local Variable (%%a) + } else if (wordBuffer[0] == '%') { + // Colorize Default Text + styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT); + wbo++; + // Search to end of word for second % (can be a long path) + while ((wbo < wbl) && + (wordBuffer[wbo] != '%') && + (!IsBOperator(wordBuffer[wbo])) && + (!IsBSeparator(wordBuffer[wbo]))) { + wbo++; + } + // Check for Argument (%n) or (%*) + if (((Is0To9(wordBuffer[1])) || (wordBuffer[1] == '*')) && + (wordBuffer[wbo] != '%')) { + // Check for External Command / Program + if (cmdLoc == offset - wbl) { + cmdLoc = offset - (wbl - 2); + } + // Colorize Argument + styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_IDENTIFIER); + // Reset Offset to re-process remainder of word + offset -= (wbl - 2); + // Check for Expanded Argument (%~...) / Variable (%%~...) + } else if (((wbl > 1) && (wordBuffer[1] == '~')) || + ((wbl > 2) && (wordBuffer[1] == '%') && (wordBuffer[2] == '~'))) { + // Check for External Command / Program + if (cmdLoc == offset - wbl) { + cmdLoc = offset - (wbl - wbo); + } + // Colorize Expanded Argument / Variable + styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + // Check for Environment Variable (%x...%) + } else if ((wordBuffer[1] != '%') && + (wordBuffer[wbo] == '%')) { + wbo++; + // Check for External Command / Program + if (cmdLoc == offset - wbl) { + cmdLoc = offset - (wbl - wbo); + } + // Colorize Environment Variable + styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + // Check for Local Variable (%%a) + } else if ( + (wbl > 2) && + (wordBuffer[1] == '%') && + (wordBuffer[2] != '%') && + (!IsBOperator(wordBuffer[2])) && + (!IsBSeparator(wordBuffer[2]))) { + // Check for External Command / Program + if (cmdLoc == offset - wbl) { + cmdLoc = offset - (wbl - 3); + } + // Colorize Local Variable + styler.ColourTo(startLine + offset - 1 - (wbl - 3), SCE_BAT_IDENTIFIER); + // Reset Offset to re-process remainder of word + offset -= (wbl - 3); + } + // Check for Environment Variable (!x...!) + } else if (wordBuffer[0] == '!') { + // Colorize Default Text + styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT); + wbo++; + // Search to end of word for second ! (can be a long path) + while ((wbo < wbl) && + (wordBuffer[wbo] != '!') && + (!IsBOperator(wordBuffer[wbo])) && + (!IsBSeparator(wordBuffer[wbo]))) { + wbo++; + } + if (wordBuffer[wbo] == '!') { + wbo++; + // Check for External Command / Program + if (cmdLoc == offset - wbl) { + cmdLoc = offset - (wbl - wbo); + } + // Colorize Environment Variable + styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + } + // Check for Operator + } else if (IsBOperator(wordBuffer[0])) { + // Colorize Default Text + styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT); + // Check for Comparison Operator + if ((wordBuffer[0] == '=') && (wordBuffer[1] == '=')) { + // Identify External Command / Program Location for IF + cmdLoc = offset; + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Colorize Comparison Operator + styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_OPERATOR); + // Reset Offset to re-process remainder of word + offset -= (wbl - 2); + // Check for Pipe Operator + } else if (wordBuffer[0] == '|') { + // Reset External Command / Program Location + cmdLoc = offset - wbl + 1; + // Skip next spaces + while ((cmdLoc < lengthLine) && + (isspacechar(lineBuffer[cmdLoc]))) { + cmdLoc++; + } + // Colorize Pipe Operator + styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR); + // Reset Offset to re-process remainder of word + offset -= (wbl - 1); + // Check for Other Operator + } else { + // Check for > Operator + if (wordBuffer[0] == '>') { + // Turn Keyword and External Command / Program checking back on + continueProcessing = true; + } + // Colorize Other Operator + styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR); + // Reset Offset to re-process remainder of word + offset -= (wbl - 1); + } + // Check for Default Text + } else { + // Read up to %, Operator or Separator + while ((wbo < wbl) && + (wordBuffer[wbo] != '%') && + (wordBuffer[wbo] != '!') && + (!IsBOperator(wordBuffer[wbo])) && + (!IsBSeparator(wordBuffer[wbo]))) { + wbo++; + } + // Colorize Default Text + styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT); + // Reset Offset to re-process remainder of word + offset -= (wbl - wbo); + } + // Skip next spaces - nothing happens if Offset was Reset + while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) { + offset++; + } + } + // Colorize Default Text for remainder of line - currently not lexed + styler.ColourTo(endPos, SCE_BAT_DEFAULT); +} + +static void ColouriseBatchDoc( + Sci_PositionU startPos, + Sci_Position length, + int /*initStyle*/, + WordList *keywordlists[], + Accessor &styler) { + + char lineBuffer[1024]; + + styler.StartAt(startPos); + styler.StartSegment(startPos); + Sci_PositionU linePos = 0; + Sci_PositionU startLine = startPos; + for (Sci_PositionU i = startPos; i < startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { + // End of line (or of line buffer) met, colourise it + lineBuffer[linePos] = '\0'; + ColouriseBatchLine(lineBuffer, linePos, startLine, i, keywordlists, styler); + linePos = 0; + startLine = i + 1; + } + } + if (linePos > 0) { // Last line does not have ending characters + lineBuffer[linePos] = '\0'; + ColouriseBatchLine(lineBuffer, linePos, startLine, startPos + length - 1, + keywordlists, styler); + } +} + +static const char *const batchWordListDesc[] = { + "Internal Commands", + "External Commands", + 0 +}; + +LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexBibTeX.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexBibTeX.cpp new file mode 100644 index 000000000..7e4cb9fc1 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexBibTeX.cpp @@ -0,0 +1,308 @@ +// Copyright 2008-2010 Sergiu Dotenco. The License.txt file describes the +// conditions under which this software may be distributed. + +/** + * @file LexBibTeX.cxx + * @brief General BibTeX coloring scheme. + * @author Sergiu Dotenco + * @date April 18, 2009 + */ + +#include +#include + +#include +#include + +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +namespace { + bool IsAlphabetic(unsigned int ch) + { + return IsASCII(ch) && std::isalpha(ch) != 0; + } + bool IsAlphaNumeric(char ch) + { + return IsASCII(ch) && std::isalnum(ch); + } + + bool EqualCaseInsensitive(const char* a, const char* b) + { + return CompareCaseInsensitive(a, b) == 0; + } + + bool EntryWithoutKey(const char* name) + { + return EqualCaseInsensitive(name,"string"); + } + + char GetClosingBrace(char openbrace) + { + char result = openbrace; + + switch (openbrace) { + case '(': result = ')'; break; + case '{': result = '}'; break; + } + + return result; + } + + bool IsEntryStart(char prev, char ch) + { + return prev != '\\' && ch == '@'; + } + + bool IsEntryStart(const StyleContext& sc) + { + return IsEntryStart(sc.chPrev, sc.ch); + } + + void ColorizeBibTeX(Sci_PositionU start_pos, Sci_Position length, int /*init_style*/, WordList* keywordlists[], Accessor& styler) + { + WordList &EntryNames = *keywordlists[0]; + bool fold_compact = styler.GetPropertyInt("fold.compact", 1) != 0; + + std::string buffer; + buffer.reserve(25); + + // We always colorize a section from the beginning, so let's + // search for the @ character which isn't escaped, i.e. \@ + while (start_pos > 0 && !IsEntryStart(styler.SafeGetCharAt(start_pos - 1), + styler.SafeGetCharAt(start_pos))) { + --start_pos; ++length; + } + + styler.StartAt(start_pos); + styler.StartSegment(start_pos); + + Sci_Position current_line = styler.GetLine(start_pos); + int prev_level = styler.LevelAt(current_line) & SC_FOLDLEVELNUMBERMASK; + int current_level = prev_level; + int visible_chars = 0; + + bool in_comment = false ; + StyleContext sc(start_pos, length, SCE_BIBTEX_DEFAULT, styler); + + bool going = sc.More(); // needed because of a fuzzy end of file state + char closing_brace = 0; + bool collect_entry_name = false; + + for (; going; sc.Forward()) { + if (!sc.More()) + going = false; // we need to go one behind the end of text + + if (in_comment) { + if (sc.atLineEnd) { + sc.SetState(SCE_BIBTEX_DEFAULT); + in_comment = false; + } + } + else { + // Found @entry + if (IsEntryStart(sc)) { + sc.SetState(SCE_BIBTEX_UNKNOWN_ENTRY); + sc.Forward(); + ++current_level; + + buffer.clear(); + collect_entry_name = true; + } + else if ((sc.state == SCE_BIBTEX_ENTRY || sc.state == SCE_BIBTEX_UNKNOWN_ENTRY) + && (sc.ch == '{' || sc.ch == '(')) { + // Entry name colorization done + // Found either a { or a ( after entry's name, e.g. @entry(...) @entry{...} + // Closing counterpart needs to be stored. + closing_brace = GetClosingBrace(sc.ch); + + sc.SetState(SCE_BIBTEX_DEFAULT); // Don't colorize { ( + + // @string doesn't have any key + if (EntryWithoutKey(buffer.c_str())) + sc.ForwardSetState(SCE_BIBTEX_PARAMETER); + else + sc.ForwardSetState(SCE_BIBTEX_KEY); // Key/label colorization + } + + // Need to handle the case where entry's key is empty + // e.g. @book{,...} + if (sc.state == SCE_BIBTEX_KEY && sc.ch == ',') { + // Key/label colorization done + sc.SetState(SCE_BIBTEX_DEFAULT); // Don't colorize the , + sc.ForwardSetState(SCE_BIBTEX_PARAMETER); // Parameter colorization + } + else if (sc.state == SCE_BIBTEX_PARAMETER && sc.ch == '=') { + sc.SetState(SCE_BIBTEX_DEFAULT); // Don't colorize the = + sc.ForwardSetState(SCE_BIBTEX_VALUE); // Parameter value colorization + + Sci_Position start = sc.currentPos; + + // We need to handle multiple situations: + // 1. name"one two {three}" + // 2. name={one {one two {two}} three} + // 3. year=2005 + + // Skip ", { until we encounter the first alphanumerical character + while (sc.More() && !(IsAlphaNumeric(sc.ch) || sc.ch == '"' || sc.ch == '{')) + sc.Forward(); + + if (sc.More()) { + // Store " or { + char ch = sc.ch; + + // Not interested in alphanumerical characters + if (IsAlphaNumeric(ch)) + ch = 0; + + int skipped = 0; + + if (ch) { + // Skip preceding " or { such as in name={{test}}. + // Remember how many characters have been skipped + // Make sure that empty values, i.e. "" are also handled correctly + while (sc.More() && (sc.ch == ch && (ch != '"' || skipped < 1))) { + sc.Forward(); + ++skipped; + } + } + + // Closing counterpart for " is the same character + if (ch == '{') + ch = '}'; + + // We have reached the parameter value + // In case the open character was a alnum char, skip until , is found + // otherwise until skipped == 0 + while (sc.More() && (skipped > 0 || (!ch && !(sc.ch == ',' || sc.ch == closing_brace)))) { + // Make sure the character isn't escaped + if (sc.chPrev != '\\') { + // Parameter value contains a { which is the 2nd case described above + if (sc.ch == '{') + ++skipped; // Remember it + else if (sc.ch == '}') + --skipped; + else if (skipped == 1 && sc.ch == ch && ch == '"') // Don't ignore cases like {"o} + skipped = 0; + } + + sc.Forward(); + } + } + + // Don't colorize the , + sc.SetState(SCE_BIBTEX_DEFAULT); + + // Skip until the , or entry's closing closing_brace is found + // since this parameter might be the last one + while (sc.More() && !(sc.ch == ',' || sc.ch == closing_brace)) + sc.Forward(); + + int state = SCE_BIBTEX_PARAMETER; // The might be more parameters + + // We've reached the closing closing_brace for the bib entry + // in case no " or {} has been used to enclose the value, + // as in 3rd case described above + if (sc.ch == closing_brace) { + --current_level; + // Make sure the text between entries is not colored + // using parameter's style + state = SCE_BIBTEX_DEFAULT; + } + + Sci_Position end = sc.currentPos; + current_line = styler.GetLine(end); + + // We have possibly skipped some lines, so the folding levels + // have to be adjusted separately + for (Sci_Position i = styler.GetLine(start); i <= styler.GetLine(end); ++i) + styler.SetLevel(i, prev_level); + + sc.ForwardSetState(state); + } + + if (sc.state == SCE_BIBTEX_PARAMETER && sc.ch == closing_brace) { + sc.SetState(SCE_BIBTEX_DEFAULT); + --current_level; + } + + // Non escaped % found which represents a comment until the end of the line + if (sc.chPrev != '\\' && sc.ch == '%') { + in_comment = true; + sc.SetState(SCE_BIBTEX_COMMENT); + } + } + + if (sc.state == SCE_BIBTEX_UNKNOWN_ENTRY || sc.state == SCE_BIBTEX_ENTRY) { + if (!IsAlphabetic(sc.ch) && collect_entry_name) + collect_entry_name = false; + + if (collect_entry_name) { + buffer += static_cast(tolower(sc.ch)); + if (EntryNames.InList(buffer.c_str())) + sc.ChangeState(SCE_BIBTEX_ENTRY); + else + sc.ChangeState(SCE_BIBTEX_UNKNOWN_ENTRY); + } + } + + if (sc.atLineEnd) { + int level = prev_level; + + if (visible_chars == 0 && fold_compact) + level |= SC_FOLDLEVELWHITEFLAG; + + if ((current_level > prev_level)) + level |= SC_FOLDLEVELHEADERFLAG; + // else if (current_level < prev_level) + // level |= SC_FOLDLEVELBOXFOOTERFLAG; // Deprecated + + if (level != styler.LevelAt(current_line)) { + styler.SetLevel(current_line, level); + } + + ++current_line; + prev_level = current_level; + visible_chars = 0; + } + + if (!isspacechar(sc.ch)) + ++visible_chars; + } + + sc.Complete(); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(current_line) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(current_line, prev_level | flagsNext); + } +} +static const char * const BibTeXWordLists[] = { + "Entry Names", + 0, +}; + + +LexerModule lmBibTeX(SCLEX_BIBTEX, ColorizeBibTeX, "bib", 0, BibTeXWordLists); + +// Entry Names +// article, book, booklet, conference, inbook, +// incollection, inproceedings, manual, mastersthesis, +// misc, phdthesis, proceedings, techreport, unpublished, +// string, url + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexBullant.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexBullant.cpp new file mode 100644 index 000000000..2386d2252 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexBullant.cpp @@ -0,0 +1,231 @@ +// SciTE - Scintilla based Text Editor +// LexBullant.cxx - lexer for Bullant + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static int classifyWordBullant(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) { + char s[100]; + s[0] = '\0'; + for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + int lev= 0; + char chAttr = SCE_C_IDENTIFIER; + if (isdigit(s[0]) || (s[0] == '.')){ + chAttr = SCE_C_NUMBER; + } + else { + if (keywords.InList(s)) { + chAttr = SCE_C_WORD; + if (strcmp(s, "end") == 0) + lev = -1; + else if (strcmp(s, "method") == 0 || + strcmp(s, "case") == 0 || + strcmp(s, "class") == 0 || + strcmp(s, "debug") == 0 || + strcmp(s, "test") == 0 || + strcmp(s, "if") == 0 || + strcmp(s, "lock") == 0 || + strcmp(s, "transaction") == 0 || + strcmp(s, "trap") == 0 || + strcmp(s, "until") == 0 || + strcmp(s, "while") == 0) + lev = 1; + } + } + styler.ColourTo(end, chAttr); + return lev; +} + +static void ColouriseBullantDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold") != 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + + int state = initStyle; + if (state == SCE_C_STRINGEOL) // Does not leak onto next line + state = SCE_C_DEFAULT; + char chPrev = ' '; + char chNext = styler[startPos]; + Sci_PositionU lengthDoc = startPos + length; + int visibleChars = 0; + styler.StartSegment(startPos); + int endFoundThisLine = 0; + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // End of line + endFoundThisLine = 0; + if (state == SCE_C_STRINGEOL) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + levelPrev = levelCurrent; + } + visibleChars = 0; + +/* int indentBlock = GetLineIndentation(lineCurrent); + if (blockChange==1){ + lineCurrent++; + int pos=SetLineIndentation(lineCurrent, indentBlock + indentSize); + } else if (blockChange==-1) { + indentBlock -= indentSize; + if (indentBlock < 0) + indentBlock = 0; + SetLineIndentation(lineCurrent, indentBlock); + lineCurrent++; + } + blockChange=0; +*/ } + if (!(IsASCII(ch) && isspace(ch))) + visibleChars++; + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i-1, state); + state = SCE_C_IDENTIFIER; + } else if (ch == '@' && chNext == 'o') { + if ((styler.SafeGetCharAt(i+2) =='f') && (styler.SafeGetCharAt(i+3) == 'f')) { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENT; + } + } else if (ch == '#') { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_STRING; + } else if (ch == '\'') { + styler.ColourTo(i-1, state); + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_IDENTIFIER) { + if (!iswordchar(ch)) { + int levelChange = classifyWordBullant(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + chNext = styler.SafeGetCharAt(i + 1); + if (ch == '#') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (ch == '\'') { + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + if (endFoundThisLine == 0) + levelCurrent+=levelChange; + if (levelChange == -1) + endFoundThisLine=1; + } + } else if (state == SCE_C_COMMENT) { + if (ch == '@' && chNext == 'o') { + if (styler.SafeGetCharAt(i+2) == 'n') { + styler.ColourTo(i+2, state); + state = SCE_C_DEFAULT; + i+=2; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + endFoundThisLine = 0; + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } else if (chNext == '\r' || chNext == '\n') { + endFoundThisLine = 0; + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } + } else if (state == SCE_C_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + endFoundThisLine = 0; + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +static const char * const bullantWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBullant(SCLEX_BULLANT, ColouriseBullantDoc, "bullant", 0, bullantWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCLW.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCLW.cpp new file mode 100644 index 000000000..d469d6bfd --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCLW.cpp @@ -0,0 +1,680 @@ +// Scintilla source code edit control +/** @file LexClw.cxx + ** Lexer for Clarion. + ** 2004/12/17 Updated Lexer + **/ +// Copyright 2003-2004 by Ron Schofield +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +// Is an end of line character +inline bool IsEOL(const int ch) { + + return(ch == '\n'); +} + +// Convert character to uppercase +static char CharacterUpper(char chChar) { + + if (chChar < 'a' || chChar > 'z') { + return(chChar); + } + else { + return(static_cast(chChar - 'a' + 'A')); + } +} + +// Convert string to uppercase +static void StringUpper(char *szString) { + + while (*szString) { + *szString = CharacterUpper(*szString); + szString++; + } +} + +// Is a label start character +inline bool IsALabelStart(const int iChar) { + + return(isalpha(iChar) || iChar == '_'); +} + +// Is a label character +inline bool IsALabelCharacter(const int iChar) { + + return(isalnum(iChar) || iChar == '_' || iChar == ':'); +} + +// Is the character is a ! and the the next character is not a ! +inline bool IsACommentStart(const int iChar) { + + return(iChar == '!'); +} + +// Is the character a Clarion hex character (ABCDEF) +inline bool IsAHexCharacter(const int iChar, bool bCaseSensitive) { + + // Case insensitive. + if (!bCaseSensitive) { + if (strchr("ABCDEFabcdef", iChar) != NULL) { + return(true); + } + } + // Case sensitive + else { + if (strchr("ABCDEF", iChar) != NULL) { + return(true); + } + } + return(false); +} + +// Is the character a Clarion base character (B=Binary, O=Octal, H=Hex) +inline bool IsANumericBaseCharacter(const int iChar, bool bCaseSensitive) { + + // Case insensitive. + if (!bCaseSensitive) { + // If character is a numeric base character + if (strchr("BOHboh", iChar) != NULL) { + return(true); + } + } + // Case sensitive + else { + // If character is a numeric base character + if (strchr("BOH", iChar) != NULL) { + return(true); + } + } + return(false); +} + +// Set the correct numeric constant state +inline bool SetNumericConstantState(StyleContext &scDoc) { + + int iPoints = 0; // Point counter + char cNumericString[512]; // Numeric string buffer + + // Buffer the current numberic string + scDoc.GetCurrent(cNumericString, sizeof(cNumericString)); + // Loop through the string until end of string (NULL termination) + for (int iIndex = 0; cNumericString[iIndex] != '\0'; iIndex++) { + // Depending on the character + switch (cNumericString[iIndex]) { + // Is a . (point) + case '.' : + // Increment point counter + iPoints++; + break; + default : + break; + } + } + // If points found (can be more than one for improper formatted number + if (iPoints > 0) { + return(true); + } + // Else no points found + else { + return(false); + } +} + +// Get the next word in uppercase from the current position (keyword lookahead) +inline bool GetNextWordUpper(Accessor &styler, Sci_PositionU uiStartPos, Sci_Position iLength, char *cWord) { + + Sci_PositionU iIndex = 0; // Buffer Index + + // Loop through the remaining string from the current position + for (Sci_Position iOffset = uiStartPos; iOffset < iLength; iOffset++) { + // Get the character from the buffer using the offset + char cCharacter = styler[iOffset]; + if (IsEOL(cCharacter)) { + break; + } + // If the character is alphabet character + if (isalpha(cCharacter)) { + // Add UPPERCASE character to the word buffer + cWord[iIndex++] = CharacterUpper(cCharacter); + } + } + // Add null termination + cWord[iIndex] = '\0'; + // If no word was found + if (iIndex == 0) { + // Return failure + return(false); + } + // Else word was found + else { + // Return success + return(true); + } +} + +// Clarion Language Colouring Procedure +static void ColouriseClarionDoc(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler, bool bCaseSensitive) { + + int iParenthesesLevel = 0; // Parenthese Level + int iColumn1Label = false; // Label starts in Column 1 + + WordList &wlClarionKeywords = *wlKeywords[0]; // Clarion Keywords + WordList &wlCompilerDirectives = *wlKeywords[1]; // Compiler Directives + WordList &wlRuntimeExpressions = *wlKeywords[2]; // Runtime Expressions + WordList &wlBuiltInProcsFuncs = *wlKeywords[3]; // Builtin Procedures and Functions + WordList &wlStructsDataTypes = *wlKeywords[4]; // Structures and Data Types + WordList &wlAttributes = *wlKeywords[5]; // Procedure Attributes + WordList &wlStandardEquates = *wlKeywords[6]; // Standard Equates + WordList &wlLabelReservedWords = *wlKeywords[7]; // Clarion Reserved Keywords (Labels) + WordList &wlProcLabelReservedWords = *wlKeywords[8]; // Clarion Reserved Keywords (Procedure Labels) + + const char wlProcReservedKeywordList[] = + "PROCEDURE FUNCTION"; + WordList wlProcReservedKeywords; + wlProcReservedKeywords.Set(wlProcReservedKeywordList); + + const char wlCompilerKeywordList[] = + "COMPILE OMIT"; + WordList wlCompilerKeywords; + wlCompilerKeywords.Set(wlCompilerKeywordList); + + const char wlLegacyStatementsList[] = + "BOF EOF FUNCTION POINTER SHARE"; + WordList wlLegacyStatements; + wlLegacyStatements.Set(wlLegacyStatementsList); + + StyleContext scDoc(uiStartPos, iLength, iInitStyle, accStyler); + + // lex source code + for (; scDoc.More(); scDoc.Forward()) + { + // + // Determine if the current state should terminate. + // + + // Label State Handling + if (scDoc.state == SCE_CLW_LABEL) { + // If the character is not a valid label + if (!IsALabelCharacter(scDoc.ch)) { + // If the character is a . (dot syntax) + if (scDoc.ch == '.') { + // Turn off column 1 label flag as label now cannot be reserved work + iColumn1Label = false; + // Uncolour the . (dot) to default state, move forward one character, + // and change back to the label state. + scDoc.SetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + scDoc.SetState(SCE_CLW_LABEL); + } + // Else check label + else { + char cLabel[512]; // Label buffer + // Buffer the current label string + scDoc.GetCurrent(cLabel,sizeof(cLabel)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cLabel); + } + // Else if UPPERCASE label string is in the Clarion compiler keyword list + if (wlCompilerKeywords.InList(cLabel) && iColumn1Label){ + // change the label to error state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Else if UPPERCASE label string is in the Clarion reserved keyword list + else if (wlLabelReservedWords.InList(cLabel) && iColumn1Label){ + // change the label to error state + scDoc.ChangeState(SCE_CLW_ERROR); + } + // Else if UPPERCASE label string is + else if (wlProcLabelReservedWords.InList(cLabel) && iColumn1Label) { + char cWord[512]; // Word buffer + // Get the next word from the current position + if (GetNextWordUpper(accStyler,scDoc.currentPos,uiStartPos+iLength,cWord)) { + // If the next word is a procedure reserved word + if (wlProcReservedKeywords.InList(cWord)) { + // Change the label to error state + scDoc.ChangeState(SCE_CLW_ERROR); + } + } + } + // Else if label string is in the compiler directive keyword list + else if (wlCompilerDirectives.InList(cLabel)) { + // change the state to compiler directive state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Terminate the label state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + } + // Keyword State Handling + else if (scDoc.state == SCE_CLW_KEYWORD) { + // If character is : (colon) + if (scDoc.ch == ':') { + char cEquate[512]; // Equate buffer + // Move forward to include : (colon) in buffer + scDoc.Forward(); + // Buffer the equate string + scDoc.GetCurrent(cEquate,sizeof(cEquate)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cEquate); + } + // If statement string is in the equate list + if (wlStandardEquates.InList(cEquate)) { + // Change to equate state + scDoc.ChangeState(SCE_CLW_STANDARD_EQUATE); + } + } + // If the character is not a valid label character + else if (!IsALabelCharacter(scDoc.ch)) { + char cStatement[512]; // Statement buffer + // Buffer the statement string + scDoc.GetCurrent(cStatement,sizeof(cStatement)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cStatement); + } + // If statement string is in the Clarion keyword list + if (wlClarionKeywords.InList(cStatement)) { + // Change the statement string to the Clarion keyword state + scDoc.ChangeState(SCE_CLW_KEYWORD); + } + // Else if statement string is in the compiler directive keyword list + else if (wlCompilerDirectives.InList(cStatement)) { + // Change the statement string to the compiler directive state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Else if statement string is in the runtime expressions keyword list + else if (wlRuntimeExpressions.InList(cStatement)) { + // Change the statement string to the runtime expressions state + scDoc.ChangeState(SCE_CLW_RUNTIME_EXPRESSIONS); + } + // Else if statement string is in the builtin procedures and functions keyword list + else if (wlBuiltInProcsFuncs.InList(cStatement)) { + // Change the statement string to the builtin procedures and functions state + scDoc.ChangeState(SCE_CLW_BUILTIN_PROCEDURES_FUNCTION); + } + // Else if statement string is in the tructures and data types keyword list + else if (wlStructsDataTypes.InList(cStatement)) { + // Change the statement string to the structures and data types state + scDoc.ChangeState(SCE_CLW_STRUCTURE_DATA_TYPE); + } + // Else if statement string is in the procedure attribute keyword list + else if (wlAttributes.InList(cStatement)) { + // Change the statement string to the procedure attribute state + scDoc.ChangeState(SCE_CLW_ATTRIBUTE); + } + // Else if statement string is in the standard equate keyword list + else if (wlStandardEquates.InList(cStatement)) { + // Change the statement string to the standard equate state + scDoc.ChangeState(SCE_CLW_STANDARD_EQUATE); + } + // Else if statement string is in the deprecated or legacy keyword list + else if (wlLegacyStatements.InList(cStatement)) { + // Change the statement string to the standard equate state + scDoc.ChangeState(SCE_CLW_DEPRECATED); + } + // Else the statement string doesn't match any work list + else { + // Change the statement string to the default state + scDoc.ChangeState(SCE_CLW_DEFAULT); + } + // Terminate the keyword state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + // String State Handling + else if (scDoc.state == SCE_CLW_STRING) { + // If the character is an ' (single quote) + if (scDoc.ch == '\'') { + // Set the state to default and move forward colouring + // the ' (single quote) as default state + // terminating the string state + scDoc.SetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + } + // If the next character is an ' (single quote) + if (scDoc.chNext == '\'') { + // Move forward one character and set to default state + // colouring the next ' (single quote) as default state + // terminating the string state + scDoc.ForwardSetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + } + } + // Picture String State Handling + else if (scDoc.state == SCE_CLW_PICTURE_STRING) { + // If the character is an ( (open parenthese) + if (scDoc.ch == '(') { + // Increment the parenthese level + iParenthesesLevel++; + } + // Else if the character is a ) (close parenthese) + else if (scDoc.ch == ')') { + // If the parenthese level is set to zero + // parentheses matched + if (!iParenthesesLevel) { + scDoc.SetState(SCE_CLW_DEFAULT); + } + // Else parenthese level is greater than zero + // still looking for matching parentheses + else { + // Decrement the parenthese level + iParenthesesLevel--; + } + } + } + // Standard Equate State Handling + else if (scDoc.state == SCE_CLW_STANDARD_EQUATE) { + if (!isalnum(scDoc.ch)) { + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + // Integer Constant State Handling + else if (scDoc.state == SCE_CLW_INTEGER_CONSTANT) { + // If the character is not a digit (0-9) + // or character is not a hexidecimal character (A-F) + // or character is not a . (point) + // or character is not a numberic base character (B,O,H) + if (!(isdigit(scDoc.ch) + || IsAHexCharacter(scDoc.ch, bCaseSensitive) + || scDoc.ch == '.' + || IsANumericBaseCharacter(scDoc.ch, bCaseSensitive))) { + // If the number was a real + if (SetNumericConstantState(scDoc)) { + // Colour the matched string to the real constant state + scDoc.ChangeState(SCE_CLW_REAL_CONSTANT); + } + // Else the number was an integer + else { + // Colour the matched string to an integer constant state + scDoc.ChangeState(SCE_CLW_INTEGER_CONSTANT); + } + // Terminate the integer constant state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + + // + // Determine if a new state should be entered. + // + + // Beginning of Line Handling + if (scDoc.atLineStart) { + // Reset the column 1 label flag + iColumn1Label = false; + // If column 1 character is a label start character + if (IsALabelStart(scDoc.ch)) { + // Label character is found in column 1 + // so set column 1 label flag and clear last column 1 label + iColumn1Label = true; + // Set the state to label + scDoc.SetState(SCE_CLW_LABEL); + } + // else if character is a space or tab + else if (IsASpace(scDoc.ch)){ + // Set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + // else if comment start (!) or is an * (asterisk) + else if (IsACommentStart(scDoc.ch) || scDoc.ch == '*' ) { + // then set the state to comment. + scDoc.SetState(SCE_CLW_COMMENT); + } + // else the character is a ? (question mark) + else if (scDoc.ch == '?') { + // Change to the compiler directive state, move forward, + // colouring the ? (question mark), change back to default state. + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + scDoc.Forward(); + scDoc.SetState(SCE_CLW_DEFAULT); + } + // else an invalid character in column 1 + else { + // Set to error state + scDoc.SetState(SCE_CLW_ERROR); + } + } + // End of Line Handling + else if (scDoc.atLineEnd) { + // Reset to the default state at the end of each line. + scDoc.SetState(SCE_CLW_DEFAULT); + } + // Default Handling + else { + // If in default state + if (scDoc.state == SCE_CLW_DEFAULT) { + // If is a letter could be a possible statement + if (isalpha(scDoc.ch)) { + // Set the state to Clarion Keyword and verify later + scDoc.SetState(SCE_CLW_KEYWORD); + } + // else is a number + else if (isdigit(scDoc.ch)) { + // Set the state to Integer Constant and verify later + scDoc.SetState(SCE_CLW_INTEGER_CONSTANT); + } + // else if the start of a comment or a | (line continuation) + else if (IsACommentStart(scDoc.ch) || scDoc.ch == '|') { + // then set the state to comment. + scDoc.SetState(SCE_CLW_COMMENT); + } + // else if the character is a ' (single quote) + else if (scDoc.ch == '\'') { + // If the character is also a ' (single quote) + // Embedded Apostrophe + if (scDoc.chNext == '\'') { + // Move forward colouring it as default state + scDoc.ForwardSetState(SCE_CLW_DEFAULT); + } + else { + // move to the next character and then set the state to comment. + scDoc.ForwardSetState(SCE_CLW_STRING); + } + } + // else the character is an @ (ampersand) + else if (scDoc.ch == '@') { + // Case insensitive. + if (!bCaseSensitive) { + // If character is a valid picture token character + if (strchr("DEKNPSTdeknpst", scDoc.chNext) != NULL) { + // Set to the picture string state + scDoc.SetState(SCE_CLW_PICTURE_STRING); + } + } + // Case sensitive + else { + // If character is a valid picture token character + if (strchr("DEKNPST", scDoc.chNext) != NULL) { + // Set the picture string state + scDoc.SetState(SCE_CLW_PICTURE_STRING); + } + } + } + } + } + } + // lexing complete + scDoc.Complete(); +} + +// Clarion Language Case Sensitive Colouring Procedure +static void ColouriseClarionDocSensitive(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) { + + ColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, true); +} + +// Clarion Language Case Insensitive Colouring Procedure +static void ColouriseClarionDocInsensitive(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) { + + ColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, false); +} + +// Fill Buffer + +static void FillBuffer(Sci_PositionU uiStart, Sci_PositionU uiEnd, Accessor &accStyler, char *szBuffer, Sci_PositionU uiLength) { + + Sci_PositionU uiPos = 0; + + while ((uiPos < uiEnd - uiStart + 1) && (uiPos < uiLength-1)) { + szBuffer[uiPos] = static_cast(toupper(accStyler[uiStart + uiPos])); + uiPos++; + } + szBuffer[uiPos] = '\0'; +} + +// Classify Clarion Fold Point + +static int ClassifyClarionFoldPoint(int iLevel, const char* szString) { + + if (!(isdigit(szString[0]) || (szString[0] == '.'))) { + if (strcmp(szString, "PROCEDURE") == 0) { + // iLevel = SC_FOLDLEVELBASE + 1; + } + else if (strcmp(szString, "MAP") == 0 || + strcmp(szString,"ACCEPT") == 0 || + strcmp(szString,"BEGIN") == 0 || + strcmp(szString,"CASE") == 0 || + strcmp(szString,"EXECUTE") == 0 || + strcmp(szString,"IF") == 0 || + strcmp(szString,"ITEMIZE") == 0 || + strcmp(szString,"INTERFACE") == 0 || + strcmp(szString,"JOIN") == 0 || + strcmp(szString,"LOOP") == 0 || + strcmp(szString,"MODULE") == 0 || + strcmp(szString,"RECORD") == 0) { + iLevel++; + } + else if (strcmp(szString, "APPLICATION") == 0 || + strcmp(szString, "CLASS") == 0 || + strcmp(szString, "DETAIL") == 0 || + strcmp(szString, "FILE") == 0 || + strcmp(szString, "FOOTER") == 0 || + strcmp(szString, "FORM") == 0 || + strcmp(szString, "GROUP") == 0 || + strcmp(szString, "HEADER") == 0 || + strcmp(szString, "INTERFACE") == 0 || + strcmp(szString, "MENU") == 0 || + strcmp(szString, "MENUBAR") == 0 || + strcmp(szString, "OLE") == 0 || + strcmp(szString, "OPTION") == 0 || + strcmp(szString, "QUEUE") == 0 || + strcmp(szString, "REPORT") == 0 || + strcmp(szString, "SHEET") == 0 || + strcmp(szString, "TAB") == 0 || + strcmp(szString, "TOOLBAR") == 0 || + strcmp(szString, "VIEW") == 0 || + strcmp(szString, "WINDOW") == 0) { + iLevel++; + } + else if (strcmp(szString, "END") == 0 || + strcmp(szString, "UNTIL") == 0 || + strcmp(szString, "WHILE") == 0) { + iLevel--; + } + } + return(iLevel); +} + +// Clarion Language Folding Procedure +static void FoldClarionDoc(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *[], Accessor &accStyler) { + + Sci_PositionU uiEndPos = uiStartPos + iLength; + Sci_Position iLineCurrent = accStyler.GetLine(uiStartPos); + int iLevelPrev = accStyler.LevelAt(iLineCurrent) & SC_FOLDLEVELNUMBERMASK; + int iLevelCurrent = iLevelPrev; + char chNext = accStyler[uiStartPos]; + int iStyle = iInitStyle; + int iStyleNext = accStyler.StyleAt(uiStartPos); + int iVisibleChars = 0; + Sci_Position iLastStart = 0; + + for (Sci_PositionU uiPos = uiStartPos; uiPos < uiEndPos; uiPos++) { + + char chChar = chNext; + chNext = accStyler.SafeGetCharAt(uiPos + 1); + int iStylePrev = iStyle; + iStyle = iStyleNext; + iStyleNext = accStyler.StyleAt(uiPos + 1); + bool bEOL = (chChar == '\r' && chNext != '\n') || (chChar == '\n'); + + if (iStylePrev == SCE_CLW_DEFAULT) { + if (iStyle == SCE_CLW_KEYWORD || iStyle == SCE_CLW_STRUCTURE_DATA_TYPE) { + // Store last word start point. + iLastStart = uiPos; + } + } + + if (iStylePrev == SCE_CLW_KEYWORD || iStylePrev == SCE_CLW_STRUCTURE_DATA_TYPE) { + if(iswordchar(chChar) && !iswordchar(chNext)) { + char chBuffer[100]; + FillBuffer(iLastStart, uiPos, accStyler, chBuffer, sizeof(chBuffer)); + iLevelCurrent = ClassifyClarionFoldPoint(iLevelCurrent,chBuffer); + // if ((iLevelCurrent == SC_FOLDLEVELBASE + 1) && iLineCurrent > 1) { + // accStyler.SetLevel(iLineCurrent-1,SC_FOLDLEVELBASE); + // iLevelPrev = SC_FOLDLEVELBASE; + // } + } + } + + if (bEOL) { + int iLevel = iLevelPrev; + if ((iLevelCurrent > iLevelPrev) && (iVisibleChars > 0)) + iLevel |= SC_FOLDLEVELHEADERFLAG; + if (iLevel != accStyler.LevelAt(iLineCurrent)) { + accStyler.SetLevel(iLineCurrent,iLevel); + } + iLineCurrent++; + iLevelPrev = iLevelCurrent; + iVisibleChars = 0; + } + + if (!isspacechar(chChar)) + iVisibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags + // as they will be filled in later. + int iFlagsNext = accStyler.LevelAt(iLineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + accStyler.SetLevel(iLineCurrent, iLevelPrev | iFlagsNext); +} + +// Word List Descriptions +static const char * const rgWordListDescriptions[] = { + "Clarion Keywords", + "Compiler Directives", + "Built-in Procedures and Functions", + "Runtime Expressions", + "Structure and Data Types", + "Attributes", + "Standard Equates", + "Reserved Words (Labels)", + "Reserved Words (Procedure Labels)", + 0, +}; + +// Case Sensitive Clarion Language Lexer +LexerModule lmClw(SCLEX_CLW, ColouriseClarionDocSensitive, "clarion", FoldClarionDoc, rgWordListDescriptions); + +// Case Insensitive Clarion Language Lexer +LexerModule lmClwNoCase(SCLEX_CLWNOCASE, ColouriseClarionDocInsensitive, "clarionnocase", FoldClarionDoc, rgWordListDescriptions); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCOBOL.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCOBOL.cpp new file mode 100644 index 000000000..f0374824f --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCOBOL.cpp @@ -0,0 +1,379 @@ +// Scintilla source code edit control +/** @file LexCOBOL.cxx + ** Lexer for COBOL + ** Based on LexPascal.cxx + ** Written by Laurent le Tynevez + ** Updated by Simon Steele September 2002 + ** Updated by Mathias Rauen May 2003 (Delphi adjustments) + ** Updated by Rod Falck, Aug 2006 Converted to COBOL + **/ + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +#define IN_DIVISION 0x01 +#define IN_DECLARATIVES 0x02 +#define IN_SECTION 0x04 +#define IN_PARAGRAPH 0x08 +#define IN_FLAGS 0xF +#define NOT_HEADER 0x10 + +inline bool isCOBOLoperator(char ch) + { + return isoperator(ch); + } + +inline bool isCOBOLwordchar(char ch) + { + return IsASCII(ch) && (isalnum(ch) || ch == '-'); + + } + +inline bool isCOBOLwordstart(char ch) + { + return IsASCII(ch) && isalnum(ch); + } + +static int CountBits(int nBits) + { + int count = 0; + for (int i = 0; i < 32; ++i) + { + count += nBits & 1; + nBits >>= 1; + } + return count; + } + +static void getRange(Sci_PositionU start, + Sci_PositionU end, + Accessor &styler, + char *s, + Sci_PositionU len) { + Sci_PositionU i = 0; + while ((i < end - start + 1) && (i < len-1)) { + s[i] = static_cast(tolower(styler[start + i])); + i++; + } + s[i] = '\0'; +} + +static void ColourTo(Accessor &styler, Sci_PositionU end, unsigned int attr) { + styler.ColourTo(end, attr); +} + + +static int classifyWordCOBOL(Sci_PositionU start, Sci_PositionU end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, int nContainment, bool *bAarea) { + int ret = 0; + + WordList& a_keywords = *keywordlists[0]; + WordList& b_keywords = *keywordlists[1]; + WordList& c_keywords = *keywordlists[2]; + + char s[100]; + s[0] = '\0'; + s[1] = '\0'; + getRange(start, end, styler, s, sizeof(s)); + + char chAttr = SCE_C_IDENTIFIER; + if (isdigit(s[0]) || (s[0] == '.') || (s[0] == 'v')) { + chAttr = SCE_C_NUMBER; + char *p = s + 1; + while (*p) { + if ((!isdigit(*p) && (*p) != 'v') && isCOBOLwordchar(*p)) { + chAttr = SCE_C_IDENTIFIER; + break; + } + ++p; + } + } + else { + if (a_keywords.InList(s)) { + chAttr = SCE_C_WORD; + } + else if (b_keywords.InList(s)) { + chAttr = SCE_C_WORD2; + } + else if (c_keywords.InList(s)) { + chAttr = SCE_C_UUID; + } + } + if (*bAarea) { + if (strcmp(s, "division") == 0) { + ret = IN_DIVISION; + // we've determined the containment, anything else is just ignored for those purposes + *bAarea = false; + } else if (strcmp(s, "declaratives") == 0) { + ret = IN_DIVISION | IN_DECLARATIVES; + if (nContainment & IN_DECLARATIVES) + ret |= NOT_HEADER | IN_SECTION; + // we've determined the containment, anything else is just ignored for those purposes + *bAarea = false; + } else if (strcmp(s, "section") == 0) { + ret = (nContainment &~ IN_PARAGRAPH) | IN_SECTION; + // we've determined the containment, anything else is just ignored for those purposes + *bAarea = false; + } else if (strcmp(s, "end") == 0 && (nContainment & IN_DECLARATIVES)) { + ret = IN_DIVISION | IN_DECLARATIVES | IN_SECTION | NOT_HEADER; + } else { + ret = nContainment | IN_PARAGRAPH; + } + } + ColourTo(styler, end, chAttr); + return ret; +} + +static void ColouriseCOBOLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + styler.StartAt(startPos); + + int state = initStyle; + if (state == SCE_C_CHARACTER) // Does not leak onto next line + state = SCE_C_DEFAULT; + char chPrev = ' '; + char chNext = styler[startPos]; + Sci_PositionU lengthDoc = startPos + length; + + int nContainment; + + Sci_Position currentLine = styler.GetLine(startPos); + if (currentLine > 0) { + styler.SetLineState(currentLine, styler.GetLineState(currentLine-1)); + nContainment = styler.GetLineState(currentLine); + nContainment &= ~NOT_HEADER; + } else { + styler.SetLineState(currentLine, 0); + nContainment = 0; + } + + styler.StartSegment(startPos); + bool bNewLine = true; + bool bAarea = !isspacechar(chNext); + int column = 0; + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = chNext; + + chNext = styler.SafeGetCharAt(i + 1); + + ++column; + + if (bNewLine) { + column = 0; + } + if (column <= 1 && !bAarea) { + bAarea = !isspacechar(ch); + } + bool bSetNewLine = false; + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // End of line + if (state == SCE_C_CHARACTER) { + ColourTo(styler, i, state); + state = SCE_C_DEFAULT; + } + styler.SetLineState(currentLine, nContainment); + currentLine++; + bSetNewLine = true; + if (nContainment & NOT_HEADER) + nContainment &= ~(NOT_HEADER | IN_DECLARATIVES | IN_SECTION); + } + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (isCOBOLwordstart(ch) || (ch == '$' && IsASCII(chNext) && isalpha(chNext))) { + ColourTo(styler, i-1, state); + state = SCE_C_IDENTIFIER; + } else if (column == 6 && ch == '*') { + // Cobol comment line: asterisk in column 7. + ColourTo(styler, i-1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '*' && chNext == '>') { + // Cobol inline comment: asterisk, followed by greater than. + ColourTo(styler, i-1, state); + state = SCE_C_COMMENTLINE; + } else if (column == 0 && ch == '*' && chNext != '*') { + ColourTo(styler, i-1, state); + state = SCE_C_COMMENTLINE; + } else if (column == 0 && ch == '/' && chNext != '*') { + ColourTo(styler, i-1, state); + state = SCE_C_COMMENTLINE; + } else if (column == 0 && ch == '*' && chNext == '*') { + ColourTo(styler, i-1, state); + state = SCE_C_COMMENTDOC; + } else if (column == 0 && ch == '/' && chNext == '*') { + ColourTo(styler, i-1, state); + state = SCE_C_COMMENTDOC; + } else if (ch == '"') { + ColourTo(styler, i-1, state); + state = SCE_C_STRING; + } else if (ch == '\'') { + ColourTo(styler, i-1, state); + state = SCE_C_CHARACTER; + } else if (ch == '?' && column == 0) { + ColourTo(styler, i-1, state); + state = SCE_C_PREPROCESSOR; + } else if (isCOBOLoperator(ch)) { + ColourTo(styler, i-1, state); + ColourTo(styler, i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_IDENTIFIER) { + if (!isCOBOLwordchar(ch)) { + int lStateChange = classifyWordCOBOL(styler.GetStartSegment(), i - 1, keywordlists, styler, nContainment, &bAarea); + + if(lStateChange != 0) { + styler.SetLineState(currentLine, lStateChange); + nContainment = lStateChange; + } + + state = SCE_C_DEFAULT; + chNext = styler.SafeGetCharAt(i + 1); + if (ch == '"') { + state = SCE_C_STRING; + } else if (ch == '\'') { + state = SCE_C_CHARACTER; + } else if (isCOBOLoperator(ch)) { + ColourTo(styler, i, SCE_C_OPERATOR); + } + } + } else { + if (state == SCE_C_PREPROCESSOR) { + if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) { + ColourTo(styler, i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_COMMENT) { + if (ch == '\r' || ch == '\n') { + ColourTo(styler, i, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_COMMENTDOC) { + if (ch == '\r' || ch == '\n') { + if (((i > styler.GetStartSegment() + 2) || ( + (initStyle == SCE_C_COMMENTDOC) && + (styler.GetStartSegment() == static_cast(startPos))))) { + ColourTo(styler, i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + ColourTo(styler, i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '"') { + ColourTo(styler, i, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_CHARACTER) { + if (ch == '\'') { + ColourTo(styler, i, state); + state = SCE_C_DEFAULT; + } + } + } + chPrev = ch; + bNewLine = bSetNewLine; + if (bNewLine) + { + bAarea = false; + } + } + ColourTo(styler, lengthDoc - 1, state); +} + +static void FoldCOBOLDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], + Accessor &styler) { + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = lineCurrent > 0 ? styler.LevelAt(lineCurrent - 1) & SC_FOLDLEVELNUMBERMASK : 0xFFF; + char chNext = styler[startPos]; + + bool bNewLine = true; + bool bAarea = !isspacechar(chNext); + int column = 0; + bool bComment = false; + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + ++column; + + if (bNewLine) { + column = 0; + bComment = (ch == '*' || ch == '/' || ch == '?'); + } + if (column <= 1 && !bAarea) { + bAarea = !isspacechar(ch); + } + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (atEOL) { + int nContainment = styler.GetLineState(lineCurrent); + int lev = CountBits(nContainment & IN_FLAGS) | SC_FOLDLEVELBASE; + if (bAarea && !bComment) + --lev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((bAarea) && (visibleChars > 0) && !(nContainment & NOT_HEADER) && !bComment) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + if ((lev & SC_FOLDLEVELNUMBERMASK) <= (levelPrev & SC_FOLDLEVELNUMBERMASK)) { + // this level is at the same level or less than the previous line + // therefore these is nothing for the previous header to collapse, so remove the header + styler.SetLevel(lineCurrent - 1, levelPrev & ~SC_FOLDLEVELHEADERFLAG); + } + levelPrev = lev; + visibleChars = 0; + bAarea = false; + bNewLine = true; + lineCurrent++; + } else { + bNewLine = false; + } + + + if (!isspacechar(ch)) + visibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const COBOLWordListDesc[] = { + "A Keywords", + "B Keywords", + "Extended Keywords", + 0 +}; + +LexerModule lmCOBOL(SCLEX_COBOL, ColouriseCOBOLDoc, "COBOL", FoldCOBOLDoc, COBOLWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCPP.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCPP.cpp new file mode 100644 index 000000000..3dac142ab --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCPP.cpp @@ -0,0 +1,1725 @@ +// Scintilla source code edit control +/** @file LexCPP.cxx + ** Lexer for C++, C, Java, and JavaScript. + ** Further folding features and configuration properties added by "Udo Lechner" + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "StringCopy.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "SparseState.h" +#include "SubStyles.h" + +using namespace Scintilla; + +namespace { + // Use an unnamed namespace to protect the functions and classes from name conflicts + +bool IsSpaceEquiv(int state) noexcept { + return (state <= SCE_C_COMMENTDOC) || + // including SCE_C_DEFAULT, SCE_C_COMMENT, SCE_C_COMMENTLINE + (state == SCE_C_COMMENTLINEDOC) || (state == SCE_C_COMMENTDOCKEYWORD) || + (state == SCE_C_COMMENTDOCKEYWORDERROR); +} + +// Preconditions: sc.currentPos points to a character after '+' or '-'. +// The test for pos reaching 0 should be redundant, +// and is in only for safety measures. +// Limitation: this code will give the incorrect answer for code like +// a = b+++/ptn/... +// Putting a space between the '++' post-inc operator and the '+' binary op +// fixes this, and is highly recommended for readability anyway. +bool FollowsPostfixOperator(const StyleContext &sc, LexAccessor &styler) { + Sci_Position pos = sc.currentPos; + while (--pos > 0) { + const char ch = styler[pos]; + if (ch == '+' || ch == '-') { + return styler[pos - 1] == ch; + } + } + return false; +} + +bool followsReturnKeyword(const StyleContext &sc, LexAccessor &styler) { + // Don't look at styles, so no need to flush. + Sci_Position pos = sc.currentPos; + const Sci_Position currentLine = styler.GetLine(pos); + const Sci_Position lineStartPos = styler.LineStart(currentLine); + while (--pos > lineStartPos) { + const char ch = styler.SafeGetCharAt(pos); + if (ch != ' ' && ch != '\t') { + break; + } + } + const char *retBack = "nruter"; + const char *s = retBack; + while (*s + && pos >= lineStartPos + && styler.SafeGetCharAt(pos) == *s) { + s++; + pos--; + } + return !*s; +} + +bool IsSpaceOrTab(int ch) noexcept { + return ch == ' ' || ch == '\t'; +} + +bool OnlySpaceOrTab(const std::string &s) noexcept { + for (const char ch : s) { + if (!IsSpaceOrTab(ch)) + return false; + } + return true; +} + +std::vector StringSplit(const std::string &text, int separator) { + std::vector vs(text.empty() ? 0 : 1); + for (const char ch : text) { + if (ch == separator) { + vs.emplace_back(); + } else { + vs.back() += ch; + } + } + return vs; +} + +struct BracketPair { + std::vector::iterator itBracket; + std::vector::iterator itEndBracket; +}; + +BracketPair FindBracketPair(std::vector &tokens) { + BracketPair bp; + std::vector::iterator itTok = std::find(tokens.begin(), tokens.end(), "("); + bp.itBracket = tokens.end(); + bp.itEndBracket = tokens.end(); + if (itTok != tokens.end()) { + bp.itBracket = itTok; + size_t nest = 0; + while (itTok != tokens.end()) { + if (*itTok == "(") { + nest++; + } else if (*itTok == ")") { + nest--; + if (nest == 0) { + bp.itEndBracket = itTok; + return bp; + } + } + ++itTok; + } + } + bp.itBracket = tokens.end(); + return bp; +} + +void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, + int activity, const WordList &markerList, bool caseSensitive){ + if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) { + const int lengthMarker = 50; + char marker[lengthMarker+1] = ""; + const Sci_Position currPos = static_cast(sc.currentPos); + int i = 0; + while (i < lengthMarker) { + const char ch = styler.SafeGetCharAt(currPos + i); + if (IsASpace(ch) || isoperator(ch)) { + break; + } + if (caseSensitive) + marker[i] = ch; + else + marker[i] = MakeLowerCase(ch); + i++; + } + marker[i] = '\0'; + if (markerList.InList(marker)) { + sc.SetState(SCE_C_TASKMARKER|activity); + } + } +} + +struct EscapeSequence { + int digitsLeft; + CharacterSet setHexDigits; + CharacterSet setOctDigits; + CharacterSet setNoneNumeric; + CharacterSet *escapeSetValid; + EscapeSequence() { + digitsLeft = 0; + escapeSetValid = 0; + setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef"); + setOctDigits = CharacterSet(CharacterSet::setNone, "01234567"); + } + void resetEscapeState(int nextChar) { + digitsLeft = 0; + escapeSetValid = &setNoneNumeric; + if (nextChar == 'U') { + digitsLeft = 9; + escapeSetValid = &setHexDigits; + } else if (nextChar == 'u') { + digitsLeft = 5; + escapeSetValid = &setHexDigits; + } else if (nextChar == 'x') { + digitsLeft = 5; + escapeSetValid = &setHexDigits; + } else if (setOctDigits.Contains(nextChar)) { + digitsLeft = 3; + escapeSetValid = &setOctDigits; + } + } + bool atEscapeEnd(int currChar) const { + return (digitsLeft <= 0) || !escapeSetValid->Contains(currChar); + } +}; + +std::string GetRestOfLine(LexAccessor &styler, Sci_Position start, bool allowSpace) { + std::string restOfLine; + Sci_Position i =0; + char ch = styler.SafeGetCharAt(start, '\n'); + const Sci_Position endLine = styler.LineEnd(styler.GetLine(start)); + while (((start+i) < endLine) && (ch != '\r')) { + const char chNext = styler.SafeGetCharAt(start + i + 1, '\n'); + if (ch == '/' && (chNext == '/' || chNext == '*')) + break; + if (allowSpace || (ch != ' ')) + restOfLine += ch; + i++; + ch = chNext; + } + return restOfLine; +} + +bool IsStreamCommentStyle(int style) noexcept { + return style == SCE_C_COMMENT || + style == SCE_C_COMMENTDOC || + style == SCE_C_COMMENTDOCKEYWORD || + style == SCE_C_COMMENTDOCKEYWORDERROR; +} + +struct PPDefinition { + Sci_Position line; + std::string key; + std::string value; + bool isUndef; + std::string arguments; + PPDefinition(Sci_Position line_, const std::string &key_, const std::string &value_, bool isUndef_ = false, const std::string &arguments_="") : + line(line_), key(key_), value(value_), isUndef(isUndef_), arguments(arguments_) { + } +}; + +class LinePPState { + int state; + int ifTaken; + int level; + bool ValidLevel() const noexcept { + return level >= 0 && level < 32; + } + int maskLevel() const noexcept { + if (level >= 0) { + return 1 << level; + } else { + return 1; + } + } +public: + LinePPState() : state(0), ifTaken(0), level(-1) { + } + bool IsInactive() const noexcept { + return state != 0; + } + bool CurrentIfTaken() const noexcept { + return (ifTaken & maskLevel()) != 0; + } + void StartSection(bool on) noexcept { + level++; + if (ValidLevel()) { + if (on) { + state &= ~maskLevel(); + ifTaken |= maskLevel(); + } else { + state |= maskLevel(); + ifTaken &= ~maskLevel(); + } + } + } + void EndSection() noexcept { + if (ValidLevel()) { + state &= ~maskLevel(); + ifTaken &= ~maskLevel(); + } + level--; + } + void InvertCurrentLevel() noexcept { + if (ValidLevel()) { + state ^= maskLevel(); + ifTaken |= maskLevel(); + } + } +}; + +// Hold the preprocessor state for each line seen. +// Currently one entry per line but could become sparse with just one entry per preprocessor line. +class PPStates { + std::vector vlls; +public: + LinePPState ForLine(Sci_Position line) const { + if ((line > 0) && (vlls.size() > static_cast(line))) { + return vlls[line]; + } else { + return LinePPState(); + } + } + void Add(Sci_Position line, LinePPState lls) { + vlls.resize(line+1); + vlls[line] = lls; + } +}; + +// An individual named option for use in an OptionSet + +// Options used for LexerCPP +struct OptionsCPP { + bool stylingWithinPreprocessor; + bool identifiersAllowDollars; + bool trackPreprocessor; + bool updatePreprocessor; + bool verbatimStringsAllowEscapes; + bool triplequotedStrings; + bool hashquotedStrings; + bool backQuotedStrings; + bool escapeSequence; + bool fold; + bool foldSyntaxBased; + bool foldComment; + bool foldCommentMultiline; + bool foldCommentExplicit; + std::string foldExplicitStart; + std::string foldExplicitEnd; + bool foldExplicitAnywhere; + bool foldPreprocessor; + bool foldPreprocessorAtElse; + bool foldCompact; + bool foldAtElse; + OptionsCPP() { + stylingWithinPreprocessor = false; + identifiersAllowDollars = true; + trackPreprocessor = true; + updatePreprocessor = true; + verbatimStringsAllowEscapes = false; + triplequotedStrings = false; + hashquotedStrings = false; + backQuotedStrings = false; + escapeSequence = false; + fold = false; + foldSyntaxBased = true; + foldComment = false; + foldCommentMultiline = true; + foldCommentExplicit = true; + foldExplicitStart = ""; + foldExplicitEnd = ""; + foldExplicitAnywhere = false; + foldPreprocessor = false; + foldPreprocessorAtElse = false; + foldCompact = false; + foldAtElse = false; + } +}; + +const char *const cppWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Global classes and typedefs", + "Preprocessor definitions", + "Task marker and error marker keywords", + 0, +}; + +struct OptionSetCPP : public OptionSet { + OptionSetCPP() { + DefineProperty("styling.within.preprocessor", &OptionsCPP::stylingWithinPreprocessor, + "For C++ code, determines whether all preprocessor code is styled in the " + "preprocessor style (0, the default) or only from the initial # to the end " + "of the command word(1)."); + + DefineProperty("lexer.cpp.allow.dollars", &OptionsCPP::identifiersAllowDollars, + "Set to 0 to disallow the '$' character in identifiers with the cpp lexer."); + + DefineProperty("lexer.cpp.track.preprocessor", &OptionsCPP::trackPreprocessor, + "Set to 1 to interpret #if/#else/#endif to grey out code that is not active."); + + DefineProperty("lexer.cpp.update.preprocessor", &OptionsCPP::updatePreprocessor, + "Set to 1 to update preprocessor definitions when #define found."); + + DefineProperty("lexer.cpp.verbatim.strings.allow.escapes", &OptionsCPP::verbatimStringsAllowEscapes, + "Set to 1 to allow verbatim strings to contain escape sequences."); + + DefineProperty("lexer.cpp.triplequoted.strings", &OptionsCPP::triplequotedStrings, + "Set to 1 to enable highlighting of triple-quoted strings."); + + DefineProperty("lexer.cpp.hashquoted.strings", &OptionsCPP::hashquotedStrings, + "Set to 1 to enable highlighting of hash-quoted strings."); + + DefineProperty("lexer.cpp.backquoted.strings", &OptionsCPP::backQuotedStrings, + "Set to 1 to enable highlighting of back-quoted raw strings ."); + + DefineProperty("lexer.cpp.escape.sequence", &OptionsCPP::escapeSequence, + "Set to 1 to enable highlighting of escape sequences in strings"); + + DefineProperty("fold", &OptionsCPP::fold); + + DefineProperty("fold.cpp.syntax.based", &OptionsCPP::foldSyntaxBased, + "Set this property to 0 to disable syntax based folding."); + + DefineProperty("fold.comment", &OptionsCPP::foldComment, + "This option enables folding multi-line comments and explicit fold points when using the C++ lexer. " + "Explicit fold points allows adding extra folding by placing a //{ comment at the start and a //} " + "at the end of a section that should fold."); + + DefineProperty("fold.cpp.comment.multiline", &OptionsCPP::foldCommentMultiline, + "Set this property to 0 to disable folding multi-line comments when fold.comment=1."); + + DefineProperty("fold.cpp.comment.explicit", &OptionsCPP::foldCommentExplicit, + "Set this property to 0 to disable folding explicit fold points when fold.comment=1."); + + DefineProperty("fold.cpp.explicit.start", &OptionsCPP::foldExplicitStart, + "The string to use for explicit fold start points, replacing the standard //{."); + + DefineProperty("fold.cpp.explicit.end", &OptionsCPP::foldExplicitEnd, + "The string to use for explicit fold end points, replacing the standard //}."); + + DefineProperty("fold.cpp.explicit.anywhere", &OptionsCPP::foldExplicitAnywhere, + "Set this property to 1 to enable explicit fold points anywhere, not just in line comments."); + + DefineProperty("fold.cpp.preprocessor.at.else", &OptionsCPP::foldPreprocessorAtElse, + "This option enables folding on a preprocessor #else or #endif line of an #if statement."); + + DefineProperty("fold.preprocessor", &OptionsCPP::foldPreprocessor, + "This option enables folding preprocessor directives when using the C++ lexer. " + "Includes C#'s explicit #region and #endregion folding directives."); + + DefineProperty("fold.compact", &OptionsCPP::foldCompact); + + DefineProperty("fold.at.else", &OptionsCPP::foldAtElse, + "This option enables C++ folding on a \"} else {\" line of an if statement."); + + DefineWordListSets(cppWordLists); + } +}; + +const char styleSubable[] = {SCE_C_IDENTIFIER, SCE_C_COMMENTDOCKEYWORD, 0}; + +LexicalClass lexicalClasses[] = { + // Lexer Cpp SCLEX_CPP SCE_C_: + 0, "SCE_C_DEFAULT", "default", "White space", + 1, "SCE_C_COMMENT", "comment", "Comment: /* */.", + 2, "SCE_C_COMMENTLINE", "comment line", "Line Comment: //.", + 3, "SCE_C_COMMENTDOC", "comment documentation", "Doc comment: block comments beginning with /** or /*!", + 4, "SCE_C_NUMBER", "literal numeric", "Number", + 5, "SCE_C_WORD", "keyword", "Keyword", + 6, "SCE_C_STRING", "literal string", "Double quoted string", + 7, "SCE_C_CHARACTER", "literal string character", "Single quoted string", + 8, "SCE_C_UUID", "literal uuid", "UUIDs (only in IDL)", + 9, "SCE_C_PREPROCESSOR", "preprocessor", "Preprocessor", + 10, "SCE_C_OPERATOR", "operator", "Operators", + 11, "SCE_C_IDENTIFIER", "identifier", "Identifiers", + 12, "SCE_C_STRINGEOL", "error literal string", "End of line where string is not closed", + 13, "SCE_C_VERBATIM", "literal string multiline raw", "Verbatim strings for C#", + 14, "SCE_C_REGEX", "literal regex", "Regular expressions for JavaScript", + 15, "SCE_C_COMMENTLINEDOC", "comment documentation line", "Doc Comment Line: line comments beginning with /// or //!.", + 16, "SCE_C_WORD2", "identifier", "Keywords2", + 17, "SCE_C_COMMENTDOCKEYWORD", "comment documentation keyword", "Comment keyword", + 18, "SCE_C_COMMENTDOCKEYWORDERROR", "error comment documentation keyword", "Comment keyword error", + 19, "SCE_C_GLOBALCLASS", "identifier", "Global class", + 20, "SCE_C_STRINGRAW", "literal string multiline raw", "Raw strings for C++0x", + 21, "SCE_C_TRIPLEVERBATIM", "literal string multiline raw", "Triple-quoted strings for Vala", + 22, "SCE_C_HASHQUOTEDSTRING", "literal string", "Hash-quoted strings for Pike", + 23, "SCE_C_PREPROCESSORCOMMENT", "comment preprocessor", "Preprocessor stream comment", + 24, "SCE_C_PREPROCESSORCOMMENTDOC", "comment preprocessor documentation", "Preprocessor stream doc comment", + 25, "SCE_C_USERLITERAL", "literal", "User defined literals", + 26, "SCE_C_TASKMARKER", "comment taskmarker", "Task Marker", + 27, "SCE_C_ESCAPESEQUENCE", "literal string escapesequence", "Escape sequence", +}; + +} + +class LexerCPP : public ILexerWithMetaData { + bool caseSensitive; + CharacterSet setWord; + CharacterSet setNegationOp; + CharacterSet setArithmethicOp; + CharacterSet setRelOp; + CharacterSet setLogicalOp; + CharacterSet setWordStart; + PPStates vlls; + std::vector ppDefineHistory; + WordList keywords; + WordList keywords2; + WordList keywords3; + WordList keywords4; + WordList ppDefinitions; + WordList markerList; + struct SymbolValue { + std::string value; + std::string arguments; + SymbolValue(const std::string &value_="", const std::string &arguments_="") : value(value_), arguments(arguments_) { + } + SymbolValue &operator = (const std::string &value_) { + value = value_; + arguments.clear(); + return *this; + } + bool IsMacro() const noexcept { + return !arguments.empty(); + } + }; + typedef std::map SymbolTable; + SymbolTable preprocessorDefinitionsStart; + OptionsCPP options; + OptionSetCPP osCPP; + EscapeSequence escapeSeq; + SparseState rawStringTerminators; + enum { activeFlag = 0x40 }; + enum { ssIdentifier, ssDocKeyword }; + SubStyles subStyles; + std::string returnBuffer; +public: + explicit LexerCPP(bool caseSensitive_) : + caseSensitive(caseSensitive_), + setWord(CharacterSet::setAlphaNum, "._", 0x80, true), + setNegationOp(CharacterSet::setNone, "!"), + setArithmethicOp(CharacterSet::setNone, "+-/*%"), + setRelOp(CharacterSet::setNone, "=!<>"), + setLogicalOp(CharacterSet::setNone, "|&"), + subStyles(styleSubable, 0x80, 0x40, activeFlag) { + } + virtual ~LexerCPP() { + } + void SCI_METHOD Release() override { + delete this; + } + int SCI_METHOD Version() const override { + return lvMetaData; + } + const char * SCI_METHOD PropertyNames() override { + return osCPP.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osCPP.PropertyType(name); + } + const char * SCI_METHOD DescribeProperty(const char *name) override { + return osCPP.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char * SCI_METHOD DescribeWordListSets() override { + return osCPP.DescribeWordListSets(); + } + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + + int SCI_METHOD LineEndTypesSupported() override { + return SC_LINE_END_TYPE_UNICODE; + } + + int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override { + return subStyles.Allocate(styleBase, numberStyles); + } + int SCI_METHOD SubStylesStart(int styleBase) override { + return subStyles.Start(styleBase); + } + int SCI_METHOD SubStylesLength(int styleBase) override { + return subStyles.Length(styleBase); + } + int SCI_METHOD StyleFromSubStyle(int subStyle) override { + const int styleBase = subStyles.BaseStyle(MaskActive(subStyle)); + const int active = subStyle & activeFlag; + return styleBase | active; + } + int SCI_METHOD PrimaryStyleFromStyle(int style) override { + return MaskActive(style); + } + void SCI_METHOD FreeSubStyles() override { + subStyles.Free(); + } + void SCI_METHOD SetIdentifiers(int style, const char *identifiers) override { + subStyles.SetIdentifiers(style, identifiers); + } + int SCI_METHOD DistanceToSecondaryStyles() override { + return activeFlag; + } + const char * SCI_METHOD GetSubStyleBases() override { + return styleSubable; + } + int SCI_METHOD NamedStyles() override { + return std::max(subStyles.LastAllocated() + 1, + static_cast(ELEMENTS(lexicalClasses))) + + activeFlag; + } + const char * SCI_METHOD NameOfStyle(int style) override { + if (style >= NamedStyles()) + return ""; + if (style < static_cast(ELEMENTS(lexicalClasses))) + return lexicalClasses[style].name; + // TODO: inactive and substyles + return ""; + } + const char * SCI_METHOD TagsOfStyle(int style) override { + if (style >= NamedStyles()) + return "Excess"; + returnBuffer.clear(); + const int firstSubStyle = subStyles.FirstAllocated(); + if (firstSubStyle >= 0) { + const int lastSubStyle = subStyles.LastAllocated(); + if (((style >= firstSubStyle) && (style <= (lastSubStyle))) || + ((style >= firstSubStyle + activeFlag) && (style <= (lastSubStyle + activeFlag)))) { + int styleActive = style; + if (style > lastSubStyle) { + returnBuffer = "inactive "; + styleActive -= activeFlag; + } + const int styleMain = StyleFromSubStyle(styleActive); + returnBuffer += lexicalClasses[styleMain].tags; + return returnBuffer.c_str(); + } + } + if (style < static_cast(ELEMENTS(lexicalClasses))) + return lexicalClasses[style].tags; + if (style >= activeFlag) { + returnBuffer = "inactive "; + const int styleActive = style - activeFlag; + if (styleActive < static_cast(ELEMENTS(lexicalClasses))) + returnBuffer += lexicalClasses[styleActive].tags; + else + returnBuffer = ""; + return returnBuffer.c_str(); + } + return ""; + } + const char * SCI_METHOD DescriptionOfStyle(int style) override { + if (style >= NamedStyles()) + return ""; + if (style < static_cast(ELEMENTS(lexicalClasses))) + return lexicalClasses[style].description; + // TODO: inactive and substyles + return ""; + } + + static ILexer *LexerFactoryCPP() { + return new LexerCPP(true); + } + static ILexer *LexerFactoryCPPInsensitive() { + return new LexerCPP(false); + } + static int MaskActive(int style) noexcept { + return style & ~activeFlag; + } + void EvaluateTokens(std::vector &tokens, const SymbolTable &preprocessorDefinitions); + std::vector Tokenize(const std::string &expr) const; + bool EvaluateExpression(const std::string &expr, const SymbolTable &preprocessorDefinitions); +}; + +Sci_Position SCI_METHOD LexerCPP::PropertySet(const char *key, const char *val) { + if (osCPP.PropertySet(&options, key, val)) { + if (strcmp(key, "lexer.cpp.allow.dollars") == 0) { + setWord = CharacterSet(CharacterSet::setAlphaNum, "._", 0x80, true); + if (options.identifiersAllowDollars) { + setWord.Add('$'); + } + } + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerCPP::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywords; + break; + case 1: + wordListN = &keywords2; + break; + case 2: + wordListN = &keywords3; + break; + case 3: + wordListN = &keywords4; + break; + case 4: + wordListN = &ppDefinitions; + break; + case 5: + wordListN = &markerList; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + if (n == 4) { + // Rebuild preprocessorDefinitions + preprocessorDefinitionsStart.clear(); + for (int nDefinition = 0; nDefinition < ppDefinitions.Length(); nDefinition++) { + const char *cpDefinition = ppDefinitions.WordAt(nDefinition); + const char *cpEquals = strchr(cpDefinition, '='); + if (cpEquals) { + std::string name(cpDefinition, cpEquals - cpDefinition); + std::string val(cpEquals+1); + const size_t bracket = name.find('('); + const size_t bracketEnd = name.find(')'); + if ((bracket != std::string::npos) && (bracketEnd != std::string::npos)) { + // Macro + std::string args = name.substr(bracket + 1, bracketEnd - bracket - 1); + name = name.substr(0, bracket); + preprocessorDefinitionsStart[name] = SymbolValue(val, args); + } else { + preprocessorDefinitionsStart[name] = val; + } + } else { + std::string name(cpDefinition); + std::string val("1"); + preprocessorDefinitionsStart[name] = val; + } + } + } + } + } + return firstModification; +} + +void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + LexAccessor styler(pAccess); + + CharacterSet setOKBeforeRE(CharacterSet::setNone, "([{=,:;!%^&*|?~+-"); + CharacterSet setCouldBePostOp(CharacterSet::setNone, "+-"); + + CharacterSet setDoxygen(CharacterSet::setAlpha, "$@\\&<>#{}[]"); + + setWordStart = CharacterSet(CharacterSet::setAlpha, "_", 0x80, true); + + CharacterSet setInvalidRawFirst(CharacterSet::setNone, " )\\\t\v\f\n"); + + if (options.identifiersAllowDollars) { + setWordStart.Add('$'); + } + + int chPrevNonWhite = ' '; + int visibleChars = 0; + bool lastWordWasUUID = false; + int styleBeforeDCKeyword = SCE_C_DEFAULT; + int styleBeforeTaskMarker = SCE_C_DEFAULT; + bool continuationLine = false; + bool isIncludePreprocessor = false; + bool isStringInPreprocessor = false; + bool inRERange = false; + bool seenDocKeyBrace = false; + + Sci_Position lineCurrent = styler.GetLine(startPos); + if ((MaskActive(initStyle) == SCE_C_PREPROCESSOR) || + (MaskActive(initStyle) == SCE_C_COMMENTLINE) || + (MaskActive(initStyle) == SCE_C_COMMENTLINEDOC)) { + // Set continuationLine if last character of previous line is '\' + if (lineCurrent > 0) { + const Sci_Position endLinePrevious = styler.LineEnd(lineCurrent - 1); + if (endLinePrevious > 0) { + continuationLine = styler.SafeGetCharAt(endLinePrevious-1) == '\\'; + } + } + } + + // look back to set chPrevNonWhite properly for better regex colouring + if (startPos > 0) { + Sci_Position back = startPos; + while (--back && IsSpaceEquiv(MaskActive(styler.StyleAt(back)))) + ; + if (MaskActive(styler.StyleAt(back)) == SCE_C_OPERATOR) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + } + + StyleContext sc(startPos, length, initStyle, styler); + LinePPState preproc = vlls.ForLine(lineCurrent); + + bool definitionsChanged = false; + + // Truncate ppDefineHistory before current line + + if (!options.updatePreprocessor) + ppDefineHistory.clear(); + + std::vector::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(), + [lineCurrent](const PPDefinition &p) { return p.line >= lineCurrent; }); + if (itInvalid != ppDefineHistory.end()) { + ppDefineHistory.erase(itInvalid, ppDefineHistory.end()); + definitionsChanged = true; + } + + SymbolTable preprocessorDefinitions = preprocessorDefinitionsStart; + for (const PPDefinition &ppDef : ppDefineHistory) { + if (ppDef.isUndef) + preprocessorDefinitions.erase(ppDef.key); + else + preprocessorDefinitions[ppDef.key] = SymbolValue(ppDef.value, ppDef.arguments); + } + + std::string rawStringTerminator = rawStringTerminators.ValueAt(lineCurrent-1); + SparseState rawSTNew(lineCurrent); + + int activitySet = preproc.IsInactive() ? activeFlag : 0; + + const WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_C_IDENTIFIER); + const WordClassifier &classifierDocKeyWords = subStyles.Classifier(SCE_C_COMMENTDOCKEYWORD); + + Sci_Position lineEndNext = styler.LineEnd(lineCurrent); + + for (; sc.More();) { + + if (sc.atLineStart) { + // Using MaskActive() is not needed in the following statement. + // Inside inactive preprocessor declaration, state will be reset anyway at the end of this block. + if ((sc.state == SCE_C_STRING) || (sc.state == SCE_C_CHARACTER)) { + // Prevent SCE_C_STRINGEOL from leaking back to previous line which + // ends with a line continuation by locking in the state up to this position. + sc.SetState(sc.state); + } + if ((MaskActive(sc.state) == SCE_C_PREPROCESSOR) && (!continuationLine)) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + // Reset states to beginning of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + lastWordWasUUID = false; + isIncludePreprocessor = false; + inRERange = false; + if (preproc.IsInactive()) { + activitySet = activeFlag; + sc.SetState(sc.state | activitySet); + } + } + + if (sc.atLineEnd) { + lineCurrent++; + lineEndNext = styler.LineEnd(lineCurrent); + vlls.Add(lineCurrent, preproc); + if (rawStringTerminator != "") { + rawSTNew.Set(lineCurrent-1, rawStringTerminator); + } + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (static_cast((sc.currentPos+1)) >= lineEndNext) { + lineCurrent++; + lineEndNext = styler.LineEnd(lineCurrent); + vlls.Add(lineCurrent, preproc); + if (rawStringTerminator != "") { + rawSTNew.Set(lineCurrent-1, rawStringTerminator); + } + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + // Even in UTF-8, \r and \n are separate + sc.Forward(); + } + continuationLine = true; + sc.Forward(); + continue; + } + } + + const bool atLineEndBeforeSwitch = sc.atLineEnd; + + // Determine if the current state should terminate. + switch (MaskActive(sc.state)) { + case SCE_C_OPERATOR: + sc.SetState(SCE_C_DEFAULT|activitySet); + break; + case SCE_C_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (sc.ch == '_') { + sc.ChangeState(SCE_C_USERLITERAL|activitySet); + } else if (!(setWord.Contains(sc.ch) + || (sc.ch == '\'') + || ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E' || + sc.chPrev == 'p' || sc.chPrev == 'P')))) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + break; + case SCE_C_USERLITERAL: + if (!(setWord.Contains(sc.ch))) + sc.SetState(SCE_C_DEFAULT|activitySet); + break; + case SCE_C_IDENTIFIER: + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch) || (sc.ch == '.')) { + char s[1000]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + lastWordWasUUID = strcmp(s, "uuid") == 0; + sc.ChangeState(SCE_C_WORD|activitySet); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_C_WORD2|activitySet); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_C_GLOBALCLASS|activitySet); + } else { + int subStyle = classifierIdentifiers.ValueFor(s); + if (subStyle >= 0) { + sc.ChangeState(subStyle|activitySet); + } + } + const bool literalString = sc.ch == '\"'; + if (literalString || sc.ch == '\'') { + size_t lenS = strlen(s); + const bool raw = literalString && sc.chPrev == 'R' && !setInvalidRawFirst.Contains(sc.chNext); + if (raw) + s[lenS--] = '\0'; + const bool valid = + (lenS == 0) || + ((lenS == 1) && ((s[0] == 'L') || (s[0] == 'u') || (s[0] == 'U'))) || + ((lenS == 2) && literalString && (s[0] == 'u') && (s[1] == '8')); + if (valid) { + if (literalString) { + if (raw) { + // Set the style of the string prefix to SCE_C_STRINGRAW but then change to + // SCE_C_DEFAULT as that allows the raw string start code to run. + sc.ChangeState(SCE_C_STRINGRAW|activitySet); + sc.SetState(SCE_C_DEFAULT|activitySet); + } else { + sc.ChangeState(SCE_C_STRING|activitySet); + } + } else { + sc.ChangeState(SCE_C_CHARACTER|activitySet); + } + } else { + sc.SetState(SCE_C_DEFAULT | activitySet); + } + } else { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + } + break; + case SCE_C_PREPROCESSOR: + if (options.stylingWithinPreprocessor) { + if (IsASpace(sc.ch)) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + } else if (isStringInPreprocessor && (sc.Match('>') || sc.Match('\"') || sc.atLineEnd)) { + isStringInPreprocessor = false; + } else if (!isStringInPreprocessor) { + if ((isIncludePreprocessor && sc.Match('<')) || sc.Match('\"')) { + isStringInPreprocessor = true; + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { + sc.SetState(SCE_C_PREPROCESSORCOMMENTDOC|activitySet); + } else { + sc.SetState(SCE_C_PREPROCESSORCOMMENT|activitySet); + } + sc.Forward(); // Eat the * + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + } + break; + case SCE_C_PREPROCESSORCOMMENT: + case SCE_C_PREPROCESSORCOMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_PREPROCESSOR|activitySet); + continue; // Without advancing in case of '\'. + } + break; + case SCE_C_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } else { + styleBeforeTaskMarker = SCE_C_COMMENT; + highlightTaskMarker(sc, styler, activitySet, markerList, caseSensitive); + } + break; + case SCE_C_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_C_COMMENTDOC; + sc.SetState(SCE_C_COMMENTDOCKEYWORD|activitySet); + } + } + break; + case SCE_C_COMMENTLINE: + if (sc.atLineStart && !continuationLine) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } else { + styleBeforeTaskMarker = SCE_C_COMMENTLINE; + highlightTaskMarker(sc, styler, activitySet, markerList, caseSensitive); + } + break; + case SCE_C_COMMENTLINEDOC: + if (sc.atLineStart && !continuationLine) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_C_COMMENTLINEDOC; + sc.SetState(SCE_C_COMMENTDOCKEYWORD|activitySet); + } + } + break; + case SCE_C_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_C_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + seenDocKeyBrace = false; + } else if (sc.ch == '[' || sc.ch == '{') { + seenDocKeyBrace = true; + } else if (!setDoxygen.Contains(sc.ch) + && !(seenDocKeyBrace && (sc.ch == ',' || sc.ch == '.'))) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!(IsASpace(sc.ch) || (sc.ch == 0))) { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR|activitySet); + } else if (!keywords3.InList(s + 1)) { + int subStyleCDKW = classifierDocKeyWords.ValueFor(s+1); + if (subStyleCDKW >= 0) { + sc.ChangeState(subStyleCDKW|activitySet); + } else { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR|activitySet); + } + } + sc.SetState(styleBeforeDCKeyword|activitySet); + seenDocKeyBrace = false; + } + break; + case SCE_C_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL|activitySet); + } else if (isIncludePreprocessor) { + if (sc.ch == '>') { + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + isIncludePreprocessor = false; + } + } else if (sc.ch == '\\') { + if (options.escapeSequence) { + sc.SetState(SCE_C_ESCAPESEQUENCE|activitySet); + escapeSeq.resetEscapeState(sc.chNext); + } + sc.Forward(); // Skip all characters after the backslash + } else if (sc.ch == '\"') { + if (sc.chNext == '_') { + sc.ChangeState(SCE_C_USERLITERAL|activitySet); + } else { + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } + } + break; + case SCE_C_ESCAPESEQUENCE: + escapeSeq.digitsLeft--; + if (!escapeSeq.atEscapeEnd(sc.ch)) { + break; + } + if (sc.ch == '"') { + sc.SetState(SCE_C_STRING|activitySet); + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } else if (sc.ch == '\\') { + escapeSeq.resetEscapeState(sc.chNext); + sc.Forward(); + } else { + sc.SetState(SCE_C_STRING|activitySet); + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL|activitySet); + } + } + break; + case SCE_C_HASHQUOTEDSTRING: + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } + break; + case SCE_C_STRINGRAW: + if (sc.Match(rawStringTerminator.c_str())) { + for (size_t termPos=rawStringTerminator.size(); termPos; termPos--) + sc.Forward(); + sc.SetState(SCE_C_DEFAULT|activitySet); + rawStringTerminator = ""; + } + break; + case SCE_C_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL|activitySet); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + if (sc.chNext == '_') { + sc.ChangeState(SCE_C_USERLITERAL|activitySet); + } else { + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } + } + break; + case SCE_C_REGEX: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } else if (! inRERange && sc.ch == '/') { + sc.Forward(); + while ((sc.ch < 0x80) && islower(sc.ch)) + sc.Forward(); // gobble regex flags + sc.SetState(SCE_C_DEFAULT|activitySet); + } else if (sc.ch == '\\' && (static_cast(sc.currentPos+1) < lineEndNext)) { + // Gobble up the escaped character + sc.Forward(); + } else if (sc.ch == '[') { + inRERange = true; + } else if (sc.ch == ']') { + inRERange = false; + } + break; + case SCE_C_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + break; + case SCE_C_VERBATIM: + if (options.verbatimStringsAllowEscapes && (sc.ch == '\\')) { + sc.Forward(); // Skip all characters after the backslash + } else if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_C_DEFAULT|activitySet); + } + } + break; + case SCE_C_TRIPLEVERBATIM: + if (sc.Match(R"(""")")) { + while (sc.Match('"')) { + sc.Forward(); + } + sc.SetState(SCE_C_DEFAULT|activitySet); + } + break; + case SCE_C_UUID: + if (sc.atLineEnd || sc.ch == ')') { + sc.SetState(SCE_C_DEFAULT|activitySet); + } + break; + case SCE_C_TASKMARKER: + if (isoperator(sc.ch) || IsASpace(sc.ch)) { + sc.SetState(styleBeforeTaskMarker|activitySet); + styleBeforeTaskMarker = SCE_C_DEFAULT; + } + } + + if (sc.atLineEnd && !atLineEndBeforeSwitch) { + // State exit processing consumed characters up to end of line. + lineCurrent++; + lineEndNext = styler.LineEnd(lineCurrent); + vlls.Add(lineCurrent, preproc); + } + + // Determine if a new state should be entered. + if (MaskActive(sc.state) == SCE_C_DEFAULT) { + if (sc.Match('@', '\"')) { + sc.SetState(SCE_C_VERBATIM|activitySet); + sc.Forward(); + } else if (options.triplequotedStrings && sc.Match(R"(""")")) { + sc.SetState(SCE_C_TRIPLEVERBATIM|activitySet); + sc.Forward(2); + } else if (options.hashquotedStrings && sc.Match('#', '\"')) { + sc.SetState(SCE_C_HASHQUOTEDSTRING|activitySet); + sc.Forward(); + } else if (options.backQuotedStrings && sc.Match('`')) { + sc.SetState(SCE_C_STRINGRAW|activitySet); + rawStringTerminator = "`"; + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + if (lastWordWasUUID) { + sc.SetState(SCE_C_UUID|activitySet); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_C_NUMBER|activitySet); + } + } else if (!sc.atLineEnd && (setWordStart.Contains(sc.ch) || (sc.ch == '@'))) { + if (lastWordWasUUID) { + sc.SetState(SCE_C_UUID|activitySet); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_C_IDENTIFIER|activitySet); + } + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_C_COMMENTDOC|activitySet); + } else { + sc.SetState(SCE_C_COMMENT|activitySet); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_C_COMMENTLINEDOC|activitySet); + else + sc.SetState(SCE_C_COMMENTLINE|activitySet); + } else if (sc.ch == '/' + && (setOKBeforeRE.Contains(chPrevNonWhite) + || followsReturnKeyword(sc, styler)) + && (!setCouldBePostOp.Contains(chPrevNonWhite) + || !FollowsPostfixOperator(sc, styler))) { + sc.SetState(SCE_C_REGEX|activitySet); // JavaScript's RegEx + inRERange = false; + } else if (sc.ch == '\"') { + if (sc.chPrev == 'R') { + styler.Flush(); + if (MaskActive(styler.StyleAt(sc.currentPos - 1)) == SCE_C_STRINGRAW) { + sc.SetState(SCE_C_STRINGRAW|activitySet); + rawStringTerminator = ")"; + for (Sci_Position termPos = sc.currentPos + 1;; termPos++) { + const char chTerminator = styler.SafeGetCharAt(termPos, '('); + if (chTerminator == '(') + break; + rawStringTerminator += chTerminator; + } + rawStringTerminator += '\"'; + } else { + sc.SetState(SCE_C_STRING|activitySet); + } + } else { + sc.SetState(SCE_C_STRING|activitySet); + } + isIncludePreprocessor = false; // ensure that '>' won't end the string + } else if (isIncludePreprocessor && sc.ch == '<') { + sc.SetState(SCE_C_STRING|activitySet); + } else if (sc.ch == '\'') { + sc.SetState(SCE_C_CHARACTER|activitySet); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_C_PREPROCESSOR|activitySet); + // Skip whitespace between # and preprocessor word + do { + sc.Forward(); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); + if (sc.atLineEnd) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } else if (sc.Match("include")) { + isIncludePreprocessor = true; + } else { + if (options.trackPreprocessor) { + if (sc.Match("ifdef") || sc.Match("ifndef")) { + const bool isIfDef = sc.Match("ifdef"); + const int startRest = isIfDef ? 5 : 6; + std::string restOfLine = GetRestOfLine(styler, sc.currentPos + startRest + 1, false); + bool foundDef = preprocessorDefinitions.find(restOfLine) != preprocessorDefinitions.end(); + preproc.StartSection(isIfDef == foundDef); + } else if (sc.Match("if")) { + std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 2, true); + const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); + preproc.StartSection(ifGood); + } else if (sc.Match("else")) { + if (!preproc.CurrentIfTaken()) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + } else if (!preproc.IsInactive()) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + } + } else if (sc.Match("elif")) { + // Ensure only one chosen out of #if .. #elif .. #elif .. #else .. #endif + if (!preproc.CurrentIfTaken()) { + // Similar to #if + std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 4, true); + const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); + if (ifGood) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + } + } else if (!preproc.IsInactive()) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + } + } else if (sc.Match("endif")) { + preproc.EndSection(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + } else if (sc.Match("define")) { + if (options.updatePreprocessor && !preproc.IsInactive()) { + std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 6, true); + size_t startName = 0; + while ((startName < restOfLine.length()) && IsSpaceOrTab(restOfLine[startName])) + startName++; + size_t endName = startName; + while ((endName < restOfLine.length()) && setWord.Contains(static_cast(restOfLine[endName]))) + endName++; + std::string key = restOfLine.substr(startName, endName-startName); + if ((endName < restOfLine.length()) && (restOfLine.at(endName) == '(')) { + // Macro + size_t endArgs = endName; + while ((endArgs < restOfLine.length()) && (restOfLine[endArgs] != ')')) + endArgs++; + std::string args = restOfLine.substr(endName + 1, endArgs - endName - 1); + size_t startValue = endArgs+1; + while ((startValue < restOfLine.length()) && IsSpaceOrTab(restOfLine[startValue])) + startValue++; + std::string value; + if (startValue < restOfLine.length()) + value = restOfLine.substr(startValue); + preprocessorDefinitions[key] = SymbolValue(value, args); + ppDefineHistory.push_back(PPDefinition(lineCurrent, key, value, false, args)); + definitionsChanged = true; + } else { + // Value + size_t startValue = endName; + while ((startValue < restOfLine.length()) && IsSpaceOrTab(restOfLine[startValue])) + startValue++; + std::string value = restOfLine.substr(startValue); + if (OnlySpaceOrTab(value)) + value = "1"; // No value defaults to 1 + preprocessorDefinitions[key] = value; + ppDefineHistory.push_back(PPDefinition(lineCurrent, key, value)); + definitionsChanged = true; + } + } + } else if (sc.Match("undef")) { + if (options.updatePreprocessor && !preproc.IsInactive()) { + const std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false); + std::vector tokens = Tokenize(restOfLine); + if (tokens.size() >= 1) { + const std::string key = tokens[0]; + preprocessorDefinitions.erase(key); + ppDefineHistory.push_back(PPDefinition(lineCurrent, key, "", true)); + definitionsChanged = true; + } + } + } + } + } + } else if (isoperator(sc.ch)) { + sc.SetState(SCE_C_OPERATOR|activitySet); + } + } + + if (!IsASpace(sc.ch) && !IsSpaceEquiv(MaskActive(sc.state))) { + chPrevNonWhite = sc.ch; + visibleChars++; + } + continuationLine = false; + sc.Forward(); + } + const bool rawStringsChanged = rawStringTerminators.Merge(rawSTNew, lineCurrent); + if (definitionsChanged || rawStringsChanged) + styler.ChangeLexerState(startPos, startPos + length); + sc.Complete(); +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". + +void SCI_METHOD LexerCPP::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + + if (!options.fold) + return; + + LexAccessor styler(pAccess); + + const Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + bool inLineComment = false; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + Sci_PositionU lineStartNext = styler.LineStart(lineCurrent+1); + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = MaskActive(styler.StyleAt(startPos)); + int style = MaskActive(initStyle); + const bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty(); + for (Sci_PositionU i = startPos; i < endPos; i++) { + const char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + const int stylePrev = style; + style = styleNext; + styleNext = MaskActive(styler.StyleAt(i + 1)); + const bool atEOL = i == (lineStartNext-1); + if ((style == SCE_C_COMMENTLINE) || (style == SCE_C_COMMENTLINEDOC)) + inLineComment = true; + if (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style) && !inLineComment) { + if (!IsStreamCommentStyle(stylePrev)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (options.foldComment && options.foldCommentExplicit && ((style == SCE_C_COMMENTLINE) || options.foldExplicitAnywhere)) { + if (userDefinedFoldMarkers) { + if (styler.Match(i, options.foldExplicitStart.c_str())) { + levelNext++; + } else if (styler.Match(i, options.foldExplicitEnd.c_str())) { + levelNext--; + } + } else { + if ((ch == '/') && (chNext == '/')) { + const char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelNext++; + } else if (chNext2 == '}') { + levelNext--; + } + } + } + } + if (options.foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { + if (ch == '#') { + Sci_PositionU j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (styler.Match(j, "region") || styler.Match(j, "if")) { + levelNext++; + } else if (styler.Match(j, "end")) { + levelNext--; + } + + if (options.foldPreprocessorAtElse && (styler.Match(j, "else") || styler.Match(j, "elif"))) { + levelMinCurrent--; + } + } + } + if (options.foldSyntaxBased && (style == SCE_C_OPERATOR)) { + if (ch == '{' || ch == '[' || ch == '(') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (options.foldAtElse && levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}' || ch == ']' || ch == ')') { + levelNext--; + } + } + if (!IsASpace(ch)) + visibleChars++; + if (atEOL || (i == endPos-1)) { + int levelUse = levelCurrent; + if ((options.foldSyntaxBased && options.foldAtElse) || + (options.foldPreprocessor && options.foldPreprocessorAtElse) + ) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && options.foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + lineStartNext = styler.LineStart(lineCurrent+1); + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + if (atEOL && (i == static_cast(styler.Length()-1))) { + // There is an empty line at end of file so give it same level and empty + styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG); + } + visibleChars = 0; + inLineComment = false; + } + } +} + +void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTable &preprocessorDefinitions) { + + // Remove whitespace tokens + tokens.erase(std::remove_if(tokens.begin(), tokens.end(), OnlySpaceOrTab), tokens.end()); + + // Evaluate defined statements to either 0 or 1 + for (size_t i=0; (i+1)) + SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i+2]); + if (it != preprocessorDefinitions.end()) { + val = "1"; + } + tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 4); + } else { + // Spurious '(' so erase as more likely to result in false + tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2); + } + } else { + // defined + SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i+1]); + if (it != preprocessorDefinitions.end()) { + val = "1"; + } + tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2); + } + tokens[i] = val; + } else { + i++; + } + } + + // Evaluate identifiers + const size_t maxIterations = 100; + size_t iterations = 0; // Limit number of iterations in case there is a recursive macro. + for (size_t i = 0; (i(tokens[i][0]))) { + SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i]); + if (it != preprocessorDefinitions.end()) { + // Tokenize value + std::vector macroTokens = Tokenize(it->second.value); + if (it->second.IsMacro()) { + if ((i + 1 < tokens.size()) && (tokens.at(i + 1) == "(")) { + // Create map of argument name to value + std::vector argumentNames = StringSplit(it->second.arguments, ','); + std::map arguments; + size_t arg = 0; + size_t tok = i+2; + while ((tok < tokens.size()) && (arg < argumentNames.size()) && (tokens.at(tok) != ")")) { + if (tokens.at(tok) != ",") { + arguments[argumentNames.at(arg)] = tokens.at(tok); + arg++; + } + tok++; + } + + // Remove invocation + tokens.erase(tokens.begin() + i, tokens.begin() + tok + 1); + + // Substitute values into macro + macroTokens.erase(std::remove_if(macroTokens.begin(), macroTokens.end(), OnlySpaceOrTab), macroTokens.end()); + + for (size_t iMacro = 0; iMacro < macroTokens.size();) { + if (setWordStart.Contains(static_cast(macroTokens[iMacro][0]))) { + std::map::const_iterator itFind = arguments.find(macroTokens[iMacro]); + if (itFind != arguments.end()) { + // TODO: Possible that value will be expression so should insert tokenized form + macroTokens[iMacro] = itFind->second; + } + } + iMacro++; + } + + // Insert results back into tokens + tokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end()); + + } else { + i++; + } + } else { + // Remove invocation + tokens.erase(tokens.begin() + i); + // Insert results back into tokens + tokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end()); + } + } else { + // Identifier not found and value defaults to zero + tokens[i] = "0"; + } + } else { + i++; + } + } + + // Find bracketed subexpressions and recurse on them + BracketPair bracketPair = FindBracketPair(tokens); + while (bracketPair.itBracket != tokens.end()) { + std::vector inBracket(bracketPair.itBracket + 1, bracketPair.itEndBracket); + EvaluateTokens(inBracket, preprocessorDefinitions); + + // The insertion is done before the removal because there were failures with the opposite approach + tokens.insert(bracketPair.itBracket, inBracket.begin(), inBracket.end()); + + bracketPair = FindBracketPair(tokens); + tokens.erase(bracketPair.itBracket, bracketPair.itEndBracket + 1); + + bracketPair = FindBracketPair(tokens); + } + + // Evaluate logical negations + for (size_t j=0; (j+1)::iterator itInsert = + tokens.erase(tokens.begin() + j, tokens.begin() + j + 2); + tokens.insert(itInsert, isTrue ? "1" : "0"); + } else { + j++; + } + } + + // Evaluate expressions in precedence order + enum precedence { precArithmetic, precRelative, precLogical }; + for (int prec=precArithmetic; prec <= precLogical; prec++) { + // Looking at 3 tokens at a time so end at 2 before end + for (size_t k=0; (k+2)") + result = valA > valB; + else if (tokens[k+1] == ">=") + result = valA >= valB; + else if (tokens[k+1] == "==") + result = valA == valB; + else if (tokens[k+1] == "!=") + result = valA != valB; + else if (tokens[k+1] == "||") + result = valA || valB; + else if (tokens[k+1] == "&&") + result = valA && valB; + char sResult[30]; + sprintf(sResult, "%d", result); + std::vector::iterator itInsert = + tokens.erase(tokens.begin() + k, tokens.begin() + k + 3); + tokens.insert(itInsert, sResult); + } else { + k++; + } + } + } +} + +std::vector LexerCPP::Tokenize(const std::string &expr) const { + // Break into tokens + std::vector tokens; + const char *cp = expr.c_str(); + while (*cp) { + std::string word; + if (setWord.Contains(static_cast(*cp))) { + // Identifiers and numbers + while (setWord.Contains(static_cast(*cp))) { + word += *cp; + cp++; + } + } else if (IsSpaceOrTab(*cp)) { + while (IsSpaceOrTab(*cp)) { + word += *cp; + cp++; + } + } else if (setRelOp.Contains(static_cast(*cp))) { + word += *cp; + cp++; + if (setRelOp.Contains(static_cast(*cp))) { + word += *cp; + cp++; + } + } else if (setLogicalOp.Contains(static_cast(*cp))) { + word += *cp; + cp++; + if (setLogicalOp.Contains(static_cast(*cp))) { + word += *cp; + cp++; + } + } else { + // Should handle strings, characters, and comments here + word += *cp; + cp++; + } + tokens.push_back(word); + } + return tokens; +} + +bool LexerCPP::EvaluateExpression(const std::string &expr, const SymbolTable &preprocessorDefinitions) { + std::vector tokens = Tokenize(expr); + + EvaluateTokens(tokens, preprocessorDefinitions); + + // "0" or "" -> false else true + const bool isFalse = tokens.empty() || + ((tokens.size() == 1) && ((tokens[0] == "") || tokens[0] == "0")); + return !isFalse; +} + +LexerModule lmCPP(SCLEX_CPP, LexerCPP::LexerFactoryCPP, "cpp", cppWordLists); +LexerModule lmCPPNoCase(SCLEX_CPPNOCASE, LexerCPP::LexerFactoryCPPInsensitive, "cppnocase", cppWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCSS.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCSS.cpp new file mode 100644 index 000000000..c1a86f537 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCSS.cpp @@ -0,0 +1,567 @@ +// Scintilla source code edit control +// Encoding: UTF-8 +/** @file LexCSS.cxx + ** Lexer for Cascading Style Sheets + ** Written by Jakub Vrána + ** Improved by Philippe Lhoste (CSS2) + ** Improved by Ross McKay (SCSS mode; see http://sass-lang.com/ ) + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// TODO: handle SCSS nested properties like font: { weight: bold; size: 1em; } +// TODO: handle SCSS interpolation: #{} +// TODO: add features for Less if somebody feels like contributing; http://lesscss.org/ +// TODO: refactor this monster so that the next poor slob can read it! + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + + +static inline bool IsAWordChar(const unsigned int ch) { + /* FIXME: + * The CSS spec allows "ISO 10646 characters U+00A1 and higher" to be treated as word chars. + * Unfortunately, we are only getting string bytes here, and not full unicode characters. We cannot guarantee + * that our byte is between U+0080 - U+00A0 (to return false), so we have to allow all characters U+0080 and higher + */ + return ch >= 0x80 || isalnum(ch) || ch == '-' || ch == '_'; +} + +inline bool IsCssOperator(const int ch) { + if (!((ch < 0x80) && isalnum(ch)) && + (ch == '{' || ch == '}' || ch == ':' || ch == ',' || ch == ';' || + ch == '.' || ch == '#' || ch == '!' || ch == '@' || + /* CSS2 */ + ch == '*' || ch == '>' || ch == '+' || ch == '=' || ch == '~' || ch == '|' || + ch == '[' || ch == ']' || ch == '(' || ch == ')')) { + return true; + } + return false; +} + +// look behind (from start of document to our start position) to determine current nesting level +inline int NestingLevelLookBehind(Sci_PositionU startPos, Accessor &styler) { + int ch; + int nestingLevel = 0; + + for (Sci_PositionU i = 0; i < startPos; i++) { + ch = styler.SafeGetCharAt(i); + if (ch == '{') + nestingLevel++; + else if (ch == '}') + nestingLevel--; + } + + return nestingLevel; +} + +static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { + WordList &css1Props = *keywordlists[0]; + WordList &pseudoClasses = *keywordlists[1]; + WordList &css2Props = *keywordlists[2]; + WordList &css3Props = *keywordlists[3]; + WordList &pseudoElements = *keywordlists[4]; + WordList &exProps = *keywordlists[5]; + WordList &exPseudoClasses = *keywordlists[6]; + WordList &exPseudoElements = *keywordlists[7]; + + StyleContext sc(startPos, length, initStyle, styler); + + int lastState = -1; // before operator + int lastStateC = -1; // before comment + int lastStateS = -1; // before single-quoted/double-quoted string + int lastStateVar = -1; // before variable (SCSS) + int lastStateVal = -1; // before value (SCSS) + int op = ' '; // last operator + int opPrev = ' '; // last operator + bool insideParentheses = false; // true if currently in a CSS url() or similar construct + + // property lexer.css.scss.language + // Set to 1 for Sassy CSS (.scss) + bool isScssDocument = styler.GetPropertyInt("lexer.css.scss.language") != 0; + + // property lexer.css.less.language + // Set to 1 for Less CSS (.less) + bool isLessDocument = styler.GetPropertyInt("lexer.css.less.language") != 0; + + // property lexer.css.hss.language + // Set to 1 for HSS (.hss) + bool isHssDocument = styler.GetPropertyInt("lexer.css.hss.language") != 0; + + // SCSS/LESS/HSS have the concept of variable + bool hasVariables = isScssDocument || isLessDocument || isHssDocument; + char varPrefix = 0; + if (hasVariables) + varPrefix = isLessDocument ? '@' : '$'; + + // SCSS/LESS/HSS support single-line comments + typedef enum _CommentModes { eCommentBlock = 0, eCommentLine = 1} CommentMode; + CommentMode comment_mode = eCommentBlock; + bool hasSingleLineComments = isScssDocument || isLessDocument || isHssDocument; + + // must keep track of nesting level in document types that support it (SCSS/LESS/HSS) + bool hasNesting = false; + int nestingLevel = 0; + if (isScssDocument || isLessDocument || isHssDocument) { + hasNesting = true; + nestingLevel = NestingLevelLookBehind(startPos, styler); + } + + // "the loop" + for (; sc.More(); sc.Forward()) { + if (sc.state == SCE_CSS_COMMENT && ((comment_mode == eCommentBlock && sc.Match('*', '/')) || (comment_mode == eCommentLine && sc.atLineEnd))) { + if (lastStateC == -1) { + // backtrack to get last state: + // comments are like whitespace, so we must return to the previous state + Sci_PositionU i = startPos; + for (; i > 0; i--) { + if ((lastStateC = styler.StyleAt(i-1)) != SCE_CSS_COMMENT) { + if (lastStateC == SCE_CSS_OPERATOR) { + op = styler.SafeGetCharAt(i-1); + opPrev = styler.SafeGetCharAt(i-2); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + if (i == 0) + lastState = SCE_CSS_DEFAULT; + } + break; + } + } + if (i == 0) + lastStateC = SCE_CSS_DEFAULT; + } + if (comment_mode == eCommentBlock) { + sc.Forward(); + sc.ForwardSetState(lastStateC); + } else /* eCommentLine */ { + sc.SetState(lastStateC); + } + } + + if (sc.state == SCE_CSS_COMMENT) + continue; + + if (sc.state == SCE_CSS_DOUBLESTRING || sc.state == SCE_CSS_SINGLESTRING) { + if (sc.ch != (sc.state == SCE_CSS_DOUBLESTRING ? '\"' : '\'')) + continue; + Sci_PositionU i = sc.currentPos; + while (i && styler[i-1] == '\\') + i--; + if ((sc.currentPos - i) % 2 == 1) + continue; + sc.ForwardSetState(lastStateS); + } + + if (sc.state == SCE_CSS_OPERATOR) { + if (op == ' ') { + Sci_PositionU i = startPos; + op = styler.SafeGetCharAt(i-1); + opPrev = styler.SafeGetCharAt(i-2); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + } + switch (op) { + case '@': + if (lastState == SCE_CSS_DEFAULT || hasNesting) + sc.SetState(SCE_CSS_DIRECTIVE); + break; + case '>': + case '+': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || + lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_DEFAULT); + break; + case '[': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || + lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_ATTRIBUTE); + break; + case ']': + if (lastState == SCE_CSS_ATTRIBUTE) + sc.SetState(SCE_CSS_TAG); + break; + case '{': + nestingLevel++; + switch (lastState) { + case SCE_CSS_MEDIA: + sc.SetState(SCE_CSS_DEFAULT); + break; + case SCE_CSS_TAG: + case SCE_CSS_DIRECTIVE: + sc.SetState(SCE_CSS_IDENTIFIER); + break; + } + break; + case '}': + if (--nestingLevel < 0) + nestingLevel = 0; + switch (lastState) { + case SCE_CSS_DEFAULT: + case SCE_CSS_VALUE: + case SCE_CSS_IMPORTANT: + case SCE_CSS_IDENTIFIER: + case SCE_CSS_IDENTIFIER2: + case SCE_CSS_IDENTIFIER3: + if (hasNesting) + sc.SetState(nestingLevel > 0 ? SCE_CSS_IDENTIFIER : SCE_CSS_DEFAULT); + else + sc.SetState(SCE_CSS_DEFAULT); + break; + } + break; + case '(': + if (lastState == SCE_CSS_PSEUDOCLASS) + sc.SetState(SCE_CSS_TAG); + else if (lastState == SCE_CSS_EXTENDED_PSEUDOCLASS) + sc.SetState(SCE_CSS_EXTENDED_PSEUDOCLASS); + break; + case ')': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || + lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS || + lastState == SCE_CSS_PSEUDOELEMENT || lastState == SCE_CSS_EXTENDED_PSEUDOELEMENT) + sc.SetState(SCE_CSS_TAG); + break; + case ':': + switch (lastState) { + case SCE_CSS_TAG: + case SCE_CSS_DEFAULT: + case SCE_CSS_CLASS: + case SCE_CSS_ID: + case SCE_CSS_PSEUDOCLASS: + case SCE_CSS_EXTENDED_PSEUDOCLASS: + case SCE_CSS_UNKNOWN_PSEUDOCLASS: + case SCE_CSS_PSEUDOELEMENT: + case SCE_CSS_EXTENDED_PSEUDOELEMENT: + sc.SetState(SCE_CSS_PSEUDOCLASS); + break; + case SCE_CSS_IDENTIFIER: + case SCE_CSS_IDENTIFIER2: + case SCE_CSS_IDENTIFIER3: + case SCE_CSS_EXTENDED_IDENTIFIER: + case SCE_CSS_UNKNOWN_IDENTIFIER: + case SCE_CSS_VARIABLE: + sc.SetState(SCE_CSS_VALUE); + lastStateVal = lastState; + break; + } + break; + case '.': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || + lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_CLASS); + break; + case '#': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || + lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_ID); + break; + case ',': + case '|': + case '~': + if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ';': + switch (lastState) { + case SCE_CSS_DIRECTIVE: + if (hasNesting) { + sc.SetState(nestingLevel > 0 ? SCE_CSS_IDENTIFIER : SCE_CSS_DEFAULT); + } else { + sc.SetState(SCE_CSS_DEFAULT); + } + break; + case SCE_CSS_VALUE: + case SCE_CSS_IMPORTANT: + // data URLs can have semicolons; simplistically check for wrapping parentheses and move along + if (insideParentheses) { + sc.SetState(lastState); + } else { + if (lastStateVal == SCE_CSS_VARIABLE) { + sc.SetState(SCE_CSS_DEFAULT); + } else { + sc.SetState(SCE_CSS_IDENTIFIER); + } + } + break; + case SCE_CSS_VARIABLE: + if (lastStateVar == SCE_CSS_VALUE) { + // data URLs can have semicolons; simplistically check for wrapping parentheses and move along + if (insideParentheses) { + sc.SetState(SCE_CSS_VALUE); + } else { + sc.SetState(SCE_CSS_IDENTIFIER); + } + } else { + sc.SetState(SCE_CSS_DEFAULT); + } + break; + } + break; + case '!': + if (lastState == SCE_CSS_VALUE) + sc.SetState(SCE_CSS_IMPORTANT); + break; + } + } + + if (sc.ch == '*' && sc.state == SCE_CSS_DEFAULT) { + sc.SetState(SCE_CSS_TAG); + continue; + } + + // check for inside parentheses (whether part of an "operator" or not) + if (sc.ch == '(') + insideParentheses = true; + else if (sc.ch == ')') + insideParentheses = false; + + // SCSS special modes + if (hasVariables) { + // variable name + if (sc.ch == varPrefix) { + switch (sc.state) { + case SCE_CSS_DEFAULT: + if (isLessDocument) // give priority to pseudo elements + break; + // Falls through. + case SCE_CSS_VALUE: + lastStateVar = sc.state; + sc.SetState(SCE_CSS_VARIABLE); + continue; + } + } + if (sc.state == SCE_CSS_VARIABLE) { + if (IsAWordChar(sc.ch)) { + // still looking at the variable name + continue; + } + if (lastStateVar == SCE_CSS_VALUE) { + // not looking at the variable name any more, and it was part of a value + sc.SetState(SCE_CSS_VALUE); + } + } + + // nested rule parent selector + if (sc.ch == '&') { + switch (sc.state) { + case SCE_CSS_DEFAULT: + case SCE_CSS_IDENTIFIER: + sc.SetState(SCE_CSS_TAG); + continue; + } + } + } + + // nesting rules that apply to SCSS and Less + if (hasNesting) { + // check for nested rule selector + if (sc.state == SCE_CSS_IDENTIFIER && (IsAWordChar(sc.ch) || sc.ch == ':' || sc.ch == '.' || sc.ch == '#')) { + // look ahead to see whether { comes before next ; and } + Sci_PositionU endPos = startPos + length; + int ch; + + for (Sci_PositionU i = sc.currentPos; i < endPos; i++) { + ch = styler.SafeGetCharAt(i); + if (ch == ';' || ch == '}') + break; + if (ch == '{') { + sc.SetState(SCE_CSS_DEFAULT); + continue; + } + } + } + + } + + if (IsAWordChar(sc.ch)) { + if (sc.state == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_TAG); + continue; + } + + if (IsAWordChar(sc.chPrev) && ( + sc.state == SCE_CSS_IDENTIFIER || sc.state == SCE_CSS_IDENTIFIER2 || + sc.state == SCE_CSS_IDENTIFIER3 || sc.state == SCE_CSS_EXTENDED_IDENTIFIER || + sc.state == SCE_CSS_UNKNOWN_IDENTIFIER || + sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_PSEUDOELEMENT || + sc.state == SCE_CSS_EXTENDED_PSEUDOCLASS || sc.state == SCE_CSS_EXTENDED_PSEUDOELEMENT || + sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS || + sc.state == SCE_CSS_IMPORTANT || + sc.state == SCE_CSS_DIRECTIVE + )) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + char *s2 = s; + while (*s2 && !IsAWordChar(*s2)) + s2++; + switch (sc.state) { + case SCE_CSS_IDENTIFIER: + case SCE_CSS_IDENTIFIER2: + case SCE_CSS_IDENTIFIER3: + case SCE_CSS_EXTENDED_IDENTIFIER: + case SCE_CSS_UNKNOWN_IDENTIFIER: + if (css1Props.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER); + else if (css2Props.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER2); + else if (css3Props.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER3); + else if (exProps.InList(s2)) + sc.ChangeState(SCE_CSS_EXTENDED_IDENTIFIER); + else + sc.ChangeState(SCE_CSS_UNKNOWN_IDENTIFIER); + break; + case SCE_CSS_PSEUDOCLASS: + case SCE_CSS_PSEUDOELEMENT: + case SCE_CSS_EXTENDED_PSEUDOCLASS: + case SCE_CSS_EXTENDED_PSEUDOELEMENT: + case SCE_CSS_UNKNOWN_PSEUDOCLASS: + if (op == ':' && opPrev != ':' && pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_PSEUDOCLASS); + else if (opPrev == ':' && pseudoElements.InList(s2)) + sc.ChangeState(SCE_CSS_PSEUDOELEMENT); + else if ((op == ':' || (op == '(' && lastState == SCE_CSS_EXTENDED_PSEUDOCLASS)) && opPrev != ':' && exPseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_EXTENDED_PSEUDOCLASS); + else if (opPrev == ':' && exPseudoElements.InList(s2)) + sc.ChangeState(SCE_CSS_EXTENDED_PSEUDOELEMENT); + else + sc.ChangeState(SCE_CSS_UNKNOWN_PSEUDOCLASS); + break; + case SCE_CSS_IMPORTANT: + if (strcmp(s2, "important") != 0) + sc.ChangeState(SCE_CSS_VALUE); + break; + case SCE_CSS_DIRECTIVE: + if (op == '@' && strcmp(s2, "media") == 0) + sc.ChangeState(SCE_CSS_MEDIA); + break; + } + } + + if (sc.ch != '.' && sc.ch != ':' && sc.ch != '#' && ( + sc.state == SCE_CSS_CLASS || sc.state == SCE_CSS_ID || + (sc.ch != '(' && sc.ch != ')' && ( /* This line of the condition makes it possible to extend pseudo-classes with parentheses */ + sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_PSEUDOELEMENT || + sc.state == SCE_CSS_EXTENDED_PSEUDOCLASS || sc.state == SCE_CSS_EXTENDED_PSEUDOELEMENT || + sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS + )) + )) + sc.SetState(SCE_CSS_TAG); + + if (sc.Match('/', '*')) { + lastStateC = sc.state; + comment_mode = eCommentBlock; + sc.SetState(SCE_CSS_COMMENT); + sc.Forward(); + } else if (hasSingleLineComments && sc.Match('/', '/') && !insideParentheses) { + // note that we've had to treat ([...]// as the start of a URL not a comment, e.g. url(http://example.com), url(//example.com) + lastStateC = sc.state; + comment_mode = eCommentLine; + sc.SetState(SCE_CSS_COMMENT); + sc.Forward(); + } else if ((sc.state == SCE_CSS_VALUE || sc.state == SCE_CSS_ATTRIBUTE) + && (sc.ch == '\"' || sc.ch == '\'')) { + lastStateS = sc.state; + sc.SetState((sc.ch == '\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING)); + } else if (IsCssOperator(sc.ch) + && (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']') + && (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!') + && ((sc.state != SCE_CSS_DIRECTIVE && sc.state != SCE_CSS_MEDIA) || sc.ch == ';' || sc.ch == '{') + ) { + if (sc.state != SCE_CSS_OPERATOR) + lastState = sc.state; + sc.SetState(SCE_CSS_OPERATOR); + op = sc.ch; + opPrev = sc.chPrev; + } + } + + sc.Complete(); +} + +static void FoldCSSDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + bool inComment = (styler.StyleAt(startPos-1) == SCE_CSS_COMMENT); + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styler.StyleAt(i); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment) { + if (!inComment && (style == SCE_CSS_COMMENT)) + levelCurrent++; + else if (inComment && (style != SCE_CSS_COMMENT)) + levelCurrent--; + inComment = (style == SCE_CSS_COMMENT); + } + if (style == SCE_CSS_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const cssWordListDesc[] = { + "CSS1 Properties", + "Pseudo-classes", + "CSS2 Properties", + "CSS3 Properties", + "Pseudo-elements", + "Browser-Specific CSS Properties", + "Browser-Specific Pseudo-classes", + "Browser-Specific Pseudo-elements", + 0 +}; + +LexerModule lmCss(SCLEX_CSS, ColouriseCssDoc, "css", FoldCSSDoc, cssWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCaml.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCaml.cpp new file mode 100644 index 000000000..1339b5dcc --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCaml.cpp @@ -0,0 +1,460 @@ +// Scintilla source code edit control +/** @file LexCaml.cxx + ** Lexer for Objective Caml. + **/ +// Copyright 2005-2009 by Robert Roessler +// The License.txt file describes the conditions under which this software may be distributed. +/* Release History + 20050204 Initial release. + 20050205 Quick compiler standards/"cleanliness" adjustment. + 20050206 Added cast for IsLeadByte(). + 20050209 Changes to "external" build support. + 20050306 Fix for 1st-char-in-doc "corner" case. + 20050502 Fix for [harmless] one-past-the-end coloring. + 20050515 Refined numeric token recognition logic. + 20051125 Added 2nd "optional" keywords class. + 20051129 Support "magic" (read-only) comments for RCaml. + 20051204 Swtich to using StyleContext infrastructure. + 20090629 Add full Standard ML '97 support. +*/ + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wcomma" +#endif + +// Since the Microsoft __iscsym[f] funcs are not ANSI... +inline int iscaml(int c) {return isalnum(c) || c == '_';} +inline int iscamlf(int c) {return isalpha(c) || c == '_';} + +static const int baseT[24] = { + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A - L */ + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16 /* M - X */ +}; + +using namespace Scintilla; + +#ifdef BUILD_AS_EXTERNAL_LEXER +/* + (actually seems to work!) +*/ +#include +#include "WindowAccessor.h" +#include "ExternalLexer.h" + +#undef EXT_LEXER_DECL +#define EXT_LEXER_DECL __declspec( dllexport ) __stdcall + +#if PLAT_WIN +#include +#endif + +static void ColouriseCamlDoc( + Sci_PositionU startPos, Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void FoldCamlDoc( + Sci_PositionU startPos, Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void InternalLexOrFold(int lexOrFold, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props); + +static const char* LexerName = "caml"; + +#ifdef TRACE +void Platform::DebugPrintf(const char *format, ...) { + char buffer[2000]; + va_list pArguments; + va_start(pArguments, format); + vsprintf(buffer,format,pArguments); + va_end(pArguments); + Platform::DebugDisplay(buffer); +} +#else +void Platform::DebugPrintf(const char *, ...) { +} +#endif + +bool Platform::IsDBCSLeadByte(int codePage, char ch) { + return ::IsDBCSLeadByteEx(codePage, ch) != 0; +} + +long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, lParam); +} + +long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, + reinterpret_cast(lParam)); +} + +void EXT_LEXER_DECL Fold(unsigned int lexer, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Fold + InternalLexOrFold(1, startPos, length, initStyle, words, window, props); + +} + +int EXT_LEXER_DECL GetLexerCount() +{ + return 1; // just us [Objective] Caml lexers here! +} + +void EXT_LEXER_DECL GetLexerName(unsigned int Index, char *name, int buflength) +{ + // below useless evaluation(s) to supress "not used" warnings + Index; + // return as much of our lexer name as will fit (what's up with Index?) + if (buflength > 0) { + buflength--; + int n = strlen(LexerName); + if (n > buflength) + n = buflength; + memcpy(name, LexerName, n), name[n] = '\0'; + } +} + +void EXT_LEXER_DECL Lex(unsigned int lexer, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Lex + InternalLexOrFold(0, startPos, length, initStyle, words, window, props); +} + +static void InternalLexOrFold(int foldOrLex, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props) +{ + // create and initialize a WindowAccessor (including contained PropSet) + PropSetSimple ps; + ps.SetMultiple(props); + WindowAccessor wa(window, ps); + // create and initialize WordList(s) + int nWL = 0; + for (; words[nWL]; nWL++) ; // count # of WordList PTRs needed + WordList** wl = new WordList* [nWL + 1];// alloc WordList PTRs + int i = 0; + for (; i < nWL; i++) { + wl[i] = new WordList(); // (works or THROWS bad_alloc EXCEPTION) + wl[i]->Set(words[i]); + } + wl[i] = 0; + // call our "internal" folder/lexer (... then do Flush!) + if (foldOrLex) + FoldCamlDoc(startPos, length, initStyle, wl, wa); + else + ColouriseCamlDoc(startPos, length, initStyle, wl, wa); + wa.Flush(); + // clean up before leaving + for (i = nWL - 1; i >= 0; i--) + delete wl[i]; + delete [] wl; +} + +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ + +void ColouriseCamlDoc( + Sci_PositionU startPos, Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + // initialize styler + StyleContext sc(startPos, length, initStyle, styler); + + Sci_PositionU chToken = 0; + int chBase = 0, chLit = 0; + WordList& keywords = *keywordlists[0]; + WordList& keywords2 = *keywordlists[1]; + WordList& keywords3 = *keywordlists[2]; + const bool isSML = keywords.InList("andalso"); + const int useMagic = styler.GetPropertyInt("lexer.caml.magic", 0); + + // set up [initial] state info (terminating states that shouldn't "bleed") + const int state_ = sc.state & 0x0f; + if (state_ <= SCE_CAML_CHAR + || (isSML && state_ == SCE_CAML_STRING)) + sc.state = SCE_CAML_DEFAULT; + int nesting = (state_ >= SCE_CAML_COMMENT)? (state_ - SCE_CAML_COMMENT): 0; + + // foreach char in range... + while (sc.More()) { + // set up [per-char] state info + int state2 = -1; // (ASSUME no state change) + Sci_Position chColor = sc.currentPos - 1;// (ASSUME standard coloring range) + bool advance = true; // (ASSUME scanner "eats" 1 char) + + // step state machine + switch (sc.state & 0x0f) { + case SCE_CAML_DEFAULT: + chToken = sc.currentPos; // save [possible] token start (JIC) + // it's wide open; what do we have? + if (iscamlf(sc.ch)) + state2 = SCE_CAML_IDENTIFIER; + else if (!isSML && sc.Match('`') && iscamlf(sc.chNext)) + state2 = SCE_CAML_TAGNAME; + else if (!isSML && sc.Match('#') && isdigit(sc.chNext)) + state2 = SCE_CAML_LINENUM; + else if (isdigit(sc.ch)) { + // it's a number, assume base 10 + state2 = SCE_CAML_NUMBER, chBase = 10; + if (sc.Match('0')) { + // there MAY be a base specified... + const char* baseC = "bBoOxX"; + if (isSML) { + if (sc.chNext == 'w') + sc.Forward(); // (consume SML "word" indicator) + baseC = "x"; + } + // ... change to specified base AS REQUIRED + if (strchr(baseC, sc.chNext)) + chBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward(); + } + } else if (!isSML && sc.Match('\'')) // (Caml char literal?) + state2 = SCE_CAML_CHAR, chLit = 0; + else if (isSML && sc.Match('#', '"')) // (SML char literal?) + state2 = SCE_CAML_CHAR, sc.Forward(); + else if (sc.Match('"')) + state2 = SCE_CAML_STRING; + else if (sc.Match('(', '*')) + state2 = SCE_CAML_COMMENT, sc.Forward(), sc.ch = ' '; // (*)... + else if (strchr("!?~" /* Caml "prefix-symbol" */ + "=<>@^|&+-*/$%" /* Caml "infix-symbol" */ + "()[]{};,:.#", sc.ch) // Caml "bracket" or ;,:.# + // SML "extra" ident chars + || (isSML && (sc.Match('\\') || sc.Match('`')))) + state2 = SCE_CAML_OPERATOR; + break; + + case SCE_CAML_IDENTIFIER: + // [try to] interpret as [additional] identifier char + if (!(iscaml(sc.ch) || sc.Match('\''))) { + const Sci_Position n = sc.currentPos - chToken; + if (n < 24) { + // length is believable as keyword, [re-]construct token + char t[24]; + for (Sci_Position i = -n; i < 0; i++) + t[n + i] = static_cast(sc.GetRelative(i)); + t[n] = '\0'; + // special-case "_" token as KEYWORD + if ((n == 1 && sc.chPrev == '_') || keywords.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD); + else if (keywords2.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD2); + else if (keywords3.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD3); + } + state2 = SCE_CAML_DEFAULT, advance = false; + } + break; + + case SCE_CAML_TAGNAME: + // [try to] interpret as [additional] tagname char + if (!(iscaml(sc.ch) || sc.Match('\''))) + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + /*case SCE_CAML_KEYWORD: + case SCE_CAML_KEYWORD2: + case SCE_CAML_KEYWORD3: + // [try to] interpret as [additional] keyword char + if (!iscaml(ch)) + state2 = SCE_CAML_DEFAULT, advance = false; + break;*/ + + case SCE_CAML_LINENUM: + // [try to] interpret as [additional] linenum directive char + if (!isdigit(sc.ch)) + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + case SCE_CAML_OPERATOR: { + // [try to] interpret as [additional] operator char + const char* o = 0; + if (iscaml(sc.ch) || isspace(sc.ch) // ident or whitespace + || (o = strchr(")]};,\'\"#", sc.ch),o) // "termination" chars + || (!isSML && sc.Match('`')) // Caml extra term char + || (!strchr("!$%&*+-./:<=>?@^|~", sc.ch)// "operator" chars + // SML extra ident chars + && !(isSML && (sc.Match('\\') || sc.Match('`'))))) { + // check for INCLUSIVE termination + if (o && strchr(")]};,", sc.ch)) { + if ((sc.Match(')') && sc.chPrev == '(') + || (sc.Match(']') && sc.chPrev == '[')) + // special-case "()" and "[]" tokens as KEYWORDS + sc.ChangeState(SCE_CAML_KEYWORD); + chColor++; + } else + advance = false; + state2 = SCE_CAML_DEFAULT; + } + break; + } + + case SCE_CAML_NUMBER: + // [try to] interpret as [additional] numeric literal char + if ((!isSML && sc.Match('_')) || IsADigit(sc.ch, chBase)) + break; + // how about an integer suffix? + if (!isSML && (sc.Match('l') || sc.Match('L') || sc.Match('n')) + && (sc.chPrev == '_' || IsADigit(sc.chPrev, chBase))) + break; + // or a floating-point literal? + if (chBase == 10) { + // with a decimal point? + if (sc.Match('.') + && ((!isSML && sc.chPrev == '_') + || IsADigit(sc.chPrev, chBase))) + break; + // with an exponent? (I) + if ((sc.Match('e') || sc.Match('E')) + && ((!isSML && (sc.chPrev == '.' || sc.chPrev == '_')) + || IsADigit(sc.chPrev, chBase))) + break; + // with an exponent? (II) + if (((!isSML && (sc.Match('+') || sc.Match('-'))) + || (isSML && sc.Match('~'))) + && (sc.chPrev == 'e' || sc.chPrev == 'E')) + break; + } + // it looks like we have run out of number + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + case SCE_CAML_CHAR: + if (!isSML) { + // [try to] interpret as [additional] char literal char + if (sc.Match('\\')) { + chLit = 1; // (definitely IS a char literal) + if (sc.chPrev == '\\') + sc.ch = ' '; // (...\\') + // should we be terminating - one way or another? + } else if ((sc.Match('\'') && sc.chPrev != '\\') + || sc.atLineEnd) { + state2 = SCE_CAML_DEFAULT; + if (sc.Match('\'')) + chColor++; + else + sc.ChangeState(SCE_CAML_IDENTIFIER); + // ... maybe a char literal, maybe not + } else if (chLit < 1 && sc.currentPos - chToken >= 2) + sc.ChangeState(SCE_CAML_IDENTIFIER), advance = false; + break; + }/* else + // fall through for SML char literal (handle like string) */ + // Falls through. + + case SCE_CAML_STRING: + // [try to] interpret as [additional] [SML char/] string literal char + if (isSML && sc.Match('\\') && sc.chPrev != '\\' && isspace(sc.chNext)) + state2 = SCE_CAML_WHITE; + else if (sc.Match('\\') && sc.chPrev == '\\') + sc.ch = ' '; // (...\\") + // should we be terminating - one way or another? + else if ((sc.Match('"') && sc.chPrev != '\\') + || (isSML && sc.atLineEnd)) { + state2 = SCE_CAML_DEFAULT; + if (sc.Match('"')) + chColor++; + } + break; + + case SCE_CAML_WHITE: + // [try to] interpret as [additional] SML embedded whitespace char + if (sc.Match('\\')) { + // style this puppy NOW... + state2 = SCE_CAML_STRING, sc.ch = ' ' /* (...\") */, chColor++, + styler.ColourTo(chColor, SCE_CAML_WHITE), styler.Flush(); + // ... then backtrack to determine original SML literal type + Sci_Position p = chColor - 2; + for (; p >= 0 && styler.StyleAt(p) == SCE_CAML_WHITE; p--) ; + if (p >= 0) + state2 = static_cast(styler.StyleAt(p)); + // take care of state change NOW + sc.ChangeState(state2), state2 = -1; + } + break; + + case SCE_CAML_COMMENT: + case SCE_CAML_COMMENT1: + case SCE_CAML_COMMENT2: + case SCE_CAML_COMMENT3: + // we're IN a comment - does this start a NESTED comment? + if (sc.Match('(', '*')) + state2 = sc.state + 1, chToken = sc.currentPos, + sc.Forward(), sc.ch = ' ' /* (*)... */, nesting++; + // [try to] interpret as [additional] comment char + else if (sc.Match(')') && sc.chPrev == '*') { + if (nesting) + state2 = (sc.state & 0x0f) - 1, chToken = 0, nesting--; + else + state2 = SCE_CAML_DEFAULT; + chColor++; + // enable "magic" (read-only) comment AS REQUIRED + } else if (useMagic && sc.currentPos - chToken == 4 + && sc.Match('c') && sc.chPrev == 'r' && sc.GetRelative(-2) == '@') + sc.state |= 0x10; // (switch to read-only comment style) + break; + } + + // handle state change and char coloring AS REQUIRED + if (state2 >= 0) + styler.ColourTo(chColor, sc.state), sc.ChangeState(state2); + // move to next char UNLESS re-scanning current char + if (advance) + sc.Forward(); + } + + // do any required terminal char coloring (JIC) + sc.Complete(); +} + +#ifdef BUILD_AS_EXTERNAL_LEXER +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ +void FoldCamlDoc( + Sci_PositionU, Sci_Position, + int, + WordList *[], + Accessor &) +{ +} + +static const char * const camlWordListDesc[] = { + "Keywords", // primary Objective Caml keywords + "Keywords2", // "optional" keywords (typically from Pervasives) + "Keywords3", // "optional" keywords (typically typenames) + 0 +}; + +#ifndef BUILD_AS_EXTERNAL_LEXER +LexerModule lmCaml(SCLEX_CAML, ColouriseCamlDoc, "caml", FoldCamlDoc, camlWordListDesc); +#endif /* BUILD_AS_EXTERNAL_LEXER */ diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCmake.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCmake.cpp new file mode 100644 index 000000000..b8fe15496 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCmake.cpp @@ -0,0 +1,455 @@ +// Scintilla source code edit control +/** @file LexCmake.cxx + ** Lexer for Cmake + **/ +// Copyright 2007 by Cristian Adam +// based on the NSIS lexer +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static bool isCmakeNumber(char ch) +{ + return(ch >= '0' && ch <= '9'); +} + +static bool isCmakeChar(char ch) +{ + return(ch == '.' ) || (ch == '_' ) || isCmakeNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool isCmakeLetter(char ch) +{ + return(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool CmakeNextLineHasElse(Sci_PositionU start, Sci_PositionU end, Accessor &styler) +{ + Sci_Position nNextLine = -1; + for ( Sci_PositionU i = start; i < end; i++ ) { + char cNext = styler.SafeGetCharAt( i ); + if ( cNext == '\n' ) { + nNextLine = i+1; + break; + } + } + + if ( nNextLine == -1 ) // We never foudn the next line... + return false; + + for ( Sci_PositionU firstChar = nNextLine; firstChar < end; firstChar++ ) { + char cNext = styler.SafeGetCharAt( firstChar ); + if ( cNext == ' ' ) + continue; + if ( cNext == '\t' ) + continue; + if ( styler.Match(firstChar, "ELSE") || styler.Match(firstChar, "else")) + return true; + break; + } + + return false; +} + +static int calculateFoldCmake(Sci_PositionU start, Sci_PositionU end, int foldlevel, Accessor &styler, bool bElse) +{ + // If the word is too long, it is not what we are looking for + if ( end - start > 20 ) + return foldlevel; + + int newFoldlevel = foldlevel; + + char s[20]; // The key word we are looking for has atmost 13 characters + for (unsigned int i = 0; i < end - start + 1 && i < 19; i++) { + s[i] = static_cast( styler[ start + i ] ); + s[i + 1] = '\0'; + } + + if ( CompareCaseInsensitive(s, "IF") == 0 || CompareCaseInsensitive(s, "WHILE") == 0 + || CompareCaseInsensitive(s, "MACRO") == 0 || CompareCaseInsensitive(s, "FOREACH") == 0 + || CompareCaseInsensitive(s, "ELSEIF") == 0 ) + newFoldlevel++; + else if ( CompareCaseInsensitive(s, "ENDIF") == 0 || CompareCaseInsensitive(s, "ENDWHILE") == 0 + || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0) + newFoldlevel--; + else if ( bElse && CompareCaseInsensitive(s, "ELSEIF") == 0 ) + newFoldlevel++; + else if ( bElse && CompareCaseInsensitive(s, "ELSE") == 0 ) + newFoldlevel++; + + return newFoldlevel; +} + +static int classifyWordCmake(Sci_PositionU start, Sci_PositionU end, WordList *keywordLists[], Accessor &styler ) +{ + char word[100] = {0}; + char lowercaseWord[100] = {0}; + + WordList &Commands = *keywordLists[0]; + WordList &Parameters = *keywordLists[1]; + WordList &UserDefined = *keywordLists[2]; + + for (Sci_PositionU i = 0; i < end - start + 1 && i < 99; i++) { + word[i] = static_cast( styler[ start + i ] ); + lowercaseWord[i] = static_cast(tolower(word[i])); + } + + // Check for special words... + if ( CompareCaseInsensitive(word, "MACRO") == 0 || CompareCaseInsensitive(word, "ENDMACRO") == 0 ) + return SCE_CMAKE_MACRODEF; + + if ( CompareCaseInsensitive(word, "IF") == 0 || CompareCaseInsensitive(word, "ENDIF") == 0 ) + return SCE_CMAKE_IFDEFINEDEF; + + if ( CompareCaseInsensitive(word, "ELSEIF") == 0 || CompareCaseInsensitive(word, "ELSE") == 0 ) + return SCE_CMAKE_IFDEFINEDEF; + + if ( CompareCaseInsensitive(word, "WHILE") == 0 || CompareCaseInsensitive(word, "ENDWHILE") == 0) + return SCE_CMAKE_WHILEDEF; + + if ( CompareCaseInsensitive(word, "FOREACH") == 0 || CompareCaseInsensitive(word, "ENDFOREACH") == 0) + return SCE_CMAKE_FOREACHDEF; + + if ( Commands.InList(lowercaseWord) ) + return SCE_CMAKE_COMMANDS; + + if ( Parameters.InList(word) ) + return SCE_CMAKE_PARAMETERS; + + + if ( UserDefined.InList(word) ) + return SCE_CMAKE_USERDEFINED; + + if ( strlen(word) > 3 ) { + if ( word[1] == '{' && word[strlen(word)-1] == '}' ) + return SCE_CMAKE_VARIABLE; + } + + // To check for numbers + if ( isCmakeNumber( word[0] ) ) { + bool bHasSimpleCmakeNumber = true; + for (unsigned int j = 1; j < end - start + 1 && j < 99; j++) { + if ( !isCmakeNumber( word[j] ) ) { + bHasSimpleCmakeNumber = false; + break; + } + } + + if ( bHasSimpleCmakeNumber ) + return SCE_CMAKE_NUMBER; + } + + return SCE_CMAKE_DEFAULT; +} + +static void ColouriseCmakeDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_CMAKE_DEFAULT; + if ( startPos > 0 ) + state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox + + styler.StartAt( startPos ); + styler.GetLine( startPos ); + + Sci_PositionU nLengthDoc = startPos + length; + styler.StartSegment( startPos ); + + char cCurrChar; + bool bVarInString = false; + bool bClassicVarInString = false; + + Sci_PositionU i; + for ( i = startPos; i < nLengthDoc; i++ ) { + cCurrChar = styler.SafeGetCharAt( i ); + char cNextChar = styler.SafeGetCharAt(i+1); + + switch (state) { + case SCE_CMAKE_DEFAULT: + if ( cCurrChar == '#' ) { // we have a comment line + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_COMMENT; + break; + } + if ( cCurrChar == '"' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGDQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + if ( cCurrChar == '\'' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGRQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + if ( cCurrChar == '`' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGLQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + + // CMake Variable + if ( cCurrChar == '$' || isCmakeChar(cCurrChar)) { + styler.ColourTo(i-1,state); + state = SCE_CMAKE_VARIABLE; + + // If it is a number, we must check and set style here first... + if ( isCmakeNumber(cCurrChar) && (cNextChar == '\t' || cNextChar == ' ' || cNextChar == '\r' || cNextChar == '\n' ) ) + styler.ColourTo( i, SCE_CMAKE_NUMBER); + + break; + } + + break; + case SCE_CMAKE_COMMENT: + if ( cCurrChar == '\n' || cCurrChar == '\r' ) { + if ( styler.SafeGetCharAt(i-1) == '\\' ) { + styler.ColourTo(i-2,state); + styler.ColourTo(i-1,SCE_CMAKE_DEFAULT); + } + else { + styler.ColourTo(i-1,state); + state = SCE_CMAKE_DEFAULT; + } + } + break; + case SCE_CMAKE_STRINGDQ: + case SCE_CMAKE_STRINGLQ: + case SCE_CMAKE_STRINGRQ: + + if ( styler.SafeGetCharAt(i-1) == '\\' && styler.SafeGetCharAt(i-2) == '$' ) + break; // Ignore the next character, even if it is a quote of some sort + + if ( cCurrChar == '"' && state == SCE_CMAKE_STRINGDQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cCurrChar == '`' && state == SCE_CMAKE_STRINGLQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cCurrChar == '\'' && state == SCE_CMAKE_STRINGRQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cNextChar == '\r' || cNextChar == '\n' ) { + Sci_Position nCurLine = styler.GetLine(i+1); + Sci_Position nBack = i; + // We need to check if the previous line has a \ in it... + bool bNextLine = false; + + while ( nBack > 0 ) { + if ( styler.GetLine(nBack) != nCurLine ) + break; + + char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here + + if ( cTemp == '\\' ) { + bNextLine = true; + break; + } + if ( cTemp != '\r' && cTemp != '\n' && cTemp != '\t' && cTemp != ' ' ) + break; + + nBack--; + } + + if ( bNextLine ) { + styler.ColourTo(i+1,state); + } + if ( bNextLine == false ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + } + } + break; + + case SCE_CMAKE_VARIABLE: + + // CMake Variable: + if ( cCurrChar == '$' ) + state = SCE_CMAKE_DEFAULT; + else if ( cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) ) + state = SCE_CMAKE_DEFAULT; + else if ( (isCmakeChar(cCurrChar) && !isCmakeChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' ) { + state = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler ); + styler.ColourTo( i, state); + state = SCE_CMAKE_DEFAULT; + } + else if ( !isCmakeChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' ) { + if ( classifyWordCmake( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_CMAKE_NUMBER ) + styler.ColourTo( i-1, SCE_CMAKE_NUMBER ); + + state = SCE_CMAKE_DEFAULT; + + if ( cCurrChar == '"' ) { + state = SCE_CMAKE_STRINGDQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '`' ) { + state = SCE_CMAKE_STRINGLQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '\'' ) { + state = SCE_CMAKE_STRINGRQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '#' ) { + state = SCE_CMAKE_COMMENT; + } + } + break; + } + + if ( state == SCE_CMAKE_STRINGDQ || state == SCE_CMAKE_STRINGLQ || state == SCE_CMAKE_STRINGRQ ) { + bool bIngoreNextDollarSign = false; + + if ( bVarInString && cCurrChar == '$' ) { + bVarInString = false; + bIngoreNextDollarSign = true; + } + else if ( bVarInString && cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '"' || cNextChar == '`' || cNextChar == '\'' ) ) { + styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR); + bVarInString = false; + bIngoreNextDollarSign = false; + } + + else if ( bVarInString && !isCmakeChar(cNextChar) ) { + int nWordState = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler); + if ( nWordState == SCE_CMAKE_VARIABLE ) + styler.ColourTo( i, SCE_CMAKE_STRINGVAR); + bVarInString = false; + } + // Covers "${TEST}..." + else if ( bClassicVarInString && cNextChar == '}' ) { + styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR); + bClassicVarInString = false; + } + + // Start of var in string + if ( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' ) { + styler.ColourTo( i-1, state); + bClassicVarInString = true; + bVarInString = false; + } + else if ( !bIngoreNextDollarSign && cCurrChar == '$' ) { + styler.ColourTo( i-1, state); + bVarInString = true; + bClassicVarInString = false; + } + } + } + + // Colourise remaining document + styler.ColourTo(nLengthDoc-1,state); +} + +static void FoldCmakeDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if ( styler.GetPropertyInt("fold") == 0 ) + return; + + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) == 1; + + Sci_Position lineCurrent = styler.GetLine(startPos); + Sci_PositionU safeStartPos = styler.LineStart( lineCurrent ); + + bool bArg1 = true; + Sci_Position nWordStart = -1; + + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + + for (Sci_PositionU i = safeStartPos; i < startPos + length; i++) { + char chCurr = styler.SafeGetCharAt(i); + + if ( bArg1 ) { + if ( nWordStart == -1 && (isCmakeLetter(chCurr)) ) { + nWordStart = i; + } + else if ( isCmakeLetter(chCurr) == false && nWordStart > -1 ) { + int newLevel = calculateFoldCmake( nWordStart, i-1, levelNext, styler, foldAtElse); + + if ( newLevel == levelNext ) { + if ( foldAtElse ) { + if ( CmakeNextLineHasElse(i, startPos + length, styler) ) + levelNext--; + } + } + else + levelNext = newLevel; + bArg1 = false; + } + } + + if ( chCurr == '\n' ) { + if ( bArg1 && foldAtElse) { + if ( CmakeNextLineHasElse(i, startPos + length, styler) ) + levelNext--; + } + + // If we are on a new line... + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext ) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); + + lineCurrent++; + levelCurrent = levelNext; + bArg1 = true; // New line, lets look at first argument again + nWordStart = -1; + } + } + + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); +} + +static const char * const cmakeWordLists[] = { + "Commands", + "Parameters", + "UserDefined", + 0, + 0,}; + +LexerModule lmCmake(SCLEX_CMAKE, ColouriseCmakeDoc, "cmake", FoldCmakeDoc, cmakeWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCoffeeScript.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCoffeeScript.cpp new file mode 100644 index 000000000..a00162335 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCoffeeScript.cpp @@ -0,0 +1,483 @@ +// Scintilla source code edit control +/** @file LexCoffeeScript.cxx + ** Lexer for CoffeeScript. + **/ +// Copyright 1998-2011 by Neil Hodgson +// Based on the Scintilla C++ Lexer +// Written by Eric Promislow in 2011 for the Komodo IDE +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static bool IsSpaceEquiv(int state) { + return (state == SCE_COFFEESCRIPT_DEFAULT + || state == SCE_COFFEESCRIPT_COMMENTLINE + || state == SCE_COFFEESCRIPT_COMMENTBLOCK + || state == SCE_COFFEESCRIPT_VERBOSE_REGEX + || state == SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT + || state == SCE_COFFEESCRIPT_WORD + || state == SCE_COFFEESCRIPT_REGEX); +} + +// Store the current lexer state and brace count prior to starting a new +// `#{}` interpolation level. +// Based on LexRuby.cxx. +static void enterInnerExpression(int *p_inner_string_types, + int *p_inner_expn_brace_counts, + int& inner_string_count, + int state, + int& brace_counts + ) { + p_inner_string_types[inner_string_count] = state; + p_inner_expn_brace_counts[inner_string_count] = brace_counts; + brace_counts = 0; + ++inner_string_count; +} + +// Restore the lexer state and brace count for the previous `#{}` interpolation +// level upon returning to it. +// Note the previous lexer state is the return value and needs to be restored +// manually by the StyleContext. +// Based on LexRuby.cxx. +static int exitInnerExpression(int *p_inner_string_types, + int *p_inner_expn_brace_counts, + int& inner_string_count, + int& brace_counts + ) { + --inner_string_count; + brace_counts = p_inner_expn_brace_counts[inner_string_count]; + return p_inner_string_types[inner_string_count]; +} + +// Preconditions: sc.currentPos points to a character after '+' or '-'. +// The test for pos reaching 0 should be redundant, +// and is in only for safety measures. +// Limitation: this code will give the incorrect answer for code like +// a = b+++/ptn/... +// Putting a space between the '++' post-inc operator and the '+' binary op +// fixes this, and is highly recommended for readability anyway. +static bool FollowsPostfixOperator(StyleContext &sc, Accessor &styler) { + Sci_Position pos = (Sci_Position) sc.currentPos; + while (--pos > 0) { + char ch = styler[pos]; + if (ch == '+' || ch == '-') { + return styler[pos - 1] == ch; + } + } + return false; +} + +static bool followsKeyword(StyleContext &sc, Accessor &styler) { + Sci_Position pos = (Sci_Position) sc.currentPos; + Sci_Position currentLine = styler.GetLine(pos); + Sci_Position lineStartPos = styler.LineStart(currentLine); + while (--pos > lineStartPos) { + char ch = styler.SafeGetCharAt(pos); + if (ch != ' ' && ch != '\t') { + break; + } + } + styler.Flush(); + return styler.StyleAt(pos) == SCE_COFFEESCRIPT_WORD; +} + +static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords4 = *keywordlists[3]; + + CharacterSet setOKBeforeRE(CharacterSet::setNone, "([{=,:;!%^&*|?~+-"); + CharacterSet setCouldBePostOp(CharacterSet::setNone, "+-"); + + CharacterSet setWordStart(CharacterSet::setAlpha, "_$@", 0x80, true); + CharacterSet setWord(CharacterSet::setAlphaNum, "._$", 0x80, true); + + int chPrevNonWhite = ' '; + int visibleChars = 0; + + // String/Regex interpolation variables, based on LexRuby.cxx. + // In most cases a value of 2 should be ample for the code the user is + // likely to enter. For example, + // "Filling the #{container} with #{liquid}..." + // from the CoffeeScript homepage nests to a level of 2 + // If the user actually hits a 6th occurrence of '#{' in a double-quoted + // string (including regexes), it will stay as a string. The problem with + // this is that quotes might flip, a 7th '#{' will look like a comment, + // and code-folding might be wrong. +#define INNER_STRINGS_MAX_COUNT 5 + // These vars track our instances of "...#{,,,'..#{,,,}...',,,}..." + int inner_string_types[INNER_STRINGS_MAX_COUNT]; + // Track # braces when we push a new #{ thing + int inner_expn_brace_counts[INNER_STRINGS_MAX_COUNT]; + int inner_string_count = 0; + int brace_counts = 0; // Number of #{ ... } things within an expression + for (int i = 0; i < INNER_STRINGS_MAX_COUNT; i++) { + inner_string_types[i] = 0; + inner_expn_brace_counts[i] = 0; + } + + // look back to set chPrevNonWhite properly for better regex colouring + Sci_Position endPos = startPos + length; + if (startPos > 0 && IsSpaceEquiv(initStyle)) { + Sci_PositionU back = startPos; + styler.Flush(); + while (back > 0 && IsSpaceEquiv(styler.StyleAt(--back))) + ; + if (styler.StyleAt(back) == SCE_COFFEESCRIPT_OPERATOR) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + if (startPos != back) { + initStyle = styler.StyleAt(back); + if (IsSpaceEquiv(initStyle)) { + initStyle = SCE_COFFEESCRIPT_DEFAULT; + } + } + startPos = back; + } + + StyleContext sc(startPos, endPos - startPos, initStyle, styler); + + for (; sc.More();) { + + if (sc.atLineStart) { + // Reset states to beginning of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_COFFEESCRIPT_OPERATOR: + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + break; + case SCE_COFFEESCRIPT_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (!setWord.Contains(sc.ch) || sc.Match('.', '.')) { + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_IDENTIFIER: + if (!setWord.Contains(sc.ch) || (sc.ch == '.') || (sc.ch == '$')) { + char s[1000]; + sc.GetCurrent(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_COFFEESCRIPT_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_COFFEESCRIPT_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_COFFEESCRIPT_GLOBALCLASS); + } else if (sc.LengthCurrent() > 0 && s[0] == '@') { + sc.ChangeState(SCE_COFFEESCRIPT_INSTANCEPROPERTY); + } + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_WORD: + case SCE_COFFEESCRIPT_WORD2: + case SCE_COFFEESCRIPT_GLOBALCLASS: + case SCE_COFFEESCRIPT_INSTANCEPROPERTY: + if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_STRING: + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT); + } else if (sc.ch == '#' && sc.chNext == '{' && inner_string_count < INNER_STRINGS_MAX_COUNT) { + // process interpolated code #{ ... } + enterInnerExpression(inner_string_types, + inner_expn_brace_counts, + inner_string_count, + sc.state, + brace_counts); + sc.SetState(SCE_COFFEESCRIPT_OPERATOR); + sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_CHARACTER: + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_REGEX: + if (sc.atLineStart) { + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } else if (sc.ch == '/') { + sc.Forward(); + while ((sc.ch < 0x80) && islower(sc.ch)) + sc.Forward(); // gobble regex flags + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } else if (sc.ch == '\\') { + // Gobble up the quoted character + if (sc.chNext == '\\' || sc.chNext == '/') { + sc.Forward(); + } + } + break; + case SCE_COFFEESCRIPT_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_COFFEESCRIPT_DEFAULT); + } + break; + case SCE_COFFEESCRIPT_COMMENTBLOCK: + if (sc.Match("###")) { + sc.Forward(); + sc.Forward(); + sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT); + } else if (sc.ch == '\\') { + sc.Forward(); + } + break; + case SCE_COFFEESCRIPT_VERBOSE_REGEX: + if (sc.Match("///")) { + sc.Forward(); + sc.Forward(); + sc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT); + } else if (sc.Match('#')) { + sc.SetState(SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT); + } else if (sc.ch == '\\') { + sc.Forward(); + } + break; + case SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT: + if (sc.atLineStart) { + sc.SetState(SCE_COFFEESCRIPT_VERBOSE_REGEX); + } + break; + } + + // Determine if a new state should be entered. + if (sc.state == SCE_COFFEESCRIPT_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_COFFEESCRIPT_NUMBER); + } else if (setWordStart.Contains(sc.ch)) { + sc.SetState(SCE_COFFEESCRIPT_IDENTIFIER); + } else if (sc.Match("///")) { + sc.SetState(SCE_COFFEESCRIPT_VERBOSE_REGEX); + sc.Forward(); + sc.Forward(); + } else if (sc.ch == '/' + && (setOKBeforeRE.Contains(chPrevNonWhite) + || followsKeyword(sc, styler)) + && (!setCouldBePostOp.Contains(chPrevNonWhite) + || !FollowsPostfixOperator(sc, styler))) { + sc.SetState(SCE_COFFEESCRIPT_REGEX); // JavaScript's RegEx + } else if (sc.ch == '\"') { + sc.SetState(SCE_COFFEESCRIPT_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_COFFEESCRIPT_CHARACTER); + } else if (sc.ch == '#') { + if (sc.Match("###")) { + sc.SetState(SCE_COFFEESCRIPT_COMMENTBLOCK); + sc.Forward(); + sc.Forward(); + } else { + sc.SetState(SCE_COFFEESCRIPT_COMMENTLINE); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_COFFEESCRIPT_OPERATOR); + // Handle '..' and '...' operators correctly. + if (sc.ch == '.') { + for (int i = 0; i < 2 && sc.chNext == '.'; i++, sc.Forward()) ; + } else if (sc.ch == '{') { + ++brace_counts; + } else if (sc.ch == '}' && --brace_counts <= 0 && inner_string_count > 0) { + // Return to previous state before #{ ... } + sc.ForwardSetState(exitInnerExpression(inner_string_types, + inner_expn_brace_counts, + inner_string_count, + brace_counts)); + continue; // skip sc.Forward() at loop end + } + } + } + + if (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) { + chPrevNonWhite = sc.ch; + visibleChars++; + } + sc.Forward(); + } + sc.Complete(); +} + +static bool IsCommentLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} + +static void FoldCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int, + WordList *[], Accessor &styler) { + // A simplified version of FoldPyDoc + const Sci_Position maxPos = startPos + length; + const Sci_Position maxLines = styler.GetLine(maxPos - 1); // Requested last line + const Sci_Position docLines = styler.GetLine(styler.Length() - 1); // Available last line + + // property fold.coffeescript.comment + const bool foldComment = styler.GetPropertyInt("fold.coffeescript.comment") != 0; + + const bool foldCompact = styler.GetPropertyInt("fold.compact") != 0; + + // Backtrack to previous non-blank line so we can determine indent level + // for any white space lines + // and so we can fix any preceding fold level (which is why we go back + // at least one line in all cases) + int spaceFlags = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL); + while (lineCurrent > 0) { + lineCurrent--; + indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) + && !IsCommentLine(lineCurrent, styler)) + break; + } + int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; + + // Set up initial loop state + int prevComment = 0; + if (lineCurrent >= 1) + prevComment = foldComment && IsCommentLine(lineCurrent - 1, styler); + + // Process all characters to end of requested range + // or comment that hangs over the end of the range. Cap processing in all cases + // to end of document (in case of comment at end). + while ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevComment)) { + + // Gather info + int lev = indentCurrent; + Sci_Position lineNext = lineCurrent + 1; + int indentNext = indentCurrent; + if (lineNext <= docLines) { + // Information about next line is only available if not at end of document + indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL); + } + const int comment = foldComment && IsCommentLine(lineCurrent, styler); + const int comment_start = (comment && !prevComment && (lineNext <= docLines) && + IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE)); + const int comment_continue = (comment && prevComment); + if (!comment) + indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; + if (indentNext & SC_FOLDLEVELWHITEFLAG) + indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel; + + if (comment_start) { + // Place fold point at start of a block of comments + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (comment_continue) { + // Add level to rest of lines in the block + lev = lev + 1; + } + + // Skip past any blank lines for next indent level info; we skip also + // comments (all comments, not just those starting in column 0) + // which effectively folds them into surrounding code rather + // than screwing up folding. + + while ((lineNext < docLines) && + ((indentNext & SC_FOLDLEVELWHITEFLAG) || + (lineNext <= docLines && IsCommentLine(lineNext, styler)))) { + + lineNext++; + indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL); + } + + const int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK; + const int levelBeforeComments = std::max(indentCurrentLevel,levelAfterComments); + + // Now set all the indent levels on the lines we skipped + // Do this from end to start. Once we encounter one line + // which is indented more than the line after the end of + // the comment-block, use the level of the block before + + Sci_Position skipLine = lineNext; + int skipLevel = levelAfterComments; + + while (--skipLine > lineCurrent) { + int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL); + + if (foldCompact) { + if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments) + skipLevel = levelBeforeComments; + + int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; + + styler.SetLevel(skipLine, skipLevel | whiteFlag); + } else { + if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments && + !(skipLineIndent & SC_FOLDLEVELWHITEFLAG) && + !IsCommentLine(skipLine, styler)) + skipLevel = levelBeforeComments; + + styler.SetLevel(skipLine, skipLevel); + } + } + + // Set fold header on non-comment line + if (!comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) + lev |= SC_FOLDLEVELHEADERFLAG; + } + + // Keep track of block comment state of previous line + prevComment = comment_start || comment_continue; + + // Set fold level for this line and move to next line + styler.SetLevel(lineCurrent, lev); + indentCurrent = indentNext; + lineCurrent = lineNext; + } +} + +static const char *const csWordLists[] = { + "Keywords", + "Secondary keywords", + "Unused", + "Global classes", + 0, +}; + +LexerModule lmCoffeeScript(SCLEX_COFFEESCRIPT, ColouriseCoffeeScriptDoc, "coffeescript", FoldCoffeeScriptDoc, csWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexConf.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexConf.cpp new file mode 100644 index 000000000..73fbe46ef --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexConf.cpp @@ -0,0 +1,190 @@ +// Scintilla source code edit control +/** @file LexConf.cxx + ** Lexer for Apache Configuration Files. + ** + ** First working version contributed by Ahmad Zawawi on October 28, 2000. + ** i created this lexer because i needed something pretty when dealing + ** when Apache Configuration files... + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void ColouriseConfDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_CONF_DEFAULT; + char chNext = styler[startPos]; + Sci_Position lengthDoc = startPos + length; + // create a buffer large enough to take the largest chunk... + char *buffer = new char[length+1]; + Sci_Position bufferCount = 0; + + // this assumes that we have 2 keyword list in conf.properties + WordList &directives = *keywordLists[0]; + WordList ¶ms = *keywordLists[1]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (Sci_Position i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_CONF_DEFAULT: + if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + // whitespace is simply ignored here... + styler.ColourTo(i,SCE_CONF_DEFAULT); + break; + } else if( ch == '#' ) { + // signals the start of a comment... + state = SCE_CONF_COMMENT; + styler.ColourTo(i,SCE_CONF_COMMENT); + } else if( ch == '.' /*|| ch == '/'*/) { + // signals the start of a file... + state = SCE_CONF_EXTENSION; + styler.ColourTo(i,SCE_CONF_EXTENSION); + } else if( ch == '"') { + state = SCE_CONF_STRING; + styler.ColourTo(i,SCE_CONF_STRING); + } else if( IsASCII(ch) && ispunct(ch) ) { + // signals an operator... + // no state jump necessary for this + // simple case... + styler.ColourTo(i,SCE_CONF_OPERATOR); + } else if( IsASCII(ch) && isalpha(ch) ) { + // signals the start of an identifier + bufferCount = 0; + buffer[bufferCount++] = static_cast(tolower(ch)); + state = SCE_CONF_IDENTIFIER; + } else if( IsASCII(ch) && isdigit(ch) ) { + // signals the start of a number + bufferCount = 0; + buffer[bufferCount++] = ch; + //styler.ColourTo(i,SCE_CONF_NUMBER); + state = SCE_CONF_NUMBER; + } else { + // style it the default style.. + styler.ColourTo(i,SCE_CONF_DEFAULT); + } + break; + + case SCE_CONF_COMMENT: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_CONF_DEFAULT; + } else { + styler.ColourTo(i,SCE_CONF_COMMENT); + } + break; + + case SCE_CONF_EXTENSION: + // if we find a non-alphanumeric char, + // we simply go to default state + // else we're still dealing with an extension... + if( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || + (ch == '-') || (ch == '$') || + (ch == '/') || (ch == '.') || (ch == '*') ) + { + styler.ColourTo(i,SCE_CONF_EXTENSION); + } else { + state = SCE_CONF_DEFAULT; + chNext = styler[i--]; + } + break; + + case SCE_CONF_STRING: + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || (ch == '\n') || (ch == '\r') ) { + state = SCE_CONF_DEFAULT; + } + styler.ColourTo(i,SCE_CONF_STRING); + break; + + case SCE_CONF_IDENTIFIER: + // stay in CONF_IDENTIFIER state until we find a non-alphanumeric + if( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { + buffer[bufferCount++] = static_cast(tolower(ch)); + } else { + state = SCE_CONF_DEFAULT; + buffer[bufferCount] = '\0'; + + // check if the buffer contains a keyword, and highlight it if it is a keyword... + if(directives.InList(buffer)) { + styler.ColourTo(i-1,SCE_CONF_DIRECTIVE ); + } else if(params.InList(buffer)) { + styler.ColourTo(i-1,SCE_CONF_PARAMETER ); + } else if(strchr(buffer,'/') || strchr(buffer,'.')) { + styler.ColourTo(i-1,SCE_CONF_EXTENSION); + } else { + styler.ColourTo(i-1,SCE_CONF_DEFAULT); + } + + // push back the faulty character + chNext = styler[i--]; + + } + break; + + case SCE_CONF_NUMBER: + // stay in CONF_NUMBER state until we find a non-numeric + if( (IsASCII(ch) && isdigit(ch)) || ch == '.') { + buffer[bufferCount++] = ch; + } else { + state = SCE_CONF_DEFAULT; + buffer[bufferCount] = '\0'; + + // Colourize here... + if( strchr(buffer,'.') ) { + // it is an IP address... + styler.ColourTo(i-1,SCE_CONF_IP); + } else { + // normal number + styler.ColourTo(i-1,SCE_CONF_NUMBER); + } + + // push back a character + chNext = styler[i--]; + } + break; + + } + } + delete []buffer; +} + +static const char * const confWordListDesc[] = { + "Directives", + "Parameters", + 0 +}; + +LexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, "conf", 0, confWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCrontab.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCrontab.cpp new file mode 100644 index 000000000..7f6d5fb0c --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCrontab.cpp @@ -0,0 +1,224 @@ +// Scintilla source code edit control +/** @file LexCrontab.cxx + ** Lexer to use with extended crontab files used by a powerful + ** Windows scheduler/event monitor/automation manager nnCron. + ** (http://nemtsev.eserv.ru/) + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void ColouriseNncrontabDoc(Sci_PositionU startPos, Sci_Position length, int, WordList +*keywordLists[], Accessor &styler) +{ + int state = SCE_NNCRONTAB_DEFAULT; + char chNext = styler[startPos]; + Sci_Position lengthDoc = startPos + length; + // create a buffer large enough to take the largest chunk... + char *buffer = new char[length+1]; + Sci_Position bufferCount = 0; + // used when highliting environment variables inside quoted string: + bool insideString = false; + + // this assumes that we have 3 keyword list in conf.properties + WordList §ion = *keywordLists[0]; + WordList &keyword = *keywordLists[1]; + WordList &modifier = *keywordLists[2]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (Sci_Position i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_NNCRONTAB_DEFAULT: + if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + // whitespace is simply ignored here... + styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT); + break; + } else if( ch == '#' && styler.SafeGetCharAt(i+1) == '(') { + // signals the start of a task... + state = SCE_NNCRONTAB_TASK; + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } + else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' || + styler.SafeGetCharAt(i+1) == '\t')) { + // signals the start of an extended comment... + state = SCE_NNCRONTAB_COMMENT; + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } else if( ch == '#' ) { + // signals the start of a plain comment... + state = SCE_NNCRONTAB_COMMENT; + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } else if( ch == ')' && styler.SafeGetCharAt(i+1) == '#') { + // signals the end of a task... + state = SCE_NNCRONTAB_TASK; + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } else if( ch == '"') { + state = SCE_NNCRONTAB_STRING; + styler.ColourTo(i,SCE_NNCRONTAB_STRING); + } else if( ch == '%') { + // signals environment variables + state = SCE_NNCRONTAB_ENVIRONMENT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + } else if( ch == '<' && styler.SafeGetCharAt(i+1) == '%') { + // signals environment variables + state = SCE_NNCRONTAB_ENVIRONMENT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + } else if( ch == '*' ) { + // signals an asterisk + // no state jump necessary for this simple case... + styler.ColourTo(i,SCE_NNCRONTAB_ASTERISK); + } else if( (IsASCII(ch) && isalpha(ch)) || ch == '<' ) { + // signals the start of an identifier + bufferCount = 0; + buffer[bufferCount++] = ch; + state = SCE_NNCRONTAB_IDENTIFIER; + } else if( IsASCII(ch) && isdigit(ch) ) { + // signals the start of a number + bufferCount = 0; + buffer[bufferCount++] = ch; + state = SCE_NNCRONTAB_NUMBER; + } else { + // style it the default style.. + styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT); + } + break; + + case SCE_NNCRONTAB_COMMENT: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_NNCRONTAB_DEFAULT; + } else { + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } + break; + + case SCE_NNCRONTAB_TASK: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_NNCRONTAB_DEFAULT; + } else { + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } + break; + + case SCE_NNCRONTAB_STRING: + if( ch == '%' ) { + state = SCE_NNCRONTAB_ENVIRONMENT; + insideString = true; + styler.ColourTo(i-1,SCE_NNCRONTAB_STRING); + break; + } + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || + (ch == '\n') || (ch == '\r') ) { + state = SCE_NNCRONTAB_DEFAULT; + } + styler.ColourTo(i,SCE_NNCRONTAB_STRING); + break; + + case SCE_NNCRONTAB_ENVIRONMENT: + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( ch == '%' && insideString ) { + state = SCE_NNCRONTAB_STRING; + insideString = false; + break; + } + if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\') + || (ch == '\n') || (ch == '\r') || (ch == '>') ) { + state = SCE_NNCRONTAB_DEFAULT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + break; + } + styler.ColourTo(i+1,SCE_NNCRONTAB_ENVIRONMENT); + break; + + case SCE_NNCRONTAB_IDENTIFIER: + // stay in CONF_IDENTIFIER state until we find a non-alphanumeric + if( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || + (ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') || + (ch == '@') ) { + buffer[bufferCount++] = ch; + } else { + state = SCE_NNCRONTAB_DEFAULT; + buffer[bufferCount] = '\0'; + + // check if the buffer contains a keyword, + // and highlight it if it is a keyword... + if(section.InList(buffer)) { + styler.ColourTo(i,SCE_NNCRONTAB_SECTION ); + } else if(keyword.InList(buffer)) { + styler.ColourTo(i-1,SCE_NNCRONTAB_KEYWORD ); + } // else if(strchr(buffer,'/') || strchr(buffer,'.')) { + // styler.ColourTo(i-1,SCE_NNCRONTAB_EXTENSION); + // } + else if(modifier.InList(buffer)) { + styler.ColourTo(i-1,SCE_NNCRONTAB_MODIFIER ); + } else { + styler.ColourTo(i-1,SCE_NNCRONTAB_DEFAULT); + } + // push back the faulty character + chNext = styler[i--]; + } + break; + + case SCE_NNCRONTAB_NUMBER: + // stay in CONF_NUMBER state until we find a non-numeric + if( IsASCII(ch) && isdigit(ch) /* || ch == '.' */ ) { + buffer[bufferCount++] = ch; + } else { + state = SCE_NNCRONTAB_DEFAULT; + buffer[bufferCount] = '\0'; + // Colourize here... (normal number) + styler.ColourTo(i-1,SCE_NNCRONTAB_NUMBER); + // push back a character + chNext = styler[i--]; + } + break; + } + } + delete []buffer; +} + +static const char * const cronWordListDesc[] = { + "Section keywords and Forth words", + "nnCrontab keywords", + "Modifiers", + 0 +}; + +LexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, "nncrontab", 0, cronWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexCsound.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexCsound.cpp new file mode 100644 index 000000000..24603801e --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexCsound.cpp @@ -0,0 +1,212 @@ +// Scintilla source code edit control +/** @file LexCsound.cxx + ** Lexer for Csound (Orchestra & Score) + ** Written by Georg Ritter - + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || + ch == '_' || ch == '?'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || + ch == '%' || ch == '@' || ch == '$' || ch == '?'); +} + +static inline bool IsCsoundOperator(char ch) { + if (IsASCII(ch) && isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '%' || ch == ':') + return true; + return false; +} + +static void ColouriseCsoundDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &opcode = *keywordlists[0]; + WordList &headerStmt = *keywordlists[1]; + WordList &otherKeyword = *keywordlists[2]; + + // Do not leak onto next line + if (initStyle == SCE_CSOUND_STRINGEOL) + initStyle = SCE_CSOUND_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_CSOUND_OPERATOR) { + if (!IsCsoundOperator(static_cast(sc.ch))) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + }else if (sc.state == SCE_CSOUND_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } else if (sc.state == SCE_CSOUND_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (opcode.InList(s)) { + sc.ChangeState(SCE_CSOUND_OPCODE); + } else if (headerStmt.InList(s)) { + sc.ChangeState(SCE_CSOUND_HEADERSTMT); + } else if (otherKeyword.InList(s)) { + sc.ChangeState(SCE_CSOUND_USERKEYWORD); + } else if (s[0] == 'p') { + sc.ChangeState(SCE_CSOUND_PARAM); + } else if (s[0] == 'a') { + sc.ChangeState(SCE_CSOUND_ARATE_VAR); + } else if (s[0] == 'k') { + sc.ChangeState(SCE_CSOUND_KRATE_VAR); + } else if (s[0] == 'i') { // covers both i-rate variables and i-statements + sc.ChangeState(SCE_CSOUND_IRATE_VAR); + } else if (s[0] == 'g') { + sc.ChangeState(SCE_CSOUND_GLOBAL_VAR); + } + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + else if (sc.state == SCE_CSOUND_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + else if ((sc.state == SCE_CSOUND_ARATE_VAR) || + (sc.state == SCE_CSOUND_KRATE_VAR) || + (sc.state == SCE_CSOUND_IRATE_VAR)) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_CSOUND_DEFAULT) { + if (sc.ch == ';'){ + sc.SetState(SCE_CSOUND_COMMENT); + } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { + sc.SetState(SCE_CSOUND_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_CSOUND_IDENTIFIER); + } else if (IsCsoundOperator(static_cast(sc.ch))) { + sc.SetState(SCE_CSOUND_OPERATOR); + } else if (sc.ch == 'p') { + sc.SetState(SCE_CSOUND_PARAM); + } else if (sc.ch == 'a') { + sc.SetState(SCE_CSOUND_ARATE_VAR); + } else if (sc.ch == 'k') { + sc.SetState(SCE_CSOUND_KRATE_VAR); + } else if (sc.ch == 'i') { // covers both i-rate variables and i-statements + sc.SetState(SCE_CSOUND_IRATE_VAR); + } else if (sc.ch == 'g') { + sc.SetState(SCE_CSOUND_GLOBAL_VAR); + } + } + } + sc.Complete(); +} + +static void FoldCsoundInstruments(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], + Accessor &styler) { + Sci_PositionU lengthDoc = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int stylePrev = 0; + int styleNext = styler.StyleAt(startPos); + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if ((stylePrev != SCE_CSOUND_OPCODE) && (style == SCE_CSOUND_OPCODE)) { + char s[20]; + unsigned int j = 0; + while ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) { + s[j] = styler[i + j]; + j++; + } + s[j] = '\0'; + + if (strcmp(s, "instr") == 0) + levelCurrent++; + if (strcmp(s, "endin") == 0) + levelCurrent--; + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + stylePrev = style; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + + +static const char * const csoundWordListDesc[] = { + "Opcodes", + "Header Statements", + "User keywords", + 0 +}; + +LexerModule lmCsound(SCLEX_CSOUND, ColouriseCsoundDoc, "csound", FoldCsoundInstruments, csoundWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexD.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexD.cpp new file mode 100644 index 000000000..acbf462ed --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexD.cpp @@ -0,0 +1,567 @@ +/** @file LexD.cxx + ** Lexer for D. + ** + ** Copyright (c) 2006 by Waldemar Augustyn + ** Converted to lexer object and added further folding features/properties by "Udo Lechner" + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +/* Nested comments require keeping the value of the nesting level for every + position in the document. But since scintilla always styles line by line, + we only need to store one value per line. The non-negative number indicates + nesting level at the end of the line. +*/ + +// Underscore, letter, digit and universal alphas from C99 Appendix D. + +static bool IsWordStart(int ch) { + return (IsASCII(ch) && (isalpha(ch) || ch == '_')) || !IsASCII(ch); +} + +static bool IsWord(int ch) { + return (IsASCII(ch) && (isalnum(ch) || ch == '_')) || !IsASCII(ch); +} + +static bool IsDoxygen(int ch) { + if (IsASCII(ch) && islower(ch)) + return true; + if (ch == '$' || ch == '@' || ch == '\\' || + ch == '&' || ch == '#' || ch == '<' || ch == '>' || + ch == '{' || ch == '}' || ch == '[' || ch == ']') + return true; + return false; +} + +static bool IsStringSuffix(int ch) { + return ch == 'c' || ch == 'w' || ch == 'd'; +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_D_COMMENT || + style == SCE_D_COMMENTDOC || + style == SCE_D_COMMENTDOCKEYWORD || + style == SCE_D_COMMENTDOCKEYWORDERROR; +} + +// An individual named option for use in an OptionSet + +// Options used for LexerD +struct OptionsD { + bool fold; + bool foldSyntaxBased; + bool foldComment; + bool foldCommentMultiline; + bool foldCommentExplicit; + std::string foldExplicitStart; + std::string foldExplicitEnd; + bool foldExplicitAnywhere; + bool foldCompact; + int foldAtElseInt; + bool foldAtElse; + OptionsD() { + fold = false; + foldSyntaxBased = true; + foldComment = false; + foldCommentMultiline = true; + foldCommentExplicit = true; + foldExplicitStart = ""; + foldExplicitEnd = ""; + foldExplicitAnywhere = false; + foldCompact = true; + foldAtElseInt = -1; + foldAtElse = false; + } +}; + +static const char * const dWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Type definitions and aliases", + "Keywords 5", + "Keywords 6", + "Keywords 7", + 0, + }; + +struct OptionSetD : public OptionSet { + OptionSetD() { + DefineProperty("fold", &OptionsD::fold); + + DefineProperty("fold.d.syntax.based", &OptionsD::foldSyntaxBased, + "Set this property to 0 to disable syntax based folding."); + + DefineProperty("fold.comment", &OptionsD::foldComment); + + DefineProperty("fold.d.comment.multiline", &OptionsD::foldCommentMultiline, + "Set this property to 0 to disable folding multi-line comments when fold.comment=1."); + + DefineProperty("fold.d.comment.explicit", &OptionsD::foldCommentExplicit, + "Set this property to 0 to disable folding explicit fold points when fold.comment=1."); + + DefineProperty("fold.d.explicit.start", &OptionsD::foldExplicitStart, + "The string to use for explicit fold start points, replacing the standard //{."); + + DefineProperty("fold.d.explicit.end", &OptionsD::foldExplicitEnd, + "The string to use for explicit fold end points, replacing the standard //}."); + + DefineProperty("fold.d.explicit.anywhere", &OptionsD::foldExplicitAnywhere, + "Set this property to 1 to enable explicit fold points anywhere, not just in line comments."); + + DefineProperty("fold.compact", &OptionsD::foldCompact); + + DefineProperty("lexer.d.fold.at.else", &OptionsD::foldAtElseInt, + "This option enables D folding on a \"} else {\" line of an if statement."); + + DefineProperty("fold.at.else", &OptionsD::foldAtElse); + + DefineWordListSets(dWordLists); + } +}; + +class LexerD : public DefaultLexer { + bool caseSensitive; + WordList keywords; + WordList keywords2; + WordList keywords3; + WordList keywords4; + WordList keywords5; + WordList keywords6; + WordList keywords7; + OptionsD options; + OptionSetD osD; +public: + LexerD(bool caseSensitive_) : + caseSensitive(caseSensitive_) { + } + virtual ~LexerD() { + } + void SCI_METHOD Release() override { + delete this; + } + int SCI_METHOD Version() const override { + return lvOriginal; + } + const char * SCI_METHOD PropertyNames() override { + return osD.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osD.PropertyType(name); + } + const char * SCI_METHOD DescribeProperty(const char *name) override { + return osD.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char * SCI_METHOD DescribeWordListSets() override { + return osD.DescribeWordListSets(); + } + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + + static ILexer *LexerFactoryD() { + return new LexerD(true); + } + static ILexer *LexerFactoryDInsensitive() { + return new LexerD(false); + } +}; + +Sci_Position SCI_METHOD LexerD::PropertySet(const char *key, const char *val) { + if (osD.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerD::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywords; + break; + case 1: + wordListN = &keywords2; + break; + case 2: + wordListN = &keywords3; + break; + case 3: + wordListN = &keywords4; + break; + case 4: + wordListN = &keywords5; + break; + case 5: + wordListN = &keywords6; + break; + case 6: + wordListN = &keywords7; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +void SCI_METHOD LexerD::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + LexAccessor styler(pAccess); + + int styleBeforeDCKeyword = SCE_D_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + Sci_Position curLine = styler.GetLine(startPos); + int curNcLevel = curLine > 0? styler.GetLineState(curLine-1): 0; + bool numFloat = false; // Float literals have '+' and '-' signs + bool numHex = false; + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart) { + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_D_OPERATOR: + sc.SetState(SCE_D_DEFAULT); + break; + case SCE_D_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (IsASCII(sc.ch) && (isalnum(sc.ch) || sc.ch == '_')) { + continue; + } else if (sc.ch == '.' && sc.chNext != '.' && !numFloat) { + // Don't parse 0..2 as number. + numFloat=true; + continue; + } else if ( ( sc.ch == '-' || sc.ch == '+' ) && ( /*sign and*/ + ( !numHex && ( sc.chPrev == 'e' || sc.chPrev == 'E' ) ) || /*decimal or*/ + ( sc.chPrev == 'p' || sc.chPrev == 'P' ) ) ) { /*hex*/ + // Parse exponent sign in float literals: 2e+10 0x2e+10 + continue; + } else { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_IDENTIFIER: + if (!IsWord(sc.ch)) { + char s[1000]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + sc.ChangeState(SCE_D_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_D_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_D_TYPEDEF); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_D_WORD5); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_D_WORD6); + } else if (keywords7.InList(s)) { + sc.ChangeState(SCE_D_WORD7); + } + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_D_COMMENTDOC; + sc.SetState(SCE_D_COMMENTDOCKEYWORD); + } + } + break; + case SCE_D_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENTLINEDOC: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_D_COMMENTLINEDOC; + sc.SetState(SCE_D_COMMENTDOCKEYWORD); + } + } + break; + case SCE_D_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_D_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } else if (!IsDoxygen(sc.ch)) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) { + sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_D_COMMENTNESTED: + if (sc.Match('+', '/')) { + if (curNcLevel > 0) + curNcLevel -= 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.Forward(); + if (curNcLevel == 0) { + sc.ForwardSetState(SCE_D_DEFAULT); + } + } else if (sc.Match('/','+')) { + curNcLevel += 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.Forward(); + } + break; + case SCE_D_STRING: + if (sc.ch == '\\') { + if (sc.chNext == '"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '"') { + if(IsStringSuffix(sc.chNext)) + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_D_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + // Char has no suffixes + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_STRINGB: + if (sc.ch == '`') { + if(IsStringSuffix(sc.chNext)) + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_STRINGR: + if (sc.ch == '"') { + if(IsStringSuffix(sc.chNext)) + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + } + + // Determine if a new state should be entered. + if (sc.state == SCE_D_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_D_NUMBER); + numFloat = sc.ch == '.'; + // Remember hex literal + numHex = sc.ch == '0' && ( sc.chNext == 'x' || sc.chNext == 'X' ); + } else if ( (sc.ch == 'r' || sc.ch == 'x' || sc.ch == 'q') + && sc.chNext == '"' ) { + // Limited support for hex and delimited strings: parse as r"" + sc.SetState(SCE_D_STRINGR); + sc.Forward(); + } else if (IsWordStart(sc.ch) || sc.ch == '$') { + sc.SetState(SCE_D_IDENTIFIER); + } else if (sc.Match('/','+')) { + curNcLevel += 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.SetState(SCE_D_COMMENTNESTED); + sc.Forward(); + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_D_COMMENTDOC); + } else { + sc.SetState(SCE_D_COMMENT); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_D_COMMENTLINEDOC); + else + sc.SetState(SCE_D_COMMENTLINE); + } else if (sc.ch == '"') { + sc.SetState(SCE_D_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_D_CHARACTER); + } else if (sc.ch == '`') { + sc.SetState(SCE_D_STRINGB); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_D_OPERATOR); + if (sc.ch == '.' && sc.chNext == '.') sc.Forward(); // Range operator + } + } + } + sc.Complete(); +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". + +void SCI_METHOD LexerD::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + + if (!options.fold) + return; + + LexAccessor styler(pAccess); + + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + bool foldAtElse = options.foldAtElseInt >= 0 ? options.foldAtElseInt != 0 : options.foldAtElse; + const bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty(); + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (options.foldComment && options.foldCommentExplicit && ((style == SCE_D_COMMENTLINE) || options.foldExplicitAnywhere)) { + if (userDefinedFoldMarkers) { + if (styler.Match(i, options.foldExplicitStart.c_str())) { + levelNext++; + } else if (styler.Match(i, options.foldExplicitEnd.c_str())) { + levelNext--; + } + } else { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelNext++; + } else if (chNext2 == '}') { + levelNext--; + } + } + } + } + if (options.foldSyntaxBased && (style == SCE_D_OPERATOR)) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (atEOL || (i == endPos-1)) { + if (options.foldComment && options.foldCommentMultiline) { // Handle nested comments + int nc; + nc = styler.GetLineState(lineCurrent); + nc -= lineCurrent>0? styler.GetLineState(lineCurrent-1): 0; + levelNext += nc; + } + int levelUse = levelCurrent; + if (options.foldSyntaxBased && foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && options.foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +LexerModule lmD(SCLEX_D, LexerD::LexerFactoryD, "d", dWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexDMAP.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexDMAP.cpp new file mode 100644 index 000000000..91b10c29b --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexDMAP.cpp @@ -0,0 +1,226 @@ +// Scintilla source code edit control +/** @file LexDMAP.cxx + ** Lexer for MSC Nastran DMAP. + ** Written by Mark Robinson, based on the Fortran lexer by Chuan-jian Shen, Last changed Aug. 2013 + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. +/***************************************/ +#include +#include +#include +#include +#include +#include +/***************************************/ +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +/***************************************/ + +using namespace Scintilla; + +/***********************************************/ +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%'); +} +/**********************************************/ +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch)); +} +/***************************************/ +static void ColouriseDMAPDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + /***************************************/ + Sci_Position posLineStart = 0, numNonBlank = 0; + Sci_Position endPos = startPos + length; + /***************************************/ + // backtrack to the nearest keyword + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_DMAP_WORD)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + initStyle = styler.StyleAt(startPos - 1); + StyleContext sc(startPos, endPos-startPos, initStyle, styler); + /***************************************/ + for (; sc.More(); sc.Forward()) { + // remember the start position of the line + if (sc.atLineStart) { + posLineStart = sc.currentPos; + numNonBlank = 0; + sc.SetState(SCE_DMAP_DEFAULT); + } + if (!IsASpaceOrTab(sc.ch)) numNonBlank ++; + /***********************************************/ + // Handle data appearing after column 72; it is ignored + Sci_Position toLineStart = sc.currentPos - posLineStart; + if (toLineStart >= 72 || sc.ch == '$') { + sc.SetState(SCE_DMAP_COMMENT); + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + continue; + } + /***************************************/ + // Determine if the current state should terminate. + if (sc.state == SCE_DMAP_OPERATOR) { + sc.SetState(SCE_DMAP_DEFAULT); + } else if (sc.state == SCE_DMAP_NUMBER) { + if (!(IsAWordChar(sc.ch) || sc.ch=='\'' || sc.ch=='\"' || sc.ch=='.')) { + sc.SetState(SCE_DMAP_DEFAULT); + } + } else if (sc.state == SCE_DMAP_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '%')) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_DMAP_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_DMAP_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_DMAP_WORD3); + } + sc.SetState(SCE_DMAP_DEFAULT); + } + } else if (sc.state == SCE_DMAP_COMMENT) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_DMAP_DEFAULT); + } + } else if (sc.state == SCE_DMAP_STRING1) { + if (sc.ch == '\'') { + if (sc.chNext == '\'') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_DMAP_DEFAULT); + } + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_DMAP_STRINGEOL); + sc.ForwardSetState(SCE_DMAP_DEFAULT); + } + } else if (sc.state == SCE_DMAP_STRING2) { + if (sc.atLineEnd) { + sc.ChangeState(SCE_DMAP_STRINGEOL); + sc.ForwardSetState(SCE_DMAP_DEFAULT); + } else if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_DMAP_DEFAULT); + } + } + } + /***************************************/ + // Determine if a new state should be entered. + if (sc.state == SCE_DMAP_DEFAULT) { + if (sc.ch == '$') { + sc.SetState(SCE_DMAP_COMMENT); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)) || (sc.ch == '-' && IsADigit(sc.chNext))) { + sc.SetState(SCE_F_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_DMAP_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_DMAP_STRING2); + } else if (sc.ch == '\'') { + sc.SetState(SCE_DMAP_STRING1); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_DMAP_OPERATOR); + } + } + } + sc.Complete(); +} +/***************************************/ +// To determine the folding level depending on keywords +static int classifyFoldPointDMAP(const char* s, const char* prevWord) { + int lev = 0; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "enddo") == 0 || strcmp(s, "endif") == 0) { + lev = -1; + } else if ((strcmp(prevWord, "do") == 0 && strcmp(s, "while") == 0) || strcmp(s, "then") == 0) { + lev = 1; + } + return lev; +} +// Folding the code +static void FoldDMAPDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *[], Accessor &styler) { + // + // bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + // + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + /***************************************/ + Sci_Position lastStart = 0; + char prevWord[32] = ""; + /***************************************/ + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + // + if ((stylePrev == SCE_DMAP_DEFAULT || stylePrev == SCE_DMAP_OPERATOR || stylePrev == SCE_DMAP_COMMENT) && (style == SCE_DMAP_WORD)) { + // Store last word and label start point. + lastStart = i; + } + /***************************************/ + if (style == SCE_DMAP_WORD) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[32]; + Sci_PositionU k; + for(k=0; (k<31 ) && (k(tolower(styler[lastStart+k])); + } + s[k] = '\0'; + levelCurrent += classifyFoldPointDMAP(s, prevWord); + strcpy(prevWord, s); + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + /***************************************/ + if (!isspacechar(ch)) visibleChars++; + } + /***************************************/ + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} +/***************************************/ +static const char * const DMAPWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; +/***************************************/ +LexerModule lmDMAP(SCLEX_DMAP, ColouriseDMAPDoc, "DMAP", FoldDMAPDoc, DMAPWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexDMIS.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexDMIS.cpp new file mode 100644 index 000000000..fa024e9e7 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexDMIS.cpp @@ -0,0 +1,354 @@ +// Scintilla source code edit control +/** @file LexDMIS.cxx + ** Lexer for DMIS. + **/ +// Copyright 1998-2005 by Neil Hodgson +// Copyright 2013-2014 by Andreas Tscharner +// The License.txt file describes the conditions under which this software may be distributed. + + +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + + +static const char *const DMISWordListDesc[] = { + "DMIS Major Words", + "DMIS Minor Words", + "Unsupported DMIS Major Words", + "Unsupported DMIS Minor Words", + "Keywords for code folding start", + "Corresponding keywords for code folding end", + 0 +}; + + +class LexerDMIS : public DefaultLexer +{ + private: + char *m_wordListSets; + WordList m_majorWords; + WordList m_minorWords; + WordList m_unsupportedMajor; + WordList m_unsupportedMinor; + WordList m_codeFoldingStart; + WordList m_codeFoldingEnd; + + char * SCI_METHOD UpperCase(char *item); + void SCI_METHOD InitWordListSets(void); + + public: + LexerDMIS(void); + virtual ~LexerDMIS(void); + + int SCI_METHOD Version() const override { + return lvOriginal; + } + + void SCI_METHOD Release() override { + delete this; + } + + const char * SCI_METHOD PropertyNames() override { + return NULL; + } + + int SCI_METHOD PropertyType(const char *) override { + return -1; + } + + const char * SCI_METHOD DescribeProperty(const char *) override { + return NULL; + } + + Sci_Position SCI_METHOD PropertySet(const char *, const char *) override { + return -1; + } + + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return NULL; + } + + static ILexer *LexerFactoryDMIS() { + return new LexerDMIS; + } + + const char * SCI_METHOD DescribeWordListSets() override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; +}; + + +char * SCI_METHOD LexerDMIS::UpperCase(char *item) +{ + char *itemStart; + + + itemStart = item; + while (item && *item) { + *item = toupper(*item); + item++; + }; + return itemStart; +} + +void SCI_METHOD LexerDMIS::InitWordListSets(void) +{ + size_t totalLen = 0; + + + for (int i=0; DMISWordListDesc[i]; i++) { + totalLen += strlen(DMISWordListDesc[i]); + totalLen++; + }; + + totalLen++; + this->m_wordListSets = new char[totalLen]; + memset(this->m_wordListSets, 0, totalLen); + + for (int i=0; DMISWordListDesc[i]; i++) { + strcat(this->m_wordListSets, DMISWordListDesc[i]); + strcat(this->m_wordListSets, "\n"); + }; +} + + +LexerDMIS::LexerDMIS(void) { + this->InitWordListSets(); + + this->m_majorWords.Clear(); + this->m_minorWords.Clear(); + this->m_unsupportedMajor.Clear(); + this->m_unsupportedMinor.Clear(); + this->m_codeFoldingStart.Clear(); + this->m_codeFoldingEnd.Clear(); +} + +LexerDMIS::~LexerDMIS(void) { + delete[] this->m_wordListSets; +} + +Sci_Position SCI_METHOD LexerDMIS::WordListSet(int n, const char *wl) +{ + switch (n) { + case 0: + this->m_majorWords.Clear(); + this->m_majorWords.Set(wl); + break; + case 1: + this->m_minorWords.Clear(); + this->m_minorWords.Set(wl); + break; + case 2: + this->m_unsupportedMajor.Clear(); + this->m_unsupportedMajor.Set(wl); + break; + case 3: + this->m_unsupportedMinor.Clear(); + this->m_unsupportedMinor.Set(wl); + break; + case 4: + this->m_codeFoldingStart.Clear(); + this->m_codeFoldingStart.Set(wl); + break; + case 5: + this->m_codeFoldingEnd.Clear(); + this->m_codeFoldingEnd.Set(wl); + break; + default: + return -1; + break; + } + + return 0; +} + +const char * SCI_METHOD LexerDMIS::DescribeWordListSets() +{ + return this->m_wordListSets; +} + +void SCI_METHOD LexerDMIS::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) +{ + const Sci_PositionU MAX_STR_LEN = 100; + + LexAccessor styler(pAccess); + StyleContext scCTX(startPos, lengthDoc, initStyle, styler); + CharacterSet setDMISNumber(CharacterSet::setDigits, ".-+eE"); + CharacterSet setDMISWordStart(CharacterSet::setAlpha, "-234", 0x80, true); + CharacterSet setDMISWord(CharacterSet::setAlpha); + + + bool isIFLine = false; + + for (; scCTX.More(); scCTX.Forward()) { + if (scCTX.atLineEnd) { + isIFLine = false; + }; + + switch (scCTX.state) { + case SCE_DMIS_DEFAULT: + if (scCTX.Match('$', '$')) { + scCTX.SetState(SCE_DMIS_COMMENT); + scCTX.Forward(); + }; + if (scCTX.Match('\'')) { + scCTX.SetState(SCE_DMIS_STRING); + }; + if (IsADigit(scCTX.ch) || ((scCTX.Match('-') || scCTX.Match('+')) && IsADigit(scCTX.chNext))) { + scCTX.SetState(SCE_DMIS_NUMBER); + break; + }; + if (setDMISWordStart.Contains(scCTX.ch)) { + scCTX.SetState(SCE_DMIS_KEYWORD); + }; + if (scCTX.Match('(') && (!isIFLine)) { + scCTX.SetState(SCE_DMIS_LABEL); + }; + break; + + case SCE_DMIS_COMMENT: + if (scCTX.atLineEnd) { + scCTX.SetState(SCE_DMIS_DEFAULT); + }; + break; + + case SCE_DMIS_STRING: + if (scCTX.Match('\'')) { + scCTX.SetState(SCE_DMIS_DEFAULT); + }; + break; + + case SCE_DMIS_NUMBER: + if (!setDMISNumber.Contains(scCTX.ch)) { + scCTX.SetState(SCE_DMIS_DEFAULT); + }; + break; + + case SCE_DMIS_KEYWORD: + if (!setDMISWord.Contains(scCTX.ch)) { + char tmpStr[MAX_STR_LEN]; + memset(tmpStr, 0, MAX_STR_LEN*sizeof(char)); + scCTX.GetCurrent(tmpStr, (MAX_STR_LEN-1)); + strncpy(tmpStr, this->UpperCase(tmpStr), (MAX_STR_LEN-1)); + + if (this->m_minorWords.InList(tmpStr)) { + scCTX.ChangeState(SCE_DMIS_MINORWORD); + }; + if (this->m_majorWords.InList(tmpStr)) { + isIFLine = (strcmp(tmpStr, "IF") == 0); + scCTX.ChangeState(SCE_DMIS_MAJORWORD); + }; + if (this->m_unsupportedMajor.InList(tmpStr)) { + scCTX.ChangeState(SCE_DMIS_UNSUPPORTED_MAJOR); + }; + if (this->m_unsupportedMinor.InList(tmpStr)) { + scCTX.ChangeState(SCE_DMIS_UNSUPPORTED_MINOR); + }; + + if (scCTX.Match('(') && (!isIFLine)) { + scCTX.SetState(SCE_DMIS_LABEL); + } else { + scCTX.SetState(SCE_DMIS_DEFAULT); + }; + }; + break; + + case SCE_DMIS_LABEL: + if (scCTX.Match(')')) { + scCTX.SetState(SCE_DMIS_DEFAULT); + }; + break; + }; + }; + scCTX.Complete(); +} + +void SCI_METHOD LexerDMIS::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int, IDocument *pAccess) +{ + const int MAX_STR_LEN = 100; + + LexAccessor styler(pAccess); + Sci_PositionU endPos = startPos + lengthDoc; + char chNext = styler[startPos]; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int strPos = 0; + bool foldWordPossible = false; + CharacterSet setDMISFoldWord(CharacterSet::setAlpha); + char *tmpStr; + + + tmpStr = new char[MAX_STR_LEN]; + memset(tmpStr, 0, MAX_STR_LEN*sizeof(char)); + + for (Sci_PositionU i=startPos; i= (MAX_STR_LEN-1)) { + strPos = MAX_STR_LEN-1; + }; + + int style = styler.StyleAt(i); + bool noFoldPos = ((style == SCE_DMIS_COMMENT) || (style == SCE_DMIS_STRING)); + + if (foldWordPossible) { + if (setDMISFoldWord.Contains(ch)) { + tmpStr[strPos++] = ch; + } else { + tmpStr = this->UpperCase(tmpStr); + if (this->m_codeFoldingStart.InList(tmpStr) && (!noFoldPos)) { + levelCurrent++; + }; + if (this->m_codeFoldingEnd.InList(tmpStr) && (!noFoldPos)) { + levelCurrent--; + }; + memset(tmpStr, 0, MAX_STR_LEN*sizeof(char)); + strPos = 0; + foldWordPossible = false; + }; + } else { + if (setDMISFoldWord.Contains(ch)) { + tmpStr[strPos++] = ch; + foldWordPossible = true; + }; + }; + + if (atEOL || (i == (endPos-1))) { + int lev = levelPrev; + + if (levelCurrent > levelPrev) { + lev |= SC_FOLDLEVELHEADERFLAG; + }; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + }; + lineCurrent++; + levelPrev = levelCurrent; + }; + }; + delete[] tmpStr; +} + + +LexerModule lmDMIS(SCLEX_DMIS, LexerDMIS::LexerFactoryDMIS, "DMIS", DMISWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexDiff.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexDiff.cpp new file mode 100644 index 000000000..dd008c5cb --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexDiff.cpp @@ -0,0 +1,161 @@ +// Scintilla source code edit control +/** @file LexDiff.cxx + ** Lexer for diff results. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { + return (styler[i] == '\n') || + ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); +} + +#define DIFF_BUFFER_START_SIZE 16 +// Note that ColouriseDiffLine analyzes only the first DIFF_BUFFER_START_SIZE +// characters of each line to classify the line. + +static void ColouriseDiffLine(char *lineBuffer, Sci_Position endLine, Accessor &styler) { + // It is needed to remember the current state to recognize starting + // comment lines before the first "diff " or "--- ". If a real + // difference starts then each line starting with ' ' is a whitespace + // otherwise it is considered a comment (Only in..., Binary file...) + if (0 == strncmp(lineBuffer, "diff ", 5)) { + styler.ColourTo(endLine, SCE_DIFF_COMMAND); + } else if (0 == strncmp(lineBuffer, "Index: ", 7)) { // For subversion's diff + styler.ColourTo(endLine, SCE_DIFF_COMMAND); + } else if (0 == strncmp(lineBuffer, "---", 3) && lineBuffer[3] != '-') { + // In a context diff, --- appears in both the header and the position markers + if (lineBuffer[3] == ' ' && atoi(lineBuffer + 4) && !strchr(lineBuffer, '/')) + styler.ColourTo(endLine, SCE_DIFF_POSITION); + else if (lineBuffer[3] == '\r' || lineBuffer[3] == '\n') + styler.ColourTo(endLine, SCE_DIFF_POSITION); + else if (lineBuffer[3] == ' ') + styler.ColourTo(endLine, SCE_DIFF_HEADER); + else + styler.ColourTo(endLine, SCE_DIFF_DELETED); + } else if (0 == strncmp(lineBuffer, "+++ ", 4)) { + // I don't know of any diff where "+++ " is a position marker, but for + // consistency, do the same as with "--- " and "*** ". + if (atoi(lineBuffer+4) && !strchr(lineBuffer, '/')) + styler.ColourTo(endLine, SCE_DIFF_POSITION); + else + styler.ColourTo(endLine, SCE_DIFF_HEADER); + } else if (0 == strncmp(lineBuffer, "====", 4)) { // For p4's diff + styler.ColourTo(endLine, SCE_DIFF_HEADER); + } else if (0 == strncmp(lineBuffer, "***", 3)) { + // In a context diff, *** appears in both the header and the position markers. + // Also ******** is a chunk header, but here it's treated as part of the + // position marker since there is no separate style for a chunk header. + if (lineBuffer[3] == ' ' && atoi(lineBuffer+4) && !strchr(lineBuffer, '/')) + styler.ColourTo(endLine, SCE_DIFF_POSITION); + else if (lineBuffer[3] == '*') + styler.ColourTo(endLine, SCE_DIFF_POSITION); + else + styler.ColourTo(endLine, SCE_DIFF_HEADER); + } else if (0 == strncmp(lineBuffer, "? ", 2)) { // For difflib + styler.ColourTo(endLine, SCE_DIFF_HEADER); + } else if (lineBuffer[0] == '@') { + styler.ColourTo(endLine, SCE_DIFF_POSITION); + } else if (lineBuffer[0] >= '0' && lineBuffer[0] <= '9') { + styler.ColourTo(endLine, SCE_DIFF_POSITION); + } else if (0 == strncmp(lineBuffer, "++", 2)) { + styler.ColourTo(endLine, SCE_DIFF_PATCH_ADD); + } else if (0 == strncmp(lineBuffer, "+-", 2)) { + styler.ColourTo(endLine, SCE_DIFF_PATCH_DELETE); + } else if (0 == strncmp(lineBuffer, "-+", 2)) { + styler.ColourTo(endLine, SCE_DIFF_REMOVED_PATCH_ADD); + } else if (0 == strncmp(lineBuffer, "--", 2)) { + styler.ColourTo(endLine, SCE_DIFF_REMOVED_PATCH_DELETE); + } else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') { + styler.ColourTo(endLine, SCE_DIFF_DELETED); + } else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') { + styler.ColourTo(endLine, SCE_DIFF_ADDED); + } else if (lineBuffer[0] == '!') { + styler.ColourTo(endLine, SCE_DIFF_CHANGED); + } else if (lineBuffer[0] != ' ') { + styler.ColourTo(endLine, SCE_DIFF_COMMENT); + } else { + styler.ColourTo(endLine, SCE_DIFF_DEFAULT); + } +} + +static void ColouriseDiffDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { + char lineBuffer[DIFF_BUFFER_START_SIZE] = ""; + styler.StartAt(startPos); + styler.StartSegment(startPos); + Sci_PositionU linePos = 0; + for (Sci_PositionU i = startPos; i < startPos + length; i++) { + if (AtEOL(styler, i)) { + if (linePos < DIFF_BUFFER_START_SIZE) { + lineBuffer[linePos] = 0; + } + ColouriseDiffLine(lineBuffer, i, styler); + linePos = 0; + } else if (linePos < DIFF_BUFFER_START_SIZE - 1) { + lineBuffer[linePos++] = styler[i]; + } else if (linePos == DIFF_BUFFER_START_SIZE - 1) { + lineBuffer[linePos++] = 0; + } + } + if (linePos > 0) { // Last line does not have ending characters + if (linePos < DIFF_BUFFER_START_SIZE) { + lineBuffer[linePos] = 0; + } + ColouriseDiffLine(lineBuffer, startPos + length - 1, styler); + } +} + +static void FoldDiffDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { + Sci_Position curLine = styler.GetLine(startPos); + Sci_Position curLineStart = styler.LineStart(curLine); + int prevLevel = curLine > 0 ? styler.LevelAt(curLine - 1) : SC_FOLDLEVELBASE; + int nextLevel; + + do { + const int lineType = styler.StyleAt(curLineStart); + if (lineType == SCE_DIFF_COMMAND) + nextLevel = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG; + else if (lineType == SCE_DIFF_HEADER) + nextLevel = (SC_FOLDLEVELBASE + 1) | SC_FOLDLEVELHEADERFLAG; + else if (lineType == SCE_DIFF_POSITION && styler[curLineStart] != '-') + nextLevel = (SC_FOLDLEVELBASE + 2) | SC_FOLDLEVELHEADERFLAG; + else if (prevLevel & SC_FOLDLEVELHEADERFLAG) + nextLevel = (prevLevel & SC_FOLDLEVELNUMBERMASK) + 1; + else + nextLevel = prevLevel; + + if ((nextLevel & SC_FOLDLEVELHEADERFLAG) && (nextLevel == prevLevel)) + styler.SetLevel(curLine-1, prevLevel & ~SC_FOLDLEVELHEADERFLAG); + + styler.SetLevel(curLine, nextLevel); + prevLevel = nextLevel; + + curLineStart = styler.LineStart(++curLine); + } while (static_cast(startPos)+length > curLineStart); +} + +static const char *const emptyWordListDesc[] = { + 0 +}; + +LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, "diff", FoldDiffDoc, emptyWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexECL.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexECL.cpp new file mode 100644 index 000000000..6c916bce4 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexECL.cpp @@ -0,0 +1,519 @@ +// Scintilla source code edit control +/** @file LexECL.cxx + ** Lexer for ECL. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable: 4786) +#endif +#ifdef __BORLANDC__ +// Borland C++ displays warnings in vector header without this +#pragma option -w-ccc -w-rch +#endif + +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" + +#define SET_LOWER "abcdefghijklmnopqrstuvwxyz" +#define SET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define SET_DIGITS "0123456789" + +using namespace Scintilla; + +static bool IsSpaceEquiv(int state) { + switch (state) { + case SCE_ECL_DEFAULT: + case SCE_ECL_COMMENT: + case SCE_ECL_COMMENTLINE: + case SCE_ECL_COMMENTLINEDOC: + case SCE_ECL_COMMENTDOCKEYWORD: + case SCE_ECL_COMMENTDOCKEYWORDERROR: + case SCE_ECL_COMMENTDOC: + return true; + + default: + return false; + } +} + +static void ColouriseEclDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + WordList &keywords0 = *keywordlists[0]; + WordList &keywords1 = *keywordlists[1]; + WordList &keywords2 = *keywordlists[2]; + WordList &keywords3 = *keywordlists[3]; //Value Types + WordList &keywords4 = *keywordlists[4]; + WordList &keywords5 = *keywordlists[5]; + WordList &keywords6 = *keywordlists[6]; //Javadoc Tags + WordList cplusplus; + cplusplus.Set("beginc endc"); + + bool stylingWithinPreprocessor = false; + + CharacterSet setOKBeforeRE(CharacterSet::setNone, "(=,"); + CharacterSet setDoxygen(CharacterSet::setLower, "$@\\&<>#{}[]"); + CharacterSet setWordStart(CharacterSet::setAlpha, "_", 0x80, true); + CharacterSet setWord(CharacterSet::setAlphaNum, "._", 0x80, true); + CharacterSet setQualified(CharacterSet::setNone, "uUxX"); + + int chPrevNonWhite = ' '; + int visibleChars = 0; + bool lastWordWasUUID = false; + int styleBeforeDCKeyword = SCE_ECL_DEFAULT; + bool continuationLine = false; + + if (initStyle == SCE_ECL_PREPROCESSOR) { + // Set continuationLine if last character of previous line is '\' + Sci_Position lineCurrent = styler.GetLine(startPos); + if (lineCurrent > 0) { + int chBack = styler.SafeGetCharAt(startPos-1, 0); + int chBack2 = styler.SafeGetCharAt(startPos-2, 0); + int lineEndChar = '!'; + if (chBack2 == '\r' && chBack == '\n') { + lineEndChar = styler.SafeGetCharAt(startPos-3, 0); + } else if (chBack == '\n' || chBack == '\r') { + lineEndChar = chBack2; + } + continuationLine = lineEndChar == '\\'; + } + } + + // look back to set chPrevNonWhite properly for better regex colouring + if (startPos > 0) { + Sci_Position back = startPos; + while (--back && IsSpaceEquiv(styler.StyleAt(back))) + ; + if (styler.StyleAt(back) == SCE_ECL_OPERATOR) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + if (sc.atLineStart) { + if (sc.state == SCE_ECL_STRING) { + // Prevent SCE_ECL_STRINGEOL from leaking back to previous line which + // ends with a line continuation by locking in the state upto this position. + sc.SetState(SCE_ECL_STRING); + } + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + lastWordWasUUID = false; + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continuationLine = true; + continue; + } + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_ECL_ADDED: + case SCE_ECL_DELETED: + case SCE_ECL_CHANGED: + case SCE_ECL_MOVED: + if (sc.atLineStart) + sc.SetState(SCE_ECL_DEFAULT); + break; + case SCE_ECL_OPERATOR: + sc.SetState(SCE_ECL_DEFAULT); + break; + case SCE_ECL_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_IDENTIFIER: + if (!setWord.Contains(sc.ch) || (sc.ch == '.')) { + char s[1000]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords0.InList(s)) { + lastWordWasUUID = strcmp(s, "uuid") == 0; + sc.ChangeState(SCE_ECL_WORD0); + } else if (keywords1.InList(s)) { + sc.ChangeState(SCE_ECL_WORD1); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_ECL_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_ECL_WORD4); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_ECL_WORD5); + } + else //Data types are of from KEYWORD## + { + int i = static_cast(strlen(s)) - 1; + while(i >= 0 && (isdigit(s[i]) || s[i] == '_')) + --i; + + char s2[1000]; + strncpy(s2, s, i + 1); + s2[i + 1] = 0; + if (keywords3.InList(s2)) { + sc.ChangeState(SCE_ECL_WORD3); + } + } + sc.SetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_PREPROCESSOR: + if (sc.atLineStart && !continuationLine) { + sc.SetState(SCE_ECL_DEFAULT); + } else if (stylingWithinPreprocessor) { + if (IsASpace(sc.ch)) { + sc.SetState(SCE_ECL_DEFAULT); + } + } else { + if (sc.Match('/', '*') || sc.Match('/', '/')) { + sc.SetState(SCE_ECL_DEFAULT); + } + } + break; + case SCE_ECL_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ECL_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_ECL_COMMENTDOC; + sc.SetState(SCE_ECL_COMMENTDOCKEYWORD); + } + } + break; + case SCE_ECL_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_COMMENTLINEDOC: + if (sc.atLineStart) { + sc.SetState(SCE_ECL_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_ECL_COMMENTLINEDOC; + sc.SetState(SCE_ECL_COMMENTDOCKEYWORD); + } + } + break; + case SCE_ECL_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_ECL_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_ECL_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_ECL_DEFAULT); + } else if (!setDoxygen.Contains(sc.ch)) { + char s[1000]; + sc.GetCurrentLowered(s, sizeof(s)); + if (!IsASpace(sc.ch) || !keywords6.InList(s+1)) { + sc.ChangeState(SCE_ECL_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_ECL_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_ECL_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_ECL_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_REGEX: + if (sc.atLineStart) { + sc.SetState(SCE_ECL_DEFAULT); + } else if (sc.ch == '/') { + sc.Forward(); + while ((sc.ch < 0x80) && islower(sc.ch)) + sc.Forward(); // gobble regex flags + sc.SetState(SCE_ECL_DEFAULT); + } else if (sc.ch == '\\') { + // Gobble up the quoted character + if (sc.chNext == '\\' || sc.chNext == '/') { + sc.Forward(); + } + } + break; + case SCE_ECL_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_ECL_DEFAULT); + } + break; + case SCE_ECL_VERBATIM: + if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_ECL_DEFAULT); + } + } + break; + case SCE_ECL_UUID: + if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == ')') { + sc.SetState(SCE_ECL_DEFAULT); + } + break; + } + + // Determine if a new state should be entered. + Sci_Position lineCurrent = styler.GetLine(sc.currentPos); + int lineState = styler.GetLineState(lineCurrent); + if (sc.state == SCE_ECL_DEFAULT) { + if (lineState) { + sc.SetState(lineState); + } + else if (sc.Match('@', '\"')) { + sc.SetState(SCE_ECL_VERBATIM); + sc.Forward(); + } else if (setQualified.Contains(sc.ch) && sc.chNext == '\'') { + sc.SetState(SCE_ECL_CHARACTER); + sc.Forward(); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + if (lastWordWasUUID) { + sc.SetState(SCE_ECL_UUID); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_ECL_NUMBER); + } + } else if (setWordStart.Contains(sc.ch) || (sc.ch == '@')) { + if (lastWordWasUUID) { + sc.SetState(SCE_ECL_UUID); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_ECL_IDENTIFIER); + } + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_ECL_COMMENTDOC); + } else { + sc.SetState(SCE_ECL_COMMENT); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_ECL_COMMENTLINEDOC); + else + sc.SetState(SCE_ECL_COMMENTLINE); + } else if (sc.ch == '/' && setOKBeforeRE.Contains(chPrevNonWhite)) { + sc.SetState(SCE_ECL_REGEX); // JavaScript's RegEx +// } else if (sc.ch == '\"') { +// sc.SetState(SCE_ECL_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_ECL_CHARACTER); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_ECL_PREPROCESSOR); + // Skip whitespace between # and preprocessor word + do { + sc.Forward(); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); + if (sc.atLineEnd) { + sc.SetState(SCE_ECL_DEFAULT); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_ECL_OPERATOR); + } + } + + if (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) { + chPrevNonWhite = sc.ch; + visibleChars++; + } + continuationLine = false; + } + sc.Complete(); + +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_ECL_COMMENT || + style == SCE_ECL_COMMENTDOC || + style == SCE_ECL_COMMENTDOCKEYWORD || + style == SCE_ECL_COMMENTDOCKEYWORDERROR; +} + +static bool MatchNoCase(Accessor & styler, Sci_PositionU & pos, const char *s) { + Sci_Position i=0; + for (; *s; i++) { + char compare_char = tolower(*s); + char styler_char = tolower(styler.SafeGetCharAt(pos+i)); + if (compare_char != styler_char) + return false; + s++; + } + pos+=i-1; + return true; +} + + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". +static void FoldEclDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *[], Accessor &styler) { + bool foldComment = true; + bool foldPreprocessor = true; + bool foldCompact = true; + bool foldAtElse = true; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev) && (stylePrev != SCE_ECL_COMMENTLINEDOC)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && (styleNext != SCE_ECL_COMMENTLINEDOC) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (foldComment && (style == SCE_ECL_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelNext++; + } else if (chNext2 == '}') { + levelNext--; + } + } + } + if (foldPreprocessor && (style == SCE_ECL_PREPROCESSOR)) { + if (ch == '#') { + Sci_PositionU j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (MatchNoCase(styler, j, "region") || MatchNoCase(styler, j, "if")) { + levelNext++; + } else if (MatchNoCase(styler, j, "endregion") || MatchNoCase(styler, j, "end")) { + levelNext--; + } + } + } + if (style == SCE_ECL_OPERATOR) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (style == SCE_ECL_WORD2) { + if (MatchNoCase(styler, i, "record") || MatchNoCase(styler, i, "transform") || MatchNoCase(styler, i, "type") || MatchNoCase(styler, i, "function") || + MatchNoCase(styler, i, "module") || MatchNoCase(styler, i, "service") || MatchNoCase(styler, i, "interface") || MatchNoCase(styler, i, "ifblock") || + MatchNoCase(styler, i, "macro") || MatchNoCase(styler, i, "beginc++")) { + levelNext++; + } else if (MatchNoCase(styler, i, "endmacro") || MatchNoCase(styler, i, "endc++") || MatchNoCase(styler, i, "end")) { + levelNext--; + } + } + if (atEOL || (i == endPos-1)) { + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + if (atEOL && (i == static_cast(styler.Length()-1))) { + // There is an empty line at end of file so give it same level and empty + styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG); + } + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +static const char * const EclWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmECL( + SCLEX_ECL, + ColouriseEclDoc, + "ecl", + FoldEclDoc, + EclWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexEDIFACT.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexEDIFACT.cpp new file mode 100644 index 000000000..6da0759a0 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexEDIFACT.cpp @@ -0,0 +1,336 @@ +// Scintilla Lexer for EDIFACT +// Written by Iain Clarke, IMCSoft & Inobiz AB. +// EDIFACT documented here: https://www.unece.org/cefact/edifact/welcome.html +// and more readably here: https://en.wikipedia.org/wiki/EDIFACT +// This code is subject to the same license terms as the rest of the scintilla project: +// The License.txt file describes the conditions under which this software may be distributed. +// + +// Header order must match order in scripts/HeaderOrder.txt +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "LexAccessor.h" +#include "LexerModule.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +class LexerEDIFACT : public DefaultLexer +{ +public: + LexerEDIFACT(); + virtual ~LexerEDIFACT() {} // virtual destructor, as we inherit from ILexer + + static ILexer *Factory() { + return new LexerEDIFACT; + } + + int SCI_METHOD Version() const override + { + return lvOriginal; + } + void SCI_METHOD Release() override + { + delete this; + } + + const char * SCI_METHOD PropertyNames() override + { + return "fold\nlexer.edifact.highlight.un.all"; + } + int SCI_METHOD PropertyType(const char *) override + { + return SC_TYPE_BOOLEAN; // Only one property! + } + const char * SCI_METHOD DescribeProperty(const char *name) override + { + if (!strcmp(name, "fold")) + return "Whether to apply folding to document or not"; + if (!strcmp(name, "lexer.edifact.highlight.un.all")) + return "Whether to apply UN* highlighting to all UN segments, or just to UNH"; + return NULL; + } + + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override + { + if (!strcmp(key, "fold")) + { + m_bFold = strcmp(val, "0") ? true : false; + return 0; + } + if (!strcmp(key, "lexer.edifact.highlight.un.all")) // GetProperty + { + m_bHighlightAllUN = strcmp(val, "0") ? true : false; + return 0; + } + return -1; + } + const char * SCI_METHOD DescribeWordListSets() override + { + return NULL; + } + Sci_Position SCI_METHOD WordListSet(int, const char *) override + { + return -1; + } + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void * SCI_METHOD PrivateCall(int, void *) override + { + return NULL; + } + +protected: + Sci_Position InitialiseFromUNA(IDocument *pAccess, Sci_PositionU MaxLength); + Sci_Position FindPreviousEnd(IDocument *pAccess, Sci_Position startPos) const; + Sci_Position ForwardPastWhitespace(IDocument *pAccess, Sci_Position startPos, Sci_Position MaxLength) const; + int DetectSegmentHeader(char SegmentHeader[3]) const; + + bool m_bFold; + + // property lexer.edifact.highlight.un.all + // Set to 0 to highlight only UNA segments, or 1 to highlight all UNx segments. + bool m_bHighlightAllUN; + + char m_chComponent; + char m_chData; + char m_chDecimal; + char m_chRelease; + char m_chSegment; +}; + +LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact"); + +/////////////////////////////////////////////////////////////////////////////// + + + +/////////////////////////////////////////////////////////////////////////////// + +LexerEDIFACT::LexerEDIFACT() +{ + m_bFold = false; + m_bHighlightAllUN = false; + m_chComponent = ':'; + m_chData = '+'; + m_chDecimal = '.'; + m_chRelease = '?'; + m_chSegment = '\''; +} + +void LexerEDIFACT::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int, IDocument *pAccess) +{ + Sci_PositionU posFinish = startPos + lengthDoc; + InitialiseFromUNA(pAccess, posFinish); + + // Look backwards for a ' or a document beginning + Sci_PositionU posCurrent = FindPreviousEnd(pAccess, startPos); + // And jump past the ' if this was not the beginning of the document + if (posCurrent != 0) + posCurrent++; + + // Style buffer, so we're not issuing loads of notifications + LexAccessor styler (pAccess); + pAccess->StartStyling(posCurrent, '\377'); + styler.StartSegment(posCurrent); + Sci_Position posSegmentStart = -1; + + while ((posCurrent < posFinish) && (posSegmentStart == -1)) + { + posCurrent = ForwardPastWhitespace(pAccess, posCurrent, posFinish); + // Mark whitespace as default + styler.ColourTo(posCurrent - 1, SCE_EDI_DEFAULT); + if (posCurrent >= posFinish) + break; + + // Does is start with 3 charaters? ie, UNH + char SegmentHeader[4] = { 0 }; + pAccess->GetCharRange(SegmentHeader, posCurrent, 3); + + int SegmentStyle = DetectSegmentHeader(SegmentHeader); + if (SegmentStyle == SCE_EDI_BADSEGMENT) + break; + if (SegmentStyle == SCE_EDI_UNA) + { + posCurrent += 9; + styler.ColourTo(posCurrent - 1, SCE_EDI_UNA); // UNA + continue; + } + posSegmentStart = posCurrent; + posCurrent += 3; + + styler.ColourTo(posCurrent - 1, SegmentStyle); // UNH etc + + // Colour in the rest of the segment + for (char c; posCurrent < posFinish; posCurrent++) + { + pAccess->GetCharRange(&c, posCurrent, 1); + + if (c == m_chRelease) // ? escape character, check first, in case of ?' + posCurrent++; + else if (c == m_chSegment) // ' + { + // Make sure the whole segment is on one line. styler won't let us go back in time, so we'll settle for marking the ' as bad. + Sci_Position lineSegmentStart = pAccess->LineFromPosition(posSegmentStart); + Sci_Position lineSegmentEnd = pAccess->LineFromPosition(posCurrent); + if (lineSegmentStart == lineSegmentEnd) + styler.ColourTo(posCurrent, SCE_EDI_SEGMENTEND); + else + styler.ColourTo(posCurrent, SCE_EDI_BADSEGMENT); + posSegmentStart = -1; + posCurrent++; + break; + } + else if (c == m_chComponent) // : + styler.ColourTo(posCurrent, SCE_EDI_SEP_COMPOSITE); + else if (c == m_chData) // + + styler.ColourTo(posCurrent, SCE_EDI_SEP_ELEMENT); + else + styler.ColourTo(posCurrent, SCE_EDI_DEFAULT); + } + } + styler.Flush(); + + if (posSegmentStart == -1) + return; + + pAccess->StartStyling(posSegmentStart, -1); + pAccess->SetStyleFor(posFinish - posSegmentStart, SCE_EDI_BADSEGMENT); +} + +void LexerEDIFACT::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int, IDocument *pAccess) +{ + if (!m_bFold) + return; + + // Fold at UNx lines. ie, UNx segments = 0, other segments = 1. + // There's no sub folding, so we can be quite simple. + Sci_Position endPos = startPos + lengthDoc; + char SegmentHeader[4] = { 0 }; + + int iIndentPrevious = 0; + Sci_Position lineLast = pAccess->LineFromPosition(endPos); + + for (Sci_Position lineCurrent = pAccess->LineFromPosition(startPos); lineCurrent <= lineLast; lineCurrent++) + { + Sci_Position posLineStart = pAccess->LineStart(lineCurrent); + posLineStart = ForwardPastWhitespace(pAccess, posLineStart, endPos); + Sci_Position lineDataStart = pAccess->LineFromPosition(posLineStart); + // Fill in whitespace lines? + for (; lineCurrent < lineDataStart; lineCurrent++) + pAccess->SetLevel(lineCurrent, SC_FOLDLEVELBASE | SC_FOLDLEVELWHITEFLAG | iIndentPrevious); + pAccess->GetCharRange(SegmentHeader, posLineStart, 3); + //if (DetectSegmentHeader(SegmentHeader) == SCE_EDI_BADSEGMENT) // Abort if this is not a proper segment header + + int level = 0; + if (memcmp(SegmentHeader, "UNH", 3) == 0) // UNH starts blocks + level = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG; + // Check for UNA,B and Z. All others are inside messages + else if (!memcmp(SegmentHeader, "UNA", 3) || !memcmp(SegmentHeader, "UNB", 3) || !memcmp(SegmentHeader, "UNZ", 3)) + level = SC_FOLDLEVELBASE; + else + level = SC_FOLDLEVELBASE | 1; + pAccess->SetLevel(lineCurrent, level); + iIndentPrevious = level & SC_FOLDLEVELNUMBERMASK; + } +} + +Sci_Position LexerEDIFACT::InitialiseFromUNA(IDocument *pAccess, Sci_PositionU MaxLength) +{ + MaxLength -= 9; // drop 9 chars, to give us room for UNA:+.? ' + + Sci_PositionU startPos = 0; + startPos += ForwardPastWhitespace(pAccess, 0, MaxLength); + if (startPos < MaxLength) + { + char bufUNA[9]; + pAccess->GetCharRange(bufUNA, startPos, 9); + + // Check it's UNA segment + if (!memcmp(bufUNA, "UNA", 3)) + { + m_chComponent = bufUNA[3]; + m_chData = bufUNA[4]; + m_chDecimal = bufUNA[5]; + m_chRelease = bufUNA[6]; + // bufUNA [7] should be space - reserved. + m_chSegment = bufUNA[8]; + + return 0; // success! + } + } + + // We failed to find a UNA, so drop to defaults + m_chComponent = ':'; + m_chData = '+'; + m_chDecimal = '.'; + m_chRelease = '?'; + m_chSegment = '\''; + + return -1; +} + +Sci_Position LexerEDIFACT::ForwardPastWhitespace(IDocument *pAccess, Sci_Position startPos, Sci_Position MaxLength) const +{ + char c; + + while (startPos < MaxLength) + { + pAccess->GetCharRange(&c, startPos, 1); + switch (c) + { + case '\t': + case '\r': + case '\n': + case ' ': + break; + default: + return startPos; + } + + startPos++; + } + + return MaxLength; +} + +int LexerEDIFACT::DetectSegmentHeader(char SegmentHeader[3]) const +{ + if ( + SegmentHeader[0] < 'A' || SegmentHeader[0] > 'Z' || + SegmentHeader[1] < 'A' || SegmentHeader[1] > 'Z' || + SegmentHeader[2] < 'A' || SegmentHeader[2] > 'Z') + return SCE_EDI_BADSEGMENT; + + if (!memcmp(SegmentHeader, "UNA", 3)) + return SCE_EDI_UNA; + + if (m_bHighlightAllUN && !memcmp(SegmentHeader, "UN", 2)) + return SCE_EDI_UNH; + else if (memcmp(SegmentHeader, "UNH", 3) == 0) + return SCE_EDI_UNH; + + return SCE_EDI_SEGMENTSTART; +} + +// Look backwards for a ' or a document beginning +Sci_Position LexerEDIFACT::FindPreviousEnd(IDocument *pAccess, Sci_Position startPos) const +{ + for (char c; startPos > 0; startPos--) + { + pAccess->GetCharRange(&c, startPos, 1); + if (c == m_chSegment) + return startPos; + } + // We didn't find a ', so just go with the beginning + return 0; +} + + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexEScript.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexEScript.cpp new file mode 100644 index 000000000..0cba29858 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexEScript.cpp @@ -0,0 +1,274 @@ +// Scintilla source code edit control +/** @file LexESCRIPT.cxx + ** Lexer for ESCRIPT + **/ +// Copyright 2003 by Patrizio Bekerle (patrizio@bekerle.com) + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + + + +static void ColouriseESCRIPTDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + // Do not leak onto next line + /*if (initStyle == SCE_ESCRIPT_STRINGEOL) + initStyle = SCE_ESCRIPT_DEFAULT;*/ + + StyleContext sc(startPos, length, initStyle, styler); + + bool caseSensitive = styler.GetPropertyInt("escript.case.sensitive", 0) != 0; + + for (; sc.More(); sc.Forward()) { + + /*if (sc.atLineStart && (sc.state == SCE_ESCRIPT_STRING)) { + // Prevent SCE_ESCRIPT_STRINGEOL from leaking back to previous line + sc.SetState(SCE_ESCRIPT_STRING); + }*/ + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ESCRIPT_OPERATOR || sc.state == SCE_ESCRIPT_BRACE) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } else if (sc.state == SCE_ESCRIPT_NUMBER) { + if (!IsADigit(sc.ch) || sc.ch != '.') { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + +// sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD3); + // sc.state = SCE_ESCRIPT_IDENTIFIER; + } + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENT) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTDOC) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTLINE) { + if (sc.atLineEnd) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ESCRIPT_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_ESCRIPT_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '#')) { + sc.SetState(SCE_ESCRIPT_IDENTIFIER); + } else if (sc.Match('/', '*')) { + sc.SetState(SCE_ESCRIPT_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_ESCRIPT_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ESCRIPT_STRING); + //} else if (isoperator(static_cast(sc.ch))) { + } else if (sc.ch == '+' || sc.ch == '-' || sc.ch == '*' || sc.ch == '/' || sc.ch == '=' || sc.ch == '<' || sc.ch == '>' || sc.ch == '&' || sc.ch == '|' || sc.ch == '!' || sc.ch == '?' || sc.ch == ':') { + sc.SetState(SCE_ESCRIPT_OPERATOR); + } else if (sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_ESCRIPT_BRACE); + } + } + + } + sc.Complete(); +} + + +static int classifyFoldPointESCRIPT(const char* s, const char* prevWord) { + int lev = 0; + if (strcmp(prevWord, "end") == 0) return lev; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0) + return -1; + + if (strcmp(s, "for") == 0 || strcmp(s, "foreach") == 0 + || strcmp(s, "program") == 0 || strcmp(s, "function") == 0 + || strcmp(s, "while") == 0 || strcmp(s, "case") == 0 + || strcmp(s, "if") == 0 ) { + lev = 1; + } else if ( strcmp(s, "endfor") == 0 || strcmp(s, "endforeach") == 0 + || strcmp(s, "endprogram") == 0 || strcmp(s, "endfunction") == 0 + || strcmp(s, "endwhile") == 0 || strcmp(s, "endcase") == 0 + || strcmp(s, "endif") == 0 ) { + lev = -1; + } + + return lev; +} + + +static bool IsStreamCommentStyle(int style) { + return style == SCE_ESCRIPT_COMMENT || + style == SCE_ESCRIPT_COMMENTDOC || + style == SCE_ESCRIPT_COMMENTLINE; +} + +static void FoldESCRIPTDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) { + //~ bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldComment = true; + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + Sci_Position lastStart = 0; + char prevWord[32] = ""; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelCurrent++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + + if (foldComment && (style == SCE_ESCRIPT_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + + if (stylePrev == SCE_ESCRIPT_DEFAULT && style == SCE_ESCRIPT_WORD3) + { + // Store last word start point. + lastStart = i; + } + + if (style == SCE_ESCRIPT_WORD3) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[32]; + Sci_PositionU j; + for(j = 0; ( j < 31 ) && ( j < i-lastStart+1 ); j++) { + s[j] = static_cast(tolower(styler[lastStart + j])); + } + s[j] = '\0'; + levelCurrent += classifyFoldPointESCRIPT(s, prevWord); + strcpy(prevWord, s); + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + + if (!isspacechar(ch)) + visibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + + + +static const char * const ESCRIPTWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; + +LexerModule lmESCRIPT(SCLEX_ESCRIPT, ColouriseESCRIPTDoc, "escript", FoldESCRIPTDoc, ESCRIPTWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexEiffel.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexEiffel.cpp new file mode 100644 index 000000000..d1d42a960 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexEiffel.cpp @@ -0,0 +1,239 @@ +// Scintilla source code edit control +/** @file LexEiffel.cxx + ** Lexer for Eiffel. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool isEiffelOperator(unsigned int ch) { + // '.' left out as it is used to make up numbers + return ch == '*' || ch == '/' || ch == '\\' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || ch == '~' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' || ch == '^' || ch == '%' || ch == ':' || + ch == '!' || ch == '@' || ch == '?'; +} + +static inline bool IsAWordChar(unsigned int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(unsigned int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static void ColouriseEiffelDoc(Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_EIFFEL_STRINGEOL) { + if (sc.ch != '\r' && sc.ch != '\n') { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_OPERATOR) { + sc.SetState(SCE_EIFFEL_DEFAULT); + } else if (sc.state == SCE_EIFFEL_WORD) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (!keywords.InList(s)) { + sc.ChangeState(SCE_EIFFEL_IDENTIFIER); + } + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_COMMENTLINE) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_STRING) { + if (sc.ch == '%') { + sc.Forward(); + } else if (sc.ch == '\"') { + sc.Forward(); + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_CHARACTER) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_EIFFEL_STRINGEOL); + } else if (sc.ch == '%') { + sc.Forward(); + } else if (sc.ch == '\'') { + sc.Forward(); + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } + + if (sc.state == SCE_EIFFEL_DEFAULT) { + if (sc.ch == '-' && sc.chNext == '-') { + sc.SetState(SCE_EIFFEL_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_EIFFEL_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_EIFFEL_CHARACTER); + } else if (IsADigit(sc.ch) || (sc.ch == '.')) { + sc.SetState(SCE_EIFFEL_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_EIFFEL_WORD); + } else if (isEiffelOperator(sc.ch)) { + sc.SetState(SCE_EIFFEL_OPERATOR); + } + } + } + sc.Complete(); +} + +static bool IsEiffelComment(Accessor &styler, Sci_Position pos, Sci_Position len) { + return len>1 && styler[pos]=='-' && styler[pos+1]=='-'; +} + +static void FoldEiffelDocIndent(Sci_PositionU startPos, Sci_Position length, int, + WordList *[], Accessor &styler) { + Sci_Position lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + Sci_Position lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsEiffelComment); + char chNext = styler[startPos]; + for (Sci_Position i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsEiffelComment); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsEiffelComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + +static void FoldEiffelDocKeyWords(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], + Accessor &styler) { + Sci_PositionU lengthDoc = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int stylePrev = 0; + int styleNext = styler.StyleAt(startPos); + // lastDeferred should be determined by looking back to last keyword in case + // the "deferred" is on a line before "class" + bool lastDeferred = false; + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if ((stylePrev != SCE_EIFFEL_WORD) && (style == SCE_EIFFEL_WORD)) { + char s[20]; + Sci_PositionU j = 0; + while ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) { + s[j] = styler[i + j]; + j++; + } + s[j] = '\0'; + + if ( + (strcmp(s, "check") == 0) || + (strcmp(s, "debug") == 0) || + (strcmp(s, "deferred") == 0) || + (strcmp(s, "do") == 0) || + (strcmp(s, "from") == 0) || + (strcmp(s, "if") == 0) || + (strcmp(s, "inspect") == 0) || + (strcmp(s, "once") == 0) + ) + levelCurrent++; + if (!lastDeferred && (strcmp(s, "class") == 0)) + levelCurrent++; + if (strcmp(s, "end") == 0) + levelCurrent--; + lastDeferred = strcmp(s, "deferred") == 0; + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + stylePrev = style; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const eiffelWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmEiffel(SCLEX_EIFFEL, ColouriseEiffelDoc, "eiffel", FoldEiffelDocIndent, eiffelWordListDesc); +LexerModule lmEiffelkw(SCLEX_EIFFELKW, ColouriseEiffelDoc, "eiffelkw", FoldEiffelDocKeyWords, eiffelWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexErlang.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexErlang.cpp new file mode 100644 index 000000000..4ca5962c3 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexErlang.cpp @@ -0,0 +1,624 @@ +// Scintilla source code edit control +// Encoding: UTF-8 +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. +/** @file LexErlang.cxx + ** Lexer for Erlang. + ** Enhanced by Etienne 'Lenain' Girondel (lenaing@gmail.com) + ** Originally wrote by Peter-Henry Mander, + ** based on Matlab lexer by José Fonseca. + **/ + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static int is_radix(int radix, int ch) { + int digit; + + if (36 < radix || 2 > radix) + return 0; + + if (isdigit(ch)) { + digit = ch - '0'; + } else if (isalnum(ch)) { + digit = toupper(ch) - 'A' + 10; + } else { + return 0; + } + + return (digit < radix); +} + +typedef enum { + STATE_NULL, + COMMENT, + COMMENT_FUNCTION, + COMMENT_MODULE, + COMMENT_DOC, + COMMENT_DOC_MACRO, + ATOM_UNQUOTED, + ATOM_QUOTED, + NODE_NAME_UNQUOTED, + NODE_NAME_QUOTED, + MACRO_START, + MACRO_UNQUOTED, + MACRO_QUOTED, + RECORD_START, + RECORD_UNQUOTED, + RECORD_QUOTED, + NUMERAL_START, + NUMERAL_BASE_VALUE, + NUMERAL_FLOAT, + NUMERAL_EXPONENT, + PREPROCESSOR +} atom_parse_state_t; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (ch != ' ') && (isalnum(ch) || ch == '_'); +} + +static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + StyleContext sc(startPos, length, initStyle, styler); + WordList &reservedWords = *keywordlists[0]; + WordList &erlangBIFs = *keywordlists[1]; + WordList &erlangPreproc = *keywordlists[2]; + WordList &erlangModulesAtt = *keywordlists[3]; + WordList &erlangDoc = *keywordlists[4]; + WordList &erlangDocMacro = *keywordlists[5]; + int radix_digits = 0; + int exponent_digits = 0; + atom_parse_state_t parse_state = STATE_NULL; + atom_parse_state_t old_parse_state = STATE_NULL; + bool to_late_to_comment = false; + char cur[100]; + int old_style = SCE_ERLANG_DEFAULT; + + styler.StartAt(startPos); + + for (; sc.More(); sc.Forward()) { + int style = SCE_ERLANG_DEFAULT; + if (STATE_NULL != parse_state) { + + switch (parse_state) { + + case STATE_NULL : sc.SetState(SCE_ERLANG_DEFAULT); break; + + /* COMMENTS ------------------------------------------------------*/ + case COMMENT : { + if (sc.ch != '%') { + to_late_to_comment = true; + } else if (!to_late_to_comment && sc.ch == '%') { + // Switch to comment level 2 (Function) + sc.ChangeState(SCE_ERLANG_COMMENT_FUNCTION); + old_style = SCE_ERLANG_COMMENT_FUNCTION; + parse_state = COMMENT_FUNCTION; + sc.Forward(); + } + } + // V--- Falling through! + // Falls through. + case COMMENT_FUNCTION : { + if (sc.ch != '%') { + to_late_to_comment = true; + } else if (!to_late_to_comment && sc.ch == '%') { + // Switch to comment level 3 (Module) + sc.ChangeState(SCE_ERLANG_COMMENT_MODULE); + old_style = SCE_ERLANG_COMMENT_MODULE; + parse_state = COMMENT_MODULE; + sc.Forward(); + } + } + // V--- Falling through! + // Falls through. + case COMMENT_MODULE : { + if (parse_state != COMMENT) { + // Search for comment documentation + if (sc.chNext == '@') { + old_parse_state = parse_state; + parse_state = ('{' == sc.ch) + ? COMMENT_DOC_MACRO + : COMMENT_DOC; + sc.ForwardSetState(sc.state); + } + } + + // All comments types fall here. + if (sc.atLineEnd) { + to_late_to_comment = false; + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + case COMMENT_DOC : + // V--- Falling through! + case COMMENT_DOC_MACRO : { + + if (!isalnum(sc.ch)) { + // Try to match documentation comment + sc.GetCurrent(cur, sizeof(cur)); + + if (parse_state == COMMENT_DOC_MACRO + && erlangDocMacro.InList(cur)) { + sc.ChangeState(SCE_ERLANG_COMMENT_DOC_MACRO); + while (sc.ch != '}' && !sc.atLineEnd) + sc.Forward(); + } else if (erlangDoc.InList(cur)) { + sc.ChangeState(SCE_ERLANG_COMMENT_DOC); + } else { + sc.ChangeState(old_style); + } + + // Switch back to old state + sc.SetState(old_style); + parse_state = old_parse_state; + } + + if (sc.atLineEnd) { + to_late_to_comment = false; + sc.ChangeState(old_style); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* -------------------------------------------------------------- */ + /* Atoms ---------------------------------------------------------*/ + case ATOM_UNQUOTED : { + if ('@' == sc.ch){ + parse_state = NODE_NAME_UNQUOTED; + } else if (sc.ch == ':') { + // Searching for module name + if (sc.chNext == ' ') { + // error + sc.ChangeState(SCE_ERLANG_UNKNOWN); + parse_state = STATE_NULL; + } else { + sc.Forward(); + if (isalnum(sc.ch)) { + sc.GetCurrent(cur, sizeof(cur)); + sc.ChangeState(SCE_ERLANG_MODULES); + sc.SetState(SCE_ERLANG_MODULES); + } + } + } else if (!IsAWordChar(sc.ch)) { + + sc.GetCurrent(cur, sizeof(cur)); + if (reservedWords.InList(cur)) { + style = SCE_ERLANG_KEYWORD; + } else if (erlangBIFs.InList(cur) + && strcmp(cur,"erlang:")){ + style = SCE_ERLANG_BIFS; + } else if (sc.ch == '(' || '/' == sc.ch){ + style = SCE_ERLANG_FUNCTION_NAME; + } else { + style = SCE_ERLANG_ATOM; + } + + sc.ChangeState(style); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + + } break; + + case ATOM_QUOTED : { + if ( '@' == sc.ch ){ + parse_state = NODE_NAME_QUOTED; + } else if ('\'' == sc.ch && '\\' != sc.chPrev) { + sc.ChangeState(SCE_ERLANG_ATOM); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* -------------------------------------------------------------- */ + /* Node names ----------------------------------------------------*/ + case NODE_NAME_UNQUOTED : { + if ('@' == sc.ch) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if (!IsAWordChar(sc.ch)) { + sc.ChangeState(SCE_ERLANG_NODE_NAME); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + case NODE_NAME_QUOTED : { + if ('@' == sc.ch) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ('\'' == sc.ch && '\\' != sc.chPrev) { + sc.ChangeState(SCE_ERLANG_NODE_NAME_QUOTED); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* -------------------------------------------------------------- */ + /* Records -------------------------------------------------------*/ + case RECORD_START : { + if ('\'' == sc.ch) { + parse_state = RECORD_QUOTED; + } else if (isalpha(sc.ch) && islower(sc.ch)) { + parse_state = RECORD_UNQUOTED; + } else { // error + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + case RECORD_UNQUOTED : { + if (!IsAWordChar(sc.ch)) { + sc.ChangeState(SCE_ERLANG_RECORD); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + case RECORD_QUOTED : { + if ('\'' == sc.ch && '\\' != sc.chPrev) { + sc.ChangeState(SCE_ERLANG_RECORD_QUOTED); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* -------------------------------------------------------------- */ + /* Macros --------------------------------------------------------*/ + case MACRO_START : { + if ('\'' == sc.ch) { + parse_state = MACRO_QUOTED; + } else if (isalpha(sc.ch)) { + parse_state = MACRO_UNQUOTED; + } else { // error + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + case MACRO_UNQUOTED : { + if (!IsAWordChar(sc.ch)) { + sc.ChangeState(SCE_ERLANG_MACRO); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + case MACRO_QUOTED : { + if ('\'' == sc.ch && '\\' != sc.chPrev) { + sc.ChangeState(SCE_ERLANG_MACRO_QUOTED); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* -------------------------------------------------------------- */ + /* Numerics ------------------------------------------------------*/ + /* Simple integer */ + case NUMERAL_START : { + if (isdigit(sc.ch)) { + radix_digits *= 10; + radix_digits += sc.ch - '0'; // Assuming ASCII here! + } else if ('#' == sc.ch) { + if (2 > radix_digits || 36 < radix_digits) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + parse_state = NUMERAL_BASE_VALUE; + } + } else if ('.' == sc.ch && isdigit(sc.chNext)) { + radix_digits = 0; + parse_state = NUMERAL_FLOAT; + } else if ('e' == sc.ch || 'E' == sc.ch) { + exponent_digits = 0; + parse_state = NUMERAL_EXPONENT; + } else { + radix_digits = 0; + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* Integer in other base than 10 (x#yyy) */ + case NUMERAL_BASE_VALUE : { + if (!is_radix(radix_digits,sc.ch)) { + radix_digits = 0; + + if (!isalnum(sc.ch)) + sc.ChangeState(SCE_ERLANG_NUMBER); + + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* Float (x.yyy) */ + case NUMERAL_FLOAT : { + if ('e' == sc.ch || 'E' == sc.ch) { + exponent_digits = 0; + parse_state = NUMERAL_EXPONENT; + } else if (!isdigit(sc.ch)) { + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + /* Exponent, either integer or float (xEyy, x.yyEzzz) */ + case NUMERAL_EXPONENT : { + if (('-' == sc.ch || '+' == sc.ch) + && (isdigit(sc.chNext))) { + sc.Forward(); + } else if (!isdigit(sc.ch)) { + if (0 < exponent_digits) + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + ++exponent_digits; + } + } break; + + /* -------------------------------------------------------------- */ + /* Preprocessor --------------------------------------------------*/ + case PREPROCESSOR : { + if (!IsAWordChar(sc.ch)) { + + sc.GetCurrent(cur, sizeof(cur)); + if (erlangPreproc.InList(cur)) { + style = SCE_ERLANG_PREPROC; + } else if (erlangModulesAtt.InList(cur)) { + style = SCE_ERLANG_MODULES_ATT; + } + + sc.ChangeState(style); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } break; + + } + + } /* End of : STATE_NULL != parse_state */ + else + { + switch (sc.state) { + case SCE_ERLANG_VARIABLE : { + if (!IsAWordChar(sc.ch)) + sc.SetState(SCE_ERLANG_DEFAULT); + } break; + case SCE_ERLANG_STRING : { + if (sc.ch == '\"' && sc.chPrev != '\\') + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } break; + case SCE_ERLANG_COMMENT : { + if (sc.atLineEnd) + sc.SetState(SCE_ERLANG_DEFAULT); + } break; + case SCE_ERLANG_CHARACTER : { + if (sc.chPrev == '\\') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else if (sc.ch != '\\') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } + } break; + case SCE_ERLANG_OPERATOR : { + if (sc.chPrev == '.') { + if (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\' + || sc.ch == '^') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } break; + } + } + + if (sc.state == SCE_ERLANG_DEFAULT) { + bool no_new_state = false; + + switch (sc.ch) { + case '\"' : sc.SetState(SCE_ERLANG_STRING); break; + case '$' : sc.SetState(SCE_ERLANG_CHARACTER); break; + case '%' : { + parse_state = COMMENT; + sc.SetState(SCE_ERLANG_COMMENT); + } break; + case '#' : { + parse_state = RECORD_START; + sc.SetState(SCE_ERLANG_UNKNOWN); + } break; + case '?' : { + parse_state = MACRO_START; + sc.SetState(SCE_ERLANG_UNKNOWN); + } break; + case '\'' : { + parse_state = ATOM_QUOTED; + sc.SetState(SCE_ERLANG_UNKNOWN); + } break; + case '+' : + case '-' : { + if (IsADigit(sc.chNext)) { + parse_state = NUMERAL_START; + radix_digits = 0; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (sc.ch != '+') { + parse_state = PREPROCESSOR; + sc.SetState(SCE_ERLANG_UNKNOWN); + } + } break; + default : no_new_state = true; + } + + if (no_new_state) { + if (isdigit(sc.ch)) { + parse_state = NUMERAL_START; + radix_digits = sc.ch - '0'; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (isupper(sc.ch) || '_' == sc.ch) { + sc.SetState(SCE_ERLANG_VARIABLE); + } else if (isalpha(sc.ch)) { + parse_state = ATOM_UNQUOTED; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (isoperator(static_cast(sc.ch)) + || sc.ch == '\\') { + sc.SetState(SCE_ERLANG_OPERATOR); + } + } + } + + } + sc.Complete(); +} + +static int ClassifyErlangFoldPoint( + Accessor &styler, + int styleNext, + Sci_Position keyword_start +) { + int lev = 0; + if (styler.Match(keyword_start,"case") + || ( + styler.Match(keyword_start,"fun") + && (SCE_ERLANG_FUNCTION_NAME != styleNext) + ) + || styler.Match(keyword_start,"if") + || styler.Match(keyword_start,"query") + || styler.Match(keyword_start,"receive") + ) { + ++lev; + } else if (styler.Match(keyword_start,"end")) { + --lev; + } + + return lev; +} + +static void FoldErlangDoc( + Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList** /*keywordlists*/, Accessor &styler +) { + Sci_PositionU endPos = startPos + length; + Sci_Position currentLine = styler.GetLine(startPos); + int lev; + int previousLevel = styler.LevelAt(currentLine) & SC_FOLDLEVELNUMBERMASK; + int currentLevel = previousLevel; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + int stylePrev; + Sci_Position keyword_start = 0; + char ch; + char chNext = styler.SafeGetCharAt(startPos); + bool atEOL; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + // Get styles + stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + atEOL = ((ch == '\r') && (chNext != '\n')) || (ch == '\n'); + + if (stylePrev != SCE_ERLANG_KEYWORD + && style == SCE_ERLANG_KEYWORD) { + keyword_start = i; + } + + // Fold on keywords + if (stylePrev == SCE_ERLANG_KEYWORD + && style != SCE_ERLANG_KEYWORD + && style != SCE_ERLANG_ATOM + ) { + currentLevel += ClassifyErlangFoldPoint(styler, + styleNext, + keyword_start); + } + + // Fold on comments + if (style == SCE_ERLANG_COMMENT + || style == SCE_ERLANG_COMMENT_MODULE + || style == SCE_ERLANG_COMMENT_FUNCTION) { + + if (ch == '%' && chNext == '{') { + currentLevel++; + } else if (ch == '%' && chNext == '}') { + currentLevel--; + } + } + + // Fold on braces + if (style == SCE_ERLANG_OPERATOR) { + if (ch == '{' || ch == '(' || ch == '[') { + currentLevel++; + } else if (ch == '}' || ch == ')' || ch == ']') { + currentLevel--; + } + } + + + if (atEOL) { + lev = previousLevel; + + if (currentLevel > previousLevel) + lev |= SC_FOLDLEVELHEADERFLAG; + + if (lev != styler.LevelAt(currentLine)) + styler.SetLevel(currentLine, lev); + + currentLine++; + previousLevel = currentLevel; + } + + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + styler.SetLevel(currentLine, + previousLevel + | (styler.LevelAt(currentLine) & ~SC_FOLDLEVELNUMBERMASK)); +} + +static const char * const erlangWordListDesc[] = { + "Erlang Reserved words", + "Erlang BIFs", + "Erlang Preprocessor", + "Erlang Module Attributes", + "Erlang Documentation", + "Erlang Documentation Macro", + 0 +}; + +LexerModule lmErlang( + SCLEX_ERLANG, + ColouriseErlangDoc, + "erlang", + FoldErlangDoc, + erlangWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexErrorList.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexErrorList.cpp new file mode 100644 index 000000000..b3dcd2a59 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexErrorList.cpp @@ -0,0 +1,393 @@ +// Scintilla source code edit control +/** @file LexErrorList.cxx + ** Lexer for error lists. Used for the output pane in SciTE. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static bool strstart(const char *haystack, const char *needle) { + return strncmp(haystack, needle, strlen(needle)) == 0; +} + +static bool Is0To9(char ch) { + return (ch >= '0') && (ch <= '9'); +} + +static bool Is1To9(char ch) { + return (ch >= '1') && (ch <= '9'); +} + +static bool IsAlphabetic(int ch) { + return IsASCII(ch) && isalpha(ch); +} + +static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { + return (styler[i] == '\n') || + ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); +} + +static int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci_Position &startValue) { + if (lineBuffer[0] == '>') { + // Command or return status + return SCE_ERR_CMD; + } else if (lineBuffer[0] == '<') { + // Diff removal. + return SCE_ERR_DIFF_DELETION; + } else if (lineBuffer[0] == '!') { + return SCE_ERR_DIFF_CHANGED; + } else if (lineBuffer[0] == '+') { + if (strstart(lineBuffer, "+++ ")) { + return SCE_ERR_DIFF_MESSAGE; + } else { + return SCE_ERR_DIFF_ADDITION; + } + } else if (lineBuffer[0] == '-') { + if (strstart(lineBuffer, "--- ")) { + return SCE_ERR_DIFF_MESSAGE; + } else { + return SCE_ERR_DIFF_DELETION; + } + } else if (strstart(lineBuffer, "cf90-")) { + // Absoft Pro Fortran 90/95 v8.2 error and/or warning message + return SCE_ERR_ABSF; + } else if (strstart(lineBuffer, "fortcom:")) { + // Intel Fortran Compiler v8.0 error/warning message + return SCE_ERR_IFORT; + } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { + return SCE_ERR_PYTHON; + } else if (strstr(lineBuffer, " in ") && strstr(lineBuffer, " on line ")) { + return SCE_ERR_PHP; + } else if ((strstart(lineBuffer, "Error ") || + strstart(lineBuffer, "Warning ")) && + strstr(lineBuffer, " at (") && + strstr(lineBuffer, ") : ") && + (strstr(lineBuffer, " at (") < strstr(lineBuffer, ") : "))) { + // Intel Fortran Compiler error/warning message + return SCE_ERR_IFC; + } else if (strstart(lineBuffer, "Error ")) { + // Borland error message + return SCE_ERR_BORLAND; + } else if (strstart(lineBuffer, "Warning ")) { + // Borland warning message + return SCE_ERR_BORLAND; + } else if (strstr(lineBuffer, "at line ") && + (strstr(lineBuffer, "at line ") < (lineBuffer + lengthLine)) && + strstr(lineBuffer, "file ") && + (strstr(lineBuffer, "file ") < (lineBuffer + lengthLine))) { + // Lua 4 error message + return SCE_ERR_LUA; + } else if (strstr(lineBuffer, " at ") && + (strstr(lineBuffer, " at ") < (lineBuffer + lengthLine)) && + strstr(lineBuffer, " line ") && + (strstr(lineBuffer, " line ") < (lineBuffer + lengthLine)) && + (strstr(lineBuffer, " at ") + 4 < (strstr(lineBuffer, " line ")))) { + // perl error message: + // at line + return SCE_ERR_PERL; + } else if ((lengthLine >= 6) && + (memcmp(lineBuffer, " at ", 6) == 0) && + strstr(lineBuffer, ":line ")) { + // A .NET traceback + return SCE_ERR_NET; + } else if (strstart(lineBuffer, "Line ") && + strstr(lineBuffer, ", file ")) { + // Essential Lahey Fortran error message + return SCE_ERR_ELF; + } else if (strstart(lineBuffer, "line ") && + strstr(lineBuffer, " column ")) { + // HTML tidy style: line 42 column 1 + return SCE_ERR_TIDY; + } else if (strstart(lineBuffer, "\tat ") && + strstr(lineBuffer, "(") && + strstr(lineBuffer, ".java:")) { + // Java stack back trace + return SCE_ERR_JAVA_STACK; + } else if (strstart(lineBuffer, "In file included from ") || + strstart(lineBuffer, " from ")) { + // GCC showing include path to following error + return SCE_ERR_GCC_INCLUDED_FROM; + } else if (strstr(lineBuffer, "warning LNK")) { + // Microsoft linker warning: + // { : } warning LNK9999 + return SCE_ERR_MS; + } else { + // Look for one of the following formats: + // GCC: :: + // Microsoft: () : + // Common: (): warning|error|note|remark|catastrophic|fatal + // Common: () warning|error|note|remark|catastrophic|fatal + // Microsoft: (,) + // CTags: \t\t + // Lua 5 traceback: \t:: + // Lua 5.1: : :: + const bool initialTab = (lineBuffer[0] == '\t'); + bool initialColonPart = false; + bool canBeCtags = !initialTab; // For ctags must have an identifier with no spaces then a tab + enum { stInitial, + stGccStart, stGccDigit, stGccColumn, stGcc, + stMsStart, stMsDigit, stMsBracket, stMsVc, stMsDigitComma, stMsDotNet, + stCtagsStart, stCtagsFile, stCtagsStartString, stCtagsStringDollar, stCtags, + stUnrecognized + } state = stInitial; + for (Sci_PositionU i = 0; i < lengthLine; i++) { + const char ch = lineBuffer[i]; + char chNext = ' '; + if ((i + 1) < lengthLine) + chNext = lineBuffer[i + 1]; + if (state == stInitial) { + if (ch == ':') { + // May be GCC, or might be Lua 5 (Lua traceback same but with tab prefix) + if ((chNext != '\\') && (chNext != '/') && (chNext != ' ')) { + // This check is not completely accurate as may be on + // GTK+ with a file name that includes ':'. + state = stGccStart; + } else if (chNext == ' ') { // indicates a Lua 5.1 error message + initialColonPart = true; + } + } else if ((ch == '(') && Is1To9(chNext) && (!initialTab)) { + // May be Microsoft + // Check against '0' often removes phone numbers + state = stMsStart; + } else if ((ch == '\t') && canBeCtags) { + // May be CTags + state = stCtagsStart; + } else if (ch == ' ') { + canBeCtags = false; + } + } else if (state == stGccStart) { // : + state = Is0To9(ch) ? stGccDigit : stUnrecognized; + } else if (state == stGccDigit) { // : + if (ch == ':') { + state = stGccColumn; // :9.*: is GCC + startValue = i + 1; + } else if (!Is0To9(ch)) { + state = stUnrecognized; + } + } else if (state == stGccColumn) { // :: + if (!Is0To9(ch)) { + state = stGcc; + if (ch == ':') + startValue = i + 1; + break; + } + } else if (state == stMsStart) { // ( + state = Is0To9(ch) ? stMsDigit : stUnrecognized; + } else if (state == stMsDigit) { // ( + if (ch == ',') { + state = stMsDigitComma; + } else if (ch == ')') { + state = stMsBracket; + } else if ((ch != ' ') && !Is0To9(ch)) { + state = stUnrecognized; + } + } else if (state == stMsBracket) { // () + if ((ch == ' ') && (chNext == ':')) { + state = stMsVc; + } else if ((ch == ':' && chNext == ' ') || (ch == ' ')) { + // Possibly Delphi.. don't test against chNext as it's one of the strings below. + char word[512]; + Sci_PositionU j, chPos; + unsigned numstep; + chPos = 0; + if (ch == ' ') + numstep = 1; // ch was ' ', handle as if it's a delphi errorline, only add 1 to i. + else + numstep = 2; // otherwise add 2. + for (j = i + numstep; j < lengthLine && IsAlphabetic(lineBuffer[j]) && chPos < sizeof(word) - 1; j++) + word[chPos++] = lineBuffer[j]; + word[chPos] = 0; + if (!CompareCaseInsensitive(word, "error") || !CompareCaseInsensitive(word, "warning") || + !CompareCaseInsensitive(word, "fatal") || !CompareCaseInsensitive(word, "catastrophic") || + !CompareCaseInsensitive(word, "note") || !CompareCaseInsensitive(word, "remark")) { + state = stMsVc; + } else { + state = stUnrecognized; + } + } else { + state = stUnrecognized; + } + } else if (state == stMsDigitComma) { // (, + if (ch == ')') { + state = stMsDotNet; + break; + } else if ((ch != ' ') && !Is0To9(ch)) { + state = stUnrecognized; + } + } else if (state == stCtagsStart) { + if (ch == '\t') { + state = stCtagsFile; + } + } else if (state == stCtagsFile) { + if ((lineBuffer[i - 1] == '\t') && + ((ch == '/' && chNext == '^') || Is0To9(ch))) { + state = stCtags; + break; + } else if ((ch == '/') && (chNext == '^')) { + state = stCtagsStartString; + } + } else if ((state == stCtagsStartString) && ((lineBuffer[i] == '$') && (lineBuffer[i + 1] == '/'))) { + state = stCtagsStringDollar; + break; + } + } + if (state == stGcc) { + return initialColonPart ? SCE_ERR_LUA : SCE_ERR_GCC; + } else if ((state == stMsVc) || (state == stMsDotNet)) { + return SCE_ERR_MS; + } else if ((state == stCtagsStringDollar) || (state == stCtags)) { + return SCE_ERR_CTAG; + } else if (initialColonPart && strstr(lineBuffer, ": warning C")) { + // Microsoft warning without line number + // : warning C9999 + return SCE_ERR_MS; + } else { + return SCE_ERR_DEFAULT; + } + } +} + +#define CSI "\033[" + +namespace { + +bool SequenceEnd(int ch) { + return (ch == 0) || ((ch >= '@') && (ch <= '~')); +} + +int StyleFromSequence(const char *seq) { + int bold = 0; + int colour = 0; + while (!SequenceEnd(*seq)) { + if (Is0To9(*seq)) { + int base = *seq - '0'; + if (Is0To9(seq[1])) { + base = base * 10; + base += seq[1] - '0'; + seq++; + } + if (base == 0) { + colour = 0; + bold = 0; + } + else if (base == 1) { + bold = 1; + } + else if (base >= 30 && base <= 37) { + colour = base - 30; + } + } + seq++; + } + return SCE_ERR_ES_BLACK + bold * 8 + colour; +} + +} + +static void ColouriseErrorListLine( + char *lineBuffer, + Sci_PositionU lengthLine, + Sci_PositionU endPos, + Accessor &styler, + bool valueSeparate, + bool escapeSequences) { + Sci_Position startValue = -1; + int style = RecogniseErrorListLine(lineBuffer, lengthLine, startValue); + if (escapeSequences && strstr(lineBuffer, CSI)) { + const Sci_Position startPos = endPos - lengthLine; + const char *linePortion = lineBuffer; + Sci_Position startPortion = startPos; + int portionStyle = style; + while (const char *startSeq = strstr(linePortion, CSI)) { + if (startSeq > linePortion) { + styler.ColourTo(startPortion + static_cast(startSeq - linePortion), portionStyle); + } + const char *endSeq = startSeq + 2; + while (!SequenceEnd(*endSeq)) + endSeq++; + const Sci_Position endSeqPosition = startPortion + static_cast(endSeq - linePortion) + 1; + switch (*endSeq) { + case 0: + styler.ColourTo(endPos, SCE_ERR_ESCSEQ_UNKNOWN); + return; + case 'm': // Colour command + styler.ColourTo(endSeqPosition, SCE_ERR_ESCSEQ); + portionStyle = StyleFromSequence(startSeq+2); + break; + case 'K': // Erase to end of line -> ignore + styler.ColourTo(endSeqPosition, SCE_ERR_ESCSEQ); + break; + default: + styler.ColourTo(endSeqPosition, SCE_ERR_ESCSEQ_UNKNOWN); + portionStyle = style; + } + startPortion = endSeqPosition; + linePortion = endSeq + 1; + } + styler.ColourTo(endPos, portionStyle); + } else { + if (valueSeparate && (startValue >= 0)) { + styler.ColourTo(endPos - (lengthLine - startValue), style); + styler.ColourTo(endPos, SCE_ERR_VALUE); + } else { + styler.ColourTo(endPos, style); + } + } +} + +static void ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { + char lineBuffer[10000]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + Sci_PositionU linePos = 0; + + // property lexer.errorlist.value.separate + // For lines in the output pane that are matches from Find in Files or GCC-style + // diagnostics, style the path and line number separately from the rest of the + // line with style 21 used for the rest of the line. + // This allows matched text to be more easily distinguished from its location. + const bool valueSeparate = styler.GetPropertyInt("lexer.errorlist.value.separate", 0) != 0; + + // property lexer.errorlist.escape.sequences + // Set to 1 to interpret escape sequences. + const bool escapeSequences = styler.GetPropertyInt("lexer.errorlist.escape.sequences") != 0; + + for (Sci_PositionU i = startPos; i < startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { + // End of line (or of line buffer) met, colourise it + lineBuffer[linePos] = '\0'; + ColouriseErrorListLine(lineBuffer, linePos, i, styler, valueSeparate, escapeSequences); + linePos = 0; + } + } + if (linePos > 0) { // Last line does not have ending characters + lineBuffer[linePos] = '\0'; + ColouriseErrorListLine(lineBuffer, linePos, startPos + length - 1, styler, valueSeparate, escapeSequences); + } +} + +static const char *const emptyWordListDesc[] = { + 0 +}; + +LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, "errorlist", 0, emptyWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexFlagship.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexFlagship.cpp new file mode 100644 index 000000000..b73c1aa1e --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexFlagship.cpp @@ -0,0 +1,352 @@ +// Scintilla source code edit control +/** @file LexFlagShip.cxx + ** Lexer for Harbour and FlagShip. + ** (Syntactically compatible to other xBase dialects, like Clipper, dBase, Clip, FoxPro etc.) + **/ +// Copyright 2005 by Randy Butler +// Copyright 2010 by Xavi (Harbour) +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +// Extended to accept accented characters +static inline bool IsAWordChar(int ch) +{ + return ch >= 0x80 || + (isalnum(ch) || ch == '_'); +} + +static void ColouriseFlagShipDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) +{ + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + + // property lexer.flagship.styling.within.preprocessor + // For Harbour code, determines whether all preprocessor code is styled in the preprocessor style (0) or only from the + // initial # to the end of the command word(1, the default). It also determines how to present text, dump, and disabled code. + bool stylingWithinPreprocessor = styler.GetPropertyInt("lexer.flagship.styling.within.preprocessor", 1) != 0; + + CharacterSet setDoxygen(CharacterSet::setAlpha, "$@\\&<>#{}[]"); + + int visibleChars = 0; + int closeStringChar = 0; + int styleBeforeDCKeyword = SCE_FS_DEFAULT; + bool bEnableCode = initStyle < SCE_FS_DISABLEDCODE; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_FS_OPERATOR: + case SCE_FS_OPERATOR_C: + case SCE_FS_WORDOPERATOR: + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + break; + case SCE_FS_IDENTIFIER: + case SCE_FS_IDENTIFIER_C: + if (!IsAWordChar(sc.ch)) { + char s[64]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(bEnableCode ? SCE_FS_KEYWORD : SCE_FS_KEYWORD_C); + } else if (keywords2.InList(s)) { + sc.ChangeState(bEnableCode ? SCE_FS_KEYWORD2 : SCE_FS_KEYWORD2_C); + } else if (bEnableCode && keywords3.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD3); + } else if (bEnableCode && keywords4.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD4); + }// Else, it is really an identifier... + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } + break; + case SCE_FS_NUMBER: + if (!IsAWordChar(sc.ch) && !(sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_FS_DEFAULT); + } + break; + case SCE_FS_NUMBER_C: + if (!IsAWordChar(sc.ch) && sc.ch != '.') { + sc.SetState(SCE_FS_DEFAULT_C); + } + break; + case SCE_FS_CONSTANT: + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_FS_DEFAULT); + } + break; + case SCE_FS_STRING: + case SCE_FS_STRING_C: + if (sc.ch == closeStringChar) { + sc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } else if (sc.atLineEnd) { + sc.ChangeState(bEnableCode ? SCE_FS_STRINGEOL : SCE_FS_STRINGEOL_C); + } + break; + case SCE_FS_STRINGEOL: + case SCE_FS_STRINGEOL_C: + if (sc.atLineStart) { + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } + break; + case SCE_FS_COMMENTDOC: + case SCE_FS_COMMENTDOC_C: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = bEnableCode ? SCE_FS_COMMENTDOC : SCE_FS_COMMENTDOC_C; + sc.SetState(SCE_FS_COMMENTDOCKEYWORD); + } + } + break; + case SCE_FS_COMMENT: + case SCE_FS_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_FS_DEFAULT); + } + break; + case SCE_FS_COMMENTLINEDOC: + case SCE_FS_COMMENTLINEDOC_C: + if (sc.atLineStart) { + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = bEnableCode ? SCE_FS_COMMENTLINEDOC : SCE_FS_COMMENTLINEDOC_C; + sc.SetState(SCE_FS_COMMENTDOCKEYWORD); + } + } + break; + case SCE_FS_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_FS_COMMENTDOC || styleBeforeDCKeyword == SCE_FS_COMMENTDOC_C) && + sc.Match('*', '/')) { + sc.ChangeState(SCE_FS_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } else if (!setDoxygen.Contains(sc.ch)) { + char s[64]; + sc.GetCurrentLowered(s, sizeof(s)); + if (!IsASpace(sc.ch) || !keywords5.InList(s + 1)) { + sc.ChangeState(SCE_FS_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_FS_PREPROCESSOR: + case SCE_FS_PREPROCESSOR_C: + if (sc.atLineEnd) { + if (!(sc.chPrev == ';' || sc.GetRelative(-2) == ';')) { + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } + } else if (stylingWithinPreprocessor) { + if (IsASpaceOrTab(sc.ch)) { + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } + } else if (sc.Match('/', '*') || sc.Match('/', '/') || sc.Match('&', '&')) { + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } + break; + case SCE_FS_DISABLEDCODE: + if (sc.ch == '#' && visibleChars == 0) { + sc.SetState(bEnableCode ? SCE_FS_PREPROCESSOR : SCE_FS_PREPROCESSOR_C); + do { // Skip whitespace between # and preprocessor word + sc.Forward(); + } while (IsASpaceOrTab(sc.ch) && sc.More()); + if (sc.MatchIgnoreCase("pragma")) { + sc.Forward(6); + do { // Skip more whitespace until keyword + sc.Forward(); + } while (IsASpaceOrTab(sc.ch) && sc.More()); + if (sc.MatchIgnoreCase("enddump") || sc.MatchIgnoreCase("__endtext")) { + bEnableCode = true; + sc.SetState(SCE_FS_DISABLEDCODE); + sc.Forward(sc.ch == '_' ? 8 : 6); + sc.ForwardSetState(SCE_FS_DEFAULT); + } else { + sc.ChangeState(SCE_FS_DISABLEDCODE); + } + } else { + sc.ChangeState(SCE_FS_DISABLEDCODE); + } + } + break; + case SCE_FS_DATE: + if (sc.ch == '}') { + sc.ForwardSetState(SCE_FS_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_FS_STRINGEOL); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_FS_DEFAULT || sc.state == SCE_FS_DEFAULT_C) { + if (bEnableCode && + (sc.MatchIgnoreCase(".and.") || sc.MatchIgnoreCase(".not."))) { + sc.SetState(SCE_FS_WORDOPERATOR); + sc.Forward(4); + } else if (bEnableCode && sc.MatchIgnoreCase(".or.")) { + sc.SetState(SCE_FS_WORDOPERATOR); + sc.Forward(3); + } else if (bEnableCode && + (sc.MatchIgnoreCase(".t.") || sc.MatchIgnoreCase(".f.") || + (!IsAWordChar(sc.GetRelative(3)) && sc.MatchIgnoreCase("nil")))) { + sc.SetState(SCE_FS_CONSTANT); + sc.Forward(2); + } else if (sc.Match('/', '*')) { + sc.SetState(bEnableCode ? SCE_FS_COMMENTDOC : SCE_FS_COMMENTDOC_C); + sc.Forward(); + } else if (bEnableCode && sc.Match('&', '&')) { + sc.SetState(SCE_FS_COMMENTLINE); + sc.Forward(); + } else if (sc.Match('/', '/')) { + sc.SetState(bEnableCode ? SCE_FS_COMMENTLINEDOC : SCE_FS_COMMENTLINEDOC_C); + sc.Forward(); + } else if (bEnableCode && sc.ch == '*' && visibleChars == 0) { + sc.SetState(SCE_FS_COMMENT); + } else if (sc.ch == '\"' || sc.ch == '\'') { + sc.SetState(bEnableCode ? SCE_FS_STRING : SCE_FS_STRING_C); + closeStringChar = sc.ch; + } else if (closeStringChar == '>' && sc.ch == '<') { + sc.SetState(bEnableCode ? SCE_FS_STRING : SCE_FS_STRING_C); + } else if (sc.ch == '#' && visibleChars == 0) { + sc.SetState(bEnableCode ? SCE_FS_PREPROCESSOR : SCE_FS_PREPROCESSOR_C); + do { // Skip whitespace between # and preprocessor word + sc.Forward(); + } while (IsASpaceOrTab(sc.ch) && sc.More()); + if (sc.atLineEnd) { + sc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C); + } else if (sc.MatchIgnoreCase("include")) { + if (stylingWithinPreprocessor) { + closeStringChar = '>'; + } + } else if (sc.MatchIgnoreCase("pragma")) { + sc.Forward(6); + do { // Skip more whitespace until keyword + sc.Forward(); + } while (IsASpaceOrTab(sc.ch) && sc.More()); + if (sc.MatchIgnoreCase("begindump") || sc.MatchIgnoreCase("__cstream")) { + bEnableCode = false; + if (stylingWithinPreprocessor) { + sc.SetState(SCE_FS_DISABLEDCODE); + sc.Forward(8); + sc.ForwardSetState(SCE_FS_DEFAULT_C); + } else { + sc.SetState(SCE_FS_DISABLEDCODE); + } + } else if (sc.MatchIgnoreCase("enddump") || sc.MatchIgnoreCase("__endtext")) { + bEnableCode = true; + sc.SetState(SCE_FS_DISABLEDCODE); + sc.Forward(sc.ch == '_' ? 8 : 6); + sc.ForwardSetState(SCE_FS_DEFAULT); + } + } + } else if (bEnableCode && sc.ch == '{') { + Sci_Position p = 0; + int chSeek; + Sci_PositionU endPos(startPos + length); + do { // Skip whitespace + chSeek = sc.GetRelative(++p); + } while (IsASpaceOrTab(chSeek) && (sc.currentPos + p < endPos)); + if (chSeek == '^') { + sc.SetState(SCE_FS_DATE); + } else { + sc.SetState(SCE_FS_OPERATOR); + } + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(bEnableCode ? SCE_FS_NUMBER : SCE_FS_NUMBER_C); + } else if (IsAWordChar(sc.ch)) { + sc.SetState(bEnableCode ? SCE_FS_IDENTIFIER : SCE_FS_IDENTIFIER_C); + } else if (isoperator(static_cast(sc.ch)) || (bEnableCode && sc.ch == '@')) { + sc.SetState(bEnableCode ? SCE_FS_OPERATOR : SCE_FS_OPERATOR_C); + } + } + + if (sc.atLineEnd) { + visibleChars = 0; + closeStringChar = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldFlagShipDoc(Sci_PositionU startPos, Sci_Position length, int, + WordList *[], Accessor &styler) +{ + + Sci_Position endPos = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + Sci_Position lineCurrent = styler.GetLine(startPos); + if (startPos > 0 && lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags); + char chNext = styler[startPos]; + for (Sci_Position i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos-1)) { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + +static const char * const FSWordListDesc[] = { + "Keywords Commands", + "Std Library Functions", + "Procedure, return, exit", + "Class (oop)", + "Doxygen keywords", + 0 +}; + +LexerModule lmFlagShip(SCLEX_FLAGSHIP, ColouriseFlagShipDoc, "flagship", FoldFlagShipDoc, FSWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexForth.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexForth.cpp new file mode 100644 index 000000000..80842097d --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexForth.cpp @@ -0,0 +1,168 @@ +// Scintilla source code edit control +/** @file LexForth.cxx + ** Lexer for FORTH + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsAWordStart(int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); +} + +static inline bool IsANumChar(int ch) { + return (ch < 0x80) && (isxdigit(ch) || ch == '.' || ch == 'e' || ch == 'E' ); +} + +static inline bool IsASpaceChar(int ch) { + return (ch < 0x80) && isspace(ch); +} + +static void ColouriseForthDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordLists[], + Accessor &styler) { + + WordList &control = *keywordLists[0]; + WordList &keyword = *keywordLists[1]; + WordList &defword = *keywordLists[2]; + WordList &preword1 = *keywordLists[3]; + WordList &preword2 = *keywordLists[4]; + WordList &strings = *keywordLists[5]; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + // Determine if the current state should terminate. + if (sc.state == SCE_FORTH_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_FORTH_DEFAULT); + } + }else if (sc.state == SCE_FORTH_COMMENT_ML) { + if (sc.ch == ')') { + sc.ForwardSetState(SCE_FORTH_DEFAULT); + } + }else if (sc.state == SCE_FORTH_IDENTIFIER || sc.state == SCE_FORTH_NUMBER) { + // handle numbers here too, because what we thought was a number might + // turn out to be a keyword e.g. 2DUP + if (IsASpaceChar(sc.ch) ) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + int newState = sc.state == SCE_FORTH_NUMBER ? SCE_FORTH_NUMBER : SCE_FORTH_DEFAULT; + if (control.InList(s)) { + sc.ChangeState(SCE_FORTH_CONTROL); + } else if (keyword.InList(s)) { + sc.ChangeState(SCE_FORTH_KEYWORD); + } else if (defword.InList(s)) { + sc.ChangeState(SCE_FORTH_DEFWORD); + } else if (preword1.InList(s)) { + sc.ChangeState(SCE_FORTH_PREWORD1); + } else if (preword2.InList(s)) { + sc.ChangeState(SCE_FORTH_PREWORD2); + } else if (strings.InList(s)) { + sc.ChangeState(SCE_FORTH_STRING); + newState = SCE_FORTH_STRING; + } + sc.SetState(newState); + } + if (sc.state == SCE_FORTH_NUMBER) { + if (IsASpaceChar(sc.ch)) { + sc.SetState(SCE_FORTH_DEFAULT); + } else if (!IsANumChar(sc.ch)) { + sc.ChangeState(SCE_FORTH_IDENTIFIER); + } + } + }else if (sc.state == SCE_FORTH_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_FORTH_DEFAULT); + } + }else if (sc.state == SCE_FORTH_LOCALE) { + if (sc.ch == '}') { + sc.ForwardSetState(SCE_FORTH_DEFAULT); + } + }else if (sc.state == SCE_FORTH_DEFWORD) { + if (IsASpaceChar(sc.ch)) { + sc.SetState(SCE_FORTH_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_FORTH_DEFAULT) { + if (sc.ch == '\\'){ + sc.SetState(SCE_FORTH_COMMENT); + } else if (sc.ch == '(' && + (sc.atLineStart || IsASpaceChar(sc.chPrev)) && + (sc.atLineEnd || IsASpaceChar(sc.chNext))) { + sc.SetState(SCE_FORTH_COMMENT_ML); + } else if ( (sc.ch == '$' && (IsASCII(sc.chNext) && isxdigit(sc.chNext))) ) { + // number starting with $ is a hex number + sc.SetState(SCE_FORTH_NUMBER); + while(sc.More() && IsASCII(sc.chNext) && isxdigit(sc.chNext)) + sc.Forward(); + } else if ( (sc.ch == '%' && (IsASCII(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))) ) { + // number starting with % is binary + sc.SetState(SCE_FORTH_NUMBER); + while(sc.More() && IsASCII(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1')) + sc.Forward(); + } else if ( IsASCII(sc.ch) && + (isxdigit(sc.ch) || ((sc.ch == '.' || sc.ch == '-') && IsASCII(sc.chNext) && isxdigit(sc.chNext)) ) + ){ + sc.SetState(SCE_FORTH_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_FORTH_IDENTIFIER); + } else if (sc.ch == '{') { + sc.SetState(SCE_FORTH_LOCALE); + } else if (sc.ch == ':' && IsASCII(sc.chNext) && isspace(sc.chNext)) { + // highlight word definitions e.g. : GCD ( n n -- n ) ..... ; + // ^ ^^^ + sc.SetState(SCE_FORTH_DEFWORD); + while(sc.More() && IsASCII(sc.chNext) && isspace(sc.chNext)) + sc.Forward(); + } else if (sc.ch == ';' && + (sc.atLineStart || IsASpaceChar(sc.chPrev)) && + (sc.atLineEnd || IsASpaceChar(sc.chNext)) ) { + // mark the ';' that ends a word + sc.SetState(SCE_FORTH_DEFWORD); + sc.ForwardSetState(SCE_FORTH_DEFAULT); + } + } + + } + sc.Complete(); +} + +static void FoldForthDoc(Sci_PositionU, Sci_Position, int, WordList *[], + Accessor &) { +} + +static const char * const forthWordLists[] = { + "control keywords", + "keywords", + "definition words", + "prewords with one argument", + "prewords with two arguments", + "string definition keywords", + 0, + }; + +LexerModule lmForth(SCLEX_FORTH, ColouriseForthDoc, "forth", FoldForthDoc, forthWordLists); + + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexFortran.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexFortran.cpp new file mode 100644 index 000000000..28298b3ed --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexFortran.cpp @@ -0,0 +1,721 @@ +// Scintilla source code edit control +/** @file LexFortran.cxx + ** Lexer for Fortran. + ** Written by Chuan-jian Shen, Last changed Sep. 2003 + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. +/***************************************/ +#include +#include +#include +#include +#include +#include +/***************************************/ +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +/***************************************/ + +using namespace Scintilla; + +/***********************************************/ +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%'); +} +/**********************************************/ +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch)); +} +/***************************************/ +static inline bool IsABlank(unsigned int ch) { + return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ; +} +/***************************************/ +static inline bool IsALineEnd(char ch) { + return ((ch == '\n') || (ch == '\r')) ; +} +/***************************************/ +static Sci_PositionU GetContinuedPos(Sci_PositionU pos, Accessor &styler) { + while (!IsALineEnd(styler.SafeGetCharAt(pos++))) continue; + if (styler.SafeGetCharAt(pos) == '\n') pos++; + while (IsABlank(styler.SafeGetCharAt(pos++))) continue; + char chCur = styler.SafeGetCharAt(pos); + if (chCur == '&') { + while (IsABlank(styler.SafeGetCharAt(++pos))) continue; + return pos; + } else { + return pos; + } +} +/***************************************/ +static void ColouriseFortranDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler, bool isFixFormat) { + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + /***************************************/ + Sci_Position posLineStart = 0; + int numNonBlank = 0, prevState = 0; + Sci_Position endPos = startPos + length; + /***************************************/ + // backtrack to the nearest keyword + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_F_WORD)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + initStyle = styler.StyleAt(startPos - 1); + StyleContext sc(startPos, endPos-startPos, initStyle, styler); + /***************************************/ + for (; sc.More(); sc.Forward()) { + // remember the start position of the line + if (sc.atLineStart) { + posLineStart = sc.currentPos; + numNonBlank = 0; + sc.SetState(SCE_F_DEFAULT); + } + if (!IsASpaceOrTab(sc.ch)) numNonBlank ++; + /***********************************************/ + // Handle the fix format generically + Sci_Position toLineStart = sc.currentPos - posLineStart; + if (isFixFormat && (toLineStart < 6 || toLineStart >= 72)) { + if ((toLineStart == 0 && (tolower(sc.ch) == 'c' || sc.ch == '*')) || sc.ch == '!') { + if (sc.MatchIgnoreCase("cdec$") || sc.MatchIgnoreCase("*dec$") || sc.MatchIgnoreCase("!dec$") || + sc.MatchIgnoreCase("cdir$") || sc.MatchIgnoreCase("*dir$") || sc.MatchIgnoreCase("!dir$") || + sc.MatchIgnoreCase("cms$") || sc.MatchIgnoreCase("*ms$") || sc.MatchIgnoreCase("!ms$") || + sc.chNext == '$') { + sc.SetState(SCE_F_PREPROCESSOR); + } else { + sc.SetState(SCE_F_COMMENT); + } + + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + } else if (toLineStart >= 72) { + sc.SetState(SCE_F_COMMENT); + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + } else if (toLineStart < 5) { + if (IsADigit(sc.ch)) + sc.SetState(SCE_F_LABEL); + else + sc.SetState(SCE_F_DEFAULT); + } else if (toLineStart == 5) { + //if (!IsASpace(sc.ch) && sc.ch != '0') { + if (sc.ch != '\r' && sc.ch != '\n') { + sc.SetState(SCE_F_CONTINUATION); + if (!IsASpace(sc.ch) && sc.ch != '0') + sc.ForwardSetState(prevState); + } else + sc.SetState(SCE_F_DEFAULT); + } + continue; + } + /***************************************/ + // Handle line continuation generically. + if (!isFixFormat && sc.ch == '&' && sc.state != SCE_F_COMMENT) { + char chTemp = ' '; + Sci_Position j = 1; + while (IsABlank(chTemp) && j<132) { + chTemp = static_cast(sc.GetRelative(j)); + j++; + } + if (chTemp == '!') { + sc.SetState(SCE_F_CONTINUATION); + if (sc.chNext == '!') sc.ForwardSetState(SCE_F_COMMENT); + } else if (chTemp == '\r' || chTemp == '\n') { + int currentState = sc.state; + sc.SetState(SCE_F_CONTINUATION); + sc.ForwardSetState(SCE_F_DEFAULT); + while (IsASpace(sc.ch) && sc.More()) { + sc.Forward(); + if (sc.atLineStart) numNonBlank = 0; + if (!IsASpaceOrTab(sc.ch)) numNonBlank ++; + } + if (sc.ch == '&') { + sc.SetState(SCE_F_CONTINUATION); + sc.Forward(); + } + sc.SetState(currentState); + } + } + /***************************************/ + // Hanndle preprocessor directives + if (sc.ch == '#' && numNonBlank == 1) + { + sc.SetState(SCE_F_PREPROCESSOR); + while (!sc.atLineEnd && sc.More()) + sc.Forward(); // Until line end + } + /***************************************/ + // Determine if the current state should terminate. + if (sc.state == SCE_F_OPERATOR) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_NUMBER) { + if (!(IsAWordChar(sc.ch) || sc.ch=='\'' || sc.ch=='\"' || sc.ch=='.')) { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '%')) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_F_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_F_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_F_WORD3); + } + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_COMMENT || sc.state == SCE_F_PREPROCESSOR) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING1) { + prevState = sc.state; + if (sc.ch == '\'') { + if (sc.chNext == '\'') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING2) { + prevState = sc.state; + if (sc.atLineEnd) { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } else if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } + } else if (sc.state == SCE_F_OPERATOR2) { + if (sc.ch == '.') { + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_CONTINUATION) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_LABEL) { + if (!IsADigit(sc.ch)) { + sc.SetState(SCE_F_DEFAULT); + } else { + if (isFixFormat && sc.currentPos-posLineStart > 4) + sc.SetState(SCE_F_DEFAULT); + else if (numNonBlank > 5) + sc.SetState(SCE_F_DEFAULT); + } + } + /***************************************/ + // Determine if a new state should be entered. + if (sc.state == SCE_F_DEFAULT) { + if (sc.ch == '!') { + if (sc.MatchIgnoreCase("!dec$") || sc.MatchIgnoreCase("!dir$") || + sc.MatchIgnoreCase("!ms$") || sc.chNext == '$') { + sc.SetState(SCE_F_PREPROCESSOR); + } else { + sc.SetState(SCE_F_COMMENT); + } + } else if ((!isFixFormat) && IsADigit(sc.ch) && numNonBlank == 1) { + sc.SetState(SCE_F_LABEL); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_F_NUMBER); + } else if ((tolower(sc.ch) == 'b' || tolower(sc.ch) == 'o' || + tolower(sc.ch) == 'z') && (sc.chNext == '\"' || sc.chNext == '\'')) { + sc.SetState(SCE_F_NUMBER); + sc.Forward(); + } else if (sc.ch == '.' && isalpha(sc.chNext)) { + sc.SetState(SCE_F_OPERATOR2); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_F_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_F_STRING2); + } else if (sc.ch == '\'') { + sc.SetState(SCE_F_STRING1); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_F_OPERATOR); + } + } + } + sc.Complete(); +} +/***************************************/ +static void CheckLevelCommentLine(const unsigned int nComL, + Sci_Position nComColB[], Sci_Position nComColF[], Sci_Position &nComCur, + bool comLineB[], bool comLineF[], bool &comLineCur, + int &levelDeltaNext) { + levelDeltaNext = 0; + if (!comLineCur) { + return; + } + + if (!comLineF[0] || nComColF[0] != nComCur) { + unsigned int i=0; + for (; i= nLineTotal) { + return; + } + + for (int i=nComL-2; i>=0; i--) { + nComColB[i+1] = nComColB[i]; + comLineB[i+1] = comLineB[i]; + } + nComColB[0] = nComCur; + comLineB[0] = comLineCur; + nComCur = nComColF[0]; + comLineCur = comLineF[0]; + for (unsigned int i=0; i+1 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + isPrevLine = true; + } else { + isPrevLine = false; + } + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + int levelDeltaNext = 0; + + const unsigned int nComL = 3; // defines how many comment lines should be before they are folded + Sci_Position nComColB[nComL] = {}; + Sci_Position nComColF[nComL] = {}; + Sci_Position nComCur = 0; + bool comLineB[nComL] = {}; + bool comLineF[nComL] = {}; + bool comLineCur; + Sci_Position nLineTotal = styler.GetLine(styler.Length()-1) + 1; + if (foldComment) { + for (unsigned int i=0; i= nLineTotal) { + comLineF[i] = false; + break; + } + GetIfLineComment(styler, isFixFormat, chL, comLineF[i], nComColF[i]); + } + GetIfLineComment(styler, isFixFormat, lineCurrent, comLineCur, nComCur); + CheckBackComLines(styler, isFixFormat, lineCurrent, nComL, nComColB, nComColF, nComCur, + comLineB, comLineF, comLineCur); + } + int levelCurrent = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + + /***************************************/ + Sci_Position lastStart = 0; + char prevWord[32] = ""; + /***************************************/ + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + char chNextNonBlank = chNext; + bool nextEOL = false; + if (IsALineEnd(chNextNonBlank)) { + nextEOL = true; + } + Sci_PositionU j=i+1; + while(IsABlank(chNextNonBlank) && j(tolower(styler[lastStart+k])); + } + s[k] = '\0'; + // Handle the forall and where statement and structure. + if (strcmp(s, "forall") == 0 || (strcmp(s, "where") == 0 && strcmp(prevWord, "else") != 0)) { + if (strcmp(prevWord, "end") != 0) { + j = i + 1; + char chBrace = '(', chSeek = ')', ch1 = styler.SafeGetCharAt(j); + // Find the position of the first ( + while (ch1 != chBrace && j 0) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); + + lineCurrent++; + levelCurrent += levelDeltaNext; + levelDeltaNext = 0; + visibleChars = 0; + strcpy(prevWord, ""); + isPrevLine = false; + + if (foldComment) { + StepCommentLine(styler, isFixFormat, lineCurrent, nComL, nComColB, nComColF, nComCur, + comLineB, comLineF, comLineCur); + } + } + /***************************************/ + if (!isspacechar(ch)) visibleChars++; + } + /***************************************/ +} +/***************************************/ +static const char * const FortranWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; +/***************************************/ +static void ColouriseFortranDocFreeFormat(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, false); +} +/***************************************/ +static void ColouriseFortranDocFixFormat(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, true); +} +/***************************************/ +static void FoldFortranDocFreeFormat(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *[], Accessor &styler) { + FoldFortranDoc(startPos, length, initStyle,styler, false); +} +/***************************************/ +static void FoldFortranDocFixFormat(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *[], Accessor &styler) { + FoldFortranDoc(startPos, length, initStyle,styler, true); +} +/***************************************/ +LexerModule lmFortran(SCLEX_FORTRAN, ColouriseFortranDocFreeFormat, "fortran", FoldFortranDocFreeFormat, FortranWordLists); +LexerModule lmF77(SCLEX_F77, ColouriseFortranDocFixFormat, "f77", FoldFortranDocFixFormat, FortranWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexGAP.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexGAP.cpp new file mode 100644 index 000000000..a2eca95ab --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexGAP.cpp @@ -0,0 +1,264 @@ +// Scintilla source code edit control +/** @file LexGAP.cxx + ** Lexer for the GAP language. (The GAP System for Computational Discrete Algebra) + ** http://www.gap-system.org + **/ +// Copyright 2007 by Istvan Szollosi ( szteven gmail com ) +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsGAPOperator(char ch) { + if (IsASCII(ch) && isalnum(ch)) return false; + if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || + ch == '^' || ch == ',' || ch == '!' || ch == '.' || + ch == '=' || ch == '<' || ch == '>' || ch == '(' || + ch == ')' || ch == ';' || ch == '[' || ch == ']' || + ch == '{' || ch == '}' || ch == ':' ) + return true; + return false; +} + +static void GetRange(Sci_PositionU start, Sci_PositionU end, Accessor &styler, char *s, Sci_PositionU len) { + Sci_PositionU i = 0; + while ((i < end - start + 1) && (i < len-1)) { + s[i] = static_cast(styler[start + i]); + i++; + } + s[i] = '\0'; +} + +static void ColouriseGAPDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { + + WordList &keywords1 = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + // Do not leak onto next line + if (initStyle == SCE_GAP_STRINGEOL) initStyle = SCE_GAP_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + // Prevent SCE_GAP_STRINGEOL from leaking back to previous line + if ( sc.atLineStart ) { + if (sc.state == SCE_GAP_STRING) sc.SetState(SCE_GAP_STRING); + if (sc.state == SCE_GAP_CHAR) sc.SetState(SCE_GAP_CHAR); + } + + // Handle line continuation generically + if (sc.ch == '\\' ) { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate + switch (sc.state) { + case SCE_GAP_OPERATOR : + sc.SetState(SCE_GAP_DEFAULT); + break; + + case SCE_GAP_NUMBER : + if (!IsADigit(sc.ch)) { + if (sc.ch == '\\') { + if (!sc.atLineEnd) { + if (!IsADigit(sc.chNext)) { + sc.Forward(); + sc.ChangeState(SCE_GAP_IDENTIFIER); + } + } + } else if (isalpha(sc.ch) || sc.ch == '_') { + sc.ChangeState(SCE_GAP_IDENTIFIER); + } + else sc.SetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_IDENTIFIER : + if (!(iswordstart(static_cast(sc.ch)) || sc.ch == '$')) { + if (sc.ch == '\\') sc.Forward(); + else { + char s[1000]; + sc.GetCurrent(s, sizeof(s)); + if (keywords1.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD4); + } + sc.SetState(SCE_GAP_DEFAULT); + } + } + break; + + case SCE_GAP_COMMENT : + if (sc.atLineEnd) { + sc.SetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_GAP_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_CHAR: + if (sc.atLineEnd) { + sc.ChangeState(SCE_GAP_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_GAP_DEFAULT); + } + break; + } + + // Determine if a new state should be entered + if (sc.state == SCE_GAP_DEFAULT) { + if (IsGAPOperator(static_cast(sc.ch))) { + sc.SetState(SCE_GAP_OPERATOR); + } + else if (IsADigit(sc.ch)) { + sc.SetState(SCE_GAP_NUMBER); + } else if (isalpha(sc.ch) || sc.ch == '_' || sc.ch == '\\' || sc.ch == '$' || sc.ch == '~') { + sc.SetState(SCE_GAP_IDENTIFIER); + if (sc.ch == '\\') sc.Forward(); + } else if (sc.ch == '#') { + sc.SetState(SCE_GAP_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_GAP_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_GAP_CHAR); + } + } + + } + sc.Complete(); +} + +static int ClassifyFoldPointGAP(const char* s) { + int level = 0; + if (strcmp(s, "function") == 0 || + strcmp(s, "do") == 0 || + strcmp(s, "if") == 0 || + strcmp(s, "repeat") == 0 ) { + level = 1; + } else if (strcmp(s, "end") == 0 || + strcmp(s, "od") == 0 || + strcmp(s, "fi") == 0 || + strcmp(s, "until") == 0 ) { + level = -1; + } + return level; +} + +static void FoldGAPDoc( Sci_PositionU startPos, Sci_Position length, int initStyle, WordList** , Accessor &styler) { + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + Sci_Position lastStart = 0; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (stylePrev != SCE_GAP_KEYWORD && style == SCE_GAP_KEYWORD) { + // Store last word start point. + lastStart = i; + } + + if (stylePrev == SCE_GAP_KEYWORD) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[100]; + GetRange(lastStart, i, styler, s, sizeof(s)); + levelCurrent += ClassifyFoldPointGAP(s); + } + } + + if (atEOL) { + int lev = levelPrev; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + + if (!isspacechar(ch)) + visibleChars++; + } + + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const GAPWordListDesc[] = { + "Keywords 1", + "Keywords 2", + "Keywords 3 (unused)", + "Keywords 4 (unused)", + 0 +}; + +LexerModule lmGAP( + SCLEX_GAP, + ColouriseGAPDoc, + "gap", + FoldGAPDoc, + GAPWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexGui4Cli.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexGui4Cli.cpp new file mode 100644 index 000000000..e321a5b85 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexGui4Cli.cpp @@ -0,0 +1,311 @@ +// Scintilla source code edit control +// Copyright 1998-2002 by Neil Hodgson +/* +This is the Lexer for Gui4Cli, included in SciLexer.dll +- by d. Keletsekis, 2/10/2003 + +To add to SciLexer.dll: +1. Add the values below to INCLUDE\Scintilla.iface +2. Run the scripts/HFacer.py script +3. Run the scripts/LexGen.py script + +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +*/ + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +#define debug Platform::DebugPrintf + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch =='\\'); +} + +inline bool isGCOperator(int ch) +{ if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '%' || + ch == '[' || ch == ']' || ch == '<' || ch == '>' || + ch == ',' || ch == ';' || ch == ':') + return true; + return false; +} + +#define isSpace(x) ((x)==' ' || (x)=='\t') +#define isNL(x) ((x)=='\n' || (x)=='\r') +#define isSpaceOrNL(x) (isSpace(x) || isNL(x)) +#define BUFFSIZE 500 +#define isFoldPoint(x) ((styler.LevelAt(x) & SC_FOLDLEVELNUMBERMASK) == 1024) + +static void colorFirstWord(WordList *keywordlists[], Accessor &styler, + StyleContext *sc, char *buff, Sci_Position length, Sci_Position) +{ + Sci_Position c = 0; + while (sc->More() && isSpaceOrNL(sc->ch)) + { sc->Forward(); + } + styler.ColourTo(sc->currentPos - 1, sc->state); + + if (!IsAWordChar(sc->ch)) // comment, marker, etc.. + return; + + while (sc->More() && !isSpaceOrNL(sc->ch) && (c < length-1) && !isGCOperator(sc->ch)) + { buff[c] = static_cast(sc->ch); + ++c; sc->Forward(); + } + buff[c] = '\0'; + char *p = buff; + while (*p) // capitalize.. + { if (islower(*p)) *p = static_cast(toupper(*p)); + ++p; + } + + WordList &kGlobal = *keywordlists[0]; // keyword lists set by the user + WordList &kEvent = *keywordlists[1]; + WordList &kAttribute = *keywordlists[2]; + WordList &kControl = *keywordlists[3]; + WordList &kCommand = *keywordlists[4]; + + int state = 0; + // int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK; + // debug ("line = %d, level = %d", line, level); + + if (kGlobal.InList(buff)) state = SCE_GC_GLOBAL; + else if (kAttribute.InList(buff)) state = SCE_GC_ATTRIBUTE; + else if (kControl.InList(buff)) state = SCE_GC_CONTROL; + else if (kCommand.InList(buff)) state = SCE_GC_COMMAND; + else if (kEvent.InList(buff)) state = SCE_GC_EVENT; + + if (state) + { sc->ChangeState(state); + styler.ColourTo(sc->currentPos - 1, sc->state); + sc->ChangeState(SCE_GC_DEFAULT); + } + else + { sc->ChangeState(SCE_GC_DEFAULT); + styler.ColourTo(sc->currentPos - 1, sc->state); + } +} + +// Main colorizing function called by Scintilla +static void +ColouriseGui4CliDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) +{ + styler.StartAt(startPos); + + Sci_Position currentline = styler.GetLine(startPos); + int quotestart = 0, oldstate; + styler.StartSegment(startPos); + bool noforward; + char buff[BUFFSIZE+1]; // buffer for command name + + StyleContext sc(startPos, length, initStyle, styler); + buff[0] = '\0'; // cbuff = 0; + + if (sc.state != SCE_GC_COMMENTBLOCK) // colorize 1st word.. + colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + + while (sc.More()) + { noforward = 0; + + switch (sc.ch) + { + case '/': + if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_STRING) + break; + if (sc.chNext == '/') // line comment + { sc.SetState (SCE_GC_COMMENTLINE); + sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + } + else if (sc.chNext == '*') // block comment + { sc.SetState(SCE_GC_COMMENTBLOCK); + sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + } + else + styler.ColourTo(sc.currentPos, sc.state); + break; + + case '*': // end of comment block, or operator.. + if (sc.state == SCE_GC_STRING) + break; + if (sc.state == SCE_GC_COMMENTBLOCK && sc.chNext == '/') + { sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState (SCE_GC_DEFAULT); + } + else + styler.ColourTo(sc.currentPos, sc.state); + break; + + case '\'': case '\"': // strings.. + if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_COMMENTLINE) + break; + if (sc.state == SCE_GC_STRING) + { if (sc.ch == quotestart) // match same quote char.. + { styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState(SCE_GC_DEFAULT); + quotestart = 0; + } } + else + { styler.ColourTo(sc.currentPos - 1, sc.state); + sc.ChangeState(SCE_GC_STRING); + quotestart = sc.ch; + } + break; + + case ';': // end of commandline character + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && + sc.state != SCE_GC_STRING) + { + styler.ColourTo(sc.currentPos - 1, sc.state); + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(SCE_GC_DEFAULT); + sc.Forward(); + colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + noforward = 1; // don't move forward - already positioned at next char.. + } + break; + + case '+': case '-': case '=': case '!': // operators.. + case '<': case '>': case '&': case '|': case '$': + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && + sc.state != SCE_GC_STRING) + { + styler.ColourTo(sc.currentPos - 1, sc.state); + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(SCE_GC_DEFAULT); + } + break; + + case '\\': // escape - same as operator, but also mark in strings.. + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE) + { + oldstate = sc.state; + styler.ColourTo(sc.currentPos - 1, sc.state); + sc.Forward(); // mark also the next char.. + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(oldstate); + } + break; + + case '\n': case '\r': + ++currentline; + if (sc.state == SCE_GC_COMMENTLINE) + { styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState (SCE_GC_DEFAULT); + } + else if (sc.state != SCE_GC_COMMENTBLOCK) + { colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + noforward = 1; // don't move forward - already positioned at next char.. + } + break; + +// case ' ': case '\t': +// default : + } + + if (!noforward) sc.Forward(); + + } + sc.Complete(); +} + +// Main folding function called by Scintilla - (based on props (.ini) files function) +static void FoldGui4Cli(Sci_PositionU startPos, Sci_Position length, int, + WordList *[], Accessor &styler) +{ + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + bool headerPoint = false; + + for (Sci_PositionU i = startPos; i < endPos; i++) + { + char ch = chNext; + chNext = styler[i+1]; + + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (style == SCE_GC_EVENT || style == SCE_GC_GLOBAL) + { headerPoint = true; // fold at events and globals + } + + if (atEOL) + { int lev = SC_FOLDLEVELBASE+1; + + if (headerPoint) + lev = SC_FOLDLEVELBASE; + + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + + if (headerPoint) + lev |= SC_FOLDLEVELHEADERFLAG; + + if (lev != styler.LevelAt(lineCurrent)) // set level, if not already correct + { styler.SetLevel(lineCurrent, lev); + } + + lineCurrent++; // re-initialize our flags + visibleChars = 0; + headerPoint = false; + } + + if (!(isspacechar(ch))) // || (style == SCE_GC_COMMENTLINE) || (style != SCE_GC_COMMENTBLOCK))) + visibleChars++; + } + + int lev = headerPoint ? SC_FOLDLEVELBASE : SC_FOLDLEVELBASE+1; + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, lev | flagsNext); +} + +// I have no idea what these are for.. probably accessible by some message. +static const char * const gui4cliWordListDesc[] = { + "Globals", "Events", "Attributes", "Control", "Commands", + 0 +}; + +// Declare language & pass our function pointers to Scintilla +LexerModule lmGui4Cli(SCLEX_GUI4CLI, ColouriseGui4CliDoc, "gui4cli", FoldGui4Cli, gui4cliWordListDesc); + +#undef debug + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexHTML.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexHTML.cpp new file mode 100644 index 000000000..650112220 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexHTML.cpp @@ -0,0 +1,2469 @@ +// Scintilla source code edit control +/** @file LexHTML.cxx + ** Lexer for HTML. + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" +#include "StringCopy.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +namespace { + +#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) +#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) +#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) + +enum script_type { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock, eScriptComment }; +enum script_mode { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; + +inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +inline bool IsOperator(int ch) { + if (IsASCII(ch) && isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} + +void GetTextSegment(Accessor &styler, Sci_PositionU start, Sci_PositionU end, char *s, size_t len) { + Sci_PositionU i = 0; + for (; (i < end - start + 1) && (i < len-1); i++) { + s[i] = MakeLowerCase(styler[start + i]); + } + s[i] = '\0'; +} + +std::string GetStringSegment(Accessor &styler, Sci_PositionU start, Sci_PositionU end) { + std::string s; + Sci_PositionU i = 0; + for (; (i < end - start + 1); i++) { + s.push_back(MakeLowerCase(styler[start + i])); + } + return s; +} + +std::string GetNextWord(Accessor &styler, Sci_PositionU start) { + std::string ret; + Sci_PositionU i = 0; + for (; i < 200; i++) { // Put an upper limit to bound time taken for unexpected text. + const char ch = styler.SafeGetCharAt(start + i); + if ((i == 0) && !IsAWordStart(ch)) + break; + if ((i > 0) && !IsAWordChar(ch)) + break; + ret.push_back(ch); + } + return ret; +} + +script_type segIsScriptingIndicator(Accessor &styler, Sci_PositionU start, Sci_PositionU end, script_type prevValue) { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + //Platform::DebugPrintf("Scripting indicator [%s]\n", s); + if (strstr(s, "src")) // External script + return eScriptNone; + if (strstr(s, "vbs")) + return eScriptVBS; + if (strstr(s, "pyth")) + return eScriptPython; + if (strstr(s, "javas")) + return eScriptJS; + if (strstr(s, "jscr")) + return eScriptJS; + if (strstr(s, "php")) + return eScriptPHP; + if (strstr(s, "xml")) { + const char *xml = strstr(s, "xml"); + for (const char *t=s; t= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + return eScriptPython; + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + return eScriptVBS; + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { + return eScriptJS; + } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { + return eScriptPHP; + } else if ((state >= SCE_H_SGML_DEFAULT) && (state < SCE_H_SGML_BLOCK_DEFAULT)) { + return eScriptSGML; + } else if (state == SCE_H_SGML_BLOCK_DEFAULT) { + return eScriptSGMLblock; + } else { + return eScriptNone; + } +} + +int statePrintForState(int state, script_mode inScriptType) { + int StateToPrint = state; + + if (state >= SCE_HJ_START) { + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); + } + } + + return StateToPrint; +} + +int stateForPrintState(int StateToPrint) { + int state; + + if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { + state = StateToPrint - SCE_HA_PYTHON; + } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { + state = StateToPrint - SCE_HA_VBS; + } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_REGEX)) { + state = StateToPrint - SCE_HA_JS; + } else { + state = StateToPrint; + } + + return state; +} + +inline bool IsNumber(Sci_PositionU start, Accessor &styler) { + return IsADigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '-') || (styler[start] == '#'); +} + +inline bool isStringState(int state) { + bool bResult; + + switch (state) { + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HJA_DOUBLESTRING: + case SCE_HJA_SINGLESTRING: + case SCE_HB_STRING: + case SCE_HBA_STRING: + case SCE_HP_STRING: + case SCE_HP_CHARACTER: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + case SCE_HPA_STRING: + case SCE_HPA_CHARACTER: + case SCE_HPA_TRIPLE: + case SCE_HPA_TRIPLEDOUBLE: + case SCE_HPHP_HSTRING: + case SCE_HPHP_SIMPLESTRING: + case SCE_HPHP_HSTRING_VARIABLE: + case SCE_HPHP_COMPLEX_VARIABLE: + bResult = true; + break; + default : + bResult = false; + break; + } + return bResult; +} + +inline bool stateAllowsTermination(int state) { + bool allowTermination = !isStringState(state); + if (allowTermination) { + switch (state) { + case SCE_HB_COMMENTLINE: + case SCE_HPHP_COMMENT: + case SCE_HP_COMMENTLINE: + case SCE_HPA_COMMENTLINE: + allowTermination = false; + } + } + return allowTermination; +} + +// not really well done, since it's only comments that should lex the %> and <% +inline bool isCommentASPState(int state) { + bool bResult; + + switch (state) { + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTLINE: + case SCE_HJ_COMMENTDOC: + case SCE_HB_COMMENTLINE: + case SCE_HP_COMMENTLINE: + case SCE_HPHP_COMMENT: + case SCE_HPHP_COMMENTLINE: + bResult = true; + break; + default : + bResult = false; + break; + } + return bResult; +} + +void classifyAttribHTML(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) { + const bool wordIsNumber = IsNumber(start, styler); + char chAttr = SCE_H_ATTRIBUTEUNKNOWN; + if (wordIsNumber) { + chAttr = SCE_H_NUMBER; + } else { + std::string s = GetStringSegment(styler, start, end); + if (keywords.InList(s.c_str())) + chAttr = SCE_H_ATTRIBUTE; + } + if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_ATTRIBUTE; + styler.ColourTo(end, chAttr); +} + +int classifyTagHTML(Sci_PositionU start, Sci_PositionU end, + const WordList &keywords, Accessor &styler, bool &tagDontFold, + bool caseSensitive, bool isXml, bool allowScripts, + const std::set &nonFoldingTags) { + std::string tag; + // Copy after the '<' + for (Sci_PositionU cPos = start; cPos <= end; cPos++) { + const char ch = styler[cPos]; + if ((ch != '<') && (ch != '/')) { + tag.push_back(caseSensitive ? ch : MakeLowerCase(ch)); + } + } + // if the current language is XML, I can fold any tag + // if the current language is HTML, I don't want to fold certain tags (input, meta, etc.) + //...to find it in the list of no-container-tags + tagDontFold = (!isXml) && (nonFoldingTags.count(tag) > 0); + // No keywords -> all are known + char chAttr = SCE_H_TAGUNKNOWN; + if (!tag.empty() && (tag[0] == '!')) { + chAttr = SCE_H_SGML_DEFAULT; + } else if (!keywords || keywords.InList(tag.c_str())) { + chAttr = SCE_H_TAG; + } + styler.ColourTo(end, chAttr); + if (chAttr == SCE_H_TAG) { + if (allowScripts && (tag == "script")) { + // check to see if this is a self-closing tag by sniffing ahead + bool isSelfClose = false; + for (Sci_PositionU cPos = end; cPos <= end + 200; cPos++) { + const char ch = styler.SafeGetCharAt(cPos, '\0'); + if (ch == '\0' || ch == '>') + break; + else if (ch == '/' && styler.SafeGetCharAt(cPos + 1, '\0') == '>') { + isSelfClose = true; + break; + } + } + + // do not enter a script state if the tag self-closed + if (!isSelfClose) + chAttr = SCE_H_SCRIPT; + } else if (!isXml && (tag == "comment")) { + chAttr = SCE_H_COMMENT; + } + } + return chAttr; +} + +void classifyWordHTJS(Sci_PositionU start, Sci_PositionU end, + const WordList &keywords, Accessor &styler, script_mode inScriptType) { + char s[30 + 1]; + Sci_PositionU i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + + char chAttr = SCE_HJ_WORD; + const bool wordIsNumber = IsADigit(s[0]) || ((s[0] == '.') && IsADigit(s[1])); + if (wordIsNumber) { + chAttr = SCE_HJ_NUMBER; + } else if (keywords.InList(s)) { + chAttr = SCE_HJ_KEYWORD; + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); +} + +int classifyWordHTVB(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler, script_mode inScriptType) { + char chAttr = SCE_HB_IDENTIFIER; + const bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) { + chAttr = SCE_HB_NUMBER; + } else { + std::string s = GetStringSegment(styler, start, end); + if (keywords.InList(s.c_str())) { + chAttr = SCE_HB_WORD; + if (s == "rem") + chAttr = SCE_HB_COMMENTLINE; + } + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + if (chAttr == SCE_HB_COMMENTLINE) + return SCE_HB_COMMENTLINE; + else + return SCE_HB_DEFAULT; +} + +void classifyWordHTPy(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler, std::string &prevWord, script_mode inScriptType, bool isMako) { + const bool wordIsNumber = IsADigit(styler[start]); + std::string s; + for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { + s.push_back(styler[start + i]); + } + char chAttr = SCE_HP_IDENTIFIER; + if (prevWord == "class") + chAttr = SCE_HP_CLASSNAME; + else if (prevWord == "def") + chAttr = SCE_HP_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_HP_NUMBER; + else if (keywords.InList(s.c_str())) + chAttr = SCE_HP_WORD; + else if (isMako && (s == "block")) + chAttr = SCE_HP_WORD; + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + prevWord = s; +} + +// Update the word colour to default or keyword +// Called when in a PHP word +void classifyWordHTPHP(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) { + char chAttr = SCE_HPHP_DEFAULT; + const bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1])); + if (wordIsNumber) { + chAttr = SCE_HPHP_NUMBER; + } else { + std::string s = GetStringSegment(styler, start, end); + if (keywords.InList(s.c_str())) + chAttr = SCE_HPHP_WORD; + } + styler.ColourTo(end, chAttr); +} + +bool isWordHSGML(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) { + std::string s; + for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { + s.push_back(styler[start + i]); + } + return keywords.InList(s.c_str()); +} + +bool isWordCdata(Sci_PositionU start, Sci_PositionU end, Accessor &styler) { + std::string s; + for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { + s.push_back(styler[start + i]); + } + return s == "[CDATA["; +} + +// Return the first state to reach when entering a scripting language +int StateForScript(script_type scriptLanguage) { + int Result; + switch (scriptLanguage) { + case eScriptVBS: + Result = SCE_HB_START; + break; + case eScriptPython: + Result = SCE_HP_START; + break; + case eScriptPHP: + Result = SCE_HPHP_DEFAULT; + break; + case eScriptXML: + Result = SCE_H_TAGUNKNOWN; + break; + case eScriptSGML: + Result = SCE_H_SGML_DEFAULT; + break; + case eScriptComment: + Result = SCE_H_COMMENT; + break; + default : + Result = SCE_HJ_START; + break; + } + return Result; +} + +inline bool issgmlwordchar(int ch) { + return !IsASCII(ch) || + (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); +} + +inline bool IsPhpWordStart(int ch) { + return (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); +} + +inline bool IsPhpWordChar(int ch) { + return IsADigit(ch) || IsPhpWordStart(ch); +} + +bool InTagState(int state) { + return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || + state == SCE_H_SCRIPT || + state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || + state == SCE_H_NUMBER || state == SCE_H_OTHER || + state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; +} + +bool IsCommentState(const int state) { + return state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT; +} + +bool IsScriptCommentState(const int state) { + return state == SCE_HJ_COMMENT || state == SCE_HJ_COMMENTLINE || state == SCE_HJA_COMMENT || + state == SCE_HJA_COMMENTLINE || state == SCE_HB_COMMENTLINE || state == SCE_HBA_COMMENTLINE; +} + +bool isLineEnd(int ch) { + return ch == '\r' || ch == '\n'; +} + +bool isMakoBlockEnd(const int ch, const int chNext, const std::string &blockType) { + if (blockType.empty()) { + return ((ch == '%') && (chNext == '>')); + } else if ((blockType == "inherit") || + (blockType == "namespace") || + (blockType == "include") || + (blockType == "page")) { + return ((ch == '/') && (chNext == '>')); + } else if (blockType == "%") { + if (ch == '/' && isLineEnd(chNext)) + return true; + else + return isLineEnd(ch); + } else if (blockType == "{") { + return ch == '}'; + } else { + return (ch == '>'); + } +} + +bool isDjangoBlockEnd(const int ch, const int chNext, const std::string &blockType) { + if (blockType.empty()) { + return false; + } else if (blockType == "%") { + return ((ch == '%') && (chNext == '}')); + } else if (blockType == "{") { + return ((ch == '}') && (chNext == '}')); + } else { + return false; + } +} + +bool isPHPStringState(int state) { + return + (state == SCE_HPHP_HSTRING) || + (state == SCE_HPHP_SIMPLESTRING) || + (state == SCE_HPHP_HSTRING_VARIABLE) || + (state == SCE_HPHP_COMPLEX_VARIABLE); +} + +Sci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Position i, const Sci_Position lengthDoc, Accessor &styler, bool &isSimpleString) { + Sci_Position j; + const Sci_Position beginning = i - 1; + bool isValidSimpleString = false; + + while (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\t')) + i++; + char ch = styler.SafeGetCharAt(i); + const char chNext = styler.SafeGetCharAt(i + 1); + phpStringDelimiter.clear(); + if (!IsPhpWordStart(ch)) { + if (ch == '\'' && IsPhpWordStart(chNext)) { + i++; + ch = chNext; + isSimpleString = true; + } else { + return beginning; + } + } + phpStringDelimiter.push_back(ch); + i++; + for (j = i; j < lengthDoc && !isLineEnd(styler[j]); j++) { + if (!IsPhpWordChar(styler[j])) { + if (isSimpleString && (styler[j] == '\'') && isLineEnd(styler.SafeGetCharAt(j + 1))) { + isValidSimpleString = true; + j++; + break; + } else { + phpStringDelimiter.clear(); + return beginning; + } + } + phpStringDelimiter.push_back(styler[j]); + } + if (isSimpleString && !isValidSimpleString) { + phpStringDelimiter.clear(); + return beginning; + } + return j - 1; +} + +// Options used for LexerHTML +struct OptionsHTML { + int aspDefaultLanguage = eScriptJS; + bool caseSensitive = false; + bool allowScripts = true; + bool isMako = false; + bool isDjango = false; + bool fold = false; + bool foldHTML = false; + bool foldHTMLPreprocessor = true; + bool foldCompact = true; + bool foldComment = false; + bool foldHeredoc = false; + OptionsHTML() noexcept { + } +}; + +const char * const htmlWordListDesc[] = { + "HTML elements and attributes", + "JavaScript keywords", + "VBScript keywords", + "Python keywords", + "PHP keywords", + "SGML and DTD keywords", + 0, +}; + +const char * const phpscriptWordListDesc[] = { + "", //Unused + "", //Unused + "", //Unused + "", //Unused + "PHP keywords", + "", //Unused + 0, +}; + +struct OptionSetHTML : public OptionSet { + OptionSetHTML(bool isPHPScript_) { + + DefineProperty("asp.default.language", &OptionsHTML::aspDefaultLanguage, + "Script in ASP code is initially assumed to be in JavaScript. " + "To change this to VBScript set asp.default.language to 2. Python is 3."); + + DefineProperty("html.tags.case.sensitive", &OptionsHTML::caseSensitive, + "For XML and HTML, setting this property to 1 will make tags match in a case " + "sensitive way which is the expected behaviour for XML and XHTML."); + + DefineProperty("lexer.xml.allow.scripts", &OptionsHTML::allowScripts, + "Set to 0 to disable scripts in XML."); + + DefineProperty("lexer.html.mako", &OptionsHTML::isMako, + "Set to 1 to enable the mako template language."); + + DefineProperty("lexer.html.django", &OptionsHTML::isDjango, + "Set to 1 to enable the django template language."); + + DefineProperty("fold", &OptionsHTML::fold); + + DefineProperty("fold.html", &OptionsHTML::foldHTML, + "Folding is turned on or off for HTML and XML files with this option. " + "The fold option must also be on for folding to occur."); + + DefineProperty("fold.html.preprocessor", &OptionsHTML::foldHTMLPreprocessor, + "Folding is turned on or off for scripts embedded in HTML files with this option. " + "The default is on."); + + DefineProperty("fold.compact", &OptionsHTML::foldCompact); + + DefineProperty("fold.hypertext.comment", &OptionsHTML::foldComment, + "Allow folding for comments in scripts embedded in HTML. " + "The default is off."); + + DefineProperty("fold.hypertext.heredoc", &OptionsHTML::foldHeredoc, + "Allow folding for heredocs in scripts embedded in HTML. " + "The default is off."); + + DefineWordListSets(isPHPScript_ ? phpscriptWordListDesc : htmlWordListDesc); + } +}; + +LexicalClass lexicalClassesHTML[] = { + // Lexer HTML SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_: + 0, "SCE_H_DEFAULT", "default", "Text", + 1, "SCE_H_TAG", "tag", "Tags", + 2, "SCE_H_ERRORTAGUNKNOWN", "error tag", "Unknown Tags", + 3, "SCE_H_ATTRIBUTE", "attribute", "Attributes", + 4, "SCE_H_ATTRIBUTEUNKNOWN", "error attribute", "Unknown Attributes", + 5, "SCE_H_NUMBER", "literal numeric", "Numbers", + 6, "SCE_H_DOUBLESTRING", "literal string", "Double quoted strings", + 7, "SCE_H_SINGLESTRING", "literal string", "Single quoted strings", + 8, "SCE_H_OTHER", "tag operator", "Other inside tag, including space and '='", + 9, "SCE_H_COMMENT", "comment", "Comment", + 10, "SCE_H_ENTITY", "literal", "Entities", + 11, "SCE_H_TAGEND", "tag", "XML style tag ends '/>'", + 12, "SCE_H_XMLSTART", "identifier", "XML identifier start ''", + 14, "SCE_H_SCRIPT", "error", "Internal state which should never be visible", + 15, "SCE_H_ASP", "preprocessor", "ASP <% ... %>", + 16, "SCE_H_ASPAT", "preprocessor", "ASP <% ... %>", + 17, "SCE_H_CDATA", "literal", "CDATA", + 18, "SCE_H_QUESTION", "preprocessor", "PHP", + 19, "SCE_H_VALUE", "literal string", "Unquoted values", + 20, "SCE_H_XCCOMMENT", "comment", "JSP Comment <%-- ... --%>", + 21, "SCE_H_SGML_DEFAULT", "default", "SGML tags ", + 22, "SCE_H_SGML_COMMAND", "preprocessor", "SGML command", + 23, "SCE_H_SGML_1ST_PARAM", "preprocessor", "SGML 1st param", + 24, "SCE_H_SGML_DOUBLESTRING", "literal string", "SGML double string", + 25, "SCE_H_SGML_SIMPLESTRING", "literal string", "SGML single string", + 26, "SCE_H_SGML_ERROR", "error", "SGML error", + 27, "SCE_H_SGML_SPECIAL", "literal", "SGML special (#XXXX type)", + 28, "SCE_H_SGML_ENTITY", "literal", "SGML entity", + 29, "SCE_H_SGML_COMMENT", "comment", "SGML comment", + 30, "SCE_H_SGML_1ST_PARAM_COMMENT", "error comment", "SGML first parameter - lexer internal. It is an error if any text is in this style.", + 31, "SCE_H_SGML_BLOCK_DEFAULT", "default", "SGML block", + 32, "", "predefined", "", + 33, "", "predefined", "", + 34, "", "predefined", "", + 35, "", "predefined", "", + 36, "", "predefined", "", + 37, "", "predefined", "", + 38, "", "predefined", "", + 39, "", "predefined", "", + 40, "SCE_HJ_START", "client javascript default", "JS Start - allows eol filled background to not start on same line as SCRIPT tag", + 41, "SCE_HJ_DEFAULT", "client javascript default", "JS Default", + 42, "SCE_HJ_COMMENT", "client javascript comment", "JS Comment", + 43, "SCE_HJ_COMMENTLINE", "client javascript comment line", "JS Line Comment", + 44, "SCE_HJ_COMMENTDOC", "client javascript comment documentation", "JS Doc comment", + 45, "SCE_HJ_NUMBER", "client javascript literal numeric", "JS Number", + 46, "SCE_HJ_WORD", "client javascript identifier", "JS Word", + 47, "SCE_HJ_KEYWORD", "client javascript keyword", "JS Keyword", + 48, "SCE_HJ_DOUBLESTRING", "client javascript literal string", "JS Double quoted string", + 49, "SCE_HJ_SINGLESTRING", "client javascript literal string", "JS Single quoted string", + 50, "SCE_HJ_SYMBOLS", "client javascript operator", "JS Symbols", + 51, "SCE_HJ_STRINGEOL", "client javascript error literal string", "JavaScript EOL", + 52, "SCE_HJ_REGEX", "client javascript literal regex", "JavaScript RegEx", + 53, "", "unused", "", + 54, "", "unused", "", + 55, "SCE_HJA_START", "server javascript default", "JS Start - allows eol filled background to not start on same line as SCRIPT tag", + 56, "SCE_HJA_DEFAULT", "server javascript default", "JS Default", + 57, "SCE_HJA_COMMENT", "server javascript comment", "JS Comment", + 58, "SCE_HJA_COMMENTLINE", "server javascript comment line", "JS Line Comment", + 59, "SCE_HJA_COMMENTDOC", "server javascript comment documentation", "JS Doc comment", + 60, "SCE_HJA_NUMBER", "server javascript literal numeric", "JS Number", + 61, "SCE_HJA_WORD", "server javascript identifier", "JS Word", + 62, "SCE_HJA_KEYWORD", "server javascript keyword", "JS Keyword", + 63, "SCE_HJA_DOUBLESTRING", "server javascript literal string", "JS Double quoted string", + 64, "SCE_HJA_SINGLESTRING", "server javascript literal string", "JS Single quoted string", + 65, "SCE_HJA_SYMBOLS", "server javascript operator", "JS Symbols", + 66, "SCE_HJA_STRINGEOL", "server javascript error literal string", "JavaScript EOL", + 67, "SCE_HJA_REGEX", "server javascript literal regex", "JavaScript RegEx", + 68, "", "unused", "", + 69, "", "unused", "", + 70, "SCE_HB_START", "client basic default", "Start", + 71, "SCE_HB_DEFAULT", "client basic default", "Default", + 72, "SCE_HB_COMMENTLINE", "client basic comment line", "Comment", + 73, "SCE_HB_NUMBER", "client basic literal numeric", "Number", + 74, "SCE_HB_WORD", "client basic keyword", "KeyWord", + 75, "SCE_HB_STRING", "client basic literal string", "String", + 76, "SCE_HB_IDENTIFIER", "client basic identifier", "Identifier", + 77, "SCE_HB_STRINGEOL", "client basic literal string", "Unterminated string", + 78, "", "unused", "", + 79, "", "unused", "", + 80, "SCE_HBA_START", "server basic default", "Start", + 81, "SCE_HBA_DEFAULT", "server basic default", "Default", + 82, "SCE_HBA_COMMENTLINE", "server basic comment line", "Comment", + 83, "SCE_HBA_NUMBER", "server basic literal numeric", "Number", + 84, "SCE_HBA_WORD", "server basic keyword", "KeyWord", + 85, "SCE_HBA_STRING", "server basic literal string", "String", + 86, "SCE_HBA_IDENTIFIER", "server basic identifier", "Identifier", + 87, "SCE_HBA_STRINGEOL", "server basic literal string", "Unterminated string", + 88, "", "unused", "", + 89, "", "unused", "", + 90, "SCE_HP_START", "client python default", "Embedded Python", + 91, "SCE_HP_DEFAULT", "client python default", "Embedded Python", + 92, "SCE_HP_COMMENTLINE", "client python comment line", "Comment", + 93, "SCE_HP_NUMBER", "client python literal numeric", "Number", + 94, "SCE_HP_STRING", "client python literal string", "String", + 95, "SCE_HP_CHARACTER", "client python literal string character", "Single quoted string", + 96, "SCE_HP_WORD", "client python keyword", "Keyword", + 97, "SCE_HP_TRIPLE", "client python literal string", "Triple quotes", + 98, "SCE_HP_TRIPLEDOUBLE", "client python literal string", "Triple double quotes", + 99, "SCE_HP_CLASSNAME", "client python identifier", "Class name definition", + 100, "SCE_HP_DEFNAME", "client python identifier", "Function or method name definition", + 101, "SCE_HP_OPERATOR", "client python operator", "Operators", + 102, "SCE_HP_IDENTIFIER", "client python identifier", "Identifiers", + 103, "", "unused", "", + 104, "SCE_HPHP_COMPLEX_VARIABLE", "server php identifier", "PHP complex variable", + 105, "SCE_HPA_START", "server python default", "ASP Python", + 106, "SCE_HPA_DEFAULT", "server python default", "ASP Python", + 107, "SCE_HPA_COMMENTLINE", "server python comment line", "Comment", + 108, "SCE_HPA_NUMBER", "server python literal numeric", "Number", + 109, "SCE_HPA_STRING", "server python literal string", "String", + 110, "SCE_HPA_CHARACTER", "server python literal string character", "Single quoted string", + 111, "SCE_HPA_WORD", "server python keyword", "Keyword", + 112, "SCE_HPA_TRIPLE", "server python literal string", "Triple quotes", + 113, "SCE_HPA_TRIPLEDOUBLE", "server python literal string", "Triple double quotes", + 114, "SCE_HPA_CLASSNAME", "server python identifier", "Class name definition", + 115, "SCE_HPA_DEFNAME", "server python identifier", "Function or method name definition", + 116, "SCE_HPA_OPERATOR", "server python operator", "Operators", + 117, "SCE_HPA_IDENTIFIER", "server python identifier", "Identifiers", + 118, "SCE_HPHP_DEFAULT", "server php default", "Default", + 119, "SCE_HPHP_HSTRING", "server php literal string", "Double quoted String", + 120, "SCE_HPHP_SIMPLESTRING", "server php literal string", "Single quoted string", + 121, "SCE_HPHP_WORD", "server php keyword", "Keyword", + 122, "SCE_HPHP_NUMBER", "server php literal numeric", "Number", + 123, "SCE_HPHP_VARIABLE", "server php identifier", "Variable", + 124, "SCE_HPHP_COMMENT", "server php comment", "Comment", + 125, "SCE_HPHP_COMMENTLINE", "server php comment line", "One line comment", + 126, "SCE_HPHP_HSTRING_VARIABLE", "server php literal string identifier", "PHP variable in double quoted string", + 127, "SCE_HPHP_OPERATOR", "server php operator", "PHP operator", +}; + +LexicalClass lexicalClassesXML[] = { + // Lexer.Secondary XML SCLEX_XML SCE_H_: + 0, "SCE_H_DEFAULT", "default", "Default", + 1, "SCE_H_TAG", "tag", "Tags", + 2, "SCE_H_TAGUNKNOWN", "error tag", "Unknown Tags", + 3, "SCE_H_ATTRIBUTE", "attribute", "Attributes", + 4, "SCE_H_ERRORATTRIBUTEUNKNOWN", "error attribute", "Unknown Attributes", + 5, "SCE_H_NUMBER", "literal numeric", "Numbers", + 6, "SCE_H_DOUBLESTRING", "literal string", "Double quoted strings", + 7, "SCE_H_SINGLESTRING", "literal string", "Single quoted strings", + 8, "SCE_H_OTHER", "tag operator", "Other inside tag, including space and '='", + 9, "SCE_H_COMMENT", "comment", "Comment", + 10, "SCE_H_ENTITY", "literal", "Entities", + 11, "SCE_H_TAGEND", "tag", "XML style tag ends '/>'", + 12, "SCE_H_XMLSTART", "identifier", "XML identifier start ''", + 14, "", "unused", "", + 15, "", "unused", "", + 16, "", "unused", "", + 17, "SCE_H_CDATA", "literal", "CDATA", + 18, "SCE_H_QUESTION", "preprocessor", "Question", + 19, "SCE_H_VALUE", "literal string", "Unquoted Value", + 20, "", "unused", "", + 21, "SCE_H_SGML_DEFAULT", "default", "SGML tags ", + 22, "SCE_H_SGML_COMMAND", "preprocessor", "SGML command", + 23, "SCE_H_SGML_1ST_PARAM", "preprocessor", "SGML 1st param", + 24, "SCE_H_SGML_DOUBLESTRING", "literal string", "SGML double string", + 25, "SCE_H_SGML_SIMPLESTRING", "literal string", "SGML single string", + 26, "SCE_H_SGML_ERROR", "error", "SGML error", + 27, "SCE_H_SGML_SPECIAL", "literal", "SGML special (#XXXX type)", + 28, "SCE_H_SGML_ENTITY", "literal", "SGML entity", + 29, "SCE_H_SGML_COMMENT", "comment", "SGML comment", + 30, "", "unused", "", + 31, "SCE_H_SGML_BLOCK_DEFAULT", "default", "SGML block", +}; + +const char *tagsThatDoNotFold[] = { + "area", + "base", + "basefont", + "br", + "col", + "command", + "embed", + "frame", + "hr", + "img", + "input", + "isindex", + "keygen", + "link", + "meta", + "param", + "source", + "track", + "wbr" +}; + +} +class LexerHTML : public DefaultLexer { + bool isXml; + bool isPHPScript; + WordList keywords; + WordList keywords2; + WordList keywords3; + WordList keywords4; + WordList keywords5; + WordList keywords6; // SGML (DTD) keywords + OptionsHTML options; + OptionSetHTML osHTML; + std::set nonFoldingTags; +public: + explicit LexerHTML(bool isXml_, bool isPHPScript_) : + DefaultLexer(isXml_ ? lexicalClassesHTML : lexicalClassesXML, + isXml_ ? ELEMENTS(lexicalClassesHTML) : ELEMENTS(lexicalClassesXML)), + isXml(isXml_), + isPHPScript(isPHPScript_), + osHTML(isPHPScript_), + nonFoldingTags(std::begin(tagsThatDoNotFold), std::end(tagsThatDoNotFold)) { + } + ~LexerHTML() override { + } + void SCI_METHOD Release() override { + delete this; + } + const char *SCI_METHOD PropertyNames() override { + return osHTML.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osHTML.PropertyType(name); + } + const char *SCI_METHOD DescribeProperty(const char *name) override { + return osHTML.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char *SCI_METHOD DescribeWordListSets() override { + return osHTML.DescribeWordListSets(); + } + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + // No Fold as all folding performs in Lex. + + static ILexer *LexerFactoryHTML() { + return new LexerHTML(false, false); + } + static ILexer *LexerFactoryXML() { + return new LexerHTML(true, false); + } + static ILexer *LexerFactoryPHPScript() { + return new LexerHTML(false, true); + } +}; + +Sci_Position SCI_METHOD LexerHTML::PropertySet(const char *key, const char *val) { + if (osHTML.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerHTML::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywords; + break; + case 1: + wordListN = &keywords2; + break; + case 2: + wordListN = &keywords3; + break; + case 3: + wordListN = &keywords4; + break; + case 4: + wordListN = &keywords5; + break; + case 5: + wordListN = &keywords6; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + Accessor styler(pAccess, nullptr); + if (isPHPScript && (startPos == 0)) { + initStyle = SCE_HPHP_DEFAULT; + } + styler.StartAt(startPos); + std::string prevWord; + std::string phpStringDelimiter; + int StateToPrint = initStyle; + int state = stateForPrintState(StateToPrint); + std::string makoBlockType; + int makoComment = 0; + std::string djangoBlockType; + // If inside a tag, it may be a script tag, so reread from the start of line starting tag to ensure any language tags are seen + if (InTagState(state)) { + while ((startPos > 0) && (InTagState(styler.StyleAt(startPos - 1)))) { + const Sci_Position backLineStart = styler.LineStart(styler.GetLine(startPos-1)); + length += startPos - backLineStart; + startPos = backLineStart; + } + state = SCE_H_DEFAULT; + } + // String can be heredoc, must find a delimiter first. Reread from beginning of line containing the string, to get the correct lineState + if (isPHPStringState(state)) { + while (startPos > 0 && (isPHPStringState(state) || !isLineEnd(styler[startPos - 1]))) { + startPos--; + length++; + state = styler.StyleAt(startPos); + } + if (startPos == 0) + state = SCE_H_DEFAULT; + } + styler.StartAt(startPos); + + /* Nothing handles getting out of these, so we need not start in any of them. + * As we're at line start and they can't span lines, we'll re-detect them anyway */ + switch (state) { + case SCE_H_QUESTION: + case SCE_H_XMLSTART: + case SCE_H_XMLEND: + case SCE_H_ASP: + state = SCE_H_DEFAULT; + break; + } + + Sci_Position lineCurrent = styler.GetLine(startPos); + int lineState; + if (lineCurrent > 0) { + lineState = styler.GetLineState(lineCurrent-1); + } else { + // Default client and ASP scripting language is JavaScript + lineState = eScriptJS << 8; + lineState |= options.aspDefaultLanguage << 4; + } + script_mode inScriptType = static_cast((lineState >> 0) & 0x03); // 2 bits of scripting mode + + bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag + bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag + bool tagDontFold = false; //some HTML tags should not be folded + script_type aspScript = static_cast((lineState >> 4) & 0x0F); // 4 bits of script name + script_type clientScript = static_cast((lineState >> 8) & 0x0F); // 4 bits of script name + int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state + + script_type scriptLanguage = ScriptOfState(state); + // If eNonHtmlScript coincides with SCE_H_COMMENT, assume eScriptComment + if (inScriptType == eNonHtmlScript && state == SCE_H_COMMENT) { + scriptLanguage = eScriptComment; + } + script_type beforeLanguage = ScriptOfState(beforePreProc); + const bool foldHTML = options.foldHTML; + const bool fold = foldHTML && options.fold; + const bool foldHTMLPreprocessor = foldHTML && options.foldHTMLPreprocessor; + const bool foldCompact = options.foldCompact; + const bool foldComment = fold && options.foldComment; + const bool foldHeredoc = fold && options.foldHeredoc; + const bool caseSensitive = options.caseSensitive; + const bool allowScripts = options.allowScripts; + const bool isMako = options.isMako; + const bool isDjango = options.isDjango; + const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", 0x80, true); + const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", 0x80, true); + const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", 0x80, true); + // TODO: also handle + and - (except if they're part of ++ or --) and return keywords + const CharacterSet setOKBeforeJSRE(CharacterSet::setNone, "([{=,:;!%^&*|?~"); + + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int visibleChars = 0; + int lineStartVisibleChars = 0; + + int chPrev = ' '; + int ch = ' '; + int chPrevNonWhite = ' '; + // look back to set chPrevNonWhite properly for better regex colouring + if (scriptLanguage == eScriptJS && startPos > 0) { + Sci_Position back = startPos; + int style = 0; + while (--back) { + style = styler.StyleAt(back); + if (style < SCE_HJ_DEFAULT || style > SCE_HJ_COMMENTDOC) + // includes SCE_HJ_COMMENT & SCE_HJ_COMMENTLINE + break; + } + if (style == SCE_HJ_SYMBOLS) { + chPrevNonWhite = static_cast(styler.SafeGetCharAt(back)); + } + } + + styler.StartSegment(startPos); + const Sci_Position lengthDoc = startPos + length; + for (Sci_Position i = startPos; i < lengthDoc; i++) { + const int chPrev2 = chPrev; + chPrev = ch; + if (!IsASpace(ch) && state != SCE_HJ_COMMENT && + state != SCE_HJ_COMMENTLINE && state != SCE_HJ_COMMENTDOC) + chPrevNonWhite = ch; + ch = static_cast(styler[i]); + int chNext = static_cast(styler.SafeGetCharAt(i + 1)); + const int chNext2 = static_cast(styler.SafeGetCharAt(i + 2)); + + // Handle DBCS codepages + if (styler.IsLeadByte(static_cast(ch))) { + chPrev = ' '; + i += 1; + continue; + } + + if ((!IsASpace(ch) || !foldCompact) && fold) + visibleChars++; + if (!IsASpace(ch)) + lineStartVisibleChars++; + + // decide what is the current state to print (depending of the script tag) + StateToPrint = statePrintForState(state, inScriptType); + + // handle script folding + if (fold) { + switch (scriptLanguage) { + case eScriptJS: + case eScriptPHP: + //not currently supported case eScriptVBS: + + if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { + //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); + //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { + if (ch == '#') { + Sci_Position j = i + 1; + while ((j < lengthDoc) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (styler.Match(j, "region") || styler.Match(j, "if")) { + levelCurrent++; + } else if (styler.Match(j, "end")) { + levelCurrent--; + } + } else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*'))) { + levelCurrent += (((ch == '{') || (ch == '/')) ? 1 : -1); + } + } else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT)) && foldComment && (ch == '*') && (chNext == '/')) { + levelCurrent--; + } + break; + case eScriptPython: + if (state != SCE_HP_COMMENTLINE && !isMako) { + if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { + levelCurrent++; + } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { + // check if the number of tabs is lower than the level + int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; + for (Sci_Position j = 0; Findlevel > 0; j++) { + const char chTmp = styler.SafeGetCharAt(i + j + 1); + if (chTmp == '\t') { + Findlevel -= 8; + } else if (chTmp == ' ') { + Findlevel--; + } else { + break; + } + } + + if (Findlevel > 0) { + levelCurrent -= Findlevel / 8; + if (Findlevel % 8) + levelCurrent--; + } + } + } + break; + default: + break; + } + } + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // New line -> record any line state onto /next/ line + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + + styler.SetLevel(lineCurrent, lev); + visibleChars = 0; + levelPrev = levelCurrent; + } + styler.SetLineState(lineCurrent, + ((inScriptType & 0x03) << 0) | + ((tagOpened ? 1 : 0) << 2) | + ((tagClosing ? 1 : 0) << 3) | + ((aspScript & 0x0F) << 4) | + ((clientScript & 0x0F) << 8) | + ((beforePreProc & 0xFF) << 12)); + lineCurrent++; + lineStartVisibleChars = 0; + } + + // handle start of Mako comment line + if (isMako && ch == '#' && chNext == '#') { + makoComment = 1; + state = SCE_HP_COMMENTLINE; + } + + // handle end of Mako comment line + else if (isMako && makoComment && (ch == '\r' || ch == '\n')) { + makoComment = 0; + styler.ColourTo(i - 1, StateToPrint); + if (scriptLanguage == eScriptPython) { + state = SCE_HP_DEFAULT; + } else { + state = SCE_H_DEFAULT; + } + } + // Allow falling through to mako handling code if newline is going to end a block + if (((ch == '\r' && chNext != '\n') || (ch == '\n')) && + (!isMako || (makoBlockType != "%"))) { + } + // Ignore everything in mako comment until the line ends + else if (isMako && makoComment) { + } + + // generic end of script processing + else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { + // Check if it's the end of the script tag (or any other HTML tag) + switch (state) { + // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) + case SCE_H_DOUBLESTRING: + case SCE_H_SINGLESTRING: + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + //case SCE_HJ_COMMENTLINE: // removed as this is a common thing done to hide + // the end of script marker from some JS interpreters. + case SCE_HB_COMMENTLINE: + case SCE_HBA_COMMENTLINE: + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HJ_REGEX: + case SCE_HB_STRING: + case SCE_HBA_STRING: + case SCE_HP_STRING: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + case SCE_HPHP_HSTRING: + case SCE_HPHP_SIMPLESTRING: + case SCE_HPHP_COMMENT: + case SCE_HPHP_COMMENTLINE: + break; + default : + // check if the closing tag is a script tag + if (const char *tag = + state == SCE_HJ_COMMENTLINE || isXml ? "script" : + state == SCE_H_COMMENT ? "comment" : 0) { + Sci_Position j = i + 2; + int chr; + do { + chr = static_cast(*tag++); + } while (chr != 0 && chr == MakeLowerCase(styler.SafeGetCharAt(j++))); + if (chr != 0) break; + } + // closing tag of the script (it's a closing HTML tag anyway) + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_TAGUNKNOWN; + inScriptType = eHtml; + scriptLanguage = eScriptNone; + clientScript = eScriptJS; + i += 2; + visibleChars += 2; + tagClosing = true; + continue; + } + } + + ///////////////////////////////////// + // handle the start of PHP pre-processor = Non-HTML + else if ((state != SCE_H_ASPAT) && + !isStringState(state) && + (state != SCE_HPHP_COMMENT) && + (state != SCE_HPHP_COMMENTLINE) && + (ch == '<') && + (chNext == '?') && + !IsScriptCommentState(state)) { + beforeLanguage = scriptLanguage; + scriptLanguage = segIsScriptingIndicator(styler, i + 2, i + 6, isXml ? eScriptXML : eScriptPHP); + if ((scriptLanguage != eScriptPHP) && (isStringState(state) || (state==SCE_H_COMMENT))) continue; + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + i++; + visibleChars++; + i += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 6); + if (scriptLanguage == eScriptXML) + styler.ColourTo(i, SCE_H_XMLSTART); + else + styler.ColourTo(i, SCE_H_QUESTION); + state = StateForScript(scriptLanguage); + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + // Fold whole script, but not if the XML first tag (all XML-like tags in this case) + if (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) { + levelCurrent++; + } + // should be better + ch = static_cast(styler.SafeGetCharAt(i)); + continue; + } + + // handle the start Mako template Python code + else if (isMako && scriptLanguage == eScriptNone && ((ch == '<' && chNext == '%') || + (lineStartVisibleChars == 1 && ch == '%') || + (lineStartVisibleChars == 1 && ch == '/' && chNext == '%') || + (ch == '$' && chNext == '{') || + (ch == '<' && chNext == '/' && chNext2 == '%'))) { + if (ch == '%' || ch == '/') + makoBlockType = "%"; + else if (ch == '$') + makoBlockType = "{"; + else if (chNext == '/') + makoBlockType = GetNextWord(styler, i+3); + else + makoBlockType = GetNextWord(styler, i+2); + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + + if (chNext == '/') { + i += 2; + visibleChars += 2; + } else if (ch != '%') { + i++; + visibleChars++; + } + state = SCE_HP_START; + scriptLanguage = eScriptPython; + styler.ColourTo(i, SCE_H_ASP); + if (ch != '%' && ch != '$' && ch != '/') { + i += makoBlockType.length(); + visibleChars += static_cast(makoBlockType.length()); + if (keywords4.InList(makoBlockType.c_str())) + styler.ColourTo(i, SCE_HP_WORD); + else + styler.ColourTo(i, SCE_H_TAGUNKNOWN); + } + + ch = static_cast(styler.SafeGetCharAt(i)); + continue; + } + + // handle the start/end of Django comment + else if (isDjango && state != SCE_H_COMMENT && (ch == '{' && chNext == '#')) { + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + beforeLanguage = scriptLanguage; + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + i += 1; + visibleChars += 1; + scriptLanguage = eScriptComment; + state = SCE_H_COMMENT; + styler.ColourTo(i, SCE_H_ASP); + ch = static_cast(styler.SafeGetCharAt(i)); + continue; + } else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) { + styler.ColourTo(i - 1, StateToPrint); + i += 1; + visibleChars += 1; + styler.ColourTo(i, SCE_H_ASP); + state = beforePreProc; + if (inScriptType == eNonHtmlScriptPreProc) + inScriptType = eNonHtmlScript; + else + inScriptType = eHtml; + scriptLanguage = beforeLanguage; + continue; + } + + // handle the start Django template code + else if (isDjango && scriptLanguage != eScriptPython && scriptLanguage != eScriptComment && (ch == '{' && (chNext == '%' || chNext == '{'))) { + if (chNext == '%') + djangoBlockType = "%"; + else + djangoBlockType = "{"; + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + + i += 1; + visibleChars += 1; + state = SCE_HP_START; + beforeLanguage = scriptLanguage; + scriptLanguage = eScriptPython; + styler.ColourTo(i, SCE_H_ASP); + + ch = static_cast(styler.SafeGetCharAt(i)); + continue; + } + + // handle the start of ASP pre-processor = Non-HTML + else if (!isMako && !isDjango && !isCommentASPState(state) && (ch == '<') && (chNext == '%') && !isPHPStringState(state)) { + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + + if (chNext2 == '@') { + i += 2; // place as if it was the second next char treated + visibleChars += 2; + state = SCE_H_ASPAT; + } else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) { + styler.ColourTo(i + 3, SCE_H_ASP); + state = SCE_H_XCCOMMENT; + scriptLanguage = eScriptVBS; + continue; + } else { + if (chNext2 == '=') { + i += 2; // place as if it was the second next char treated + visibleChars += 2; + } else { + i++; // place as if it was the next char treated + visibleChars++; + } + + state = StateForScript(aspScript); + } + scriptLanguage = eScriptVBS; + styler.ColourTo(i, SCE_H_ASP); + // fold whole script + if (foldHTMLPreprocessor) + levelCurrent++; + // should be better + ch = static_cast(styler.SafeGetCharAt(i)); + continue; + } + + ///////////////////////////////////// + // handle the start of SGML language (DTD) + else if (((scriptLanguage == eScriptNone) || (scriptLanguage == eScriptXML)) && + (chPrev == '<') && + (ch == '!') && + (StateToPrint != SCE_H_CDATA) && + (!IsCommentState(StateToPrint)) && + (!IsScriptCommentState(StateToPrint))) { + beforePreProc = state; + styler.ColourTo(i - 2, StateToPrint); + if ((chNext == '-') && (chNext2 == '-')) { + state = SCE_H_COMMENT; // wait for a pending command + styler.ColourTo(i + 2, SCE_H_COMMENT); + i += 2; // follow styling after the -- + } else if (isWordCdata(i + 1, i + 7, styler)) { + state = SCE_H_CDATA; + } else { + styler.ColourTo(i, SCE_H_SGML_DEFAULT); // ') { + i++; + visibleChars++; + } + else if ((makoBlockType == "%") && ch == '/') { + i++; + visibleChars++; + } + if ((makoBlockType != "%") || ch == '/') { + styler.ColourTo(i, SCE_H_ASP); + } + state = beforePreProc; + if (inScriptType == eNonHtmlScriptPreProc) + inScriptType = eNonHtmlScript; + else + inScriptType = eHtml; + scriptLanguage = eScriptNone; + continue; + } + + // handle the end of Django template code + else if (isDjango && + ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && + (scriptLanguage != eScriptNone) && stateAllowsTermination(state) && + isDjangoBlockEnd(ch, chNext, djangoBlockType)) { + if (state == SCE_H_ASPAT) { + aspScript = segIsScriptingIndicator(styler, + styler.GetStartSegment(), i - 1, aspScript); + } + if (state == SCE_HP_WORD) { + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); + } else { + styler.ColourTo(i - 1, StateToPrint); + } + i += 1; + visibleChars += 1; + styler.ColourTo(i, SCE_H_ASP); + state = beforePreProc; + if (inScriptType == eNonHtmlScriptPreProc) + inScriptType = eNonHtmlScript; + else + inScriptType = eHtml; + scriptLanguage = beforeLanguage; + continue; + } + + // handle the end of a pre-processor = Non-HTML + else if ((!isMako && !isDjango && ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && + (((scriptLanguage != eScriptNone) && stateAllowsTermination(state))) && + (((ch == '%') || (ch == '?')) && (chNext == '>'))) || + ((scriptLanguage == eScriptSGML) && (ch == '>') && (state != SCE_H_SGML_COMMENT))) { + if (state == SCE_H_ASPAT) { + aspScript = segIsScriptingIndicator(styler, + styler.GetStartSegment(), i - 1, aspScript); + } + // Bounce out of any ASP mode + switch (state) { + case SCE_HJ_WORD: + classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); + break; + case SCE_HB_WORD: + classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); + break; + case SCE_HP_WORD: + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); + break; + case SCE_HPHP_WORD: + classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); + break; + case SCE_H_XCCOMMENT: + styler.ColourTo(i - 1, state); + break; + default : + styler.ColourTo(i - 1, StateToPrint); + break; + } + if (scriptLanguage != eScriptSGML) { + i++; + visibleChars++; + } + if (ch == '%') + styler.ColourTo(i, SCE_H_ASP); + else if (scriptLanguage == eScriptXML) + styler.ColourTo(i, SCE_H_XMLEND); + else if (scriptLanguage == eScriptSGML) + styler.ColourTo(i, SCE_H_SGML_DEFAULT); + else + styler.ColourTo(i, SCE_H_QUESTION); + state = beforePreProc; + if (inScriptType == eNonHtmlScriptPreProc) + inScriptType = eNonHtmlScript; + else + inScriptType = eHtml; + // Unfold all scripting languages, except for XML tag + if (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) { + levelCurrent--; + } + scriptLanguage = beforeLanguage; + continue; + } + ///////////////////////////////////// + + switch (state) { + case SCE_H_DEFAULT: + if (ch == '<') { + // in HTML, fold on tag open and unfold on tag close + tagOpened = true; + tagClosing = (chNext == '/'); + styler.ColourTo(i - 1, StateToPrint); + if (chNext != '!') + state = SCE_H_TAGUNKNOWN; + } else if (ch == '&') { + styler.ColourTo(i - 1, SCE_H_DEFAULT); + state = SCE_H_ENTITY; + } + break; + case SCE_H_SGML_DEFAULT: + case SCE_H_SGML_BLOCK_DEFAULT: +// if (scriptLanguage == eScriptSGMLblock) +// StateToPrint = SCE_H_SGML_BLOCK_DEFAULT; + + if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SGML_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SGML_SIMPLESTRING; + } else if ((ch == '-') && (chPrev == '-')) { + if (static_cast(styler.GetStartSegment()) <= (i - 2)) { + styler.ColourTo(i - 2, StateToPrint); + } + state = SCE_H_SGML_COMMENT; + } else if (IsASCII(ch) && isalpha(ch) && (chPrev == '%')) { + styler.ColourTo(i - 2, StateToPrint); + state = SCE_H_SGML_ENTITY; + } else if (ch == '#') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SGML_SPECIAL; + } else if (ch == '[') { + styler.ColourTo(i - 1, StateToPrint); + scriptLanguage = eScriptSGMLblock; + state = SCE_H_SGML_BLOCK_DEFAULT; + } else if (ch == ']') { + if (scriptLanguage == eScriptSGMLblock) { + styler.ColourTo(i, StateToPrint); + scriptLanguage = eScriptSGML; + } else { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_H_SGML_ERROR); + } + state = SCE_H_SGML_DEFAULT; + } else if (scriptLanguage == eScriptSGMLblock) { + if ((ch == '!') && (chPrev == '<')) { + styler.ColourTo(i - 2, StateToPrint); + styler.ColourTo(i, SCE_H_SGML_DEFAULT); + state = SCE_H_SGML_COMMAND; + } else if (ch == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_H_SGML_DEFAULT); + } + } + break; + case SCE_H_SGML_COMMAND: + if ((ch == '-') && (chPrev == '-')) { + styler.ColourTo(i - 2, StateToPrint); + state = SCE_H_SGML_COMMENT; + } else if (!issgmlwordchar(ch)) { + if (isWordHSGML(styler.GetStartSegment(), i - 1, keywords6, styler)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SGML_1ST_PARAM; + } else { + state = SCE_H_SGML_ERROR; + } + } + break; + case SCE_H_SGML_1ST_PARAM: + // wait for the beginning of the word + if ((ch == '-') && (chPrev == '-')) { + if (scriptLanguage == eScriptSGMLblock) { + styler.ColourTo(i - 2, SCE_H_SGML_BLOCK_DEFAULT); + } else { + styler.ColourTo(i - 2, SCE_H_SGML_DEFAULT); + } + state = SCE_H_SGML_1ST_PARAM_COMMENT; + } else if (issgmlwordchar(ch)) { + if (scriptLanguage == eScriptSGMLblock) { + styler.ColourTo(i - 1, SCE_H_SGML_BLOCK_DEFAULT); + } else { + styler.ColourTo(i - 1, SCE_H_SGML_DEFAULT); + } + // find the length of the word + int size = 1; + while (setHTMLWord.Contains(static_cast(styler.SafeGetCharAt(i + size)))) + size++; + styler.ColourTo(i + size - 1, StateToPrint); + i += size - 1; + visibleChars += size - 1; + ch = static_cast(styler.SafeGetCharAt(i)); + if (scriptLanguage == eScriptSGMLblock) { + state = SCE_H_SGML_BLOCK_DEFAULT; + } else { + state = SCE_H_SGML_DEFAULT; + } + continue; + } + break; + case SCE_H_SGML_ERROR: + if ((ch == '-') && (chPrev == '-')) { + styler.ColourTo(i - 2, StateToPrint); + state = SCE_H_SGML_COMMENT; + } + break; + case SCE_H_SGML_DOUBLESTRING: + if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_SGML_DEFAULT; + } + break; + case SCE_H_SGML_SIMPLESTRING: + if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_SGML_DEFAULT; + } + break; + case SCE_H_SGML_COMMENT: + if ((ch == '-') && (chPrev == '-')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_SGML_DEFAULT; + } + break; + case SCE_H_CDATA: + if ((chPrev2 == ']') && (chPrev == ']') && (ch == '>')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + levelCurrent--; + } + break; + case SCE_H_COMMENT: + if ((scriptLanguage != eScriptComment) && (chPrev2 == '-') && (chPrev == '-') && (ch == '>')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + levelCurrent--; + } + break; + case SCE_H_SGML_1ST_PARAM_COMMENT: + if ((ch == '-') && (chPrev == '-')) { + styler.ColourTo(i, SCE_H_SGML_COMMENT); + state = SCE_H_SGML_1ST_PARAM; + } + break; + case SCE_H_SGML_SPECIAL: + if (!(IsASCII(ch) && isupper(ch))) { + styler.ColourTo(i - 1, StateToPrint); + if (isalnum(ch)) { + state = SCE_H_SGML_ERROR; + } else { + state = SCE_H_SGML_DEFAULT; + } + } + break; + case SCE_H_SGML_ENTITY: + if (ch == ';') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_SGML_DEFAULT; + } else if (!(IsASCII(ch) && isalnum(ch)) && ch != '-' && ch != '.') { + styler.ColourTo(i, SCE_H_SGML_ERROR); + state = SCE_H_SGML_DEFAULT; + } + break; + case SCE_H_ENTITY: + if (ch == ';') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + if (ch != '#' && !(IsASCII(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway... + && ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML + if (!IsASCII(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style + styler.ColourTo(i-1, SCE_H_TAGUNKNOWN); + else + styler.ColourTo(i, SCE_H_TAGUNKNOWN); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_TAGUNKNOWN: + if (!setTagContinue.Contains(ch) && !((ch == '/') && (chPrev == '<'))) { + int eClass = classifyTagHTML(styler.GetStartSegment(), + i - 1, keywords, styler, tagDontFold, caseSensitive, isXml, allowScripts, nonFoldingTags); + if (eClass == SCE_H_SCRIPT || eClass == SCE_H_COMMENT) { + if (!tagClosing) { + inScriptType = eNonHtmlScript; + scriptLanguage = eClass == SCE_H_SCRIPT ? clientScript : eScriptComment; + } else { + scriptLanguage = eScriptNone; + } + eClass = SCE_H_TAG; + } + if (ch == '>') { + styler.ColourTo(i, eClass); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + tagOpened = false; + if (!tagDontFold) { + if (tagClosing) { + levelCurrent--; + } else { + levelCurrent++; + } + } + tagClosing = false; + } else if (ch == '/' && chNext == '>') { + if (eClass == SCE_H_TAGUNKNOWN) { + styler.ColourTo(i + 1, SCE_H_TAGUNKNOWN); + } else { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_TAGEND); + } + i++; + ch = chNext; + state = SCE_H_DEFAULT; + tagOpened = false; + } else { + if (eClass != SCE_H_TAGUNKNOWN) { + if (eClass == SCE_H_SGML_DEFAULT) { + state = SCE_H_SGML_DEFAULT; + } else { + state = SCE_H_OTHER; + } + } + } + } + break; + case SCE_H_ATTRIBUTE: + if (!setAttributeContinue.Contains(ch)) { + if (inScriptType == eNonHtmlScript) { + const int scriptLanguagePrev = scriptLanguage; + clientScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage); + scriptLanguage = clientScript; + if ((scriptLanguagePrev != scriptLanguage) && (scriptLanguage == eScriptNone)) + inScriptType = eHtml; + } + classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + tagOpened = false; + if (!tagDontFold) { + if (tagClosing) { + levelCurrent--; + } else { + levelCurrent++; + } + } + tagClosing = false; + } else if (ch == '=') { + styler.ColourTo(i, SCE_H_OTHER); + state = SCE_H_VALUE; + } else { + state = SCE_H_OTHER; + } + } + break; + case SCE_H_OTHER: + if (ch == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + tagOpened = false; + if (!tagDontFold) { + if (tagClosing) { + levelCurrent--; + } else { + levelCurrent++; + } + } + tagClosing = false; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SINGLESTRING; + } else if (ch == '=') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_VALUE; + } else if (ch == '/' && chNext == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_TAGEND); + i++; + ch = chNext; + state = SCE_H_DEFAULT; + tagOpened = false; + } else if (ch == '?' && chNext == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_XMLEND); + i++; + ch = chNext; + state = SCE_H_DEFAULT; + } else if (setHTMLWord.Contains(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_ATTRIBUTE; + } + break; + case SCE_H_DOUBLESTRING: + if (ch == '\"') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); + } + styler.ColourTo(i, SCE_H_DOUBLESTRING); + state = SCE_H_OTHER; + } + break; + case SCE_H_SINGLESTRING: + if (ch == '\'') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); + } + styler.ColourTo(i, SCE_H_SINGLESTRING); + state = SCE_H_OTHER; + } + break; + case SCE_H_VALUE: + if (!setHTMLWord.Contains(ch)) { + if (ch == '\"' && chPrev == '=') { + // Should really test for being first character + state = SCE_H_DOUBLESTRING; + } else if (ch == '\'' && chPrev == '=') { + state = SCE_H_SINGLESTRING; + } else { + if (IsNumber(styler.GetStartSegment(), styler)) { + styler.ColourTo(i - 1, SCE_H_NUMBER); + } else { + styler.ColourTo(i - 1, StateToPrint); + } + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + tagOpened = false; + if (!tagDontFold) { + if (tagClosing) { + levelCurrent--; + } else { + levelCurrent++; + } + } + tagClosing = false; + } else { + state = SCE_H_OTHER; + } + } + } + break; + case SCE_HJ_DEFAULT: + case SCE_HJ_START: + case SCE_HJ_SYMBOLS: + if (IsAWordStart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_WORD; + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext2 == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + if (chNext2 == '/') { + // Eat the * so it isn't used for the end of the comment + i++; + } + } else if (ch == '/' && chNext == '/') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + } else if (ch == '/' && setOKBeforeJSRE.Contains(chPrevNonWhite)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_REGEX; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_SINGLESTRING; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (IsOperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + state = SCE_HJ_DEFAULT; + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HJ_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DEFAULT; + } + } + break; + case SCE_HJ_WORD: + if (!IsAWordChar(ch)) { + classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); + //styler.ColourTo(i - 1, eHTJSKeyword); + state = SCE_HJ_DEFAULT; + if (ch == '/' && chNext == '*') { + if (chNext2 == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_HJ_SINGLESTRING; + } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (IsOperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + state = SCE_HJ_DEFAULT; + } + } + break; + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + if (ch == '/' && chPrev == '*') { + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + ch = ' '; + } + break; + case SCE_HJ_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, statePrintForState(SCE_HJ_COMMENTLINE, inScriptType)); + state = SCE_HJ_DEFAULT; + ch = ' '; + } + break; + case SCE_HJ_DOUBLESTRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + } + } else if (ch == '\"') { + styler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType)); + state = SCE_HJ_DEFAULT; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_STRINGEOL; + } + break; + case SCE_HJ_SINGLESTRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + } + } else if (ch == '\'') { + styler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType)); + state = SCE_HJ_DEFAULT; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + if (chPrev != '\\' && (chPrev2 != '\\' || chPrev != '\r' || ch != '\n')) { + state = SCE_HJ_STRINGEOL; + } + } + break; + case SCE_HJ_STRINGEOL: + if (!isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DEFAULT; + } else if (!isLineEnd(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HJ_REGEX: + if (ch == '\r' || ch == '\n' || ch == '/') { + if (ch == '/') { + while (IsASCII(chNext) && islower(chNext)) { // gobble regex flags + i++; + ch = chNext; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } + } + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + } else if (ch == '\\') { + // Gobble up the quoted character + if (chNext == '\\' || chNext == '/') { + i++; + ch = chNext; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } + } + break; + case SCE_HB_DEFAULT: + case SCE_HB_START: + if (IsAWordStart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_WORD; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_STRING; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_COMMENTLINE; + } else if (IsOperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); + state = SCE_HB_DEFAULT; + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HB_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } + } + break; + case SCE_HB_WORD: + if (!IsAWordChar(ch)) { + state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); + if (state == SCE_HB_DEFAULT) { + if (ch == '\"') { + state = SCE_HB_STRING; + } else if (ch == '\'') { + state = SCE_HB_COMMENTLINE; + } else if (IsOperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); + state = SCE_HB_DEFAULT; + } + } + } + break; + case SCE_HB_STRING: + if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HB_DEFAULT; + } else if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_STRINGEOL; + } + break; + case SCE_HB_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } + break; + case SCE_HB_STRINGEOL: + if (!isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } else if (!isLineEnd(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HB_DEFAULT; + } + break; + case SCE_HP_DEFAULT: + case SCE_HP_START: + if (IsAWordStart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_WORD; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_COMMENTLINE; + } else if (ch == '#') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_HP_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } else { + // state = statePrintForState(SCE_HP_STRING,inScriptType); + state = SCE_HP_STRING; + } + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_HP_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } else { + state = SCE_HP_CHARACTER; + } + } else if (IsOperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HP_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_DEFAULT; + } + } + break; + case SCE_HP_WORD: + if (!IsAWordChar(ch)) { + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); + state = SCE_HP_DEFAULT; + if (ch == '#') { + state = SCE_HP_COMMENTLINE; + } else if (ch == '\"') { + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_HP_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } else { + state = SCE_HP_STRING; + } + } else if (ch == '\'') { + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_HP_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } else { + state = SCE_HP_CHARACTER; + } + } else if (IsOperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); + } + } + break; + case SCE_HP_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_STRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } + } else if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_CHARACTER: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = static_cast(styler.SafeGetCharAt(i + 1)); + } + } else if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_TRIPLE: + if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_TRIPLEDOUBLE: + if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + ///////////// start - PHP state handling + case SCE_HPHP_WORD: + if (!IsAWordChar(ch)) { + classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); + if (ch == '/' && chNext == '*') { + i++; + state = SCE_HPHP_COMMENT; + } else if (ch == '/' && chNext == '/') { + i++; + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '#') { + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HPHP_HSTRING; + phpStringDelimiter = "\""; + } else if (styler.Match(i, "<<<")) { + bool isSimpleString = false; + i = FindPhpStringDelimiter(phpStringDelimiter, i + 3, lengthDoc, styler, isSimpleString); + if (!phpStringDelimiter.empty()) { + state = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING); + if (foldHeredoc) levelCurrent++; + } + } else if (ch == '\'') { + state = SCE_HPHP_SIMPLESTRING; + phpStringDelimiter = "\'"; + } else if (ch == '$' && IsPhpWordStart(chNext)) { + state = SCE_HPHP_VARIABLE; + } else if (IsOperator(ch)) { + state = SCE_HPHP_OPERATOR; + } else { + state = SCE_HPHP_DEFAULT; + } + } + break; + case SCE_HPHP_NUMBER: + // recognize bases 8,10 or 16 integers OR floating-point numbers + if (!IsADigit(ch) + && strchr(".xXabcdefABCDEF", ch) == NULL + && ((ch != '-' && ch != '+') || (chPrev != 'e' && chPrev != 'E'))) { + styler.ColourTo(i - 1, SCE_HPHP_NUMBER); + if (IsOperator(ch)) + state = SCE_HPHP_OPERATOR; + else + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_VARIABLE: + if (!IsPhpWordChar(chNext)) { + styler.ColourTo(i, SCE_HPHP_VARIABLE); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_COMMENT: + if (ch == '/' && chPrev == '*') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_HSTRING: + if (ch == '\\' && ((phpStringDelimiter == "\"") || chNext == '$' || chNext == '{')) { + // skip the next char + i++; + } else if (((ch == '{' && chNext == '$') || (ch == '$' && chNext == '{')) + && IsPhpWordStart(chNext2)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HPHP_COMPLEX_VARIABLE; + } else if (ch == '$' && IsPhpWordStart(chNext)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HPHP_HSTRING_VARIABLE; + } else if (styler.Match(i, phpStringDelimiter.c_str())) { + if (phpStringDelimiter == "\"") { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } else if (isLineEnd(chPrev)) { + const int psdLength = static_cast(phpStringDelimiter.length()); + const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); + const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); + if (isLineEnd(chAfterPsd) || + (chAfterPsd == ';' && isLineEnd(chAfterPsd2))) { + i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + if (foldHeredoc) levelCurrent--; + } + } + } + break; + case SCE_HPHP_SIMPLESTRING: + if (phpStringDelimiter == "\'") { + if (ch == '\\') { + // skip the next char + i++; + } else if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + } else if (isLineEnd(chPrev) && styler.Match(i, phpStringDelimiter.c_str())) { + const int psdLength = static_cast(phpStringDelimiter.length()); + const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); + const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); + if (isLineEnd(chAfterPsd) || + (chAfterPsd == ';' && isLineEnd(chAfterPsd2))) { + i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + if (foldHeredoc) levelCurrent--; + } + } + break; + case SCE_HPHP_HSTRING_VARIABLE: + if (!IsPhpWordChar(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_HSTRING; + } + break; + case SCE_HPHP_COMPLEX_VARIABLE: + if (ch == '}') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_HSTRING; + } + break; + case SCE_HPHP_OPERATOR: + case SCE_HPHP_DEFAULT: + styler.ColourTo(i - 1, StateToPrint); + if (IsADigit(ch) || (ch == '.' && IsADigit(chNext))) { + state = SCE_HPHP_NUMBER; + } else if (IsAWordStart(ch)) { + state = SCE_HPHP_WORD; + } else if (ch == '/' && chNext == '*') { + i++; + state = SCE_HPHP_COMMENT; + } else if (ch == '/' && chNext == '/') { + i++; + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '#') { + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HPHP_HSTRING; + phpStringDelimiter = "\""; + } else if (styler.Match(i, "<<<")) { + bool isSimpleString = false; + i = FindPhpStringDelimiter(phpStringDelimiter, i + 3, lengthDoc, styler, isSimpleString); + if (!phpStringDelimiter.empty()) { + state = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING); + if (foldHeredoc) levelCurrent++; + } + } else if (ch == '\'') { + state = SCE_HPHP_SIMPLESTRING; + phpStringDelimiter = "\'"; + } else if (ch == '$' && IsPhpWordStart(chNext)) { + state = SCE_HPHP_VARIABLE; + } else if (IsOperator(ch)) { + state = SCE_HPHP_OPERATOR; + } else if ((state == SCE_HPHP_OPERATOR) && (IsASpace(ch))) { + state = SCE_HPHP_DEFAULT; + } + break; + ///////////// end - PHP state handling + } + + // Some of the above terminated their lexeme but since the same character starts + // the same class again, only reenter if non empty segment. + + const bool nonEmptySegment = i >= static_cast(styler.GetStartSegment()); + if (state == SCE_HB_DEFAULT) { // One of the above succeeded + if ((ch == '\"') && (nonEmptySegment)) { + state = SCE_HB_STRING; + } else if (ch == '\'') { + state = SCE_HB_COMMENTLINE; + } else if (IsAWordStart(ch)) { + state = SCE_HB_WORD; + } else if (IsOperator(ch)) { + styler.ColourTo(i, SCE_HB_DEFAULT); + } + } else if (state == SCE_HBA_DEFAULT) { // One of the above succeeded + if ((ch == '\"') && (nonEmptySegment)) { + state = SCE_HBA_STRING; + } else if (ch == '\'') { + state = SCE_HBA_COMMENTLINE; + } else if (IsAWordStart(ch)) { + state = SCE_HBA_WORD; + } else if (IsOperator(ch)) { + styler.ColourTo(i, SCE_HBA_DEFAULT); + } + } else if (state == SCE_HJ_DEFAULT) { // One of the above succeeded + if (ch == '/' && chNext == '*') { + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_HJ_COMMENTLINE; + } else if ((ch == '\"') && (nonEmptySegment)) { + state = SCE_HJ_DOUBLESTRING; + } else if ((ch == '\'') && (nonEmptySegment)) { + state = SCE_HJ_SINGLESTRING; + } else if (IsAWordStart(ch)) { + state = SCE_HJ_WORD; + } else if (IsOperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + } + } + } + + switch (state) { + case SCE_HJ_WORD: + classifyWordHTJS(styler.GetStartSegment(), lengthDoc - 1, keywords2, styler, inScriptType); + break; + case SCE_HB_WORD: + classifyWordHTVB(styler.GetStartSegment(), lengthDoc - 1, keywords3, styler, inScriptType); + break; + case SCE_HP_WORD: + classifyWordHTPy(styler.GetStartSegment(), lengthDoc - 1, keywords4, styler, prevWord, inScriptType, isMako); + break; + case SCE_HPHP_WORD: + classifyWordHTPHP(styler.GetStartSegment(), lengthDoc - 1, keywords5, styler); + break; + default: + StateToPrint = statePrintForState(state, inScriptType); + if (static_cast(styler.GetStartSegment()) < lengthDoc) + styler.ColourTo(lengthDoc - 1, StateToPrint); + break; + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + const int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + } + styler.Flush(); +} + +LexerModule lmHTML(SCLEX_HTML, LexerHTML::LexerFactoryHTML, "hypertext", htmlWordListDesc); +LexerModule lmXML(SCLEX_XML, LexerHTML::LexerFactoryXML, "xml", htmlWordListDesc); +LexerModule lmPHPSCRIPT(SCLEX_PHPSCRIPT, LexerHTML::LexerFactoryPHPScript, "phpscript", phpscriptWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexHaskell.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexHaskell.cpp new file mode 100644 index 000000000..680a0f296 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexHaskell.cpp @@ -0,0 +1,1110 @@ +/****************************************************************** + * LexHaskell.cxx + * + * A haskell lexer for the scintilla code control. + * Some stuff "lended" from LexPython.cxx and LexCPP.cxx. + * External lexer stuff inspired from the caml external lexer. + * Folder copied from Python's. + * + * Written by Tobias Engvall - tumm at dtek dot chalmers dot se + * + * Several bug fixes by Krasimir Angelov - kr.angelov at gmail.com + * + * Improved by kudah + * + * TODO: + * * A proper lexical folder to fold group declarations, comments, pragmas, + * #ifdefs, explicit layout, lists, tuples, quasi-quotes, splces, etc, etc, + * etc. + * + *****************************************************************/ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "CharacterCategory.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +// See https://github.com/ghc/ghc/blob/master/compiler/parser/Lexer.x#L1682 +// Note, letter modifiers are prohibited. + +static int u_iswupper (int ch) { + CharacterCategory c = CategoriseCharacter(ch); + return c == ccLu || c == ccLt; +} + +static int u_iswalpha (int ch) { + CharacterCategory c = CategoriseCharacter(ch); + return c == ccLl || c == ccLu || c == ccLt || c == ccLo; +} + +static int u_iswalnum (int ch) { + CharacterCategory c = CategoriseCharacter(ch); + return c == ccLl || c == ccLu || c == ccLt || c == ccLo + || c == ccNd || c == ccNo; +} + +static int u_IsHaskellSymbol(int ch) { + CharacterCategory c = CategoriseCharacter(ch); + return c == ccPc || c == ccPd || c == ccPo + || c == ccSm || c == ccSc || c == ccSk || c == ccSo; +} + +static inline bool IsHaskellLetter(const int ch) { + if (IsASCII(ch)) { + return (ch >= 'a' && ch <= 'z') + || (ch >= 'A' && ch <= 'Z'); + } else { + return u_iswalpha(ch) != 0; + } +} + +static inline bool IsHaskellAlphaNumeric(const int ch) { + if (IsASCII(ch)) { + return IsAlphaNumeric(ch); + } else { + return u_iswalnum(ch) != 0; + } +} + +static inline bool IsHaskellUpperCase(const int ch) { + if (IsASCII(ch)) { + return ch >= 'A' && ch <= 'Z'; + } else { + return u_iswupper(ch) != 0; + } +} + +static inline bool IsAnHaskellOperatorChar(const int ch) { + if (IsASCII(ch)) { + return + ( ch == '!' || ch == '#' || ch == '$' || ch == '%' + || ch == '&' || ch == '*' || ch == '+' || ch == '-' + || ch == '.' || ch == '/' || ch == ':' || ch == '<' + || ch == '=' || ch == '>' || ch == '?' || ch == '@' + || ch == '^' || ch == '|' || ch == '~' || ch == '\\'); + } else { + return u_IsHaskellSymbol(ch) != 0; + } +} + +static inline bool IsAHaskellWordStart(const int ch) { + return IsHaskellLetter(ch) || ch == '_'; +} + +static inline bool IsAHaskellWordChar(const int ch) { + return ( IsHaskellAlphaNumeric(ch) + || ch == '_' + || ch == '\''); +} + +static inline bool IsCommentBlockStyle(int style) { + return (style >= SCE_HA_COMMENTBLOCK && style <= SCE_HA_COMMENTBLOCK3); +} + +static inline bool IsCommentStyle(int style) { + return (style >= SCE_HA_COMMENTLINE && style <= SCE_HA_COMMENTBLOCK3) + || ( style == SCE_HA_LITERATE_COMMENT + || style == SCE_HA_LITERATE_CODEDELIM); +} + +// styles which do not belong to Haskell, but to external tools +static inline bool IsExternalStyle(int style) { + return ( style == SCE_HA_PREPROCESSOR + || style == SCE_HA_LITERATE_COMMENT + || style == SCE_HA_LITERATE_CODEDELIM); +} + +static inline int CommentBlockStyleFromNestLevel(const unsigned int nestLevel) { + return SCE_HA_COMMENTBLOCK + (nestLevel % 3); +} + +// Mangled version of lexlib/Accessor.cxx IndentAmount. +// Modified to treat comment blocks as whitespace +// plus special case for commentline/preprocessor. +static int HaskellIndentAmount(Accessor &styler, const Sci_Position line) { + + // Determines the indentation level of the current line + // Comment blocks are treated as whitespace + + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + + char ch = styler[pos]; + int style = styler.StyleAt(pos); + + int indent = 0; + bool inPrevPrefix = line > 0; + + Sci_Position posPrev = inPrevPrefix ? styler.LineStart(line-1) : 0; + + while (( ch == ' ' || ch == '\t' + || IsCommentBlockStyle(style) + || style == SCE_HA_LITERATE_CODEDELIM) + && (pos < eol_pos)) { + if (inPrevPrefix) { + char chPrev = styler[posPrev++]; + if (chPrev != ' ' && chPrev != '\t') { + inPrevPrefix = false; + } + } + if (ch == '\t') { + indent = (indent / 8 + 1) * 8; + } else { // Space or comment block + indent++; + } + pos++; + ch = styler[pos]; + style = styler.StyleAt(pos); + } + + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment or preprocessor... + if ( styler.LineStart(line) == styler.Length() + || ch == ' ' + || ch == '\t' + || ch == '\n' + || ch == '\r' + || IsCommentStyle(style) + || style == SCE_HA_PREPROCESSOR) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + +struct OptionsHaskell { + bool magicHash; + bool allowQuotes; + bool implicitParams; + bool highlightSafe; + bool cpp; + bool stylingWithinPreprocessor; + bool fold; + bool foldComment; + bool foldCompact; + bool foldImports; + OptionsHaskell() { + magicHash = true; // Widespread use, enabled by default. + allowQuotes = true; // Widespread use, enabled by default. + implicitParams = false; // Fell out of favor, seldom used, disabled. + highlightSafe = true; // Moderately used, doesn't hurt to enable. + cpp = true; // Widespread use, enabled by default; + stylingWithinPreprocessor = false; + fold = false; + foldComment = false; + foldCompact = false; + foldImports = false; + } +}; + +static const char * const haskellWordListDesc[] = { + "Keywords", + "FFI", + "Reserved operators", + 0 +}; + +struct OptionSetHaskell : public OptionSet { + OptionSetHaskell() { + DefineProperty("lexer.haskell.allow.hash", &OptionsHaskell::magicHash, + "Set to 0 to disallow the '#' character at the end of identifiers and " + "literals with the haskell lexer " + "(GHC -XMagicHash extension)"); + + DefineProperty("lexer.haskell.allow.quotes", &OptionsHaskell::allowQuotes, + "Set to 0 to disable highlighting of Template Haskell name quotations " + "and promoted constructors " + "(GHC -XTemplateHaskell and -XDataKinds extensions)"); + + DefineProperty("lexer.haskell.allow.questionmark", &OptionsHaskell::implicitParams, + "Set to 1 to allow the '?' character at the start of identifiers " + "with the haskell lexer " + "(GHC & Hugs -XImplicitParams extension)"); + + DefineProperty("lexer.haskell.import.safe", &OptionsHaskell::highlightSafe, + "Set to 0 to disallow \"safe\" keyword in imports " + "(GHC -XSafe, -XTrustworthy, -XUnsafe extensions)"); + + DefineProperty("lexer.haskell.cpp", &OptionsHaskell::cpp, + "Set to 0 to disable C-preprocessor highlighting " + "(-XCPP extension)"); + + DefineProperty("styling.within.preprocessor", &OptionsHaskell::stylingWithinPreprocessor, + "For Haskell code, determines whether all preprocessor code is styled in the " + "preprocessor style (0, the default) or only from the initial # to the end " + "of the command word(1)." + ); + + DefineProperty("fold", &OptionsHaskell::fold); + + DefineProperty("fold.comment", &OptionsHaskell::foldComment); + + DefineProperty("fold.compact", &OptionsHaskell::foldCompact); + + DefineProperty("fold.haskell.imports", &OptionsHaskell::foldImports, + "Set to 1 to enable folding of import declarations"); + + DefineWordListSets(haskellWordListDesc); + } +}; + +class LexerHaskell : public DefaultLexer { + bool literate; + Sci_Position firstImportLine; + int firstImportIndent; + WordList keywords; + WordList ffi; + WordList reserved_operators; + OptionsHaskell options; + OptionSetHaskell osHaskell; + + enum HashCount { + oneHash + ,twoHashes + ,unlimitedHashes + }; + + enum KeywordMode { + HA_MODE_DEFAULT = 0 + ,HA_MODE_IMPORT1 = 1 // after "import", before "qualified" or "safe" or package name or module name. + ,HA_MODE_IMPORT2 = 2 // after module name, before "as" or "hiding". + ,HA_MODE_IMPORT3 = 3 // after "as", before "hiding" + ,HA_MODE_MODULE = 4 // after "module", before module name. + ,HA_MODE_FFI = 5 // after "foreign", before FFI keywords + ,HA_MODE_TYPE = 6 // after "type" or "data", before "family" + }; + + enum LiterateMode { + LITERATE_BIRD = 0 // if '>' is the first character on the line, + // color '>' as a codedelim and the rest of + // the line as code. + // else if "\begin{code}" is the only word on the + // line except whitespace, switch to LITERATE_BLOCK + // otherwise color the line as a literate comment. + ,LITERATE_BLOCK = 1 // if the string "\end{code}" is encountered at column + // 0 ignoring all later characters, color the line + // as a codedelim and switch to LITERATE_BIRD + // otherwise color the line as code. + }; + + struct HaskellLineInfo { + unsigned int nestLevel; // 22 bits ought to be enough for anybody + unsigned int nonexternalStyle; // 5 bits, widen if number of styles goes + // beyond 31. + bool pragma; + LiterateMode lmode; + KeywordMode mode; + + HaskellLineInfo(int state) : + nestLevel (state >> 10) + , nonexternalStyle ((state >> 5) & 0x1F) + , pragma ((state >> 4) & 0x1) + , lmode (static_cast((state >> 3) & 0x1)) + , mode (static_cast(state & 0x7)) + {} + + int ToLineState() { + return + (nestLevel << 10) + | (nonexternalStyle << 5) + | (pragma << 4) + | (lmode << 3) + | mode; + } + }; + + inline void skipMagicHash(StyleContext &sc, const HashCount hashes) const { + if (options.magicHash && sc.ch == '#') { + sc.Forward(); + if (hashes == twoHashes && sc.ch == '#') { + sc.Forward(); + } else if (hashes == unlimitedHashes) { + while (sc.ch == '#') { + sc.Forward(); + } + } + } + } + + bool LineContainsImport(const Sci_Position line, Accessor &styler) const { + if (options.foldImports) { + Sci_Position currentPos = styler.LineStart(line); + int style = styler.StyleAt(currentPos); + + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + + while (currentPos < eol_pos) { + int ch = styler[currentPos]; + style = styler.StyleAt(currentPos); + + if (ch == ' ' || ch == '\t' + || IsCommentBlockStyle(style) + || style == SCE_HA_LITERATE_CODEDELIM) { + currentPos++; + } else { + break; + } + } + + return (style == SCE_HA_KEYWORD + && styler.Match(currentPos, "import")); + } else { + return false; + } + } + + inline int IndentAmountWithOffset(Accessor &styler, const Sci_Position line) const { + const int indent = HaskellIndentAmount(styler, line); + const int indentLevel = indent & SC_FOLDLEVELNUMBERMASK; + return indentLevel <= ((firstImportIndent - 1) + SC_FOLDLEVELBASE) + ? indent + : (indentLevel + firstImportIndent) | (indent & ~SC_FOLDLEVELNUMBERMASK); + } + + inline int IndentLevelRemoveIndentOffset(const int indentLevel) const { + return indentLevel <= ((firstImportIndent - 1) + SC_FOLDLEVELBASE) + ? indentLevel + : indentLevel - firstImportIndent; + } + +public: + LexerHaskell(bool literate_) + : literate(literate_) + , firstImportLine(-1) + , firstImportIndent(0) + {} + virtual ~LexerHaskell() {} + + void SCI_METHOD Release() override { + delete this; + } + + int SCI_METHOD Version() const override { + return lvOriginal; + } + + const char * SCI_METHOD PropertyNames() override { + return osHaskell.PropertyNames(); + } + + int SCI_METHOD PropertyType(const char *name) override { + return osHaskell.PropertyType(name); + } + + const char * SCI_METHOD DescribeProperty(const char *name) override { + return osHaskell.DescribeProperty(name); + } + + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + + const char * SCI_METHOD DescribeWordListSets() override { + return osHaskell.DescribeWordListSets(); + } + + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + + static ILexer *LexerFactoryHaskell() { + return new LexerHaskell(false); + } + + static ILexer *LexerFactoryLiterateHaskell() { + return new LexerHaskell(true); + } +}; + +Sci_Position SCI_METHOD LexerHaskell::PropertySet(const char *key, const char *val) { + if (osHaskell.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexerHaskell::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywords; + break; + case 1: + wordListN = &ffi; + break; + case 2: + wordListN = &reserved_operators; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +void SCI_METHOD LexerHaskell::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle + ,IDocument *pAccess) { + LexAccessor styler(pAccess); + + Sci_Position lineCurrent = styler.GetLine(startPos); + + HaskellLineInfo hs = HaskellLineInfo(lineCurrent ? styler.GetLineState(lineCurrent-1) : 0); + + // Do not leak onto next line + if (initStyle == SCE_HA_STRINGEOL) + initStyle = SCE_HA_DEFAULT; + else if (initStyle == SCE_HA_LITERATE_CODEDELIM) + initStyle = hs.nonexternalStyle; + + StyleContext sc(startPos, length, initStyle, styler); + + int base = 10; + bool dot = false; + + bool inDashes = false; + bool alreadyInTheMiddleOfOperator = false; + + assert(!(IsCommentBlockStyle(initStyle) && hs.nestLevel == 0)); + + while (sc.More()) { + // Check for state end + + if (!IsExternalStyle(sc.state)) { + hs.nonexternalStyle = sc.state; + } + + // For lexer to work, states should unconditionally forward at least one + // character. + // If they don't, they should still check if they are at line end and + // forward if so. + // If a state forwards more than one character, it should check every time + // that it is not a line end and cease forwarding otherwise. + if (sc.atLineEnd) { + // Remember the line state for future incremental lexing + styler.SetLineState(lineCurrent, hs.ToLineState()); + lineCurrent++; + } + + // Handle line continuation generically. + if (sc.ch == '\\' && (sc.chNext == '\n' || sc.chNext == '\r') + && ( sc.state == SCE_HA_STRING + || sc.state == SCE_HA_PREPROCESSOR)) { + // Remember the line state for future incremental lexing + styler.SetLineState(lineCurrent, hs.ToLineState()); + lineCurrent++; + + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + sc.Forward(); + + continue; + } + + if (sc.atLineStart) { + + if (sc.state == SCE_HA_STRING || sc.state == SCE_HA_CHARACTER) { + // Prevent SCE_HA_STRINGEOL from leaking back to previous line + sc.SetState(sc.state); + } + + if (literate && hs.lmode == LITERATE_BIRD) { + if (!IsExternalStyle(sc.state)) { + sc.SetState(SCE_HA_LITERATE_COMMENT); + } + } + } + + // External + // Literate + if ( literate && hs.lmode == LITERATE_BIRD && sc.atLineStart + && sc.ch == '>') { + sc.SetState(SCE_HA_LITERATE_CODEDELIM); + sc.ForwardSetState(hs.nonexternalStyle); + } + else if (literate && hs.lmode == LITERATE_BIRD && sc.atLineStart + && ( sc.ch == ' ' || sc.ch == '\t' + || sc.Match("\\begin{code}"))) { + sc.SetState(sc.state); + + while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()) + sc.Forward(); + + if (sc.Match("\\begin{code}")) { + sc.Forward(static_cast(strlen("\\begin{code}"))); + + bool correct = true; + + while (!sc.atLineEnd && sc.More()) { + if (sc.ch != ' ' && sc.ch != '\t') { + correct = false; + } + sc.Forward(); + } + + if (correct) { + sc.ChangeState(SCE_HA_LITERATE_CODEDELIM); // color the line end + hs.lmode = LITERATE_BLOCK; + } + } + } + else if (literate && hs.lmode == LITERATE_BLOCK && sc.atLineStart + && sc.Match("\\end{code}")) { + sc.SetState(SCE_HA_LITERATE_CODEDELIM); + + sc.Forward(static_cast(strlen("\\end{code}"))); + + while (!sc.atLineEnd && sc.More()) { + sc.Forward(); + } + + sc.SetState(SCE_HA_LITERATE_COMMENT); + hs.lmode = LITERATE_BIRD; + } + // Preprocessor + else if (sc.atLineStart && sc.ch == '#' && options.cpp + && (!options.stylingWithinPreprocessor || sc.state == SCE_HA_DEFAULT)) { + sc.SetState(SCE_HA_PREPROCESSOR); + sc.Forward(); + } + // Literate + else if (sc.state == SCE_HA_LITERATE_COMMENT) { + sc.Forward(); + } + else if (sc.state == SCE_HA_LITERATE_CODEDELIM) { + sc.ForwardSetState(hs.nonexternalStyle); + } + // Preprocessor + else if (sc.state == SCE_HA_PREPROCESSOR) { + if (sc.atLineEnd) { + sc.SetState(options.stylingWithinPreprocessor + ? SCE_HA_DEFAULT + : hs.nonexternalStyle); + sc.Forward(); // prevent double counting a line + } else if (options.stylingWithinPreprocessor && !IsHaskellLetter(sc.ch)) { + sc.SetState(SCE_HA_DEFAULT); + } else { + sc.Forward(); + } + } + // Haskell + // Operator + else if (sc.state == SCE_HA_OPERATOR) { + int style = SCE_HA_OPERATOR; + + if ( sc.ch == ':' + && !alreadyInTheMiddleOfOperator + // except "::" + && !( sc.chNext == ':' + && !IsAnHaskellOperatorChar(sc.GetRelative(2)))) { + style = SCE_HA_CAPITAL; + } + + alreadyInTheMiddleOfOperator = false; + + while (IsAnHaskellOperatorChar(sc.ch)) + sc.Forward(); + + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (reserved_operators.InList(s)) + style = SCE_HA_RESERVED_OPERATOR; + + sc.ChangeState(style); + sc.SetState(SCE_HA_DEFAULT); + } + // String + else if (sc.state == SCE_HA_STRING) { + if (sc.atLineEnd) { + sc.ChangeState(SCE_HA_STRINGEOL); + sc.ForwardSetState(SCE_HA_DEFAULT); + } else if (sc.ch == '\"') { + sc.Forward(); + skipMagicHash(sc, oneHash); + sc.SetState(SCE_HA_DEFAULT); + } else if (sc.ch == '\\') { + sc.Forward(2); + } else { + sc.Forward(); + } + } + // Char + else if (sc.state == SCE_HA_CHARACTER) { + if (sc.atLineEnd) { + sc.ChangeState(SCE_HA_STRINGEOL); + sc.ForwardSetState(SCE_HA_DEFAULT); + } else if (sc.ch == '\'') { + sc.Forward(); + skipMagicHash(sc, oneHash); + sc.SetState(SCE_HA_DEFAULT); + } else if (sc.ch == '\\') { + sc.Forward(2); + } else { + sc.Forward(); + } + } + // Number + else if (sc.state == SCE_HA_NUMBER) { + if (sc.atLineEnd) { + sc.SetState(SCE_HA_DEFAULT); + sc.Forward(); // prevent double counting a line + } else if (IsADigit(sc.ch, base)) { + sc.Forward(); + } else if (sc.ch=='.' && dot && IsADigit(sc.chNext, base)) { + sc.Forward(2); + dot = false; + } else if ((base == 10) && + (sc.ch == 'e' || sc.ch == 'E') && + (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-')) { + sc.Forward(); + if (sc.ch == '+' || sc.ch == '-') + sc.Forward(); + } else { + skipMagicHash(sc, twoHashes); + sc.SetState(SCE_HA_DEFAULT); + } + } + // Keyword or Identifier + else if (sc.state == SCE_HA_IDENTIFIER) { + int style = IsHaskellUpperCase(sc.ch) ? SCE_HA_CAPITAL : SCE_HA_IDENTIFIER; + + assert(IsAHaskellWordStart(sc.ch)); + + sc.Forward(); + + while (sc.More()) { + if (IsAHaskellWordChar(sc.ch)) { + sc.Forward(); + } else if (sc.ch == '.' && style == SCE_HA_CAPITAL) { + if (IsHaskellUpperCase(sc.chNext)) { + sc.Forward(); + style = SCE_HA_CAPITAL; + } else if (IsAHaskellWordStart(sc.chNext)) { + sc.Forward(); + style = SCE_HA_IDENTIFIER; + } else if (IsAnHaskellOperatorChar(sc.chNext)) { + sc.Forward(); + style = sc.ch == ':' ? SCE_HA_CAPITAL : SCE_HA_OPERATOR; + while (IsAnHaskellOperatorChar(sc.ch)) + sc.Forward(); + break; + } else { + break; + } + } else { + break; + } + } + + skipMagicHash(sc, unlimitedHashes); + + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + KeywordMode new_mode = HA_MODE_DEFAULT; + + if (keywords.InList(s)) { + style = SCE_HA_KEYWORD; + } else if (style == SCE_HA_CAPITAL) { + if (hs.mode == HA_MODE_IMPORT1 || hs.mode == HA_MODE_IMPORT3) { + style = SCE_HA_MODULE; + new_mode = HA_MODE_IMPORT2; + } else if (hs.mode == HA_MODE_MODULE) { + style = SCE_HA_MODULE; + } + } else if (hs.mode == HA_MODE_IMPORT1 && + strcmp(s,"qualified") == 0) { + style = SCE_HA_KEYWORD; + new_mode = HA_MODE_IMPORT1; + } else if (options.highlightSafe && + hs.mode == HA_MODE_IMPORT1 && + strcmp(s,"safe") == 0) { + style = SCE_HA_KEYWORD; + new_mode = HA_MODE_IMPORT1; + } else if (hs.mode == HA_MODE_IMPORT2) { + if (strcmp(s,"as") == 0) { + style = SCE_HA_KEYWORD; + new_mode = HA_MODE_IMPORT3; + } else if (strcmp(s,"hiding") == 0) { + style = SCE_HA_KEYWORD; + } + } else if (hs.mode == HA_MODE_TYPE) { + if (strcmp(s,"family") == 0) + style = SCE_HA_KEYWORD; + } + + if (hs.mode == HA_MODE_FFI) { + if (ffi.InList(s)) { + style = SCE_HA_KEYWORD; + new_mode = HA_MODE_FFI; + } + } + + sc.ChangeState(style); + sc.SetState(SCE_HA_DEFAULT); + + if (strcmp(s,"import") == 0 && hs.mode != HA_MODE_FFI) + new_mode = HA_MODE_IMPORT1; + else if (strcmp(s,"module") == 0) + new_mode = HA_MODE_MODULE; + else if (strcmp(s,"foreign") == 0) + new_mode = HA_MODE_FFI; + else if (strcmp(s,"type") == 0 + || strcmp(s,"data") == 0) + new_mode = HA_MODE_TYPE; + + hs.mode = new_mode; + } + + // Comments + // Oneliner + else if (sc.state == SCE_HA_COMMENTLINE) { + if (sc.atLineEnd) { + sc.SetState(hs.pragma ? SCE_HA_PRAGMA : SCE_HA_DEFAULT); + sc.Forward(); // prevent double counting a line + } else if (inDashes && sc.ch != '-' && !hs.pragma) { + inDashes = false; + if (IsAnHaskellOperatorChar(sc.ch)) { + alreadyInTheMiddleOfOperator = true; + sc.ChangeState(SCE_HA_OPERATOR); + } + } else { + sc.Forward(); + } + } + // Nested + else if (IsCommentBlockStyle(sc.state)) { + if (sc.Match('{','-')) { + sc.SetState(CommentBlockStyleFromNestLevel(hs.nestLevel)); + sc.Forward(2); + hs.nestLevel++; + } else if (sc.Match('-','}')) { + sc.Forward(2); + assert(hs.nestLevel > 0); + if (hs.nestLevel > 0) + hs.nestLevel--; + sc.SetState( + hs.nestLevel == 0 + ? (hs.pragma ? SCE_HA_PRAGMA : SCE_HA_DEFAULT) + : CommentBlockStyleFromNestLevel(hs.nestLevel - 1)); + } else { + sc.Forward(); + } + } + // Pragma + else if (sc.state == SCE_HA_PRAGMA) { + if (sc.Match("#-}")) { + hs.pragma = false; + sc.Forward(3); + sc.SetState(SCE_HA_DEFAULT); + } else if (sc.Match('-','-')) { + sc.SetState(SCE_HA_COMMENTLINE); + sc.Forward(2); + inDashes = false; + } else if (sc.Match('{','-')) { + sc.SetState(CommentBlockStyleFromNestLevel(hs.nestLevel)); + sc.Forward(2); + hs.nestLevel = 1; + } else { + sc.Forward(); + } + } + // New state? + else if (sc.state == SCE_HA_DEFAULT) { + // Digit + if (IsADigit(sc.ch)) { + hs.mode = HA_MODE_DEFAULT; + + sc.SetState(SCE_HA_NUMBER); + if (sc.ch == '0' && (sc.chNext == 'X' || sc.chNext == 'x')) { + // Match anything starting with "0x" or "0X", too + sc.Forward(2); + base = 16; + dot = false; + } else if (sc.ch == '0' && (sc.chNext == 'O' || sc.chNext == 'o')) { + // Match anything starting with "0o" or "0O", too + sc.Forward(2); + base = 8; + dot = false; + } else { + sc.Forward(); + base = 10; + dot = true; + } + } + // Pragma + else if (sc.Match("{-#")) { + hs.pragma = true; + sc.SetState(SCE_HA_PRAGMA); + sc.Forward(3); + } + // Comment line + else if (sc.Match('-','-')) { + sc.SetState(SCE_HA_COMMENTLINE); + sc.Forward(2); + inDashes = true; + } + // Comment block + else if (sc.Match('{','-')) { + sc.SetState(CommentBlockStyleFromNestLevel(hs.nestLevel)); + sc.Forward(2); + hs.nestLevel = 1; + } + // String + else if (sc.ch == '\"') { + sc.SetState(SCE_HA_STRING); + sc.Forward(); + } + // Character or quoted name or promoted term + else if (sc.ch == '\'') { + hs.mode = HA_MODE_DEFAULT; + + sc.SetState(SCE_HA_CHARACTER); + sc.Forward(); + + if (options.allowQuotes) { + // Quoted type ''T + if (sc.ch=='\'' && IsAHaskellWordStart(sc.chNext)) { + sc.Forward(); + sc.ChangeState(SCE_HA_IDENTIFIER); + } else if (sc.chNext != '\'') { + // Quoted name 'n or promoted constructor 'N + if (IsAHaskellWordStart(sc.ch)) { + sc.ChangeState(SCE_HA_IDENTIFIER); + // Promoted constructor operator ':~> + } else if (sc.ch == ':') { + alreadyInTheMiddleOfOperator = false; + sc.ChangeState(SCE_HA_OPERATOR); + // Promoted list or tuple '[T] + } else if (sc.ch == '[' || sc.ch== '(') { + sc.ChangeState(SCE_HA_OPERATOR); + sc.ForwardSetState(SCE_HA_DEFAULT); + } + } + } + } + // Operator starting with '?' or an implicit parameter + else if (sc.ch == '?') { + hs.mode = HA_MODE_DEFAULT; + + alreadyInTheMiddleOfOperator = false; + sc.SetState(SCE_HA_OPERATOR); + + if ( options.implicitParams + && IsAHaskellWordStart(sc.chNext) + && !IsHaskellUpperCase(sc.chNext)) { + sc.Forward(); + sc.ChangeState(SCE_HA_IDENTIFIER); + } + } + // Operator + else if (IsAnHaskellOperatorChar(sc.ch)) { + hs.mode = HA_MODE_DEFAULT; + + sc.SetState(SCE_HA_OPERATOR); + } + // Braces and punctuation + else if (sc.ch == ',' || sc.ch == ';' + || sc.ch == '(' || sc.ch == ')' + || sc.ch == '[' || sc.ch == ']' + || sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_HA_OPERATOR); + sc.ForwardSetState(SCE_HA_DEFAULT); + } + // Keyword or Identifier + else if (IsAHaskellWordStart(sc.ch)) { + sc.SetState(SCE_HA_IDENTIFIER); + // Something we don't care about + } else { + sc.Forward(); + } + } + // This branch should never be reached. + else { + assert(false); + sc.Forward(); + } + } + sc.Complete(); +} + +void SCI_METHOD LexerHaskell::Fold(Sci_PositionU startPos, Sci_Position length, int // initStyle + ,IDocument *pAccess) { + if (!options.fold) + return; + + Accessor styler(pAccess, NULL); + + Sci_Position lineCurrent = styler.GetLine(startPos); + + if (lineCurrent <= firstImportLine) { + firstImportLine = -1; // readjust first import position + firstImportIndent = 0; + } + + const Sci_Position maxPos = startPos + length; + const Sci_Position maxLines = + maxPos == styler.Length() + ? styler.GetLine(maxPos) + : styler.GetLine(maxPos - 1); // Requested last line + const Sci_Position docLines = styler.GetLine(styler.Length()); // Available last line + + // Backtrack to previous non-blank line so we can determine indent level + // for any white space lines + // and so we can fix any preceding fold level (which is why we go back + // at least one line in all cases) + bool importHere = LineContainsImport(lineCurrent, styler); + int indentCurrent = IndentAmountWithOffset(styler, lineCurrent); + + while (lineCurrent > 0) { + lineCurrent--; + importHere = LineContainsImport(lineCurrent, styler); + indentCurrent = IndentAmountWithOffset(styler, lineCurrent); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) + break; + } + + int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; + + if (importHere) { + indentCurrentLevel = IndentLevelRemoveIndentOffset(indentCurrentLevel); + if (firstImportLine == -1) { + firstImportLine = lineCurrent; + firstImportIndent = (1 + indentCurrentLevel) - SC_FOLDLEVELBASE; + } + if (firstImportLine != lineCurrent) { + indentCurrentLevel++; + } + } + + indentCurrent = indentCurrentLevel | (indentCurrent & ~SC_FOLDLEVELNUMBERMASK); + + // Process all characters to end of requested range + //that hangs over the end of the range. Cap processing in all cases + // to end of document. + while (lineCurrent <= docLines && lineCurrent <= maxLines) { + + // Gather info + Sci_Position lineNext = lineCurrent + 1; + importHere = false; + int indentNext = indentCurrent; + + if (lineNext <= docLines) { + // Information about next line is only available if not at end of document + importHere = LineContainsImport(lineNext, styler); + indentNext = IndentAmountWithOffset(styler, lineNext); + } + if (indentNext & SC_FOLDLEVELWHITEFLAG) + indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel; + + // Skip past any blank lines for next indent level info; we skip also + // comments (all comments, not just those starting in column 0) + // which effectively folds them into surrounding code rather + // than screwing up folding. + + while (lineNext < docLines && (indentNext & SC_FOLDLEVELWHITEFLAG)) { + lineNext++; + importHere = LineContainsImport(lineNext, styler); + indentNext = IndentAmountWithOffset(styler, lineNext); + } + + int indentNextLevel = indentNext & SC_FOLDLEVELNUMBERMASK; + + if (importHere) { + indentNextLevel = IndentLevelRemoveIndentOffset(indentNextLevel); + if (firstImportLine == -1) { + firstImportLine = lineNext; + firstImportIndent = (1 + indentNextLevel) - SC_FOLDLEVELBASE; + } + if (firstImportLine != lineNext) { + indentNextLevel++; + } + } + + indentNext = indentNextLevel | (indentNext & ~SC_FOLDLEVELNUMBERMASK); + + const int levelBeforeComments = Maximum(indentCurrentLevel,indentNextLevel); + + // Now set all the indent levels on the lines we skipped + // Do this from end to start. Once we encounter one line + // which is indented more than the line after the end of + // the comment-block, use the level of the block before + + Sci_Position skipLine = lineNext; + int skipLevel = indentNextLevel; + + while (--skipLine > lineCurrent) { + int skipLineIndent = IndentAmountWithOffset(styler, skipLine); + + if (options.foldCompact) { + if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel) { + skipLevel = levelBeforeComments; + } + + int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; + + styler.SetLevel(skipLine, skipLevel | whiteFlag); + } else { + if ( (skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel + && !(skipLineIndent & SC_FOLDLEVELWHITEFLAG)) { + skipLevel = levelBeforeComments; + } + + styler.SetLevel(skipLine, skipLevel); + } + } + + int lev = indentCurrent; + + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) + lev |= SC_FOLDLEVELHEADERFLAG; + } + + // Set fold level for this line and move to next line + styler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG); + + indentCurrent = indentNext; + indentCurrentLevel = indentNextLevel; + lineCurrent = lineNext; + } + + // NOTE: Cannot set level of last line here because indentCurrent doesn't have + // header flag set; the loop above is crafted to take care of this case! + //styler.SetLevel(lineCurrent, indentCurrent); +} + +LexerModule lmHaskell(SCLEX_HASKELL, LexerHaskell::LexerFactoryHaskell, "haskell", haskellWordListDesc); +LexerModule lmLiterateHaskell(SCLEX_LITERATEHASKELL, LexerHaskell::LexerFactoryLiterateHaskell, "literatehaskell", haskellWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexHex.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexHex.cpp new file mode 100644 index 000000000..6e1099786 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexHex.cpp @@ -0,0 +1,1045 @@ +// Scintilla source code edit control +/** @file LexHex.cxx + ** Lexers for Motorola S-Record, Intel HEX and Tektronix extended HEX. + ** + ** Written by Markus Heidelberg + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +/* + * Motorola S-Record + * =============================== + * + * Each record (line) is built as follows: + * + * field digits states + * + * +----------+ + * | start | 1 ('S') SCE_HEX_RECSTART + * +----------+ + * | type | 1 SCE_HEX_RECTYPE, (SCE_HEX_RECTYPE_UNKNOWN) + * +----------+ + * | count | 2 SCE_HEX_BYTECOUNT, SCE_HEX_BYTECOUNT_WRONG + * +----------+ + * | address | 4/6/8 SCE_HEX_NOADDRESS, SCE_HEX_DATAADDRESS, SCE_HEX_RECCOUNT, SCE_HEX_STARTADDRESS, (SCE_HEX_ADDRESSFIELD_UNKNOWN) + * +----------+ + * | data | 0..504/502/500 SCE_HEX_DATA_ODD, SCE_HEX_DATA_EVEN, SCE_HEX_DATA_EMPTY, (SCE_HEX_DATA_UNKNOWN) + * +----------+ + * | checksum | 2 SCE_HEX_CHECKSUM, SCE_HEX_CHECKSUM_WRONG + * +----------+ + * + * + * Intel HEX + * =============================== + * + * Each record (line) is built as follows: + * + * field digits states + * + * +----------+ + * | start | 1 (':') SCE_HEX_RECSTART + * +----------+ + * | count | 2 SCE_HEX_BYTECOUNT, SCE_HEX_BYTECOUNT_WRONG + * +----------+ + * | address | 4 SCE_HEX_NOADDRESS, SCE_HEX_DATAADDRESS, (SCE_HEX_ADDRESSFIELD_UNKNOWN) + * +----------+ + * | type | 2 SCE_HEX_RECTYPE, (SCE_HEX_RECTYPE_UNKNOWN) + * +----------+ + * | data | 0..510 SCE_HEX_DATA_ODD, SCE_HEX_DATA_EVEN, SCE_HEX_DATA_EMPTY, SCE_HEX_EXTENDEDADDRESS, SCE_HEX_STARTADDRESS, (SCE_HEX_DATA_UNKNOWN) + * +----------+ + * | checksum | 2 SCE_HEX_CHECKSUM, SCE_HEX_CHECKSUM_WRONG + * +----------+ + * + * + * Folding: + * + * Data records (type 0x00), which follow an extended address record (type + * 0x02 or 0x04), can be folded. The extended address record is the fold + * point at fold level 0, the corresponding data records are set to level 1. + * + * Any record, which is not a data record, sets the fold level back to 0. + * Any line, which is not a record (blank lines and lines starting with a + * character other than ':'), leaves the fold level unchanged. + * + * + * Tektronix extended HEX + * =============================== + * + * Each record (line) is built as follows: + * + * field digits states + * + * +----------+ + * | start | 1 ('%') SCE_HEX_RECSTART + * +----------+ + * | length | 2 SCE_HEX_BYTECOUNT, SCE_HEX_BYTECOUNT_WRONG + * +----------+ + * | type | 1 SCE_HEX_RECTYPE, (SCE_HEX_RECTYPE_UNKNOWN) + * +----------+ + * | checksum | 2 SCE_HEX_CHECKSUM, SCE_HEX_CHECKSUM_WRONG + * +----------+ + * | address | 9 SCE_HEX_DATAADDRESS, SCE_HEX_STARTADDRESS, (SCE_HEX_ADDRESSFIELD_UNKNOWN) + * +----------+ + * | data | 0..241 SCE_HEX_DATA_ODD, SCE_HEX_DATA_EVEN + * +----------+ + * + * + * General notes for all lexers + * =============================== + * + * - Depending on where the helper functions are invoked, some of them have to + * read beyond the current position. In case of malformed data (record too + * short), it has to be ensured that this either does not have bad influence + * or will be captured deliberately. + * + * - States in parentheses in the upper format descriptions indicate that they + * should not appear in a valid hex file. + * + * - State SCE_HEX_GARBAGE means garbage data after the intended end of the + * record, the line is too long then. This state is used in all lexers. + */ + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +// prototypes for general helper functions +static inline bool IsNewline(const int ch); +static int GetHexaNibble(char hd); +static int GetHexaChar(char hd1, char hd2); +static int GetHexaChar(Sci_PositionU pos, Accessor &styler); +static bool ForwardWithinLine(StyleContext &sc, Sci_Position nb = 1); +static bool PosInSameRecord(Sci_PositionU pos1, Sci_PositionU pos2, Accessor &styler); +static Sci_Position CountByteCount(Sci_PositionU startPos, Sci_Position uncountedDigits, Accessor &styler); +static int CalcChecksum(Sci_PositionU startPos, Sci_Position cnt, bool twosCompl, Accessor &styler); + +// prototypes for file format specific helper functions +static Sci_PositionU GetSrecRecStartPosition(Sci_PositionU pos, Accessor &styler); +static int GetSrecByteCount(Sci_PositionU recStartPos, Accessor &styler); +static Sci_Position CountSrecByteCount(Sci_PositionU recStartPos, Accessor &styler); +static int GetSrecAddressFieldSize(Sci_PositionU recStartPos, Accessor &styler); +static int GetSrecAddressFieldType(Sci_PositionU recStartPos, Accessor &styler); +static int GetSrecDataFieldType(Sci_PositionU recStartPos, Accessor &styler); +static Sci_Position GetSrecRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler); +static int GetSrecChecksum(Sci_PositionU recStartPos, Accessor &styler); +static int CalcSrecChecksum(Sci_PositionU recStartPos, Accessor &styler); + +static Sci_PositionU GetIHexRecStartPosition(Sci_PositionU pos, Accessor &styler); +static int GetIHexByteCount(Sci_PositionU recStartPos, Accessor &styler); +static Sci_Position CountIHexByteCount(Sci_PositionU recStartPos, Accessor &styler); +static int GetIHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler); +static int GetIHexDataFieldType(Sci_PositionU recStartPos, Accessor &styler); +static int GetIHexRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler); +static int GetIHexChecksum(Sci_PositionU recStartPos, Accessor &styler); +static int CalcIHexChecksum(Sci_PositionU recStartPos, Accessor &styler); + +static int GetTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler); +static Sci_Position CountTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler); +static int GetTEHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler); +static int GetTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler); +static int CalcTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler); + +static inline bool IsNewline(const int ch) +{ + return (ch == '\n' || ch == '\r'); +} + +static int GetHexaNibble(char hd) +{ + int hexValue = 0; + + if (hd >= '0' && hd <= '9') { + hexValue += hd - '0'; + } else if (hd >= 'A' && hd <= 'F') { + hexValue += hd - 'A' + 10; + } else if (hd >= 'a' && hd <= 'f') { + hexValue += hd - 'a' + 10; + } else { + return -1; + } + + return hexValue; +} + +static int GetHexaChar(char hd1, char hd2) +{ + int hexValue = 0; + + if (hd1 >= '0' && hd1 <= '9') { + hexValue += 16 * (hd1 - '0'); + } else if (hd1 >= 'A' && hd1 <= 'F') { + hexValue += 16 * (hd1 - 'A' + 10); + } else if (hd1 >= 'a' && hd1 <= 'f') { + hexValue += 16 * (hd1 - 'a' + 10); + } else { + return -1; + } + + if (hd2 >= '0' && hd2 <= '9') { + hexValue += hd2 - '0'; + } else if (hd2 >= 'A' && hd2 <= 'F') { + hexValue += hd2 - 'A' + 10; + } else if (hd2 >= 'a' && hd2 <= 'f') { + hexValue += hd2 - 'a' + 10; + } else { + return -1; + } + + return hexValue; +} + +static int GetHexaChar(Sci_PositionU pos, Accessor &styler) +{ + char highNibble, lowNibble; + + highNibble = styler.SafeGetCharAt(pos); + lowNibble = styler.SafeGetCharAt(pos + 1); + + return GetHexaChar(highNibble, lowNibble); +} + +// Forward characters, but abort (and return false) if hitting the line +// end. Return true if forwarding within the line was possible. +// Avoids influence on highlighting of the subsequent line if the current line +// is malformed (too short). +static bool ForwardWithinLine(StyleContext &sc, Sci_Position nb) +{ + for (Sci_Position i = 0; i < nb; i++) { + if (sc.atLineEnd) { + // line is too short + sc.SetState(SCE_HEX_DEFAULT); + sc.Forward(); + return false; + } else { + sc.Forward(); + } + } + + return true; +} + +// Checks whether the given positions are in the same record. +static bool PosInSameRecord(Sci_PositionU pos1, Sci_PositionU pos2, Accessor &styler) +{ + return styler.GetLine(pos1) == styler.GetLine(pos2); +} + +// Count the number of digit pairs from till end of record, ignoring +// digits. +// If the record is too short, a negative count may be returned. +static Sci_Position CountByteCount(Sci_PositionU startPos, Sci_Position uncountedDigits, Accessor &styler) +{ + Sci_Position cnt; + Sci_PositionU pos; + + pos = startPos; + + while (!IsNewline(styler.SafeGetCharAt(pos, '\n'))) { + pos++; + } + + // number of digits in this line minus number of digits of uncounted fields + cnt = static_cast(pos - startPos) - uncountedDigits; + + // Prepare round up if odd (digit pair incomplete), this way the byte + // count is considered to be valid if the checksum is incomplete. + if (cnt >= 0) { + cnt++; + } + + // digit pairs + cnt /= 2; + + return cnt; +} + +// Calculate the checksum of the record. +// is the position of the first character of the starting digit +// pair, is the number of digit pairs. +static int CalcChecksum(Sci_PositionU startPos, Sci_Position cnt, bool twosCompl, Accessor &styler) +{ + int cs = 0; + + for (Sci_PositionU pos = startPos; pos < startPos + cnt; pos += 2) { + int val = GetHexaChar(pos, styler); + + if (val < 0) { + return val; + } + + // overflow does not matter + cs += val; + } + + if (twosCompl) { + // low byte of two's complement + return -cs & 0xFF; + } else { + // low byte of one's complement + return ~cs & 0xFF; + } +} + +// Get the position of the record "start" field (first character in line) in +// the record around position . +static Sci_PositionU GetSrecRecStartPosition(Sci_PositionU pos, Accessor &styler) +{ + while (styler.SafeGetCharAt(pos) != 'S') { + pos--; + } + + return pos; +} + +// Get the value of the "byte count" field, it counts the number of bytes in +// the subsequent fields ("address", "data" and "checksum" fields). +static int GetSrecByteCount(Sci_PositionU recStartPos, Accessor &styler) +{ + int val; + + val = GetHexaChar(recStartPos + 2, styler); + if (val < 0) { + val = 0; + } + + return val; +} + +// Count the number of digit pairs for the "address", "data" and "checksum" +// fields in this record. Has to be equal to the "byte count" field value. +// If the record is too short, a negative count may be returned. +static Sci_Position CountSrecByteCount(Sci_PositionU recStartPos, Accessor &styler) +{ + return CountByteCount(recStartPos, 4, styler); +} + +// Get the size of the "address" field. +static int GetSrecAddressFieldSize(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (styler.SafeGetCharAt(recStartPos + 1)) { + case '0': + case '1': + case '5': + case '9': + return 2; // 16 bit + + case '2': + case '6': + case '8': + return 3; // 24 bit + + case '3': + case '7': + return 4; // 32 bit + + default: + return 0; + } +} + +// Get the type of the "address" field content. +static int GetSrecAddressFieldType(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (styler.SafeGetCharAt(recStartPos + 1)) { + case '0': + return SCE_HEX_NOADDRESS; + + case '1': + case '2': + case '3': + return SCE_HEX_DATAADDRESS; + + case '5': + case '6': + return SCE_HEX_RECCOUNT; + + case '7': + case '8': + case '9': + return SCE_HEX_STARTADDRESS; + + default: // handle possible format extension in the future + return SCE_HEX_ADDRESSFIELD_UNKNOWN; + } +} + +// Get the type of the "data" field content. +static int GetSrecDataFieldType(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (styler.SafeGetCharAt(recStartPos + 1)) { + case '0': + case '1': + case '2': + case '3': + return SCE_HEX_DATA_ODD; + + case '5': + case '6': + case '7': + case '8': + case '9': + return SCE_HEX_DATA_EMPTY; + + default: // handle possible format extension in the future + return SCE_HEX_DATA_UNKNOWN; + } +} + +// Get the required size of the "data" field. Useless for block header and +// ordinary data records (type S0, S1, S2, S3), return the value calculated +// from the "byte count" and "address field" size in this case. +static Sci_Position GetSrecRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (styler.SafeGetCharAt(recStartPos + 1)) { + case '5': + case '6': + case '7': + case '8': + case '9': + return 0; + + default: + return GetSrecByteCount(recStartPos, styler) + - GetSrecAddressFieldSize(recStartPos, styler) + - 1; // -1 for checksum field + } +} + +// Get the value of the "checksum" field. +static int GetSrecChecksum(Sci_PositionU recStartPos, Accessor &styler) +{ + int byteCount; + + byteCount = GetSrecByteCount(recStartPos, styler); + + return GetHexaChar(recStartPos + 2 + byteCount * 2, styler); +} + +// Calculate the checksum of the record. +static int CalcSrecChecksum(Sci_PositionU recStartPos, Accessor &styler) +{ + Sci_Position byteCount; + + byteCount = GetSrecByteCount(recStartPos, styler); + + // sum over "byte count", "address" and "data" fields (6..510 digits) + return CalcChecksum(recStartPos + 2, byteCount * 2, false, styler); +} + +// Get the position of the record "start" field (first character in line) in +// the record around position . +static Sci_PositionU GetIHexRecStartPosition(Sci_PositionU pos, Accessor &styler) +{ + while (styler.SafeGetCharAt(pos) != ':') { + pos--; + } + + return pos; +} + +// Get the value of the "byte count" field, it counts the number of bytes in +// the "data" field. +static int GetIHexByteCount(Sci_PositionU recStartPos, Accessor &styler) +{ + int val; + + val = GetHexaChar(recStartPos + 1, styler); + if (val < 0) { + val = 0; + } + + return val; +} + +// Count the number of digit pairs for the "data" field in this record. Has to +// be equal to the "byte count" field value. +// If the record is too short, a negative count may be returned. +static Sci_Position CountIHexByteCount(Sci_PositionU recStartPos, Accessor &styler) +{ + return CountByteCount(recStartPos, 11, styler); +} + +// Get the type of the "address" field content. +static int GetIHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler) +{ + if (!PosInSameRecord(recStartPos, recStartPos + 7, styler)) { + // malformed (record too short) + // type cannot be determined + return SCE_HEX_ADDRESSFIELD_UNKNOWN; + } + + switch (GetHexaChar(recStartPos + 7, styler)) { + case 0x00: + return SCE_HEX_DATAADDRESS; + + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + return SCE_HEX_NOADDRESS; + + default: // handle possible format extension in the future + return SCE_HEX_ADDRESSFIELD_UNKNOWN; + } +} + +// Get the type of the "data" field content. +static int GetIHexDataFieldType(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (GetHexaChar(recStartPos + 7, styler)) { + case 0x00: + return SCE_HEX_DATA_ODD; + + case 0x01: + return SCE_HEX_DATA_EMPTY; + + case 0x02: + case 0x04: + return SCE_HEX_EXTENDEDADDRESS; + + case 0x03: + case 0x05: + return SCE_HEX_STARTADDRESS; + + default: // handle possible format extension in the future + return SCE_HEX_DATA_UNKNOWN; + } +} + +// Get the required size of the "data" field. Useless for an ordinary data +// record (type 00), return the "byte count" in this case. +static int GetIHexRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (GetHexaChar(recStartPos + 7, styler)) { + case 0x01: + return 0; + + case 0x02: + case 0x04: + return 2; + + case 0x03: + case 0x05: + return 4; + + default: + return GetIHexByteCount(recStartPos, styler); + } +} + +// Get the value of the "checksum" field. +static int GetIHexChecksum(Sci_PositionU recStartPos, Accessor &styler) +{ + int byteCount; + + byteCount = GetIHexByteCount(recStartPos, styler); + + return GetHexaChar(recStartPos + 9 + byteCount * 2, styler); +} + +// Calculate the checksum of the record. +static int CalcIHexChecksum(Sci_PositionU recStartPos, Accessor &styler) +{ + int byteCount; + + byteCount = GetIHexByteCount(recStartPos, styler); + + // sum over "byte count", "address", "type" and "data" fields (8..518 digits) + return CalcChecksum(recStartPos + 1, 8 + byteCount * 2, true, styler); +} + + +// Get the value of the "record length" field, it counts the number of digits in +// the record excluding the percent. +static int GetTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler) +{ + int val = GetHexaChar(recStartPos + 1, styler); + if (val < 0) + val = 0; + + return val; +} + +// Count the number of digits in this record. Has to +// be equal to the "record length" field value. +static Sci_Position CountTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler) +{ + Sci_PositionU pos; + + pos = recStartPos+1; + + while (!IsNewline(styler.SafeGetCharAt(pos, '\n'))) { + pos++; + } + + return static_cast(pos - (recStartPos+1)); +} + +// Get the type of the "address" field content. +static int GetTEHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler) +{ + switch (styler.SafeGetCharAt(recStartPos + 3)) { + case '6': + return SCE_HEX_DATAADDRESS; + + case '8': + return SCE_HEX_STARTADDRESS; + + default: // handle possible format extension in the future + return SCE_HEX_ADDRESSFIELD_UNKNOWN; + } +} + +// Get the value of the "checksum" field. +static int GetTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler) +{ + return GetHexaChar(recStartPos+4, styler); +} + +// Calculate the checksum of the record (excluding the checksum field). +static int CalcTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler) +{ + Sci_PositionU pos = recStartPos +1; + Sci_PositionU length = GetTEHexDigitCount(recStartPos, styler); + + int cs = GetHexaNibble(styler.SafeGetCharAt(pos++));//length + cs += GetHexaNibble(styler.SafeGetCharAt(pos++));//length + + cs += GetHexaNibble(styler.SafeGetCharAt(pos++));//type + + pos += 2;// jump over CS field + + for (; pos <= recStartPos + length; ++pos) { + int val = GetHexaNibble(styler.SafeGetCharAt(pos)); + + if (val < 0) { + return val; + } + + // overflow does not matter + cs += val; + } + + // low byte + return cs & 0xFF; + +} + +static void ColouriseSrecDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) +{ + StyleContext sc(startPos, length, initStyle, styler); + + while (sc.More()) { + Sci_PositionU recStartPos; + Sci_Position reqByteCount; + Sci_Position dataFieldSize; + int byteCount, addrFieldSize, addrFieldType, dataFieldType; + int cs1, cs2; + + switch (sc.state) { + case SCE_HEX_DEFAULT: + if (sc.atLineStart && sc.Match('S')) { + sc.SetState(SCE_HEX_RECSTART); + } + ForwardWithinLine(sc); + break; + + case SCE_HEX_RECSTART: + recStartPos = sc.currentPos - 1; + addrFieldType = GetSrecAddressFieldType(recStartPos, styler); + + if (addrFieldType == SCE_HEX_ADDRESSFIELD_UNKNOWN) { + sc.SetState(SCE_HEX_RECTYPE_UNKNOWN); + } else { + sc.SetState(SCE_HEX_RECTYPE); + } + + ForwardWithinLine(sc); + break; + + case SCE_HEX_RECTYPE: + case SCE_HEX_RECTYPE_UNKNOWN: + recStartPos = sc.currentPos - 2; + byteCount = GetSrecByteCount(recStartPos, styler); + reqByteCount = GetSrecAddressFieldSize(recStartPos, styler) + + GetSrecRequiredDataFieldSize(recStartPos, styler) + + 1; // +1 for checksum field + + if (byteCount == CountSrecByteCount(recStartPos, styler) + && byteCount == reqByteCount) { + sc.SetState(SCE_HEX_BYTECOUNT); + } else { + sc.SetState(SCE_HEX_BYTECOUNT_WRONG); + } + + ForwardWithinLine(sc, 2); + break; + + case SCE_HEX_BYTECOUNT: + case SCE_HEX_BYTECOUNT_WRONG: + recStartPos = sc.currentPos - 4; + addrFieldSize = GetSrecAddressFieldSize(recStartPos, styler); + addrFieldType = GetSrecAddressFieldType(recStartPos, styler); + + sc.SetState(addrFieldType); + ForwardWithinLine(sc, addrFieldSize * 2); + break; + + case SCE_HEX_NOADDRESS: + case SCE_HEX_DATAADDRESS: + case SCE_HEX_RECCOUNT: + case SCE_HEX_STARTADDRESS: + case SCE_HEX_ADDRESSFIELD_UNKNOWN: + recStartPos = GetSrecRecStartPosition(sc.currentPos, styler); + dataFieldType = GetSrecDataFieldType(recStartPos, styler); + + // Using the required size here if possible has the effect that the + // checksum is highlighted at a fixed position after this field for + // specific record types, independent on the "byte count" value. + dataFieldSize = GetSrecRequiredDataFieldSize(recStartPos, styler); + + sc.SetState(dataFieldType); + + if (dataFieldType == SCE_HEX_DATA_ODD) { + for (int i = 0; i < dataFieldSize * 2; i++) { + if ((i & 0x3) == 0) { + sc.SetState(SCE_HEX_DATA_ODD); + } else if ((i & 0x3) == 2) { + sc.SetState(SCE_HEX_DATA_EVEN); + } + + if (!ForwardWithinLine(sc)) { + break; + } + } + } else { + ForwardWithinLine(sc, dataFieldSize * 2); + } + break; + + case SCE_HEX_DATA_ODD: + case SCE_HEX_DATA_EVEN: + case SCE_HEX_DATA_EMPTY: + case SCE_HEX_DATA_UNKNOWN: + recStartPos = GetSrecRecStartPosition(sc.currentPos, styler); + cs1 = CalcSrecChecksum(recStartPos, styler); + cs2 = GetSrecChecksum(recStartPos, styler); + + if (cs1 != cs2 || cs1 < 0 || cs2 < 0) { + sc.SetState(SCE_HEX_CHECKSUM_WRONG); + } else { + sc.SetState(SCE_HEX_CHECKSUM); + } + + ForwardWithinLine(sc, 2); + break; + + case SCE_HEX_CHECKSUM: + case SCE_HEX_CHECKSUM_WRONG: + case SCE_HEX_GARBAGE: + // record finished or line too long + sc.SetState(SCE_HEX_GARBAGE); + ForwardWithinLine(sc); + break; + + default: + // prevent endless loop in faulty state + sc.SetState(SCE_HEX_DEFAULT); + break; + } + } + sc.Complete(); +} + +static void ColouriseIHexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) +{ + StyleContext sc(startPos, length, initStyle, styler); + + while (sc.More()) { + Sci_PositionU recStartPos; + int byteCount, addrFieldType, dataFieldSize, dataFieldType; + int cs1, cs2; + + switch (sc.state) { + case SCE_HEX_DEFAULT: + if (sc.atLineStart && sc.Match(':')) { + sc.SetState(SCE_HEX_RECSTART); + } + ForwardWithinLine(sc); + break; + + case SCE_HEX_RECSTART: + recStartPos = sc.currentPos - 1; + byteCount = GetIHexByteCount(recStartPos, styler); + dataFieldSize = GetIHexRequiredDataFieldSize(recStartPos, styler); + + if (byteCount == CountIHexByteCount(recStartPos, styler) + && byteCount == dataFieldSize) { + sc.SetState(SCE_HEX_BYTECOUNT); + } else { + sc.SetState(SCE_HEX_BYTECOUNT_WRONG); + } + + ForwardWithinLine(sc, 2); + break; + + case SCE_HEX_BYTECOUNT: + case SCE_HEX_BYTECOUNT_WRONG: + recStartPos = sc.currentPos - 3; + addrFieldType = GetIHexAddressFieldType(recStartPos, styler); + + sc.SetState(addrFieldType); + ForwardWithinLine(sc, 4); + break; + + case SCE_HEX_NOADDRESS: + case SCE_HEX_DATAADDRESS: + case SCE_HEX_ADDRESSFIELD_UNKNOWN: + recStartPos = sc.currentPos - 7; + addrFieldType = GetIHexAddressFieldType(recStartPos, styler); + + if (addrFieldType == SCE_HEX_ADDRESSFIELD_UNKNOWN) { + sc.SetState(SCE_HEX_RECTYPE_UNKNOWN); + } else { + sc.SetState(SCE_HEX_RECTYPE); + } + + ForwardWithinLine(sc, 2); + break; + + case SCE_HEX_RECTYPE: + case SCE_HEX_RECTYPE_UNKNOWN: + recStartPos = sc.currentPos - 9; + dataFieldType = GetIHexDataFieldType(recStartPos, styler); + + // Using the required size here if possible has the effect that the + // checksum is highlighted at a fixed position after this field for + // specific record types, independent on the "byte count" value. + dataFieldSize = GetIHexRequiredDataFieldSize(recStartPos, styler); + + sc.SetState(dataFieldType); + + if (dataFieldType == SCE_HEX_DATA_ODD) { + for (int i = 0; i < dataFieldSize * 2; i++) { + if ((i & 0x3) == 0) { + sc.SetState(SCE_HEX_DATA_ODD); + } else if ((i & 0x3) == 2) { + sc.SetState(SCE_HEX_DATA_EVEN); + } + + if (!ForwardWithinLine(sc)) { + break; + } + } + } else { + ForwardWithinLine(sc, dataFieldSize * 2); + } + break; + + case SCE_HEX_DATA_ODD: + case SCE_HEX_DATA_EVEN: + case SCE_HEX_DATA_EMPTY: + case SCE_HEX_EXTENDEDADDRESS: + case SCE_HEX_STARTADDRESS: + case SCE_HEX_DATA_UNKNOWN: + recStartPos = GetIHexRecStartPosition(sc.currentPos, styler); + cs1 = CalcIHexChecksum(recStartPos, styler); + cs2 = GetIHexChecksum(recStartPos, styler); + + if (cs1 != cs2 || cs1 < 0 || cs2 < 0) { + sc.SetState(SCE_HEX_CHECKSUM_WRONG); + } else { + sc.SetState(SCE_HEX_CHECKSUM); + } + + ForwardWithinLine(sc, 2); + break; + + case SCE_HEX_CHECKSUM: + case SCE_HEX_CHECKSUM_WRONG: + case SCE_HEX_GARBAGE: + // record finished or line too long + sc.SetState(SCE_HEX_GARBAGE); + ForwardWithinLine(sc); + break; + + default: + // prevent endless loop in faulty state + sc.SetState(SCE_HEX_DEFAULT); + break; + } + } + sc.Complete(); +} + +static void FoldIHexDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) +{ + Sci_PositionU endPos = startPos + length; + + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent - 1); + + Sci_PositionU lineStartNext = styler.LineStart(lineCurrent + 1); + int levelNext = SC_FOLDLEVELBASE; // default if no specific line found + + for (Sci_PositionU i = startPos; i < endPos; i++) { + bool atEOL = i == (lineStartNext - 1); + int style = styler.StyleAt(i); + + // search for specific lines + if (style == SCE_HEX_EXTENDEDADDRESS) { + // extended addres record + levelNext = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG; + } else if (style == SCE_HEX_DATAADDRESS + || (style == SCE_HEX_DEFAULT + && i == (Sci_PositionU)styler.LineStart(lineCurrent))) { + // data record or no record start code at all + if (levelCurrent & SC_FOLDLEVELHEADERFLAG) { + levelNext = SC_FOLDLEVELBASE + 1; + } else { + // continue level 0 or 1, no fold point + levelNext = levelCurrent; + } + } + + if (atEOL || (i == endPos - 1)) { + styler.SetLevel(lineCurrent, levelNext); + + lineCurrent++; + lineStartNext = styler.LineStart(lineCurrent + 1); + levelCurrent = levelNext; + levelNext = SC_FOLDLEVELBASE; + } + } +} + +static void ColouriseTEHexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) +{ + StyleContext sc(startPos, length, initStyle, styler); + + while (sc.More()) { + Sci_PositionU recStartPos; + int digitCount, addrFieldType; + int cs1, cs2; + + switch (sc.state) { + case SCE_HEX_DEFAULT: + if (sc.atLineStart && sc.Match('%')) { + sc.SetState(SCE_HEX_RECSTART); + } + ForwardWithinLine(sc); + break; + + case SCE_HEX_RECSTART: + + recStartPos = sc.currentPos - 1; + + if (GetTEHexDigitCount(recStartPos, styler) == CountTEHexDigitCount(recStartPos, styler)) { + sc.SetState(SCE_HEX_BYTECOUNT); + } else { + sc.SetState(SCE_HEX_BYTECOUNT_WRONG); + } + + ForwardWithinLine(sc, 2); + break; + + case SCE_HEX_BYTECOUNT: + case SCE_HEX_BYTECOUNT_WRONG: + recStartPos = sc.currentPos - 3; + addrFieldType = GetTEHexAddressFieldType(recStartPos, styler); + + if (addrFieldType == SCE_HEX_ADDRESSFIELD_UNKNOWN) { + sc.SetState(SCE_HEX_RECTYPE_UNKNOWN); + } else { + sc.SetState(SCE_HEX_RECTYPE); + } + + ForwardWithinLine(sc); + break; + + case SCE_HEX_RECTYPE: + case SCE_HEX_RECTYPE_UNKNOWN: + recStartPos = sc.currentPos - 4; + cs1 = CalcTEHexChecksum(recStartPos, styler); + cs2 = GetTEHexChecksum(recStartPos, styler); + + if (cs1 != cs2 || cs1 < 0 || cs2 < 0) { + sc.SetState(SCE_HEX_CHECKSUM_WRONG); + } else { + sc.SetState(SCE_HEX_CHECKSUM); + } + + ForwardWithinLine(sc, 2); + break; + + + case SCE_HEX_CHECKSUM: + case SCE_HEX_CHECKSUM_WRONG: + recStartPos = sc.currentPos - 6; + addrFieldType = GetTEHexAddressFieldType(recStartPos, styler); + + sc.SetState(addrFieldType); + ForwardWithinLine(sc, 9); + break; + + case SCE_HEX_DATAADDRESS: + case SCE_HEX_STARTADDRESS: + case SCE_HEX_ADDRESSFIELD_UNKNOWN: + recStartPos = sc.currentPos - 15; + digitCount = GetTEHexDigitCount(recStartPos, styler) - 14; + + sc.SetState(SCE_HEX_DATA_ODD); + + for (int i = 0; i < digitCount; i++) { + if ((i & 0x3) == 0) { + sc.SetState(SCE_HEX_DATA_ODD); + } else if ((i & 0x3) == 2) { + sc.SetState(SCE_HEX_DATA_EVEN); + } + + if (!ForwardWithinLine(sc)) { + break; + } + } + break; + + case SCE_HEX_DATA_ODD: + case SCE_HEX_DATA_EVEN: + case SCE_HEX_GARBAGE: + // record finished or line too long + sc.SetState(SCE_HEX_GARBAGE); + ForwardWithinLine(sc); + break; + + default: + // prevent endless loop in faulty state + sc.SetState(SCE_HEX_DEFAULT); + break; + } + } + sc.Complete(); +} + +LexerModule lmSrec(SCLEX_SREC, ColouriseSrecDoc, "srec", 0, NULL); +LexerModule lmIHex(SCLEX_IHEX, ColouriseIHexDoc, "ihex", FoldIHexDoc, NULL); +LexerModule lmTEHex(SCLEX_TEHEX, ColouriseTEHexDoc, "tehex", 0, NULL); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexIndent.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexIndent.cpp new file mode 100644 index 000000000..053bdd928 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexIndent.cpp @@ -0,0 +1,71 @@ +// Scintilla source code edit control +/** @file LexIndent.cxx + ** Lexer for no language. Used for indentation-based folding of files. + **/ +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void ColouriseIndentDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], + Accessor &styler) { + // Indent language means all style bytes are 0 so just mark the end - no need to fill in. + if (length > 0) { + styler.StartAt(startPos + length - 1); + styler.StartSegment(startPos + length - 1); + styler.ColourTo(startPos + length - 1, 0); + } +} + +static void FoldIndentDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], Accessor &styler) { + int visibleCharsCurrent, visibleCharsNext; + int levelCurrent, levelNext; + Sci_PositionU i, lineEnd; + Sci_PositionU lengthDoc = startPos + length; + Sci_Position lineCurrent = styler.GetLine(startPos); + + i = styler.LineStart(lineCurrent ); + lineEnd = styler.LineStart(lineCurrent+1)-1; + if(lineEnd>=lengthDoc) lineEnd = lengthDoc-1; + while(styler[lineEnd]=='\n' || styler[lineEnd]=='\r') lineEnd--; + for(visibleCharsCurrent=0, levelCurrent=SC_FOLDLEVELBASE; !visibleCharsCurrent && i<=lineEnd; i++){ + if(isspacechar(styler[i])) levelCurrent++; + else visibleCharsCurrent=1; + } + + for(; i=lengthDoc) lineEnd = lengthDoc-1; + while(styler[lineEnd]=='\n' || styler[lineEnd]=='\r') lineEnd--; + for(visibleCharsNext=0, levelNext=SC_FOLDLEVELBASE; !visibleCharsNext && i<=lineEnd; i++){ + if(isspacechar(styler[i])) levelNext++; + else visibleCharsNext=1; + } + int lev = levelCurrent; + if(!visibleCharsCurrent) lev |= SC_FOLDLEVELWHITEFLAG; + else if(levelNext > levelCurrent) lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + levelCurrent = levelNext; + visibleCharsCurrent = visibleCharsNext; + } +} + +LexerModule lmIndent(SCLEX_INDENT, ColouriseIndentDoc, "indent", FoldIndentDoc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexInno.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexInno.cpp new file mode 100644 index 000000000..5d01c0588 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexInno.cpp @@ -0,0 +1,288 @@ +// Scintilla source code edit control +/** @file LexInno.cxx + ** Lexer for Inno Setup scripts. + **/ +// Written by Friedrich Vedder , using code from LexOthers.cxx. +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) { + int state = SCE_INNO_DEFAULT; + char chPrev; + char ch = 0; + char chNext = styler[startPos]; + Sci_Position lengthDoc = startPos + length; + char *buffer = new char[length+1]; + Sci_Position bufferCount = 0; + bool isBOL, isEOL, isWS, isBOLWS = 0; + bool isCStyleComment = false; + + WordList §ionKeywords = *keywordLists[0]; + WordList &standardKeywords = *keywordLists[1]; + WordList ¶meterKeywords = *keywordLists[2]; + WordList &preprocessorKeywords = *keywordLists[3]; + WordList &pascalKeywords = *keywordLists[4]; + WordList &userKeywords = *keywordLists[5]; + + Sci_Position curLine = styler.GetLine(startPos); + int curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : 0; + bool isCode = (curLineState == 1); + + // Go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (Sci_Position i = startPos; i < lengthDoc; i++) { + chPrev = ch; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + + isBOL = (chPrev == 0) || (chPrev == '\n') || (chPrev == '\r' && ch != '\n'); + isBOLWS = (isBOL) ? 1 : (isBOLWS && (chPrev == ' ' || chPrev == '\t')); + isEOL = (ch == '\n' || ch == '\r'); + isWS = (ch == ' ' || ch == '\t'); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Remember the line state for future incremental lexing + curLine = styler.GetLine(i); + styler.SetLineState(curLine, (isCode ? 1 : 0)); + } + + switch(state) { + case SCE_INNO_DEFAULT: + if (!isCode && ch == ';' && isBOLWS) { + // Start of a comment + state = SCE_INNO_COMMENT; + } else if (ch == '[' && isBOLWS) { + // Start of a section name + bufferCount = 0; + state = SCE_INNO_SECTION; + } else if (ch == '#' && isBOLWS) { + // Start of a preprocessor directive + state = SCE_INNO_PREPROC; + } else if (!isCode && ch == '{' && chNext != '{' && chPrev != '{') { + // Start of an inline expansion + state = SCE_INNO_INLINE_EXPANSION; + } else if (isCode && (ch == '{' || (ch == '(' && chNext == '*'))) { + // Start of a Pascal comment + state = SCE_INNO_COMMENT_PASCAL; + isCStyleComment = false; + } else if (isCode && ch == '/' && chNext == '/') { + // Apparently, C-style comments are legal, too + state = SCE_INNO_COMMENT_PASCAL; + isCStyleComment = true; + } else if (ch == '"') { + // Start of a double-quote string + state = SCE_INNO_STRING_DOUBLE; + } else if (ch == '\'') { + // Start of a single-quote string + state = SCE_INNO_STRING_SINGLE; + } else if (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) { + // Start of an identifier + bufferCount = 0; + buffer[bufferCount++] = static_cast(tolower(ch)); + state = SCE_INNO_IDENTIFIER; + } else { + // Style it the default style + styler.ColourTo(i,SCE_INNO_DEFAULT); + } + break; + + case SCE_INNO_COMMENT: + if (isEOL) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_COMMENT); + } + break; + + case SCE_INNO_IDENTIFIER: + if (IsASCII(ch) && (isalnum(ch) || (ch == '_'))) { + buffer[bufferCount++] = static_cast(tolower(ch)); + } else { + state = SCE_INNO_DEFAULT; + buffer[bufferCount] = '\0'; + + // Check if the buffer contains a keyword + if (!isCode && standardKeywords.InList(buffer)) { + styler.ColourTo(i-1,SCE_INNO_KEYWORD); + } else if (!isCode && parameterKeywords.InList(buffer)) { + styler.ColourTo(i-1,SCE_INNO_PARAMETER); + } else if (isCode && pascalKeywords.InList(buffer)) { + styler.ColourTo(i-1,SCE_INNO_KEYWORD_PASCAL); + } else if (!isCode && userKeywords.InList(buffer)) { + styler.ColourTo(i-1,SCE_INNO_KEYWORD_USER); + } else { + styler.ColourTo(i-1,SCE_INNO_DEFAULT); + } + + // Push back the faulty character + chNext = styler[i--]; + ch = chPrev; + } + break; + + case SCE_INNO_SECTION: + if (ch == ']') { + state = SCE_INNO_DEFAULT; + buffer[bufferCount] = '\0'; + + // Check if the buffer contains a section name + if (sectionKeywords.InList(buffer)) { + styler.ColourTo(i,SCE_INNO_SECTION); + isCode = !CompareCaseInsensitive(buffer, "code"); + } else { + styler.ColourTo(i,SCE_INNO_DEFAULT); + } + } else if (IsASCII(ch) && (isalnum(ch) || (ch == '_'))) { + buffer[bufferCount++] = static_cast(tolower(ch)); + } else { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_DEFAULT); + } + break; + + case SCE_INNO_PREPROC: + if (isWS || isEOL) { + if (IsASCII(chPrev) && isalpha(chPrev)) { + state = SCE_INNO_DEFAULT; + buffer[bufferCount] = '\0'; + + // Check if the buffer contains a preprocessor directive + if (preprocessorKeywords.InList(buffer)) { + styler.ColourTo(i-1,SCE_INNO_PREPROC); + } else { + styler.ColourTo(i-1,SCE_INNO_DEFAULT); + } + + // Push back the faulty character + chNext = styler[i--]; + ch = chPrev; + } + } else if (IsASCII(ch) && isalpha(ch)) { + if (chPrev == '#' || chPrev == ' ' || chPrev == '\t') + bufferCount = 0; + buffer[bufferCount++] = static_cast(tolower(ch)); + } + break; + + case SCE_INNO_STRING_DOUBLE: + if (ch == '"' || isEOL) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_STRING_DOUBLE); + } + break; + + case SCE_INNO_STRING_SINGLE: + if (ch == '\'' || isEOL) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_STRING_SINGLE); + } + break; + + case SCE_INNO_INLINE_EXPANSION: + if (ch == '}') { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_INLINE_EXPANSION); + } else if (isEOL) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_DEFAULT); + } + break; + + case SCE_INNO_COMMENT_PASCAL: + if (isCStyleComment) { + if (isEOL) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_COMMENT_PASCAL); + } + } else { + if (ch == '}' || (ch == ')' && chPrev == '*')) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_COMMENT_PASCAL); + } else if (isEOL) { + state = SCE_INNO_DEFAULT; + styler.ColourTo(i,SCE_INNO_DEFAULT); + } + } + break; + + } + } + delete []buffer; +} + +static const char * const innoWordListDesc[] = { + "Sections", + "Keywords", + "Parameters", + "Preprocessor directives", + "Pascal keywords", + "User defined keywords", + 0 +}; + +static void FoldInnoDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { + Sci_PositionU endPos = startPos + length; + char chNext = styler[startPos]; + + Sci_Position lineCurrent = styler.GetLine(startPos); + + bool sectionFlag = false; + int levelPrev = lineCurrent > 0 ? styler.LevelAt(lineCurrent - 1) : SC_FOLDLEVELBASE; + int level; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler[i+1]; + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + int style = styler.StyleAt(i); + + if (style == SCE_INNO_SECTION) + sectionFlag = true; + + if (atEOL || i == endPos - 1) { + if (sectionFlag) { + level = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG; + if (level == levelPrev) + styler.SetLevel(lineCurrent - 1, levelPrev & ~SC_FOLDLEVELHEADERFLAG); + } else { + level = levelPrev & SC_FOLDLEVELNUMBERMASK; + if (levelPrev & SC_FOLDLEVELHEADERFLAG) + level++; + } + + styler.SetLevel(lineCurrent, level); + + levelPrev = level; + lineCurrent++; + sectionFlag = false; + } + } +} + +LexerModule lmInno(SCLEX_INNOSETUP, ColouriseInnoDoc, "inno", FoldInnoDoc, innoWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexJSON.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexJSON.cpp new file mode 100644 index 000000000..3c754f888 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexJSON.cpp @@ -0,0 +1,498 @@ +// Scintilla source code edit control +/** + * @file LexJSON.cxx + * @date February 19, 2016 + * @brief Lexer for JSON and JSON-LD formats + * @author nkmathew + * + * The License.txt file describes the conditions under which this software may + * be distributed. + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; + +static const char *const JSONWordListDesc[] = { + "JSON Keywords", + "JSON-LD Keywords", + 0 +}; + +/** + * Used to detect compact IRI/URLs in JSON-LD without first looking ahead for the + * colon separating the prefix and suffix + * + * https://www.w3.org/TR/json-ld/#dfn-compact-iri + */ +struct CompactIRI { + int colonCount; + bool foundInvalidChar; + CharacterSet setCompactIRI; + CompactIRI() { + colonCount = 0; + foundInvalidChar = false; + setCompactIRI = CharacterSet(CharacterSet::setAlpha, "$_-"); + } + void resetState() { + colonCount = 0; + foundInvalidChar = false; + } + void checkChar(int ch) { + if (ch == ':') { + colonCount++; + } else { + foundInvalidChar |= !setCompactIRI.Contains(ch); + } + } + bool shouldHighlight() const { + return !foundInvalidChar && colonCount == 1; + } +}; + +/** + * Keeps track of escaped characters in strings as per: + * + * https://tools.ietf.org/html/rfc7159#section-7 + */ +struct EscapeSequence { + int digitsLeft; + CharacterSet setHexDigits; + CharacterSet setEscapeChars; + EscapeSequence() { + digitsLeft = 0; + setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef"); + setEscapeChars = CharacterSet(CharacterSet::setNone, "\\\"tnbfru/"); + } + // Returns true if the following character is a valid escaped character + bool newSequence(int nextChar) { + digitsLeft = 0; + if (nextChar == 'u') { + digitsLeft = 5; + } else if (!setEscapeChars.Contains(nextChar)) { + return false; + } + return true; + } + bool atEscapeEnd() const { + return digitsLeft <= 0; + } + bool isInvalidChar(int currChar) const { + return !setHexDigits.Contains(currChar); + } +}; + +struct OptionsJSON { + bool foldCompact; + bool fold; + bool allowComments; + bool escapeSequence; + OptionsJSON() { + foldCompact = false; + fold = false; + allowComments = false; + escapeSequence = false; + } +}; + +struct OptionSetJSON : public OptionSet { + OptionSetJSON() { + DefineProperty("lexer.json.escape.sequence", &OptionsJSON::escapeSequence, + "Set to 1 to enable highlighting of escape sequences in strings"); + + DefineProperty("lexer.json.allow.comments", &OptionsJSON::allowComments, + "Set to 1 to enable highlighting of line/block comments in JSON"); + + DefineProperty("fold.compact", &OptionsJSON::foldCompact); + DefineProperty("fold", &OptionsJSON::fold); + DefineWordListSets(JSONWordListDesc); + } +}; + +class LexerJSON : public DefaultLexer { + OptionsJSON options; + OptionSetJSON optSetJSON; + EscapeSequence escapeSeq; + WordList keywordsJSON; + WordList keywordsJSONLD; + CharacterSet setOperators; + CharacterSet setURL; + CharacterSet setKeywordJSONLD; + CharacterSet setKeywordJSON; + CompactIRI compactIRI; + + static bool IsNextNonWhitespace(LexAccessor &styler, Sci_Position start, char ch) { + Sci_Position i = 0; + while (i < 50) { + i++; + char curr = styler.SafeGetCharAt(start+i, '\0'); + char next = styler.SafeGetCharAt(start+i+1, '\0'); + bool atEOL = (curr == '\r' && next != '\n') || (curr == '\n'); + if (curr == ch) { + return true; + } else if (!isspacechar(curr) || atEOL) { + return false; + } + } + return false; + } + + /** + * Looks for the colon following the end quote + * + * Assumes property names of lengths no longer than a 100 characters. + * The colon is also expected to be less than 50 spaces after the end + * quote for the string to be considered a property name + */ + static bool AtPropertyName(LexAccessor &styler, Sci_Position start) { + Sci_Position i = 0; + bool escaped = false; + while (i < 100) { + i++; + char curr = styler.SafeGetCharAt(start+i, '\0'); + if (escaped) { + escaped = false; + continue; + } + escaped = curr == '\\'; + if (curr == '"') { + return IsNextNonWhitespace(styler, start+i, ':'); + } else if (!curr) { + return false; + } + } + return false; + } + + static bool IsNextWordInList(WordList &keywordList, CharacterSet wordSet, + StyleContext &context, LexAccessor &styler) { + char word[51]; + Sci_Position currPos = (Sci_Position) context.currentPos; + int i = 0; + while (i < 50) { + char ch = styler.SafeGetCharAt(currPos + i); + if (!wordSet.Contains(ch)) { + break; + } + word[i] = ch; + i++; + } + word[i] = '\0'; + return keywordList.InList(word); + } + + public: + LexerJSON() : + setOperators(CharacterSet::setNone, "[{}]:,"), + setURL(CharacterSet::setAlphaNum, "-._~:/?#[]@!$&'()*+,),="), + setKeywordJSONLD(CharacterSet::setAlpha, ":@"), + setKeywordJSON(CharacterSet::setAlpha, "$_") { + } + virtual ~LexerJSON() {} + int SCI_METHOD Version() const override { + return lvOriginal; + } + void SCI_METHOD Release() override { + delete this; + } + const char *SCI_METHOD PropertyNames() override { + return optSetJSON.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return optSetJSON.PropertyType(name); + } + const char *SCI_METHOD DescribeProperty(const char *name) override { + return optSetJSON.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override { + if (optSetJSON.PropertySet(&options, key, val)) { + return 0; + } + return -1; + } + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override { + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywordsJSON; + break; + case 1: + wordListN = &keywordsJSONLD; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; + } + void *SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + static ILexer *LexerFactoryJSON() { + return new LexerJSON; + } + const char *SCI_METHOD DescribeWordListSets() override { + return optSetJSON.DescribeWordListSets(); + } + void SCI_METHOD Lex(Sci_PositionU startPos, + Sci_Position length, + int initStyle, + IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, + Sci_Position length, + int initStyle, + IDocument *pAccess) override; +}; + +void SCI_METHOD LexerJSON::Lex(Sci_PositionU startPos, + Sci_Position length, + int initStyle, + IDocument *pAccess) { + LexAccessor styler(pAccess); + StyleContext context(startPos, length, initStyle, styler); + int stringStyleBefore = SCE_JSON_STRING; + while (context.More()) { + switch (context.state) { + case SCE_JSON_BLOCKCOMMENT: + if (context.Match("*/")) { + context.Forward(); + context.ForwardSetState(SCE_JSON_DEFAULT); + } + break; + case SCE_JSON_LINECOMMENT: + if (context.atLineEnd) { + context.SetState(SCE_JSON_DEFAULT); + } + break; + case SCE_JSON_STRINGEOL: + if (context.atLineStart) { + context.SetState(SCE_JSON_DEFAULT); + } + break; + case SCE_JSON_ESCAPESEQUENCE: + escapeSeq.digitsLeft--; + if (!escapeSeq.atEscapeEnd()) { + if (escapeSeq.isInvalidChar(context.ch)) { + context.SetState(SCE_JSON_ERROR); + } + break; + } + if (context.ch == '"') { + context.SetState(stringStyleBefore); + context.ForwardSetState(SCE_C_DEFAULT); + } else if (context.ch == '\\') { + if (!escapeSeq.newSequence(context.chNext)) { + context.SetState(SCE_JSON_ERROR); + } + context.Forward(); + } else { + context.SetState(stringStyleBefore); + if (context.atLineEnd) { + context.ChangeState(SCE_JSON_STRINGEOL); + } + } + break; + case SCE_JSON_PROPERTYNAME: + case SCE_JSON_STRING: + if (context.ch == '"') { + if (compactIRI.shouldHighlight()) { + context.ChangeState(SCE_JSON_COMPACTIRI); + context.ForwardSetState(SCE_JSON_DEFAULT); + compactIRI.resetState(); + } else { + context.ForwardSetState(SCE_JSON_DEFAULT); + } + } else if (context.atLineEnd) { + context.ChangeState(SCE_JSON_STRINGEOL); + } else if (context.ch == '\\') { + stringStyleBefore = context.state; + if (options.escapeSequence) { + context.SetState(SCE_JSON_ESCAPESEQUENCE); + if (!escapeSeq.newSequence(context.chNext)) { + context.SetState(SCE_JSON_ERROR); + } + } + context.Forward(); + } else if (context.Match("https://") || + context.Match("http://") || + context.Match("ssh://") || + context.Match("git://") || + context.Match("svn://") || + context.Match("ftp://") || + context.Match("mailto:")) { + // Handle most common URI schemes only + stringStyleBefore = context.state; + context.SetState(SCE_JSON_URI); + } else if (context.ch == '@') { + // https://www.w3.org/TR/json-ld/#dfn-keyword + if (IsNextWordInList(keywordsJSONLD, setKeywordJSONLD, context, styler)) { + stringStyleBefore = context.state; + context.SetState(SCE_JSON_LDKEYWORD); + } + } else { + compactIRI.checkChar(context.ch); + } + break; + case SCE_JSON_LDKEYWORD: + case SCE_JSON_URI: + if ((!setKeywordJSONLD.Contains(context.ch) && + (context.state == SCE_JSON_LDKEYWORD)) || + (!setURL.Contains(context.ch))) { + context.SetState(stringStyleBefore); + } + if (context.ch == '"') { + context.ForwardSetState(SCE_JSON_DEFAULT); + } else if (context.atLineEnd) { + context.ChangeState(SCE_JSON_STRINGEOL); + } + break; + case SCE_JSON_OPERATOR: + case SCE_JSON_NUMBER: + context.SetState(SCE_JSON_DEFAULT); + break; + case SCE_JSON_ERROR: + if (context.atLineEnd) { + context.SetState(SCE_JSON_DEFAULT); + } + break; + case SCE_JSON_KEYWORD: + if (!setKeywordJSON.Contains(context.ch)) { + context.SetState(SCE_JSON_DEFAULT); + } + break; + } + if (context.state == SCE_JSON_DEFAULT) { + if (context.ch == '"') { + compactIRI.resetState(); + context.SetState(SCE_JSON_STRING); + Sci_Position currPos = static_cast(context.currentPos); + if (AtPropertyName(styler, currPos)) { + context.SetState(SCE_JSON_PROPERTYNAME); + } + } else if (setOperators.Contains(context.ch)) { + context.SetState(SCE_JSON_OPERATOR); + } else if (options.allowComments && context.Match("/*")) { + context.SetState(SCE_JSON_BLOCKCOMMENT); + context.Forward(); + } else if (options.allowComments && context.Match("//")) { + context.SetState(SCE_JSON_LINECOMMENT); + } else if (setKeywordJSON.Contains(context.ch)) { + if (IsNextWordInList(keywordsJSON, setKeywordJSON, context, styler)) { + context.SetState(SCE_JSON_KEYWORD); + } + } + bool numberStart = + IsADigit(context.ch) && (context.chPrev == '+'|| + context.chPrev == '-' || + context.atLineStart || + IsASpace(context.chPrev) || + setOperators.Contains(context.chPrev)); + bool exponentPart = + tolower(context.ch) == 'e' && + IsADigit(context.chPrev) && + (IsADigit(context.chNext) || + context.chNext == '+' || + context.chNext == '-'); + bool signPart = + (context.ch == '-' || context.ch == '+') && + ((tolower(context.chPrev) == 'e' && IsADigit(context.chNext)) || + ((IsASpace(context.chPrev) || setOperators.Contains(context.chPrev)) + && IsADigit(context.chNext))); + bool adjacentDigit = + IsADigit(context.ch) && IsADigit(context.chPrev); + bool afterExponent = IsADigit(context.ch) && tolower(context.chPrev) == 'e'; + bool dotPart = context.ch == '.' && + IsADigit(context.chPrev) && + IsADigit(context.chNext); + bool afterDot = IsADigit(context.ch) && context.chPrev == '.'; + if (numberStart || + exponentPart || + signPart || + adjacentDigit || + dotPart || + afterExponent || + afterDot) { + context.SetState(SCE_JSON_NUMBER); + } else if (context.state == SCE_JSON_DEFAULT && !IsASpace(context.ch)) { + context.SetState(SCE_JSON_ERROR); + } + } + context.Forward(); + } + context.Complete(); +} + +void SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos, + Sci_Position length, + int, + IDocument *pAccess) { + if (!options.fold) { + return; + } + LexAccessor styler(pAccess); + Sci_PositionU currLine = styler.GetLine(startPos); + Sci_PositionU endPos = startPos + length; + int currLevel = SC_FOLDLEVELBASE; + if (currLine > 0) + currLevel = styler.LevelAt(currLine - 1) >> 16; + int nextLevel = currLevel; + int visibleChars = 0; + for (Sci_PositionU i = startPos; i < endPos; i++) { + char curr = styler.SafeGetCharAt(i); + char next = styler.SafeGetCharAt(i+1); + bool atEOL = (curr == '\r' && next != '\n') || (curr == '\n'); + if (styler.StyleAt(i) == SCE_JSON_OPERATOR) { + if (curr == '{' || curr == '[') { + nextLevel++; + } else if (curr == '}' || curr == ']') { + nextLevel--; + } + } + if (atEOL || i == (endPos-1)) { + int level = currLevel | nextLevel << 16; + if (!visibleChars && options.foldCompact) { + level |= SC_FOLDLEVELWHITEFLAG; + } else if (nextLevel > currLevel) { + level |= SC_FOLDLEVELHEADERFLAG; + } + if (level != styler.LevelAt(currLine)) { + styler.SetLevel(currLine, level); + } + currLine++; + currLevel = nextLevel; + visibleChars = 0; + } + if (!isspacechar(curr)) { + visibleChars++; + } + } +} + +LexerModule lmJSON(SCLEX_JSON, + LexerJSON::LexerFactoryJSON, + "json", + JSONWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexKVIrc.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexKVIrc.cpp new file mode 100644 index 000000000..0cae2a234 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexKVIrc.cpp @@ -0,0 +1,471 @@ +// Scintilla source code edit control +/** @file LexKVIrc.cxx + ** Lexer for KVIrc script. + **/ +// Copyright 2013 by OmegaPhil , based in +// part from LexPython Copyright 1998-2002 by Neil Hodgson +// and LexCmake Copyright 2007 by Cristian Adam + +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + + +/* KVIrc Script syntactic rules: http://www.kvirc.net/doc/doc_syntactic_rules.html */ + +/* Utility functions */ +static inline bool IsAWordChar(int ch) { + + /* Keyword list includes modules, i.e. words including '.', and + * alias namespaces include ':' */ + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' + || ch == ':'); +} +static inline bool IsAWordStart(int ch) { + + /* Functions (start with '$') are treated separately to keywords */ + return (ch < 0x80) && (isalnum(ch) || ch == '_' ); +} + +/* Interface function called by Scintilla to request some text to be + syntax highlighted */ +static void ColouriseKVIrcDoc(Sci_PositionU startPos, Sci_Position length, + int initStyle, WordList *keywordlists[], + Accessor &styler) +{ + /* Fetching style context */ + StyleContext sc(startPos, length, initStyle, styler); + + /* Accessing keywords and function-marking keywords */ + WordList &keywords = *keywordlists[0]; + WordList &functionKeywords = *keywordlists[1]; + + /* Looping for all characters - only automatically moving forward + * when asked for (transitions leaving strings and keywords do this + * already) */ + bool next = true; + for( ; sc.More(); next ? sc.Forward() : (void)0 ) + { + /* Resetting next */ + next = true; + + /* Dealing with different states */ + switch (sc.state) + { + case SCE_KVIRC_DEFAULT: + + /* Detecting single-line comments + * Unfortunately KVIrc script allows raw '#' to be used, and appending # to an array returns + * its length... + * Going for a compromise where single line comments not + * starting on a newline are allowed in all cases except + * when they are preceeded with an opening bracket or comma + * (this will probably be the most common style a valid + * string-less channel name will be used with), with the + * array length case included + */ + if ( + (sc.ch == '#' && sc.atLineStart) || + (sc.ch == '#' && ( + sc.chPrev != '(' && sc.chPrev != ',' && + sc.chPrev != ']') + ) + ) + { + sc.SetState(SCE_KVIRC_COMMENT); + break; + } + + /* Detecting multi-line comments */ + if (sc.Match('/', '*')) + { + sc.SetState(SCE_KVIRC_COMMENTBLOCK); + break; + } + + /* Detecting strings */ + if (sc.ch == '"') + { + sc.SetState(SCE_KVIRC_STRING); + break; + } + + /* Detecting functions */ + if (sc.ch == '$') + { + sc.SetState(SCE_KVIRC_FUNCTION); + break; + } + + /* Detecting variables */ + if (sc.ch == '%') + { + sc.SetState(SCE_KVIRC_VARIABLE); + break; + } + + /* Detecting numbers - isdigit is unsafe as it does not + * validate, use CharacterSet.h functions */ + if (IsADigit(sc.ch)) + { + sc.SetState(SCE_KVIRC_NUMBER); + break; + } + + /* Detecting words */ + if (IsAWordStart(sc.ch) && IsAWordChar(sc.chNext)) + { + sc.SetState(SCE_KVIRC_WORD); + sc.Forward(); + break; + } + + /* Detecting operators */ + if (isoperator(sc.ch)) + { + sc.SetState(SCE_KVIRC_OPERATOR); + break; + } + + break; + + case SCE_KVIRC_COMMENT: + + /* Breaking out of single line comment when a newline + * is introduced */ + if (sc.ch == '\r' || sc.ch == '\n') + { + sc.SetState(SCE_KVIRC_DEFAULT); + break; + } + + break; + + case SCE_KVIRC_COMMENTBLOCK: + + /* Detecting end of multi-line comment */ + if (sc.Match('*', '/')) + { + // Moving the current position forward two characters + // so that '*/' is included in the comment + sc.Forward(2); + sc.SetState(SCE_KVIRC_DEFAULT); + + /* Comment has been exited and the current position + * moved forward, yet the new current character + * has yet to be defined - loop without moving + * forward again */ + next = false; + break; + } + + break; + + case SCE_KVIRC_STRING: + + /* Detecting end of string - closing speechmarks */ + if (sc.ch == '"') + { + /* Allowing escaped speechmarks to pass */ + if (sc.chPrev == '\\') + break; + + /* Moving the current position forward to capture the + * terminating speechmarks, and ending string */ + sc.ForwardSetState(SCE_KVIRC_DEFAULT); + + /* String has been exited and the current position + * moved forward, yet the new current character + * has yet to be defined - loop without moving + * forward again */ + next = false; + break; + } + + /* Functions and variables are now highlighted in strings + * Detecting functions */ + if (sc.ch == '$') + { + /* Allowing escaped functions to pass */ + if (sc.chPrev == '\\') + break; + + sc.SetState(SCE_KVIRC_STRING_FUNCTION); + break; + } + + /* Detecting variables */ + if (sc.ch == '%') + { + /* Allowing escaped variables to pass */ + if (sc.chPrev == '\\') + break; + + sc.SetState(SCE_KVIRC_STRING_VARIABLE); + break; + } + + /* Breaking out of a string when a newline is introduced */ + if (sc.ch == '\r' || sc.ch == '\n') + { + /* Allowing escaped newlines */ + if (sc.chPrev == '\\') + break; + + sc.SetState(SCE_KVIRC_DEFAULT); + break; + } + + break; + + case SCE_KVIRC_FUNCTION: + case SCE_KVIRC_VARIABLE: + + /* Detecting the end of a function/variable (word) */ + if (!IsAWordChar(sc.ch)) + { + sc.SetState(SCE_KVIRC_DEFAULT); + + /* Word has been exited yet the current character + * has yet to be defined - loop without moving + * forward again */ + next = false; + break; + } + + break; + + case SCE_KVIRC_STRING_FUNCTION: + case SCE_KVIRC_STRING_VARIABLE: + + /* A function or variable in a string + * Detecting the end of a function/variable (word) */ + if (!IsAWordChar(sc.ch)) + { + sc.SetState(SCE_KVIRC_STRING); + + /* Word has been exited yet the current character + * has yet to be defined - loop without moving + * forward again */ + next = false; + break; + } + + break; + + case SCE_KVIRC_NUMBER: + + /* Detecting the end of a number */ + if (!IsADigit(sc.ch)) + { + sc.SetState(SCE_KVIRC_DEFAULT); + + /* Number has been exited yet the current character + * has yet to be defined - loop without moving + * forward */ + next = false; + break; + } + + break; + + case SCE_KVIRC_OPERATOR: + + /* Because '%' is an operator but is also the marker for + * a variable, I need to always treat operators as single + * character strings and therefore redo their detection + * after every character */ + sc.SetState(SCE_KVIRC_DEFAULT); + + /* Operator has been exited yet the current character + * has yet to be defined - loop without moving + * forward */ + next = false; + break; + + case SCE_KVIRC_WORD: + + /* Detecting the end of a word */ + if (!IsAWordChar(sc.ch)) + { + /* Checking if the word was actually a keyword - + * fetching the current word, NULL-terminated like + * the keyword list */ + char s[100]; + Sci_Position wordLen = sc.currentPos - styler.GetStartSegment(); + if (wordLen > 99) + wordLen = 99; /* Include '\0' in buffer */ + Sci_Position i; + for( i = 0; i < wordLen; ++i ) + { + s[i] = styler.SafeGetCharAt( styler.GetStartSegment() + i ); + } + s[wordLen] = '\0'; + + /* Actually detecting keywords and fixing the state */ + if (keywords.InList(s)) + { + /* The SetState call actually commits the + * previous keyword state */ + sc.ChangeState(SCE_KVIRC_KEYWORD); + } + else if (functionKeywords.InList(s)) + { + // Detecting function keywords and fixing the state + sc.ChangeState(SCE_KVIRC_FUNCTION_KEYWORD); + } + + /* Transitioning to default and committing the previous + * word state */ + sc.SetState(SCE_KVIRC_DEFAULT); + + /* Word has been exited yet the current character + * has yet to be defined - loop without moving + * forward again */ + next = false; + break; + } + + break; + } + } + + /* Indicating processing is complete */ + sc.Complete(); +} + +static void FoldKVIrcDoc(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, + WordList *[], Accessor &styler) +{ + /* Based on CMake's folder */ + + /* Exiting if folding isnt enabled */ + if ( styler.GetPropertyInt("fold") == 0 ) + return; + + /* Obtaining current line number*/ + Sci_Position currentLine = styler.GetLine(startPos); + + /* Obtaining starting character - indentation is done on a line basis, + * not character */ + Sci_PositionU safeStartPos = styler.LineStart( currentLine ); + + /* Initialising current level - this is defined as indentation level + * in the low 12 bits, with flag bits in the upper four bits. + * It looks like two indentation states are maintained in the returned + * 32bit value - 'nextLevel' in the most-significant bits, 'currentLevel' + * in the least-significant bits. Since the next level is the most + * up to date, this must refer to the current state of indentation. + * So the code bitshifts the old current level out of existence to + * get at the actual current state of indentation + * Based on the LexerCPP.cxx line 958 comment */ + int currentLevel = SC_FOLDLEVELBASE; + if (currentLine > 0) + currentLevel = styler.LevelAt(currentLine - 1) >> 16; + int nextLevel = currentLevel; + + // Looping for characters in range + for (Sci_PositionU i = safeStartPos; i < startPos + length; ++i) + { + /* Folding occurs after syntax highlighting, meaning Scintilla + * already knows where the comments are + * Fetching the current state */ + int state = styler.StyleAt(i) & 31; + + switch( styler.SafeGetCharAt(i) ) + { + case '{': + + /* Indenting only when the braces are not contained in + * a comment */ + if (state != SCE_KVIRC_COMMENT && + state != SCE_KVIRC_COMMENTBLOCK) + ++nextLevel; + break; + + case '}': + + /* Outdenting only when the braces are not contained in + * a comment */ + if (state != SCE_KVIRC_COMMENT && + state != SCE_KVIRC_COMMENTBLOCK) + --nextLevel; + break; + + case '\n': + case '\r': + + /* Preparing indentation information to return - combining + * current and next level data */ + int lev = currentLevel | nextLevel << 16; + + /* If the next level increases the indent level, mark the + * current line as a fold point - current level data is + * in the least significant bits */ + if (nextLevel > currentLevel ) + lev |= SC_FOLDLEVELHEADERFLAG; + + /* Updating indentation level if needed */ + if (lev != styler.LevelAt(currentLine)) + styler.SetLevel(currentLine, lev); + + /* Updating variables */ + ++currentLine; + currentLevel = nextLevel; + + /* Dealing with problematic Windows newlines - + * incrementing to avoid the extra newline breaking the + * fold point */ + if (styler.SafeGetCharAt(i) == '\r' && + styler.SafeGetCharAt(i + 1) == '\n') + ++i; + break; + } + } + + /* At this point the data has ended, so presumably the end of the line? + * Preparing indentation information to return - combining current + * and next level data */ + int lev = currentLevel | nextLevel << 16; + + /* If the next level increases the indent level, mark the current + * line as a fold point - current level data is in the least + * significant bits */ + if (nextLevel > currentLevel ) + lev |= SC_FOLDLEVELHEADERFLAG; + + /* Updating indentation level if needed */ + if (lev != styler.LevelAt(currentLine)) + styler.SetLevel(currentLine, lev); +} + +/* Registering wordlists */ +static const char *const kvircWordListDesc[] = { + "primary", + "function_keywords", + 0 +}; + + +/* Registering functions and wordlists */ +LexerModule lmKVIrc(SCLEX_KVIRC, ColouriseKVIrcDoc, "kvirc", FoldKVIrcDoc, + kvircWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexKix.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexKix.cpp new file mode 100644 index 000000000..bcd68137e --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexKix.cpp @@ -0,0 +1,134 @@ +// Scintilla source code edit control +/** @file LexKix.cxx + ** Lexer for KIX-Scripts. + **/ +// Copyright 2004 by Manfred Becker +// The License.txt file describes the conditions under which this software may be distributed. +// Edited by Lee Wilmott (24-Jun-2014) added support for block comments + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +// Extended to accept accented characters +static inline bool IsAWordChar(int ch) { + return ch >= 0x80 || isalnum(ch) || ch == '_'; +} + +static inline bool IsOperator(const int ch) { + return (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '&' || ch == '|' || ch == '<' || ch == '>' || ch == '='); +} + +static void ColouriseKixDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; +// WordList &keywords4 = *keywordlists[3]; + + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_KIX_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_COMMENTSTREAM) { + if (sc.ch == '/' && sc.chPrev == '*') { + sc.ForwardSetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_STRING1) { + // This is a doubles quotes string + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_STRING2) { + // This is a single quote string + if (sc.ch == '\'') { + sc.ForwardSetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_NUMBER) { + if (!IsADigit(sc.ch)) { + sc.SetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_VAR) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_MACRO) { + if (!IsAWordChar(sc.ch) && !IsADigit(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (!keywords3.InList(&s[1])) { + sc.ChangeState(SCE_KIX_DEFAULT); + } + sc.SetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_OPERATOR) { + if (!IsOperator(sc.ch)) { + sc.SetState(SCE_KIX_DEFAULT); + } + } else if (sc.state == SCE_KIX_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_KIX_KEYWORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_KIX_FUNCTIONS); + } + sc.SetState(SCE_KIX_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_KIX_DEFAULT) { + if (sc.ch == ';') { + sc.SetState(SCE_KIX_COMMENT); + } else if (sc.ch == '/' && sc.chNext == '*') { + sc.SetState(SCE_KIX_COMMENTSTREAM); + } else if (sc.ch == '\"') { + sc.SetState(SCE_KIX_STRING1); + } else if (sc.ch == '\'') { + sc.SetState(SCE_KIX_STRING2); + } else if (sc.ch == '$') { + sc.SetState(SCE_KIX_VAR); + } else if (sc.ch == '@') { + sc.SetState(SCE_KIX_MACRO); + } else if (IsADigit(sc.ch) || ((sc.ch == '.' || sc.ch == '&') && IsADigit(sc.chNext))) { + sc.SetState(SCE_KIX_NUMBER); + } else if (IsOperator(sc.ch)) { + sc.SetState(SCE_KIX_OPERATOR); + } else if (IsAWordChar(sc.ch)) { + sc.SetState(SCE_KIX_IDENTIFIER); + } + } + } + sc.Complete(); +} + + +LexerModule lmKix(SCLEX_KIX, ColouriseKixDoc, "kix"); + diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexLPeg.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexLPeg.cpp new file mode 100644 index 000000000..dfba76188 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexLPeg.cpp @@ -0,0 +1,799 @@ +/** + * Copyright 2006-2018 Mitchell mitchell.att.foicica.com. See License.txt. + * + * Lua-powered dynamic language lexer for Scintilla. + * + * For documentation on writing lexers, see *../doc/LPegLexer.html*. + */ + +#if LPEG_LEXER + +#include +#include +#include +#include +#include +#if CURSES +#include +#endif + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "LexAccessor.h" +#include "LexerModule.h" + +extern "C" { +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" +LUALIB_API int luaopen_lpeg(lua_State *L); +} + +#if _WIN32 +#define strcasecmp _stricmp +#endif +#define streq(s1, s2) (strcasecmp((s1), (s2)) == 0) + +using namespace Scintilla; + +#define l_setmetatable(l, k, mtf) \ + if (luaL_newmetatable(l, k)) { \ + lua_pushcfunction(l, mtf), lua_setfield(l, -2, "__index"); \ + lua_pushcfunction(l, mtf), lua_setfield(l, -2, "__newindex"); \ + } \ + lua_setmetatable(l, -2); +#define l_pushlexerp(l, mtf) do { \ + lua_newtable(l); \ + lua_pushvalue(l, 2), lua_setfield(l, -2, "property"); \ + l_setmetatable(l, "sci_lexerp", mtf); \ +} while(0) +#define l_getlexerobj(l) \ + lua_getfield(l, LUA_REGISTRYINDEX, "sci_lexers"); \ + lua_pushlightuserdata(l, reinterpret_cast(this)); \ + lua_gettable(l, -2), lua_replace(l, -2); +#define l_getlexerfield(l, k) \ + l_getlexerobj(l); \ + lua_getfield(l, -1, k), lua_replace(l, -2); +#if LUA_VERSION_NUM < 502 +#define l_openlib(f, s) \ + (lua_pushcfunction(L, f), lua_pushstring(L, s), lua_call(L, 1, 0)) +#define LUA_BASELIBNAME "" +#define lua_rawlen lua_objlen +#define LUA_OK 0 +#define lua_compare(l, a, b, _) lua_equal(l, a, b) +#define LUA_OPEQ 0 +#else +#define l_openlib(f, s) (luaL_requiref(L, s, f, 1), lua_pop(L, 1)) +#define LUA_BASELIBNAME "_G" +#endif +#define l_setfunction(l, f, k) (lua_pushcfunction(l, f), lua_setfield(l, -2, k)) +#define l_setconstant(l, c, k) (lua_pushinteger(l, c), lua_setfield(l, -2, k)) + +#if CURSES +#define A_COLORCHAR (A_COLOR | A_CHARTEXT) +#endif + +/** The LPeg Scintilla lexer. */ +class LexerLPeg : public ILexer { + /** + * The lexer's Lua state. + * It is cleared each time the lexer language changes unless `own_lua` is + * `true`. + */ + lua_State *L; + /** + * The flag indicating whether or not an existing Lua state was supplied as + * the lexer's Lua state. + */ + bool own_lua; + /** + * The set of properties for the lexer. + * The `lexer.name`, `lexer.lpeg.home`, and `lexer.lpeg.color.theme` + * properties must be defined before running the lexer. + */ + PropSetSimple props; + /** The function to send Scintilla messages with. */ + SciFnDirect SS; + /** The Scintilla object the lexer belongs to. */ + sptr_t sci; + /** + * The flag indicating whether or not the lexer needs to be re-initialized. + * Re-initialization is required after the lexer language changes. + */ + bool reinit; + /** + * The flag indicating whether or not the lexer language has embedded lexers. + */ + bool multilang; + /** + * The list of style numbers considered to be whitespace styles. + * This is used in multi-language lexers when backtracking to whitespace to + * determine which lexer grammar to use. + */ + bool ws[STYLE_MAX + 1]; + + /** + * Logs the given error message or a Lua error message, prints it, and clears + * the stack. + * Error messages are logged to the "lexer.lpeg.error" property. + * @param str The error message to log and print. If `NULL`, logs and prints + * the Lua error message at the top of the stack. + */ + static void l_error(lua_State *L, const char *str=NULL) { + lua_getfield(L, LUA_REGISTRYINDEX, "sci_props"); + PropSetSimple *props = static_cast(lua_touserdata(L, -1)); + lua_pop(L, 1); // props + const char *key = "lexer.lpeg.error"; + const char *value = str ? str : lua_tostring(L, -1); + props->Set(key, value, strlen(key), strlen(value)); + fprintf(stderr, "Lua Error: %s.\n", str ? str : lua_tostring(L, -1)); + lua_settop(L, 0); + } + + /** The lexer's `line_from_position` Lua function. */ + static int l_line_from_position(lua_State *L) { + lua_getfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + IDocument *buffer = static_cast(lua_touserdata(L, -1)); + lua_pushinteger(L, buffer->LineFromPosition(luaL_checkinteger(L, 1) - 1)); + return 1; + } + + /** The lexer's `__index` Lua metatable. */ + static int llexer_property(lua_State *L) { + int newindex = (lua_gettop(L) == 3); + luaL_getmetatable(L, "sci_lexer"); + lua_getmetatable(L, 1); // metatable can be either sci_lexer or sci_lexerp + int is_lexer = lua_compare(L, -1, -2, LUA_OPEQ); + lua_pop(L, 2); // metatable, metatable + + lua_getfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + IDocument *buffer = static_cast(lua_touserdata(L, -1)); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_props"); + PropSetSimple *props = static_cast(lua_touserdata(L, -1)); + lua_pop(L, 2); // sci_props and sci_buffer + + if (is_lexer) + lua_pushvalue(L, 2); // key is given + else + lua_getfield(L, 1, "property"); // indexible property + const char *key = lua_tostring(L, -1); + if (strcmp(key, "fold_level") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else + lua_pushinteger(L, buffer->GetLevel(luaL_checkinteger(L, 2))); + } else if (strcmp(key, "indent_amount") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else + lua_pushinteger(L, buffer->GetLineIndentation(luaL_checkinteger(L, 2))); + } else if (strcmp(key, "property") == 0) { + luaL_argcheck(L, !is_lexer || !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else if (!newindex) + lua_pushstring(L, props->Get(luaL_checkstring(L, 2))); + else + props->Set(luaL_checkstring(L, 2), luaL_checkstring(L, 3), + lua_rawlen(L, 2), lua_rawlen(L, 3)); + } else if (strcmp(key, "property_int") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else { + lua_pushstring(L, props->Get(luaL_checkstring(L, 2))); + lua_pushinteger(L, lua_tointeger(L, -1)); + } + } else if (strcmp(key, "style_at") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else { + int style = buffer->StyleAt(luaL_checkinteger(L, 2) - 1); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexer_obj"); + lua_getfield(L, -1, "_TOKENSTYLES"), lua_replace(L, -2); + lua_pushnil(L); + while (lua_next(L, -2)) { + if (luaL_checkinteger(L, -1) == style) break; + lua_pop(L, 1); // value + } + lua_pop(L, 1); // style_num + } + } else if (strcmp(key, "line_state") == 0) { + luaL_argcheck(L, !is_lexer || !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else if (!newindex) + lua_pushinteger(L, buffer->GetLineState(luaL_checkinteger(L, 2))); + else + buffer->SetLineState(luaL_checkinteger(L, 2), + luaL_checkinteger(L, 3)); + } else return !newindex ? (lua_rawget(L, 1), 1) : (lua_rawset(L, 1), 0); + return 1; + } + + /** + * Expands value of the string property key at index *index* and pushes the + * result onto the stack. + * @param L The Lua State. + * @param index The index the string property key. + */ + void lL_getexpanded(lua_State *L, int index) { + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"), lua_getfield(L, -1, "lexer"); + lua_getfield(L, -1, "property_expanded"); + lua_pushvalue(L, (index > 0) ? index : index - 3), lua_gettable(L, -2); + lua_replace(L, -4), lua_pop(L, 2); // property_expanded and lexer module + } + + /** + * Parses the given style string to set the properties for the given style + * number. + * @param num The style number to set properties for. + * @param style The style string containing properties to set. + */ + void SetStyle(int num, const char *style) { + char *style_copy = static_cast(malloc(strlen(style) + 1)); + char *option = strcpy(style_copy, style), *next = NULL, *p = NULL; + while (option) { + if ((next = strchr(option, ','))) *next++ = '\0'; + if ((p = strchr(option, ':'))) *p++ = '\0'; + if (streq(option, "font") && p) + SS(sci, SCI_STYLESETFONT, num, reinterpret_cast(p)); + else if (streq(option, "size") && p) + SS(sci, SCI_STYLESETSIZE, num, static_cast(atoi(p))); + else if (streq(option, "bold") || streq(option, "notbold") || + streq(option, "weight")) { +#if !CURSES + int weight = SC_WEIGHT_NORMAL; + if (*option == 'b') + weight = SC_WEIGHT_BOLD; + else if (*option == 'w' && p) + weight = atoi(p); + SS(sci, SCI_STYLESETWEIGHT, num, weight); +#else + // Scintilla curses requires font attributes to be stored in the "font + // weight" style attribute. + // First, clear any existing SC_WEIGHT_NORMAL, SC_WEIGHT_SEMIBOLD, or + // SC_WEIGHT_BOLD values stored in the lower 16 bits. Then set the + // appropriate curses attr. + sptr_t weight = SS(sci, SCI_STYLEGETWEIGHT, num, 0) & ~A_COLORCHAR; + int bold = *option == 'b' || + (*option == 'w' && p && atoi(p) > SC_WEIGHT_NORMAL); + SS(sci, SCI_STYLESETWEIGHT, num, + bold ? weight | A_BOLD : weight & ~A_BOLD); +#endif + } else if (streq(option, "italics") || streq(option, "notitalics")) + SS(sci, SCI_STYLESETITALIC, num, *option == 'i'); + else if (streq(option, "underlined") || streq(option, "notunderlined")) { +#if !CURSES + SS(sci, SCI_STYLESETUNDERLINE, num, *option == 'u'); +#else + // Scintilla curses requires font attributes to be stored in the "font + // weight" style attribute. + // First, clear any existing SC_WEIGHT_NORMAL, SC_WEIGHT_SEMIBOLD, or + // SC_WEIGHT_BOLD values stored in the lower 16 bits. Then set the + // appropriate curses attr. + sptr_t weight = SS(sci, SCI_STYLEGETWEIGHT, num, 0) & ~A_COLORCHAR; + SS(sci, SCI_STYLESETWEIGHT, num, + (*option == 'u') ? weight | A_UNDERLINE : weight & ~A_UNDERLINE); +#endif + } else if ((streq(option, "fore") || streq(option, "back")) && p) { + int msg = (*option == 'f') ? SCI_STYLESETFORE : SCI_STYLESETBACK; + int color = static_cast(strtol(p, NULL, 0)); + if (*p == '#') { // #RRGGBB format; Scintilla format is 0xBBGGRR + color = static_cast(strtol(p + 1, NULL, 16)); + color = ((color & 0xFF0000) >> 16) | (color & 0xFF00) | + ((color & 0xFF) << 16); // convert to 0xBBGGRR + } + SS(sci, msg, num, color); + } else if (streq(option, "eolfilled") || streq(option, "noteolfilled")) + SS(sci, SCI_STYLESETEOLFILLED, num, *option == 'e'); + else if (streq(option, "characterset") && p) + SS(sci, SCI_STYLESETCHARACTERSET, num, static_cast(atoi(p))); + else if (streq(option, "case") && p) { + if (*p == 'u') + SS(sci, SCI_STYLESETCASE, num, SC_CASE_UPPER); + else if (*p == 'l') + SS(sci, SCI_STYLESETCASE, num, SC_CASE_LOWER); + } else if (streq(option, "visible") || streq(option, "notvisible")) + SS(sci, SCI_STYLESETVISIBLE, num, *option == 'v'); + else if (streq(option, "changeable") || streq(option, "notchangeable")) + SS(sci, SCI_STYLESETCHANGEABLE, num, *option == 'c'); + else if (streq(option, "hotspot") || streq(option, "nothotspot")) + SS(sci, SCI_STYLESETHOTSPOT, num, *option == 'h'); + option = next; + } + free(style_copy); + } + + /** + * Iterates through the lexer's `_TOKENSTYLES`, setting the style properties + * for all defined styles. + */ + bool SetStyles() { + // If the lexer defines additional styles, set their properties first (if + // the user has not already defined them). + l_getlexerfield(L, "_EXTRASTYLES"); + lua_pushnil(L); + while (lua_next(L, -2)) { + if (lua_isstring(L, -2) && lua_isstring(L, -1)) { + lua_pushstring(L, "style."), lua_pushvalue(L, -3), lua_concat(L, 2); + if (!*props.Get(lua_tostring(L, -1))) + props.Set(lua_tostring(L, -1), lua_tostring(L, -2), lua_rawlen(L, -1), + lua_rawlen(L, -2)); + lua_pop(L, 1); // style name + } + lua_pop(L, 1); // value + } + lua_pop(L, 1); // _EXTRASTYLES + + l_getlexerfield(L, "_TOKENSTYLES"); + if (!SS || !sci) { + lua_pop(L, 1); // _TOKENSTYLES + // Skip, but do not report an error since `reinit` would remain `false` + // and subsequent calls to `Lex()` and `Fold()` would repeatedly call this + // function and error. + return true; + } + lua_pushstring(L, "style.default"), lL_getexpanded(L, -1); + SetStyle(STYLE_DEFAULT, lua_tostring(L, -1)); + lua_pop(L, 2); // style and "style.default" + SS(sci, SCI_STYLECLEARALL, 0, 0); // set default styles + lua_pushnil(L); + while (lua_next(L, -2)) { + if (lua_isstring(L, -2) && lua_isnumber(L, -1) && + lua_tointeger(L, -1) != STYLE_DEFAULT) { + lua_pushstring(L, "style."), lua_pushvalue(L, -3), lua_concat(L, 2); + lL_getexpanded(L, -1), lua_replace(L, -2); + SetStyle(lua_tointeger(L, -2), lua_tostring(L, -1)); + lua_pop(L, 1); // style + } + lua_pop(L, 1); // value + } + lua_pop(L, 1); // _TOKENSTYLES + return true; + } + + /** + * Returns the style name for the given style number. + * @param style The style number to get the style name for. + * @return style name or NULL + */ + const char *GetStyleName(int style) { + if (!L) return NULL; + const char *name = NULL; + l_getlexerfield(L, "_TOKENSTYLES"); + lua_pushnil(L); + while (lua_next(L, -2)) + if (lua_tointeger(L, -1) == style) { + name = lua_tostring(L, -2); + lua_pop(L, 2); // value and key + break; + } else lua_pop(L, 1); // value + lua_pop(L, 1); // _TOKENSTYLES + return name; + } + + /** + * Initializes the lexer once the `lexer.lpeg.home` and `lexer.name` + * properties are set. + */ + bool Init() { + char home[FILENAME_MAX], lexer[50], theme[FILENAME_MAX]; + props.GetExpanded("lexer.lpeg.home", home); + props.GetExpanded("lexer.name", lexer); + props.GetExpanded("lexer.lpeg.color.theme", theme); + if (!*home || !*lexer || !L) return false; + + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + + // If necessary, load the lexer module and theme. + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"), lua_getfield(L, -1, "lexer"); + if (lua_isnil(L, -1)) { + lua_pop(L, 2); // nil and _LOADED + + // Modify `package.path` to find lexers. + lua_getglobal(L, "package"), lua_getfield(L, -1, "path"); + int orig_path = luaL_ref(L, LUA_REGISTRYINDEX); // restore later + lua_pushstring(L, home), lua_pushstring(L, "/?.lua"), lua_concat(L, 2); + lua_setfield(L, -2, "path"), lua_pop(L, 1); // package + + // Load the lexer module. + lua_getglobal(L, "require"); + lua_pushstring(L, "lexer"); + if (lua_pcall(L, 1, 1, 0) != LUA_OK) return (l_error(L), false); + l_setfunction(L, l_line_from_position, "line_from_position"); + l_setconstant(L, SC_FOLDLEVELBASE, "FOLD_BASE"); + l_setconstant(L, SC_FOLDLEVELWHITEFLAG, "FOLD_BLANK"); + l_setconstant(L, SC_FOLDLEVELHEADERFLAG, "FOLD_HEADER"); + l_setmetatable(L, "sci_lexer", llexer_property); + if (*theme) { + // Load the theme. + if (!(strstr(theme, "/") || strstr(theme, "\\"))) { // theme name + lua_pushstring(L, home); + lua_pushstring(L, "/themes/"); + lua_pushstring(L, theme); + lua_pushstring(L, ".lua"); + lua_concat(L, 4); + } else lua_pushstring(L, theme); // path to theme + if (luaL_loadfile(L, lua_tostring(L, -1)) != LUA_OK || + lua_pcall(L, 0, 0, 0) != LUA_OK) return (l_error(L), false); + lua_pop(L, 1); // theme + } + + // Restore `package.path`. + lua_getglobal(L, "package"); + lua_getfield(L, -1, "path"), lua_setfield(L, -3, "path"); // lexer.path = + lua_rawgeti(L, LUA_REGISTRYINDEX, orig_path), lua_setfield(L, -2, "path"); + luaL_unref(L, LUA_REGISTRYINDEX, orig_path), lua_pop(L, 1); // package + } else lua_remove(L, -2); // _LOADED + + // Load the language lexer. + lua_getfield(L, -1, "load"); + if (lua_isfunction(L, -1)) { + lua_pushstring(L, lexer), lua_pushnil(L), lua_pushboolean(L, 1); + if (lua_pcall(L, 3, 1, 0) != LUA_OK) return (l_error(L), false); + } else return (l_error(L, "'lexer.load' function not found"), false); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + lua_pushlightuserdata(L, reinterpret_cast(this)); + lua_pushvalue(L, -3), lua_settable(L, -3), lua_pop(L, 1); // sci_lexers + lua_pushvalue(L, -1), lua_setfield(L, LUA_REGISTRYINDEX, "sci_lexer_obj"); + lua_remove(L, -2); // lexer module + if (!SetStyles()) return false; + + // If the lexer is a parent, it will have children in its _CHILDREN table. + lua_getfield(L, -1, "_CHILDREN"); + if (lua_istable(L, -1)) { + multilang = true; + // Determine which styles are language whitespace styles + // ([lang]_whitespace). This is necessary for determining which language + // to start lexing with. + char style_name[50]; + for (int i = 0; i <= STYLE_MAX; i++) { + PrivateCall(i, reinterpret_cast(style_name)); + ws[i] = strstr(style_name, "whitespace") ? true : false; + } + } + lua_pop(L, 2); // _CHILDREN and lexer object + + reinit = false; + props.Set("lexer.lpeg.error", "", strlen("lexer.lpeg.error"), 0); + return true; + } + + /** + * When *lparam* is `0`, returns the size of the buffer needed to store the + * given string *str* in; otherwise copies *str* into the buffer *lparam* and + * returns the number of bytes copied. + * @param lparam `0` to get the number of bytes needed to store *str* or a + * pointer to a buffer large enough to copy *str* into. + * @param str The string to copy. + * @return number of bytes needed to hold *str* + */ + void *StringResult(long lparam, const char *str) { + if (lparam) strcpy(reinterpret_cast(lparam), str); + return reinterpret_cast(strlen(str)); + } + +public: + /** Constructor. */ + LexerLPeg() : own_lua(true), reinit(true), multilang(false) { + // Initialize the Lua state, load libraries, and set platform variables. + if ((L = luaL_newstate())) { + l_openlib(luaopen_base, LUA_BASELIBNAME); + l_openlib(luaopen_table, LUA_TABLIBNAME); + l_openlib(luaopen_string, LUA_STRLIBNAME); +#if LUA_VERSION_NUM < 502 + l_openlib(luaopen_io, LUA_IOLIBNAME); // for `package.searchpath()` +#endif + l_openlib(luaopen_package, LUA_LOADLIBNAME); + l_openlib(luaopen_lpeg, "lpeg"); +#if _WIN32 + lua_pushboolean(L, 1), lua_setglobal(L, "WIN32"); +#endif +#if __APPLE__ + lua_pushboolean(L, 1), lua_setglobal(L, "OSX"); +#endif +#if GTK + lua_pushboolean(L, 1), lua_setglobal(L, "GTK"); +#endif +#if CURSES + lua_pushboolean(L, 1), lua_setglobal(L, "CURSES"); +#endif + lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + } else fprintf(stderr, "Lua failed to initialize.\n"); + SS = NULL, sci = 0; + } + + /** Destructor. */ + virtual ~LexerLPeg() {} + + /** Destroys the lexer object. */ + virtual void SCI_METHOD Release() { + if (own_lua && L) + lua_close(L); + else if (!own_lua) { + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + lua_pushlightuserdata(L, reinterpret_cast(this)); + lua_pushnil(L), lua_settable(L, -3), lua_pop(L, 1); // sci_lexers + } + L = NULL; + delete this; + } + + /** + * Lexes the Scintilla document. + * @param startPos The position in the document to start lexing at. + * @param lengthDoc The number of bytes in the document to lex. + * @param initStyle The initial style at position *startPos* in the document. + * @param buffer The document interface. + */ + virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, + int initStyle, IDocument *buffer) { + LexAccessor styler(buffer); + if ((reinit && !Init()) || !L) { + // Style everything in the default style. + styler.StartAt(startPos); + styler.StartSegment(startPos); + styler.ColourTo(startPos + lengthDoc - 1, STYLE_DEFAULT); + styler.Flush(); + return; + } + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + lua_pushlightuserdata(L, reinterpret_cast(buffer)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + + // Ensure the lexer has a grammar. + // This could be done in the lexer module's `lex()`, but for large files, + // passing string arguments from C to Lua is expensive. + l_getlexerfield(L, "_GRAMMAR"); + int has_grammar = !lua_isnil(L, -1); + lua_pop(L, 1); // _GRAMMAR + if (!has_grammar) { + // Style everything in the default style. + styler.StartAt(startPos); + styler.StartSegment(startPos); + styler.ColourTo(startPos + lengthDoc - 1, STYLE_DEFAULT); + styler.Flush(); + return; + } + + // Start from the beginning of the current style so LPeg matches it. + // For multilang lexers, start at whitespace since embedded languages have + // [lang]_whitespace styles. This is so LPeg can start matching child + // languages instead of parent ones if necessary. + if (startPos > 0) { + Sci_PositionU i = startPos; + while (i > 0 && styler.StyleAt(i - 1) == initStyle) i--; + if (multilang) + while (i > 0 && !ws[static_cast(styler.StyleAt(i))]) i--; + lengthDoc += startPos - i, startPos = i; + } + + Sci_PositionU startSeg = startPos, endSeg = startPos + lengthDoc; + int style = 0; + l_getlexerfield(L, "lex") + if (lua_isfunction(L, -1)) { + l_getlexerobj(L); + lua_pushlstring(L, buffer->BufferPointer() + startPos, lengthDoc); + lua_pushinteger(L, styler.StyleAt(startPos)); + if (lua_pcall(L, 3, 1, 0) != LUA_OK) l_error(L); + // Style the text from the token table returned. + if (lua_istable(L, -1)) { + int len = lua_rawlen(L, -1); + if (len > 0) { + styler.StartAt(startPos); + styler.StartSegment(startPos); + l_getlexerfield(L, "_TOKENSTYLES"); + // Loop through token-position pairs. + for (int i = 1; i < len; i += 2) { + style = STYLE_DEFAULT; + lua_rawgeti(L, -2, i), lua_rawget(L, -2); // _TOKENSTYLES[token] + if (!lua_isnil(L, -1)) style = lua_tointeger(L, -1); + lua_pop(L, 1); // _TOKENSTYLES[token] + lua_rawgeti(L, -2, i + 1); // pos + unsigned int position = lua_tointeger(L, -1) - 1; + lua_pop(L, 1); // pos + if (style >= 0 && style <= STYLE_MAX) + styler.ColourTo(startSeg + position - 1, style); + else + l_error(L, "Bad style number"); + if (position > endSeg) break; + } + lua_pop(L, 2); // _TOKENSTYLES and token table returned + styler.ColourTo(endSeg - 1, style); + styler.Flush(); + } + } else l_error(L, "Table of tokens expected from 'lexer.lex'"); + } else l_error(L, "'lexer.lex' function not found"); + } + + /** + * Folds the Scintilla document. + * @param startPos The position in the document to start folding at. + * @param lengthDoc The number of bytes in the document to fold. + * @param initStyle The initial style at position *startPos* in the document. + * @param buffer The document interface. + */ + virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, + int, IDocument *buffer) { + if ((reinit && !Init()) || !L) return; + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + lua_pushlightuserdata(L, reinterpret_cast(buffer)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + LexAccessor styler(buffer); + + l_getlexerfield(L, "fold"); + if (lua_isfunction(L, -1)) { + l_getlexerobj(L); + Sci_Position currentLine = styler.GetLine(startPos); + lua_pushlstring(L, buffer->BufferPointer() + startPos, lengthDoc); + lua_pushinteger(L, startPos); + lua_pushinteger(L, currentLine); + lua_pushinteger(L, styler.LevelAt(currentLine) & SC_FOLDLEVELNUMBERMASK); + if (lua_pcall(L, 5, 1, 0) != LUA_OK) l_error(L); + // Fold the text from the fold table returned. + if (lua_istable(L, -1)) { + lua_pushnil(L); + while (lua_next(L, -2)) { // line = level + styler.SetLevel(lua_tointeger(L, -2), lua_tointeger(L, -1)); + lua_pop(L, 1); // level + } + lua_pop(L, 1); // fold table returned + } else l_error(L, "Table of folds expected from 'lexer.fold'"); + } else l_error(L, "'lexer.fold' function not found"); + } + + /** This lexer implements the original lexer interface. */ + virtual int SCI_METHOD Version() const { return lvOriginal; } + /** Returning property names is not implemented. */ + virtual const char * SCI_METHOD PropertyNames() { return ""; } + /** Returning property types is not implemented. */ + virtual int SCI_METHOD PropertyType(const char *) { return 0; } + /** Returning property descriptions is not implemented. */ + virtual const char * SCI_METHOD DescribeProperty(const char *) { + return ""; + } + + /** + * Sets the *key* lexer property to *value*. + * If *key* starts with "style.", also set the style for the token. + * @param key The string keyword. + * @param val The string value. + */ + virtual Sci_Position SCI_METHOD PropertySet(const char *key, + const char *value) { + props.Set(key, value, strlen(key), strlen(value)); + if (reinit) + Init(); + else if (L && SS && sci && strncmp(key, "style.", 6) == 0) { + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + l_getlexerfield(L, "_TOKENSTYLES"); + lua_pushstring(L, key + 6), lua_rawget(L, -2); + lua_pushstring(L, key), lL_getexpanded(L, -1), lua_replace(L, -2); + if (lua_isnumber(L, -2)) { + int style_num = lua_tointeger(L, -2); + SetStyle(style_num, lua_tostring(L, -1)); + if (style_num == STYLE_DEFAULT) + // Assume a theme change, with the default style being set first. + // Subsequent style settings will be based on the default. + SS(sci, SCI_STYLECLEARALL, 0, 0); + } + lua_pop(L, 3); // style, style number, _TOKENSTYLES + } + return -1; // no need to re-lex + } + + /** Returning keyword list descriptions is not implemented. */ + virtual const char * SCI_METHOD DescribeWordListSets() { return ""; } + /** Setting keyword lists is not applicable. */ + virtual Sci_Position SCI_METHOD WordListSet(int, const char *) { + return -1; + } + + /** + * Allows for direct communication between the application and the lexer. + * The application uses this to set `SS`, `sci`, `L`, and lexer properties, + * and to retrieve style names. + * @param code The communication code. + * @param arg The argument. + * @return void *data + */ + virtual void * SCI_METHOD PrivateCall(int code, void *arg) { + sptr_t lParam = reinterpret_cast(arg); + const char *val = NULL; + switch(code) { + case SCI_GETDIRECTFUNCTION: + SS = reinterpret_cast(lParam); + return NULL; + case SCI_SETDOCPOINTER: + sci = lParam; + return NULL; + case SCI_CHANGELEXERSTATE: + if (own_lua) lua_close(L); + L = reinterpret_cast(lParam); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + if (lua_isnil(L, -1)) + lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + lua_pop(L, 1); // sci_lexers or nil + own_lua = false; + return NULL; + case SCI_SETLEXERLANGUAGE: + char lexer_name[50]; + props.GetExpanded("lexer.name", lexer_name); + if (strcmp(lexer_name, reinterpret_cast(arg)) != 0) { + reinit = true; + props.Set("lexer.lpeg.error", "", strlen("lexer.lpeg.error"), 0); + PropertySet("lexer.name", reinterpret_cast(arg)); + } else if (L) + own_lua ? SetStyles() : Init(); + return NULL; + case SCI_GETLEXERLANGUAGE: + if (L) { + l_getlexerfield(L, "_NAME"); + if (SS && sci && multilang) { + int pos = SS(sci, SCI_GETCURRENTPOS, 0, 0); + while (pos >= 0 && !ws[SS(sci, SCI_GETSTYLEAT, pos, 0)]) pos--; + const char *name = NULL, *p = NULL; + if (pos >= 0) { + name = GetStyleName(SS(sci, SCI_GETSTYLEAT, pos, 0)); + if (name) p = strstr(name, "_whitespace"); + } + if (!name) name = lua_tostring(L, -1); // "lexer:lexer" fallback + if (!p) p = name + strlen(name); // "lexer:lexer" fallback + lua_pushstring(L, "/"); + lua_pushlstring(L, name, p - name); + lua_concat(L, 3); + } + val = lua_tostring(L, -1); + lua_pop(L, 1); // lexer_name or lexer language string + } + return StringResult(lParam, val ? val : "null"); + case SCI_GETSTATUS: + return StringResult(lParam, props.Get("lexer.lpeg.error")); + default: // style-related + if (code >= 0 && code <= STYLE_MAX) { // retrieve style names + val = GetStyleName(code); + return StringResult(lParam, val ? val : "Not Available"); + } else return NULL; + } + } + + /** Constructs a new instance of the lexer. */ + static ILexer *LexerFactoryLPeg() { return new LexerLPeg(); } +}; + +LexerModule lmLPeg(SCLEX_LPEG, LexerLPeg::LexerFactoryLPeg, "lpeg"); + +#else + +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void LPegLex(Sci_PositionU, Sci_Position, int, WordList*[], Accessor&) { + return; +} + +LexerModule lmLPeg(SCLEX_LPEG, LPegLex, "lpeg"); + +#endif // LPEG_LEXER diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexLaTeX.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexLaTeX.cpp new file mode 100644 index 000000000..ed9e6a6b3 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexLaTeX.cpp @@ -0,0 +1,538 @@ +// Scintilla source code edit control +/** @file LexLaTeX.cxx + ** Lexer for LaTeX2e. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Modified by G. HU in 2013. Added folding, syntax highting inside math environments, and changed some minor behaviors. + +#include +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "LexerBase.h" + +using namespace Scintilla; + +using namespace std; + +struct latexFoldSave { + latexFoldSave() : structLev(0) { + for (int i = 0; i < 8; ++i) openBegins[i] = 0; + } + latexFoldSave(const latexFoldSave &save) : structLev(save.structLev) { + for (int i = 0; i < 8; ++i) openBegins[i] = save.openBegins[i]; + } + int openBegins[8]; + Sci_Position structLev; +}; + +class LexerLaTeX : public LexerBase { +private: + vector modes; + void setMode(Sci_Position line, int mode) { + if (line >= static_cast(modes.size())) modes.resize(line + 1, 0); + modes[line] = mode; + } + int getMode(Sci_Position line) { + if (line >= 0 && line < static_cast(modes.size())) return modes[line]; + return 0; + } + void truncModes(Sci_Position numLines) { + if (static_cast(modes.size()) > numLines * 2 + 256) + modes.resize(numLines + 128); + } + + vector saves; + void setSave(Sci_Position line, const latexFoldSave &save) { + if (line >= static_cast(saves.size())) saves.resize(line + 1); + saves[line] = save; + } + void getSave(Sci_Position line, latexFoldSave &save) { + if (line >= 0 && line < static_cast(saves.size())) save = saves[line]; + else { + save.structLev = 0; + for (int i = 0; i < 8; ++i) save.openBegins[i] = 0; + } + } + void truncSaves(Sci_Position numLines) { + if (static_cast(saves.size()) > numLines * 2 + 256) + saves.resize(numLines + 128); + } +public: + static ILexer *LexerFactoryLaTeX() { + return new LexerLaTeX(); + } + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; +}; + +static bool latexIsSpecial(int ch) { + return (ch == '#') || (ch == '$') || (ch == '%') || (ch == '&') || (ch == '_') || + (ch == '{') || (ch == '}') || (ch == ' '); +} + +static bool latexIsBlank(int ch) { + return (ch == ' ') || (ch == '\t'); +} + +static bool latexIsBlankAndNL(int ch) { + return (ch == ' ') || (ch == '\t') || (ch == '\r') || (ch == '\n'); +} + +static bool latexIsLetter(int ch) { + return IsASCII(ch) && isalpha(ch); +} + +static bool latexIsTagValid(Sci_Position &i, Sci_Position l, Accessor &styler) { + while (i < l) { + if (styler.SafeGetCharAt(i) == '{') { + while (i < l) { + i++; + if (styler.SafeGetCharAt(i) == '}') { + return true; + } else if (!latexIsLetter(styler.SafeGetCharAt(i)) && + styler.SafeGetCharAt(i)!='*') { + return false; + } + } + } else if (!latexIsBlank(styler.SafeGetCharAt(i))) { + return false; + } + i++; + } + return false; +} + +static bool latexNextNotBlankIs(Sci_Position i, Accessor &styler, char needle) { + char ch; + while (i < styler.Length()) { + ch = styler.SafeGetCharAt(i); + if (!latexIsBlankAndNL(ch) && ch != '*') { + if (ch == needle) + return true; + else + return false; + } + i++; + } + return false; +} + +static bool latexLastWordIs(Sci_Position start, Accessor &styler, const char *needle) { + Sci_PositionU i = 0; + Sci_PositionU l = static_cast(strlen(needle)); + Sci_Position ini = start-l+1; + char s[32]; + + while (i < l && i < 31) { + s[i] = styler.SafeGetCharAt(ini + i); + i++; + } + s[i] = '\0'; + + return (strcmp(s, needle) == 0); +} + +static bool latexLastWordIsMathEnv(Sci_Position pos, Accessor &styler) { + Sci_Position i, j; + char s[32]; + const char *mathEnvs[] = { "align", "alignat", "flalign", "gather", + "multiline", "displaymath", "eqnarray", "equation" }; + if (styler.SafeGetCharAt(pos) != '}') return false; + for (i = pos - 1; i >= 0; --i) { + if (styler.SafeGetCharAt(i) == '{') break; + if (pos - i >= 20) return false; + } + if (i < 0 || i == pos - 1) return false; + ++i; + for (j = 0; i + j < pos; ++j) + s[j] = styler.SafeGetCharAt(i + j); + s[j] = '\0'; + if (j == 0) return false; + if (s[j - 1] == '*') s[--j] = '\0'; + for (i = 0; i < static_cast(sizeof(mathEnvs) / sizeof(const char *)); ++i) + if (strcmp(s, mathEnvs[i]) == 0) return true; + return false; +} + +static inline void latexStateReset(int &mode, int &state) { + switch (mode) { + case 1: state = SCE_L_MATH; break; + case 2: state = SCE_L_MATH2; break; + default: state = SCE_L_DEFAULT; break; + } +} + +// There are cases not handled correctly, like $abcd\textrm{what is $x+y$}z+w$. +// But I think it's already good enough. +void SCI_METHOD LexerLaTeX::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + // startPos is assumed to be the first character of a line + Accessor styler(pAccess, &props); + styler.StartAt(startPos); + int mode = getMode(styler.GetLine(startPos) - 1); + int state = initStyle; + if (state == SCE_L_ERROR || state == SCE_L_SHORTCMD || state == SCE_L_SPECIAL) // should not happen + latexStateReset(mode, state); + + char chNext = styler.SafeGetCharAt(startPos); + char chVerbatimDelim = '\0'; + styler.StartSegment(startPos); + Sci_Position lengthDoc = startPos + length; + + for (Sci_Position i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + i++; + chNext = styler.SafeGetCharAt(i + 1); + continue; + } + + if (ch == '\r' || ch == '\n') + setMode(styler.GetLine(i), mode); + + switch (state) { + case SCE_L_DEFAULT : + switch (ch) { + case '\\' : + styler.ColourTo(i - 1, state); + if (latexIsLetter(chNext)) { + state = SCE_L_COMMAND; + } else if (latexIsSpecial(chNext)) { + styler.ColourTo(i + 1, SCE_L_SPECIAL); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } else if (chNext == '\r' || chNext == '\n') { + styler.ColourTo(i, SCE_L_ERROR); + } else if (IsASCII(chNext)) { + styler.ColourTo(i + 1, SCE_L_SHORTCMD); + if (chNext == '(') { + mode = 1; + state = SCE_L_MATH; + } else if (chNext == '[') { + mode = 2; + state = SCE_L_MATH2; + } + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case '$' : + styler.ColourTo(i - 1, state); + if (chNext == '$') { + styler.ColourTo(i + 1, SCE_L_SHORTCMD); + mode = 2; + state = SCE_L_MATH2; + i++; + chNext = styler.SafeGetCharAt(i + 1); + } else { + styler.ColourTo(i, SCE_L_SHORTCMD); + mode = 1; + state = SCE_L_MATH; + } + break; + case '%' : + styler.ColourTo(i - 1, state); + state = SCE_L_COMMENT; + break; + } + break; + // These 3 will never be reached. + case SCE_L_ERROR: + case SCE_L_SPECIAL: + case SCE_L_SHORTCMD: + break; + case SCE_L_COMMAND : + if (!latexIsLetter(chNext)) { + styler.ColourTo(i, state); + if (latexNextNotBlankIs(i + 1, styler, '[' )) { + state = SCE_L_CMDOPT; + } else if (latexLastWordIs(i, styler, "\\begin")) { + state = SCE_L_TAG; + } else if (latexLastWordIs(i, styler, "\\end")) { + state = SCE_L_TAG2; + } else if (latexLastWordIs(i, styler, "\\verb") && chNext != '*' && chNext != ' ') { + chVerbatimDelim = chNext; + state = SCE_L_VERBATIM; + } else { + latexStateReset(mode, state); + } + } + break; + case SCE_L_CMDOPT : + if (ch == ']') { + styler.ColourTo(i, state); + latexStateReset(mode, state); + } + break; + case SCE_L_TAG : + if (latexIsTagValid(i, lengthDoc, styler)) { + styler.ColourTo(i, state); + latexStateReset(mode, state); + if (latexLastWordIs(i, styler, "{verbatim}")) { + state = SCE_L_VERBATIM; + } else if (latexLastWordIs(i, styler, "{comment}")) { + state = SCE_L_COMMENT2; + } else if (latexLastWordIs(i, styler, "{math}") && mode == 0) { + mode = 1; + state = SCE_L_MATH; + } else if (latexLastWordIsMathEnv(i, styler) && mode == 0) { + mode = 2; + state = SCE_L_MATH2; + } + } else { + styler.ColourTo(i, SCE_L_ERROR); + latexStateReset(mode, state); + ch = styler.SafeGetCharAt(i); + if (ch == '\r' || ch == '\n') setMode(styler.GetLine(i), mode); + } + chNext = styler.SafeGetCharAt(i+1); + break; + case SCE_L_TAG2 : + if (latexIsTagValid(i, lengthDoc, styler)) { + styler.ColourTo(i, state); + latexStateReset(mode, state); + } else { + styler.ColourTo(i, SCE_L_ERROR); + latexStateReset(mode, state); + ch = styler.SafeGetCharAt(i); + if (ch == '\r' || ch == '\n') setMode(styler.GetLine(i), mode); + } + chNext = styler.SafeGetCharAt(i+1); + break; + case SCE_L_MATH : + switch (ch) { + case '\\' : + styler.ColourTo(i - 1, state); + if (latexIsLetter(chNext)) { + Sci_Position match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{math}")) + mode = 0; + } + } + state = SCE_L_COMMAND; + } else if (latexIsSpecial(chNext)) { + styler.ColourTo(i + 1, SCE_L_SPECIAL); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } else if (chNext == '\r' || chNext == '\n') { + styler.ColourTo(i, SCE_L_ERROR); + } else if (IsASCII(chNext)) { + if (chNext == ')') { + mode = 0; + state = SCE_L_DEFAULT; + } + styler.ColourTo(i + 1, SCE_L_SHORTCMD); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case '$' : + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_L_SHORTCMD); + mode = 0; + state = SCE_L_DEFAULT; + break; + case '%' : + styler.ColourTo(i - 1, state); + state = SCE_L_COMMENT; + break; + } + break; + case SCE_L_MATH2 : + switch (ch) { + case '\\' : + styler.ColourTo(i - 1, state); + if (latexIsLetter(chNext)) { + Sci_Position match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIsMathEnv(match, styler)) + mode = 0; + } + } + state = SCE_L_COMMAND; + } else if (latexIsSpecial(chNext)) { + styler.ColourTo(i + 1, SCE_L_SPECIAL); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } else if (chNext == '\r' || chNext == '\n') { + styler.ColourTo(i, SCE_L_ERROR); + } else if (IsASCII(chNext)) { + if (chNext == ']') { + mode = 0; + state = SCE_L_DEFAULT; + } + styler.ColourTo(i + 1, SCE_L_SHORTCMD); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case '$' : + styler.ColourTo(i - 1, state); + if (chNext == '$') { + styler.ColourTo(i + 1, SCE_L_SHORTCMD); + i++; + chNext = styler.SafeGetCharAt(i + 1); + mode = 0; + state = SCE_L_DEFAULT; + } else { // This may not be an error, e.g. \begin{equation}\text{$a$}\end{equation} + styler.ColourTo(i, SCE_L_SHORTCMD); + } + break; + case '%' : + styler.ColourTo(i - 1, state); + state = SCE_L_COMMENT; + break; + } + break; + case SCE_L_COMMENT : + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + latexStateReset(mode, state); + } + break; + case SCE_L_COMMENT2 : + if (ch == '\\') { + Sci_Position match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{comment}")) { + styler.ColourTo(i - 1, state); + state = SCE_L_COMMAND; + } + } + } + } + break; + case SCE_L_VERBATIM : + if (ch == '\\') { + Sci_Position match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{verbatim}")) { + styler.ColourTo(i - 1, state); + state = SCE_L_COMMAND; + } + } + } + } else if (chNext == chVerbatimDelim) { + styler.ColourTo(i + 1, state); + latexStateReset(mode, state); + chVerbatimDelim = '\0'; + i++; + chNext = styler.SafeGetCharAt(i + 1); + } else if (chVerbatimDelim != '\0' && (ch == '\n' || ch == '\r')) { + styler.ColourTo(i, SCE_L_ERROR); + latexStateReset(mode, state); + chVerbatimDelim = '\0'; + } + break; + } + } + if (lengthDoc == styler.Length()) truncModes(styler.GetLine(lengthDoc - 1)); + styler.ColourTo(lengthDoc - 1, state); + styler.Flush(); +} + +static int latexFoldSaveToInt(const latexFoldSave &save) { + int sum = 0; + for (int i = 0; i <= save.structLev; ++i) + sum += save.openBegins[i]; + return ((sum + save.structLev + SC_FOLDLEVELBASE) & SC_FOLDLEVELNUMBERMASK); +} + +// Change folding state while processing a line +// Return the level before the first relevant command +void SCI_METHOD LexerLaTeX::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) { + const char *structWords[7] = {"part", "chapter", "section", "subsection", + "subsubsection", "paragraph", "subparagraph"}; + Accessor styler(pAccess, &props); + Sci_PositionU endPos = startPos + length; + Sci_Position curLine = styler.GetLine(startPos); + latexFoldSave save; + getSave(curLine - 1, save); + do { + char ch, buf[16]; + Sci_Position i, j; + int lev = -1; + bool needFold = false; + for (i = static_cast(startPos); i < static_cast(endPos); ++i) { + ch = styler.SafeGetCharAt(i); + if (ch == '\r' || ch == '\n') break; + if (ch != '\\' || styler.StyleAt(i) != SCE_L_COMMAND) continue; + for (j = 0; j < 15 && i + 1 < static_cast(endPos); ++j, ++i) { + buf[j] = styler.SafeGetCharAt(i + 1); + if (!latexIsLetter(buf[j])) break; + } + buf[j] = '\0'; + if (strcmp(buf, "begin") == 0) { + if (lev < 0) lev = latexFoldSaveToInt(save); + ++save.openBegins[save.structLev]; + needFold = true; + } + else if (strcmp(buf, "end") == 0) { + while (save.structLev > 0 && save.openBegins[save.structLev] == 0) + --save.structLev; + if (lev < 0) lev = latexFoldSaveToInt(save); + if (save.openBegins[save.structLev] > 0) --save.openBegins[save.structLev]; + } + else { + for (j = 0; j < 7; ++j) + if (strcmp(buf, structWords[j]) == 0) break; + if (j >= 7) continue; + save.structLev = j; // level before the command + for (j = save.structLev + 1; j < 8; ++j) { + save.openBegins[save.structLev] += save.openBegins[j]; + save.openBegins[j] = 0; + } + if (lev < 0) lev = latexFoldSaveToInt(save); + ++save.structLev; // level after the command + needFold = true; + } + } + if (lev < 0) lev = latexFoldSaveToInt(save); + if (needFold) lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(curLine, lev); + setSave(curLine, save); + ++curLine; + startPos = styler.LineStart(curLine); + if (static_cast(startPos) == styler.Length()) { + lev = latexFoldSaveToInt(save); + styler.SetLevel(curLine, lev); + setSave(curLine, save); + truncSaves(curLine); + } + } while (startPos < endPos); + styler.Flush(); +} + +static const char *const emptyWordListDesc[] = { + 0 +}; + +LexerModule lmLatex(SCLEX_LATEX, LexerLaTeX::LexerFactoryLaTeX, "latex", emptyWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexLisp.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexLisp.cpp new file mode 100644 index 000000000..8e7586355 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexLisp.cpp @@ -0,0 +1,283 @@ +// Scintilla source code edit control +/** @file LexLisp.cxx + ** Lexer for Lisp. + ** Written by Alexey Yutkin. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +#define SCE_LISP_CHARACTER 29 +#define SCE_LISP_MACRO 30 +#define SCE_LISP_MACRO_DISPATCH 31 + +static inline bool isLispoperator(char ch) { + if (IsASCII(ch) && isalnum(ch)) + return false; + if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}') + return true; + return false; +} + +static inline bool isLispwordstart(char ch) { + return IsASCII(ch) && ch != ';' && !isspacechar(ch) && !isLispoperator(ch) && + ch != '\n' && ch != '\r' && ch != '\"'; +} + + +static void classifyWordLisp(Sci_PositionU start, Sci_PositionU end, WordList &keywords, WordList &keywords_kw, Accessor &styler) { + assert(end >= start); + char s[100]; + Sci_PositionU i; + bool digit_flag = true; + for (i = 0; (i < end - start + 1) && (i < 99); i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + if (!isdigit(s[i]) && (s[i] != '.')) digit_flag = false; + } + char chAttr = SCE_LISP_IDENTIFIER; + + if(digit_flag) chAttr = SCE_LISP_NUMBER; + else { + if (keywords.InList(s)) { + chAttr = SCE_LISP_KEYWORD; + } else if (keywords_kw.InList(s)) { + chAttr = SCE_LISP_KEYWORD_KW; + } else if ((s[0] == '*' && s[i-1] == '*') || + (s[0] == '+' && s[i-1] == '+')) { + chAttr = SCE_LISP_SPECIAL; + } + } + styler.ColourTo(end, chAttr); + return; +} + + +static void ColouriseLispDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords_kw = *keywordlists[1]; + + styler.StartAt(startPos); + + int state = initStyle, radix = -1; + char chNext = styler[startPos]; + Sci_PositionU lengthDoc = startPos + length; + styler.StartSegment(startPos); + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i += 1; + continue; + } + + if (state == SCE_LISP_DEFAULT) { + if (ch == '#') { + styler.ColourTo(i - 1, state); + radix = -1; + state = SCE_LISP_MACRO_DISPATCH; + } else if (ch == ':' && isLispwordstart(chNext)) { + styler.ColourTo(i - 1, state); + state = SCE_LISP_SYMBOL; + } else if (isLispwordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_LISP_IDENTIFIER; + } + else if (ch == ';') { + styler.ColourTo(i - 1, state); + state = SCE_LISP_COMMENT; + } + else if (isLispoperator(ch) || ch=='\'') { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_LISP_OPERATOR); + if (ch=='\'' && isLispwordstart(chNext)) { + state = SCE_LISP_SYMBOL; + } + } + else if (ch == '\"') { + styler.ColourTo(i - 1, state); + state = SCE_LISP_STRING; + } + } else if (state == SCE_LISP_IDENTIFIER || state == SCE_LISP_SYMBOL) { + if (!isLispwordstart(ch)) { + if (state == SCE_LISP_IDENTIFIER) { + classifyWordLisp(styler.GetStartSegment(), i - 1, keywords, keywords_kw, styler); + } else { + styler.ColourTo(i - 1, state); + } + state = SCE_LISP_DEFAULT; + } /*else*/ + if (isLispoperator(ch) || ch=='\'') { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_LISP_OPERATOR); + if (ch=='\'' && isLispwordstart(chNext)) { + state = SCE_LISP_SYMBOL; + } + } + } else if (state == SCE_LISP_MACRO_DISPATCH) { + if (!(IsASCII(ch) && isdigit(ch))) { + if (ch != 'r' && ch != 'R' && (i - styler.GetStartSegment()) > 1) { + state = SCE_LISP_DEFAULT; + } else { + switch (ch) { + case '|': state = SCE_LISP_MULTI_COMMENT; break; + case 'o': + case 'O': radix = 8; state = SCE_LISP_MACRO; break; + case 'x': + case 'X': radix = 16; state = SCE_LISP_MACRO; break; + case 'b': + case 'B': radix = 2; state = SCE_LISP_MACRO; break; + case '\\': state = SCE_LISP_CHARACTER; break; + case ':': + case '-': + case '+': state = SCE_LISP_MACRO; break; + case '\'': if (isLispwordstart(chNext)) { + state = SCE_LISP_SPECIAL; + } else { + styler.ColourTo(i - 1, SCE_LISP_DEFAULT); + styler.ColourTo(i, SCE_LISP_OPERATOR); + state = SCE_LISP_DEFAULT; + } + break; + default: if (isLispoperator(ch)) { + styler.ColourTo(i - 1, SCE_LISP_DEFAULT); + styler.ColourTo(i, SCE_LISP_OPERATOR); + } + state = SCE_LISP_DEFAULT; + break; + } + } + } + } else if (state == SCE_LISP_MACRO) { + if (isLispwordstart(ch) && (radix == -1 || IsADigit(ch, radix))) { + state = SCE_LISP_SPECIAL; + } else { + state = SCE_LISP_DEFAULT; + } + } else if (state == SCE_LISP_CHARACTER) { + if (isLispoperator(ch)) { + styler.ColourTo(i, SCE_LISP_SPECIAL); + state = SCE_LISP_DEFAULT; + } else if (isLispwordstart(ch)) { + styler.ColourTo(i, SCE_LISP_SPECIAL); + state = SCE_LISP_SPECIAL; + } else { + state = SCE_LISP_DEFAULT; + } + } else if (state == SCE_LISP_SPECIAL) { + if (!isLispwordstart(ch) || (radix != -1 && !IsADigit(ch, radix))) { + styler.ColourTo(i - 1, state); + state = SCE_LISP_DEFAULT; + } + if (isLispoperator(ch) || ch=='\'') { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_LISP_OPERATOR); + if (ch=='\'' && isLispwordstart(chNext)) { + state = SCE_LISP_SYMBOL; + } + } + } else { + if (state == SCE_LISP_COMMENT) { + if (atEOL) { + styler.ColourTo(i - 1, state); + state = SCE_LISP_DEFAULT; + } + } else if (state == SCE_LISP_MULTI_COMMENT) { + if (ch == '|' && chNext == '#') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + styler.ColourTo(i, state); + state = SCE_LISP_DEFAULT; + } + } else if (state == SCE_LISP_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_LISP_DEFAULT; + } + } + } + + } + styler.ColourTo(lengthDoc - 1, state); +} + +static void FoldLispDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], + Accessor &styler) { + Sci_PositionU lengthDoc = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + for (Sci_PositionU i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (style == SCE_LISP_OPERATOR) { + if (ch == '(' || ch == '[' || ch == '{') { + levelCurrent++; + } else if (ch == ')' || ch == ']' || ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const lispWordListDesc[] = { + "Functions and special operators", + "Keywords", + 0 +}; + +LexerModule lmLISP(SCLEX_LISP, ColouriseLispDoc, "lisp", FoldLispDoc, lispWordListDesc); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexLout.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexLout.cpp new file mode 100644 index 000000000..abba91ad1 --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexLout.cpp @@ -0,0 +1,213 @@ +// Scintilla source code edit control +/** @file LexLout.cxx + ** Lexer for the Basser Lout (>= version 3) typesetting language + **/ +// Copyright 2003 by Kein-Hong Man +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalpha(ch) || ch == '@' || ch == '_'); +} + +static inline bool IsAnOther(const int ch) { + return (ch < 0x80) && (ch == '{' || ch == '}' || + ch == '!' || ch == '$' || ch == '%' || ch == '&' || ch == '\'' || + ch == '(' || ch == ')' || ch == '*' || ch == '+' || ch == ',' || + ch == '-' || ch == '.' || ch == '/' || ch == ':' || ch == ';' || + ch == '<' || ch == '=' || ch == '>' || ch == '?' || ch == '[' || + ch == ']' || ch == '^' || ch == '`' || ch == '|' || ch == '~'); +} + +static void ColouriseLoutDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + int visibleChars = 0; + int firstWordInLine = 0; + int leadingAtSign = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart && (sc.state == SCE_LOUT_STRING)) { + // Prevent SCE_LOUT_STRINGEOL from leaking back to previous line + sc.SetState(SCE_LOUT_STRING); + } + + // Determine if the current state should terminate. + if (sc.state == SCE_LOUT_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_LOUT_DEFAULT); + visibleChars = 0; + } + } else if (sc.state == SCE_LOUT_NUMBER) { + if (!IsADigit(sc.ch) && sc.ch != '.') { + sc.SetState(SCE_LOUT_DEFAULT); + } + } else if (sc.state == SCE_LOUT_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_LOUT_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_LOUT_STRINGEOL); + sc.ForwardSetState(SCE_LOUT_DEFAULT); + visibleChars = 0; + } + } else if (sc.state == SCE_LOUT_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (leadingAtSign) { + if (keywords.InList(s)) { + sc.ChangeState(SCE_LOUT_WORD); + } else { + sc.ChangeState(SCE_LOUT_WORD4); + } + } else if (firstWordInLine && keywords3.InList(s)) { + sc.ChangeState(SCE_LOUT_WORD3); + } + sc.SetState(SCE_LOUT_DEFAULT); + } + } else if (sc.state == SCE_LOUT_OPERATOR) { + if (!IsAnOther(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (keywords2.InList(s)) { + sc.ChangeState(SCE_LOUT_WORD2); + } + sc.SetState(SCE_LOUT_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_LOUT_DEFAULT) { + if (sc.ch == '#') { + sc.SetState(SCE_LOUT_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_LOUT_STRING); + } else if (IsADigit(sc.ch) || + (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_LOUT_NUMBER); + } else if (IsAWordChar(sc.ch)) { + firstWordInLine = (visibleChars == 0); + leadingAtSign = (sc.ch == '@'); + sc.SetState(SCE_LOUT_IDENTIFIER); + } else if (IsAnOther(sc.ch)) { + sc.SetState(SCE_LOUT_OPERATOR); + } + } + + if (sc.atLineEnd) { + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldLoutDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], + Accessor &styler) { + + Sci_PositionU endPos = startPos + length; + int visibleChars = 0; + Sci_Position lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + int styleNext = styler.StyleAt(startPos); + char s[10] = ""; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (style == SCE_LOUT_WORD) { + if (ch == '@') { + for (Sci_PositionU j = 0; j < 8; j++) { + if (!IsAWordChar(styler[i + j])) { + break; + } + s[j] = styler[i + j]; + s[j + 1] = '\0'; + } + if (strcmp(s, "@Begin") == 0) { + levelCurrent++; + } else if (strcmp(s, "@End") == 0) { + levelCurrent--; + } + } + } else if (style == SCE_LOUT_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) { + lev |= SC_FOLDLEVELWHITEFLAG; + } + if ((levelCurrent > levelPrev) && (visibleChars > 0)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const loutWordLists[] = { + "Predefined identifiers", + "Predefined delimiters", + "Predefined keywords", + 0, + }; + +LexerModule lmLout(SCLEX_LOUT, ColouriseLoutDoc, "lout", FoldLoutDoc, loutWordLists); diff --git a/libs/qscintilla_2.14.1/scintilla/lexers/LexLua.cpp b/libs/qscintilla_2.14.1/scintilla/lexers/LexLua.cpp new file mode 100644 index 000000000..9e6e8a70c --- /dev/null +++ b/libs/qscintilla_2.14.1/scintilla/lexers/LexLua.cpp @@ -0,0 +1,502 @@ +// Scintilla source code edit control +/** @file LexLua.cxx + ** Lexer for Lua language. + ** + ** Written by Paul Winwood. + ** Folder by Alexey Yutkin. + ** Modified by Marcos E. Wurzius & Philippe Lhoste + **/ + +#include +#include +#include +#include +#include +#include + +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "StringCopy.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +// Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ], +// return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on. +// The maximum number of '=' characters allowed is 254. +static int LongDelimCheck(StyleContext &sc) { + int sep = 1; + while (sc.GetRelative(sep) == '=' && sep < 0xFF) + sep++; + if (sc.GetRelative(sep) == sc.ch) + return sep; + return 0; +} + +static void ColouriseLuaDoc( + Sci_PositionU startPos, + Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + const WordList &keywords = *keywordlists[0]; + const WordList &keywords2 = *keywordlists[1]; + const WordList &keywords3 = *keywordlists[2]; + const WordList &keywords4 = *keywordlists[3]; + const WordList &keywords5 = *keywordlists[4]; + const WordList &keywords6 = *keywordlists[5]; + const WordList &keywords7 = *keywordlists[6]; + const WordList &keywords8 = *keywordlists[7]; + + // Accepts accented characters + CharacterSet setWordStart(CharacterSet::setAlpha, "_", 0x80, true); + CharacterSet setWord(CharacterSet::setAlphaNum, "_", 0x80, true); + // Not exactly following number definition (several dots are seen as OK, etc.) + // but probably enough in most cases. [pP] is for hex floats. + CharacterSet setNumber(CharacterSet::setDigits, ".-+abcdefpABCDEFP"); + CharacterSet setExponent(CharacterSet::setNone, "eEpP"); + CharacterSet setLuaOperator(CharacterSet::setNone, "*/-+()={}~[];<>,.^%:#&|"); + CharacterSet setEscapeSkip(CharacterSet::setNone, "\"'\\"); + + Sci_Position currentLine = styler.GetLine(startPos); + // Initialize long string [[ ... ]] or block comment --[[ ... ]] nesting level, + // if we are inside such a string. Block comment was introduced in Lua 5.0, + // blocks with separators [=[ ... ]=] in Lua 5.1. + // Continuation of a string (\z whitespace escaping) is controlled by stringWs. + int nestLevel = 0; + int sepCount = 0; + int stringWs = 0; + if (initStyle == SCE_LUA_LITERALSTRING || initStyle == SCE_LUA_COMMENT || + initStyle == SCE_LUA_STRING || initStyle == SCE_LUA_CHARACTER) { + const int lineState = styler.GetLineState(currentLine - 1); + nestLevel = lineState >> 9; + sepCount = lineState & 0xFF; + stringWs = lineState & 0x100; + } + + // results of identifier/keyword matching + Sci_Position idenPos = 0; + Sci_Position idenWordPos = 0; + int idenStyle = SCE_LUA_IDENTIFIER; + bool foundGoto = false; + + // Do not leak onto next line + if (initStyle == SCE_LUA_STRINGEOL || initStyle == SCE_LUA_COMMENTLINE || initStyle == SCE_LUA_PREPROCESSOR) { + initStyle = SCE_LUA_DEFAULT; + } + + StyleContext sc(startPos, length, initStyle, styler); + if (startPos == 0 && sc.ch == '#' && sc.chNext == '!') { + // shbang line: "#!" is a comment only if located at the start of the script + sc.SetState(SCE_LUA_COMMENTLINE); + } + for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + currentLine = styler.GetLine(sc.currentPos); + switch (sc.state) { + case SCE_LUA_LITERALSTRING: + case SCE_LUA_COMMENT: + case SCE_LUA_STRING: + case SCE_LUA_CHARACTER: + // Inside a literal string, block comment or string, we set the line state + styler.SetLineState(currentLine, (nestLevel << 9) | stringWs | sepCount); + break; + default: + // Reset the line state + styler.SetLineState(currentLine, 0); + break; + } + } + if (sc.atLineStart && (sc.state == SCE_LUA_STRING)) { + // Prevent SCE_LUA_STRINGEOL from leaking back to previous line + sc.SetState(SCE_LUA_STRING); + } + + // Handle string line continuation + if ((sc.state == SCE_LUA_STRING || sc.state == SCE_LUA_CHARACTER) && + sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_LUA_OPERATOR) { + if (sc.ch == ':' && sc.chPrev == ':') { // ::