git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22488
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// we need a special kind of auto pointer to wxApp which not only deletes the
// pointer it holds in its dtor but also resets the global application pointer
// we need a special kind of auto pointer to wxApp which not only deletes the
// pointer it holds in its dtor but also resets the global application pointer
-wxDECLARE_SCOPED_PTR(wxApp, wxAppPtrBase);
-wxDEFINE_SCOPED_PTR(wxApp, wxAppPtrBase);
+wxDECLARE_SCOPED_PTR(wxAppConsole, wxAppPtrBase);
+wxDEFINE_SCOPED_PTR(wxAppConsole, wxAppPtrBase);
class wxAppPtr : public wxAppPtrBase
{
public:
class wxAppPtr : public wxAppPtrBase
{
public:
- wxEXPLICIT wxAppPtr(wxApp *ptr = NULL) : wxAppPtrBase(ptr) { }
+ wxEXPLICIT wxAppPtr(wxAppConsole *ptr = NULL) : wxAppPtrBase(ptr) { }
~wxAppPtr()
{
if ( get() )
~wxAppPtr()
{
if ( get() )
+ void Set(wxAppConsole *ptr)
class wxCallAppCleanup
{
public:
class wxCallAppCleanup
{
public:
- wxCallAppCleanup(wxApp *app) : m_app(app) { }
+ wxCallAppCleanup(wxAppConsole *app) : m_app(app) { }
~wxCallAppCleanup() { if ( m_app ) m_app->CleanUp(); }
void Dismiss() { m_app = NULL; }
private:
~wxCallAppCleanup() { if ( m_app ) m_app->CleanUp(); }
void Dismiss() { m_app = NULL; }
private:
};
// another tiny class which simply exists to ensure that wxEntryCleanup is
};
// another tiny class which simply exists to ensure that wxEntryCleanup is