Project

General

Profile

Bug #3549 » testing-progressive-bootstrap.cpp

Simple Modified Hello World Program - Josh Lampco, 08/27/2014 08:50 PM

 
#include <Wt/WApplication>
#include <Wt/WContainerWidget>
#include <Wt/WTemplate>


class CustomApplication : public Wt::WApplication
{
Wt::WTemplate *_template;

public:
CustomApplication(const Wt::WEnvironment& env);
};

CustomApplication::CustomApplication(const Wt::WEnvironment& env)
: Wt::WApplication(env)
{

_template = new Wt::WTemplate();

_template->setTemplateText("Hello world.");

root()->addWidget(_template);

setInternalPath("/", true);

}

Wt::WApplication *createApplication(const Wt::WEnvironment& env)
{
Wt::log("info") << "\n\n Application created. \n\n";
return new CustomApplication(env);
}

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


(2-2/2)