Project

General

Profile

Bug #1425 » event.cpp

source - Boris Nagaev, 09/06/2012 12:28 PM

 

#include <iostream>

#include <Wt/WApplication>

using namespace Wt;

class App : public WApplication {
public:
App(const WEnvironment& env):
WApplication(env)
{ }

protected:
void notify(const WEvent& e) {
std::cout << e.eventType() <<std::endl;
WApplication::notify(e);
std::cout << e.eventType() <<std::endl;
}
};

WApplication* createApp(const WEnvironment& env) {
return new App(env);
}

int main(int argc, char** argv) {
return WRun(argc, argv, &createApp);
}

(1-1/2)