SPH
LauncherGui.cpp
Go to the documentation of this file.
3 #include <wx/msgdlg.h>
4 
5 IMPLEMENT_APP(Sph::App);
6 
8 
9 bool App::OnInit() {
10 #ifndef SPH_DEBUG
11  wxDisableAsserts();
12 #endif
13 
14  this->Connect(MAIN_LOOP_TYPE, MainLoopEventHandler(App::processEvents));
15 
16  if (wxTheApp->argc > 1) {
17  Path path(std::string(wxTheApp->argv[1]));
18  window = alignedNew<MainWindow>(path);
19  } else {
20  window = alignedNew<MainWindow>();
21  }
22  window->SetAutoLayout(true);
23  window->Show();
24  return true;
25 }
26 
27 int App::OnExit() {
28  return 0;
29 }
30 
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
IMPLEMENT_APP(Sph::App)
#define MainLoopEventHandler(func)
Definition: MainLoop.h:18
#define NAMESPACE_SPH_END
Definition: Object.h:12
Object representing a path on a filesystem.
Definition: Path.h:17