Afegeixo scripts que faig servir per a fer llibres. Aquests són de Duna.
#include <wx/wx.h>
#include <wx/log.h>
#include <wx/image.h>
#include <wx/string.h>
#include <wx/init.h>
#include <vector>
#include "MainWindow.hpp"
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if (argc < 2)
return false;
::wxInitAllImageHandlers();
std::vector<wxString> imgs;
for(int i=1; i < argc; ++i)
{
wxString filename(argv[i]);
imgs.push_back(filename);
}
MainWindow *mw = new MainWindow(imgs, wxDefaultSize);
mw->Show();
return true;
}