本文整理汇总了C++中NppParameters::getLStylerArray方法的典型用法代码示例。如果您正苦于以下问题:C++ NppParameters::getLStylerArray方法的具体用法?C++ NppParameters::getLStylerArray怎么用?C++ NppParameters::getLStylerArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NppParameters
的用法示例。
在下文中一共展示了NppParameters::getLStylerArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getLangFromExt
LangType Buffer::getLangFromExt(const char *ext)
{
NppParameters *pNppParam = NppParameters::getInstance();
int i = pNppParam->getNbLang();
i--;
while (i >= 0)
{
Lang *l = pNppParam->getLangFromIndex(i--);
const char *defList = l->getDefaultExtList();
const char *userList = NULL;
LexerStylerArray &lsa = pNppParam->getLStylerArray();
const char *lName = l->getLangName();
LexerStyler *pLS = lsa.getLexerStylerByName(lName);
if (pLS)
userList = pLS->getLexerUserExt();
std::string list("");
if (defList)
list += defList;
if (userList)
{
list += " ";
list += userList;
}
if (isInList(ext, list.c_str()))
return l->getLangID();
}
return L_TXT;
}
示例2: loadLangListFromNppParam
void WordStyleDlg::loadLangListFromNppParam()
{
NppParameters *nppParamInst = NppParameters::getInstance();
_lsArray = nppParamInst->getLStylerArray();
_globalStyles = nppParamInst->getGlobalStylers();
// Clean up Language List
::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_RESETCONTENT, 0, 0);
::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_ADDSTRING, 0, (LPARAM)TEXT("Global Styles"));
// All the lexers
for (int i = 0, nb = _lsArray.getNbLexer() ; i < nb ; ++i)
{
::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_ADDSTRING, 0, (LPARAM)_lsArray.getLexerDescFromIndex(i));
}
const int index2Begin = 0;
::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_SETCURSEL, 0, index2Begin);
setStyleListFromLexer(index2Begin);
}
示例3: run_dlgProc
//.........这里部分代码省略.........
}
else
{
switch (wParam)
{
case IDC_BOLD_CHECK :
updateFontStyleStatus(BOLD_STATUS);
notifyDataModified();
apply();
break;
case IDC_ITALIC_CHECK :
updateFontStyleStatus(ITALIC_STATUS);
notifyDataModified();
apply();
break;
case IDC_UNDERLINE_CHECK :
updateFontStyleStatus(UNDERLINE_STATUS);
notifyDataModified();
apply();
break;
case IDCANCEL :
if (_isDirty)
{
NppParameters *nppParamInst = NppParameters::getInstance();
if (_restoreInvalid)
{
generic_string str( nppParamInst->getNppGUI()._themeName );
nppParamInst->reloadStylers( &str[0] );
}
LexerStylerArray & lsArray = nppParamInst->getLStylerArray();
StyleArray & globalStyles = nppParamInst->getGlobalStylers();
if (_restoreInvalid)
{
_lsArray = _styles2restored = lsArray;
_globalStyles = _gstyles2restored = globalStyles;
}
else
{
globalStyles = _globalStyles = _gstyles2restored;
lsArray = _lsArray = _styles2restored;
}
restoreGlobalOverrideValues();
_restoreInvalid = false;
_isDirty = false;
_isThemeDirty = false;
setVisualFromStyleList();
//(nppParamInst->getNppGUI())._themeName
::SendMessage(_hSwitch2ThemeCombo, CB_SETCURSEL, _currentThemeIndex, 0);
::SendMessage(_hParent, WM_UPDATESCINTILLAS, 0, 0);
}
::EnableWindow(::GetDlgItem(_hSelf, IDC_SAVECLOSE_BUTTON), FALSE/*!_isSync*/);
display(false);
return TRUE;
case IDC_SAVECLOSE_BUTTON :
{
if (_isDirty)