adding OnLaunched
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,6 +103,9 @@ public:
|
|||||||
// be done here. When OnRun() returns, the programs starts shutting down.
|
// be done here. When OnRun() returns, the programs starts shutting down.
|
||||||
virtual int OnRun();
|
virtual int OnRun();
|
||||||
|
|
||||||
|
// Called before the first events are handled, called from within MainLoop()
|
||||||
|
virtual void OnLaunched();
|
||||||
|
|
||||||
// This is called by wxEventLoopBase::SetActive(): you should put the code
|
// This is called by wxEventLoopBase::SetActive(): you should put the code
|
||||||
// which needs an active event loop here.
|
// which needs an active event loop here.
|
||||||
// Note that this function is called whenever an event loop is activated;
|
// Note that this function is called whenever an event loop is activated;
|
||||||
|
@@ -256,6 +256,10 @@ int wxAppConsoleBase::OnRun()
|
|||||||
return MainLoop();
|
return MainLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxAppConsoleBase::OnLaunched()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int wxAppConsoleBase::OnExit()
|
int wxAppConsoleBase::OnExit()
|
||||||
{
|
{
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG
|
||||||
@@ -321,6 +325,13 @@ int wxAppConsoleBase::MainLoop()
|
|||||||
{
|
{
|
||||||
wxEventLoopBaseTiedPtr mainLoop(&m_mainLoop, CreateMainLoop());
|
wxEventLoopBaseTiedPtr mainLoop(&m_mainLoop, CreateMainLoop());
|
||||||
|
|
||||||
|
#if defined(__WXOSX__) && wxOSX_USE_COCOA_OR_IPHONE
|
||||||
|
// OnLaunched called from native app controller
|
||||||
|
#else
|
||||||
|
if (wxTheApp)
|
||||||
|
wxTheApp->OnLaunched();
|
||||||
|
#endif
|
||||||
|
|
||||||
return m_mainLoop ? m_mainLoop->Run() : -1;
|
return m_mainLoop ? m_mainLoop->Run() : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user