1 #include <BlockScopeWxApp.h>
5 class DummyWxApp : public wxApp
9 int OnExit() { return true; }
12 IMPLEMENT_APP_NO_MAIN(DummyWxApp);
15 bool DummyWxApp::OnInit( )
17 // std::cout << "OnInit()"<<std::endl;
20 //See http://www.wxwindows.org/faqgtk.htm#locale
21 setlocale(LC_NUMERIC, "C");
27 BlockScopeWxApp::BlockScopeWxApp()
29 mNeedToUninitialize = false;
30 if (wxApp::GetInstance()==0)
32 wxApp::SetInstance(new DummyWxApp);
34 mNeedToUninitialize = true;
38 BlockScopeWxApp::~BlockScopeWxApp()
40 if (mNeedToUninitialize) wxUninitialize();