[BUG_FIXED] (Author: Ivan Radić - aka Loreia) UDL 2.1.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1012 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-01-27 01:03:53 +00:00
parent 2e238a03b8
commit d60466eed3
12 changed files with 1502 additions and 1246 deletions

View File

@ -1414,7 +1414,7 @@ bool Notepad_plus::replaceInFiles()
_pEditView = pOldView; _pEditView = pOldView;
TCHAR msg[128]; TCHAR msg[128];
wsprintf(msg, TEXT("%d occurences replaced"), nbTotal); wsprintf(msg, TEXT("%d occurrences replaced"), nbTotal);
printStr(msg); printStr(msg);
return true; return true;
@ -2124,7 +2124,6 @@ void Notepad_plus::addHotSpot()
{ {
_pEditView->execute(SCI_STARTSTYLING, start, 0xFF); _pEditView->execute(SCI_STARTSTYLING, start, 0xFF);
_pEditView->execute(SCI_SETSTYLING, foundTextLen, fs); _pEditView->execute(SCI_SETSTYLING, foundTextLen, fs);
} }
else // generize a new style and add it into a array else // generize a new style and add it into a array
{ {
@ -2183,7 +2182,6 @@ void Notepad_plus::addHotSpot()
} }
void Notepad_plus::MaintainIndentation(TCHAR ch) void Notepad_plus::MaintainIndentation(TCHAR ch)
{ {
int eolMode = int(_pEditView->execute(SCI_GETEOLMODE)); int eolMode = int(_pEditView->execute(SCI_GETEOLMODE));
@ -3374,9 +3372,9 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode)
symbol = extractSymbol('0', '0', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbol = extractSymbol('0', '0', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentLineSybol = symbol.c_str(); commentLineSybol = symbol.c_str();
//--FLS: BlockToStreamComment: Needed to decide, if stream-comment can be called below! //--FLS: BlockToStreamComment: Needed to decide, if stream-comment can be called below!
symbolStart = extractSymbol('0', '1', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbolStart = extractSymbol('0', '3', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentStart = symbolStart.c_str(); commentStart = symbolStart.c_str();
symbolEnd = extractSymbol('0', '2', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbolEnd = extractSymbol('0', '4', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentEnd = symbolEnd.c_str(); commentEnd = symbolEnd.c_str();
} }
else else
@ -3528,9 +3526,9 @@ bool Notepad_plus::doStreamComment()
symbol = extractSymbol('0', '0', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbol = extractSymbol('0', '0', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentLineSybol = symbol.c_str(); commentLineSybol = symbol.c_str();
symbolStart = extractSymbol('0', '1', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbolStart = extractSymbol('0', '3', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentStart = symbolStart.c_str(); commentStart = symbolStart.c_str();
symbolEnd = extractSymbol('0', '2', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbolEnd = extractSymbol('0', '4', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentEnd = symbolEnd.c_str(); commentEnd = symbolEnd.c_str();
} }
else else
@ -5563,9 +5561,9 @@ bool Notepad_plus::undoStreamComment()
if (!userLangContainer) if (!userLangContainer)
return false; return false;
symbolStart = extractSymbol('0', '1', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbolStart = extractSymbol('0', '3', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentStart = symbolStart.c_str(); commentStart = symbolStart.c_str();
symbolEnd = extractSymbol('0', '2', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]); symbolEnd = extractSymbol('0', '4', userLangContainer->_keywordLists[SCE_USER_KWLIST_COMMENTS]);
commentEnd = symbolEnd.c_str(); commentEnd = symbolEnd.c_str();
} }
else else

View File

@ -2191,7 +2191,7 @@ bool NppParameters::feedUserLang(TiXmlNode *node)
{ {
Style & style = _userLangArray[_nbUserLang - 1]->_styleArray.getStyler(i); Style & style = _userLangArray[_nbUserLang - 1]->_styleArray.getStyler(i);
if (style._styleID == -1) if (style._styleID == -1)
_userLangArray[_nbUserLang - 1]->_styleArray.addStyler(i, styleNameMapper[i]); _userLangArray[_nbUserLang - 1]->_styleArray.addStyler(i, globalMappper().styleNameMapper[i].c_str());
} }
} catch (std::exception e) { } catch (std::exception e) {
@ -2551,9 +2551,8 @@ void NppParameters::feedUserSettings(TiXmlNode *settingsRoot)
if (boolStr) if (boolStr)
_userLangArray[_nbUserLang - 1]->_allowFoldOfComments = !lstrcmp(TEXT("yes"), boolStr); _userLangArray[_nbUserLang - 1]->_allowFoldOfComments = !lstrcmp(TEXT("yes"), boolStr);
boolStr = (globalSettingNode->ToElement())->Attribute(TEXT("forceLineCommentsAtBOL")); (globalSettingNode->ToElement())->Attribute(TEXT("forcePureLC"), &_userLangArray[_nbUserLang - 1]->_forcePureLC);
if (boolStr) (globalSettingNode->ToElement())->Attribute(TEXT("decimalSeparator"), &_userLangArray[_nbUserLang - 1]->_decimalSeparator);
_userLangArray[_nbUserLang - 1]->_forceLineCommentsAtBOL = !lstrcmp(TEXT("yes"), boolStr);
boolStr = (globalSettingNode->ToElement())->Attribute(TEXT("foldCompact")); boolStr = (globalSettingNode->ToElement())->Attribute(TEXT("foldCompact"));
if (boolStr) if (boolStr)
@ -2568,7 +2567,7 @@ void NppParameters::feedUserSettings(TiXmlNode *settingsRoot)
{ {
for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++) for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++)
{ {
boolStr = (prefixNode->ToElement())->Attribute(keywordListMapper[i+SCE_USER_KWLIST_KEYWORDS1]); boolStr = (prefixNode->ToElement())->Attribute(globalMappper().keywordNameMapper[i+SCE_USER_KWLIST_KEYWORDS1]);
if (boolStr) if (boolStr)
_userLangArray[_nbUserLang - 1]->_isPrefix[i] = !lstrcmp(TEXT("yes"), boolStr); _userLangArray[_nbUserLang - 1]->_isPrefix[i] = !lstrcmp(TEXT("yes"), boolStr);
} }
@ -2588,26 +2587,22 @@ void NppParameters::feedUserSettings(TiXmlNode *settingsRoot)
void NppParameters::feedUserKeywordList(TiXmlNode *node) void NppParameters::feedUserKeywordList(TiXmlNode *node)
{ {
const TCHAR * udlVersion = _userLangArray[_nbUserLang - 1]->_udlVersion.c_str();
const TCHAR * keywordsName = NULL;
TCHAR *kwl = NULL;
int id = -1;
for (TiXmlNode *childNode = node->FirstChildElement(TEXT("Keywords")); for (TiXmlNode *childNode = node->FirstChildElement(TEXT("Keywords"));
childNode ; childNode ;
childNode = childNode->NextSibling(TEXT("Keywords"))) childNode = childNode->NextSibling(TEXT("Keywords")))
{ {
const TCHAR *keywordsName = (childNode->ToElement())->Attribute(TEXT("name")); keywordsName = (childNode->ToElement())->Attribute(TEXT("name"));
const TCHAR *udlVersion = _userLangArray[_nbUserLang - 1]->_udlVersion.c_str(); kwl = NULL;
TCHAR *kwl = NULL;
TiXmlNode *valueNode = childNode->FirstChild(); TiXmlNode *valueNode = childNode->FirstChild();
if (valueNode) if (valueNode)
{ {
if (!lstrcmp(udlVersion, TEXT("2.0"))) if (!lstrcmp(udlVersion, TEXT("")) && !lstrcmp(keywordsName, TEXT("Delimiters"))) // support for old style (pre 2.0)
{
const int keywordsID = _tstoi((childNode->ToElement())->Attribute(TEXT("id")));
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[keywordsID], kwl);
}
else // support for old style (pre 2.0)
{
if (!lstrcmp(keywordsName, TEXT("Delimiters")))
{ {
basic_string<TCHAR> temp = TEXT(""); basic_string<TCHAR> temp = TEXT("");
kwl = (valueNode)?valueNode->Value():TEXT("000000"); kwl = (valueNode)?valueNode->Value():TEXT("000000");
@ -2622,41 +2617,6 @@ void NppParameters::feedUserKeywordList(TiXmlNode *node)
temp += TEXT(" 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23"); temp += TEXT(" 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_DELIMITERS], temp.c_str()); lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_DELIMITERS], temp.c_str());
} }
else if (!lstrcmp(keywordsName, TEXT("Operators")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_OPERATORS1], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Folder+")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Folder-")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Words1")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_KEYWORDS1], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Words2")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_KEYWORDS2], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Words3")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_KEYWORDS3], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Words4")))
{
kwl = (valueNode)?valueNode->Value():TEXT("");
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_KEYWORDS4], kwl);
}
else if (!lstrcmp(keywordsName, TEXT("Comment"))) else if (!lstrcmp(keywordsName, TEXT("Comment")))
{ {
kwl = (valueNode)?valueNode->Value():TEXT(""); kwl = (valueNode)?valueNode->Value():TEXT("");
@ -2690,7 +2650,14 @@ void NppParameters::feedUserKeywordList(TiXmlNode *node)
temp.erase(0, 1); temp.erase(0, 1);
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_COMMENTS], temp.c_str()); lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[SCE_USER_KWLIST_COMMENTS], temp.c_str());
}
else
{
kwl = (valueNode)?valueNode->Value():TEXT("");
if (globalMappper().keywordIdMapper.find(keywordsName) != globalMappper().keywordIdMapper.end())
{
id = globalMappper().keywordIdMapper[keywordsName];
lstrcpy(_userLangArray[_nbUserLang - 1]->_keywordLists[id], kwl);
} }
} }
} }
@ -2699,32 +2666,23 @@ void NppParameters::feedUserKeywordList(TiXmlNode *node)
void NppParameters::feedUserStyles(TiXmlNode *node) void NppParameters::feedUserStyles(TiXmlNode *node)
{ {
bool oldVersion = false; const TCHAR *styleName = NULL;
const TCHAR *udlVersion = _userLangArray[_nbUserLang - 1]->_udlVersion.c_str(); int id = -1;
if (lstrcmp(udlVersion, TEXT("2.0")))
oldVersion = true;
for (TiXmlNode *childNode = node->FirstChildElement(TEXT("WordsStyle")); for (TiXmlNode *childNode = node->FirstChildElement(TEXT("WordsStyle"));
childNode ; childNode ;
childNode = childNode->NextSibling(TEXT("WordsStyle"))) childNode = childNode->NextSibling(TEXT("WordsStyle")))
{ {
int id; styleName = (childNode->ToElement())->Attribute(TEXT("name"));
const TCHAR *styleIDStr = (childNode->ToElement())->Attribute(TEXT("styleID"), &id); if (styleName)
if (oldVersion)
{ {
if (id >= SCE_USER_STYLE_MAPPER_TOTAL) if (globalMappper().styleIdMapper.find(styleName) != globalMappper().styleIdMapper.end())
continue;
id = styleIdMApper[id];
if (id == -1)
continue;
}
if (styleIDStr)
{ {
if (id < SCE_USER_STYLE_TOTAL_STYLES) id = globalMappper().styleIdMapper[styleName];
_userLangArray[_nbUserLang - 1]->_styleArray.addStyler((id | L_USER << 16), childNode); _userLangArray[_nbUserLang - 1]->_styleArray.addStyler((id | L_USER << 16), childNode);
} }
} }
}
} }
bool NppParameters::feedStylerArray(TiXmlNode *node) bool NppParameters::feedStylerArray(TiXmlNode *node)
@ -2846,7 +2804,7 @@ void StyleArray::addStyler(int styleID, TiXmlNode *styleNode)
if (str) if (str)
{ {
if (isUser) if (isUser)
_styleArray[index]._styleDesc = styleNameMapper[index]; _styleArray[index]._styleDesc = globalMappper().styleNameMapper[index].c_str();
else else
_styleArray[index]._styleDesc = str; _styleArray[index]._styleDesc = str;
} }
@ -5325,20 +5283,28 @@ void NppParameters::insertUserLang2Tree(TiXmlNode *node, UserLangContainer *user
{ {
TiXmlElement *rootElement = (node->InsertEndChild(TiXmlElement(TEXT("UserLang"))))->ToElement(); TiXmlElement *rootElement = (node->InsertEndChild(TiXmlElement(TEXT("UserLang"))))->ToElement();
TCHAR temp[32];
generic_string udlVersion = TEXT("");
udlVersion += generic_itoa(SCE_UDL_VERSION_MAJOR, temp, 10);
udlVersion += TEXT(".");
udlVersion += generic_itoa(SCE_UDL_VERSION_MINOR, temp, 10);
rootElement->SetAttribute(TEXT("name"), userLang->_name); rootElement->SetAttribute(TEXT("name"), userLang->_name);
rootElement->SetAttribute(TEXT("ext"), userLang->_ext); rootElement->SetAttribute(TEXT("ext"), userLang->_ext);
rootElement->SetAttribute(TEXT("udlVersion"), TEXT("2.0")); rootElement->SetAttribute(TEXT("udlVersion"), udlVersion.c_str());
TiXmlElement *settingsElement = (rootElement->InsertEndChild(TiXmlElement(TEXT("Settings"))))->ToElement(); TiXmlElement *settingsElement = (rootElement->InsertEndChild(TiXmlElement(TEXT("Settings"))))->ToElement();
{ {
TiXmlElement *globalElement = (settingsElement->InsertEndChild(TiXmlElement(TEXT("Global"))))->ToElement(); TiXmlElement *globalElement = (settingsElement->InsertEndChild(TiXmlElement(TEXT("Global"))))->ToElement();
globalElement->SetAttribute(TEXT("caseIgnored"), userLang->_isCaseIgnored ? TEXT("yes"):TEXT("no")); globalElement->SetAttribute(TEXT("caseIgnored"), userLang->_isCaseIgnored ? TEXT("yes"):TEXT("no"));
globalElement->SetAttribute(TEXT("allowFoldOfComments"), userLang->_allowFoldOfComments ? TEXT("yes"):TEXT("no")); globalElement->SetAttribute(TEXT("allowFoldOfComments"), userLang->_allowFoldOfComments ? TEXT("yes"):TEXT("no"));
globalElement->SetAttribute(TEXT("forceLineCommentsAtBOL"), userLang->_forceLineCommentsAtBOL ? TEXT("yes"):TEXT("no"));
globalElement->SetAttribute(TEXT("foldCompact"), userLang->_foldCompact ? TEXT("yes"):TEXT("no")); globalElement->SetAttribute(TEXT("foldCompact"), userLang->_foldCompact ? TEXT("yes"):TEXT("no"));
globalElement->SetAttribute(TEXT("forcePureLC"), userLang->_forcePureLC);
globalElement->SetAttribute(TEXT("decimalSeparator"), userLang->_decimalSeparator);
TiXmlElement *prefixElement = (settingsElement->InsertEndChild(TiXmlElement(TEXT("Prefix"))))->ToElement(); TiXmlElement *prefixElement = (settingsElement->InsertEndChild(TiXmlElement(TEXT("Prefix"))))->ToElement();
for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++) for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++)
prefixElement->SetAttribute(keywordListMapper[i+SCE_USER_KWLIST_KEYWORDS1], userLang->_isPrefix[i]?TEXT("yes"):TEXT("no")); prefixElement->SetAttribute(globalMappper().keywordNameMapper[i+SCE_USER_KWLIST_KEYWORDS1], userLang->_isPrefix[i]?TEXT("yes"):TEXT("no"));
} }
TiXmlElement *kwlElement = (rootElement->InsertEndChild(TiXmlElement(TEXT("KeywordLists"))))->ToElement(); TiXmlElement *kwlElement = (rootElement->InsertEndChild(TiXmlElement(TEXT("KeywordLists"))))->ToElement();
@ -5346,14 +5312,12 @@ void NppParameters::insertUserLang2Tree(TiXmlNode *node, UserLangContainer *user
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++) for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++)
{ {
TiXmlElement *kwElement = (kwlElement->InsertEndChild(TiXmlElement(TEXT("Keywords"))))->ToElement(); TiXmlElement *kwElement = (kwlElement->InsertEndChild(TiXmlElement(TEXT("Keywords"))))->ToElement();
kwElement->SetAttribute(TEXT("name"), keywordListMapper[i]); kwElement->SetAttribute(TEXT("name"), globalMappper().keywordNameMapper[i]);
kwElement->SetAttribute(TEXT("id"), i);
kwElement->InsertEndChild(TiXmlText(userLang->_keywordLists[i])); kwElement->InsertEndChild(TiXmlText(userLang->_keywordLists[i]));
} }
TiXmlElement *styleRootElement = (rootElement->InsertEndChild(TiXmlElement(TEXT("Styles"))))->ToElement(); TiXmlElement *styleRootElement = (rootElement->InsertEndChild(TiXmlElement(TEXT("Styles"))))->ToElement();
//for (int i = 0 ; i < userLang->_styleArray.getNbStyler() ; i++)
for (int i = 0 ; i < SCE_USER_STYLE_TOTAL_STYLES ; i++) for (int i = 0 ; i < SCE_USER_STYLE_TOTAL_STYLES ; i++)
{ {
TiXmlElement *styleElement = (styleRootElement->InsertEndChild(TiXmlElement(TEXT("WordsStyle"))))->ToElement(); TiXmlElement *styleElement = (styleRootElement->InsertEndChild(TiXmlElement(TEXT("WordsStyle"))))->ToElement();
@ -5364,8 +5328,6 @@ void NppParameters::insertUserLang2Tree(TiXmlNode *node, UserLangContainer *user
styleElement->SetAttribute(TEXT("name"), style2Write._styleDesc); styleElement->SetAttribute(TEXT("name"), style2Write._styleDesc);
styleElement->SetAttribute(TEXT("styleID"), style2Write._styleID);
//if (HIBYTE(HIWORD(style2Write._fgColor)) != 0xFF) //if (HIBYTE(HIWORD(style2Write._fgColor)) != 0xFF)
{ {
int rgbVal = RGB2int(style2Write._fgColor); int rgbVal = RGB2int(style2Write._fgColor);
@ -5417,8 +5379,6 @@ void NppParameters::stylerStrOp(bool op)
{ {
for (int i = 0 ; i < _nbUserLang ; i++) for (int i = 0 ; i < _nbUserLang ; i++)
{ {
//int nbStyler = _userLangArray[i]->_styleArray.getNbStyler();
//for (int j = 0 ; j < nbStyler ; j++)
for (int j = 0 ; j < SCE_USER_STYLE_TOTAL_STYLES ; j++) for (int j = 0 ; j < SCE_USER_STYLE_TOTAL_STYLES ; j++)
{ {
Style & style = _userLangArray[i]->_styleArray.getStyler(j); Style & style = _userLangArray[i]->_styleArray.getStyler(j);

View File

@ -110,6 +110,14 @@ const int COPYDATA_PARAMS = 0;
const int COPYDATA_FILENAMESA = 1; const int COPYDATA_FILENAMESA = 1;
const int COPYDATA_FILENAMESW = 2; const int COPYDATA_FILENAMESW = 2;
#define PURE_LC_NONE 0
#define PURE_LC_BOL 1
#define PURE_LC_WSP 2
#define DECSEP_DOT 0
#define DECSEP_COMMA 1
#define DECSEP_BOTH 2
const TCHAR fontSizeStrs[][3] = {TEXT(""), TEXT("5"), TEXT("6"), TEXT("7"), TEXT("8"), TEXT("9"), TEXT("10"), TEXT("11"), TEXT("12"), TEXT("14"), TEXT("16"), TEXT("18"), TEXT("20"), TEXT("22"), TEXT("24"), TEXT("26"), TEXT("28")}; const TCHAR fontSizeStrs[][3] = {TEXT(""), TEXT("5"), TEXT("6"), TEXT("7"), TEXT("8"), TEXT("9"), TEXT("10"), TEXT("11"), TEXT("12"), TEXT("14"), TEXT("16"), TEXT("18"), TEXT("20"), TEXT("22"), TEXT("24"), TEXT("26"), TEXT("28")};
const TCHAR localConfFile[] = TEXT("doLocalConf.xml"); const TCHAR localConfFile[] = TEXT("doLocalConf.xml");
@ -280,7 +288,7 @@ struct Style
generic_string *_keywords; generic_string *_keywords;
Style():_styleID(-1), _styleDesc(NULL), _fgColor(COLORREF(STYLE_NOT_USED)), _bgColor(COLORREF(STYLE_NOT_USED)), _colorStyle(COLORSTYLE_ALL),\ Style():_styleID(-1), _styleDesc(NULL), _fgColor(COLORREF(STYLE_NOT_USED)), _bgColor(COLORREF(STYLE_NOT_USED)), _colorStyle(COLORSTYLE_ALL),\
_fontName(NULL), _fontStyle(STYLE_NOT_USED), _fontSize(STYLE_NOT_USED), _keywordClass(STYLE_NOT_USED), _keywords(NULL){}; _fontName(NULL), _fontStyle(FONTSTYLE_NONE), _fontSize(STYLE_NOT_USED), _keywordClass(STYLE_NOT_USED), _keywords(NULL), _nesting(FONTSTYLE_NONE){};
~Style(){ ~Style(){
if (_keywords) if (_keywords)
@ -902,19 +910,28 @@ public :
_ext = TEXT(""); _ext = TEXT("");
_udlVersion = TEXT(""); _udlVersion = TEXT("");
_allowFoldOfComments = false; _allowFoldOfComments = false;
_forceLineCommentsAtBOL = false; _forcePureLC = PURE_LC_NONE;
_decimalSeparator = DECSEP_DOT;
_foldCompact = false;
_isCaseIgnored = false;
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++)
*_keywordLists[i] = '\0';
for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++)
_isPrefix[i] = false;
};
UserLangContainer(const TCHAR *name, const TCHAR *ext, const TCHAR *udlVer) : _name(name), _ext(ext), _udlVersion(udlVer) {
_allowFoldOfComments = false;
_forcePureLC = PURE_LC_NONE;
_decimalSeparator = DECSEP_DOT;
_foldCompact = false; _foldCompact = false;
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++) for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++)
*_keywordLists[i] = '\0'; *_keywordLists[i] = '\0';
};
UserLangContainer(const TCHAR *name, const TCHAR *ext, const TCHAR *udlVer) : _name(name), _ext(ext), _udlVersion(udlVer) {
_allowFoldOfComments = false;
_forceLineCommentsAtBOL = false;
_foldCompact = false;
for (int j = 0 ; j < SCE_USER_KWLIST_TOTAL ; j++) for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++)
*_keywordLists[j] = '\0'; _isPrefix[i] = false;
}; };
UserLangContainer & operator=(const UserLangContainer & ulc) { UserLangContainer & operator=(const UserLangContainer & ulc) {
@ -926,7 +943,8 @@ public :
this->_isCaseIgnored = ulc._isCaseIgnored; this->_isCaseIgnored = ulc._isCaseIgnored;
this->_styleArray = ulc._styleArray; this->_styleArray = ulc._styleArray;
this->_allowFoldOfComments = ulc._allowFoldOfComments; this->_allowFoldOfComments = ulc._allowFoldOfComments;
this->_forceLineCommentsAtBOL = ulc._forceLineCommentsAtBOL; this->_forcePureLC = ulc._forcePureLC;
this->_decimalSeparator = ulc._decimalSeparator;
this->_foldCompact = ulc._foldCompact; this->_foldCompact = ulc._foldCompact;
int nbStyler = this->_styleArray.getNbStyler(); int nbStyler = this->_styleArray.getNbStyler();
for (int i = 0 ; i < nbStyler ; i++) for (int i = 0 ; i < nbStyler ; i++)
@ -939,6 +957,9 @@ public :
} }
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++) for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++)
lstrcpy(this->_keywordLists[i], ulc._keywordLists[i]); lstrcpy(this->_keywordLists[i], ulc._keywordLists[i]);
for (int i = 0 ; i < SCE_USER_TOTAL_KEYWORD_GROUPS ; i++)
_isPrefix[i] = ulc._isPrefix[i];
} }
return *this; return *this;
}; };
@ -956,12 +977,13 @@ private:
//TCHAR _keywordLists[nbKeywodList][max_char]; //TCHAR _keywordLists[nbKeywodList][max_char];
TCHAR _keywordLists[SCE_USER_KWLIST_TOTAL][max_char]; TCHAR _keywordLists[SCE_USER_KWLIST_TOTAL][max_char];
bool _isPrefix[SCE_USER_TOTAL_KEYWORD_GROUPS];
bool _isCaseIgnored; bool _isCaseIgnored;
bool _allowFoldOfComments; bool _allowFoldOfComments;
bool _forceLineCommentsAtBOL; int _forcePureLC;
int _decimalSeparator;
bool _foldCompact; bool _foldCompact;
bool _isPrefix[SCE_USER_TOTAL_KEYWORD_GROUPS];
}; };
#define MAX_EXTERNAL_LEXER_NAME_LEN 16 #define MAX_EXTERNAL_LEXER_NAME_LEN 16

