#include <wx/wx.h>
#include <wx/log.h>
#include <wx/image.h>
#include <wx/string.h>
#include <wx/init.h>
#include <fstream>
#include <iostream>
#include "main.hpp"
#include "MainWindow.hpp"
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
IMPLEMENT_APP(MyApp)
std::vector<std::string> words;
void
loadwords()
{
std::ifstream f("words.txt");
do
{
std::string s;
std::getline(f,s);
if (!f.fail())
{
words.push_back(s);
std::cerr << "Loaded: " << s << std::endl;
}
}while(!f.fail());
}
bool MyApp::OnInit()
{
if(!wxApp::OnInit())
return false;
loadwords();
MainWindow *mw = new MainWindow();
mw->Show();
SetTopWindow(mw);
return true;
}