Wt examples  4.10.4
Functions
ComposeExample.C File Reference
#include <Wt/WApplication.h>
#include <Wt/WBreak.h>
#include <Wt/WText.h>
#include <Wt/WPushButton.h>
#include <Wt/WContainerWidget.h>
#include <Wt/WStringUtil.h>
#include <unistd.h>
#include "Composer.h"
#include "ComposeExample.h"
#include "Contact.h"

Go to the source code of this file.

Functions

std::unique_ptr< WApplicationcreateApplication (const WEnvironment &env)
 
int main (int argc, char **argv)
 

Function Documentation

◆ createApplication()

std::unique_ptr<WApplication> createApplication ( const WEnvironment env)

Definition at line 142 of file ComposeExample.C.

143 {
144  std::unique_ptr<WApplication> app
145  = std::make_unique<WApplication>(env);
146 
147  // The following assumes composer.xml is in the webserver working directory
148  // (but does not need to be deployed within docroot):
149  app->messageResourceBundle().use(WApplication::appRoot() + "composer");
150 
151  // The following assumes composer.css is deployed in the seb server at the
152  // same location as the application:
153  app->useStyleSheet("composer.css");
154 
155  app->setTitle("Composer example");
156 
157  app->root()->addWidget(std::make_unique<ComposeExample>());
158 
159  return app;
160 }

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 162 of file ComposeExample.C.

163 {
164  return WRun(argc, argv, &createApplication);
165 }
std::unique_ptr< WApplication > createApplication(const WEnvironment &env)