0
|
1 |
#include <wx/wx.h>
|
|
2 |
#include <wx/log.h>
|
|
3 |
#include <wx/image.h>
|
|
4 |
#include <wx/string.h>
|
|
5 |
#include <wx/init.h>
|
|
6 |
|
2
|
7 |
#include <vector>
|
|
8 |
|
0
|
9 |
#include "MainWindow.hpp"
|
|
10 |
|
|
11 |
class MyApp : public wxApp
|
|
12 |
{
|
|
13 |
public:
|
|
14 |
virtual bool OnInit();
|
|
15 |
};
|
|
16 |
|
|
17 |
IMPLEMENT_APP(MyApp)
|
|
18 |
|
|
19 |
bool MyApp::OnInit()
|
|
20 |
{
|
|
21 |
if (argc < 2)
|
|
22 |
return false;
|
|
23 |
|
|
24 |
::wxInitAllImageHandlers();
|
|
25 |
|
2
|
26 |
std::vector<wxString> imgs;
|
|
27 |
for(int i=1; i < argc; ++i)
|
0
|
28 |
{
|
2
|
29 |
wxString filename(argv[i]);
|
|
30 |
imgs.push_back(filename);
|
0
|
31 |
}
|
|
32 |
|
2
|
33 |
MainWindow *mw = new MainWindow(imgs, wxDefaultSize);
|
0
|
34 |
mw->Show();
|
|
35 |
|
|
36 |
return true;
|
|
37 |
}
|