View File

@ -646,7 +646,6 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1")); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1"));
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.isCaseIgnored", (LPARAM)(userLangContainer->_isCaseIgnored ? "1":"0")); execute(SCI_SETPROPERTY, (WPARAM)"userDefine.isCaseIgnored", (LPARAM)(userLangContainer->_isCaseIgnored ? "1":"0"));
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.allowFoldOfComments", (LPARAM)(userLangContainer->_allowFoldOfComments ? "1":"0")); execute(SCI_SETPROPERTY, (WPARAM)"userDefine.allowFoldOfComments", (LPARAM)(userLangContainer->_allowFoldOfComments ? "1":"0"));
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.forceLineCommentsAtBOL", (LPARAM)(userLangContainer->_forceLineCommentsAtBOL ? "1":"0"));
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.foldCompact", (LPARAM)(userLangContainer->_foldCompact ? "1":"0")); execute(SCI_SETPROPERTY, (WPARAM)"userDefine.foldCompact", (LPARAM)(userLangContainer->_foldCompact ? "1":"0"));
char name[] = "userDefine.prefixKeywords0"; char name[] = "userDefine.prefixKeywords0";
@ -656,7 +655,6 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
execute(SCI_SETPROPERTY, (WPARAM)name, (LPARAM)(userLangContainer->_isPrefix[i]?"1":"0")); execute(SCI_SETPROPERTY, (WPARAM)name, (LPARAM)(userLangContainer->_isPrefix[i]?"1":"0"));
} }
// for (int i = 0 ; i < userLangContainer->getNbKeywordList() ; i++)
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++) for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; i++)
{ {
#ifndef UNICODE #ifndef UNICODE
@ -665,45 +663,9 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
const char * keyWords_char = wmc->wchar2char(userLangContainer->_keywordLists[i], codepage); const char * keyWords_char = wmc->wchar2char(userLangContainer->_keywordLists[i], codepage);
#endif #endif
if (i == SCE_USER_KWLIST_COMMENTS) if (globalMappper().setLexerMapper.find(i) != globalMappper().setLexerMapper.end())
{ {
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.comments", reinterpret_cast<LPARAM>(keyWords_char)); execute(SCI_SETPROPERTY, (WPARAM)globalMappper().setLexerMapper[i].c_str(), reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_DELIMITERS)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.delimiters", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_OPERATORS1)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.operators1", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_NUMBER_EXTRA)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.numberRanges", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_NUMBER_PREFIX)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.numberPrefixes", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_NUMBER_EXTRAPREF)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.extraCharsInPrefixed", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_NUMBER_SUFFIX)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.numberSuffixes", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.foldersInCode1Open", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.foldersInCode1Middle", reinterpret_cast<LPARAM>(keyWords_char));
}
else if (i == SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE)
{
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.foldersInCode1Close", reinterpret_cast<LPARAM>(keyWords_char));
} }
else // OPERATORS2, FOLDERS_IN_CODE2, FOLDERS_IN_COMMENT, KEYWORDS1-8 else // OPERATORS2, FOLDERS_IN_CODE2, FOLDERS_IN_COMMENT, KEYWORDS1-8
{ {
@ -759,14 +721,22 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
} }
} }
// at the end (position SCE_USER_KWLIST_TOTAL) send id values char intBuffer[15];
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.udlName", reinterpret_cast<LPARAM>(userLangContainer->getName()));
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.currentBufferID", reinterpret_cast<LPARAM>(_currentBufferID));
char intBuffer[10];
char nestingBuffer[] = "userDefine.nesting.00"; char nestingBuffer[] = "userDefine.nesting.00";
//for (int i = 0 ; i < userLangContainer->_styleArray.getNbStyler() ; i++) itoa(userLangContainer->_forcePureLC, intBuffer, 10);
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.forcePureLC", reinterpret_cast<LPARAM>(intBuffer));
itoa(userLangContainer->_decimalSeparator, intBuffer, 10);
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.decimalSeparator", reinterpret_cast<LPARAM>(intBuffer));
// at the end (position SCE_USER_KWLIST_TOTAL) send id values
itoa((int)userLangContainer->getName(), intBuffer, 10); // use numeric value of TCHAR pointer
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.udlName", reinterpret_cast<LPARAM>(intBuffer));
itoa((int)_currentBufferID, intBuffer, 10); // use numeric value of BufferID pointer
execute(SCI_SETPROPERTY, (WPARAM)"userDefine.currentBufferID", reinterpret_cast<LPARAM>(intBuffer));
for (int i = 0 ; i < SCE_USER_STYLE_TOTAL_STYLES ; i++) for (int i = 0 ; i < SCE_USER_STYLE_TOTAL_STYLES ; i++)
{ {
Style & style = userLangContainer->_styleArray.getStyler(i); Style & style = userLangContainer->_styleArray.getStyler(i);
@ -1706,15 +1676,7 @@ void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask)
void ScintillaEditView::collapse(int level2Collapse, bool mode) void ScintillaEditView::collapse(int level2Collapse, bool mode)
{ {
// The following code is needed : execute(SCI_COLOURISE, 0, -1);
int startPos = 0, endPos = -1;
getVisibleStartAndEndPosition(&startPos, &endPos);
execute(SCI_COLOURISE, startPos, endPos);
// according to the Scitilla document :
// This requests the current lexer or the container (if the lexer is set to SCLEX_CONTAINER)
// to style the document between startPos and endPos. If endPos is -1, the document is styled from startPos to the end.
// If the "fold" property is set to "1" and your lexer or container supports folding, fold levels are also set.
// This message causes a redraw.
int maxLine = execute(SCI_GETLINECOUNT); int maxLine = execute(SCI_GETLINECOUNT);
@ -1743,15 +1705,11 @@ void ScintillaEditView::foldCurrentPos(bool mode)
void ScintillaEditView::fold(int line, bool mode) void ScintillaEditView::fold(int line, bool mode)
{ {
// The following code is needed : int endStyled = execute(SCI_GETENDSTYLED);
int startPos = 0, endPos = -1; int len = execute(SCI_GETTEXTLENGTH);
getVisibleStartAndEndPosition(&startPos, &endPos);
execute(SCI_COLOURISE, startPos, endPos); if (endStyled < len)
// according to the Scitilla document : execute(SCI_COLOURISE, 0, -1);
// This requests the current lexer or the container (if the lexer is set to SCLEX_CONTAINER)
// to style the document between startPos and endPos. If endPos is -1, the document is styled from startPos to the end.
// If the "fold" property is set to "1" and your lexer or container supports folding, fold levels are also set.
// This message causes a redraw.
int headerLine; int headerLine;
int level = execute(SCI_GETFOLDLEVEL, line); int level = execute(SCI_GETFOLDLEVEL, line);
@ -1782,14 +1740,6 @@ void ScintillaEditView::fold(int line, bool mode)
void ScintillaEditView::foldAll(bool mode) void ScintillaEditView::foldAll(bool mode)
{ {
// The following code is needed :
//execute(SCI_COLOURISE, 0, -1);
// according to the Scitilla document :
// This requests the current lexer or the container (if the lexer is set to SCLEX_CONTAINER)
// to style the document between startPos and endPos. If endPos is -1, the document is styled from startPos to the end.
// If the "fold" property is set to "1" and your lexer or container supports folding, fold levels are also set.
// This message causes a redraw.
int maxLine = execute(SCI_GETLINECOUNT); int maxLine = execute(SCI_GETLINECOUNT);
for (int line = 0; line < maxLine; line++) for (int line = 0; line < maxLine; line++)

View File

@ -40,6 +40,14 @@
UserLangContainer * SharedParametersDialog::_pUserLang = NULL; UserLangContainer * SharedParametersDialog::_pUserLang = NULL;
ScintillaEditView * SharedParametersDialog::_pScintilla = NULL; ScintillaEditView * SharedParametersDialog::_pScintilla = NULL;
GlobalMappers & globalMappper()
{
// getting global object as reference to static ensures that only one object is created
// even if called from different code units
static GlobalMappers gm;
return gm;
}
bool SharedParametersDialog::setPropertyByCheck(HWND hwnd, WPARAM id, bool & bool2set) bool SharedParametersDialog::setPropertyByCheck(HWND hwnd, WPARAM id, bool & bool2set)
{ {
bool2set = (BST_CHECKED == ::SendMessage(::GetDlgItem(hwnd, id), BM_GETCHECK, 0, 0)); bool2set = (BST_CHECKED == ::SendMessage(::GetDlgItem(hwnd, id), BM_GETCHECK, 0, 0));
@ -136,22 +144,20 @@ BOOL CALLBACK FolderStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
void FolderStyleDialog::setKeywords2List(int id) void FolderStyleDialog::setKeywords2List(int id)
{ {
int index;
switch (id) switch (id)
{ {
case IDC_FOLDER_IN_CODE1_OPEN_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN; break; case IDC_FOLDER_IN_CODE1_OPEN_EDIT :
case IDC_FOLDER_IN_CODE1_MIDDLE_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE; break; case IDC_FOLDER_IN_CODE1_MIDDLE_EDIT :
case IDC_FOLDER_IN_CODE1_CLOSE_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE; break; case IDC_FOLDER_IN_CODE1_CLOSE_EDIT :
case IDC_FOLDER_IN_CODE2_OPEN_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN; break; case IDC_FOLDER_IN_CODE2_OPEN_EDIT :
case IDC_FOLDER_IN_CODE2_MIDDLE_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE; break; case IDC_FOLDER_IN_CODE2_MIDDLE_EDIT :
case IDC_FOLDER_IN_CODE2_CLOSE_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE; break; case IDC_FOLDER_IN_CODE2_CLOSE_EDIT :
case IDC_FOLDER_IN_COMMENT_OPEN_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN; break; case IDC_FOLDER_IN_COMMENT_OPEN_EDIT :
case IDC_FOLDER_IN_COMMENT_MIDDLE_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE; break; case IDC_FOLDER_IN_COMMENT_MIDDLE_EDIT :
case IDC_FOLDER_IN_COMMENT_CLOSE_EDIT : index = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE; break; case IDC_FOLDER_IN_COMMENT_CLOSE_EDIT :
default : index = -1; ::GetDlgItemText(_hSelf, id, _pUserLang->_keywordLists[globalMappper().dialogMapper[id]], max_char);
break;
} }
if (index != -1)
::GetDlgItemText(_hSelf, id, _pUserLang->_keywordLists[index], max_char);
} }
void FolderStyleDialog::updateDlg() void FolderStyleDialog::updateDlg()
@ -248,6 +254,21 @@ BOOL CALLBACK KeyWordsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPAR
{ {
switch (Message) switch (Message)
{ {
case WM_INITDIALOG :
{
// extend Keyword edit boxes to hold 128k of TCHARs
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD1_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD2_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD3_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD4_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD5_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD6_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD7_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
::SendMessage(::GetDlgItem(_hSelf,IDC_KEYWORD8_EDIT), EM_LIMITTEXT, WPARAM(128*1024), 0);
return TRUE;
}
case WM_COMMAND : case WM_COMMAND :
{ {
switch (wParam) switch (wParam)
@ -335,21 +356,18 @@ BOOL CALLBACK KeyWordsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPAR
void KeyWordsStyleDialog::setKeywords2List(int id) void KeyWordsStyleDialog::setKeywords2List(int id)
{ {
int index;
switch (id) switch (id)
{ {
case IDC_KEYWORD1_EDIT : index = SCE_USER_KWLIST_KEYWORDS1; break; case IDC_KEYWORD1_EDIT :
case IDC_KEYWORD2_EDIT : index = SCE_USER_KWLIST_KEYWORDS2; break; case IDC_KEYWORD2_EDIT :
case IDC_KEYWORD3_EDIT : index = SCE_USER_KWLIST_KEYWORDS3; break; case IDC_KEYWORD3_EDIT :
case IDC_KEYWORD4_EDIT : index = SCE_USER_KWLIST_KEYWORDS4; break; case IDC_KEYWORD4_EDIT :
case IDC_KEYWORD5_EDIT : index = SCE_USER_KWLIST_KEYWORDS5; break; case IDC_KEYWORD5_EDIT :
case IDC_KEYWORD6_EDIT : index = SCE_USER_KWLIST_KEYWORDS6; break; case IDC_KEYWORD6_EDIT :
case IDC_KEYWORD7_EDIT : index = SCE_USER_KWLIST_KEYWORDS7; break; case IDC_KEYWORD7_EDIT :
case IDC_KEYWORD8_EDIT : index = SCE_USER_KWLIST_KEYWORDS8; break; case IDC_KEYWORD8_EDIT :
default : index = -1; ::GetDlgItemText(_hSelf, id, _pUserLang->_keywordLists[globalMappper().dialogMapper[id]], max_char);
} }
if (index != -1)
::GetDlgItemText(_hSelf, id, _pUserLang->_keywordLists[index], max_char);
} }
void KeyWordsStyleDialog::updateDlg() void KeyWordsStyleDialog::updateDlg()
@ -377,6 +395,20 @@ BOOL CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARA
{ {
switch (Message) switch (Message)
{ {
case WM_ACTIVATE :
case WM_SHOWWINDOW :
{
::SendDlgItemMessage(_hSelf, IDC_ALLOW_ANYWHERE, BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_NONE, 0);
::SendDlgItemMessage(_hSelf, IDC_FORCE_AT_BOL, BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_BOL, 0);
::SendDlgItemMessage(_hSelf, IDC_ALLOW_WHITESPACE, BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_WSP, 0);
::SendDlgItemMessage(_hSelf, IDC_DOT_RADIO, BM_SETCHECK, _pUserLang->_decimalSeparator == DECSEP_DOT, 0);
::SendDlgItemMessage(_hSelf, IDC_COMMA_RADIO, BM_SETCHECK, _pUserLang->_decimalSeparator == DECSEP_COMMA, 0);
::SendDlgItemMessage(_hSelf, IDC_BOTH_RADIO, BM_SETCHECK, _pUserLang->_decimalSeparator == DECSEP_BOTH, 0);
return SharedParametersDialog::run_dlgProc(Message, wParam, lParam);
}
case WM_COMMAND : case WM_COMMAND :
{ {
switch (wParam) switch (wParam)
@ -385,12 +417,38 @@ BOOL CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARA
{ {
return setPropertyByCheck(_hSelf, wParam, _pUserLang->_allowFoldOfComments); return setPropertyByCheck(_hSelf, wParam, _pUserLang->_allowFoldOfComments);
} }
case IDC_ALLOW_ANYWHERE :
case IDC_FORCE_LINE_COMMENTS_AT_BOL : case IDC_FORCE_AT_BOL :
case IDC_ALLOW_WHITESPACE :
{ {
return setPropertyByCheck(_hSelf, wParam, _pUserLang->_forceLineCommentsAtBOL); if (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, IDC_ALLOW_ANYWHERE), BM_GETCHECK, 0, 0))
} _pUserLang->_forcePureLC = PURE_LC_NONE;
else if (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, IDC_FORCE_AT_BOL), BM_GETCHECK, 0, 0))
_pUserLang->_forcePureLC = PURE_LC_BOL;
else if (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, IDC_ALLOW_WHITESPACE), BM_GETCHECK, 0, 0))
_pUserLang->_forcePureLC = PURE_LC_WSP;
if (_pScintilla->getCurrentBuffer()->getLangType() == L_USER)
_pScintilla->styleChange();
return TRUE;
}
case IDC_DOT_RADIO :
case IDC_COMMA_RADIO :
case IDC_BOTH_RADIO :
{
if (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, IDC_DOT_RADIO), BM_GETCHECK, 0, 0))
_pUserLang->_decimalSeparator = DECSEP_DOT;
else if (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, IDC_COMMA_RADIO), BM_GETCHECK, 0, 0))
_pUserLang->_decimalSeparator = DECSEP_COMMA;
else if (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, IDC_BOTH_RADIO), BM_GETCHECK, 0, 0))
_pUserLang->_decimalSeparator = DECSEP_BOTH;
if (_pScintilla->getCurrentBuffer()->getLangType() == L_USER)
_pScintilla->styleChange();
return TRUE;
}
case IDC_COMMENTLINE_STYLER : case IDC_COMMENTLINE_STYLER :
{ {
StylerDlg stylerDlg(_hInst, _hSelf, SCE_USER_STYLE_COMMENTLINE); StylerDlg stylerDlg(_hInst, _hSelf, SCE_USER_STYLE_COMMENTLINE);
@ -423,24 +481,15 @@ void CommentStyleDialog::setKeywords2List(int id)
int index = 0; int index = 0;
switch (id) switch (id)
{ {
case IDC_NUMBER_EXTRA_EDIT : case IDC_NUMBER_PREFIX1_EDIT :
case IDC_NUMBER_PREFIX2_EDIT :
case IDC_NUMBER_EXTRAS1_EDIT :
case IDC_NUMBER_EXTRAS2_EDIT :
case IDC_NUMBER_SUFFIX1_EDIT :
case IDC_NUMBER_SUFFIX2_EDIT :
case IDC_NUMBER_RANGE_EDIT :
{ {
::SendDlgItemMessage(_hSelf, IDC_NUMBER_EXTRA_EDIT, WM_GETTEXT, max_char, reinterpret_cast<LPARAM>((_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_EXTRA]))); ::GetDlgItemText(_hSelf, id, _pUserLang->_keywordLists[globalMappper().dialogMapper[id]], max_char);
break;
}
case IDC_NUMBER_PREFIX_EDIT :
{
::SendDlgItemMessage(_hSelf, IDC_NUMBER_PREFIX_EDIT, WM_GETTEXT, max_char, reinterpret_cast<LPARAM>((_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_PREFIX])));
break;
}
case IDC_NUMBER_EXTRAPREF_EDIT :
{
::SendDlgItemMessage(_hSelf, IDC_NUMBER_EXTRAPREF_EDIT, WM_GETTEXT, max_char, reinterpret_cast<LPARAM>((_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_EXTRAPREF])));
break;
}
case IDC_NUMBER_SUFFIX_EDIT :
{
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX_EDIT, WM_GETTEXT, max_char, reinterpret_cast<LPARAM>((_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX])));
break; break;
} }
@ -582,13 +631,23 @@ void CommentStyleDialog::updateDlg()
::SendDlgItemMessage(_hSelf, list[i], WM_SETTEXT, 0, (LPARAM)buffer); ::SendDlgItemMessage(_hSelf, list[i], WM_SETTEXT, 0, (LPARAM)buffer);
} }
::SendDlgItemMessage(_hSelf, IDC_FORCE_LINE_COMMENTS_AT_BOL, BM_SETCHECK, _pUserLang->_forceLineCommentsAtBOL, 0);
::SendDlgItemMessage(_hSelf, IDC_FOLDING_OF_COMMENTS, BM_SETCHECK, _pUserLang->_allowFoldOfComments, 0); ::SendDlgItemMessage(_hSelf, IDC_FOLDING_OF_COMMENTS, BM_SETCHECK, _pUserLang->_allowFoldOfComments, 0);
::SendDlgItemMessage(_hSelf, IDC_NUMBER_EXTRA_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_EXTRA])); ::SendDlgItemMessage(_hSelf, IDC_ALLOW_ANYWHERE, BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_NONE, 0);
::SendDlgItemMessage(_hSelf, IDC_NUMBER_PREFIX_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_PREFIX])); ::SendDlgItemMessage(_hSelf, IDC_FORCE_AT_BOL, BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_BOL, 0);
::SendDlgItemMessage(_hSelf, IDC_NUMBER_EXTRAPREF_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_EXTRAPREF])); ::SendDlgItemMessage(_hSelf, IDC_ALLOW_WHITESPACE, BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_WSP, 0);
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX]));
::SendDlgItemMessage(_hSelf, IDC_DOT_RADIO, BM_SETCHECK, _pUserLang->_decimalSeparator == DECSEP_DOT, 0);
::SendDlgItemMessage(_hSelf, IDC_COMMA_RADIO, BM_SETCHECK, _pUserLang->_decimalSeparator == DECSEP_COMMA, 0);
::SendDlgItemMessage(_hSelf, IDC_BOTH_RADIO, BM_SETCHECK, _pUserLang->_decimalSeparator == DECSEP_BOTH, 0);
::SendDlgItemMessage(_hSelf, IDC_NUMBER_PREFIX1_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_PREFIX1]));
::SendDlgItemMessage(_hSelf, IDC_NUMBER_PREFIX2_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_PREFIX2]));
::SendDlgItemMessage(_hSelf, IDC_NUMBER_EXTRAS1_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_EXTRAS1]));
::SendDlgItemMessage(_hSelf, IDC_NUMBER_EXTRAS2_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_EXTRAS2]));
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX1_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX1]));
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX2_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX2]));
::SendDlgItemMessage(_hSelf, IDC_NUMBER_RANGE_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_RANGE]));
} }
void SymbolsStyleDialog::updateDlg() void SymbolsStyleDialog::updateDlg()
@ -883,30 +942,30 @@ UserDefineDialog::UserDefineDialog(): SharedParametersDialog(), _status(UNDOCK),
{ {
_pCurrentUserLang = new UserLangContainer(); _pCurrentUserLang = new UserLangContainer();
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DEFAULT, styleNameMapper[SCE_USER_STYLE_DEFAULT]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DEFAULT, globalMappper().styleNameMapper[SCE_USER_STYLE_DEFAULT].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_COMMENT, styleNameMapper[SCE_USER_STYLE_COMMENT]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_COMMENT, globalMappper().styleNameMapper[SCE_USER_STYLE_COMMENT].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_COMMENTLINE, styleNameMapper[SCE_USER_STYLE_COMMENTLINE]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_COMMENTLINE, globalMappper().styleNameMapper[SCE_USER_STYLE_COMMENTLINE].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_NUMBER, styleNameMapper[SCE_USER_STYLE_NUMBER]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_NUMBER, globalMappper().styleNameMapper[SCE_USER_STYLE_NUMBER].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD1, styleNameMapper[SCE_USER_STYLE_KEYWORD1]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD1, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD1].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD2, styleNameMapper[SCE_USER_STYLE_KEYWORD2]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD2, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD2].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD3, styleNameMapper[SCE_USER_STYLE_KEYWORD3]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD3, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD3].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD4, styleNameMapper[SCE_USER_STYLE_KEYWORD4]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD4, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD4].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD5, styleNameMapper[SCE_USER_STYLE_KEYWORD5]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD5, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD5].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD6, styleNameMapper[SCE_USER_STYLE_KEYWORD6]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD6, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD6].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD7, styleNameMapper[SCE_USER_STYLE_KEYWORD7]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD7, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD7].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD8, styleNameMapper[SCE_USER_STYLE_KEYWORD8]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_KEYWORD8, globalMappper().styleNameMapper[SCE_USER_STYLE_KEYWORD8].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_OPERATOR, styleNameMapper[SCE_USER_STYLE_OPERATOR]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_OPERATOR, globalMappper().styleNameMapper[SCE_USER_STYLE_OPERATOR].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_FOLDER_IN_CODE1, styleNameMapper[SCE_USER_STYLE_FOLDER_IN_CODE1]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_FOLDER_IN_CODE1, globalMappper().styleNameMapper[SCE_USER_STYLE_FOLDER_IN_CODE1].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_FOLDER_IN_CODE2, styleNameMapper[SCE_USER_STYLE_FOLDER_IN_CODE2]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_FOLDER_IN_CODE2, globalMappper().styleNameMapper[SCE_USER_STYLE_FOLDER_IN_CODE2].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_FOLDER_IN_COMMENT, styleNameMapper[SCE_USER_STYLE_FOLDER_IN_COMMENT]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_FOLDER_IN_COMMENT, globalMappper().styleNameMapper[SCE_USER_STYLE_FOLDER_IN_COMMENT].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER1, styleNameMapper[SCE_USER_STYLE_DELIMITER1]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER1, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER1].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER2, styleNameMapper[SCE_USER_STYLE_DELIMITER2]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER2, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER2].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER3, styleNameMapper[SCE_USER_STYLE_DELIMITER3]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER3, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER3].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER4, styleNameMapper[SCE_USER_STYLE_DELIMITER4]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER4, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER4].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER5, styleNameMapper[SCE_USER_STYLE_DELIMITER5]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER5, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER5].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER6, styleNameMapper[SCE_USER_STYLE_DELIMITER6]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER6, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER6].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER7, styleNameMapper[SCE_USER_STYLE_DELIMITER7]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER7, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER7].c_str());
_pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER8, styleNameMapper[SCE_USER_STYLE_DELIMITER8]); _pCurrentUserLang->_styleArray.addStyler(SCE_USER_STYLE_DELIMITER8, globalMappper().styleNameMapper[SCE_USER_STYLE_DELIMITER8].c_str());
} }
UserDefineDialog::~UserDefineDialog() UserDefineDialog::~UserDefineDialog()
@ -985,6 +1044,8 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
{ {
case WM_INITDIALOG : case WM_INITDIALOG :
{ {
_pUserLang = _pCurrentUserLang;
_ctrlTab.init(_hInst, _hSelf, false); _ctrlTab.init(_hInst, _hSelf, false);
_ctrlTab.setFont(TEXT("Tahoma"), 13); _ctrlTab.setFont(TEXT("Tahoma"), 13);
@ -1036,8 +1097,6 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
enableLangAndControlsBy(0); enableLangAndControlsBy(0);
_pUserLang = _pCurrentUserLang;
if (pNppParam->isTransparentAvailable()) if (pNppParam->isTransparentAvailable())
{ {
::ShowWindow(::GetDlgItem(_hSelf, IDC_UD_TRANSPARENT_CHECK), SW_SHOW); ::ShowWindow(::GetDlgItem(_hSelf, IDC_UD_TRANSPARENT_CHECK), SW_SHOW);
@ -1053,15 +1112,19 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
si.fMask = SIF_RANGE; //| SIF_PAGE; si.fMask = SIF_RANGE; //| SIF_PAGE;
si.nMin = 0; si.nMin = 0;
si.nMax = 0; si.nMax = 0;
//si.nPage = _currentHight;
//si.nPos = 0;
::SetScrollInfo(_hSelf, SB_VERT, &si, TRUE); ::SetScrollInfo(_hSelf, SB_VERT, &si, TRUE);
// ETDTProc enableDlgTheme = (ETDTProc)pNppParam->getEnableThemeDlgTexture(); TCHAR temp[32];
// if (enableDlgTheme) generic_string udlVersion = TEXT("User Defined Language v.");
// { udlVersion += generic_itoa(SCE_UDL_VERSION_MAJOR, temp, 10);
// // enableDlgTheme(_hSelf, ETDT_ENABLETAB); udlVersion += TEXT(".");
// } udlVersion += generic_itoa(SCE_UDL_VERSION_MINOR, temp, 10);
udlVersion += TEXT(".");
udlVersion += generic_itoa(SCE_UDL_VERSION_BUILD, temp, 10);
udlVersion += TEXT(".");
udlVersion += generic_itoa(SCE_UDL_VERSION_REVISION, temp, 10);
::SetWindowText(_hSelf, udlVersion.c_str());
return TRUE; return TRUE;
} }
@ -1577,10 +1640,11 @@ BOOL CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
dlg->pFgColour->display(); dlg->pFgColour->display();
dlg->pBgColour->display(); dlg->pBgColour->display();
for (int i=0; i<sizeof(nestingMapper)/(2*sizeof(int)); ++i) map<int, int>::iterator iter = globalMappper().nestingMapper.begin();
for (; iter != globalMappper().nestingMapper.end(); ++iter)
{ {
::SendDlgItemMessage(hwnd, nestingMapper[i][0], BM_SETCHECK, style._nesting & nestingMapper[i][1], 0); ::SendDlgItemMessage(hwnd, iter->first, BM_SETCHECK, style._nesting & iter->second, 0);
::EnableWindow(::GetDlgItem(hwnd, nestingMapper[i][0]), dlg->enabledNesters & nestingMapper[i][1]); ::EnableWindow(::GetDlgItem(hwnd, iter->first), dlg->enabledNesters & iter->second);
} }
return TRUE; return TRUE;
} }
@ -1665,10 +1729,11 @@ BOOL CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
style._fontStyle |= FONTSTYLE_UNDERLINE; style._fontStyle |= FONTSTYLE_UNDERLINE;
style._nesting = SCE_USER_MASK_NESTING_NONE; style._nesting = SCE_USER_MASK_NESTING_NONE;
for (int i=0; i<sizeof(nestingMapper)/(2*sizeof(int)); ++i) map<int, int>::iterator iter = globalMappper().nestingMapper.begin();
for (; iter != globalMappper().nestingMapper.end(); ++iter)
{ {
if (BST_CHECKED == ::SendMessage(::GetDlgItem(hwnd, nestingMapper[i][0]), BM_GETCHECK, 0, 0)) if (BST_CHECKED == ::SendMessage(::GetDlgItem(hwnd, iter->first), BM_GETCHECK, 0, 0))
style._nesting |= nestingMapper[i][1]; style._nesting |= iter->second;
} }
// show changes to user, re-color document // show changes to user, re-color document

View File

@ -61,101 +61,210 @@ struct Style;
#define ITALIC_MASK 2 #define ITALIC_MASK 2
const bool DOCK = true; const bool DOCK = true;
const bool UNDOCK = false; const bool UNDOCK = false;
const TCHAR keywordListMapper[SCE_USER_KWLIST_TOTAL][32] = {
TEXT("Comments"), // SCE_USER_KWLIST_COMMENTS class GlobalMappers
TEXT("Numbers, additional"), // SCE_USER_KWLIST_NUMBER_EXTRA {
TEXT("Numbers, prefixes"), // SCE_USER_KWLIST_NUMBER_PREFIX public:
TEXT("Numbers, extras with prefixes"), // SCE_USER_KWLIST_NUMBER_EXTRAPREF
TEXT("Numbers, suffixes"), // SCE_USER_KWLIST_NUMBER_SUFFIX map<generic_string, int> keywordIdMapper;
TEXT("Operators1"), // SCE_USER_KWLIST_OPERATORS1 map<int, generic_string> keywordNameMapper;
TEXT("Operators2"), // SCE_USER_KWLIST_OPERATORS2
TEXT("Folders in code1, open"), // SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN map<generic_string, int> styleIdMapper;
TEXT("Folders in code1, middle"), // SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE map<int, generic_string> styleNameMapper;
TEXT("Folders in code1, close"), // SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE
TEXT("Folders in code2, open"), // SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN map<generic_string, int> temp;
TEXT("Folders in code2, middle"), // SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE map<generic_string, int>::iterator iter;
TEXT("Folders in code2, close"), // SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE
TEXT("Folders in comment, open"), // SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN map<int, int> nestingMapper;
TEXT("Folders in comment, middle"), // SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE map<int, int> dialogMapper;
TEXT("Folders in comment, close"), // SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE map<int, string> setLexerMapper;
TEXT("Keywords1"), // SCE_USER_KWLIST_KEYWORDS1
TEXT("Keywords2"), // SCE_USER_KWLIST_KEYWORDS2 // only default constructor is needed
TEXT("Keywords3"), // SCE_USER_KWLIST_KEYWORDS3 GlobalMappers()
TEXT("Keywords4"), // SCE_USER_KWLIST_KEYWORDS4 {
TEXT("Keywords5"), // SCE_USER_KWLIST_KEYWORDS5 // pre 2.0
TEXT("Keywords6"), // SCE_USER_KWLIST_KEYWORDS6 temp[TEXT("Operators")] = SCE_USER_KWLIST_OPERATORS1;
TEXT("Keywords7"), // SCE_USER_KWLIST_KEYWORDS7 temp[TEXT("Folder+")] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN;
TEXT("Keywords8"), // SCE_USER_KWLIST_KEYWORDS8 temp[TEXT("Folder-")] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE;
TEXT("Delimiters") // SCE_USER_KWLIST_DELIMITERS temp[TEXT("Words1")] = SCE_USER_KWLIST_KEYWORDS1;
}; temp[TEXT("Words2")] = SCE_USER_KWLIST_KEYWORDS2;
const TCHAR styleNameMapper[SCE_USER_STYLE_TOTAL_STYLES][32] = { temp[TEXT("Words3")] = SCE_USER_KWLIST_KEYWORDS3;
TEXT("DEFAULT"), // 0 SCE_USER_STYLE_DEFAULT temp[TEXT("Words4")] = SCE_USER_KWLIST_KEYWORDS4;
TEXT("COMMENTS"), // 1 SCE_USER_STYLE_COMMENT
TEXT("LINE COMMENTS"), // 2 SCE_USER_STYLE_COMMENTLINE // in case of duplicate entries, newer string should overwrite old one !
TEXT("NUMBERS"), // 3 SCE_USER_STYLE_NUMBER for (iter = temp.begin(); iter != temp.end(); ++iter)
TEXT("KEYWORDS1"), // 4 SCE_USER_STYLE_KEYWORD1 keywordNameMapper[iter->second] = iter->first;
TEXT("KEYWORDS2"), // 5 SCE_USER_STYLE_KEYWORD2 keywordIdMapper.insert(temp.begin(), temp.end());
TEXT("KEYWORDS3"), // 6 SCE_USER_STYLE_KEYWORD3 temp.clear();
TEXT("KEYWORDS4"), // 7 SCE_USER_STYLE_KEYWORD4
TEXT("KEYWORDS5"), // 8 SCE_USER_STYLE_KEYWORD5 // 2.0
TEXT("KEYWORDS6"), // 9 SCE_USER_STYLE_KEYWORD6 temp[TEXT("Comments")] = SCE_USER_KWLIST_COMMENTS;
TEXT("KEYWORDS7"), // 10 SCE_USER_STYLE_KEYWORD7 temp[TEXT("Numbers, additional")] = SCE_USER_KWLIST_NUMBER_RANGE;
TEXT("KEYWORDS8"), // 11 SCE_USER_STYLE_KEYWORD8 temp[TEXT("Numbers, prefixes")] = SCE_USER_KWLIST_NUMBER_PREFIX1;
TEXT("OPERATORS"), // 12 SCE_USER_STYLE_OPERATOR temp[TEXT("Numbers, extras with prefixes")] = SCE_USER_KWLIST_NUMBER_RANGE;
TEXT("FOLDER IN CODE1"), // 13 SCE_USER_STYLE_FOLDER_IN_CODE1 temp[TEXT("Numbers, suffixes")] = SCE_USER_KWLIST_NUMBER_SUFFIX1;
TEXT("FOLDER IN CODE2"), // 14 SCE_USER_STYLE_FOLDER_IN_CODE2 temp[TEXT("Operators1")] = SCE_USER_KWLIST_OPERATORS1;
TEXT("FOLDER IN COMMENT"), // 15 SCE_USER_STYLE_FOLDER_IN_COMMENT temp[TEXT("Operators2")] = SCE_USER_KWLIST_OPERATORS2;
TEXT("DELIMITERS1"), // 16 SCE_USER_STYLE_DELIMITER1 temp[TEXT("Folders in code1, open")] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN;
TEXT("DELIMITERS2"), // 17 SCE_USER_STYLE_DELIMITER2 temp[TEXT("Folders in code1, middle")] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE;
TEXT("DELIMITERS3"), // 18 SCE_USER_STYLE_DELIMITER3 temp[TEXT("Folders in code1, close")] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE;
TEXT("DELIMITERS4"), // 19 SCE_USER_STYLE_DELIMITER4 temp[TEXT("Folders in code2, open")] = SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN;
TEXT("DELIMITERS5"), // 20 SCE_USER_STYLE_DELIMITER5 temp[TEXT("Folders in code2, middle")] = SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE;
TEXT("DELIMITERS6"), // 21 SCE_USER_STYLE_DELIMITER6 temp[TEXT("Folders in code2, close")] = SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE;
TEXT("DELIMITERS7"), // 22 SCE_USER_STYLE_DELIMITER7 temp[TEXT("Folders in comment, open")] = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN;
TEXT("DELIMITERS8") // 23 SCE_USER_STYLE_DELIMITER8 temp[TEXT("Folders in comment, middle")] = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE;
}; temp[TEXT("Folders in comment, close")] = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE;
const int styleIdMApper[SCE_USER_STYLE_MAPPER_TOTAL] = { // mapping sytle ID's between UDL 1.0 and UDL 2.0 temp[TEXT("Keywords1")] = SCE_USER_KWLIST_KEYWORDS1;
-1, // -1 stands for: not used // 0 temp[TEXT("Keywords2")] = SCE_USER_KWLIST_KEYWORDS2;
SCE_USER_STYLE_COMMENT, // 1 temp[TEXT("Keywords3")] = SCE_USER_KWLIST_KEYWORDS3;
SCE_USER_STYLE_COMMENTLINE, // 2 temp[TEXT("Keywords4")] = SCE_USER_KWLIST_KEYWORDS4;
-1, // 3 temp[TEXT("Keywords5")] = SCE_USER_KWLIST_KEYWORDS5;
SCE_USER_STYLE_NUMBER, // 4 temp[TEXT("Keywords6")] = SCE_USER_KWLIST_KEYWORDS6;
SCE_USER_STYLE_KEYWORD1, // 5 temp[TEXT("Keywords7")] = SCE_USER_KWLIST_KEYWORDS7;
SCE_USER_STYLE_KEYWORD2, // 6 temp[TEXT("Keywords8")] = SCE_USER_KWLIST_KEYWORDS8;
SCE_USER_STYLE_KEYWORD3, // 7 temp[TEXT("Delimiters")] = SCE_USER_KWLIST_DELIMITERS;
SCE_USER_STYLE_KEYWORD4, // 8
-1, // 9 // in case of duplicate entries, newer string should overwrite old one !
SCE_USER_STYLE_OPERATOR, // 10 for (iter = temp.begin(); iter != temp.end(); ++iter)
SCE_USER_STYLE_DEFAULT, // 11 keywordNameMapper[iter->second] = iter->first;
SCE_USER_STYLE_FOLDER_IN_CODE1, // 12 keywordIdMapper.insert(temp.begin(), temp.end());
-1, // 13 temp.clear();
SCE_USER_STYLE_DELIMITER1, // 14
SCE_USER_STYLE_DELIMITER2, // 15 // 2.1
SCE_USER_STYLE_DELIMITER3, // 16 temp[TEXT("Numbers, prefix1")] = SCE_USER_KWLIST_NUMBER_PREFIX1;
}; temp[TEXT("Numbers, prefix2")] = SCE_USER_KWLIST_NUMBER_PREFIX2;
const int nestingMapper[][2] = { temp[TEXT("Numbers, extras1")] = SCE_USER_KWLIST_NUMBER_EXTRAS1;
{ IDC_STYLER_CHECK_NESTING_DELIMITER1, SCE_USER_MASK_NESTING_DELIMITER1 }, temp[TEXT("Numbers, extras2")] = SCE_USER_KWLIST_NUMBER_EXTRAS2;
{ IDC_STYLER_CHECK_NESTING_DELIMITER2, SCE_USER_MASK_NESTING_DELIMITER2 }, temp[TEXT("Numbers, suffix1")] = SCE_USER_KWLIST_NUMBER_SUFFIX1;
{ IDC_STYLER_CHECK_NESTING_DELIMITER3, SCE_USER_MASK_NESTING_DELIMITER3 }, temp[TEXT("Numbers, suffix2")] = SCE_USER_KWLIST_NUMBER_SUFFIX2;
{ IDC_STYLER_CHECK_NESTING_DELIMITER4, SCE_USER_MASK_NESTING_DELIMITER4 }, temp[TEXT("Numbers, range")] = SCE_USER_KWLIST_NUMBER_RANGE;
{ IDC_STYLER_CHECK_NESTING_DELIMITER5, SCE_USER_MASK_NESTING_DELIMITER5 },
{ IDC_STYLER_CHECK_NESTING_DELIMITER6, SCE_USER_MASK_NESTING_DELIMITER6 }, // in case of duplicate entries, newer string should overwrite old one !
{ IDC_STYLER_CHECK_NESTING_DELIMITER7, SCE_USER_MASK_NESTING_DELIMITER7 }, for (iter = temp.begin(); iter != temp.end(); ++iter)
{ IDC_STYLER_CHECK_NESTING_DELIMITER8, SCE_USER_MASK_NESTING_DELIMITER8 }, keywordNameMapper[iter->second] = iter->first;
{ IDC_STYLER_CHECK_NESTING_COMMENT, SCE_USER_MASK_NESTING_COMMENT }, keywordIdMapper.insert(temp.begin(), temp.end());
{ IDC_STYLER_CHECK_NESTING_COMMENT_LINE, SCE_USER_MASK_NESTING_COMMENT_LINE }, temp.clear();
{ IDC_STYLER_CHECK_NESTING_KEYWORD1, SCE_USER_MASK_NESTING_KEYWORD1 },
{ IDC_STYLER_CHECK_NESTING_KEYWORD2, SCE_USER_MASK_NESTING_KEYWORD2 }, // pre 2.0
{ IDC_STYLER_CHECK_NESTING_KEYWORD3, SCE_USER_MASK_NESTING_KEYWORD3 }, temp[TEXT("FOLDEROPEN")] = SCE_USER_STYLE_FOLDER_IN_CODE1;
{ IDC_STYLER_CHECK_NESTING_KEYWORD4, SCE_USER_MASK_NESTING_KEYWORD4 }, temp[TEXT("FOLDERCLOSE")] = SCE_USER_STYLE_FOLDER_IN_CODE1;
{ IDC_STYLER_CHECK_NESTING_KEYWORD5, SCE_USER_MASK_NESTING_KEYWORD5 }, temp[TEXT("KEYWORD1")] = SCE_USER_STYLE_KEYWORD1;
{ IDC_STYLER_CHECK_NESTING_KEYWORD6, SCE_USER_MASK_NESTING_KEYWORD6 }, temp[TEXT("KEYWORD2")] = SCE_USER_STYLE_KEYWORD2;
{ IDC_STYLER_CHECK_NESTING_KEYWORD7, SCE_USER_MASK_NESTING_KEYWORD7 }, temp[TEXT("KEYWORD3")] = SCE_USER_STYLE_KEYWORD3;
{ IDC_STYLER_CHECK_NESTING_KEYWORD8, SCE_USER_MASK_NESTING_KEYWORD8 }, temp[TEXT("KEYWORD4")] = SCE_USER_STYLE_KEYWORD4;
{ IDC_STYLER_CHECK_NESTING_OPERATORS1, SCE_USER_MASK_NESTING_OPERATORS1 }, temp[TEXT("COMMENT")] = SCE_USER_STYLE_COMMENT;
{ IDC_STYLER_CHECK_NESTING_OPERATORS2, SCE_USER_MASK_NESTING_OPERATORS2 }, temp[TEXT("COMMENT LINE")] = SCE_USER_STYLE_COMMENTLINE;
{ IDC_STYLER_CHECK_NESTING_NUMBERS, SCE_USER_MASK_NESTING_NUMBERS } temp[TEXT("NUMBER")] = SCE_USER_STYLE_NUMBER;
temp[TEXT("OPERATOR")] = SCE_USER_STYLE_OPERATOR;
temp[TEXT("DELIMINER1")] = SCE_USER_STYLE_DELIMITER1;
temp[TEXT("DELIMINER2")] = SCE_USER_STYLE_DELIMITER2;
temp[TEXT("DELIMINER3")] = SCE_USER_STYLE_DELIMITER3;
// in case of duplicate entries, newer string should overwrite old one !
for (iter = temp.begin(); iter != temp.end(); ++iter)
styleNameMapper[iter->second] = iter->first;
styleIdMapper.insert(temp.begin(), temp.end());
temp.clear();
// post 2.0
temp[TEXT("DEFAULT")] = SCE_USER_STYLE_DEFAULT;
temp[TEXT("COMMENTS")] = SCE_USER_STYLE_COMMENT;
temp[TEXT("LINE COMMENTS")] = SCE_USER_STYLE_COMMENTLINE;
temp[TEXT("NUMBERS")] = SCE_USER_STYLE_NUMBER;
temp[TEXT("KEYWORDS1")] = SCE_USER_STYLE_KEYWORD1;
temp[TEXT("KEYWORDS2")] = SCE_USER_STYLE_KEYWORD2;
temp[TEXT("KEYWORDS3")] = SCE_USER_STYLE_KEYWORD3;
temp[TEXT("KEYWORDS4")] = SCE_USER_STYLE_KEYWORD4;
temp[TEXT("KEYWORDS5")] = SCE_USER_STYLE_KEYWORD5;
temp[TEXT("KEYWORDS6")] = SCE_USER_STYLE_KEYWORD6;
temp[TEXT("KEYWORDS7")] = SCE_USER_STYLE_KEYWORD7;
temp[TEXT("KEYWORDS8")] = SCE_USER_STYLE_KEYWORD8;
temp[TEXT("OPERATORS")] = SCE_USER_STYLE_OPERATOR;
temp[TEXT("FOLDER IN CODE1")] = SCE_USER_STYLE_FOLDER_IN_CODE1;
temp[TEXT("FOLDER IN CODE2")] = SCE_USER_STYLE_FOLDER_IN_CODE2;
temp[TEXT("FOLDER IN COMMENT")] = SCE_USER_STYLE_FOLDER_IN_COMMENT;
temp[TEXT("DELIMITERS1")] = SCE_USER_STYLE_DELIMITER1;
temp[TEXT("DELIMITERS2")] = SCE_USER_STYLE_DELIMITER2;
temp[TEXT("DELIMITERS3")] = SCE_USER_STYLE_DELIMITER3;
temp[TEXT("DELIMITERS4")] = SCE_USER_STYLE_DELIMITER4;
temp[TEXT("DELIMITERS5")] = SCE_USER_STYLE_DELIMITER5;
temp[TEXT("DELIMITERS6")] = SCE_USER_STYLE_DELIMITER6;
temp[TEXT("DELIMITERS7")] = SCE_USER_STYLE_DELIMITER7;
temp[TEXT("DELIMITERS8")] = SCE_USER_STYLE_DELIMITER8;
// in case of duplicate entries, newer string should overwrite old one !
for (iter = temp.begin(); iter != temp.end(); ++iter)
styleNameMapper[iter->second] = iter->first;
styleIdMapper.insert(temp.begin(), temp.end());
temp.clear();
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER1] = SCE_USER_MASK_NESTING_DELIMITER1;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER2] = SCE_USER_MASK_NESTING_DELIMITER2;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER3] = SCE_USER_MASK_NESTING_DELIMITER3;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER4] = SCE_USER_MASK_NESTING_DELIMITER4;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER5] = SCE_USER_MASK_NESTING_DELIMITER5;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER6] = SCE_USER_MASK_NESTING_DELIMITER6;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER7] = SCE_USER_MASK_NESTING_DELIMITER7;
nestingMapper[IDC_STYLER_CHECK_NESTING_DELIMITER8] = SCE_USER_MASK_NESTING_DELIMITER8;
nestingMapper[IDC_STYLER_CHECK_NESTING_COMMENT] = SCE_USER_MASK_NESTING_COMMENT;
nestingMapper[IDC_STYLER_CHECK_NESTING_COMMENT_LINE] = SCE_USER_MASK_NESTING_COMMENT_LINE;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD1] = SCE_USER_MASK_NESTING_KEYWORD1;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD2] = SCE_USER_MASK_NESTING_KEYWORD2;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD3] = SCE_USER_MASK_NESTING_KEYWORD3;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD4] = SCE_USER_MASK_NESTING_KEYWORD4;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD5] = SCE_USER_MASK_NESTING_KEYWORD5;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD6] = SCE_USER_MASK_NESTING_KEYWORD6;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD7] = SCE_USER_MASK_NESTING_KEYWORD7;
nestingMapper[IDC_STYLER_CHECK_NESTING_KEYWORD8] = SCE_USER_MASK_NESTING_KEYWORD8;
nestingMapper[IDC_STYLER_CHECK_NESTING_OPERATORS1] = SCE_USER_MASK_NESTING_OPERATORS1;
nestingMapper[IDC_STYLER_CHECK_NESTING_OPERATORS2] = SCE_USER_MASK_NESTING_OPERATORS2;
nestingMapper[IDC_STYLER_CHECK_NESTING_NUMBERS] = SCE_USER_MASK_NESTING_NUMBERS;
dialogMapper[IDC_NUMBER_PREFIX1_EDIT] = SCE_USER_KWLIST_NUMBER_PREFIX1;
dialogMapper[IDC_NUMBER_PREFIX2_EDIT] = SCE_USER_KWLIST_NUMBER_PREFIX2;
dialogMapper[IDC_NUMBER_EXTRAS1_EDIT] = SCE_USER_KWLIST_NUMBER_EXTRAS1;
dialogMapper[IDC_NUMBER_EXTRAS2_EDIT] = SCE_USER_KWLIST_NUMBER_EXTRAS2;
dialogMapper[IDC_NUMBER_SUFFIX1_EDIT] = SCE_USER_KWLIST_NUMBER_SUFFIX1;
dialogMapper[IDC_NUMBER_SUFFIX2_EDIT] = SCE_USER_KWLIST_NUMBER_SUFFIX2;
dialogMapper[IDC_NUMBER_RANGE_EDIT] = SCE_USER_KWLIST_NUMBER_RANGE;
dialogMapper[IDC_FOLDER_IN_CODE1_OPEN_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN;
dialogMapper[IDC_FOLDER_IN_CODE1_MIDDLE_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE;
dialogMapper[IDC_FOLDER_IN_CODE1_CLOSE_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE;
dialogMapper[IDC_FOLDER_IN_CODE2_OPEN_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN;
dialogMapper[IDC_FOLDER_IN_CODE2_MIDDLE_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE;
dialogMapper[IDC_FOLDER_IN_CODE2_CLOSE_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE;
dialogMapper[IDC_FOLDER_IN_COMMENT_OPEN_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN;
dialogMapper[IDC_FOLDER_IN_COMMENT_MIDDLE_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE;
dialogMapper[IDC_FOLDER_IN_COMMENT_CLOSE_EDIT] = SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE;
dialogMapper[IDC_KEYWORD1_EDIT] = SCE_USER_KWLIST_KEYWORDS1;
dialogMapper[IDC_KEYWORD2_EDIT] = SCE_USER_KWLIST_KEYWORDS2;
dialogMapper[IDC_KEYWORD3_EDIT] = SCE_USER_KWLIST_KEYWORDS3;
dialogMapper[IDC_KEYWORD4_EDIT] = SCE_USER_KWLIST_KEYWORDS4;
dialogMapper[IDC_KEYWORD5_EDIT] = SCE_USER_KWLIST_KEYWORDS5;
dialogMapper[IDC_KEYWORD6_EDIT] = SCE_USER_KWLIST_KEYWORDS6;
dialogMapper[IDC_KEYWORD7_EDIT] = SCE_USER_KWLIST_KEYWORDS7;
dialogMapper[IDC_KEYWORD8_EDIT] = SCE_USER_KWLIST_KEYWORDS8;
setLexerMapper[SCE_USER_KWLIST_COMMENTS] = "userDefine.comments";
setLexerMapper[SCE_USER_KWLIST_DELIMITERS] = "userDefine.delimiters";
setLexerMapper[SCE_USER_KWLIST_OPERATORS1] = "userDefine.operators1";
setLexerMapper[SCE_USER_KWLIST_NUMBER_PREFIX1] = "userDefine.numberPrefix1";
setLexerMapper[SCE_USER_KWLIST_NUMBER_PREFIX2] = "userDefine.numberPrefix2";
setLexerMapper[SCE_USER_KWLIST_NUMBER_EXTRAS1] = "userDefine.numberExtras1";
setLexerMapper[SCE_USER_KWLIST_NUMBER_EXTRAS2] = "userDefine.numberExtras2";
setLexerMapper[SCE_USER_KWLIST_NUMBER_SUFFIX1] = "userDefine.numberSuffix1";
setLexerMapper[SCE_USER_KWLIST_NUMBER_SUFFIX2] = "userDefine.numberSuffix2";
setLexerMapper[SCE_USER_KWLIST_NUMBER_RANGE] = "userDefine.numberRange";
setLexerMapper[SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN] = "userDefine.foldersInCode1Open";
setLexerMapper[SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE] = "userDefine.foldersInCode1Middle";
setLexerMapper[SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE] = "userDefine.foldersInCode1Close";
};
}; };
GlobalMappers & globalMappper();
class SharedParametersDialog : public StaticDialog class SharedParametersDialog : public StaticDialog
{ {
friend class StylerDlg; friend class StylerDlg;

View File

@ -148,70 +148,83 @@ IDD_KEYWORD_STYLE_DLG DIALOGEX 36, 44, 337, 470
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
EDITTEXT IDC_KEYWORD1_EDIT,19,46,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD1_EDIT,19,46,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "1st group",IDC_KEYWORD1_DESCGROUP_STATIC,9,17,155,104,BS_CENTER GROUPBOX "1st group",IDC_KEYWORD1_DESCGROUP_STATIC,9,17,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD1_STYLER,18,29,53,13 PUSHBUTTON "Styler",IDC_KEYWORD1_STYLER,18,29,53,13
CONTROL "Prefix mode",IDC_KEYWORD1_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,33,68,13 CONTROL "Prefix mode",IDC_KEYWORD1_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,33,68,13
EDITTEXT IDC_KEYWORD2_EDIT,181,46,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD2_EDIT,181,46,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "2nd group",IDC_KEYWORD2_DESCGROUP_STATIC,171,17,155,104,BS_CENTER GROUPBOX "2nd group",IDC_KEYWORD2_DESCGROUP_STATIC,171,17,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD2_STYLER,179,28,53,13 PUSHBUTTON "Styler",IDC_KEYWORD2_STYLER,179,28,53,13
CONTROL "Prefix mode",IDC_KEYWORD2_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,33,68,13 CONTROL "Prefix mode",IDC_KEYWORD2_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,33,68,13
EDITTEXT IDC_KEYWORD3_EDIT,20,154,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD3_EDIT,20,154,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "3rd group",IDC_KEYWORD3_DESCGROUP_STATIC,10,125,155,104,BS_CENTER GROUPBOX "3rd group",IDC_KEYWORD3_DESCGROUP_STATIC,10,125,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD3_STYLER,18,136,53,13 PUSHBUTTON "Styler",IDC_KEYWORD3_STYLER,18,136,53,13
CONTROL "Prefix mode",IDC_KEYWORD3_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,141,68,13 CONTROL "Prefix mode",IDC_KEYWORD3_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,141,68,13
EDITTEXT IDC_KEYWORD4_EDIT,181,154,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD4_EDIT,181,154,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "4th group",IDC_KEYWORD4_DESCGROUP_STATIC,171,125,155,104,BS_CENTER GROUPBOX "4th group",IDC_KEYWORD4_DESCGROUP_STATIC,171,125,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD4_STYLER,179,136,53,13 PUSHBUTTON "Styler",IDC_KEYWORD4_STYLER,179,136,53,13
CONTROL "Prefix mode",IDC_KEYWORD4_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,141,68,13 CONTROL "Prefix mode",IDC_KEYWORD4_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,141,68,13
EDITTEXT IDC_KEYWORD5_EDIT,20,263,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD5_EDIT,20,263,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "5th group",IDC_KEYWORD5_DESCGROUP_STATIC,10,234,155,104,BS_CENTER GROUPBOX "5th group",IDC_KEYWORD5_DESCGROUP_STATIC,10,234,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD5_STYLER,18,245,53,13 PUSHBUTTON "Styler",IDC_KEYWORD5_STYLER,18,245,53,13
CONTROL "Prefix mode",IDC_KEYWORD5_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,250,68,13 CONTROL "Prefix mode",IDC_KEYWORD5_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,250,68,13
EDITTEXT IDC_KEYWORD6_EDIT,181,263,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD6_EDIT,181,263,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "6th group",IDC_KEYWORD6_DESCGROUP_STATIC,171,234,155,104,BS_CENTER GROUPBOX "6th group",IDC_KEYWORD6_DESCGROUP_STATIC,171,234,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD6_STYLER,179,245,53,13 PUSHBUTTON "Styler",IDC_KEYWORD6_STYLER,179,245,53,13
CONTROL "Prefix mode",IDC_KEYWORD6_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,250,68,13 CONTROL "Prefix mode",IDC_KEYWORD6_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,250,68,13
EDITTEXT IDC_KEYWORD7_EDIT,20,373,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD7_EDIT,20,373,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "7th group",IDC_KEYWORD7_DESCGROUP_STATIC,10,344,155,104,BS_CENTER GROUPBOX "7th group",IDC_KEYWORD7_DESCGROUP_STATIC,10,344,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD7_STYLER,18,355,53,13 PUSHBUTTON "Styler",IDC_KEYWORD7_STYLER,18,355,53,13
CONTROL "Prefix mode",IDC_KEYWORD7_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,359,72,13 CONTROL "Prefix mode",IDC_KEYWORD7_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,359,72,13
EDITTEXT IDC_KEYWORD8_EDIT,181,373,138,69,ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN EDITTEXT IDC_KEYWORD8_EDIT,181,373,138,69,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
GROUPBOX "8th group",IDC_KEYWORD8_DESCGROUP_STATIC,171,344,155,104,BS_CENTER GROUPBOX "8th group",IDC_KEYWORD8_DESCGROUP_STATIC,171,344,155,104,BS_CENTER
PUSHBUTTON "Styler",IDC_KEYWORD8_STYLER,179,355,53,13 PUSHBUTTON "Styler",IDC_KEYWORD8_STYLER,179,355,53,13
CONTROL "Prefix mode",IDC_KEYWORD8_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,359,72,13 CONTROL "Prefix mode",IDC_KEYWORD8_PREFIX_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,359,72,13
END END
IDD_COMMENT_STYLE_DLG DIALOGEX 36, 44, 337, 400 IDD_COMMENT_STYLE_DLG DIALOGEX 36, 44, 337, 472
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
CONTROL "Allow folding of comments",IDC_FOLDING_OF_COMMENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,11,206,14 GROUPBOX "Line comment position",IDC_COMMENTLINE_POSITION_STATIC,11,18,156,57
CONTROL "Force line comments at beginning of line",IDC_FORCE_LINE_COMMENTS_AT_BOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,30,206,14 CONTROL "Allow folding of comments",IDC_FOLDING_OF_COMMENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,188,25,131,8
EDITTEXT IDC_COMMENTLINE_OPEN_EDIT,20,105,138,12,ES_MULTILINE | WS_VSCROLL CONTROL "Allow anywhere",IDC_ALLOW_ANYWHERE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,33,33,121,8
EDITTEXT IDC_COMMENTLINE_CONTINUE_EDIT,20,131,138,12,ES_MULTILINE | WS_VSCROLL CONTROL "Force at beginning of line",IDC_FORCE_AT_BOL,"Button",BS_AUTORADIOBUTTON,33,45,121,8
EDITTEXT IDC_COMMENTLINE_CLOSE_EDIT,20,155,138,12,ES_MULTILINE | WS_VSCROLL CONTROL "Allow preceeding whitespace",IDC_ALLOW_WHITESPACE,"Button",BS_AUTORADIOBUTTON,33,57,121,8
PUSHBUTTON "Styler",IDC_COMMENTLINE_STYLER,22,72,54,13 EDITTEXT IDC_COMMENTLINE_OPEN_EDIT,20,136,138,12,ES_MULTILINE | WS_VSCROLL
LTEXT "Open",IDC_COMMENTLINE_OPEN_STATIC,20,95,138,9 EDITTEXT IDC_COMMENTLINE_CONTINUE_EDIT,20,164,138,12,ES_MULTILINE | WS_VSCROLL
LTEXT "Continue character",IDC_COMMENTLINE_CONTINUE_STATIC,20,121,138,9 EDITTEXT IDC_COMMENTLINE_CLOSE_EDIT,20,189,138,12,ES_MULTILINE | WS_VSCROLL
LTEXT "Close",IDC_COMMENTLINE_CLOSE_STATIC,20,145,138,9 PUSHBUTTON "Styler",IDC_COMMENTLINE_STYLER,22,104,54,13
GROUPBOX "Comment line style",IDC_COMMENTLINE_DESCGROUP_STATIC,10,58,155,119,BS_CENTER LTEXT "Open",IDC_COMMENTLINE_OPEN_STATIC,20,126,138,9
EDITTEXT IDC_COMMENT_OPEN_EDIT,182,117,138,12,ES_MULTILINE | WS_VSCROLL LTEXT "Continue character",IDC_COMMENTLINE_CONTINUE_STATIC,20,152,138,9
EDITTEXT IDC_COMMENT_CLOSE_EDIT,182,145,138,12,ES_MULTILINE | WS_VSCROLL LTEXT "Close",IDC_COMMENTLINE_CLOSE_STATIC,20,178,138,9
PUSHBUTTON "Styler",IDC_COMMENT_STYLER,184,77,54,13 GROUPBOX "Comment line style",IDC_COMMENTLINE_DESCGROUP_STATIC,10,90,155,119,BS_CENTER
LTEXT "Open",IDC_COMMENT_OPEN_STATIC,182,107,138,9 EDITTEXT IDC_COMMENT_OPEN_EDIT,182,149,138,12,ES_MULTILINE | WS_VSCROLL
LTEXT "Close",IDC_COMMENT_CLOSE_STATIC,182,136,138,9 EDITTEXT IDC_COMMENT_CLOSE_EDIT,182,177,138,12,ES_MULTILINE | WS_VSCROLL
GROUPBOX "Comment style",IDC_COMMENT_DESCGROUP_STATIC,172,58,155,119,BS_CENTER PUSHBUTTON "Styler",IDC_COMMENT_STYLER,184,109,54,13
GROUPBOX "Number style",IDC_NUMBER_DESCGROUP_STATIC,10,190,155,159,BS_CENTER LTEXT "Open",IDC_COMMENT_OPEN_STATIC,182,139,138,9
EDITTEXT IDC_NUMBER_PREFIX_EDIT,20,243,138,12,ES_MULTILINE | WS_VSCROLL LTEXT "Close",IDC_COMMENT_CLOSE_STATIC,182,168,138,9
EDITTEXT IDC_NUMBER_EXTRAPREF_EDIT,20,271,138,12,ES_MULTILINE | WS_VSCROLL GROUPBOX "Comment style",IDC_COMMENT_DESCGROUP_STATIC,172,90,155,119,BS_CENTER
EDITTEXT IDC_NUMBER_SUFFIX_EDIT,20,300,138,12,ES_MULTILINE | WS_VSCROLL GROUPBOX "Number style",IDC_NUMBER_DESCGROUP_STATIC,10,222,317,239,BS_CENTER
EDITTEXT IDC_NUMBER_EXTRA_EDIT,20,328,138,12,ES_MULTILINE | WS_VSCROLL PUSHBUTTON "Styler",IDC_NUMBER_STYLER,24,237,54,13
PUSHBUTTON "Styler",IDC_NUMBER_STYLER,24,205,54,13 RTEXT "Prefix 1:",IDC_NUMBER_PREFIX1_STATIC,12,264,45,13
LTEXT "Number prefixes (hex, octal, ...) :",IDC_NUMBER_PREFIX_STATIC,20,233,138,13 RTEXT "Prefix 2:",IDC_NUMBER_PREFIX2_STATIC,12,291,45,13
LTEXT "Extra characters in numbers with a prefix : ",IDC_NUMBER_EXTRAPREF_STATIC,20,261,138,13 RTEXT "Extras 1:",IDC_NUMBER_EXTRAS1_STATIC,12,318,45,13
LTEXT "Optional suffixes for numbers : ",IDC_NUMBER_SUFFIX_STATIC,20,290,138,13 RTEXT "Extras 2:",IDC_NUMBER_EXTRAS2_STATIC,12,345,45,13
LTEXT "Range symbols : ",IDC_NUMBER_EXTRA_STATIC,20,318,138,13 RTEXT "Suffix 1:",IDC_NUMBER_SUFFIX1_STATIC,12,372,45,13
RTEXT "Suffix 2:",IDC_NUMBER_SUFFIX2_STATIC,12,399,45,13
RTEXT "Range : ",IDC_NUMBER_RANGE_STATIC,12,426,45,13
EDITTEXT IDC_NUMBER_PREFIX1_EDIT,63,264,136,21,ES_MULTILINE | WS_VSCROLL
EDITTEXT IDC_NUMBER_PREFIX2_EDIT,63,291,136,21,ES_MULTILINE | WS_VSCROLL
EDITTEXT IDC_NUMBER_EXTRAS1_EDIT,63,318,136,21,ES_MULTILINE | WS_VSCROLL
EDITTEXT IDC_NUMBER_EXTRAS2_EDIT,63,345,136,21,ES_MULTILINE | WS_VSCROLL
EDITTEXT IDC_NUMBER_SUFFIX1_EDIT,63,372,136,21,ES_MULTILINE | WS_VSCROLL
EDITTEXT IDC_NUMBER_SUFFIX2_EDIT,63,399,136,21,ES_MULTILINE | WS_VSCROLL
EDITTEXT IDC_NUMBER_RANGE_EDIT,63,426,136,21,ES_MULTILINE | WS_VSCROLL
GROUPBOX "Decimal separator",IDC_DECIMAL_SEPARATOR_STATIC,221,259,85,66
CONTROL "Dot",IDC_DOT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,242,278,59,8
CONTROL "Comma",IDC_COMMA_RADIO,"Button",BS_AUTORADIOBUTTON,242,292,59,8
CONTROL "Both",IDC_BOTH_RADIO,"Button",BS_AUTORADIOBUTTON,242,306,59,8
END END
IDD_GLOBAL_USERDEFINE_DLG DIALOGEX 36, 44, 365, 670 IDD_GLOBAL_USERDEFINE_DLG DIALOGEX 36, 44, 365, 670

View File

@ -136,11 +136,12 @@
#define IDC_KEYWORD8_PREFIX_CHECK (IDC_KEYWORD8 + 21) #define IDC_KEYWORD8_PREFIX_CHECK (IDC_KEYWORD8 + 21)
#define IDC_KEYWORD8_STYLER (IDC_KEYWORD8 + 22) #define IDC_KEYWORD8_STYLER (IDC_KEYWORD8 + 22)
// #define IDC_KEYWORD_SCROLLBAR (IDD_KEYWORD_STYLE_DLG + 500)
#define IDD_COMMENT_STYLE_DLG 23000 //(IDD_GLOBAL_USERDEFINE_DLG + 3000) #define IDD_COMMENT_STYLE_DLG 23000 //(IDD_GLOBAL_USERDEFINE_DLG + 3000)
#define IDC_FOLDING_OF_COMMENTS (IDD_COMMENT_STYLE_DLG + 1) #define IDC_FOLDING_OF_COMMENTS (IDD_COMMENT_STYLE_DLG + 1)
#define IDC_FORCE_LINE_COMMENTS_AT_BOL (IDD_COMMENT_STYLE_DLG + 2) #define IDC_COMMENTLINE_POSITION_STATIC (IDD_COMMENT_STYLE_DLG + 3)
#define IDC_ALLOW_ANYWHERE (IDD_COMMENT_STYLE_DLG + 4)
#define IDC_FORCE_AT_BOL (IDD_COMMENT_STYLE_DLG + 5)
#define IDC_ALLOW_WHITESPACE (IDD_COMMENT_STYLE_DLG + 6)
#define IDC_COMMENT (IDD_COMMENT_STYLE_DLG + 100) #define IDC_COMMENT (IDD_COMMENT_STYLE_DLG + 100)
#define IDC_COMMENT_DESCGROUP_STATIC (IDC_COMMENT + 1 ) #define IDC_COMMENT_DESCGROUP_STATIC (IDC_COMMENT + 1 )
@ -153,14 +154,24 @@
#define IDC_NUMBER (IDD_COMMENT_STYLE_DLG + 200) #define IDC_NUMBER (IDD_COMMENT_STYLE_DLG + 200)
#define IDC_NUMBER_DESCGROUP_STATIC (IDC_NUMBER + 1 ) #define IDC_NUMBER_DESCGROUP_STATIC (IDC_NUMBER + 1 )
#define IDC_NUMBER_STYLER (IDC_NUMBER + 20) #define IDC_NUMBER_STYLER (IDC_NUMBER + 20)
#define IDC_NUMBER_PREFIX_STATIC (IDC_NUMBER + 21) #define IDC_NUMBER_PREFIX1_STATIC (IDC_NUMBER + 30)
#define IDC_NUMBER_PREFIX_EDIT (IDC_NUMBER + 22) #define IDC_NUMBER_PREFIX1_EDIT (IDC_NUMBER + 31)
#define IDC_NUMBER_EXTRA_STATIC (IDC_NUMBER + 23) #define IDC_NUMBER_PREFIX2_STATIC (IDC_NUMBER + 32)
#define IDC_NUMBER_EXTRA_EDIT (IDC_NUMBER + 24) #define IDC_NUMBER_PREFIX2_EDIT (IDC_NUMBER + 33)
#define IDC_NUMBER_SUFFIX_STATIC (IDC_NUMBER + 25) #define IDC_NUMBER_EXTRAS1_STATIC (IDC_NUMBER + 34)
#define IDC_NUMBER_SUFFIX_EDIT (IDC_NUMBER + 26) #define IDC_NUMBER_EXTRAS1_EDIT (IDC_NUMBER + 35)
#define IDC_NUMBER_EXTRAPREF_STATIC (IDC_NUMBER + 27) #define IDC_NUMBER_EXTRAS2_STATIC (IDC_NUMBER + 36)
#define IDC_NUMBER_EXTRAPREF_EDIT (IDC_NUMBER + 28) #define IDC_NUMBER_EXTRAS2_EDIT (IDC_NUMBER + 37)
#define IDC_NUMBER_SUFFIX1_STATIC (IDC_NUMBER + 38)
#define IDC_NUMBER_SUFFIX1_EDIT (IDC_NUMBER + 39)
#define IDC_NUMBER_SUFFIX2_STATIC (IDC_NUMBER + 40)
#define IDC_NUMBER_SUFFIX2_EDIT (IDC_NUMBER + 41)
#define IDC_NUMBER_RANGE_STATIC (IDC_NUMBER + 42)
#define IDC_NUMBER_RANGE_EDIT (IDC_NUMBER + 43)
#define IDC_DECIMAL_SEPARATOR_STATIC (IDC_NUMBER + 44)
#define IDC_DOT_RADIO (IDC_NUMBER + 45)
#define IDC_COMMA_RADIO (IDC_NUMBER + 46)
#define IDC_BOTH_RADIO (IDC_NUMBER + 47)
#define IDC_COMMENTLINE (IDD_COMMENT_STYLE_DLG + 300) #define IDC_COMMENTLINE (IDD_COMMENT_STYLE_DLG + 300)
#define IDC_COMMENTLINE_DESCGROUP_STATIC (IDC_COMMENTLINE + 1 ) #define IDC_COMMENTLINE_DESCGROUP_STATIC (IDC_COMMENTLINE + 1 )

View File

@ -881,6 +881,7 @@ BOOL CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_SMARTHILITECASESENSITIVE), nppGUI._enableSmartHilite); ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_SMARTHILITECASESENSITIVE), nppGUI._enableSmartHilite);
return TRUE; return TRUE;
} }
case IDC_CHECK_SMARTHILITECASESENSITIVE: case IDC_CHECK_SMARTHILITECASESENSITIVE:
{ {
nppGUI._smartHiliteCaseSensitive = !nppGUI._smartHiliteCaseSensitive; nppGUI._smartHiliteCaseSensitive = !nppGUI._smartHiliteCaseSensitive;
@ -904,6 +905,7 @@ BOOL CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_HIGHLITENONEHTMLZONE), nppGUI._enableTagsMatchHilite); ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_HIGHLITENONEHTMLZONE), nppGUI._enableTagsMatchHilite);
return TRUE; return TRUE;
} }
case IDC_CHECK_ENABLTAGATTRHILITE: case IDC_CHECK_ENABLTAGATTRHILITE:
{ {
nppGUI._enableTagAttrsHilite = !nppGUI._enableTagAttrsHilite; nppGUI._enableTagAttrsHilite = !nppGUI._enableTagAttrsHilite;

View File

@ -200,33 +200,40 @@
#define SCE_OBJC_DIRECTIVE 20 #define SCE_OBJC_DIRECTIVE 20
#define SCE_OBJC_QUALIFIER 21 #define SCE_OBJC_QUALIFIER 21
#define SCE_UDL_VERSION_MAJOR 2
#define SCE_UDL_VERSION_MINOR 1
#define SCE_UDL_VERSION_BUILD 0
#define SCE_UDL_VERSION_REVISION 10
#define SCE_USER_KWLIST_COMMENTS 0 #define SCE_USER_KWLIST_COMMENTS 0
#define SCE_USER_KWLIST_NUMBER_EXTRA 1 #define SCE_USER_KWLIST_NUMBER_PREFIX1 1
#define SCE_USER_KWLIST_NUMBER_PREFIX 2 #define SCE_USER_KWLIST_NUMBER_PREFIX2 2
#define SCE_USER_KWLIST_NUMBER_EXTRAPREF 3 #define SCE_USER_KWLIST_NUMBER_EXTRAS1 3
#define SCE_USER_KWLIST_NUMBER_SUFFIX 4 #define SCE_USER_KWLIST_NUMBER_EXTRAS2 4
#define SCE_USER_KWLIST_OPERATORS1 5 #define SCE_USER_KWLIST_NUMBER_SUFFIX1 5
#define SCE_USER_KWLIST_OPERATORS2 6 #define SCE_USER_KWLIST_NUMBER_SUFFIX2 6
#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN 7 #define SCE_USER_KWLIST_NUMBER_RANGE 7
#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE 8 #define SCE_USER_KWLIST_OPERATORS1 8
#define SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE 9 #define SCE_USER_KWLIST_OPERATORS2 9
#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN 10 #define SCE_USER_KWLIST_FOLDERS_IN_CODE1_OPEN 10
#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE 11 #define SCE_USER_KWLIST_FOLDERS_IN_CODE1_MIDDLE 11
#define SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE 12 #define SCE_USER_KWLIST_FOLDERS_IN_CODE1_CLOSE 12
#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN 13 #define SCE_USER_KWLIST_FOLDERS_IN_CODE2_OPEN 13
#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE 14 #define SCE_USER_KWLIST_FOLDERS_IN_CODE2_MIDDLE 14
#define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE 15 #define SCE_USER_KWLIST_FOLDERS_IN_CODE2_CLOSE 15
#define SCE_USER_KWLIST_KEYWORDS1 16 #define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_OPEN 16
#define SCE_USER_KWLIST_KEYWORDS2 17 #define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_MIDDLE 17
#define SCE_USER_KWLIST_KEYWORDS3 18 #define SCE_USER_KWLIST_FOLDERS_IN_COMMENT_CLOSE 18
#define SCE_USER_KWLIST_KEYWORDS4 19 #define SCE_USER_KWLIST_KEYWORDS1 19
#define SCE_USER_KWLIST_KEYWORDS5 20 #define SCE_USER_KWLIST_KEYWORDS2 20
#define SCE_USER_KWLIST_KEYWORDS6 21 #define SCE_USER_KWLIST_KEYWORDS3 21
#define SCE_USER_KWLIST_KEYWORDS7 22 #define SCE_USER_KWLIST_KEYWORDS4 22
#define SCE_USER_KWLIST_KEYWORDS8 23 #define SCE_USER_KWLIST_KEYWORDS5 23
#define SCE_USER_KWLIST_DELIMITERS 24 #define SCE_USER_KWLIST_KEYWORDS6 24
#define SCE_USER_KWLIST_TOTAL 25 // must always be <= SCE_USER_STYLE_TOTAL_STYLES #define SCE_USER_KWLIST_KEYWORDS7 25
// and <= KEYWORDSET_MAX #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_DELIMITERS 8
#define SCE_USER_TOTAL_KEYWORD_GROUPS 8 #define SCE_USER_TOTAL_KEYWORD_GROUPS 8

File diff suppressed because it is too large Load Diff