本文整理汇总了C++中NppParameters::doPrintAndExit方法的典型用法代码示例。如果您正苦于以下问题:C++ NppParameters::doPrintAndExit方法的具体用法?C++ NppParameters::doPrintAndExit怎么用?C++ NppParameters::doPrintAndExit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NppParameters
的用法示例。
在下文中一共展示了NppParameters::doPrintAndExit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
//.........这里部分代码省略.........
for (size_t i = 0, len = fileNames.size(); i < len ; ++i)
{
generic_string themeName( themeSwitcher.getThemeFromXmlFileName(fileNames[i].c_str()) );
if (! themeSwitcher.themeNameExists(themeName.c_str()) )
{
themeSwitcher.addThemeFromXml(fileNames[i].c_str());
}
}
for (size_t i = 0, len = _notepad_plus_plus_core._internalFuncIDs.size() ; i < len ; ++i)
::SendMessage(_hSelf, WM_COMMAND, _notepad_plus_plus_core._internalFuncIDs[i], 0);
// Notify plugins that Notepad++ is ready
SCNotification scnN;
scnN.nmhdr.code = NPPN_READY;
scnN.nmhdr.hwndFrom = _hSelf;
scnN.nmhdr.idFrom = 0;
_notepad_plus_plus_core._pluginsManager.notify(&scnN);
if (!cmdLineParams->_easterEggName.empty())
{
if (cmdLineParams->_quoteType == 0) // Easter Egg Name
{
int iQuote = _notepad_plus_plus_core.getQuoteIndexFrom(cmdLineParams->_easterEggName.c_str());
if (iQuote != -1)
{
_notepad_plus_plus_core.showQuoteFromIndex(iQuote);
}
}
else if (cmdLineParams->_quoteType == 1) // command line quote
{
_userQuote = cmdLineParams->_easterEggName;
_quoteParams.reset();
_quoteParams._quote = _userQuote.c_str();
_quoteParams._quoter = TEXT("Anonymous #999");
_quoteParams._shouldBeTrolling = false;
_quoteParams._lang = cmdLineParams->_langType;
if (cmdLineParams->_ghostTypingSpeed == 1)
_quoteParams._speed = QuoteParams::slow;
else if (cmdLineParams->_ghostTypingSpeed == 2)
_quoteParams._speed = QuoteParams::rapid;
else if (cmdLineParams->_ghostTypingSpeed == 3)
_quoteParams._speed = QuoteParams::speedOfLight;
_notepad_plus_plus_core.showQuote(&_quoteParams);
}
else if (cmdLineParams->_quoteType == 2) // content drom file
{
if (::PathFileExists(cmdLineParams->_easterEggName.c_str()))
{
std::string content = getFileContent(cmdLineParams->_easterEggName.c_str());
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
_userQuote = wmc->char2wchar(content.c_str(), SC_CP_UTF8);
if (!_userQuote.empty())
{
_quoteParams.reset();
_quoteParams._quote = _userQuote.c_str();
_quoteParams._quoter = TEXT("Anonymous #999");
_quoteParams._shouldBeTrolling = false;
_quoteParams._lang = cmdLineParams->_langType;
if (cmdLineParams->_ghostTypingSpeed == 1)
_quoteParams._speed = QuoteParams::slow;
else if (cmdLineParams->_ghostTypingSpeed == 2)
_quoteParams._speed = QuoteParams::rapid;
else if (cmdLineParams->_ghostTypingSpeed == 3)
_quoteParams._speed = QuoteParams::speedOfLight;
_notepad_plus_plus_core.showQuote(&_quoteParams);
}
}
}
}
if (cmdLineParams->_showLoadingTime)
{
time_t timestampEnd = time(NULL);
double loadTime = difftime(timestampEnd, timestampBegin);
char dest[256];
sprintf(dest, "Loading time : %.0lf seconds", loadTime);
::MessageBoxA(NULL, dest, "", MB_OK);
}
bool isSnapshotMode = nppGUI.isSnapshotMode();
if (isSnapshotMode)
{
_notepad_plus_plus_core.checkModifiedDocument(false);
// Lauch backup task
_notepad_plus_plus_core.launchDocumentBackupTask();
}
// Make this call later to take effect
::SendMessage(_hSelf, NPPM_INTERNAL_SETWORDCHARS, 0, 0);
if (pNppParams->doFunctionListExport())
::SendMessage(_hSelf, NPPM_INTERNAL_EXPORTFUNCLISTANDQUIT, 0, 0);
if (pNppParams->doPrintAndExit())
::SendMessage(_hSelf, NPPM_INTERNAL_PRNTANDQUIT, 0, 0);
}