本文整理汇总了C++中NppParameters::setShortcutDirty方法的典型用法代码示例。如果您正苦于以下问题:C++ NppParameters::setShortcutDirty方法的具体用法?C++ NppParameters::setShortcutDirty怎么用?C++ NppParameters::setShortcutDirty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NppParameters
的用法示例。
在下文中一共展示了NppParameters::setShortcutDirty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run_dlgProc
//.........这里部分代码省略.........
case IDM_BABYGRID_MODIFY :
{
if (_babygrid.getNumberRows() < 1)
return TRUE;
NppParameters *nppParam = NppParameters::getInstance();
int row = _babygrid.getSelectedRow();
bool isModified = false;
switch(_currentState)
{
case STATE_MENU:
{
//Get CommandShortcut corresponding to row
vector<CommandShortcut> & shortcuts = nppParam->getUserShortcuts();
CommandShortcut csc = shortcuts[row - 1], prevcsc = shortcuts[row - 1];
csc.init(_hInst, _hSelf);
if (csc.doDialog() != -1 && prevcsc != csc)
{
//shortcut was altered
nppParam->addUserModifiedIndex(row-1);
shortcuts[row - 1] = csc;
//save the current view
_lastHomeRow[_currentState] = _babygrid.getHomeRow();
_lastCursorRow[_currentState] = _babygrid.getSelectedRow();
fillOutBabyGrid();
isModified = true;
//Notify current Accelerator class to update everything
nppParam->getAccelerator()->updateShortcuts();
nppParam->setShortcutDirty();
}
break;
}
case STATE_MACRO:
{
//Get MacroShortcut corresponding to row
vector<MacroShortcut> & shortcuts = nppParam->getMacroList();
MacroShortcut msc = shortcuts[row - 1], prevmsc = shortcuts[row - 1];
msc.init(_hInst, _hSelf);
if (msc.doDialog() != -1 && prevmsc != msc)
{
//shortcut was altered
shortcuts[row - 1] = msc;
//save the current view
_lastHomeRow[_currentState] = _babygrid.getHomeRow();
_lastCursorRow[_currentState] = _babygrid.getSelectedRow();
fillOutBabyGrid();
isModified = true;
//Notify current Accelerator class to update everything
nppParam->getAccelerator()->updateShortcuts();
nppParam->setShortcutDirty();
}
break;
}
case STATE_USER:
{
//Get UserCommand corresponding to row