diff --git a/08281.png b/08281.png new file mode 100644 index 0000000..3421cfe Binary files /dev/null and b/08281.png differ diff --git a/Ndd使用说明.CHM b/Ndd使用说明.CHM new file mode 100644 index 0000000..d690809 Binary files /dev/null and b/Ndd使用说明.CHM differ diff --git a/README.md b/README.md index 126b795..289273d 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,9 @@ ## 项目简介 -这是一个使用C++编写的文本编辑器Notepad--,可以支持Win/Linux/Mac平台。 +Notepad-- 是使用C++编写的轻量级文本编辑器, 简称ndd, 可以支持Window/Mac/Linux操作系统平台。 -我们的目标是要进行文本编辑类软件的国产可替代,重点在国产Uos/Linux系统、Mac 系统上发展。 - -一个支持windows/linux/mac的文本编辑器,目标是要国产替换同类软件,来自中国。 +我们的目标:完成文本编辑类软件的国产可替代,重点在国产Uos/Linux系统、Mac 系统上发展。 对比其它竞品Notepad类软件而言,我们的优势是可以跨平台,支持linux mac操作系统。 @@ -20,8 +18,7 @@ 最新版本下载地址:https://gitee.com/cxasm/notepad--/releases/latest -NDD 具备插件编写功能,希望广大的CPP/QT开发者加入我们,插件功能均可以留上您的大名和捐赠渠道,希望 -开发者参与插件功能开发。 +NDD 具备插件编写功能,如果您愿意开发插件,还请提交给我们。 做国人自己的免费编辑器,离不开您的支持,请通过微信捐赠我们。 @@ -151,24 +148,46 @@ yay -S notepad---git ``` ## 联络方式 -QQ群:372613546 959439826(已满) 用户群,做NDD的问题反馈、功能建议等。 +QQ群:372613546(已满) 959439826(已满)728578708(空闲) 用户群,做NDD的问题反馈、功能建议等。 QQ群 616606091 开发群,建议懂CPP/QT、愿意参与NDD项目代码贡献的开发人士加入。 +## 编译或使用手册 +见build目录下文档 linux开源编译及下载说明.txt +见本仓库文档 Ndd使用说明.CHM + ## 效果预览 **windows效果图:** +![输入图片说明](png/0828.png) -![输入图片说明](png/11.png.png) +![深色模式主题](png/2.8win.png) -![输入图片说明](png/6.png) +![编辑修改二进制](png/08282.png) + +![文件对比](png/6.png) **MacOS 效果图:** -![Mac系统运行图](png/%E6%88%AA%E5%B1%8F2023-02-26%2011.41.20.png) +![输入图片说明](png/100602.png) + +![输入图片说明](png/100601.png) ![Mac系统文件对比图](png/%E6%88%AA%E5%B1%8F2023-02-26%2011.45.48.png) +![输入图片说明](png/092601.png) + + **Redhat7.x 效果图:** -![输入图片说明](png/10.png.png) \ No newline at end of file +![输入图片说明](png/10.png.png) + + **UOS 深度 效果图:** +![输入图片说明](png/0809.png) + + **银河麒麟 开源openkylin amd x64 效果图:** +![输入图片说明](png/kinly01.png) + +![输入图片说明](png/kinly02.png) + +![输入图片说明](png/kinly03.png) \ No newline at end of file diff --git a/png/0412.png b/png/0412.png new file mode 100644 index 0000000..760d424 Binary files /dev/null and b/png/0412.png differ diff --git a/png/0803.png b/png/0803.png new file mode 100644 index 0000000..684f5d7 Binary files /dev/null and b/png/0803.png differ diff --git a/png/0809.png b/png/0809.png new file mode 100644 index 0000000..df92b95 Binary files /dev/null and b/png/0809.png differ diff --git a/png/0828.png b/png/0828.png new file mode 100644 index 0000000..81c5b23 Binary files /dev/null and b/png/0828.png differ diff --git a/png/08282.png b/png/08282.png new file mode 100644 index 0000000..62bf7bd Binary files /dev/null and b/png/08282.png differ diff --git a/png/092601.png b/png/092601.png new file mode 100644 index 0000000..3600e1d Binary files /dev/null and b/png/092601.png differ diff --git a/png/100601.png b/png/100601.png new file mode 100644 index 0000000..31b4019 Binary files /dev/null and b/png/100601.png differ diff --git a/png/100602.png b/png/100602.png new file mode 100644 index 0000000..e6e42f3 Binary files /dev/null and b/png/100602.png differ diff --git a/png/2.8win.png b/png/2.8win.png new file mode 100644 index 0000000..9a68255 Binary files /dev/null and b/png/2.8win.png differ diff --git a/png/kinly01.png b/png/kinly01.png new file mode 100644 index 0000000..27cb1e7 Binary files /dev/null and b/png/kinly01.png differ diff --git a/png/kinly02.png b/png/kinly02.png new file mode 100644 index 0000000..b835d8e Binary files /dev/null and b/png/kinly02.png differ diff --git a/png/kinly03.png b/png/kinly03.png new file mode 100644 index 0000000..85f0c4d Binary files /dev/null and b/png/kinly03.png differ diff --git a/png/openkylin.png b/png/openkylin.png new file mode 100644 index 0000000..0b55cc9 Binary files /dev/null and b/png/openkylin.png differ diff --git a/src/cceditor/ccnotepad.cpp b/src/cceditor/ccnotepad.cpp index f958601..0f27530 100755 --- a/src/cceditor/ccnotepad.cpp +++ b/src/cceditor/ccnotepad.cpp @@ -75,6 +75,7 @@ #ifdef Q_OS_WIN #include #include +#include #endif #include @@ -102,6 +103,7 @@ inline std::wstring StringToWString(const std::string& str) int CCNotePad::s_padTimes = 0; int CCNotePad::s_zoomValue = 0; +QFileSystemWatcher* CCNotePad::m_fileWatch = nullptr; QString CCNotePad::s_lastOpenDirPath = ""; QList *CCNotePad::s_padInstances = nullptr; @@ -506,6 +508,9 @@ FileExtLexer s_fileExtMapLexerId[FileExtMapLexerIdLen] = { {QString("v"), L_VERILOG}, {QString("rs"), L_RUST}, {QString("frm"), L_VB}, +{QString("log"), L_LOG}, +{QString("asm"), L_ASM}, +{QString("ps1"), L_POWERSHELL}, {QString("NULL"), L_EXTERNAL}, }; @@ -838,7 +843,7 @@ void CCNotePad::initLexerNameToIndex() ui.actionRust->setData(data); m_lexerNameToIndex.insert("rust", pNodes[i]); ++i; - + pNodes[i].pAct = ui.actionShell; pNodes[i].index = L_BASH; @@ -1013,7 +1018,7 @@ int CCNotePad::runAsAdmin(const QString& filePath) //{ // m_shareMem->detach(); //} - QString argStr = QString("-muti %1").arg(filePath); + QString argStr = QString("-muti \"%1\"").arg(filePath); std::basic_string args = StringToWString(argStr.toStdString()); size_t shellExecRes = (size_t)::ShellExecute(NULL, TEXT("runas"), nddFullPath, args.c_str(), TEXT("."), SW_SHOW); @@ -1132,7 +1137,7 @@ CCNotePad::CCNotePad(bool isMainWindows, QWidget *parent) default: break; } - + #if 0 if (s_padInstances == nullptr) { @@ -1293,7 +1298,7 @@ void CCNotePad::quickshow() ui.statusBar->insertPermanentWidget(2, m_lineNumLabel); ui.statusBar->insertPermanentWidget(3, m_lineEndLabel); ui.statusBar->insertPermanentWidget(4, m_codeStatusLabel); - + initToolBar(); @@ -1320,7 +1325,11 @@ void CCNotePad::quickshow() ui.editTabWidget->installEventFilter(this); - m_fileWatch = new QFileSystemWatcher(this); + if (m_fileWatch == nullptr) + { + //20230701 发现bug,m_fileWatch对象为this,导致主窗口切换时崩溃。 + m_fileWatch = new QFileSystemWatcher(nullptr); + } connect(m_fileWatch, &QFileSystemWatcher::fileChanged, this, &CCNotePad::slot_fileChange); @@ -1330,7 +1339,7 @@ void CCNotePad::quickshow() initNotePadSqlOptions(); - + } @@ -1346,7 +1355,7 @@ void CCNotePad::quickshow() init_toolsMenu(); this->setContextMenuPolicy(Qt::NoContextMenu); - + //恢复文件列表 if (1 == NddSetting::getKeyValueFromNumSets(FILELISTSHOW)) { @@ -1410,24 +1419,24 @@ void CCNotePad::setUserDefShortcutKey(int shortcutId) case Open_File_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Open_File); ui.actionOpenFile->setShortcut(keySeq); - + break; case Save_File_ID: break; case Save_All_File_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Save_All_File); ui.actionSave_as->setShortcut(keySeq); - + break; case Close_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Close); ui.actionClose->setShortcut(keySeq); - + break; case Close_All_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Close_All); ui.actionClose_All->setShortcut(keySeq); - + break; case Cut_ID: break; @@ -1442,87 +1451,87 @@ void CCNotePad::setUserDefShortcutKey(int shortcutId) case Find_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Find); ui.actionFind->setShortcut(keySeq); - + break; case Replace_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Replace); ui.actionReplace->setShortcut(keySeq); - + break; case Dir_Find_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(DirFind); ui.actionFind_In_Dir->setShortcut(keySeq); - + break; case Mark_ID: - + break; case Word_highlight_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Word_highlight); m_signText->setShortcut(keySeq); - + break; case Clear_all_highlight_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Clear_all_highlight); m_clearMark->setShortcut(keySeq); - + break; case Zoom_In_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Zoom_In); m_zoomin->setShortcut(keySeq); - + break; case Zoom_Out_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Zoom_Out); m_zoomout->setShortcut(keySeq); - + break; case Word_Wrap_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Word_Wrap); ui.actionWrap->setShortcut(keySeq); - + break; case Show_Blank_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Show_Blank); ui.actionShowAll->setShortcut(keySeq); - + break; case Indent_Guide_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Indent_Guide); m_indentGuide->setShortcut(keySeq); - + break; case Pre_Page_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Pre_Page); m_preHexPage->setShortcut(keySeq); - + break; case Next_Page_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Next_Page); m_nextHexPage->setShortcut(keySeq); - + break; case Goto_Page_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Goto_Page); ui.actionGoline->setShortcut(keySeq); - + break; - + case Trans_code_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Trans_code); m_transcode->setShortcut(keySeq); - + break; case Batch_rename_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Batch_rename); m_rename->setShortcut(keySeq); - + break; case Format_Xml_ID: keySeq = ShortcutKeyMgr::getUserDefShortcutKey(Format_Xml); m_formatXml->setShortcut(keySeq); - + break; case Format_Json_ID: @@ -1745,7 +1754,10 @@ void CCNotePad::onPlugFound(NDD_PROC_DATA& procData, QMenu* pUserData) pMenu->addAction(pAction); pAction->setText(procData.m_strPlugName); pAction->setData(procData.m_strFilePath); - connect(pAction, &QAction::triggered, this, &CCNotePad::onPlugWork); + procData.m_pAction = pAction; + sendParaToPlugin(procData); + + //connect(pAction, &QAction::triggered, this, &CCNotePad::onPlugWork); } else if (procData.m_menuType == 1) { @@ -1764,7 +1776,43 @@ void CCNotePad::onPlugFound(NDD_PROC_DATA& procData, QMenu* pUserData) m_pluginList.append(procData); } -//真正执行插件的工作 +QsciScintilla* getCurEditView(QWidget* parent) +{ + if (CCNotePad::s_padInstances != nullptr) + { + CCNotePad* p = static_cast(parent); + + int index = CCNotePad::s_padInstances->indexOf(p); + if (-1 == index) + { + return nullptr; + } + else + { + return CCNotePad::s_padInstances->at(index)->getCurEditView(); + } + } + return nullptr; +} + +bool pluginInvoke(QWidget* parent, int cmdId, void* data) +{ + if (CCNotePad::s_padInstances != nullptr) + { + int index = CCNotePad::s_padInstances->indexOf(dynamic_cast(parent)); + if (-1 == index) + { + return false; + } + else + { + return CCNotePad::s_padInstances->at(index)->pluginInvoke(cmdId, data); + } + } + return false; +} + +//真正执行插件的工作。这是在不需要执行二级菜单的情况下,调用的插件执行函数 void CCNotePad::onPlugWork(bool check) { QAction* pAct = dynamic_cast(sender()); @@ -1779,17 +1827,23 @@ void CCNotePad::onPlugWork(bool check) if (pMainCallBack != NULL) { - std::function foundCallBack = std::bind(&CCNotePad::getCurEditView, this); - std::function pluginCallBack = std::bind(&CCNotePad::pluginInvoke, this, std::placeholders::_1, std::placeholders::_2); + std::function foundCallBack = std::bind(&::getCurEditView, std::placeholders::_1); + std::function pluginCallBack = std::bind(&::pluginInvoke, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); + try { pMainCallBack(this, plugPath, foundCallBack, pluginCallBack, nullptr); - + } + catch (...) + { + ui.statusBar->showMessage(tr("plugin %1 load failed !").arg(plugPath)); + QApplication::beep(); + } } else { ui.statusBar->showMessage(tr("plugin %1 load failed !").arg(plugPath), 10000); } - + } } @@ -1805,10 +1859,17 @@ void CCNotePad::sendParaToPlugin(NDD_PROC_DATA& procData) if (pMainCallBack != NULL) { - std::function foundCallBack = std::bind(&CCNotePad::getCurEditView, this); - std::function pluginCallBack = std::bind(&CCNotePad::pluginInvoke, this, std::placeholders::_1, std::placeholders::_2); + std::function foundCallBack = std::bind(&::getCurEditView, std::placeholders::_1); + std::function pluginCallBack = std::bind(&::pluginInvoke, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); + try { pMainCallBack(this, plugPath, foundCallBack, pluginCallBack, &procData); + } + catch (...) + { + ui.statusBar->showMessage(tr("plugin %1 load failed !").arg(plugPath)); + QApplication::beep(); + } } else { @@ -2050,6 +2111,16 @@ void CCNotePad::syncCurSkinToMenu(int id) s_curStyleId = id; } +//释放所有插件里面的实例对象。所以插件对象名称都是nddplg +void CCNotePad::destroyAllPluginModule() +{ + QList objList = this->findChildren("nddplg"); + for (int i = 0; i < objList.size(); ++i) + { + objList[i]->deleteLater(); + } +} + void CCNotePad::slot_changeChinese() { if (m_translator->load(":/realcompare_zh.qm")) @@ -2067,6 +2138,7 @@ void CCNotePad::slot_changeChinese() if (m_isToolMenuLoaded) { #ifdef NO_PLUGIN + destroyAllPluginModule(); ui.menuPlugin->clear(); ui.menuPlugin->addAction(ui.actionPlugin_Manager); #endif @@ -2215,7 +2287,7 @@ void CCNotePad::setToFileRightMenu() void CCNotePad::slot_fileChange(QString filePath) { - + QWidget *pw = nullptr; int changeIndex = -1; @@ -2272,7 +2344,7 @@ void CCNotePad::on_tabBarDoubleClicked(int index) QString filePath = getFilePathProperty(pw); tabClose(index, true); - + if (s_padInstances != nullptr) { for (int i = 0; i < s_padInstances->size(); ++i) @@ -2290,7 +2362,7 @@ void CCNotePad::on_tabBarDoubleClicked(int index) close(); } } - + } } @@ -2342,7 +2414,7 @@ void CCNotePad::slot_tabBarClicked(int index) m_tabRightClickMenu->addSeparator(); m_selectLeftCmp = m_tabRightClickMenu->addAction(tr("Select Left Cmp File"), this, &CCNotePad::slot_selectLeftFile); m_selectRightCmp = m_tabRightClickMenu->addAction(tr("Select Right Cmp File"), this, &CCNotePad::slot_selectRightFile); - + } //非new文件才能重新打开和定位到文件 @@ -2422,7 +2494,7 @@ void CCNotePad::slot_reOpenTextMode() slot_actionClose(true); openTextFile(filePath,false); - + } void CCNotePad::slot_reOpenHexMode() @@ -2886,7 +2958,7 @@ void CCNotePad::setShoctIcon(int iconSize) void CCNotePad::initToolBar() { int iconIndex = NddSetting::getKeyValueFromNumSets(ICON_SIZE); - + int ICON_SIZE = 24; if (iconIndex == 0) @@ -2947,7 +3019,7 @@ void CCNotePad::initToolBar() m_autoSaveAFile->setFixedSize(ICON_SIZE, ICON_SIZE); m_autoSaveAFile->setToolTip(tr("Cycle Auto Save")); ui.mainToolBar->addWidget(m_autoSaveAFile); - + m_closeFile = new QToolButton(ui.mainToolBar); connect(m_closeFile, &QAbstractButton::clicked, this, &CCNotePad::slot_actionClose); @@ -3034,7 +3106,7 @@ void CCNotePad::initToolBar() m_clearMark->setShortcut(QKeySequence(Qt::Key_F7)); ui.mainToolBar->addWidget(m_clearMark); - + ui.mainToolBar->addSeparator(); m_zoomin = new QToolButton(ui.mainToolBar); @@ -3126,7 +3198,7 @@ void CCNotePad::initToolBar() ui.mainToolBar->addWidget(m_rename); setShoctIcon(ICON_SIZE); - + //编码里面只能有一个当前被选中 m_pEncodeActGroup = new QActionGroup(this); @@ -3371,7 +3443,7 @@ void CCNotePad::slot_lexerActTrig(QAction *action) //默认按txt处理 setTxtLexer(pEdit); } - + } } @@ -3605,7 +3677,7 @@ void CCNotePad::reloadEditFile(ScintillaEditView* pEdit, bool isTailfOn, qint64 lineNum = pEdit->lines(); } pEdit->execute(SCI_GOTOLINE, lineNum - 1); - + } #ifdef Q_OS_WIN @@ -3681,7 +3753,7 @@ bool CCNotePad::checkRoladFile(ScintillaEditView* pEdit, qint64 startReadSize) { firstTimeIntoTail(pEdit,100); } - + } } @@ -4068,7 +4140,7 @@ void CCNotePad::tabClose(QWidget* pEdit) break; } } - + } //输入参数:名称和文件新建文件序号。一定是文本文件。contentPath:从这个路径加载文件内容,目前在恢复文件中使用。 @@ -4285,7 +4357,7 @@ bool CCNotePad::reloadTextFileWithCode(CODE_ID code) pEdit->clearSuperBitLineCache(); pEdit->showBigTextLineAddr(fileMgr->fileOffset - fileMgr->contentRealSize, fileMgr->fileOffset); - + } else { @@ -4441,7 +4513,7 @@ bool CCNotePad::openSuperBigTextFile(QString filePath) pEdit->setProperty(Edit_View_FilePath, editViewFilePath); //setWindowTitle(QString("%1 (%2)").arg(filePath).arg(tr("Big Text File ReadOnly"))); - + ui.editTabWidget->setTabToolTip(curIndex, filePath); QVariant editViewNewFile(-1); @@ -4491,7 +4563,7 @@ bool CCNotePad::openSuperBigTextFile(QString filePath) void CCNotePad::showChangePageTips(QWidget* pEdit) { int type = getDocTypeProperty(pEdit); - + if ((BIG_TEXT_RO_TYPE == type) || (SUPER_BIG_TEXT_RO_TYPE == type) || (HEX_TYPE == type)) { ui.statusBar->showMessage(tr("Use < (Prev) or > (Next) and Goto Buttons to Change Page Num ."), 10000); @@ -4643,7 +4715,7 @@ bool CCNotePad::openTextFile(QString filePath, bool isCheckHex, CODE_ID code) //恢复时直接使用新内容保存到原始文件中 saveFile(filePath, pEdit, false); } - + //下面函数太长,进行一个重构到setNormalTextEditInitPro,后面其他地方也需要使用 setNormalTextEditInitPro(pEdit, filePath, code, lineEnd, isReadOnly,false); @@ -4796,7 +4868,7 @@ bool CCNotePad::showHexFile(ScintillaHexEditView* pEdit, HexFileMgr* hexFile) sprintf(textOut + offset, "%012llX ", addr); offset += 13; } - + } sprintf(textOut + offset, "%02X ", *(pchar+pos)); @@ -4847,8 +4919,8 @@ bool CCNotePad::showHexFile(ScintillaHexEditView* pEdit, HexFileMgr* hexFile) delete[]lineString; delete[]textOut; - - + + return true; } @@ -4928,7 +5000,7 @@ bool CCNotePad::showBigTextFile(ScintillaEditView* pEdit, BigTextEditFileMgr* tx { if (blockIndex >= 0 && blockIndex < txtFile->blocks.size()) { - + BlockIndex bi = txtFile->blocks.at(blockIndex); CODE_ID code = (CODE_ID)txtFile->loadWithCode; @@ -5022,7 +5094,7 @@ bool CCNotePad::openHexFile(QString filePath) pEdit->setReadOnly(true); pEdit->setNoteWidget(this); pEdit->execute(SCI_SETSCROLLWIDTH, 80 * 10); - + setDocTypeProperty(pEdit, HEX_TYPE); @@ -5030,7 +5102,7 @@ bool CCNotePad::openHexFile(QString filePath) disconnect(ui.editTabWidget, &QTabWidget::currentChanged, this, &CCNotePad::slot_tabCurrentChanged); int curIndex = ui.editTabWidget->addTab(pEdit, QIcon((StyleSet::getCurrentSytleId() != DEEP_BLACK) ? TabNoNeedSave : TabNoNeedSaveDark32), getShortName(fileLabel)); - + ui.editTabWidget->setCurrentIndex(curIndex); connect(ui.editTabWidget, &QTabWidget::currentChanged, this, &CCNotePad::slot_tabCurrentChanged, Qt::UniqueConnection); @@ -5208,7 +5280,7 @@ bool CCNotePad::tryRestoreFile(QString filePath) QString tempDir = getGlboalTempSaveDir(); QString restoreTempFile = QString("%1\\%2").arg(tempDir).arg(fi.fileName()); - + QFileInfo restoreFi(restoreTempFile); //存在恢复文件,则加载打开 @@ -5246,7 +5318,7 @@ bool CCNotePad::openFile(QString filePath, int lineNum) getRegularFilePath(filePath); QFileInfo fi(filePath); - + if (!fi.exists()) { QApplication::beep(); @@ -5277,7 +5349,7 @@ bool CCNotePad::openFile(QString filePath, int lineNum) } ui.statusBar->showMessage(tr("file %1 already open at tab %2").arg(filePath).arg(retIndex),MSG_EXIST_TIME); - + return true; } @@ -5322,7 +5394,7 @@ void CCNotePad::slot_actionOpenFile_toggle(bool /*checked*/) QFileDialog fd(this,QString(), s_lastOpenDirPath); fd.setFileMode(QFileDialog::ExistingFile); - + if (fd.exec() == QDialog::Accepted) //如果成功的执行 { QStringList fileNameList = fd.selectedFiles(); //返回文件列表的名称 @@ -5355,10 +5427,10 @@ void hide_file(const QString& szFile) //isBakWrite 是否写保护swp文件,默认true。只有新文件时不需要,因为新文件不存在覆盖写的问题 //isStatic 是否静默:不弹出对话框,在外部批量查找替换文件夹时使用,避免弹窗中断。默认false //isClearSwpFile:是否回收swp交换文件,在外部批量查找替换文件夹时使用,替换后直接删除swp文件。默认false -bool CCNotePad::saveFile(QString fileName, ScintillaEditView* pEdit, bool isBakWrite, bool isStatic,bool isClearSwpFile) +bool CCNotePad::saveFile(QString fileName, ScintillaEditView* pEdit, bool isBakWrite, bool isStatic, bool isClearSwpFile) { QFile srcfile(fileName); - + //如果文件存在,说明是旧文件,检测是否能写,不能写则失败。 //反之文件不存,是保存为新文件 bool isNewFile = false; @@ -5404,7 +5476,7 @@ bool CCNotePad::saveFile(QString fileName, ScintillaEditView* pEdit, bool isBak //后面新打开的文件,再去读取该文件。 this->runAsAdmin(fileName); - + return false; } #endif @@ -5513,7 +5585,7 @@ bool CCNotePad::saveFile(QString fileName, ScintillaEditView* pEdit, bool isBak QFile::remove(swapFilePath); } #endif - + } return true; } @@ -5691,18 +5763,18 @@ void CCNotePad::slot_actionRenameFile_toggle(bool checked) //如果是打开的本来就存在的文件,也弹出保存进行 QString filter("Text files (*.txt);;XML files (*.xml);;h files (*.h);;cpp file(*.cpp);;All types(*.*)"); QString fileName = QFileDialog::getSaveFileName(this, tr("Rename File As ..."), oldfi.absoluteDir().absolutePath(), filter); - + if (!fileName.isEmpty()) { getRegularFilePath(fileName); - + if (oldName == fileName) { return; } - + QFileInfo newfi(fileName); if (oldfi.absoluteDir().absolutePath() != newfi.absoluteDir().absolutePath()) @@ -5774,7 +5846,7 @@ void CCNotePad::slot_actionSaveAsFile_toggle(bool /*checked*/) { QString filter("Text files (*.txt);;XML files (*.xml);;h files (*.h);;cpp file(*.cpp);;All types(*.*)"); QString fileName = QFileDialog::getSaveFileName(this, tr("Save File As ..."),QString(), filter); - + if (!fileName.isEmpty()) { getRegularFilePath(fileName); @@ -5984,7 +6056,7 @@ void CCNotePad::slot_timerAutoSave() for (int i = ui.editTabWidget->count() - 1; i >= 0; --i) { QWidget* pw = ui.editTabWidget->widget(i); - + //如果是未修改,不执行保存 if (!getTextChangeProperty(pw)) { @@ -6295,7 +6367,7 @@ void CCNotePad::closeEvent(QCloseEvent * event) { m_columnEditWin.data()->close(); } - + //关闭的时候,filelistwin还存在 if (!m_dockFileListWin.isNull()) @@ -6333,7 +6405,7 @@ void CCNotePad::closeEvent(QCloseEvent * event) closeAllFileWhenQuit(true); } #endif - + if (m_isQuitCancel) { m_isQuitCancel = false; @@ -6589,7 +6661,7 @@ void CCNotePad::slot_wordwrap(bool checked) pEdit->setWrapMode(QsciScintilla::WrapNone); } } - + s_autoWarp = (checked) ? QsciScintilla::WrapCharacter : QsciScintilla::WrapNone; NddSetting::updataKeyValueFromNumSets(AUTOWARP_KEY, s_autoWarp); @@ -6635,7 +6707,7 @@ void CCNotePad::changeBlankShowStatus(int showBlank) setEditShowBlankStatus(pEdit, s_showblank); } } - + NddSetting::updataKeyValueFromNumSets(SHOWSPACE_KEY, s_showblank); syncBlankShowStatus(); @@ -6957,7 +7029,7 @@ int CCNotePad::initFindWindow(FindTabIndex type) } pFind->setCurrentTab(type); - + if ((TXT_TYPE == docType) || (BIG_TEXT_RO_TYPE == docType) || (SUPER_BIG_TEXT_RO_TYPE == docType)) { ScintillaEditView* pEdit = dynamic_cast(pw); @@ -7103,7 +7175,7 @@ void CCNotePad::clearHighlightWord(QString signWord, ScintillaEditView* pEdit) return; } } - + //如果当前已经高亮,则取消高亮 QList& curMarkRecord = pEdit->getCurMarkRecord(); @@ -7279,7 +7351,7 @@ void CCNotePad::initFindResultDockWin() m_pResultWin = new FindResultWin(m_dockSelectTreeWin); //connect(m_pResultWin, &FindResultWin::itemDoubleClicked, this, &CCNotePad::slot_findResultItemDoubleClick); connect(m_pResultWin, &FindResultWin::lineDoubleClicked, this, &CCNotePad::on_findResultlineDoubleClick); - + connect(m_pResultWin, &FindResultWin::showMsg, this, [this](QString& msg) { ui.statusBar->showMessage(msg,5000); }); @@ -7385,7 +7457,7 @@ void CCNotePad::slot_findResultItemDoubleClick(const QModelIndex &index) int pos = item->data(ResultItemPos).toInt(); int len = item->data(ResultItemLen).toInt(); - + pCurEdit->execute(SCI_SETSEL, pos, pos + len); } @@ -7615,7 +7687,7 @@ void CCNotePad::slot_gotoline() pEdit->execute(SCI_SETFIRSTVISIBLELINE, (long)offsetLineNum); pEdit->execute(SCI_GOTOLINE, offsetLineNum - 1); - + } else { @@ -7906,7 +7978,7 @@ void CCNotePad::slot_preHexPage() if(fileMgr != nullptr) { ScintillaEditView* pEdit = dynamic_cast(pw); - + int id = fileMgr->m_curBlockIndex - 1; showBigTextFile(pEdit, fileMgr, id); } @@ -7993,7 +8065,7 @@ void CCNotePad::slot_gotoHexPage() registerEscKeyShort(m_pHexGotoWin); } - + QWidget* pw = ui.editTabWidget->currentWidget(); if (pw != nullptr && (HEX_TYPE == getDocTypeProperty(pw))) @@ -8190,7 +8262,7 @@ void CCNotePad::dropEvent(QDropEvent* e) openFile(fileName); } - + e->accept(); } @@ -8269,7 +8341,7 @@ bool CCNotePad::nativeEvent(const QByteArray & eventType, void * message, qintpt case WM_COPYDATA: { COPYDATASTRUCT *cds = reinterpret_cast(param->lParam); - + if (cds->dwData == CUSTOM_TYPE) { QString openFilePath = QString::fromUtf8(reinterpret_cast(cds->lpData), cds->cbData); @@ -8596,7 +8668,7 @@ void CCNotePad::slot_viewLexerChange(QString tag) { QsciLexer* lexer = pEdit->lexer(); - + if (lexer != nullptr && lexer->lexerTag() == tag) { lexerId = lexer->lexerId(); @@ -8739,7 +8811,7 @@ bool CCNotePad::restoreDirtyExistFile(QString& filePath, QString& tempFilePath) return false; } } - + disconnect(ui.editTabWidget, &QTabWidget::currentChanged, this, &CCNotePad::slot_tabCurrentChanged); int curIndex = ui.editTabWidget->addTab(pEdit, QIcon((StyleSet::getCurrentSytleId() != DEEP_BLACK) ? TabNoNeedSave : TabNoNeedSaveDark32), getShortName(fileLabel)); ui.editTabWidget->setCurrentIndex(curIndex); @@ -8775,7 +8847,7 @@ bool CCNotePad::restoreDirtyExistFile(QString& filePath, QString& tempFilePath) { ui.editTabWidget->setTabIcon(curIndex, QIcon(TabNeedSave)); } - + QVariant editTextCode((int)code); pEdit->setProperty(Edit_Text_Code, editTextCode); @@ -8871,7 +8943,7 @@ int CCNotePad::restoreLastFiles() continue; } QString path = value.left(value.size()-2); - + switch (type) { case 1: @@ -9090,6 +9162,82 @@ ScintillaEditView* CCNotePad::getCurEditView() return nullptr; } +void CCNotePad::setEditLangs(ScintillaEditView* pEdit, LangType langs) +{ + QsciLexer* curLexer = pEdit->lexer(); + if (curLexer == nullptr) + { + //设定为目标语法 + QsciLexer* lexer = ScintillaEditView::createLexer(langs); + pEdit->setLexer(lexer); + } + else if (curLexer->lexerId() != langs) + { + pEdit->setLexer(nullptr); + delete curLexer; + curLexer = nullptr; + + QsciLexer* lexer = ScintillaEditView::createLexer(langs); + pEdit->setLexer(lexer); + } + syncCurDocLexerToMenu(pEdit); +} + +#ifdef NO_PLUGIN +//插件中调用主程序的功能。 +//cmdId 执行什么动作,一定固定后,主程序不能随便修改,否则会引发兼容性问题。 +bool CCNotePad::pluginInvoke(int cmdId, void* data) +{ + bool ret = false; + switch (cmdId) + { + case 1: + { + //新建一个文件。 + slot_actionNewFile_toggle(true); + + //默认不需要。 + if (data != nullptr) + { + QVariant* pVar = (QVariant*)data; + //回传回去新建文件的名称 + ScintillaEditView* pw = this->getCurEditView(); + if (pw != nullptr) + { + pVar->setValue(getFilePathProperty(pw)); + } + + } + ret = true; + } + break; + case 2: + { + //设定当前编辑器的语言。0 js 1 json 2 html + int lang = *((int*)data); + + LangType langs = ((lang == 0) ? L_JAVASCRIPT : L_JSON); + + if (lang == 2) + { + langs = L_HTML; + } + + ScintillaEditView* pEdit = this->getCurEditView(); + if (pEdit != nullptr) + { + setEditLangs(pEdit, langs); + } + ret = true; + } + break; + default: + break; + } + return ret; +} +#endif + //tab space 互转 void CCNotePad::spaceTabConvert(SpaceTab type) { @@ -9652,7 +9800,7 @@ void CCNotePad::slot_formatXml() } _pEditView->setText(xmlOut); - + } void CCNotePad::slot_formatJson() @@ -9872,70 +10020,3 @@ void CCNotePad::on_md5hash() pWin->setAttribute(Qt::WA_DeleteOnClose); pWin->show(); } - - -#ifdef NO_PLUGIN -//插件中调用主程序的功能。 -//cmdId 执行什么动作,一定固定后,主程序不能随便修改,否则会引发兼容性问题。 -bool CCNotePad::pluginInvoke(int cmdId, void* data) -{ - bool ret = false; - switch (cmdId) - { - case 1: - { - //新建一个文件。 - slot_actionNewFile_toggle(true); - - //默认不需要。 - if (data != nullptr) - { - QVariant* pVar = (QVariant*)data; - //回传回去新建文件的名称 - ScintillaEditView* pw = getCurEditView(); - if (pw != nullptr) - { - pVar->setValue(getFilePathProperty(pw)); - } - - } - ret = true; - } - break; - case 2: - { - //设定当前编辑器的语言。0 js 1 json - int lang = *((int*)data); - - LangType langs = ((lang == 0) ? L_JAVASCRIPT : L_JSON); - - ScintillaEditView* pEdit = getCurEditView(); - if (pEdit != nullptr) - { - QsciLexer* curLexer = pEdit->lexer(); - if (curLexer == nullptr) - { - //设定为目标语法 - QsciLexer* lexer = ScintillaEditView::createLexer(langs); - pEdit->setLexer(lexer); - } - else if (curLexer->lexerId() != langs) - { - pEdit->setLexer(nullptr); - delete curLexer; - curLexer = nullptr; - - QsciLexer* lexer = ScintillaEditView::createLexer(langs); - pEdit->setLexer(lexer); - } - syncCurDocLexerToMenu(pEdit); - } - ret = true; - } - - default: - break; - } - return ret; -} -#endif \ No newline at end of file diff --git a/src/cceditor/ccnotepad.h b/src/cceditor/ccnotepad.h index 239ebf2..ec8fb23 100755 --- a/src/cceditor/ccnotepad.h +++ b/src/cceditor/ccnotepad.h @@ -103,7 +103,7 @@ public: void setLineEndBarLabel(RC_LINE_FORM lineEnd); void initLexerNameToIndex(); - + static LexerInfo getLangLexerIdByFileExt(QString filePath); bool openFile(QString filePath, int lineNum=-1); @@ -148,8 +148,13 @@ public: void changeMarkColor(int sytleId); void setUserDefShortcutKey(int shortcutId); - + QtLangSet* getLangSet(); + void setEditLangs(ScintillaEditView* pEdit,LangType langs); +#ifdef NO_PLUGIN + //插件中调用主程序的功能。 + bool pluginInvoke(int cmdId, void* data); +#endif signals: void signSendRegisterKey(QString key); void signRegisterReplay(int code); @@ -160,7 +165,7 @@ signals: public slots: void slot_changeChinese(); void slot_changeEnglish(); - + void slot_actionNewFile_toggle(bool checked); void slot_actionOpenFile_toggle(bool checked); void slot_actionSaveFile_toggle(bool checked); @@ -238,7 +243,7 @@ private slots: void slot_replace(); void slot_markHighlight(); - + void slot_findResultPosChangeed(Qt::DockWidgetArea area); void slot_findResultItemDoubleClick(const QModelIndex & index); #if 0 @@ -316,7 +321,7 @@ private slots: void slot_spaceToTabAll(); void slot_spaceToTabLeading(); - + void slot_dupCurLine(); void slot_removeDupLine(); void slot_splitLines(); @@ -325,7 +330,7 @@ private slots: void slot_moveDownCurLine(); void slot_insertBlankAbvCur(); void slot_insertBlankBelCur(); - + void slot_reverseLineOrder(); void slot_sortLexAsc(); void slot_sortLexAscIgnCase(); @@ -355,8 +360,6 @@ private slots: #ifdef NO_PLUGIN void onPlugWork(bool check); void sendParaToPlugin(NDD_PROC_DATA& procData); - //cmdId 执行什么动作,一定固定后,主程序不能随便修改,否则会引发兼容性问题。 - bool pluginInvoke(int cmdId, void* data); #endif void slot_showWebAddr(bool check); void slot_langFileSuffix(); @@ -382,7 +385,7 @@ private: void saveReceneOpenFile(); void updateSaveAllToolBarStatus(); void initReceneOpenFileMenu(); - + int findFileIsOpenAtPad(QString filePath); bool isNewFileNameExist(QString& fileName); void updateCurTabSaveStatus(); @@ -428,7 +431,7 @@ private: bool openTextFile(QString filePath, bool isCheckHex = true, CODE_ID code=CODE_ID::UNKOWN); bool openHexFile(QString filePath); - + bool showHexFile(ScintillaHexEditView * pEdit, HexFileMgr * hexFile); bool showBigTextFile(ScintillaEditView * pEdit, TextFileMgr * hexFile); @@ -446,7 +449,7 @@ private: void restoreCleanExistFile(QString & filePath); void restoreDirtyNewFile(QString & fileName, QString & tempFilePath, int lexid=L_TXT); bool restoreDirtyExistFile(QString & fileName, QString & tempFilePath); - + ScintillaEditView* newTxtFile(QString Name, int index, QString contentPath=""); void setLangsDescLable(QString &langDesc); void transCurUpperOrLower(TextCaseType type); @@ -475,6 +478,7 @@ private: void loadPluginLib(); void loadPluginProcs(QString strLibDir, QMenu* pMenu); void onPlugFound(NDD_PROC_DATA& procData, QMenu* pUserData); + void destroyAllPluginModule(); #endif void setUserDefShortcutKey(); @@ -523,7 +527,7 @@ private: QMap m_lexerNameToIndex; //监控文件被修改的对象 - QFileSystemWatcher* m_fileWatch; + static QFileSystemWatcher* m_fileWatch; QString m_cmpLeftFilePath; QString m_cmpRightFilePath; @@ -532,11 +536,11 @@ private: QPointer m_columnEditWin; QPointer m_langSetWin; QPointer m_optionsView; - + QSharedMemory* m_shareMem; - + QList m_cmpDirMgr; QList m_cmpFileMgr; @@ -561,9 +565,6 @@ private: QAction* m_selectRightCmp; - //所有打开的notebook均保存起来。关闭时切换share里面保存的地址 - static QList *s_padInstances; - //当前打开的二进制文件,保存在这里 QMap m_hexFileMgr; @@ -579,8 +580,8 @@ private: static int s_indent; //自动缩进 static int s_showblank; //显示空白 static int s_zoomValue; - - + + QTranslator* m_translator; QTimer * m_timerAutoSave; @@ -635,7 +636,9 @@ private: QList m_pluginList; public: - + //所有打开的notebook均保存起来。关闭时切换share里面保存的地址 + static QList* s_padInstances; + static QString s_lastOpenDirPath; static int s_restoreLastFile; //自动恢复上次打开的文件 static int s_curStyleId; diff --git a/src/findwin.cpp b/src/findwin.cpp index 8af0811..ad7853c 100755 --- a/src/findwin.cpp +++ b/src/findwin.cpp @@ -23,7 +23,7 @@ enum TAB_TYPES { MARK_TYPE, }; -const int MAX_RECORD_KEY_LENGTH = 20; +const int MAX_RECORD_KEY_LENGTH = 120; FindWin::FindWin(QWidget *parent):QMainWindow(parent), m_editTabWidget(nullptr), m_isFindFirst(true), m_findHistory(nullptr), \ pEditTemp(nullptr), m_curEditWin(nullptr), m_isStatic(false), m_isReverseFind(false), m_pMainPad(parent) diff --git a/src/include/pluginGl.h b/src/include/pluginGl.h index 346aea4..67c94eb 100755 --- a/src/include/pluginGl.h +++ b/src/include/pluginGl.h @@ -22,9 +22,10 @@ struct ndd_proc_data QString m_version; // [可选]版本号码 QString m_auther; // [可选]作者名称 int m_menuType; // [可选]菜单类型(0:不使用二级菜单 1:创建二级菜单) - QMenu* m_rootMenu; // [依赖]当 m_menuType = 1,给出二级根菜单的地址(默认为 nullptr) + QMenu* m_rootMenu; // [依赖]当 m_menuType = 1,则给出二级根菜单的地址(默认为 nullptr) + QAction* m_pAction; // []如果m_menuType = 0,给出一级菜单动作的地址。其他值nullptr 插件内部不用填写,主程序传递下来 - ndd_proc_data(): m_rootMenu(nullptr), m_menuType(0) + ndd_proc_data(): m_rootMenu(nullptr), m_pAction(nullptr),m_menuType(0) { } diff --git a/src/linux/usr/share/applications/io.gitee.cxasm.notepad--.desktop b/src/linux/usr/share/applications/NotePad--.desktop similarity index 75% rename from src/linux/usr/share/applications/io.gitee.cxasm.notepad--.desktop rename to src/linux/usr/share/applications/NotePad--.desktop index 3e50291..d6a61ac 100644 --- a/src/linux/usr/share/applications/io.gitee.cxasm.notepad--.desktop +++ b/src/linux/usr/share/applications/NotePad--.desktop @@ -1,13 +1,12 @@ [Desktop Entry] Version=1.0 -Name=Notepad-- -Name[zh_CN]=Notepad-- -Comment=Notepad-- 是一个国产跨平台、简单的文本编辑器。 +Name=NotePad-- +Name[zh_CN]=NotePad-- +Comment=NotePad-- 是一个国产跨平台、简单的文本编辑器。 Type=Application -Exec=notepad-- %F -Icon=notepad-- +Exec=NotePad-- %F +Icon=/usr/share/icons/hicolor/128x128/apps/notepad--.png Categories=Development;Office; Terminal=false MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-patch;text/x-adasrc;text/x-chdr;text/x-csrc;text/css;application/x-desktop;text/x-patch;text/x-fortran;text/html;text/x-java;text/x-tex;text/x-makefile;text/x-objcsrc;text/x-pascal;application/x-perl;application/x-perl;application/x-php;text/vnd.wap.wml;text/x-python;application/x-ruby;text/sgml;application/xml;model/vrml;image/svg+xml;application/json; -# Generated from the DesktopGenerater component of the z-Tools toolkit diff --git a/src/main.cpp b/src/main.cpp index 9d1bfd3..f28590c 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -121,11 +121,18 @@ class MyApplication : public QApplication int main(int argc, char *argv[]) { - //可以防止某些屏幕下的字体拥挤重叠问题。暂时屏蔽,不使用qt方法,使用windows自带方案 - // 发现windows自带方案模糊。//发现下面打开后,在win10上反而效果不好,界面会变得很大,默认还是不开启的好。 - //QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - //QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); - //QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); +#elif (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) + #ifdef Q_OS_WIN + HDC hdc = CreateDC(L"display", NULL, NULL, NULL); + int ndpi = GetDeviceCaps(hdc, LOGPIXELSY); + qputenv("QT_SCALE_FACTOR", QString::number(ndpi / 96.0).toUtf8()); + #endif // Q_OS_WIN +#endif +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif #ifdef Q_OS_MAC MyApplication a(argc, argv); @@ -133,6 +140,10 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); #endif +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + a.setAttribute(Qt::AA_UseHighDpiPixmaps); +#endif + //不能开启,开启后相对路径打开文件失败 //QDir::setCurrent(QCoreApplication::applicationDirPath()); diff --git a/src/plugin.h b/src/plugin.h index 4e84343..239027e 100755 --- a/src/plugin.h +++ b/src/plugin.h @@ -5,6 +5,6 @@ class QMenu; class QsciScintilla; class QWidget; -typedef int (*NDD_PROC_MAIN_CALLBACK)(QWidget* parent, const QString& strFileName, std::functiongetCurEdit, std::function, NDD_PROC_DATA* procData); +typedef int (*NDD_PROC_MAIN_CALLBACK)(QWidget* parent, const QString& strFileName, std::functiongetCurEdit, std::function pluginCallBack, NDD_PROC_DATA* procData); int loadProc(const QString& strDirOut, std::function funcallback, QMenu* pUserData); diff --git a/src/plugin/helloworld/helloworldexport.cpp b/src/plugin/helloworld/helloworldexport.cpp index 6b1d299..0ab6b93 100755 --- a/src/plugin/helloworld/helloworldexport.cpp +++ b/src/plugin/helloworld/helloworldexport.cpp @@ -4,6 +4,7 @@ #include #include #include "qttestclass.h" +#include "instanceobj.h" #ifdef WIN32 #include #endif @@ -25,8 +26,7 @@ #endif NDD_EXPORT bool NDD_PROC_IDENTIFY(NDD_PROC_DATA* pProcData); - NDD_EXPORT int NDD_PROC_MAIN(QWidget* pNotepad, const QString& strFileName, std::functiongetCurEdit, std::function pluginCallBack, NDD_PROC_DATA* procData); - + NDD_EXPORT int NDD_PROC_MAIN(QWidget* pNotepad, const QString& strFileName, std::functiongetCurEdit, std::function pluginCallBack, NDD_PROC_DATA* procData); #ifdef __cplusplus } @@ -34,8 +34,9 @@ static NDD_PROC_DATA s_procData; static QWidget* s_pMainNotepad = nullptr; -std::function s_getCurEdit; -std::function s_invokeMainFun; + +std::function s_getCurEdit; +std::function s_invokeMainFun; bool NDD_PROC_IDENTIFY(NDD_PROC_DATA* pProcData) { @@ -61,14 +62,23 @@ bool NDD_PROC_IDENTIFY(NDD_PROC_DATA* pProcData) //s_invokeMainFun: 可以回调NDD主程序中的功能函数,比如创建新文件功能等,根据需要可实时扩展。 //pProcData:如果pProcData->m_menuType = 0 ,则该指针为空;如果pProcData->m_menuType = 1,则该指针有值。目前需要关心s_procData.m_rootMenu //开发者可以在该菜单下面,自行创建二级菜单 -int NDD_PROC_MAIN(QWidget* pNotepad, const QString &strFileName, std::functiongetCurEdit, std::function pluginCallBack, NDD_PROC_DATA* pProcData) +int NDD_PROC_MAIN(QWidget* pNotepad, const QString &strFileName, std::functiongetCurEdit, std::function pluginCallBack, NDD_PROC_DATA* pProcData) { - QsciScintilla* pEdit = getCurEdit(); - if (pEdit == nullptr) + InstanceObj* pInstanse = nullptr; + + if (pProcData != nullptr) + { + pInstanse = new InstanceObj(pNotepad); + pInstanse->setObjectName("nddplg"); + } + else { return -1; } + s_getCurEdit = getCurEdit; + s_invokeMainFun = pluginCallBack; + //务必拷贝一份pProcData,在外面会释放。 if (pProcData != nullptr) { @@ -76,18 +86,8 @@ int NDD_PROC_MAIN(QWidget* pNotepad, const QString &strFileName, std::functionm_menuType = 1;是自己要创建二级菜单的场景。则通过s_procData.m_rootMenu 获取该插件的菜单根节点。 - //插件开发者自行在s_procData.m_rootMenu下添加新的二级菜单项目 - - - //做一个简单的转大写的操作 - QtTestClass* p = new QtTestClass(pNotepad,pEdit); - //主窗口关闭时,子窗口也关闭。避免空指针操作 - p->setWindowFlag(Qt::Window); - p->show(); + QObject::connect(pProcData->m_pAction, &QAction::triggered, pInstanse, &InstanceObj::doMainWork, Qt::UniqueConnection); return 0; } @@ -113,4 +113,4 @@ void onDllUnload(void) { //做全局回收工作 } -#endif \ No newline at end of file +#endif diff --git a/src/plugin/helloworld/instanceobj.cpp b/src/plugin/helloworld/instanceobj.cpp new file mode 100755 index 0000000..9630729 --- /dev/null +++ b/src/plugin/helloworld/instanceobj.cpp @@ -0,0 +1,31 @@ +#include "instanceobj.h" +#include "qttestclass.h" + +#include +#include +#include +#include + + +InstanceObj::InstanceObj(QWidget* pNotepad) :QObject(pNotepad) +{ + m_pNotepad = pNotepad; +} + +InstanceObj::~InstanceObj() +{ + +} + + +void InstanceObj::doMainWork() +{ + //һ򵥵תдIJ + if (m_pMainToolWin.isNull()) + { + m_pMainToolWin = new QtTestClass(m_pNotepad); + m_pMainToolWin->setWindowFlag(Qt::Window); + m_pMainToolWin->setAttribute(Qt::WA_DeleteOnClose); + } + m_pMainToolWin->show(); +} \ No newline at end of file diff --git a/src/plugin/helloworld/instanceobj.h b/src/plugin/helloworld/instanceobj.h new file mode 100755 index 0000000..298ad1f --- /dev/null +++ b/src/plugin/helloworld/instanceobj.h @@ -0,0 +1,25 @@ +#pragma once +#include +#include +#include +#include "qttestclass.h" + +class QMenu; + +class InstanceObj :public QObject +{ +public: + //NddͷʱԶͷŸö + InstanceObj(QWidget* pNotepad); + ~InstanceObj(); + +public slots: + void doMainWork(); + +public: + QWidget* m_pNotepad; + QPointer m_pMainToolWin; +private: + InstanceObj(const InstanceObj& other) = delete; + InstanceObj& operator=(const InstanceObj& other) = delete; +}; \ No newline at end of file diff --git a/src/plugin/helloworld/qttestclass.cpp b/src/plugin/helloworld/qttestclass.cpp index 392898a..ec83227 100755 --- a/src/plugin/helloworld/qttestclass.cpp +++ b/src/plugin/helloworld/qttestclass.cpp @@ -1,11 +1,14 @@ #include "qttestclass.h" #include -QtTestClass::QtTestClass(QWidget *parent, QsciScintilla* pEdit) - : QWidget(parent) +extern std::function s_getCurEdit; + + +QtTestClass::QtTestClass(QWidget *parent): QWidget(parent) { ui.setupUi(this); - m_pEdit = pEdit; + + m_pNotepad = parent; } QtTestClass::~QtTestClass() @@ -13,18 +16,26 @@ QtTestClass::~QtTestClass() void QtTestClass::on_upper() { - QString text = m_pEdit->text(); + QsciScintilla* pEdit = s_getCurEdit(m_pNotepad); + if (pEdit != nullptr) + { + QString text = pEdit->text(); - text = text.toUpper(); + text = text.toUpper(); - m_pEdit->setText(text); + pEdit->setText(text); + } } void QtTestClass::on_lower() { - QString text = m_pEdit->text(); + QsciScintilla* pEdit = s_getCurEdit(m_pNotepad); + if (pEdit != nullptr) + { + QString text = pEdit->text(); - text = text.toLower(); + text = text.toLower(); - m_pEdit->setText(text); + pEdit->setText(text); + } } \ No newline at end of file diff --git a/src/plugin/helloworld/qttestclass.h b/src/plugin/helloworld/qttestclass.h index 75a0a41..687935f 100755 --- a/src/plugin/helloworld/qttestclass.h +++ b/src/plugin/helloworld/qttestclass.h @@ -9,7 +9,7 @@ class QtTestClass : public QWidget Q_OBJECT public: - QtTestClass(QWidget *parent, QsciScintilla* pEdit); + QtTestClass(QWidget *parent); ~QtTestClass(); private slots: @@ -17,5 +17,6 @@ private slots: void on_lower(); private: Ui::QtTestClassClass ui; - QsciScintilla* m_pEdit; + + QWidget* m_pNotepad; }; diff --git a/src/pluginGl.h b/src/pluginGl.h index 6b576a6..20ffe1c 100755 --- a/src/pluginGl.h +++ b/src/pluginGl.h @@ -10,9 +10,12 @@ struct ndd_proc_data QString m_version; //版本号码。可选;插件里面需填写 QString m_auther;//作者名称。可选;插件里面需填写 int m_menuType;//菜单类型。0:不使用二级菜单 1:创建二级菜单;插件里面需填写 - QMenu* m_rootMenu;//如果m_menuType = 1,给出二级根菜单的地址。其他值nullptr 插件内部不用填写,主程序传递下来 - ndd_proc_data(): m_rootMenu(nullptr), m_menuType(0) + QMenu* m_rootMenu;//如果m_menuType = 1,给出二级根菜单的地址。其他值nullptr 插件内部不用填写,主程序传递下来 + QAction* m_pAction;//如果m_menuType = 0,给出一级菜单动作的地址。其他值nullptr 插件内部不用填写,主程序传递下来 + + + ndd_proc_data(): m_rootMenu(nullptr), m_pAction(nullptr),m_menuType(0) { } diff --git a/src/qscint/scintilla/boostregex/boost/regex/config.hpp b/src/qscint/scintilla/boostregex/boost/regex/config.hpp index bed485f..55fff74 100755 --- a/src/qscint/scintilla/boostregex/boost/regex/config.hpp +++ b/src/qscint/scintilla/boostregex/boost/regex/config.hpp @@ -72,6 +72,10 @@ # include BOOST_REGEX_USER_CONFIG +#ifdef Q_OS_UNIX +#define BOOST_REGEX_STANDALONE +#endif + #ifndef BOOST_REGEX_STANDALONE # include # include diff --git a/src/qscint/scintilla/include/SciLexer.h b/src/qscint/scintilla/include/SciLexer.h index 48dff50..34f2fcb 100755 --- a/src/qscint/scintilla/include/SciLexer.h +++ b/src/qscint/scintilla/include/SciLexer.h @@ -1,145 +1,145 @@ -/* 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 +/* 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_NIM 126 -#define SCLEX_LPEG 999 +#define SCLEX_NIM 126 +#define SCLEX_LPEG 999 #define SCLEX_CIL 127 #define SCLEX_X12 128 #define SCLEX_DATAFLEX 129 @@ -151,1949 +151,1950 @@ #define SCLEX__EDIFACT 153 #define SCLEX_IDL 154 #define SCLEX_GO 155 -#define SCLEX_TXT 156 +#define SCLEX_TXT 156 +#define SCLEX_LOG 157 +#define SCLEX_GCode 158 +#define SCLEX_AUTOMATIC 1000 -#define SCLEX_AUTOMATIC 1000 - - - -//For All lexer -#define SCE_UNIVERSAL_FOUND_STYLE 31 -#define SCE_UNIVERSAL_FOUND_STYLE_SMART 29 -#define SCE_UNIVERSAL_FOUND_STYLE_INC 28 -#define SCE_UNIVERSAL_TAGMATCH 27 -#define SCE_UNIVERSAL_TAGATTR 26 -#define SCE_UNIVERSAL_FOUND_STYLE_EXT1 25 -#define SCE_UNIVERSAL_FOUND_STYLE_EXT2 24 -#define SCE_UNIVERSAL_FOUND_STYLE_EXT3 23 -#define SCE_UNIVERSAL_FOUND_STYLE_EXT4 22 -#define SCE_UNIVERSAL_FOUND_STYLE_EXT5 21 - -#define SCE_UDL_VERSION_MAJOR 2 -#define SCE_UDL_VERSION_MINOR 1 -#define SCE_UDL_VERSION_BUILD 0 -#define SCE_UDL_VERSION_REVISION 12 - -#define SCE_USER_KWLIST_COMMENTS 0 -#define SCE_USER_KWLIST_NUMBER_PREFIX1 1 -#define SCE_USER_KWLIST_NUMBER_PREFIX2 2 -#define SCE_USER_KWLIST_NUMBER_EXTRAS1 3 -#define SCE_USER_KWLIST_NUMBER_EXTRAS2 4 -#define SCE_USER_KWLIST_NUMBER_SUFFIX1 5 -#define SCE_USER_KWLIST_NUMBER_SUFFIX2 6 -#define SCE_USER_KWLIST_NUMBER_RANGE 7 -#define SCE_USER_KWLIST_OPERATORS1 8 -#define SCE_USER_KWLIST_OPERATORS2 9 -#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN 10 -#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE 11 -#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE 12 -#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN 13 -#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE 14 -#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE 15 -#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN 16 -#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE 17 -#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE 18 -#define SCE_USER_KWLIST_KEYWORDS1 19 -#define SCE_USER_KWLIST_KEYWORDS2 20 -#define SCE_USER_KWLIST_KEYWORDS3 21 -#define SCE_USER_KWLIST_KEYWORDS4 22 -#define SCE_USER_KWLIST_KEYWORDS5 23 -#define SCE_USER_KWLIST_KEYWORDS6 24 -#define SCE_USER_KWLIST_KEYWORDS7 25 -#define SCE_USER_KWLIST_KEYWORDS8 26 -#define SCE_USER_KWLIST_DELIMITERS 27 -#define SCE_USER_KWLIST_TOTAL 28 // must always be <= KEYWORDSET_MAX - -#define SCE_USER_TOTAL_DELIMITERS 8 -#define SCE_USER_TOTAL_KEYWORD_GROUPS 8 -#define SCE_USER_TOTAL_FOLDERS 6 - -#define SCE_USER_STYLE_DEFAULT 0 -#define SCE_USER_STYLE_COMMENT 1 -#define SCE_USER_STYLE_COMMENTLINE 2 -#define SCE_USER_STYLE_NUMBER 3 -#define SCE_USER_STYLE_KEYWORD1 4 -#define SCE_USER_STYLE_KEYWORD2 5 -#define SCE_USER_STYLE_KEYWORD3 6 -#define SCE_USER_STYLE_KEYWORD4 7 -#define SCE_USER_STYLE_KEYWORD5 8 -#define SCE_USER_STYLE_KEYWORD6 9 -#define SCE_USER_STYLE_KEYWORD7 10 -#define SCE_USER_STYLE_KEYWORD8 11 -#define SCE_USER_STYLE_OPERATOR 12 -#define SCE_USER_STYLE_FOLDER_IN_CODE1 13 -#define SCE_USER_STYLE_FOLDER_IN_CODE2 14 -#define SCE_USER_STYLE_FOLDER_IN_COMMENT 15 -#define SCE_USER_STYLE_DELIMITER1 16 -#define SCE_USER_STYLE_DELIMITER2 17 -#define SCE_USER_STYLE_DELIMITER3 18 -#define SCE_USER_STYLE_DELIMITER4 19 -#define SCE_USER_STYLE_DELIMITER5 20 -#define SCE_USER_STYLE_DELIMITER6 21 -#define SCE_USER_STYLE_DELIMITER7 22 -#define SCE_USER_STYLE_DELIMITER8 23 -#define SCE_USER_STYLE_IDENTIFIER 24 -#define SCE_USER_STYLE_TOTAL_STYLES SCE_USER_STYLE_IDENTIFIER -#define SCE_USER_STYLE_MAPPER_TOTAL 17 - -#define SCE_USER_MASK_NESTING_NONE 0 -#define SCE_USER_MASK_NESTING_DELIMITER1 0x1 -#define SCE_USER_MASK_NESTING_DELIMITER2 0x2 -#define SCE_USER_MASK_NESTING_DELIMITER3 0x4 -#define SCE_USER_MASK_NESTING_DELIMITER4 0x8 -#define SCE_USER_MASK_NESTING_DELIMITER5 0x10 -#define SCE_USER_MASK_NESTING_DELIMITER6 0x20 -#define SCE_USER_MASK_NESTING_DELIMITER7 0x40 -#define SCE_USER_MASK_NESTING_DELIMITER8 0x80 -#define SCE_USER_MASK_NESTING_COMMENT 0x100 -#define SCE_USER_MASK_NESTING_COMMENT_LINE 0x200 -#define SCE_USER_MASK_NESTING_KEYWORD1 0x400 -#define SCE_USER_MASK_NESTING_KEYWORD2 0x800 -#define SCE_USER_MASK_NESTING_KEYWORD3 0x1000 -#define SCE_USER_MASK_NESTING_KEYWORD4 0x2000 -#define SCE_USER_MASK_NESTING_KEYWORD5 0x4000 -#define SCE_USER_MASK_NESTING_KEYWORD6 0x8000 -#define SCE_USER_MASK_NESTING_KEYWORD7 0x10000 -#define SCE_USER_MASK_NESTING_KEYWORD8 0x20000 -#define SCE_USER_MASK_NESTING_FOLDERS_IN_CODE2_OPEN 0x40000 -#define SCE_USER_MASK_NESTING_FOLDERS_IN_CODE2_MIDDLE 0x80000 -#define SCE_USER_MASK_NESTING_FOLDERS_IN_CODE2_CLOSE 0x100000 -#define SCE_USER_MASK_NESTING_FOLDERS_IN_COMMENT_OPEN 0x200000 -#define SCE_USER_MASK_NESTING_FOLDERS_IN_COMMENT_MIDDLE 0x400000 -#define SCE_USER_MASK_NESTING_FOLDERS_IN_COMMENT_CLOSE 0x800000 -#define SCE_USER_MASK_NESTING_OPERATORS1 0x1000000 -#define SCE_USER_MASK_NESTING_OPERATORS2 0x2000000 -#define SCE_USER_MASK_NESTING_NUMBERS 0x4000000 - -#define SCE_TXT_DEFAULT 0 -#define SCE_TXT_ASCII 1 -#define SCE_TXT_KEYWORD 2 -#define SCE_TXT_IDENTIFIER 4 - -#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_SEARCHRESULT_DEFAULT 0 -#define SCE_SEARCHRESULT_SEARCH_HEADER 1 -#define SCE_SEARCHRESULT_FILE_HEADER 2 -#define SCE_SEARCHRESULT_LINE_NUMBER 3 -#define SCE_SEARCHRESULT_WORD2SEARCH 4 -//#define SCE_SEARCHRESULT_HIGHLIGHT_LINE 5 // (no use anymore) -#define SCE_SEARCHRESULT_CURRENT_LINE 6 -#define SCE_OBJC_DIRECTIVE 20 -#define SCE_OBJC_QUALIFIER 21 - -#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_GCC_EXCERPT 25 -#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 -#define SCE_NIM_DEFAULT 0 -#define SCE_NIM_COMMENT 1 -#define SCE_NIM_COMMENTDOC 2 -#define SCE_NIM_COMMENTLINE 3 -#define SCE_NIM_COMMENTLINEDOC 4 -#define SCE_NIM_NUMBER 5 -#define SCE_NIM_STRING 6 -#define SCE_NIM_CHARACTER 7 -#define SCE_NIM_WORD 8 -#define SCE_NIM_TRIPLE 9 -#define SCE_NIM_TRIPLEDOUBLE 10 -#define SCE_NIM_BACKTICKS 11 -#define SCE_NIM_FUNCNAME 12 -#define SCE_NIM_STRINGEOL 13 -#define SCE_NIM_NUMERROR 14 -#define SCE_NIM_OPERATOR 15 -#define SCE_NIM_IDENTIFIER 16 -#define SCE_CIL_DEFAULT 0 -#define SCE_CIL_COMMENT 1 -#define SCE_CIL_COMMENTLINE 2 -#define SCE_CIL_WORD 3 -#define SCE_CIL_WORD2 4 -#define SCE_CIL_WORD3 5 -#define SCE_CIL_STRING 6 -#define SCE_CIL_LABEL 7 -#define SCE_CIL_OPERATOR 8 -#define SCE_CIL_IDENTIFIER 9 -#define SCE_CIL_STRINGEOL 10 -#define SCE_X12_DEFAULT 0 -#define SCE_X12_BAD 1 -#define SCE_X12_ENVELOPE 2 -#define SCE_X12_FUNCTIONGROUP 3 -#define SCE_X12_TRANSACTIONSET 4 -#define SCE_X12_SEGMENTHEADER 5 -#define SCE_X12_SEGMENTEND 6 -#define SCE_X12_SEP_ELEMENT 7 -#define SCE_X12_SEP_SUBELEMENT 8 -#define SCE_DF_DEFAULT 0 -#define SCE_DF_IDENTIFIER 1 -#define SCE_DF_METATAG 2 -#define SCE_DF_IMAGE 3 -#define SCE_DF_COMMENTLINE 4 -#define SCE_DF_PREPROCESSOR 5 -#define SCE_DF_PREPROCESSOR2 6 -#define SCE_DF_NUMBER 7 -#define SCE_DF_HEXNUMBER 8 -#define SCE_DF_WORD 9 -#define SCE_DF_STRING 10 -#define SCE_DF_STRINGEOL 11 -#define SCE_DF_SCOPEWORD 12 -#define SCE_DF_OPERATOR 13 -#define SCE_DF_ICODE 14 -#define SCE_HOLLYWOOD_DEFAULT 0 -#define SCE_HOLLYWOOD_COMMENT 1 -#define SCE_HOLLYWOOD_COMMENTBLOCK 2 -#define SCE_HOLLYWOOD_NUMBER 3 -#define SCE_HOLLYWOOD_KEYWORD 4 -#define SCE_HOLLYWOOD_STDAPI 5 -#define SCE_HOLLYWOOD_PLUGINAPI 6 -#define SCE_HOLLYWOOD_PLUGINMETHOD 7 -#define SCE_HOLLYWOOD_STRING 8 -#define SCE_HOLLYWOOD_STRINGBLOCK 9 -#define SCE_HOLLYWOOD_PREPROCESSOR 10 -#define SCE_HOLLYWOOD_OPERATOR 11 -#define SCE_HOLLYWOOD_IDENTIFIER 12 -#define SCE_HOLLYWOOD_CONSTANT 13 -#define SCE_HOLLYWOOD_HEXNUMBER 14 -#define SCE_RAKU_DEFAULT 0 -#define SCE_RAKU_ERROR 1 -#define SCE_RAKU_COMMENTLINE 2 -#define SCE_RAKU_COMMENTEMBED 3 -#define SCE_RAKU_POD 4 -#define SCE_RAKU_CHARACTER 5 -#define SCE_RAKU_HEREDOC_Q 6 -#define SCE_RAKU_HEREDOC_QQ 7 -#define SCE_RAKU_STRING 8 -#define SCE_RAKU_STRING_Q 9 -#define SCE_RAKU_STRING_QQ 10 -#define SCE_RAKU_STRING_Q_LANG 11 -#define SCE_RAKU_STRING_VAR 12 -#define SCE_RAKU_REGEX 13 -#define SCE_RAKU_REGEX_VAR 14 -#define SCE_RAKU_ADVERB 15 -#define SCE_RAKU_NUMBER 16 -#define SCE_RAKU_PREPROCESSOR 17 -#define SCE_RAKU_OPERATOR 18 -#define SCE_RAKU_WORD 19 -#define SCE_RAKU_FUNCTION 20 -#define SCE_RAKU_IDENTIFIER 21 -#define SCE_RAKU_TYPEDEF 22 -#define SCE_RAKU_MU 23 -#define SCE_RAKU_POSITIONAL 24 -#define SCE_RAKU_ASSOCIATIVE 25 -#define SCE_RAKU_CALLABLE 26 -#define SCE_RAKU_GRAMMAR 27 -#define SCE_RAKU_CLASS 28 -/* --Autogenerated -- end of section automatically generated from Scintilla.iface */ - -#endif + + +//For All lexer +#define SCE_UNIVERSAL_FOUND_STYLE 31 +#define SCE_UNIVERSAL_FOUND_STYLE_SMART 29 +#define SCE_UNIVERSAL_FOUND_STYLE_INC 28 +#define SCE_UNIVERSAL_TAGMATCH 27 +#define SCE_UNIVERSAL_TAGATTR 26 +#define SCE_UNIVERSAL_FOUND_STYLE_EXT1 25 +#define SCE_UNIVERSAL_FOUND_STYLE_EXT2 24 +#define SCE_UNIVERSAL_FOUND_STYLE_EXT3 23 +#define SCE_UNIVERSAL_FOUND_STYLE_EXT4 22 +#define SCE_UNIVERSAL_FOUND_STYLE_EXT5 21 + +#define SCE_UDL_VERSION_MAJOR 2 +#define SCE_UDL_VERSION_MINOR 1 +#define SCE_UDL_VERSION_BUILD 0 +#define SCE_UDL_VERSION_REVISION 12 + +#define SCE_USER_KWLIST_COMMENTS 0 +#define SCE_USER_KWLIST_NUMBER_PREFIX1 1 +#define SCE_USER_KWLIST_NUMBER_PREFIX2 2 +#define SCE_USER_KWLIST_NUMBER_EXTRAS1 3 +#define SCE_USER_KWLIST_NUMBER_EXTRAS2 4 +#define SCE_USER_KWLIST_NUMBER_SUFFIX1 5 +#define SCE_USER_KWLIST_NUMBER_SUFFIX2 6 +#define SCE_USER_KWLIST_NUMBER_RANGE 7 +#define SCE_USER_KWLIST_OPERATORS1 8 +#define SCE_USER_KWLIST_OPERATORS2 9 +#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN 10 +#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE 11 +#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE 12 +#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN 13 +#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE 14 +#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE 15 +#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN 16 +#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE 17 +#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE 18 +#define SCE_USER_KWLIST_KEYWORDS1 19 +#define SCE_USER_KWLIST_KEYWORDS2 20 +#define SCE_USER_KWLIST_KEYWORDS3 21 +#define SCE_USER_KWLIST_KEYWORDS4 22 +#define SCE_USER_KWLIST_KEYWORDS5 23 +#define SCE_USER_KWLIST_KEYWORDS6 24 +#define SCE_USER_KWLIST_KEYWORDS7 25 +#define SCE_USER_KWLIST_KEYWORDS8 26 +#define SCE_USER_KWLIST_DELIMITERS 27 +#define SCE_USER_KWLIST_TOTAL 28 // must always be <= KEYWORDSET_MAX + +#define SCE_USER_TOTAL_DELIMITERS 8 +#define SCE_USER_TOTAL_KEYWORD_GROUPS 8 +#define SCE_USER_TOTAL_FOLDERS 6 + +#define SCE_USER_STYLE_DEFAULT 0 +#define SCE_USER_STYLE_COMMENT 1 +#define SCE_USER_STYLE_COMMENTLINE 2 +#define SCE_USER_STYLE_NUMBER 3 +#define SCE_USER_STYLE_KEYWORD1 4 +#define SCE_USER_STYLE_KEYWORD2 5 +#define SCE_USER_STYLE_KEYWORD3 6 +#define SCE_USER_STYLE_KEYWORD4 7 +#define SCE_USER_STYLE_KEYWORD5 8 +#define SCE_USER_STYLE_KEYWORD6 9 +#define SCE_USER_STYLE_KEYWORD7 10 +#define SCE_USER_STYLE_KEYWORD8 11 +#define SCE_USER_STYLE_OPERATOR 12 +#define SCE_USER_STYLE_FOLDER_IN_CODE1 13 +#define SCE_USER_STYLE_FOLDER_IN_CODE2 14 +#define SCE_USER_STYLE_FOLDER_IN_COMMENT 15 +#define SCE_USER_STYLE_DELIMITER1 16 +#define SCE_USER_STYLE_DELIMITER2 17 +#define SCE_USER_STYLE_DELIMITER3 18 +#define SCE_USER_STYLE_DELIMITER4 19 +#define SCE_USER_STYLE_DELIMITER5 20 +#define SCE_USER_STYLE_DELIMITER6 21 +#define SCE_USER_STYLE_DELIMITER7 22 +#define SCE_USER_STYLE_DELIMITER8 23 +#define SCE_USER_STYLE_IDENTIFIER 24 +#define SCE_USER_STYLE_TOTAL_STYLES SCE_USER_STYLE_IDENTIFIER +#define SCE_USER_STYLE_MAPPER_TOTAL 17 + +#define SCE_USER_MASK_NESTING_NONE 0 +#define SCE_USER_MASK_NESTING_DELIMITER1 0x1 +#define SCE_USER_MASK_NESTING_DELIMITER2 0x2 +#define SCE_USER_MASK_NESTING_DELIMITER3 0x4 +#define SCE_USER_MASK_NESTING_DELIMITER4 0x8 +#define SCE_USER_MASK_NESTING_DELIMITER5 0x10 +#define SCE_USER_MASK_NESTING_DELIMITER6 0x20 +#define SCE_USER_MASK_NESTING_DELIMITER7 0x40 +#define SCE_USER_MASK_NESTING_DELIMITER8 0x80 +#define SCE_USER_MASK_NESTING_COMMENT 0x100 +#define SCE_USER_MASK_NESTING_COMMENT_LINE 0x200 +#define SCE_USER_MASK_NESTING_KEYWORD1 0x400 +#define SCE_USER_MASK_NESTING_KEYWORD2 0x800 +#define SCE_USER_MASK_NESTING_KEYWORD3 0x1000 +#define SCE_USER_MASK_NESTING_KEYWORD4 0x2000 +#define SCE_USER_MASK_NESTING_KEYWORD5 0x4000 +#define SCE_USER_MASK_NESTING_KEYWORD6 0x8000 +#define SCE_USER_MASK_NESTING_KEYWORD7 0x10000 +#define SCE_USER_MASK_NESTING_KEYWORD8 0x20000 +#define SCE_USER_MASK_NESTING_FOLDERS_IN_CODE2_OPEN 0x40000 +#define SCE_USER_MASK_NESTING_FOLDERS_IN_CODE2_MIDDLE 0x80000 +#define SCE_USER_MASK_NESTING_FOLDERS_IN_CODE2_CLOSE 0x100000 +#define SCE_USER_MASK_NESTING_FOLDERS_IN_COMMENT_OPEN 0x200000 +#define SCE_USER_MASK_NESTING_FOLDERS_IN_COMMENT_MIDDLE 0x400000 +#define SCE_USER_MASK_NESTING_FOLDERS_IN_COMMENT_CLOSE 0x800000 +#define SCE_USER_MASK_NESTING_OPERATORS1 0x1000000 +#define SCE_USER_MASK_NESTING_OPERATORS2 0x2000000 +#define SCE_USER_MASK_NESTING_NUMBERS 0x4000000 + +#define SCE_TXT_DEFAULT 0 +#define SCE_TXT_ASCII 1 +#define SCE_TXT_KEYWORD 2 +#define SCE_TXT_IDENTIFIER 4 + +#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_SEARCHRESULT_DEFAULT 0 +#define SCE_SEARCHRESULT_SEARCH_HEADER 1 +#define SCE_SEARCHRESULT_FILE_HEADER 2 +#define SCE_SEARCHRESULT_LINE_NUMBER 3 +#define SCE_SEARCHRESULT_WORD2SEARCH 4 +//#define SCE_SEARCHRESULT_HIGHLIGHT_LINE 5 // (no use anymore) +#define SCE_SEARCHRESULT_CURRENT_LINE 6 +#define SCE_OBJC_DIRECTIVE 20 +#define SCE_OBJC_QUALIFIER 21 + +#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_GCC_EXCERPT 25 +#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 +#define SCE_NIM_DEFAULT 0 +#define SCE_NIM_COMMENT 1 +#define SCE_NIM_COMMENTDOC 2 +#define SCE_NIM_COMMENTLINE 3 +#define SCE_NIM_COMMENTLINEDOC 4 +#define SCE_NIM_NUMBER 5 +#define SCE_NIM_STRING 6 +#define SCE_NIM_CHARACTER 7 +#define SCE_NIM_WORD 8 +#define SCE_NIM_TRIPLE 9 +#define SCE_NIM_TRIPLEDOUBLE 10 +#define SCE_NIM_BACKTICKS 11 +#define SCE_NIM_FUNCNAME 12 +#define SCE_NIM_STRINGEOL 13 +#define SCE_NIM_NUMERROR 14 +#define SCE_NIM_OPERATOR 15 +#define SCE_NIM_IDENTIFIER 16 +#define SCE_CIL_DEFAULT 0 +#define SCE_CIL_COMMENT 1 +#define SCE_CIL_COMMENTLINE 2 +#define SCE_CIL_WORD 3 +#define SCE_CIL_WORD2 4 +#define SCE_CIL_WORD3 5 +#define SCE_CIL_STRING 6 +#define SCE_CIL_LABEL 7 +#define SCE_CIL_OPERATOR 8 +#define SCE_CIL_IDENTIFIER 9 +#define SCE_CIL_STRINGEOL 10 +#define SCE_X12_DEFAULT 0 +#define SCE_X12_BAD 1 +#define SCE_X12_ENVELOPE 2 +#define SCE_X12_FUNCTIONGROUP 3 +#define SCE_X12_TRANSACTIONSET 4 +#define SCE_X12_SEGMENTHEADER 5 +#define SCE_X12_SEGMENTEND 6 +#define SCE_X12_SEP_ELEMENT 7 +#define SCE_X12_SEP_SUBELEMENT 8 +#define SCE_DF_DEFAULT 0 +#define SCE_DF_IDENTIFIER 1 +#define SCE_DF_METATAG 2 +#define SCE_DF_IMAGE 3 +#define SCE_DF_COMMENTLINE 4 +#define SCE_DF_PREPROCESSOR 5 +#define SCE_DF_PREPROCESSOR2 6 +#define SCE_DF_NUMBER 7 +#define SCE_DF_HEXNUMBER 8 +#define SCE_DF_WORD 9 +#define SCE_DF_STRING 10 +#define SCE_DF_STRINGEOL 11 +#define SCE_DF_SCOPEWORD 12 +#define SCE_DF_OPERATOR 13 +#define SCE_DF_ICODE 14 +#define SCE_HOLLYWOOD_DEFAULT 0 +#define SCE_HOLLYWOOD_COMMENT 1 +#define SCE_HOLLYWOOD_COMMENTBLOCK 2 +#define SCE_HOLLYWOOD_NUMBER 3 +#define SCE_HOLLYWOOD_KEYWORD 4 +#define SCE_HOLLYWOOD_STDAPI 5 +#define SCE_HOLLYWOOD_PLUGINAPI 6 +#define SCE_HOLLYWOOD_PLUGINMETHOD 7 +#define SCE_HOLLYWOOD_STRING 8 +#define SCE_HOLLYWOOD_STRINGBLOCK 9 +#define SCE_HOLLYWOOD_PREPROCESSOR 10 +#define SCE_HOLLYWOOD_OPERATOR 11 +#define SCE_HOLLYWOOD_IDENTIFIER 12 +#define SCE_HOLLYWOOD_CONSTANT 13 +#define SCE_HOLLYWOOD_HEXNUMBER 14 +#define SCE_RAKU_DEFAULT 0 +#define SCE_RAKU_ERROR 1 +#define SCE_RAKU_COMMENTLINE 2 +#define SCE_RAKU_COMMENTEMBED 3 +#define SCE_RAKU_POD 4 +#define SCE_RAKU_CHARACTER 5 +#define SCE_RAKU_HEREDOC_Q 6 +#define SCE_RAKU_HEREDOC_QQ 7 +#define SCE_RAKU_STRING 8 +#define SCE_RAKU_STRING_Q 9 +#define SCE_RAKU_STRING_QQ 10 +#define SCE_RAKU_STRING_Q_LANG 11 +#define SCE_RAKU_STRING_VAR 12 +#define SCE_RAKU_REGEX 13 +#define SCE_RAKU_REGEX_VAR 14 +#define SCE_RAKU_ADVERB 15 +#define SCE_RAKU_NUMBER 16 +#define SCE_RAKU_PREPROCESSOR 17 +#define SCE_RAKU_OPERATOR 18 +#define SCE_RAKU_WORD 19 +#define SCE_RAKU_FUNCTION 20 +#define SCE_RAKU_IDENTIFIER 21 +#define SCE_RAKU_TYPEDEF 22 +#define SCE_RAKU_MU 23 +#define SCE_RAKU_POSITIONAL 24 +#define SCE_RAKU_ASSOCIATIVE 25 +#define SCE_RAKU_CALLABLE 26 +#define SCE_RAKU_GRAMMAR 27 +#define SCE_RAKU_CLASS 28 +/* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + +#endif diff --git a/src/qscint/scintilla/include/Scintilla.h b/src/qscint/scintilla/include/Scintilla.h index c7ca77b..f06bfb3 100755 --- a/src/qscint/scintilla/include/Scintilla.h +++ b/src/qscint/scintilla/include/Scintilla.h @@ -989,6 +989,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_CLEARREPRESENTATION 2667 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 +#define SCI_GETRECORSTATUS 3003 #define SCI_SETLEXER 4001 #define SCI_GETLEXER 4002 #define SCI_COLOURISE 4003 @@ -1093,7 +1094,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCN_DOUBLECLICK 2006 #define SCN_UPDATEUI 2007 #define SCN_MODIFIED 2008 -#define SCN_MACRORECORD 2009 +#define SCN_MACRORECORD_ID 2009 #define SCN_MARGINCLICK 2010 #define SCN_NEEDSHOWN 2011 #define SCN_PAINTED 2013 diff --git a/src/qscint/scintilla/lexers/LexCPP.cpp b/src/qscint/scintilla/lexers/LexCPP.cpp index 307556e..e99bca6 100755 --- a/src/qscint/scintilla/lexers/LexCPP.cpp +++ b/src/qscint/scintilla/lexers/LexCPP.cpp @@ -1,4 +1,4 @@ -// Scintilla source code edit control +// 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" @@ -6,18 +6,16 @@ // 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 #include #include +#include #include "ILexer.h" #include "Scintilla.h" @@ -39,7 +37,7 @@ using namespace Scintilla; namespace { // Use an unnamed namespace to protect the functions and classes from name conflicts -bool IsSpaceEquiv(int state) noexcept { +constexpr 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) || @@ -86,7 +84,7 @@ bool followsReturnKeyword(const StyleContext &sc, LexAccessor &styler) { return !*s; } -bool IsSpaceOrTab(int ch) noexcept { +constexpr bool IsSpaceOrTab(int ch) noexcept { return ch == ' ' || ch == '\t'; } @@ -143,10 +141,10 @@ BracketPair FindBracketPair(std::vector &tokens) { 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; + constexpr Sci_PositionU lengthMarker = 50; char marker[lengthMarker+1] = ""; - const Sci_Position currPos = static_cast(sc.currentPos); - int i = 0; + const Sci_PositionU currPos = sc.currentPos; + Sci_PositionU i = 0; while (i < lengthMarker) { const char ch = styler.SafeGetCharAt(currPos + i); if (IsASpace(ch) || isoperator(ch)) { @@ -165,18 +163,14 @@ void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, } } -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"); - } +class EscapeSequence { + const CharacterSet setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef"); + const CharacterSet setOctDigits = CharacterSet(CharacterSet::setNone, "01234567"); + const CharacterSet setNoneNumeric; + const CharacterSet *escapeSetValid = nullptr; + int digitsLeft = 0; +public: + EscapeSequence() = default; void resetEscapeState(int nextChar) { digitsLeft = 0; escapeSetValid = &setNoneNumeric; @@ -197,26 +191,39 @@ struct EscapeSequence { bool atEscapeEnd(int currChar) const { return (digitsLeft <= 0) || !escapeSetValid->Contains(currChar); } + void consumeDigit() noexcept { + digitsLeft--; + } }; std::string GetRestOfLine(LexAccessor &styler, Sci_Position start, bool allowSpace) { std::string restOfLine; - Sci_Position i =0; + Sci_Position line = styler.GetLine(start); + Sci_Position pos = start; + Sci_Position endLine = styler.LineEnd(line); 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'); + while (pos < endLine) { + if (ch == '\\' && ((pos + 1) == endLine)) { + // Continuation line + line++; + pos = styler.LineStart(line); + endLine = styler.LineEnd(line); + ch = styler.SafeGetCharAt(pos, '\n'); + } else { + const char chNext = styler.SafeGetCharAt(pos + 1, '\n'); if (ch == '/' && (chNext == '/' || chNext == '*')) break; - if (allowSpace || (ch != ' ')) + if (allowSpace || (ch != ' ')) { restOfLine += ch; - i++; + } + pos++; ch = chNext; } + } return restOfLine; } -bool IsStreamCommentStyle(int style) noexcept { +constexpr bool IsStreamCommentStyle(int style) noexcept { return style == SCE_C_COMMENT || style == SCE_C_COMMENTDOC || style == SCE_C_COMMENTDOCKEYWORD || @@ -234,12 +241,24 @@ struct PPDefinition { } }; +constexpr int inactiveFlag = 0x40; + class LinePPState { - int state; - int ifTaken; - int level; + // Track the state of preprocessor conditionals to allow showing active and inactive + // code in different styles. + // Only works up to 31 levels of conditional nesting. + + // state is a bit mask with 1 bit per level + // bit is 1 for level if section inactive, so any bits set = inactive style + int state = 0; + // ifTaken is a bit mask with 1 bit per level + // bit is 1 for level if some branch at this level has been taken + int ifTaken = 0; + // level is the nesting level of #if constructs + int level = -1; + static const int maximumNestingLevel = 31; bool ValidLevel() const noexcept { - return level >= 0 && level < 32; + return level >= 0 && level < maximumNestingLevel; } int maskLevel() const noexcept { if (level >= 0) { @@ -249,11 +268,17 @@ class LinePPState { } } public: - LinePPState() : state(0), ifTaken(0), level(-1) { + LinePPState() noexcept { + } + bool IsActive() const noexcept { + return state == 0; } bool IsInactive() const noexcept { return state != 0; } + int ActiveState() const noexcept { + return state ? inactiveFlag : 0; + } bool CurrentIfTaken() const noexcept { return (ifTaken & maskLevel()) != 0; } @@ -289,7 +314,7 @@ public: class PPStates { std::vector vlls; public: - LinePPState ForLine(Sci_Position line) const { + LinePPState ForLine(Sci_Position line) const noexcept { if ((line > 0) && (vlls.size() > static_cast(line))) { return vlls[line]; } else { @@ -359,7 +384,7 @@ const char *const cppWordLists[] = { "Global classes and typedefs", "Preprocessor definitions", "Task marker and error marker keywords", - 0, + nullptr, }; struct OptionSetCPP : public OptionSet { @@ -468,13 +493,17 @@ LexicalClass lexicalClasses[] = { 27, "SCE_C_ESCAPESEQUENCE", "literal string escapesequence", "Escape sequence", }; +const int sizeLexicalClasses = static_cast(ELEMENTS(lexicalClasses)); + } +enum { lvRelease4 = 2, lvRelease5 = 3 }; class LexerCPP : public ILexerWithMetaData { bool caseSensitive; CharacterSet setWord; CharacterSet setNegationOp; - CharacterSet setArithmethicOp; + CharacterSet setAddOp; + CharacterSet setMultOp; CharacterSet setRelOp; CharacterSet setLogicalOp; CharacterSet setWordStart; @@ -489,7 +518,8 @@ class LexerCPP : public ILexerWithMetaData { struct SymbolValue { std::string value; std::string arguments; - SymbolValue(const std::string &value_="", const std::string &arguments_="") : value(value_), arguments(arguments_) { + SymbolValue() noexcept = default; + SymbolValue(const std::string &value_, const std::string &arguments_) : value(value_), arguments(arguments_) { } SymbolValue &operator = (const std::string &value_) { value = value_; @@ -506,7 +536,6 @@ class LexerCPP : public ILexerWithMetaData { OptionSetCPP osCPP; EscapeSequence escapeSeq; SparseState rawStringTerminators; - enum { activeFlag = 0x40 }; enum { ssIdentifier, ssDocKeyword }; SubStyles subStyles; std::string returnBuffer; @@ -515,18 +544,24 @@ public: caseSensitive(caseSensitive_), setWord(CharacterSet::setAlphaNum, "._", 0x80, true), setNegationOp(CharacterSet::setNone, "!"), - setArithmethicOp(CharacterSet::setNone, "+-/*%"), + setAddOp(CharacterSet::setNone, "+-"), + setMultOp(CharacterSet::setNone, "*/%"), setRelOp(CharacterSet::setNone, "=!<>"), setLogicalOp(CharacterSet::setNone, "|&"), - subStyles(styleSubable, 0x80, 0x40, activeFlag) { + subStyles(styleSubable, 0x80, 0x40, inactiveFlag) { } + // Deleted so LexerCPP objects can not be copied. + LexerCPP(const LexerCPP &) = delete; + LexerCPP(LexerCPP &&) = delete; + void operator=(const LexerCPP &) = delete; + void operator=(LexerCPP &&) = delete; virtual ~LexerCPP() { } - void SCI_METHOD Release() override { + void SCI_METHOD Release() noexcept override { delete this; } - int SCI_METHOD Version() const override { - return lvMetaData; + int SCI_METHOD Version() const noexcept override { + return lvRelease4; } const char * SCI_METHOD PropertyNames() override { return osCPP.PropertyNames(); @@ -545,11 +580,11 @@ public: 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; + void * SCI_METHOD PrivateCall(int, void *) noexcept override { + return nullptr; } - int SCI_METHOD LineEndTypesSupported() override { + int SCI_METHOD LineEndTypesSupported() noexcept override { return SC_LINE_END_TYPE_UNICODE; } @@ -564,10 +599,10 @@ public: } int SCI_METHOD StyleFromSubStyle(int subStyle) override { const int styleBase = subStyles.BaseStyle(MaskActive(subStyle)); - const int active = subStyle & activeFlag; - return styleBase | active; + const int inactive = subStyle & inactiveFlag; + return styleBase | inactive; } - int SCI_METHOD PrimaryStyleFromStyle(int style) override { + int SCI_METHOD PrimaryStyleFromStyle(int style) noexcept override { return MaskActive(style); } void SCI_METHOD FreeSubStyles() override { @@ -576,21 +611,21 @@ public: void SCI_METHOD SetIdentifiers(int style, const char *identifiers) override { subStyles.SetIdentifiers(style, identifiers); } - int SCI_METHOD DistanceToSecondaryStyles() override { - return activeFlag; + int SCI_METHOD DistanceToSecondaryStyles() noexcept override { + return inactiveFlag; } - const char * SCI_METHOD GetSubStyleBases() override { + const char * SCI_METHOD GetSubStyleBases() noexcept override { return styleSubable; } int SCI_METHOD NamedStyles() override { return std::max(subStyles.LastAllocated() + 1, - static_cast(ELEMENTS(lexicalClasses))) + - activeFlag; + sizeLexicalClasses) + + inactiveFlag; } const char * SCI_METHOD NameOfStyle(int style) override { if (style >= NamedStyles()) return ""; - if (style < static_cast(ELEMENTS(lexicalClasses))) + if (style < sizeLexicalClasses) return lexicalClasses[style].name; // TODO: inactive and substyles return ""; @@ -603,23 +638,23 @@ public: if (firstSubStyle >= 0) { const int lastSubStyle = subStyles.LastAllocated(); if (((style >= firstSubStyle) && (style <= (lastSubStyle))) || - ((style >= firstSubStyle + activeFlag) && (style <= (lastSubStyle + activeFlag)))) { + ((style >= firstSubStyle + inactiveFlag) && (style <= (lastSubStyle + inactiveFlag)))) { int styleActive = style; if (style > lastSubStyle) { returnBuffer = "inactive "; - styleActive -= activeFlag; + styleActive -= inactiveFlag; } const int styleMain = StyleFromSubStyle(styleActive); returnBuffer += lexicalClasses[styleMain].tags; return returnBuffer.c_str(); } } - if (style < static_cast(ELEMENTS(lexicalClasses))) + if (style < sizeLexicalClasses) return lexicalClasses[style].tags; - if (style >= activeFlag) { + if (style >= inactiveFlag) { returnBuffer = "inactive "; - const int styleActive = style - activeFlag; - if (styleActive < static_cast(ELEMENTS(lexicalClasses))) + const int styleActive = style - inactiveFlag; + if (styleActive < sizeLexicalClasses) returnBuffer += lexicalClasses[styleActive].tags; else returnBuffer = ""; @@ -630,20 +665,29 @@ public: const char * SCI_METHOD DescriptionOfStyle(int style) override { if (style >= NamedStyles()) return ""; - if (style < static_cast(ELEMENTS(lexicalClasses))) + if (style < sizeLexicalClasses) return lexicalClasses[style].description; // TODO: inactive and substyles return ""; } + // ILexer5 methods + //const char * SCI_METHOD GetName() { + // return caseSensitive ? "cpp" : "cppnocase"; + //} + /*int SCI_METHOD GetIdentifier() { + return caseSensitive ? SCLEX_CPP : SCLEX_CPPNOCASE; + }*/ + //const char * SCI_METHOD PropertyGet(const char *key); + static ILexer *LexerFactoryCPP() { return new LexerCPP(true); } static ILexer *LexerFactoryCPPInsensitive() { return new LexerCPP(false); } - static int MaskActive(int style) noexcept { - return style & ~activeFlag; + constexpr static int MaskActive(int style) noexcept { + return style & ~inactiveFlag; } void EvaluateTokens(std::vector &tokens, const SymbolTable &preprocessorDefinitions); std::vector Tokenize(const std::string &expr) const; @@ -663,8 +707,12 @@ Sci_Position SCI_METHOD LexerCPP::PropertySet(const char *key, const char *val) return -1; } +//const char * SCI_METHOD LexerCPP::PropertyGet(const char *key) { +// return osCPP.PropertyGet(key); +//} + Sci_Position SCI_METHOD LexerCPP::WordListSet(int n, const char *wl) { - WordList *wordListN = 0; + WordList *wordListN = nullptr; switch (n) { case 0: wordListN = &keywords; @@ -784,7 +832,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i ppDefineHistory.clear(); std::vector::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(), - [lineCurrent](const PPDefinition &p) { return p.line >= lineCurrent; }); + [lineCurrent](const PPDefinition &p) noexcept { return p.line >= lineCurrent; }); if (itInvalid != ppDefineHistory.end()) { ppDefineHistory.erase(itInvalid, ppDefineHistory.end()); definitionsChanged = true; @@ -801,12 +849,12 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i std::string rawStringTerminator = rawStringTerminators.ValueAt(lineCurrent-1); SparseState rawSTNew(lineCurrent); - int activitySet = preproc.IsInactive() ? activeFlag : 0; + int activitySet = preproc.ActiveState(); const WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_C_IDENTIFIER); const WordClassifier &classifierDocKeyWords = subStyles.Classifier(SCE_C_COMMENTDOCKEYWORD); - Sci_Position lineEndNext = styler.LineEnd(lineCurrent); + Sci_PositionU lineEndNext = styler.LineEnd(lineCurrent); for (; sc.More();) { @@ -828,7 +876,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i isIncludePreprocessor = false; inRERange = false; if (preproc.IsInactive()) { - activitySet = activeFlag; + activitySet = inactiveFlag; sc.SetState(sc.state | activitySet); } } @@ -844,7 +892,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i // Handle line continuation generically. if (sc.ch == '\\') { - if (static_cast((sc.currentPos+1)) >= lineEndNext) { + if ((sc.currentPos+1) >= lineEndNext) { lineCurrent++; lineEndNext = styler.LineEnd(lineCurrent); vlls.Add(lineCurrent, preproc); @@ -938,7 +986,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i break; case SCE_C_PREPROCESSOR: if (options.stylingWithinPreprocessor) { - if (IsASpace(sc.ch)) { + if (IsASpace(sc.ch) || (sc.ch == '(')) { sc.SetState(SCE_C_DEFAULT|activitySet); } } else if (isStringInPreprocessor && (sc.Match('>') || sc.Match('\"') || sc.atLineEnd)) { @@ -1059,7 +1107,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } break; case SCE_C_ESCAPESEQUENCE: - escapeSeq.digitsLeft--; + escapeSeq.consumeDigit(); if (!escapeSeq.atEscapeEnd(sc.ch)) { break; } @@ -1111,12 +1159,12 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i case SCE_C_REGEX: if (sc.atLineStart) { sc.SetState(SCE_C_DEFAULT|activitySet); - } else if (! inRERange && sc.ch == '/') { + } else if (!inRERange && sc.ch == '/') { sc.Forward(); - while ((sc.ch < 0x80) && islower(sc.ch)) + while (IsLowerCase(sc.ch)) sc.Forward(); // gobble regex flags sc.SetState(SCE_C_DEFAULT|activitySet); - } else if (sc.ch == '\\' && (static_cast(sc.currentPos+1) < lineEndNext)) { + } else if (sc.ch == '\\' && ((sc.currentPos+1) < lineEndNext)) { // Gobble up the escaped character sc.Forward(); } else if (sc.ch == '[') { @@ -1253,6 +1301,8 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i isIncludePreprocessor = true; } else { if (options.trackPreprocessor) { + // If #if is nested too deeply (>31 levels) the active/inactive appearance + // will stop reflecting the code. if (sc.Match("ifdef") || sc.Match("ifndef")) { const bool isIfDef = sc.Match("ifdef"); const int startRest = isIfDef ? 5 : 6; @@ -1264,47 +1314,58 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); preproc.StartSection(ifGood); } else if (sc.Match("else")) { + // #else is shown as active if either preceding or following section is active + // as that means that it contributed to the result. if (!preproc.CurrentIfTaken()) { + // Inactive, may become active if parent scope active + assert(sc.state == (SCE_C_PREPROCESSOR|inactiveFlag)); preproc.InvertCurrentLevel(); - activitySet = preproc.IsInactive() ? activeFlag : 0; + activitySet = preproc.ActiveState(); + // If following is active then show "else" as active if (!activitySet) - sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); - } else if (!preproc.IsInactive()) { + sc.ChangeState(SCE_C_PREPROCESSOR); + } else if (preproc.IsActive()) { + // Active -> inactive + assert(sc.state == SCE_C_PREPROCESSOR); preproc.InvertCurrentLevel(); - activitySet = preproc.IsInactive() ? activeFlag : 0; - if (!activitySet) - sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + activitySet = preproc.ActiveState(); + // Continue to show "else" as active as it ends active section. } } else if (sc.Match("elif")) { // Ensure only one chosen out of #if .. #elif .. #elif .. #else .. #endif + // #elif is shown as active if either preceding or following section is active + // as that means that it contributed to the result. if (!preproc.CurrentIfTaken()) { + // Inactive, if expression true then may become active if parent scope active + assert(sc.state == (SCE_C_PREPROCESSOR|inactiveFlag)); // 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; + activitySet = preproc.ActiveState(); if (!activitySet) - sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + sc.ChangeState(SCE_C_PREPROCESSOR); } - } else if (!preproc.IsInactive()) { + } else if (preproc.IsActive()) { + // Active -> inactive + assert(sc.state == SCE_C_PREPROCESSOR); preproc.InvertCurrentLevel(); - activitySet = preproc.IsInactive() ? activeFlag : 0; - if (!activitySet) - sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + activitySet = preproc.ActiveState(); + // Continue to show "elif" as active as it ends active section. } } else if (sc.Match("endif")) { preproc.EndSection(); - activitySet = preproc.IsInactive() ? activeFlag : 0; + activitySet = preproc.ActiveState(); sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); } else if (sc.Match("define")) { - if (options.updatePreprocessor && !preproc.IsInactive()) { + if (options.updatePreprocessor && preproc.IsActive()) { 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]))) + while ((endName < restOfLine.length()) && setWord.Contains(restOfLine[endName])) endName++; std::string key = restOfLine.substr(startName, endName-startName); if ((endName < restOfLine.length()) && (restOfLine.at(endName) == '(')) { @@ -1336,7 +1397,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } } } else if (sc.Match("undef")) { - if (options.updatePreprocessor && !preproc.IsInactive()) { + if (options.updatePreprocessor && preproc.IsActive()) { const std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false); std::vector tokens = Tokenize(restOfLine); if (tokens.size() >= 1) { @@ -1526,11 +1587,11 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl } // Evaluate identifiers - const size_t maxIterations = 100; + constexpr 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]))) { + if (setWordStart.Contains(tokens[i][0])) { SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i]); if (it != preprocessorDefinitions.end()) { // Tokenize value @@ -1557,7 +1618,7 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl 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]))) { + if (setWordStart.Contains(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 @@ -1618,13 +1679,15 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl } // Evaluate expressions in precedence order - enum precedence { precArithmetic, precRelative, precLogical }; - for (int prec=precArithmetic; prec <= precLogical; prec++) { + enum precedence { precMult, precAdd, precRelative + , precLogical, /* end marker */ precLast }; + for (int prec = precMult; prec < precLast; prec++) { // Looking at 3 tokens at a time so end at 2 before end for (size_t k=0; (k+2) &tokens, const SymbolTabl 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); + tokens.insert(itInsert, std::to_string(result)); } else { k++; } @@ -1675,9 +1736,9 @@ std::vector LexerCPP::Tokenize(const std::string &expr) const { const char *cp = expr.c_str(); while (*cp) { std::string word; - if (setWord.Contains(static_cast(*cp))) { + if (setWord.Contains(*cp)) { // Identifiers and numbers - while (setWord.Contains(static_cast(*cp))) { + while (setWord.Contains(*cp)) { word += *cp; cp++; } @@ -1686,17 +1747,17 @@ std::vector LexerCPP::Tokenize(const std::string &expr) const { word += *cp; cp++; } - } else if (setRelOp.Contains(static_cast(*cp))) { + } else if (setRelOp.Contains(*cp)) { word += *cp; cp++; - if (setRelOp.Contains(static_cast(*cp))) { + if (setRelOp.Contains(*cp)) { word += *cp; cp++; } - } else if (setLogicalOp.Contains(static_cast(*cp))) { + } else if (setLogicalOp.Contains(*cp)) { word += *cp; cp++; - if (setLogicalOp.Contains(static_cast(*cp))) { + if (setLogicalOp.Contains(*cp)) { word += *cp; cp++; } diff --git a/src/qscint/scintilla/lexers/LexGCode.cpp b/src/qscint/scintilla/lexers/LexGCode.cpp new file mode 100755 index 0000000..6adc320 --- /dev/null +++ b/src/qscint/scintilla/lexers/LexGCode.cpp @@ -0,0 +1,429 @@ +#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 "CharacterCategory.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "SubStyles.h" +#include "DefaultLexer.h" +#include "LexAccessor.h" + +#include "UniConversion.h" + + +using namespace Scintilla; + +//const char styleSubable[] = { SCE_P_IDENTIFIER, 0 }; + +//Default = 0,// +//Ascii = 1,//Ӣ +//Keyword = 2, //ؼֻ֣TXTΪĸ + +static LexicalClass lexicalClasses[] = { + // Lexer Python SCLEX_PYTHON SCE_P_: + 0, "SCE_GCODE_DEFAULT", "default", "default", + 1, "SCE_GCODE_KEYWORD", "keyword", "keyword", + 2, "SCE_GCODE_KEYWORD1", "keyword", "keyword", + 3, "SCE_GCODE_COMMNET", "Comment", "Comment", + 4, "SCE_GCODE_POSITION", "Position", "Position", + 5, "SCE_GCODE_VELOCITY","velocity","velocity", + +}; + +enum LOG_STATUS { + SCE_GCODE_DEFAULT=0, + SCE_GCODE_KEYWORD, //ؼ + SCE_GCODE_KEYWORD1, //ؼ + SCE_GCODE_COMMNET, // + SCE_GCODE_POSITION_X, //λ X Y Z + SCE_GCODE_POSITION_Y, //λ X Y Z + SCE_GCODE_POSITION_Z, //λ X Y Z + SCE_GCODE_OFFSET,//I J K ƫ + SCE_GCODE_VELOCITY,//ٶ F + SCE_GCODE_TIMES,// P + SCE_GCODE_IDENTIFIER, + SCE_GCODE_IDENTIFIER_KEYWORD, + SCE_GCODE_IDENTIFIER_KEYWORD1, + SCE_GCODE_IDENTIFIER_POSITION_X, + SCE_GCODE_IDENTIFIER_POSITION_Y, + SCE_GCODE_IDENTIFIER_POSITION_Z, + SCE_GCODE_IDENTIFIER_OFFSET, + SCE_GCODE_IDENTIFIER_VELOCITY, + SCE_GCODE_IDENTIFIER_TIMES, + SCE_GCODE_IDENTIFIER_COMMENT, +}; + +// Options used for LexerPython +struct OptionsTxt { + bool num; + bool data; + bool keyword; + + OptionsTxt() { + num = true; + data = true; + keyword = true; + } + +}; + +//ȡУȡ1024ַ +static std::string GetLineContents(LexAccessor& styler, Sci_Position start, const int len = 1024) { + std::string lineContent; + Sci_Position i = 0; + char ch = styler.SafeGetCharAt(start, '\n'); + const Sci_Position endLine = styler.LineEnd(styler.GetLine(start)); + while (((start + i) < endLine) && (i < len)) { + const char chNext = styler.SafeGetCharAt(start + i + 1, '\n'); + lineContent += ch; + i++; + ch = chNext; + } + return lineContent; +} + +struct OptionSetTxt : public OptionSet { + OptionSetTxt() { + DefineProperty("lexer.log.num", &OptionsTxt::num, + "text Unicode string"); + + DefineProperty("lexer.txt.keyword", &OptionsTxt::keyword, + "text keyword"); + } +}; + +class LexGCode :public DefaultLexer +{ + WordList keywords; + WordList keywords1; + OptionsTxt options; + OptionSetTxt osTxt; + CharacterSet setWord; + CharacterSet setWordStart; +public: + explicit LexGCode() : + DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)), + setWord(CharacterSet::setDigits, "GMXYZPIJKF-", 0x80, true),//ĸ֡»ߡ. ʵַ + setWordStart(CharacterSet::setNone, "GMXYZPIJKF", 0x80, true) + { + + } + virtual ~LexGCode() {} + + void SCI_METHOD Release() override { + delete this; + } + int SCI_METHOD Version() const override { + return lvSubStyles; + } + const char *SCI_METHOD PropertyNames() override { + return osTxt.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osTxt.PropertyType(name); + } + const char *SCI_METHOD DescribeProperty(const char *name) override { + return osTxt.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + + const char *SCI_METHOD DescribeWordListSets() override { + return ""; + } + 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 PrimaryStyleFromStyle(int style) override { + return style; + } + + int SCI_METHOD DistanceToSecondaryStyles() override { + return 0; + } + + static ILexer * LexerFactoryGCode() { + return new LexGCode(); + } +}; + +Sci_Position SCI_METHOD LexGCode::PropertySet(const char *key, const char *val) { + if (osTxt.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexGCode::WordListSet(int n, const char *wl) { + + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywords; + break; + case 1: + wordListN = &keywords1; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +const int indicatorWhitespace = 1; + +inline bool IsAAsciiChar(int ch) { + return (ch < 0x80); +} + +inline bool IsAWordStart(int ch, bool unicodeIdentifiers) { + if (ch < 0x80) + return (isalpha(ch) || ch == '_'); + + if (!unicodeIdentifiers) + return false; + + return IsXidStart(ch); +} + +//Ƿǵʷָţasciiеֺĸַ . @ \t ȣΪһʵķָš +inline bool IsWordSplitChar(int ch) noexcept { + return (ch < 0x80) && !isalnum(ch); +} + +inline bool IsLineEol(int ch) noexcept { + return ch == '\n' || ch == '\r'; +} + + + + + +//ֻʶĺӢֵʵ״̬ +void SCI_METHOD LexGCode::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + Accessor styler(pAccess, NULL); + + const Sci_Position endPos = startPos + length; + + StyleContext sc(startPos, endPos - startPos, initStyle, styler); + + Sci_Position startIndicator = sc.currentPos; + + bool isDataMatch = false; + + for (; sc.More();) { + + switch (sc.state) + { + case SCE_GCODE_DEFAULT: + { + if (!sc.atLineEnd && (sc.ch == ';')) + { + sc.SetState(SCE_GCODE_IDENTIFIER_COMMENT); + } + else if (!sc.atLineEnd && setWordStart.Contains(sc.ch)) { + //βҵǰַһʵĿͷʶַʶʶ״̬ + if (sc.Match('G') && IsADigit(sc.chNext)) + { + sc.SetState(SCE_GCODE_IDENTIFIER_KEYWORD); + sc.Forward(); + } + else if (sc.Match('M') && IsADigit(sc.chNext)) + { + sc.SetState(SCE_GCODE_IDENTIFIER_KEYWORD1); + sc.Forward(); + } + else if (sc.Match('X')&& (IsADigit(sc.chNext) || (sc.chNext == '-'))) + { + sc.SetState(SCE_GCODE_IDENTIFIER_POSITION_X); + sc.Forward(); + } + else if (sc.Match('Y') && (IsADigit(sc.chNext) || (sc.chNext == '-'))) + { + sc.SetState(SCE_GCODE_IDENTIFIER_POSITION_Y); + sc.Forward(); + } + else if (sc.Match('Z') && (IsADigit(sc.chNext) || (sc.chNext == '-'))) + { + sc.SetState(SCE_GCODE_IDENTIFIER_POSITION_Z); + sc.Forward(); + } + else if ((sc.Match('I') || sc.Match('J') || sc.Match('K')) && (IsADigit(sc.chNext) || (sc.chNext == '-'))) + { + sc.SetState(SCE_GCODE_IDENTIFIER_OFFSET); + sc.Forward(); + } + else if (sc.Match('F') && IsADigit(sc.chNext)) + { + sc.SetState(SCE_GCODE_IDENTIFIER_VELOCITY); + sc.Forward(); + } + else if (sc.Match('P') && IsADigit(sc.chNext)) + { + sc.SetState(SCE_GCODE_IDENTIFIER_TIMES); + sc.Forward(); + } + } + + } + break; + case SCE_GCODE_IDENTIFIER_COMMENT: + { + if (sc.atLineEnd) + { + sc.ChangeState(SCE_GCODE_COMMNET); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_KEYWORD: + case SCE_GCODE_IDENTIFIER_KEYWORD1: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + char s[1000]; + //ȡǰʶעʶᳬ512Ԥƣɵȡһ1000ַ + sc.GetCurrent(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_GCODE_KEYWORD); + } + else if (keywords1.InList(s)) { + sc.ChangeState(SCE_GCODE_KEYWORD1); + } + else + { + sc.ChangeState(SCE_GCODE_DEFAULT); + } + + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_POSITION_X: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_GCODE_POSITION_X); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_POSITION_Y: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_GCODE_POSITION_Y); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_POSITION_Z: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_GCODE_POSITION_Z); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_OFFSET: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_GCODE_OFFSET); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_VELOCITY: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_GCODE_VELOCITY); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + case SCE_GCODE_IDENTIFIER_TIMES: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_GCODE_TIMES); + sc.SetState(SCE_GCODE_DEFAULT); + } + } + break; + } + + sc.Forward(); + } + + styler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0); + sc.Complete(); + +} + +static bool IsCommentLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + const Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + const char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} + +static bool IsQuoteLine(Sci_Position line, const Accessor &styler) { + const int style = styler.StyleAt(styler.LineStart(line)) & 31; + return false; +} + + +//κ۵ +void SCI_METHOD LexGCode::Fold(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, IDocument *pAccess) { + return; +} + +static const char *const txtWordListDesc[] = { + 0 +}; + +LexerModule lmGCode(SCLEX_GCode, LexGCode::LexerFactoryGCode, "gcode", txtWordListDesc); diff --git a/src/qscint/scintilla/lexers/LexLog.cpp b/src/qscint/scintilla/lexers/LexLog.cpp new file mode 100755 index 0000000..a86a8fa --- /dev/null +++ b/src/qscint/scintilla/lexers/LexLog.cpp @@ -0,0 +1,362 @@ +#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 "CharacterCategory.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "SubStyles.h" +#include "DefaultLexer.h" +#include "LexAccessor.h" + +#include "UniConversion.h" + +using namespace Scintilla; + +//const char styleSubable[] = { SCE_P_IDENTIFIER, 0 }; + +//Default = 0,// +//Ascii = 1,//Ӣ +//Keyword = 2, //ؼֻ֣TXTΪĸ + +static LexicalClass lexicalClasses[] = { + // Lexer Python SCLEX_PYTHON SCE_P_: + 0, "SCE_LOG_DEFAULT", "default", "default", + 1, "SCE_LOG_NUM", "Num", "Num", + 2, "SCE_LOG_DATE", "Date", "Date", + 3, "SCE_LOG_KEYWORD", "keyword", "keyword", +}; + +enum LOG_STATUS { + SCE_LOG_DEFAULT=0, + SCE_LOG_NUM , + SCE_LOG_DATE, + SCE_LOG_KEYWORD, + SCE_LOG_IDENTIFIER, + SCE_LOG_HEX +}; + +// Options used for LexerPython +struct OptionsTxt { + bool num; + bool data; + bool keyword; + + OptionsTxt() { + num = true; + data = true; + keyword = true; + } + +}; + + +struct OptionSetTxt : public OptionSet { + OptionSetTxt() { + DefineProperty("lexer.log.num", &OptionsTxt::num, + "text Unicode string"); + + DefineProperty("lexer.txt.data", &OptionsTxt::data, + "text literals ascii string"); + + DefineProperty("lexer.txt.keyword", &OptionsTxt::keyword, + "text keyword"); + } +}; + +class LexLOG :public DefaultLexer +{ + WordList keywords; + OptionsTxt options; + OptionSetTxt osTxt; + CharacterSet setWord; + CharacterSet setWordStart; + CharacterSet hexWord; +public: + explicit LexLOG() : + DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)), + setWord(CharacterSet::setAlphaNum, "._", 0x80, true),//ĸ֡»ߡ. ʵַ + setWordStart(CharacterSet::setAlpha, "_", 0x80, true), + hexWord(CharacterSet::setDigits, "abcdefABCDEF", 0x80, true) + { + + } + virtual ~LexLOG() {} + + void SCI_METHOD Release() override { + delete this; + } + int SCI_METHOD Version() const override { + return lvSubStyles; + } + const char *SCI_METHOD PropertyNames() override { + return osTxt.PropertyNames(); + } + int SCI_METHOD PropertyType(const char *name) override { + return osTxt.PropertyType(name); + } + const char *SCI_METHOD DescribeProperty(const char *name) override { + return osTxt.DescribeProperty(name); + } + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + + const char *SCI_METHOD DescribeWordListSets() override { + return ""; + } + 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 PrimaryStyleFromStyle(int style) override { + return style; + } + + int SCI_METHOD DistanceToSecondaryStyles() override { + return 0; + } + + static ILexer *LexerFactoryLog() { + return new LexLOG(); + } +}; + +Sci_Position SCI_METHOD LexLOG::PropertySet(const char *key, const char *val) { + if (osTxt.PropertySet(&options, key, val)) { + return 0; + } + return -1; +} + +Sci_Position SCI_METHOD LexLOG::WordListSet(int n, const char *wl) { + + WordList *wordListN = 0; + switch (n) { + case 0: + wordListN = &keywords; + break; + } + Sci_Position firstModification = -1; + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + return firstModification; +} + +const int indicatorWhitespace = 1; + +inline bool IsAAsciiChar(int ch) { + return (ch < 0x80); +} + +inline bool IsAWordStart(int ch, bool unicodeIdentifiers) { + if (ch < 0x80) + return (isalpha(ch) || ch == '_'); + + if (!unicodeIdentifiers) + return false; + + return IsXidStart(ch); +} + +//Ƿǵʷָţasciiеֺĸַ . @ \t ȣΪһʵķָš +inline bool IsWordSplitChar(int ch) noexcept { + return (ch < 0x80) && !isalnum(ch); +} + +inline bool IsLineEol(int ch) noexcept { + return ch == '\n' || ch == '\r'; +} + +//ȡУȡ128ַ +static std::string GetLineContents(LexAccessor& styler, Sci_Position start, const int len=128) { + std::string lineContent; + Sci_Position i = 0; + char ch = styler.SafeGetCharAt(start, '\n'); + const Sci_Position endLine = styler.LineEnd(styler.GetLine(start)); + while (((start + i) < endLine) && ( i < len)) { + const char chNext = styler.SafeGetCharAt(start + i + 1, '\n'); + lineContent += ch; + i++; + ch = chNext; + } + return lineContent; +} + + + +//ֻʶĺӢֵʵ״̬ +void SCI_METHOD LexLOG::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + Accessor styler(pAccess, NULL); + + const Sci_Position endPos = startPos + length; + + StyleContext sc(startPos, endPos - startPos, initStyle, styler); + + std::regex patternData ("\\d{4}[-/]\\d{2}[-/]\\d{2} \\d{2}:\\d{2}:\\d{2}[.:]\\d{1,3}"); + + Sci_Position startIndicator = sc.currentPos; + + bool isDataMatch = false; + + for (; sc.More();) { + //пͷȡ64ֽڣʶеڡ + if (sc.atLineStart) { + std::string lineContens = GetLineContents(styler, sc.currentPos,64); + //ƥʱֵ + std::smatch result; + std::string::const_iterator iterStart = lineContens.begin(); + std::string::const_iterator iterEnd = lineContens.end(); + + //ƥ䵽 + if (std::regex_search(iterStart, iterEnd, result, patternData)) + { + int start = result[0].first - iterStart; + int end = result[0].second - iterStart; + + int i = 0; + while (i < start) + { + sc.Forward(); + ++i; + } + sc.SetState(SCE_LOG_DATE); + while (i < end) + { + sc.Forward(); + ++i; + } + sc.SetState(SCE_LOG_DEFAULT); + } + } + + /*if (!sc.atLineEnd && !setWordStart.Contains(sc.chPrev) && setWordStart.Contains(sc.ch)) { + sc.SetState(SCE_LOG_DEFAULT); + sc.ChangeState(SCE_LOG_IDENTIFIER); + }*/ + switch (sc.state) + { + case SCE_LOG_HEX: + { + if (!hexWord.Contains(sc.ch)) + { + sc.ChangeState(SCE_LOG_NUM);//16ƺ10һĸʽ + sc.SetState(SCE_LOG_DEFAULT); + } + } + break; + case SCE_LOG_NUM: + { + if (!IsADigit(sc.ch)) + { + sc.SetState(SCE_LOG_DEFAULT); + } + } + break; + + case SCE_LOG_DEFAULT: + { + //ע˳Ҫж֡ + if (sc.Match('0','x')) + { + sc.SetState(SCE_LOG_HEX); + sc.Forward(); + } + else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + //ǰַ֣.ֱ֣õǰ״̬Ϊ֡ + sc.SetState(SCE_LOG_NUM); + } + else if (!sc.atLineEnd && setWordStart.Contains(sc.ch)) { + //βҵǰַһʵĿͷʶַʶʶ״̬ + sc.SetState(SCE_LOG_IDENTIFIER); + } + } + break; + case SCE_LOG_IDENTIFIER: + { + if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch)) + { + char s[1000]; + //ȡǰʶעʶᳬ1000Ԥƣɵȡһ1000ַ + sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_LOG_KEYWORD); + } + else + { + sc.ChangeState(SCE_LOG_DEFAULT); + } + + sc.SetState(SCE_LOG_DEFAULT); + } + } + } + + sc.Forward(); + } + + styler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0); + sc.Complete(); + +} + +static bool IsCommentLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + const Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + const char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} + +static bool IsQuoteLine(Sci_Position line, const Accessor &styler) { + const int style = styler.StyleAt(styler.LineStart(line)) & 31; + return false; +} + + +//κ۵ +void SCI_METHOD LexLOG::Fold(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, IDocument *pAccess) { + return; +} + +static const char *const txtWordListDesc[] = { + 0 +}; + +LexerModule lmLog(SCLEX_LOG, LexLOG::LexerFactoryLog, "log", txtWordListDesc); diff --git a/src/qscint/scintilla/lexers/LexPerl.cpp b/src/qscint/scintilla/lexers/LexPerl.cpp index a97bfb6..e4d9a24 100755 --- a/src/qscint/scintilla/lexers/LexPerl.cpp +++ b/src/qscint/scintilla/lexers/LexPerl.cpp @@ -619,12 +619,14 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int // 2: here doc text (lines after the delimiter) int Quote; // the char after '<<' bool Quoted; // true if Quote in ('\'','"','`') + bool StripIndent; // true if '<<~' requested to strip leading whitespace int DelimiterLength; // strlen(Delimiter) char Delimiter[HERE_DELIM_MAX]; // the Delimiter HereDocCls() { State = 0; Quote = 0; Quoted = false; + StripIndent = false; DelimiterLength = 0; Delimiter[0] = '\0'; } @@ -885,7 +887,7 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int sc.SetState(SCE_PL_DEFAULT); break; case SCE_PL_COMMENTLINE: - if (sc.atLineEnd) { + if (sc.atLineStart) { sc.SetState(SCE_PL_DEFAULT); } break; @@ -896,8 +898,14 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int HereDoc.State = 1; // pre-init HERE doc class HereDoc.Quote = sc.chNext; HereDoc.Quoted = false; + HereDoc.StripIndent = false; HereDoc.DelimiterLength = 0; HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + if (delim_ch == '~') { // was actually '<<~' + sc.Forward(); + HereDoc.StripIndent = true; + HereDoc.Quote = delim_ch = sc.chNext; + } if (IsASpaceOrTab(delim_ch)) { // skip whitespace; legal only for quoted delimiters Sci_PositionU i = sc.currentPos + 1; @@ -964,6 +972,11 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int case SCE_PL_HERE_QX: // also implies HereDoc.State == 2 sc.Complete(); + if (HereDoc.StripIndent) { + // skip whitespace + while (IsASpaceOrTab(sc.ch) && !sc.atLineEnd) + sc.Forward(); + } if (HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter)) { int c = sc.GetRelative(HereDoc.DelimiterLength); if (c == '\r' || c == '\n') { // peek first, do not consume match @@ -1701,6 +1714,12 @@ void SCI_METHOD LexerPerl::Fold(Sci_PositionU startPos, Sci_Position length, int } else if (ch == ']') { levelCurrent--; } + } else if (style == SCE_PL_STRING_QW) { + // qw + if (stylePrevCh != style) + levelCurrent++; + else if (styleNext != style) + levelCurrent--; } // POD folding if (options.foldPOD && atLineStart) { diff --git a/src/qscint/scintilla/lexers/LexTXT.cpp b/src/qscint/scintilla/lexers/LexTXT.cpp index e8f9c98..7b5caa1 100755 --- a/src/qscint/scintilla/lexers/LexTXT.cpp +++ b/src/qscint/scintilla/lexers/LexTXT.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -33,9 +33,9 @@ using namespace Scintilla; //const char styleSubable[] = { SCE_P_IDENTIFIER, 0 }; -//Default = 0,//中文 -//Ascii = 1,//英文 -//Keyword = 2, //关键字,只有以TXT为母版的 +//Default = 0,// +//Ascii = 1,//Ӣ +//Keyword = 2, //ؼֻ֣TXTΪĸ LexicalClass lexicalClasses[] = { // Lexer Python SCLEX_PYTHON SCE_P_: @@ -50,10 +50,12 @@ enum literalsAllowed { litNone = 0, litU = 1, litB = 2, litF = 4 }; struct OptionsTxt { bool ascii; bool utf8; + bool keyword; OptionsTxt() { ascii = true; utf8 = true; + keyword = true; } }; @@ -66,6 +68,9 @@ struct OptionSetTxt : public OptionSet { DefineProperty("lexer.txt.asciistring", &OptionsTxt::ascii, "text literals ascii string"); + + DefineProperty("lexer.txt.keyword", &OptionsTxt::keyword, + "text keyword"); } }; @@ -75,9 +80,10 @@ class LexTXT :public DefaultLexer //SubStyles subStyles; OptionsTxt options; OptionSetTxt osTxt; + bool isUserDefMode; public: explicit LexTXT() : - DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses))/*, + DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)), isUserDefMode(false)/*, subStyles(styleSubable, 0x80, 0x40, 0)*/ { } virtual ~LexTXT() {} @@ -161,7 +167,7 @@ Sci_Position SCI_METHOD LexTXT::WordListSet(int n, const char *wl) { case 0: wordListN = &keywords; break; -} + } Sci_Position firstModification = -1; if (wordListN) { WordList wlNew; @@ -170,6 +176,7 @@ Sci_Position SCI_METHOD LexTXT::WordListSet(int n, const char *wl) { wordListN->Set(wl); firstModification = 0; } + isUserDefMode = (wordListN->Length() > 0); } return firstModification; } @@ -202,108 +209,104 @@ inline bool IsAWordStart(int ch, bool unicodeIdentifiers) { return IsXidStart(ch); } -//只识别中文和英文两种单词的状态 +//Ƿǵʷָţasciiеֺĸַ . @ \t ȣΪһʵķָš +inline bool IsWordSplitChar(int ch) noexcept { + //return ch == ' ' || ch == '\t'; + return (ch < 0x80) && !isalnum(ch); +} + +inline bool IsLineEol(int ch) noexcept { + return ch == '\n' || ch == '\r'; +} + +//ֻʶĺӢֵʵ״̬ void SCI_METHOD LexTXT::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { Accessor styler(pAccess, NULL); const Sci_Position endPos = startPos + length; - //// Backtrack to previous line in case need to fix its tab whinging - //Sci_Position lineCurrent = styler.GetLine(startPos); - //if (startPos > 0) { - // if (lineCurrent > 0) { - // lineCurrent--; - // // Look for backslash-continued lines - // while (lineCurrent > 0) { - // Sci_Position eolPos = styler.LineStart(lineCurrent) - 1; - // const int eolStyle = styler.StyleAt(eolPos); - // if (eolStyle == SCE_P_STRING - // || eolStyle == SCE_P_CHARACTER - // || eolStyle == SCE_P_STRINGEOL) { - // lineCurrent -= 1; - // } - // else { - // break; - // } - // } - // startPos = styler.LineStart(lineCurrent); - // } - // initStyle = (startPos == 0 ? SCE_P_DEFAULT : styler.StyleAt(startPos - 1)); - //} - - //initStyle = initStyle & 31; - //if (initStyle == SCE_P_STRINGEOL) { - // initStyle = SCE_P_DEFAULT; - //} + //const WordClassifier& classifierIdentifiers = subStyles.Classifier(SCE_TXT_IDENTIFIER); StyleContext sc(startPos, endPos - startPos, initStyle, styler); Sci_Position startIndicator = sc.currentPos; - - for (; sc.More();) { - - // Check for a new state starting character - if (sc.state == SCE_TXT_DEFAULT) - { - //遇到下一个ASCII字符的时候,进入识别状态 - if (IsAAsciiChar(sc.ch)) - { - sc.SetState(SCE_TXT_IDENTIFIER); - } - } - else if (sc.state == SCE_TXT_ASCII) - { - //遇到下一个非ASCII字符的时候,进入识别状态 - if (!IsAAsciiChar(sc.ch)) - { - sc.SetState(SCE_TXT_IDENTIFIER); - } - } - - if (sc.state == SCE_TXT_IDENTIFIER) { - - //txt就三种状态、英文、中文、自定义关键字。默认是中文。 - //遇到非字符和非数字,开始检测单词,是关键字则识别为关键字;若不是关键字,则肯定是英文字符 - - //如果遇到非ASCII字符,则开始检查 - if (!IsAAsciiChar(sc.ch)) { - char s[1000]; - sc.GetCurrent(s, sizeof(s)); - int style = SCE_TXT_IDENTIFIER; - if (keywords.InList(s)) - { - style = SCE_TXT_KEYWORD; - } - else - { - //不是关键字,就是普通的英文单词 - style = SCE_TXT_ASCII; - } - sc.ChangeState(style); - - //下面函数运行就已经把关键字或英文给单独设置风格了。此时默认进入中文风格状态 - sc.SetState(SCE_TXT_DEFAULT); - - } - } - - sc.Forward(); - } - - //最后一段不能遗漏,也需要识别 - if (sc.state == SCE_TXT_IDENTIFIER) + if (!isUserDefMode) { - if (IsAAsciiChar(sc.chPrev)) - { - sc.ChangeState(SCE_TXT_ASCII); + for (; sc.More();) { + // Check for a new state starting character + if (sc.state == SCE_TXT_DEFAULT) + { + if (IsAAsciiChar(sc.ch)) + { + sc.SetState(SCE_TXT_ASCII); + } + } + else if (sc.state == SCE_TXT_ASCII) + { + if (!IsAAsciiChar(sc.ch)) + { + sc.SetState(SCE_TXT_DEFAULT); + } + } + sc.Forward(); + } } else { - sc.ChangeState(SCE_TXT_DEFAULT); - } - } + for (; sc.More();) { + // Check for a new state starting character + if (sc.state == SCE_TXT_DEFAULT) + { + if (IsAAsciiChar(sc.ch)) + { + //Ҫʶؼ֣Ҫǰհַ Ŀոһؼ޷ + if (IsWordSplitChar(sc.ch) && IsAWordStart(sc.chNext, false)) + { + //лʱForwardSetStateǰհַ + sc.ForwardSetState(SCE_TXT_ASCII); + continue; + } + sc.SetState(SCE_TXT_ASCII); + } + } + else if (sc.state == SCE_TXT_ASCII) + { + if (!IsAAsciiChar(sc.ch)) + { + sc.SetState(SCE_TXT_DEFAULT); + } + else //Զؼ֣˵ûԶ﷨ + { + //ʶؼֵ߼Ӣ߼£Եʽʶ + //νʣһǰΧǰո\tеӢĵ + if ((IsWordSplitChar(sc.ch) /*|| IsLineEol(sc.ch)*/) && isalpha(sc.chPrev)) + { + char s[512]; + sc.GetCurrent(s, sizeof(s)); + if (keywords.InList(s)) + { + sc.ChangeState(SCE_TXT_KEYWORD); + } + sc.SetState(SCE_TXT_ASCII); + } + + if (IsWordSplitChar(sc.ch) && IsAWordStart(sc.chNext, false)) + { + //лʱForwardSetStateǰհַ + sc.ForwardSetState(SCE_TXT_ASCII); + continue; + //sc.SetState(SCE_TXT_ASCII); + } + + } + } + sc.Forward(); + } + } + + //һβ©ҲҪʶ sc.SetState(SCE_TXT_DEFAULT); styler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0); @@ -330,7 +333,7 @@ static bool IsQuoteLine(Sci_Position line, const Accessor &styler) { } -//不处理任何折叠 +//κ۵ void SCI_METHOD LexTXT::Fold(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, IDocument *pAccess) { return; } diff --git a/src/qscint/scintilla/src/Catalogue.cpp b/src/qscint/scintilla/src/Catalogue.cpp index dc744d7..81c1f87 100755 --- a/src/qscint/scintilla/src/Catalogue.cpp +++ b/src/qscint/scintilla/src/Catalogue.cpp @@ -190,6 +190,7 @@ int Scintilla_LinkLexers() { LINK_LEXER(lmTEHex); LINK_LEXER(lmTeX); LINK_LEXER(lmTxt); + LINK_LEXER(lmLog); LINK_LEXER(lmTxt2tags); LINK_LEXER(lmVB); LINK_LEXER(lmVBScript); @@ -198,6 +199,7 @@ int Scintilla_LinkLexers() { LINK_LEXER(lmVisualProlog); LINK_LEXER(lmXML); LINK_LEXER(lmYAML); + LINK_LEXER(lmGCode); //--Autogenerated -- end of automatically generated section diff --git a/src/qscint/scintilla/src/Document.cpp b/src/qscint/scintilla/src/Document.cpp index 505deb8..3a9e65e 100755 --- a/src/qscint/scintilla/src/Document.cpp +++ b/src/qscint/scintilla/src/Document.cpp @@ -509,6 +509,8 @@ Sci::Line Document::LineFromPositionIndex(Sci::Position pos, int lineCharacterIn } int SCI_METHOD Document::SetLevel(Sci_Position line, int level) { + //20230306 这个标记如果不去掉,那么fold的尾部会包含下面新增的空行,定位一天才定位到此。 + level &= ~SC_FOLDLEVELWHITEFLAG; const int prev = Levels()->SetLevel(static_cast(line), level, LinesTotal()); if (prev != level) { DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, diff --git a/src/qscint/scintilla/src/Editor.cpp b/src/qscint/scintilla/src/Editor.cpp index 86590fd..7816987 100755 --- a/src/qscint/scintilla/src/Editor.cpp +++ b/src/qscint/scintilla/src/Editor.cpp @@ -1977,8 +1977,18 @@ void Editor::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { // Also treats \0 and naked trail bytes 0x80 to 0xBF as valid // characters representing themselves. } else { + + //发现这里在macOs下面输入要崩溃。于是把windows macos还是区分一下 unsigned int utf32[1] = { 0 }; + +#if defined(Q_OS_WIN) UTF32FromUTF8(s, len, utf32, ELEMENTS(utf32)); +#elif defined(Q_OS_MAC) + //在MAC上面最多输入3个字符。因为一个UTF8编码也就三个字符。而且这里原设计也就只接受一个字符。 + UTF32FromUTF8(s, (len > 3 ? 3 : len), utf32, ELEMENTS(utf32)); +#elif defined(Q_OS_UNIX) + UTF32FromUTF8(s, len, utf32, ELEMENTS(utf32)); +#endif byte = utf32[0]; } NotifyChar(byte); @@ -2836,7 +2846,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lPar // Send notification SCNotification scn = {}; - scn.nmhdr.code = SCN_MACRORECORD; + scn.nmhdr.code = SCN_MACRORECORD_ID; scn.message = iMessage; scn.wParam = wParam; scn.lParam = lParam; @@ -5809,12 +5819,26 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return pdoc->Length(); case SCI_CUT: - Cut(); - SetLastXChosen(); + if (!sel.Empty()) + { + Cut(); + SetLastXChosen(); + } + else + { + KeyCommand(SCI_LINECUT); + } break; case SCI_COPY: - Copy(); + if (!sel.Empty()) + { + Copy(); + } + else + { + KeyCommand(SCI_LINECOPY); + } break; case SCI_COPYALLOWLINE: @@ -7832,6 +7856,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { recordingMacro = false; return 0; + case SCI_GETRECORSTATUS: + return (recordingMacro ? 1 : 0); + case SCI_MOVECARETINSIDEVIEW: MoveCaretInsideView(); break; diff --git a/src/qscint/scintilla/src/LexHex.cpp b/src/qscint/scintilla/src/LexHex.cpp new file mode 100755 index 0000000..6e10997 --- /dev/null +++ b/src/qscint/scintilla/src/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/src/qscint/scintilla/src/LineMarker.cpp b/src/qscint/scintilla/src/LineMarker.cpp index f2f1e62..f969818 100755 --- a/src/qscint/scintilla/src/LineMarker.cpp +++ b/src/qscint/scintilla/src/LineMarker.cpp @@ -1,4 +1,4 @@ -// Scintilla source code edit control +// Scintilla source code edit control /** @file LineMarker.cxx ** Defines the look of a line marker in the margin. **/ @@ -167,270 +167,356 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac // On textual margins move marker to the left to try to avoid overlapping the text centreX = ircWhole.left + dimOn2 + 1; } - if (markType == SC_MARK_ROUNDRECT) { - PRectangle rcRounded = rc; - rcRounded.left = rc.left + 1; - rcRounded.right = rc.right - 1; - surface->RoundedRectangle(rcRounded, fore, back); - } else if (markType == SC_MARK_CIRCLE) { - const PRectangle rcCircle = PRectangle::FromInts( - centreX - dimOn2, - centreY - dimOn2, - centreX + dimOn2, - centreY + dimOn2); - surface->Ellipse(rcCircle, fore, back); - } else if (markType == SC_MARK_ARROW) { - Point pts[] = { - Point::FromInts(centreX - dimOn4, centreY - dimOn2), - Point::FromInts(centreX - dimOn4, centreY + dimOn2), - Point::FromInts(centreX + dimOn2 - dimOn4, centreY), - }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else if (markType == SC_MARK_ARROWDOWN) { - Point pts[] = { - Point::FromInts(centreX - dimOn2, centreY - dimOn4), - Point::FromInts(centreX + dimOn2, centreY - dimOn4), - Point::FromInts(centreX, centreY + dimOn2 - dimOn4), - }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + switch (markType) + { + case SC_MARK_ROUNDRECT: + { + PRectangle rcRounded = rc; + rcRounded.left = rc.left + 1; + rcRounded.right = rc.right - 1; + surface->RoundedRectangle(rcRounded, fore, back); + } + break; + case SC_MARK_CIRCLE: + { + const PRectangle rcCircle = PRectangle::FromInts( + centreX - dimOn2, + centreY - dimOn2, + centreX + dimOn2, + centreY + dimOn2); + surface->Ellipse(rcCircle, fore, back); + } + break; + case SC_MARK_ARROW: + { + Point pts[] = { + Point::FromInts(centreX - dimOn4, centreY - dimOn2), + Point::FromInts(centreX - dimOn4, centreY + dimOn2), + Point::FromInts(centreX + dimOn2 - dimOn4, centreY), + }; + surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else if (markType == SC_MARK_PLUS) { - Point pts[] = { - Point::FromInts(centreX - armSize, centreY - 1), - Point::FromInts(centreX - 1, centreY - 1), - Point::FromInts(centreX - 1, centreY - armSize), - Point::FromInts(centreX + 1, centreY - armSize), - Point::FromInts(centreX + 1, centreY - 1), - Point::FromInts(centreX + armSize, centreY -1), - Point::FromInts(centreX + armSize, centreY +1), - Point::FromInts(centreX + 1, centreY + 1), - Point::FromInts(centreX + 1, centreY + armSize), - Point::FromInts(centreX - 1, centreY + armSize), - Point::FromInts(centreX - 1, centreY + 1), - Point::FromInts(centreX - armSize, centreY + 1), - }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + } + break; + case SC_MARK_ARROWDOWN: + { + Point pts[] = { + Point::FromInts(centreX - dimOn2, centreY - dimOn4), + Point::FromInts(centreX + dimOn2, centreY - dimOn4), + Point::FromInts(centreX, centreY + dimOn2 - dimOn4), + }; + surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else if (markType == SC_MARK_MINUS) { - Point pts[] = { - Point::FromInts(centreX - armSize, centreY - 1), - Point::FromInts(centreX + armSize, centreY -1), - Point::FromInts(centreX + armSize, centreY +1), - Point::FromInts(centreX - armSize, centreY + 1), - }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + } + break; + case SC_MARK_PLUS: + { + Point pts[] = { + Point::FromInts(centreX - armSize, centreY - 1), + Point::FromInts(centreX - 1, centreY - 1), + Point::FromInts(centreX - 1, centreY - armSize), + Point::FromInts(centreX + 1, centreY - armSize), + Point::FromInts(centreX + 1, centreY - 1), + Point::FromInts(centreX + armSize, centreY - 1), + Point::FromInts(centreX + armSize, centreY + 1), + Point::FromInts(centreX + 1, centreY + 1), + Point::FromInts(centreX + 1, centreY + armSize), + Point::FromInts(centreX - 1, centreY + armSize), + Point::FromInts(centreX - 1, centreY + 1), + Point::FromInts(centreX - armSize, centreY + 1), + }; + surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else if (markType == SC_MARK_SMALLRECT) { - PRectangle rcSmall; - rcSmall.left = rc.left + 1; - rcSmall.top = rc.top + 2; - rcSmall.right = rc.right - 1; - rcSmall.bottom = rc.bottom - 2; - surface->RectangleDraw(rcSmall, fore, back); + } + break; + case SC_MARK_MINUS: + { + Point pts[] = { + Point::FromInts(centreX - armSize, centreY - 1), + Point::FromInts(centreX + armSize, centreY - 1), + Point::FromInts(centreX + armSize, centreY + 1), + Point::FromInts(centreX - armSize, centreY + 1), + }; + surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND || - markType == SC_MARK_UNDERLINE || markType == SC_MARK_AVAILABLE) { - // An invisible marker so don't draw anything + } + break; + case SC_MARK_SMALLRECT: + { + PRectangle rcSmall; + rcSmall.left = rc.left + 1; + rcSmall.top = rc.top + 2; + rcSmall.right = rc.right - 1; + rcSmall.bottom = rc.bottom - 2; + surface->RectangleDraw(rcSmall, fore, back); - } else if (markType == SC_MARK_VLINE) { + } + break; + + case SC_MARK_EMPTY: + case SC_MARK_BACKGROUND: + case SC_MARK_UNDERLINE: + case SC_MARK_AVAILABLE: + break; + case SC_MARK_VLINE: + { surface->PenColour(colourBody); surface->MoveTo(centreX, ircWhole.top); surface->LineTo(centreX, ircWhole.bottom); - - } else if (markType == SC_MARK_LCORNER) { - surface->PenColour(colourTail); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY); - surface->LineTo(ircWhole.right - 1, centreY); - - } else if (markType == SC_MARK_TCORNER) { - surface->PenColour(colourTail); - surface->MoveTo(centreX, centreY); - surface->LineTo(ircWhole.right - 1, centreY); - - surface->PenColour(colourBody); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY + 1); - - surface->PenColour(colourHead); - surface->LineTo(centreX, ircWhole.bottom); - - } else if (markType == SC_MARK_LCORNERCURVE) { - surface->PenColour(colourTail); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY-3); - surface->LineTo(centreX+3, centreY); - surface->LineTo(ircWhole.right - 1, centreY); - - } else if (markType == SC_MARK_TCORNERCURVE) { - surface->PenColour(colourTail); - surface->MoveTo(centreX, centreY-3); - surface->LineTo(centreX+3, centreY); - surface->LineTo(ircWhole.right - 1, centreY); - - surface->PenColour(colourBody); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY-2); - - surface->PenColour(colourHead); - surface->LineTo(centreX, ircWhole.bottom); - - } else if (markType == SC_MARK_BOXPLUS) { - DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); - DrawPlus(surface, centreX, centreY, blobSize, colourTail); - - } else if (markType == SC_MARK_BOXPLUSCONNECTED) { - if (tFold == LineMarker::headWithTail) + } + break; + case SC_MARK_LCORNER: + { surface->PenColour(colourTail); - else + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY); + surface->LineTo(ircWhole.right - 1, centreY); + + } + break; + case SC_MARK_TCORNER: + { + surface->PenColour(colourTail); + surface->MoveTo(centreX, centreY); + surface->LineTo(ircWhole.right - 1, centreY); + surface->PenColour(colourBody); - surface->MoveTo(centreX, centreY + blobSize); - surface->LineTo(centreX, ircWhole.bottom); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY + 1); - surface->PenColour(colourBody); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY - blobSize); + surface->PenColour(colourHead); + surface->LineTo(centreX, ircWhole.bottom); - DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); - DrawPlus(surface, centreX, centreY, blobSize, colourTail); - - if (tFold == LineMarker::body) { - surface->PenColour(colourTail); - surface->MoveTo(centreX + 1, centreY + blobSize); - surface->LineTo(centreX + blobSize + 1, centreY + blobSize); - - surface->MoveTo(centreX + blobSize, centreY + blobSize); - surface->LineTo(centreX + blobSize, centreY - blobSize); - - surface->MoveTo(centreX + 1, centreY - blobSize); - surface->LineTo(centreX + blobSize + 1, centreY - blobSize); } - } else if (markType == SC_MARK_BOXMINUS) { - DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); - DrawMinus(surface, centreX, centreY, blobSize, colourTail); - - surface->PenColour(colourHead); - surface->MoveTo(centreX, centreY + blobSize); - surface->LineTo(centreX, ircWhole.bottom); - - } else if (markType == SC_MARK_BOXMINUSCONNECTED) { - DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); - DrawMinus(surface, centreX, centreY, blobSize, colourTail); - - surface->PenColour(colourHead); - surface->MoveTo(centreX, centreY + blobSize); - surface->LineTo(centreX, ircWhole.bottom); - - surface->PenColour(colourBody); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY - blobSize); - - if (tFold == LineMarker::body) { + break; + case SC_MARK_LCORNERCURVE: + { surface->PenColour(colourTail); - surface->MoveTo(centreX + 1, centreY + blobSize); - surface->LineTo(centreX + blobSize + 1, centreY + blobSize); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY - 3); + surface->LineTo(centreX + 3, centreY); + surface->LineTo(ircWhole.right - 1, centreY); - surface->MoveTo(centreX + blobSize, centreY + blobSize); - surface->LineTo(centreX + blobSize, centreY - blobSize); - - surface->MoveTo(centreX + 1, centreY - blobSize); - surface->LineTo(centreX + blobSize + 1, centreY - blobSize); } - } else if (markType == SC_MARK_CIRCLEPLUS) { - DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); - DrawPlus(surface, centreX, centreY, blobSize, colourTail); - - } else if (markType == SC_MARK_CIRCLEPLUSCONNECTED) { - if (tFold == LineMarker::headWithTail) + break; + case SC_MARK_TCORNERCURVE: + { surface->PenColour(colourTail); - else + surface->MoveTo(centreX, centreY - 3); + surface->LineTo(centreX + 3, centreY); + surface->LineTo(ircWhole.right - 1, centreY); + surface->PenColour(colourBody); - surface->MoveTo(centreX, centreY + blobSize); - surface->LineTo(centreX, ircWhole.bottom); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY - 2); - surface->PenColour(colourBody); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY - blobSize); + surface->PenColour(colourHead); + surface->LineTo(centreX, ircWhole.bottom); - DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); - DrawPlus(surface, centreX, centreY, blobSize, colourTail); - - } else if (markType == SC_MARK_CIRCLEMINUS) { - surface->PenColour(colourHead); - surface->MoveTo(centreX, centreY + blobSize); - surface->LineTo(centreX, ircWhole.bottom); - - DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); - DrawMinus(surface, centreX, centreY, blobSize, colourTail); - - } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) { - surface->PenColour(colourHead); - surface->MoveTo(centreX, centreY + blobSize); - surface->LineTo(centreX, ircWhole.bottom); - - surface->PenColour(colourBody); - surface->MoveTo(centreX, ircWhole.top); - surface->LineTo(centreX, centreY - blobSize); - - DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); - DrawMinus(surface, centreX, centreY, blobSize, colourTail); - - } else if (markType >= SC_MARK_CHARACTER) { - char character[1]; - character[0] = static_cast(markType - SC_MARK_CHARACTER); - const XYPOSITION width = surface->WidthText(fontForCharacter, character, 1); - PRectangle rcText = rc; - rcText.left += (rc.Width() - width) / 2; - rcText.right = rc.left + width; - surface->DrawTextClipped(rcText, fontForCharacter, rcText.bottom - 2, - character, 1, fore, back); - - } else if (markType == SC_MARK_DOTDOTDOT) { - XYPOSITION right = static_cast(centreX - 6); - for (int b=0; b<3; b++) { - const PRectangle rcBlob(right, rc.bottom - 4, right + 2, rc.bottom-2); - surface->FillRectangle(rcBlob, fore); - right += 5.0f; } - } else if (markType == SC_MARK_ARROWS) { - surface->PenColour(fore); - int right = centreX - 2; - const int armLength = dimOn2 - 1; - for (int b = 0; b<3; b++) { - surface->MoveTo(right, centreY); - surface->LineTo(right - armLength, centreY - armLength); - surface->MoveTo(right, centreY); - surface->LineTo(right - armLength, centreY + armLength); - right += 4; + break; + case SC_MARK_BOXPLUS: + { + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); + } - } else if (markType == SC_MARK_SHORTARROW) { - Point pts[] = { - Point::FromInts(centreX, centreY + dimOn2), - Point::FromInts(centreX + dimOn2, centreY), - Point::FromInts(centreX, centreY - dimOn2), - Point::FromInts(centreX, centreY - dimOn4), - Point::FromInts(centreX - dimOn4, centreY - dimOn4), - Point::FromInts(centreX - dimOn4, centreY + dimOn4), + break; + case SC_MARK_BOXPLUSCONNECTED: + { + if (tFold == LineMarker::headWithTail) + surface->PenColour(colourTail); + else + surface->PenColour(colourBody); + surface->MoveTo(centreX, centreY + blobSize); + surface->LineTo(centreX, ircWhole.bottom); + + surface->PenColour(colourBody); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY - blobSize); + + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); + + if (tFold == LineMarker::body) { + surface->PenColour(colourTail); + surface->MoveTo(centreX + 1, centreY + blobSize); + surface->LineTo(centreX + blobSize + 1, centreY + blobSize); + + surface->MoveTo(centreX + blobSize, centreY + blobSize); + surface->LineTo(centreX + blobSize, centreY - blobSize); + + surface->MoveTo(centreX + 1, centreY - blobSize); + surface->LineTo(centreX + blobSize + 1, centreY - blobSize); + } + } + break; + case SC_MARK_BOXMINUS: + { + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); + + surface->PenColour(colourHead); + surface->MoveTo(centreX, centreY + blobSize + 1); + surface->LineTo(centreX, ircWhole.bottom); + + } + break; + case SC_MARK_BOXMINUSCONNECTED: + { + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); + + surface->PenColour(colourHead); + surface->MoveTo(centreX, centreY + blobSize + 1); + surface->LineTo(centreX, ircWhole.bottom); + + surface->PenColour(colourBody); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY - blobSize); + + if (tFold == LineMarker::body) { + surface->PenColour(colourTail); + surface->MoveTo(centreX + 1, centreY + blobSize); + surface->LineTo(centreX + blobSize + 1, centreY + blobSize); + + surface->MoveTo(centreX + blobSize, centreY + blobSize); + surface->LineTo(centreX + blobSize, centreY - blobSize); + + surface->MoveTo(centreX + 1, centreY - blobSize); + surface->LineTo(centreX + blobSize + 1, centreY - blobSize); + } + } + break; + case SC_MARK_CIRCLEPLUS: + { + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); + + } + break; + case SC_MARK_CIRCLEPLUSCONNECTED: + { + if (tFold == LineMarker::headWithTail) + surface->PenColour(colourTail); + else + surface->PenColour(colourBody); + surface->MoveTo(centreX, centreY + blobSize); + surface->LineTo(centreX, ircWhole.bottom); + + surface->PenColour(colourBody); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY - blobSize); + + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); + + } + break; + case SC_MARK_CIRCLEMINUS: + { + surface->PenColour(colourHead); + surface->MoveTo(centreX, centreY + blobSize); + surface->LineTo(centreX, ircWhole.bottom); + + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); + + } + break; + case SC_MARK_CIRCLEMINUSCONNECTED: + { + surface->PenColour(colourHead); + surface->MoveTo(centreX, centreY + blobSize); + surface->LineTo(centreX, ircWhole.bottom); + + surface->PenColour(colourBody); + surface->MoveTo(centreX, ircWhole.top); + surface->LineTo(centreX, centreY - blobSize); + + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); + + } + break; + + case SC_MARK_DOTDOTDOT: + { + XYPOSITION right = static_cast(centreX - 6); + for (int b = 0; b < 3; b++) { + const PRectangle rcBlob(right, rc.bottom - 4, right + 2, rc.bottom - 2); + surface->FillRectangle(rcBlob, fore); + right += 5.0f; + } + } + break; + case SC_MARK_ARROWS: + { + surface->PenColour(fore); + int right = centreX - 2; + const int armLength = dimOn2 - 1; + for (int b = 0; b < 3; b++) { + surface->MoveTo(right, centreY); + surface->LineTo(right - armLength, centreY - armLength); + surface->MoveTo(right, centreY); + surface->LineTo(right - armLength, centreY + armLength); + right += 4; + } + } + break; + case SC_MARK_SHORTARROW: + { + Point pts[] = { + Point::FromInts(centreX, centreY + dimOn2), + Point::FromInts(centreX + dimOn2, centreY), + Point::FromInts(centreX, centreY - dimOn2), + Point::FromInts(centreX, centreY - dimOn4), + Point::FromInts(centreX - dimOn4, centreY - dimOn4), + Point::FromInts(centreX - dimOn4, centreY + dimOn4), Point::FromInts(centreX, centreY + dimOn4), Point::FromInts(centreX, centreY + dimOn2), - }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else if (markType == SC_MARK_LEFTRECT) { - PRectangle rcLeft = rcWhole; - rcLeft.right = rcLeft.left + 4; - surface->FillRectangle(rcLeft, back); - } else if (markType == SC_MARK_BOOKMARK) { - const int halfHeight = minDim / 3; - Point pts[] = { - Point::FromInts(ircWhole.left, centreY-halfHeight), - Point::FromInts(ircWhole.right - 3, centreY - halfHeight), - Point::FromInts(ircWhole.right - 3 - halfHeight, centreY), - Point::FromInts(ircWhole.right - 3, centreY + halfHeight), - Point::FromInts(ircWhole.left, centreY + halfHeight), - }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); - } else { // SC_MARK_FULLRECT - surface->FillRectangle(rcWhole, back); + }; + surface->Polygon(pts, ELEMENTS(pts), fore, back); + } + break; + case SC_MARK_LEFTRECT: + { + PRectangle rcLeft = rcWhole; + rcLeft.right = rcLeft.left + 4; + surface->FillRectangle(rcLeft, back); + } + break; + case SC_MARK_BOOKMARK: + { + const int halfHeight = minDim / 3; + Point pts[] = { + Point::FromInts(ircWhole.left, centreY - halfHeight), + Point::FromInts(ircWhole.right - 3, centreY - halfHeight), + Point::FromInts(ircWhole.right - 3 - halfHeight, centreY), + Point::FromInts(ircWhole.right - 3, centreY + halfHeight), + Point::FromInts(ircWhole.left, centreY + halfHeight), + }; + surface->Polygon(pts, ELEMENTS(pts), fore, back); + } + break; + default: + { + if (markType >= SC_MARK_CHARACTER) { + + char character[1]; + character[0] = static_cast(markType - SC_MARK_CHARACTER); + const XYPOSITION width = surface->WidthText(fontForCharacter, character, 1); + PRectangle rcText = rc; + rcText.left += (rc.Width() - width) / 2; + rcText.right = rc.left + width; + surface->DrawTextClipped(rcText, fontForCharacter, rcText.bottom - 2, + character, 1, fore, back); + + } + else { // SC_MARK_FULLRECT + surface->FillRectangle(rcWhole, back); + } + } } } diff --git a/src/qscint/scintilla/src/MarginView.cpp b/src/qscint/scintilla/src/MarginView.cpp index d75f9bb..3cc2025 100755 --- a/src/qscint/scintilla/src/MarginView.cpp +++ b/src/qscint/scintilla/src/MarginView.cpp @@ -364,9 +364,11 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, marks &= vs.ms[margin].mask; - PRectangle rcMarker = rcSelMargin; - rcMarker.top = static_cast(yposScreen); - rcMarker.bottom = static_cast(yposScreen + vs.lineHeight); + PRectangle rcMarker( + rcSelMargin.left, + static_cast(yposScreen), + rcSelMargin.right, + static_cast(yposScreen + vs.lineHeight)); if (vs.ms[margin].style == SC_MARGIN_NUMBER) { if (firstSubLine) { std::string sNumber; @@ -412,11 +414,12 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, if (firstSubLine) { surface->FillRectangle(rcMarker, vs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back); + PRectangle rcText = rcMarker; if (vs.ms[margin].style == SC_MARGIN_RTEXT) { const int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin); - rcMarker.left = rcMarker.right - width - 3; + rcText.left = rcText.right - width - 3; } - DrawStyledText(surface, vs, vs.marginStyleOffset, rcMarker, + DrawStyledText(surface, vs, vs.marginStyleOffset, rcText, stMargin, 0, stMargin.length, drawAll); } else { // if we're displaying annotation lines, color the margin to match the associated document line diff --git a/src/qscint/scintilla/src/UniConversion.cpp b/src/qscint/scintilla/src/UniConversion.cpp index f336759..581e33a 100755 --- a/src/qscint/scintilla/src/UniConversion.cpp +++ b/src/qscint/scintilla/src/UniConversion.cpp @@ -1,4 +1,4 @@ -// Scintilla source code edit control +// Scintilla source code edit control /** @file UniConversion.cxx ** Functions to handle UTF-8 and UTF-16 strings. **/ @@ -166,7 +166,7 @@ size_t UTF32FromUTF8(const char *s, size_t len, unsigned int *tbuf, size_t tlen) size_t ui = 0; for (size_t i = 0; i < len;) { unsigned char ch = s[i]; - const unsigned int byteCount = UTF8BytesOfLead[ch]; + unsigned int byteCount = UTF8BytesOfLead[ch]; unsigned int value; if (i + byteCount > len) { @@ -179,7 +179,12 @@ size_t UTF32FromUTF8(const char *s, size_t len, unsigned int *tbuf, size_t tlen) } if (ui == tlen) { - throw std::runtime_error("UTF32FromUTF8: attempted write beyond end"); + //在macos下面,中文输入shift+_,会导致触发这里的崩溃。发现macos下面输入shift+_,引入的两个字符——,会同时输入。 + //即这里——长度是6个字符。但是外面来的tlen=1,导致二者没有匹配。但是崩溃总不是一个好的选择。 + //我们直接强行赋值byteCount=3,然后输出拉倒。20230506 + //throw std::runtime_error("UTF32FromUTF8: attempted write beyond end"); + ui = tlen - 1; + byteCount = 3; } i++; diff --git a/src/qscint/scintilla/src/UniConversion.h b/src/qscint/scintilla/src/UniConversion.h index a7abfa9..2f0be15 100755 --- a/src/qscint/scintilla/src/UniConversion.h +++ b/src/qscint/scintilla/src/UniConversion.h @@ -1,4 +1,4 @@ -// Scintilla source code edit control +// Scintilla source code edit control /** @file UniConversion.h ** Functions to handle UTF-8 and UTF-16 strings. **/ @@ -8,6 +8,8 @@ #ifndef UNICONVERSION_H #define UNICONVERSION_H +#include "Qsci/qsciglobal.h" + namespace Scintilla { const int UTF8MaxBytes = 4; @@ -48,7 +50,8 @@ inline constexpr bool UTF8IsAscii(int ch) noexcept { } enum { UTF8MaskWidth=0x7, UTF8MaskInvalid=0x8 }; -int UTF8Classify(const unsigned char *us, size_t len) noexcept; + +QSCINTILLA_EXPORT int UTF8Classify(const unsigned char *us, size_t len) noexcept; // Similar to UTF8Classify but returns a length of 1 for invalid bytes // instead of setting the invalid flag diff --git a/src/qscint/src/InputMethod.cpp b/src/qscint/src/InputMethod.cpp index 41400b2..508f6fc 100755 --- a/src/qscint/src/InputMethod.cpp +++ b/src/qscint/src/InputMethod.cpp @@ -252,27 +252,30 @@ QVariant QsciScintillaBase::inputMethodQuery(Qt::InputMethodQuery query) const { int paraStart = sci->pdoc->ParaUp(pos); int paraEnd = sci->pdoc->ParaDown(pos); - QVarLengthArray buffer(paraEnd - paraStart + 1); - Sci_CharacterRange charRange; - charRange.cpMin = paraStart; - charRange.cpMax = paraEnd; + if (paraEnd - paraStart <= 0) + { + return ""; + } + QByteArray buffer(paraEnd - paraStart + 1,0); + //QVarLengthArray buffer(paraEnd - paraStart + 1); Sci_TextRange textRange; - textRange.chrg = charRange; + textRange.chrg.cpMin = paraStart; + textRange.chrg.cpMax = paraEnd; textRange.lpstrText = buffer.data(); - SendScintilla(SCI_GETTEXTRANGE, 0, (sptr_t)&textRange); + SendScintilla(SCI_GETTEXTRANGE, 0, &textRange); - return bytesAsText(buffer.constData()); + return bytesAsText(buffer.constData(), buffer.size()); } case Qt::ImCurrentSelection: { - QVarLengthArray buffer(SendScintilla(SCI_GETSELTEXT)); + QVarLengthArray buffer(SendScintilla(SCI_GETSELTEXT) + 1); SendScintilla(SCI_GETSELTEXT, 0, (sptr_t)buffer.data()); - return bytesAsText(buffer.constData()); + return bytesAsText(buffer.constData(), buffer.size() - 1); } default: diff --git a/src/qscint/src/Qsci/qscicommandset.h b/src/qscint/src/Qsci/qscicommandset.h index 85bb2bc..d708f52 100755 --- a/src/qscint/src/Qsci/qscicommandset.h +++ b/src/qscint/src/Qsci/qscicommandset.h @@ -35,6 +35,11 @@ QT_END_NAMESPACE class QsciScintilla; +#ifdef Q_OS_WIN +//windows系统下面,不允许随意修改默认快捷键。因为加载快捷键会降低启动速度。 +#else +#define USER_SHUT_CUT_DEF +#endif //! \brief The QsciCommandSet class represents the set of all internal editor //! commands that may have keys bound. @@ -84,6 +89,13 @@ private: QsciCommandSet(const QsciCommandSet &); QsciCommandSet &operator=(const QsciCommandSet &); + +public: +#ifdef USER_SHUT_CUT_DEF + void readUserShutKey(); + + void saveUserDefQsciShutkey(); +#endif }; #endif diff --git a/src/qscint/src/Qsci/qscilexer.h b/src/qscint/src/Qsci/qscilexer.h index 0316c91..83c9e8a 100755 --- a/src/qscint/src/Qsci/qscilexer.h +++ b/src/qscint/src/Qsci/qscilexer.h @@ -53,7 +53,7 @@ enum LangType { L_CSOUND, L_ERLANG, L_ESCRIPT, L_FORTH, L_LATEX, \ L_MMIXAL, L_NIM, L_NNCRONTAB, L_OSCRIPT, L_REBOL, \ L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG, L_TYPESCRIPT, \ - L_EDIFACT, L_MARKDOWN, L_OCTAVE, L_PO, L_POV, L_IDL, L_GO, L_GLOBAL, L_TXT, \ + L_EDIFACT, L_MARKDOWN, L_OCTAVE, L_PO, L_POV, L_IDL, L_GO, L_GLOBAL, L_LOG, L_GCode, L_APDL, L_TXT,\ // Don't use L_JS, use L_JAVASCRIPT instead // The end of enumated language type, so it should be always at the end L_EXTERNAL = 100, L_USER_DEFINE=200,L_USER_TXT,L_USER_CPP //用户自定义顺序与UserLangMother保存一致 diff --git a/src/qscint/src/Qsci/qscilexerapdl.h b/src/qscint/src/Qsci/qscilexerapdl.h new file mode 100755 index 0000000..7d96b0a --- /dev/null +++ b/src/qscint/src/Qsci/qscilexerapdl.h @@ -0,0 +1,64 @@ +#pragma once +#include +#include +#include + +class QSCINTILLA_EXPORT QsciLexerApdl : public QsciLexer +{ + Q_OBJECT + +public: + enum { + DEFAULT=0, + COMMENT, + COMMENTBLOCK, + NUMBER, + STRING, + OPERATOR, + WORD, + PROCESSOR, + COMMAND, + SLASHCOMMAND, + STARCOMMAND, + ARGUMENT, + FUNCTION, + }; + QsciLexerApdl(QObject *parent=0); + virtual ~QsciLexerApdl(); + + //! Returns the name of the language. + const char* language() const; + + 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; + + //int lexerId() 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); + + //! 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: + QsciLexerApdl(const QsciLexerApdl&); + QsciLexerApdl& operator=(const QsciLexerApdl&); +}; diff --git a/src/qscint/src/Qsci/qscilexergcode.h b/src/qscint/src/Qsci/qscilexergcode.h new file mode 100755 index 0000000..98f6bd1 --- /dev/null +++ b/src/qscint/src/Qsci/qscilexergcode.h @@ -0,0 +1,61 @@ +#pragma once +#include +#include +#include + +class QSCINTILLA_EXPORT QsciLexerGCode : public QsciLexer +{ + Q_OBJECT + +public: + enum { + DEFAULT = 0, + KEYWORD, //关键字 + KEYWORD1, //关键字 + COMMNET, + POSITIONX, //位置 X Y Z + POSITIONY, //位置 X Y Z + POSITIONZ, //位置 X Y Z + OFFSET,//I J K 偏移 + VELOCITY,//速度 F + TIMES,// P 次数 + }; + QsciLexerGCode(QObject *parent=0); + virtual ~QsciLexerGCode(); + + //! Returns the name of the language. + const char* language() const; + + 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; + + //int lexerId() 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); + + //! 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: + QsciLexerGCode(const QsciLexerGCode&); + QsciLexerGCode& operator=(const QsciLexerGCode&); +}; diff --git a/src/qscint/src/Qsci/qscilexerintelhex.h b/src/qscint/src/Qsci/qscilexerintelhex.h new file mode 100755 index 0000000..08c6260 --- /dev/null +++ b/src/qscint/src/Qsci/qscilexerintelhex.h @@ -0,0 +1,71 @@ +#pragma once +#include +#include +#include + +class QSCINTILLA_EXPORT QsciLexerIntelHex : public QsciLexer +{ + Q_OBJECT + +public: + enum { + DEFAULT=0, + RECSTART, + RECTYPE, + RECTYPE_UNKNOWN, + BYTECOUNT, + BYTECOUNT_WRONG, + NOADDRESS, + DATAADDRESS, + RECCOUNT, + STARTADDRESS, + ADDRESSFIELD_UNKNOWN, + EXTENDEDADDRESS, + DATA_ODD, + DATA_EVEN, + DATA_UNKNOWN, + DATA_EMPTY, + CHECKSUM, + CHECKSUM_WRONG, + GARBAGE, + }; + + QsciLexerIntelHex(QObject *parent=0); + virtual ~QsciLexerIntelHex(); + + //! Returns the name of the language. + const char* language() const; + + 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; + + //int lexerId() 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); + + //! 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&); +}; diff --git a/src/qscint/src/Qsci/qscilexerlisp.h b/src/qscint/src/Qsci/qscilexerlisp.h new file mode 100755 index 0000000..6362041 --- /dev/null +++ b/src/qscint/src/Qsci/qscilexerlisp.h @@ -0,0 +1,64 @@ +#pragma once +#include +#include +#include + +class QSCINTILLA_EXPORT QsciLexerLisp : public QsciLexer +{ + Q_OBJECT + +public: + enum { + DEFAULT=0, + COMMENT, + NUMBER, + KEYWORD, + KEYWORD_KW, + SYMBOL, + STRING, + STRINGEOL =8, + IDENTIFIER, + OPERATOR, + SPECIAL, + MULTI_COMMENT, + }; + + QsciLexerLisp(QObject *parent=0); + virtual ~QsciLexerLisp(); + + //! Returns the name of the language. + const char* language() const; + + 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; + + //int lexerId() 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); + + //! 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: + QsciLexerLisp(const QsciLexerLisp&); + QsciLexerLisp& operator=(const QsciLexerLisp&); +}; diff --git a/src/qscint/src/Qsci/qscilexerlog.h b/src/qscint/src/Qsci/qscilexerlog.h new file mode 100755 index 0000000..b0fbb66 --- /dev/null +++ b/src/qscint/src/Qsci/qscilexerlog.h @@ -0,0 +1,55 @@ +#pragma once +#include +#include +#include + +class QSCINTILLA_EXPORT QsciLexerLog : public QsciLexer +{ + Q_OBJECT + +public: + enum { + Default = 0, + Num= 1,//中文 + Date = 2,//英文 + Keyword = 3, //关键字,只有以TXT为母版的自定义语言才有,默认txt是没有关键字说法的 + }; + QsciLexerLog(QObject *parent=0); + virtual ~QsciLexerLog(); + + //! Returns the name of the language. + const char* language() const; + + 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; + + //int lexerId() 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); + + //! 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: + QsciLexerLog(const QsciLexerLog&); + QsciLexerLog& operator=(const QsciLexerLog&); +}; diff --git a/src/qscint/src/Qsci/qscilexerpowershell.h b/src/qscint/src/Qsci/qscilexerpowershell.h new file mode 100755 index 0000000..dddf4ec --- /dev/null +++ b/src/qscint/src/Qsci/qscilexerpowershell.h @@ -0,0 +1,69 @@ +#pragma once +#include +#include +#include + +class QSCINTILLA_EXPORT QsciLexerPowerShell : public QsciLexer +{ + Q_OBJECT + +public: + enum { + DEFAULT = 0, + COMMENT, + STRING, + CHARACTER, + NUMBER, + VARIABLE, + OPERATOR, + IDENTIFIER, + KEYWORD, + CMDLET, + ALIAS, + FUNCTION, + USER1, + COMMENTSTREAM, + HERE_STRING, + HERE_CHARACTER, + COMMENTDOCKEYWORD, + }; + + QsciLexerPowerShell(QObject *parent=0); + virtual ~QsciLexerPowerShell(); + + //! Returns the name of the language. + const char* language() const; + + 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; + + //int lexerId() 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); + + //! 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: + QsciLexerPowerShell(const QsciLexerPowerShell&); + QsciLexerPowerShell& operator=(const QsciLexerPowerShell&); +}; diff --git a/src/qscint/src/Qsci/qscimacro.h b/src/qscint/src/Qsci/qscimacro.h index 89610a5..f5ac019 100755 --- a/src/qscint/src/Qsci/qscimacro.h +++ b/src/qscint/src/Qsci/qscimacro.h @@ -30,6 +30,12 @@ class QsciScintilla; +enum USER_DEFINE_MACRO { + MACRO_FIND_NEXT = 5000,//һ + MACRO_REPLACE_ALL,//ȫ滻 + MACRO_REPLACE_ONE,//滻һ + MACRO_EXE_MENU_FUN,//ִв˵ +}; //! \brief The QsciMacro class represents a sequence of recordable editor //! commands. @@ -68,6 +74,10 @@ public: //! \sa load() QString save() const; +//signals: +// //ⲿü¼꣬qscintillaڲ +// void s_record(unsigned int msg, unsigned long wParam, void* lParam); + public slots: //! Play the macro. virtual void play(); diff --git a/src/qscint/src/Qsci/qsciscintilla.h b/src/qscint/src/Qsci/qsciscintilla.h index e339c0b..f77dc29 100755 --- a/src/qscint/src/Qsci/qsciscintilla.h +++ b/src/qscint/src/Qsci/qsciscintilla.h @@ -85,9 +85,13 @@ enum FindNextType { //! 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 QsciMacro; + class QSCINTILLA_EXPORT QsciScintilla : public QsciScintillaBase { Q_OBJECT + friend QsciMacro; public: //! This enum defines the different auto-indentation styles. @@ -1500,6 +1504,8 @@ public: //! \sa hasSelectedText() QString selectedText() const; + bool selectedRawBytes(QByteArray& bytes) const; + //! Returns whether or not the selection is drawn up to the right hand //! border. //! @@ -1670,7 +1676,8 @@ public: void setHtmlHighLightTag(bool v); bool getHtmlHighLightTag(); - /* virtual void adjuctSkinStyle() {}*/ + intptr_t searchInTarget(QByteArray& text2Find, size_t fromPos, size_t toPos) const; + public slots: //! Appends the text \a text to the end of the text edit. Note that the @@ -2124,6 +2131,7 @@ signals: //! within the line. void cursorPositionChanged(int line, int index); + //和cursorPositionChanged类似,但是只有当前行号真正发送变化后,才触发该信号。 void cursorPosChange(int line, int pos); //! This signal is emitted whenever text is selected or de-selected. @@ -2220,6 +2228,16 @@ protected: void setStylesFont(const QFont& f, int style); + //运行用户自定义的宏。故意放在最后,防止破坏兼容性 + virtual void playUserMacroRecord(unsigned int msg, unsigned long wParam, void* lParam) + { + + } + + //识别中文UTF8字符的情况。 + virtual bool startAutoWordCompletion(AutoCompletionSource acs, bool checkThresh, + bool choose_single); + private slots: void handleCallTipClick(int dir); void handleCharAdded(int charadded); @@ -2278,7 +2296,7 @@ private: int visLevels = 0, int level = -1); void setFoldMarker(int marknr, int mark = SC_MARK_EMPTY); void setLexerStyle(int style); - + void setEnabledColors(int style, QColor &fore, QColor &back); void braceMatch(); diff --git a/src/qscint/src/Qsci/qsciscintillabase.h b/src/qscint/src/Qsci/qsciscintillabase.h index 963dd38..5da571b 100755 --- a/src/qscint/src/Qsci/qsciscintillabase.h +++ b/src/qscint/src/Qsci/qsciscintillabase.h @@ -2251,6 +2251,8 @@ public: //! SCI_STOPRECORD = 3002, + SCI_GETRECORSTATUS = 3003,//是否在记录中 0 否,1是 + //! 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_* @@ -3004,7 +3006,10 @@ public: SCK_INSERT = 309, SCK_ESCAPE = 7, SCK_BACK = 8, - SCK_TAB = 9, + //20230506 最开始这里是9,我修改为了109。因为百度输入法下面,对shitf+(中文输入时 + //会先来一个8,再来一个9的映射键。恰好这两个键有冲突。其他8对应之前的删除,我已经在快捷键中把删除那个干掉了。 + //9的话对应这个缩进,所以修改为109,不使用9,这样一来,百度输入法的9会映射到其他键,而不与这里的SCK_TAB冲突。 + SCK_TAB = 109,//9, SCK_RETURN = 13, SCK_ADD = 310, SCK_SUBTRACT = 311, diff --git a/src/qscint/src/ScintillaQt.cpp b/src/qscint/src/ScintillaQt.cpp index 4efb1dd..23e29d6 100755 --- a/src/qscint/src/ScintillaQt.cpp +++ b/src/qscint/src/ScintillaQt.cpp @@ -386,7 +386,7 @@ void QsciScintillaQt::NotifyParent(SCNotification scn) emit qsb->SCN_INDICATORRELEASE(scn.position, scn.modifiers); break; - case SCN_MACRORECORD: + case SCN_MACRORECORD_ID: emit qsb->SCN_MACRORECORD(scn.message, scn.wParam, reinterpret_cast(scn.lParam)); break; diff --git a/src/qscint/src/qscicommandset.cpp b/src/qscint/src/qscicommandset.cpp index e06181f..683b064 100755 --- a/src/qscint/src/qscicommandset.cpp +++ b/src/qscint/src/qscicommandset.cpp @@ -36,6 +36,23 @@ #undef USING_OSX_KEYS #endif +#ifdef USER_SHUT_CUT_DEF +void QsciCommandSet::readUserShutKey() +{ + QString userDefFile = QString("notepad/scishortcut"); + QSettings qs(QSettings::IniFormat, QSettings::UserScope, userDefFile); + qs.setIniCodec("UTF-8"); + readSettings(qs, "qsci"); +} + +void QsciCommandSet::saveUserDefQsciShutkey() +{ + QString userDefFile = QString("notepad/scishortcut"); + QSettings qs(QSettings::IniFormat, QSettings::UserScope, userDefFile); + qs.setIniCodec("UTF-8"); + writeSettings(qs, "qsci"); +} +#endif // The ctor. QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) @@ -168,14 +185,14 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) #endif #if 0 - //测试无效 - { - QsciCommand::ParaDownExtend, - Qt::Key_BracketRight | Qt::CTRL | Qt::SHIFT, - 0, - QT_TRANSLATE_NOOP("QsciCommand", - "Extend selection down one paragraph") - }, + //测试无效 +{ + QsciCommand::ParaDownExtend, + Qt::Key_BracketRight | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Extend selection down one paragraph") +}, #endif { QsciCommand::ParaUp, @@ -261,7 +278,6 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) "Extend rectangular selection right one character") }, -#if 0 { QsciCommand::WordLeft, #if defined(USING_OSX_KEYS) @@ -272,7 +288,6 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Move left one word") }, -#endif { QsciCommand::WordLeftExtend, #if defined(USING_OSX_KEYS) @@ -283,7 +298,6 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection left one word") }, -#if 0 { QsciCommand::WordRight, #if defined(USING_OSX_KEYS) @@ -294,15 +308,12 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Move right one word") }, -#endif -#if 0 { QsciCommand::WordRightExtend, Qt::Key_Right | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection right one word") }, -#endif #if 0 { QsciCommand::WordLeftEnd, @@ -442,7 +453,7 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) { QsciCommand::VCHome, #if defined(USING_OSX_KEYS) - 0, + Qt::Key_H | Qt::META, #else Qt::Key_Home, #endif @@ -611,7 +622,7 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Move up one page") }, - /* { + { QsciCommand::PageUpExtend, Qt::Key_PageUp | Qt::SHIFT, 0, @@ -623,7 +634,7 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection up one page") - },*/ + }, { QsciCommand::PageDown, Qt::Key_PageDown, @@ -634,7 +645,7 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) #endif QT_TRANSLATE_NOOP("QsciCommand", "Move down one page") }, - /*{ + { QsciCommand::PageDownExtend, Qt::Key_PageDown | Qt::SHIFT, #if defined(USING_OSX_KEYS) @@ -654,7 +665,7 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection down one page") - },*/ + }, #if 0 { QsciCommand::StutteredPageUp, @@ -697,9 +708,12 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) QsciCommand::DeleteBack, Qt::Key_Backspace, #if defined(USING_OSX_KEYS) - Qt::Key_H | Qt::META, + 0, #else - Qt::Key_Backspace | Qt::SHIFT, + //发现百度输入法输入shift+( 会映射到第8个命令,也就是当前这条,会导致删除字符。 + // 发现这个快捷键完全是多余,将这个快捷键删除。删除后,百度输入法shift+(会与下一条冲突。20230506 + //Qt::Key_Backspace | Qt::SHIFT, + 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Delete previous character") }, @@ -711,6 +725,9 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) QT_TRANSLATE_NOOP("QsciCommand", "Delete previous character if not at start of line") }, + +#endif + { QsciCommand::DeleteWordLeft, Qt::Key_Backspace | Qt::CTRL, @@ -723,7 +740,6 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete word to right") }, -#endif #if 0 { QsciCommand::DeleteWordRightEnd, @@ -771,165 +787,164 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) 0, QT_TRANSLATE_NOOP("QsciCommand", "Copy current line") }, - /* { - QsciCommand::LineTranspose, - Qt::Key_T | Qt::SHIFT, - 0, - QT_TRANSLATE_NOOP("QsciCommand", - "Transpose current and previous lines") - },*/ -#if 0 - { - QsciCommand::LineDuplicate, - 0, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Duplicate the current line") - }, -#endif - { - QsciCommand::SelectAll, - Qt::Key_A | Qt::CTRL, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Select all") - }, -#if 0 - { - 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") - }, -#endif -#if 0 - { - QsciCommand::SelectionDuplicate, - Qt::Key_D | Qt::CTRL, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Duplicate selection") - }, -#endif - { - 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") - }, -#if 0 - { - QsciCommand::Formfeed, - 0, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Formfeed") - }, -#endif - { - QsciCommand::Tab, - Qt::Key_Tab, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Indent one level") - }, -#if 0 - { - 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") - }, -#endif - { - 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") - }, -#if 1 - { - QsciCommand::ZoomIn, - Qt::Key_Equal | Qt::CTRL, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Zoom in") - }, - { - QsciCommand::ZoomOut, - Qt::Key_Minus | Qt::CTRL, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Zoom out") - }, -#endif -#if 0 - { - QsciCommand::MoveLineUp, - Qt::Key_Up | Qt::CTRL | Qt::SHIFT, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Move Line up") - }, + /* { + QsciCommand::LineTranspose, + Qt::Key_T | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", + "Transpose current and previous lines") + },*/ + #if 0 + { + QsciCommand::LineDuplicate, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Duplicate the current line") + }, + #endif + { + QsciCommand::SelectAll, + Qt::Key_A | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Select all") + }, + #if 0 + { + 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") + }, + #endif + { + 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") + }, + #if 0 + { + QsciCommand::Formfeed, + 0, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Formfeed") + }, + #endif + { + QsciCommand::Tab, + Qt::Key_Tab, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Indent one level") + }, - { - QsciCommand::MovdLineDown, - Qt::Key_Down | Qt::CTRL | Qt::SHIFT, - 0, - QT_TRANSLATE_NOOP("QsciCommand", "Move Line down") - }, -#endif + { + QsciCommand::Backtab, + Qt::Key_Tab | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "De-indent one level") + }, + #if 0 + { + QsciCommand::Cancel, + Qt::Key_Escape, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Cancel") + }, + #endif + { + 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") + }, + #if 1 + { + QsciCommand::ZoomIn, + Qt::Key_Equal | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Zoom in") + }, + { + QsciCommand::ZoomOut, + Qt::Key_Minus | Qt::CTRL, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Zoom out") + }, + #endif + #if 0 + { + QsciCommand::MoveLineUp, + Qt::Key_Up | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move Line up") + }, + + { + QsciCommand::MovdLineDown, + Qt::Key_Down | Qt::CTRL | Qt::SHIFT, + 0, + QT_TRANSLATE_NOOP("QsciCommand", "Move Line down") + }, + #endif }; // Clear the default map. @@ -939,13 +954,20 @@ QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) // 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); + 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)); + new QsciCommand(qsci, cmd_table[i].cmd, cmd_table[i].key, + cmd_table[i].altkey, cmd_table[i].desc)); + } + +#ifdef USER_SHUT_CUT_DEF + readUserShutKey(); +#endif + } @@ -1061,3 +1083,5 @@ QsciCommand *QsciCommandSet::find(QsciCommand::Command command) const // This should never happen. return 0; } + + diff --git a/src/qscint/src/qscilexerapdl.cpp b/src/qscint/src/qscilexerapdl.cpp new file mode 100755 index 0000000..84c8213 --- /dev/null +++ b/src/qscint/src/qscilexerapdl.cpp @@ -0,0 +1,163 @@ +#include "Qsci/qscilexerapdl.h" +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include + +//#if defined(Q_OS_WIN) +// QFont QsciLexerApdl::s_defaultTxtFont("Courier New", QsciLexer::s_defaultFontSize); +//#elif defined(Q_OS_MAC) +// QFont QsciLexerApdl::s_defaultTxtFont("STSong",14); +//#else +// QFont QsciLexerApdl::s_defaultTxtFont("Courier 10 Pitch", 12); +//#endif + + +QsciLexerApdl::QsciLexerApdl(QObject *parent) + : QsciLexer(parent) +{ + setLexerId(L_APDL); + m_commentSymbol = "#"; +} + +QsciLexerApdl::~QsciLexerApdl() +{ +} + +// Returns the language name. +const char* QsciLexerApdl::language() const +{ + return "APDL"; +} + +// Returns the lexer name. +const char *QsciLexerApdl::lexer() const +{ + return "apdl"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerApdl::defaultColor(int style) const +{ + switch (style) + { + case DEFAULT: + return QColor(0x80, 0x80, 0x80); + + case COMMENT: + case COMMENTBLOCK: + return QColor(0x00, 0x7f, 0x00); + + case NUMBER: + return QColor(0xff, 0x80, 0x00); + + case PROCESSOR: + case COMMAND: + case SLASHCOMMAND: + case STARCOMMAND: + return QColor(0x00, 0x00, 0xff); + + case WORD: + case STRING: + return QColor(0x7f, 0x00, 0x7f); + default: + break; + + } + + return QsciLexer::defaultColor(style); +} + +// Returns the end-of-line fill for a style. +bool QsciLexerApdl::defaultEolFill(int style) const +{ + //if (style == VerbatimString) + // return true; + + return QsciLexer::defaultEolFill(style); +} + +// Returns the font of the text for a style. +QFont QsciLexerApdl::defaultFont(int style) const +{ + switch (style) + { + case PROCESSOR: + case COMMAND: + case SLASHCOMMAND: + case STARCOMMAND: + { + QFont f(QsciLexer::s_defaultLangFont); + f.setBold(true); + return f; + } + break; + default: + break; + } + return QsciLexer::s_defaultLangFont; +} + + +// Returns the set of keywords. +const char* QsciLexerApdl::keywords(int set) +{ + if (set == 1) + return "cfopen cfclose dim do dowhile else endif enddo finish get if then vwread vwrite"; + return 0; +} + +// Returns the user name of a style. +QString QsciLexerApdl::description(int style) const +{ + switch (style) + { + case DEFAULT: + return tr("Default"); + case COMMENT: + return tr("Comment"); + case COMMENTBLOCK: + return tr("Comment Block"); + case NUMBER: + return tr("Number"); + case STRING: + return tr("String"); + case OPERATOR: + return tr("Operator"); + case WORD: + return tr("Word"); + case PROCESSOR: + return tr("Processor"); + case COMMAND: + return tr("Command"); + case SLASHCOMMAND: + return tr("Slash Command"); + case STARCOMMAND: + return tr("Star Command"); + case ARGUMENT: + return tr("Argument"); + case FUNCTION: + return tr("Function"); + default: + break; + } + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerApdl::defaultPaper(int style) const +{ + //if (style == VerbatimString) + // return QColor(0xe0, 0xff, 0xe0); + + return QsciLexer::defaultPaper(style); +} + +// Return the lexer identifier. +//int QsciLexerApdl::lexerId() const +//{ +// return L_TXT; +//} diff --git a/src/qscint/src/qscilexerbash.cpp b/src/qscint/src/qscilexerbash.cpp index 24546ef..219cc59 100755 --- a/src/qscint/src/qscilexerbash.cpp +++ b/src/qscint/src/qscilexerbash.cpp @@ -76,9 +76,11 @@ QColor QsciLexerBash::defaultColor(int style) const return QColor(0x80,0x80,0x80); case Error: - case Backticks: return QColor(0xff,0xff,0x00); + case Backticks: + return QColor(0x00, 0x00, 0xff); + case Comment: return QColor(0x00,0x7f,0x00); @@ -261,9 +263,6 @@ QColor QsciLexerBash::defaultPaper(int style) const case ParameterExpansion: return QColor(0xff,0xff,0xe0); - case Backticks: - return QColor(0xa0,0x80,0x80); - case HereDocumentDelimiter: case SingleQuotedHereDocument: return QColor(0xdd,0xd0,0xdd); diff --git a/src/qscint/src/qscilexercpp.cpp b/src/qscint/src/qscilexercpp.cpp index bb59df7..63d5f55 100755 --- a/src/qscint/src/qscilexercpp.cpp +++ b/src/qscint/src/qscilexercpp.cpp @@ -135,10 +135,10 @@ QColor QsciLexerCPP::defaultColor(int style) const return QColor(0x3f, 0x70, 0x3f); case Number: - return QColor(0x00, 0x7f, 0x7f); + return QColor(0xff, 0x80, 0x00); case Keyword: - return QColor(0x80, 0x00, 0xff); + return QColor(0x00,0x00,0xff); case DoubleQuotedString: case SingleQuotedString: @@ -150,7 +150,7 @@ QColor QsciLexerCPP::defaultColor(int style) const case Operator: case UnclosedString: - return QColor(0x00, 0x00, 0x00); + return QColor(0x00, 0x00, 0x80); case VerbatimString: case TripleQuotedVerbatimString: @@ -274,21 +274,24 @@ QFont QsciLexerCPP::defaultFont(int style) const case InactiveCommentDocKeywordError: case TaskMarker: case InactiveTaskMarker: + { #if defined(Q_OS_WIN) - f = QFont("Courier New",QsciLexer::s_defaultFontSize); + f = QFont("Courier New", QsciLexer::s_defaultFontSize); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else - f = QFont("Bitstream Vera Serif",9); + f = QsciLexer::s_defaultLangFont; #endif + } break; case Keyword: case InactiveKeyword: case Operator: case InactiveOperator: + f = QsciLexer::defaultFont(style); - f.setBold(false); + f.setBold(true); break; case DoubleQuotedString: @@ -306,11 +309,11 @@ QFont QsciLexerCPP::defaultFont(int style) const case HashQuotedString: case InactiveHashQuotedString: #if defined(Q_OS_WIN) - f = QFont("Courier New",QsciLexer::s_defaultFontSize); + f = QFont("Courier New", QsciLexer::s_defaultFontSize); #elif defined(Q_OS_MAC) f = QFont("Courier", 12); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = QsciLexer::s_defaultLangFont; #endif break; @@ -344,9 +347,9 @@ const char *QsciLexerCPP::keywords(int set) "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 " + "inline int long mutable namespace new not not_eq nullptr null " + "out operator or or_eq private protected public println register " + "reinterpret_cast return short signed sizeof static system " "static_cast struct switch template this throw true " "try typedef typeid typename union unsigned using " "virtual void volatile wchar_t while xor xor_eq"; diff --git a/src/qscint/src/qscilexerfortran77.cpp b/src/qscint/src/qscilexerfortran77.cpp index 16aca01..770a26b 100755 --- a/src/qscint/src/qscilexerfortran77.cpp +++ b/src/qscint/src/qscilexerfortran77.cpp @@ -100,7 +100,7 @@ QColor QsciLexerFortran77::defaultColor(int style) const return QColor(0x7f,0x7f,0x00); case Label: - return QColor(0xe0,0xc0,0xe0); + return QColor(0x00,0x00,0x00); } return QsciLexer::defaultColor(style); @@ -136,6 +136,7 @@ QFont QsciLexerFortran77::defaultFont(int style) const case Operator: case DottedOperator: + case Keyword: f = QsciLexer::defaultFont(style); f.setBold(true); break; @@ -240,6 +241,9 @@ QColor QsciLexerFortran77::defaultPaper(int style) const if (style == Continuation) return QColor(0xf0,0xe0,0x80); + + if (style == Label) + return QColor(0xe0,0xc0,0xe0); return QsciLexer::defaultPaper(style); } diff --git a/src/qscint/src/qscilexergcode.cpp b/src/qscint/src/qscilexergcode.cpp new file mode 100755 index 0000000..ce32ada --- /dev/null +++ b/src/qscint/src/qscilexergcode.cpp @@ -0,0 +1,157 @@ +#include "Qsci/qscilexergcode.h" +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include + +QsciLexerGCode::QsciLexerGCode(QObject *parent) + : QsciLexer(parent) +{ + setLexerId(L_GCode); + m_commentSymbol = ";"; +} + +QsciLexerGCode::~QsciLexerGCode() +{ +} + +// Returns the language name. +const char* QsciLexerGCode::language() const +{ + return "GCode"; +} + +// Returns the lexer name. +const char *QsciLexerGCode::lexer() const +{ + return "gcode"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerGCode::defaultColor(int style) const +{ + switch (style) + { + case KEYWORD: + return QColor(0, 0, 255); + case KEYWORD1: + return QColor(0, 0, 128); + case POSITIONX: + return QColor(128, 0, 0); + case POSITIONY: + return QColor(0, 128, 0); + case POSITIONZ: + return QColor(0, 0, 128); + case OFFSET: + return QColor(255, 128, 0); + case VELOCITY: + return QColor(255, 0, 0); + case COMMNET: + return QColor(0, 128, 0); + case TIMES: + return QColor(127, 127, 0); + default: + break; + } + + return QsciLexer::defaultColor(style); +} + +// Returns the end-of-line fill for a style. +bool QsciLexerGCode::defaultEolFill(int style) const +{ + return QsciLexer::defaultEolFill(style); +} + +// Returns the font of the text for a style. +QFont QsciLexerGCode::defaultFont(int style) const +{ + switch (style) + { + case KEYWORD: + case KEYWORD1: + case VELOCITY: +#if defined(Q_OS_MAC) + { + QFont f("Courier New", 18); + f.setBold(true); + return f; + } +#else + { + QFont f(s_defaultLangFont); + f.setBold(true); + return f; + } +#endif + break; + default: + break; +} + return QsciLexer::s_defaultLangFont; +} + + +// Returns the set of keywords. +const char* QsciLexerGCode::keywords(int set) +{ + if (set == 1) + return "G00 G01 G1 G02 G2 G03 G04 G05 G06 G07 G08 G09 G10 G16 G17 G18 G19 G20 " + "G21 G22 G22 G23 G23 G24 G25 G26 G28 G30 G31 G32 G33 G34 G35 G40 G41 G42 G43 G44 " + "G45 G46 G47 G48 G49 G50 G51 G52 G53 G54 G55 G56 G57 G58 G59 G60 G61 G62 G63 " + "G68 G69 G70 G71 G74 G75 G76 G80 G81 G33 G90 G91 G92 G93 G94 G95 G96 G97"; + + if (set == 2) + return "M00 M104 M02 M109 M03 M140 M04 M190 M05 M106 M06 M08 M09 M30"; + + return 0; +} + +// Returns the user name of a style. +QString QsciLexerGCode::description(int style) const +{ + switch (style) + { + case DEFAULT: + return tr("Default"); + case KEYWORD: + return tr("keyword"); + case KEYWORD1: + return tr("Keyword1"); + case COMMNET: + return tr("Comment"); + case POSITIONX: + return tr("Position-X"); + case POSITIONY: + return tr("Position-Y"); + case POSITIONZ: + return tr("Position-Z"); + case OFFSET: + return tr("Offset"); + case VELOCITY: + return tr("Velocity"); + case TIMES: + return tr("Times"); + default: + break; + } + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerGCode::defaultPaper(int style) const +{ + //if (style == VerbatimString) + // return QColor(0xe0, 0xff, 0xe0); + + return QsciLexer::defaultPaper(style); +} + +// Return the lexer identifier. +//int QsciLexerGCode::lexerId() const +//{ +// return L_TXT; +//} diff --git a/src/qscint/src/qscilexerglobal.cpp b/src/qscint/src/qscilexerglobal.cpp index d24c97b..26e48b1 100755 --- a/src/qscint/src/qscilexerglobal.cpp +++ b/src/qscint/src/qscilexerglobal.cpp @@ -363,7 +363,7 @@ QColor QsciLexerGlobal::defaultPaper(int style) const return QColor(0xE0E0E0); case FOLD: - return QColor(0xF3F3F3); + return QColor(0xFFFF7F); case FOLD_ACTIVE: return QColor(0x2E3436); @@ -456,7 +456,7 @@ int QsciLexerGlobal::changeOperBit(int style) const return BG_BIT; case SELECT_TEXT_COLOR: - return FG_BIT | BG_BIT; + return /*FG_BIT |*/ BG_BIT; case CARET_COLOUR: return FG_BIT; diff --git a/src/qscint/src/qscilexerhtml.cpp b/src/qscint/src/qscilexerhtml.cpp index c30e1d6..54a07b9 100755 --- a/src/qscint/src/qscilexerhtml.cpp +++ b/src/qscint/src/qscilexerhtml.cpp @@ -583,13 +583,13 @@ QString QsciLexerHTML::description(int style) const return tr("Unknown attribute"); case HTMLNumber: - return tr("HTML number"); + return tr("Number"); case HTMLDoubleQuotedString: - return tr("HTML double-quoted string"); + return tr("double-quoted string"); case HTMLSingleQuotedString: - return tr("HTML single-quoted string"); + return tr("single-quoted string"); case OtherInTag: return tr("Other text in a tag"); diff --git a/src/qscint/src/qscilexerintelhex.cpp b/src/qscint/src/qscilexerintelhex.cpp new file mode 100755 index 0000000..3ce6ff0 --- /dev/null +++ b/src/qscint/src/qscilexerintelhex.cpp @@ -0,0 +1,213 @@ +#include "Qsci/qscilexerintelhex.h" +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include + + +QsciLexerIntelHex::QsciLexerIntelHex(QObject *parent) + : QsciLexer(parent) +{ + setLexerId(L_IHEX); + m_commentSymbol = ";"; +} + +QsciLexerIntelHex::~QsciLexerIntelHex() +{ +} + +// Returns the language name. +const char* QsciLexerIntelHex::language() const +{ + return "IHEX"; +} + +// Returns the lexer name. +const char *QsciLexerIntelHex::lexer() const +{ + return "ihex"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerIntelHex::defaultColor(int style) const +{ + switch (style) + { + case DEFAULT: + return QColor(); + + case RECSTART: + case RECTYPE: + case RECTYPE_UNKNOWN: + return QColor(127, 0, 0); + + case BYTECOUNT: + return QColor(127,127,0); + + case BYTECOUNT_WRONG: + return QColor(255,255,0); + + case NOADDRESS: + return QColor(127,0,255); + + case DATAADDRESS: + case STARTADDRESS: + case EXTENDEDADDRESS: + return QColor(0, 127, 255); + + case CHECKSUM: + return QColor(0,191,0); + + case CHECKSUM_WRONG: + return QColor(255,255,0); + + case GARBAGE: + return QColor(); + default: + break; + + } + + return QsciLexer::defaultColor(style); +} + +// Returns the end-of-line fill for a style. +bool QsciLexerIntelHex::defaultEolFill(int style) const +{ + + return QsciLexer::defaultEolFill(style); +} + +// Returns the font of the text for a style. +QFont QsciLexerIntelHex::defaultFont(int style) const +{ + switch (style) + { + case DATA_ODD: +#if defined(Q_OS_MAC) + { + QFont f("Courier New", 18); + f.setBold(true); + return f; + } +#else + { + QFont f(s_defaultLangFont); + f.setBold(true); + return f; + } +#endif + break; + case GARBAGE: + case DATA_UNKNOWN: + case ADDRESSFIELD_UNKNOWN: + case RECTYPE_UNKNOWN: +#if defined(Q_OS_MAC) + { + QFont f("Courier New", 18); + f.setItalic(true); + return f; + } +#else + { + QFont f(s_defaultLangFont); + f.setItalic(true); + return f; + } +#endif + break; + default: + break; + } + return QsciLexer::s_defaultLangFont; +} + + +// Returns the set of keywords. +const char* QsciLexerIntelHex::keywords(int set) +{ + return 0; +} + +// Returns the user name of a style. +QString QsciLexerIntelHex::description(int style) const +{ + switch (style) + { + case DEFAULT: + return("Default"); + + case RECSTART: + return ("Recstart"); + + case RECTYPE: + return ("Rectype"); + + case RECTYPE_UNKNOWN: + return ("Rectype Unknown"); + + case BYTECOUNT: + return ("Byte Count"); + + case BYTECOUNT_WRONG: + return ("Bytecount Wrong"); + + case NOADDRESS: + return ("Noaddress"); + + case DATAADDRESS: + return ("Data Address"); + + case RECCOUNT: + return ("Reccount"); + + case STARTADDRESS: + return ("Start address"); + + case ADDRESSFIELD_UNKNOWN: + return ("Addressfield Unknown"); + + case EXTENDEDADDRESS: + return ("Extended Address"); + + case DATA_ODD: + return ("Data Odd"); + + case DATA_EVEN: + return ("Data Even"); + + case DATA_UNKNOWN: + return ("Data Unknown"); + + case DATA_EMPTY: + return ("Data Empty"); + + case CHECKSUM: + return ("Checksum"); + + case CHECKSUM_WRONG: + return ("Checksum Wrong"); + + case GARBAGE: + return ("Garbage"); + } + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerIntelHex::defaultPaper(int style) const +{ + switch(style) + { + case BYTECOUNT_WRONG: + case CHECKSUM_WRONG: + return QColor(255, 0, 0); + + default: + break; + } + return QsciLexer::defaultPaper(style); +} diff --git a/src/qscint/src/qscilexerjson.cpp b/src/qscint/src/qscilexerjson.cpp index 5ff45ce..4d93434 100755 --- a/src/qscint/src/qscilexerjson.cpp +++ b/src/qscint/src/qscilexerjson.cpp @@ -60,7 +60,7 @@ QColor QsciLexerJSON::defaultColor(int style) const { case UnclosedString: case Error: - return QColor(0xff, 0xff, 0xff); + return QColor(0x0, 0x0, 0x0); case Number: return QColor(0x00, 0x7f, 0x7f); diff --git a/src/qscint/src/qscilexerlisp.cpp b/src/qscint/src/qscilexerlisp.cpp new file mode 100755 index 0000000..52e9b0b --- /dev/null +++ b/src/qscint/src/qscilexerlisp.cpp @@ -0,0 +1,164 @@ +#include "Qsci/qscilexerlisp.h" +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include + + +QsciLexerLisp::QsciLexerLisp(QObject *parent) + : QsciLexer(parent) +{ + setLexerId(L_LISP); + m_commentSymbol = ";"; +} + +QsciLexerLisp::~QsciLexerLisp() +{ +} + +// Returns the language name. +const char* QsciLexerLisp::language() const +{ + return "LISP"; +} + +// Returns the lexer name. +const char *QsciLexerLisp::lexer() const +{ + return "lisp"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerLisp::defaultColor(int style) const +{ + switch (style) + { + case COMMENT: + return QColor(0, 128, 0); + case NUMBER: + return QColor(255, 128, 0); + case KEYWORD: + case KEYWORD_KW: + return QColor(0, 0, 255); + case SYMBOL: + return QColor(0, 0, 128); + case STRING: + case MULTI_COMMENT: + return QColor(128, 128, 128); + case OPERATOR: + return QColor(0, 128, 192); + case SPECIAL: + return QColor(128, 0, 0); + default: + break; + + } + + return QsciLexer::defaultColor(style); +} + +// Returns the end-of-line fill for a style. +bool QsciLexerLisp::defaultEolFill(int style) const +{ + + return QsciLexer::defaultEolFill(style); +} + +// Returns the font of the text for a style. +QFont QsciLexerLisp::defaultFont(int style) const +{ + switch (style) + { + case KEYWORD: + case SYMBOL: +#if defined(Q_OS_MAC) + { + QFont f("Courier New", 18); + f.setBold(true); + return f; + } +#else + { + QFont f(s_defaultLangFont); + f.setBold(true); + return f; + } +#endif + break; + default: + break; + } + return QsciLexer::s_defaultLangFont; +} + + +// Returns the set of keywords. +const char* QsciLexerLisp::keywords(int set) +{ + if (set == 1) + return "not defun + - * / = < > <= >= princ eval apply funcall quote identity function complement backquote lambda set " + "setq setf defmacro gensym make symbol intern name value plist get getf putprop remprop hash array aref " + "car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar " + "cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr cons list append reverse last nth nthcdr " + "member assoc subst sublis nsubst nsublis remove length mapc mapcar mapl maplist mapcan mapcon rplaca rplacd nconc delete " + "atom symbolp numberp boundp null listp consp minusp zerop plusp evenp oddp eq eql equal cond case and or let l if " + "prog prog1 prog2 progn go return do dolist dotimes catch throw error cerror break continue errset baktrace evalhook " + "truncate float rem min max abs sin cos tan expt exp sqrt random logand logior logxor lognot bignums logeqv lognand lognor " + "logorc2 logtest logbitp logcount integer nil"; + + return 0; +} + +// Returns the user name of a style. +QString QsciLexerLisp::description(int style) const +{ + switch (style) + { + case DEFAULT: + return("Default"); + + case COMMENT: + return ("Comment"); + + case NUMBER: + return ("Number"); + + case KEYWORD: + return ("Keyword"); + + case KEYWORD_KW: + return ("Keyword_kw"); + + case SYMBOL: + return ("Symbol"); + + case STRING: + return ("String"); + + case STRINGEOL: + return ("String Eol"); + + case IDENTIFIER: + return ("Identifier"); + + case OPERATOR: + return ("Operator"); + + case SPECIAL: + return ("Special"); + + case MULTI_COMMENT: + return ("Multi Comment"); + } + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerLisp::defaultPaper(int style) const +{ + + return QsciLexer::defaultPaper(style); +} diff --git a/src/qscint/src/qscilexerlog.cpp b/src/qscint/src/qscilexerlog.cpp new file mode 100755 index 0000000..4dd1817 --- /dev/null +++ b/src/qscint/src/qscilexerlog.cpp @@ -0,0 +1,145 @@ +#include "Qsci/qscilexerlog.h" +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include + +//#if defined(Q_OS_WIN) +// QFont QsciLexerLog::s_defaultTxtFont("Courier New", QsciLexer::s_defaultFontSize); +//#elif defined(Q_OS_MAC) +// QFont QsciLexerLog::s_defaultTxtFont("STSong",14); +//#else +// QFont QsciLexerLog::s_defaultTxtFont("Courier 10 Pitch", 12); +//#endif + + +QsciLexerLog::QsciLexerLog(QObject *parent) + : QsciLexer(parent) +{ + setLexerId(L_LOG); + m_commentSymbol = "#"; +} + +QsciLexerLog::~QsciLexerLog() +{ +} + +// Returns the language name. +const char* QsciLexerLog::language() const +{ + return "LOG"; +} + +// Returns the lexer name. +const char *QsciLexerLog::lexer() const +{ + return "log"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerLog::defaultColor(int style) const +{ + switch (style) + { + case Num: + return QColor(0, 0, 255); + case Keyword: + return QColor(163, 21, 21); + case Date: + return QColor(0, 128, 0); + + default: + break; + + } + + return QsciLexer::defaultColor(style); +} + +// Returns the end-of-line fill for a style. +bool QsciLexerLog::defaultEolFill(int style) const +{ + //if (style == VerbatimString) + // return true; + + return QsciLexer::defaultEolFill(style); +} + +// Returns the font of the text for a style. +QFont QsciLexerLog::defaultFont(int style) const +{ + switch (style) + { + case Default: + return QsciLexer::s_defaultLangFont; + case Num: + case Date: + return QsciLexer::s_defaultLangFont; + case Keyword: +#if defined(Q_OS_WIN) + return QsciLexer::s_defaultLangFont; +#elif defined(Q_OS_MAC) + { + QFont f(QsciLexer::s_defaultLangFont); + f.setBold(true); + return f; + } +#else + { + QFont f(s_defaultLangFont); + f.setBold(true); + return f; + } +#endif + break; + default: + break; +} + return QsciLexer::s_defaultLangFont; +} + + +// Returns the set of keywords. +const char* QsciLexerLog::keywords(int set) +{ + if (set == 1) + return "info error debug warn "; + return 0; +} + +// Returns the user name of a style. +QString QsciLexerLog::description(int style) const +{ + switch (style) + { + case Default: + return tr("Default"); + case Num: + return tr("Num"); + case Date: + return tr("Date"); + case Keyword: + return tr("Keyword"); + default: + break; + } + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerLog::defaultPaper(int style) const +{ + //if (style == VerbatimString) + // return QColor(0xe0, 0xff, 0xe0); + + return QsciLexer::defaultPaper(style); +} + +// Return the lexer identifier. +//int QsciLexerLog::lexerId() const +//{ +// return L_TXT; +//} diff --git a/src/qscint/src/qscilexerpowershell.cpp b/src/qscint/src/qscilexerpowershell.cpp new file mode 100755 index 0000000..b863d24 --- /dev/null +++ b/src/qscint/src/qscilexerpowershell.cpp @@ -0,0 +1,209 @@ +#include "Qsci/qscilexerpowershell.h" +#include "Qsci/qsciscintillabase.h" + +#include +#include +#include + + +QsciLexerPowerShell::QsciLexerPowerShell(QObject *parent) + : QsciLexer(parent) +{ + setLexerId(L_POWERSHELL); + m_commentSymbol = ";"; +} + +QsciLexerPowerShell::~QsciLexerPowerShell() +{ +} + +// Returns the language name. +const char* QsciLexerPowerShell::language() const +{ + return "POWERSHELL"; +} + +// Returns the lexer name. +const char *QsciLexerPowerShell::lexer() const +{ + return "powershell"; +} + + +// Returns the foreground colour of the text for a style. +QColor QsciLexerPowerShell::defaultColor(int style) const +{ + switch (style) + { + case COMMENT: + return QColor(0, 128, 0); + + case CHARACTER: + case STRING: + return QColor(128, 128, 128); + + case NUMBER: + return QColor(255, 128, 0); + + case OPERATOR: + return QColor(0, 0, 128); + + case KEYWORD: + return QColor(0, 0, 255); + + case CMDLET: + return QColor(128, 0, 255); + + case ALIAS: + return QColor(0, 128, 255); + + case COMMENTSTREAM: + return QColor(0, 128, 128); + + case HERE_STRING: + case HERE_CHARACTER: + case COMMENTDOCKEYWORD: + return QColor(0, 128, 128); + + default: + break; + + } + + return QsciLexer::defaultColor(style); +} + +// Returns the end-of-line fill for a style. +bool QsciLexerPowerShell::defaultEolFill(int style) const +{ + + return QsciLexer::defaultEolFill(style); +} + +// Returns the font of the text for a style. +QFont QsciLexerPowerShell::defaultFont(int style) const +{ + switch (style) + { + case VARIABLE: + case OPERATOR: + case KEYWORD: + case COMMENTDOCKEYWORD: +#if defined(Q_OS_MAC) + { + QFont f("Courier New", 18); + f.setBold(true); + return f; + } +#else + { + QFont f(s_defaultLangFont); + //f.setBold(true); + return f; + } +#endif + default: + break; + } + return QsciLexer::s_defaultLangFont; +} + + +// Returns the set of keywords. +const char* QsciLexerPowerShell::keywords(int set) +{ + if (set == 1) + return "break continue do else elseif filter for foreach function if in return switch until where while"; + + if (set == 2) + return "add-content add-history add-member add-pssnapin clear-content clear-item clear-itemproperty clear-variable " + "compare-object convertfrom-securestring convert-path convertto-html convertto-securestring copy-item copy-itemproperty " + "export-alias export-clixml export-console export-csv foreach-object format-custom format-list format-table format-wide " + "get-acl get-alias get-authenticodesignature get-childitem get-command get-content get-credential get-culture get-date " + "get-eventlog get-executionpolicy get-help get-history get-host get-item get-itemproperty get-location get-member " + "get-pfxcertificate get-process get-psdrive get-psprovider get-pssnapin get-service get-tracesource get-uiculture " + "get-unique get-variable get-wmiobject group-object import-alias import-clixml import-csv invoke-expression invoke-history " + "invoke-item join-path measure-command measure-object move-item move-itemproperty new-alias new-item new-itemproperty " + "new-object new-psdrive new-service new-timespan new-variable out-default out-file out-host out-null out-printer out-string " + "pop-location push-location read-host remove-item remove-itemproperty remove-psdrive remove-pssnapin remove-variable " + "rename-item rename-itemproperty resolve-path restart-service resume-service select-object select-string set-acl set-alias " + "set-authenticodesignature set-content set-date set-executionpolicy set-item set-itemproperty set-location set-psdebug " + "set-service set-tracesource set-variable sort-object split-path start-service start-sleep start-transcript stop-process " + "stop-service stop-transcript suspend-service tee-object test-path trace-command update-formatdata update-typedata " + "where-object write-debug write-error write-host write-output write-progress write-verbose write-warning"; + + if (set == 3) + return "ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl foreach ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv " + "gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep " + "sort sp spps spsv sv tee where write cat cd clear cp h history kill lp ls mount mv popd ps pushd pwd r rm rmdir echo cls chdir " + "copy del dir erase move rd ren set type"; + + if (set == 6) + return "component description example externalhelp forwardhelpcategory forwardhelptargetname functionality inputs link notes outputs parameter remotehelprunspace role synopsis"; + + return 0; +} + +// Returns the user name of a style. +QString QsciLexerPowerShell::description(int style) const +{ + switch (style) + { + case DEFAULT: + return "Default"; + case COMMENT: + return "Comment"; + + case STRING: + return "String"; + + case CHARACTER: + return "Character"; + + case NUMBER: + return "Number"; + + case VARIABLE: + return "Variable"; + + case OPERATOR: + return "Operator"; + + case KEYWORD: + return "Keyword"; + + case CMDLET: + return "Cmdlet"; + + case ALIAS: + return "Alias"; + + case FUNCTION: + return "Function"; + + case USER1: + return "User1"; + + case COMMENTSTREAM: + return "Comment stream"; + + case HERE_STRING: + return "Here String"; + + case HERE_CHARACTER: + return "Here Character"; + + case COMMENTDOCKEYWORD: + return "Comment Doc Keyword"; + + } + return QString(); +} + + +// Returns the background colour of the text for a style. +QColor QsciLexerPowerShell::defaultPaper(int style) const +{ + + return QsciLexer::defaultPaper(style); +} diff --git a/src/qscint/src/qscilexertext.cpp b/src/qscint/src/qscilexertext.cpp index 0fa4c49..a39129f 100755 --- a/src/qscint/src/qscilexertext.cpp +++ b/src/qscint/src/qscilexertext.cpp @@ -6,7 +6,7 @@ #include #if defined(Q_OS_WIN) -QFont QsciLexerText::s_defaultTxtFont(u8"宋体", QsciLexer::s_defaultFontSize); + QFont QsciLexerText::s_defaultTxtFont("Courier New", QsciLexer::s_defaultFontSize); #elif defined(Q_OS_MAC) QFont QsciLexerText::s_defaultTxtFont("STSong",14); #else diff --git a/src/qscint/src/qscilexeryaml.cpp b/src/qscint/src/qscilexeryaml.cpp index 505eab6..217b415 100755 --- a/src/qscint/src/qscilexeryaml.cpp +++ b/src/qscint/src/qscilexeryaml.cpp @@ -101,46 +101,20 @@ bool QsciLexerYAML::defaultEolFill(int style) const // Returns the font of the text for a style. QFont QsciLexerYAML::defaultFont(int style) const { - QFont f; + QFont f(QsciLexer::s_defaultLangFont); switch (style) { case Default: case TextBlockMarker: -#if defined(Q_OS_WIN) - f = QFont("Courier New", 14); -#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 + case Identifier: 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; diff --git a/src/qscint/src/qscimacro.cpp b/src/qscint/src/qscimacro.cpp index c216cae..eb51cbc 100755 --- a/src/qscint/src/qscimacro.cpp +++ b/src/qscint/src/qscimacro.cpp @@ -162,7 +162,7 @@ bool QsciMacro::load(const QString &asc) macro.append(cmd); } - + if (!ok) macro.clear(); @@ -229,8 +229,18 @@ void QsciMacro::play() QList::const_iterator it; for (it = macro.begin(); it != macro.end(); ++it) - qsci->SendScintilla((*it).msg, static_cast((*it).wParam), + { + if (it->msg >= 5000) + { + qsci->playUserMacroRecord((*it).msg, static_cast((*it).wParam), + (void*) (*it).text.constData()); + } + else + { + qsci->SendScintilla((*it).msg, static_cast((*it).wParam), (*it).text.constData()); + } + } } @@ -292,8 +302,16 @@ void QsciMacro::record(unsigned int msg, unsigned long wParam, void *lParam) case QsciScintillaBase::SCI_APPENDTEXT: case QsciScintillaBase::SCI_SEARCHNEXT: case QsciScintillaBase::SCI_SEARCHPREV: + + case MACRO_FIND_NEXT://һҪflag + case MACRO_REPLACE_ALL: + case MACRO_REPLACE_ONE: m.text.append(reinterpret_cast(lParam)); break; + + case MACRO_EXE_MENU_FUN: + m.text.append(QByteArray::number((int)wParam)); + break; } macro.append(m); diff --git a/src/qscint/src/qscintilla.pro b/src/qscint/src/qscintilla.pro index 8cab273..67fba88 100755 --- a/src/qscint/src/qscintilla.pro +++ b/src/qscint/src/qscintilla.pro @@ -22,6 +22,7 @@ TEMPLATE = lib CONFIG += qt warn_off thread exceptions hide_symbols release staticlib +DEFINES+= QT_NO_DEBUG_OUTPUT CONFIG(debug, debug|release) { mac: { @@ -33,11 +34,11 @@ CONFIG(debug, debug|release) { TARGET = qmyedit_qt$${QT_MAJOR_VERSION} } } - + DESTDIR = ../../x64/Debug } else { TARGET = qmyedit_qt$${QT_MAJOR_VERSION} - + DESTDIR = ../../x64/Release } @@ -103,6 +104,7 @@ HEADERS = \ ./Qsci/qscicommandset.h \ ./Qsci/qscidocument.h \ ./Qsci/qscilexer.h \ + ./Qsci/qscilexerapdl.h \ ./Qsci/qscilexerasm.h \ ./Qsci/qscilexerbash.h \ ./Qsci/qscilexerbatch.h \ @@ -118,15 +120,19 @@ HEADERS = \ ./Qsci/qscilexerfortran.h \ ./Qsci/qscilexerfortran77.h \ ./Qsci/qscilexergo.h \ + ./Qsci/qscilexergcode.h \ ./Qsci/qscilexerglobal.h \ ./Qsci/qscilexertext.h \ ./Qsci/qscilexerrust.h \ ./Qsci/qscilexerhtml.h \ ./Qsci/qscilexeridl.h \ + ./Qsci/qscilexerintelhex.h \ ./Qsci/qscilexerjava.h \ ./Qsci/qscilexerjavascript.h \ ./Qsci/qscilexerjson.h \ ./Qsci/qscilexerlua.h \ + ./Qsci/qscilexerlog.h \ + ./Qsci/qscilexerlisp.h \ ./Qsci/qscilexermakefile.h \ ./Qsci/qscilexermarkdown.h \ ./Qsci/qscilexermatlab.h \ @@ -134,6 +140,7 @@ HEADERS = \ ./Qsci/qscilexerpascal.h \ ./Qsci/qscilexerperl.h \ ./Qsci/qscilexerpostscript.h \ + ./Qsci/qscilexerpowershell.h \ ./Qsci/qscilexerpo.h \ ./Qsci/qscilexerpov.h \ ./Qsci/qscilexerproperties.h \ @@ -224,7 +231,6 @@ HEADERS = \ !ios:HEADERS += ./Qsci/qsciprinter.h SOURCES = \ - qscilexertext.cpp \ qscilexerrust.cpp \ qscilexernsis.cpp \ qsciscintilla.cpp \ @@ -235,6 +241,7 @@ SOURCES = \ qscicommandset.cpp \ qscidocument.cpp \ qscilexer.cpp \ + qscilexerapdl.cpp \ qscilexerasm.cpp \ qscilexerbash.cpp \ qscilexerbatch.cpp \ @@ -251,13 +258,17 @@ SOURCES = \ qscilexerfortran77.cpp \ qscilexergo.cpp \ qscilexerglobal.cpp \ + qscilexergcode.cpp \ qscilexertext.cpp \ qscilexerhtml.cpp \ qscilexeridl.cpp \ + qscilexerintelhex.cpp \ qscilexerjava.cpp \ qscilexerjavascript.cpp \ qscilexerjson.cpp \ qscilexerlua.cpp \ + qscilexerlog.cpp \ + qscilexerlisp.cpp \ qscilexermakefile.cpp \ qscilexermarkdown.cpp \ qscilexermatlab.cpp \ @@ -265,6 +276,7 @@ SOURCES = \ qscilexerpascal.cpp \ qscilexerperl.cpp \ qscilexerpostscript.cpp \ + qscilexerpowershell.cpp \ qscilexerpo.cpp \ qscilexerpov.cpp \ qscilexerproperties.cpp \ @@ -331,6 +343,7 @@ SOURCES = \ ../scintilla/lexers/LexForth.cpp \ ../scintilla/lexers/LexFortran.cpp \ ../scintilla/lexers/LexGAP.cpp \ + ../scintilla/lexers/LexGCode.cpp \ ../scintilla/lexers/LexGui4Cli.cpp \ ../scintilla/lexers/LexHTML.cpp \ ../scintilla/lexers/LexHaskell.cpp \ @@ -344,6 +357,7 @@ SOURCES = \ ../scintilla/lexers/LexLisp.cpp \ ../scintilla/lexers/LexLout.cpp \ ../scintilla/lexers/LexLua.cpp \ + ../scintilla/lexers/LexLog.cpp \ ../scintilla/lexers/LexMMIXAL.cpp \ ../scintilla/lexers/LexMPT.cpp \ ../scintilla/lexers/LexMSSQL.cpp \ @@ -443,7 +457,7 @@ SOURCES = \ ../scintilla/boostregex/BoostRegExSearch.cpp \ ../scintilla/boostregex/UTF8DocumentIterator.cpp - + INCLUDEPATH += ../scintilla/boostregex !ios:SOURCES += qsciprinter.cpp diff --git a/src/qscint/src/qscintilla.vcxproj.filters b/src/qscint/src/qscintilla.vcxproj.filters new file mode 100755 index 0000000..80ada75 --- /dev/null +++ b/src/qscint/src/qscintilla.vcxproj.filters @@ -0,0 +1,1255 @@ + + + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts;xlf + false + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts;xlf + false + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + + + + Generated Files + + + Generated Files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Translation Files + + + \ No newline at end of file diff --git a/src/qscint/src/qscintilla_ch.ts b/src/qscint/src/qscintilla_ch.ts index 0b427da..feb6d19 100755 --- a/src/qscint/src/qscintilla_ch.ts +++ b/src/qscint/src/qscintilla_ch.ts @@ -4,477 +4,497 @@ QsciCommand - + Move down one line - + Extend selection down one line - + Extend rectangular selection down one line - + Scroll view down one line - + Move up one line - + Extend selection up one line - + Extend rectangular selection up one line - + Scroll view up one line - + Scroll to start of document - + Scroll to end of document - + Scroll vertically to centre current line - + Move down one paragraph - + Extend selection down one paragraph - + Move up one paragraph - + Extend selection up one paragraph - + Move left one character - + Extend selection left one character - + Extend rectangular selection left one character - + Move right one character - + Extend selection right one character - + Extend rectangular selection right one character - + Move left one word - + Extend selection left one word - + Move right one word - + Extend selection right one word - + 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 - + Extend selection left one word part - + Move right one word part - + Extend selection right one word part - + 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 - + Move up one page + + + Extend selection up one page + + + Extend rectangular selection up one page + + + + Move down one page - + + Extend selection down one page + + + + + Extend rectangular selection down one page + + + + Stuttered move up one page - + Stuttered extend selection up one page - + Stuttered move down one page - + Stuttered extend selection down one page - + Delete current character - + Delete previous character - + Delete previous character if not at start of line - + Delete word to left - + Delete word to right - + Delete right to end of next word - + Delete line to left - + Delete line to right - + Delete current line - + Cut current line - + Copy current line - + Duplicate the current line - + Select all - + Move selected lines up one line - + Move selected lines down one line - + Duplicate selection - + Convert selection to lower case - + Convert selection to upper case - + Cut selection - + Copy selection - + Paste - + Toggle insert/overtype - + Insert newline - + Formfeed - + Indent one level - + De-indent one level - + Cancel - + Undo last command - + Redo last command - + Zoom in - + Zoom out - + Move Line up - + Move Line down @@ -565,72 +585,72 @@ QsciLexerBash - + Default - + Error - + Comment - + Number - + Keyword - + Double-quoted string - + Single-quoted string - + Operator - + Identifier - + Scalar - + Parameter expansion - + Backticks - + Here document delimiter - + Single-quoted here document @@ -759,282 +779,282 @@ QsciLexerCPP - + Default - + Inactive default - + C comment - + Inactive C comment - + C++ comment - + Inactive C++ comment - + JavaDoc style C comment - + Inactive JavaDoc style C comment - + Number - + Inactive number - + Keyword - + Inactive keyword - + Double-quoted string - + Inactive double-quoted string - + Single-quoted string - + Inactive single-quoted string - + IDL UUID - + Inactive IDL UUID - + Pre-processor block - + Inactive pre-processor block - + Operator - + Inactive operator - + Identifier - + Inactive identifier - + Unclosed string - + Inactive unclosed string - + C# verbatim string - + Inactive C# verbatim string - + JavaScript regular expression - + Inactive JavaScript regular expression - + JavaDoc style C++ comment - + Inactive JavaDoc style C++ comment - + Secondary keywords and identifiers - + Inactive secondary keywords and identifiers - + JavaDoc keyword - + Inactive JavaDoc keyword - + JavaDoc keyword error - + Inactive JavaDoc keyword error - + Global classes and typedefs - + 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 @@ -1525,81 +1545,134 @@ QsciLexerFortran77 - + Default - + Comment - + Number - + Single-quoted string - + Double-quoted string - + Unclosed string - + Operator - + Identifier - + Keyword - + Intrinsic function - + Extended function - + Pre-processor block - + Dotted operator - + Label - + Continuation + + QsciLexerGCode + + + Default + + + + + keyword + + + + + Keyword1 + + + + + Comment + + + + + Position-X + + + + + Position-Y + + + + + Position-Z + + + + + Offset + + + + + Velocity + + + + + Times + + + QsciLexerGO @@ -1770,17 +1843,20 @@ - HTML number + Number + HTML number - HTML double-quoted string + double-quoted string + HTML double-quoted string - HTML single-quoted string + single-quoted string + HTML single-quoted string @@ -2378,6 +2454,29 @@ + + QsciLexerLog + + + Default + + + + + Num + + + + + Date + + + + + Keyword + + + QsciLexerLua @@ -4275,52 +4374,52 @@ QsciLexerYAML - + Default - + Comment - + Identifier - + Keyword - + Number - + Reference - + Document delimiter - + Text block marker - + Syntax error marker - + Operator @@ -4328,27 +4427,27 @@ QsciScintilla - + &Cut - + &Copy - + &Paste - + Delete - + Select All diff --git a/src/qscint/src/qsciscintilla.cpp b/src/qscint/src/qsciscintilla.cpp index c74ab43..6f7efb1 100755 --- a/src/qscint/src/qsciscintilla.cpp +++ b/src/qscint/src/qsciscintilla.cpp @@ -261,6 +261,14 @@ void QsciScintilla::handleCharAdded(int ch) return; } + else if (isListActive() && ch > 0x80) + { + cancelList(); + //不是ascii字符,是中文UTF8的情况。 + //识别中文Utf8字符。 + startAutoWordCompletion(acSource, false, use_single == AcusAlways); + return; + } // Handle call tips. if (call_tips_style != CallTipsNone && !lex.isNull() && strchr("(),", ch) != NULL) @@ -282,8 +290,14 @@ void QsciScintilla::handleCharAdded(int ch) startAutoCompletion(acSource, false, use_single == AcusAlways); else if (acThresh >= 1 && isWordCharacter(ch)) startAutoCompletion(acSource, true, use_single == AcusAlways); + else if(ch > 0x80) + { + //不是ascii字符,是中文UTF8的情况。 + //识别中文Utf8字符。 + startAutoWordCompletion(acSource, false, use_single == AcusAlways); } } +} // See if a call tip is active. @@ -786,6 +800,15 @@ void QsciScintilla::startAutoCompletion(AutoCompletionSource acs, } + +//放在子类中去完成。 +bool QsciScintilla::startAutoWordCompletion(AutoCompletionSource acs, + bool checkThresh, bool choose_single) +{ + return false; +} + + // Maintain the indentation of the previous line. void QsciScintilla::maintainIndentation(char ch, long pos) { @@ -1915,7 +1938,7 @@ bool QsciScintilla::doFind() int QsciScintilla::simpleFind() { /*这里是会大于的,因为我在外面会零长查找时,会增加startPos的值。如果是向前,才这样处理*/ - + if (findState.forward && (findState.startpos >= findState.endpos)) { return -1; } @@ -2382,6 +2405,21 @@ QString QsciScintilla::selectedText() const return qs; } +//20230929 在base64编码时,如果文本中有二进制字符,比如一些控制字符。 +//如果使用selectedText,则获取的文件字节,转换为QString会乱码。此时不对,直接获取原始字节码。 +bool QsciScintilla::selectedRawBytes(QByteArray& bytes) const +{ + if (!selText) + return false; + + //char *buf = new char[SendScintilla(SCI_GETSELECTIONEND) - SendScintilla(SCI_GETSELECTIONSTART) + 1]; + int size = SendScintilla(SCI_GETSELTEXT, 0); + bytes.resize(size); + SendScintilla(SCI_GETSELTEXT, bytes.data()); + + return true; +} + // Return the current text. QString QsciScintilla::text() const @@ -3671,8 +3709,11 @@ void QsciScintilla::setStylesFont(const QFont &f, int style) long(f.pointSizeF() * SC_FONT_SIZE_MULTIPLIER)); // Pass the Qt weight via the back door. - SendScintilla(SCI_STYLESETWEIGHT, style, -f.weight()); + //SendScintilla(SCI_STYLESETWEIGHT, style, -f.weight()); + //20230712 发现粗体总是存在混淆,修改一个风格,会导致其余风格也被设置。于是注释掉上面的SCI_STYLESETWEIGHT + //使用下面的SCI_STYLESETBOLD取代后,发现问题解除。 + SendScintilla(SCI_STYLESETBOLD, style, f.bold()); SendScintilla(SCI_STYLESETITALIC, style, f.italic()); SendScintilla(SCI_STYLESETUNDERLINE, style, f.underline()); @@ -4360,6 +4401,11 @@ bool QsciScintilla::getHtmlHighLightTag() return isHtmlHighLightTag; } +intptr_t QsciScintilla::searchInTarget(QByteArray& text2Find, size_t fromPos, size_t toPos) const +{ + SendScintilla(SCI_SETTARGETRANGE, fromPos, toPos); + return SendScintilla(SCI_SEARCHINTARGET, text2Find.size(), text2Find.data()); +} // Return the word at the given coordinates. QString QsciScintilla::wordAtLineIndex(int line, int index) const @@ -4701,7 +4747,7 @@ QMenu *QsciScintilla::createStandardContextMenu() action = menu->addAction(tr("&Copy"), this, SLOT(copy())); action->setObjectName("copy"); - set_shortcut(action, QsciCommand::SelectionCopy); + //set_shortcut(action, QsciCommand::SelectionCopy); action->setEnabled(has_selection); if (!read_only) diff --git a/src/rcglobal.h b/src/rcglobal.h index fccefeb..2edb7e6 100755 --- a/src/rcglobal.h +++ b/src/rcglobal.h @@ -11,7 +11,7 @@ static const char* VersionStr = u8"(内部测试非稳定) v2.0.0"; #else -static const char* VersionStr = "v1.23.2"; +static const char* VersionStr = "v2.0.0"; #endif // TEST_PRE // Bug: 在 Visual Studio 中引发无法构建的问题,此处被重复定义(在 cmake 中已对其定义) diff --git a/插件编程开发说明.docx b/插件编程开发说明.docx index 1875478..ff8be86 100755 Binary files a/插件编程开发说明.docx and b/插件编程开发说明.docx differ