本文整理汇总了C++中MainFrame::StartupDone方法的典型用法代码示例。如果您正苦于以下问题:C++ MainFrame::StartupDone方法的具体用法?C++ MainFrame::StartupDone怎么用?C++ MainFrame::StartupDone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainFrame
的用法示例。
在下文中一共展示了MainFrame::StartupDone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInit
//.........这里部分代码省略.........
// plugins loaded -> check command line arguments again
delete wxMessageOutput::Set(new wxMessageOutputBest); // warn about unknown options
if ( ParseCmdLine(m_Frame) == 0 )
{
if (Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/blank_workspace"), true) == false)
Manager::Get()->GetProjectManager()->LoadWorkspace();
}
if (m_SafeMode) wxLog::EnableLogging(true); // re-enable logging in safe-mode
if (m_Batch)
{
Manager::SetAppStartedUp(true);
// the compiler plugin might be waiting for this
CodeBlocksEvent event(cbEVT_APP_STARTUP_DONE);
Manager::Get()->ProcessEvent(event);
Manager::Get()->RegisterEventSink(cbEVT_COMPILER_FINISHED, new cbEventFunctor<CodeBlocksApp, CodeBlocksEvent>(this, &CodeBlocksApp::OnBatchBuildDone));
s_Loading = false;
LoadDelayedFiles(frame);
BatchJob();
frame->Close();
return true;
}
if (!m_Script.IsEmpty())
{
s_Loading = false;
LoaderBase* loader = Manager::Get()->GetFileManager()->Load(m_Script);
if (loader->GetData())
Manager::Get()->GetScriptingManager()->LoadBuffer(cbC2U(loader->GetData()));
delete loader;
frame->Close();
return true;
}
CheckVersion();
// run startup script
try
{
wxString startup = ConfigManager::LocateDataFile(_T("startup.script"), sdScriptsUser | sdScriptsGlobal);
if (!startup.IsEmpty())
Manager::Get()->GetScriptingManager()->LoadScript(startup);
}
catch (SquirrelError& exception)
{
Manager::Get()->GetScriptingManager()->DisplayErrors(&exception);
}
Manager::ProcessPendingEvents();
// finally, show the app
splash.Hide();
SetTopWindow(frame);
frame->Show();
frame->StartupDone();
frame->ShowTips(); // this func checks if the user wants tips, so no need to check here
if (platform::windows)
InitAssociations();
s_Loading = false;
LoadDelayedFiles(frame);
AttachDebugger();
Manager::Get()->GetProjectManager()->WorkspaceChanged();
// all done
Manager::SetAppStartedUp(true);
CodeBlocksEvent event(cbEVT_APP_STARTUP_DONE);
Manager::Get()->ProcessEvent(event);
return true;
}
catch (cbException& exception)
{
exception.ShowErrorMessage();
}
catch (SquirrelError& exception)
{
Manager::Get()->GetScriptingManager()->DisplayErrors(&exception);
}
catch (const char* message)
{
wxSafeShowMessage(_T("Exception"), cbC2U(message));
}
catch (...)
{
wxSafeShowMessage(_T("Exception"), _T("Unknown exception was raised. The application will terminate immediately..."));
}
// if we reached here, return error
return false;
}