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

Go to the source code of this file.

Functions

WApplicationcreateApplication (const WEnvironment &env)
 
int main (int argc, char **argv)
 

Function Documentation

◆ createApplication()

WApplication* createApplication ( const WEnvironment env)

Definition at line 140 of file ComposeExample.C.

141 {
142  WApplication *app = new WApplication(env);
143 
144  // The following assumes composer.xml is in the webserver working directory
145  // (but does not need to be deployed within docroot):
146  app->messageResourceBundle().use(WApplication::appRoot() + "composer");
147 
148  // The following assumes composer.css is deployed in the seb server at the
149  // same location as the application:
150  app->useStyleSheet("composer.css");
151 
152  app->setTitle("Composer example");
153 
154  app->root()->addWidget(new ComposeExample());
155 
156  return app;
157 }
WMessageResourceBundle & messageResourceBundle()
void setTitle(const WString &title)
void use(const std::string &path, bool loadInMemory=true)
WContainerWidget * root() const
Main widget of the Composer example.
void useStyleSheet(const WLink &link, const std::string &media="all")
virtual void addWidget(std::unique_ptr< WWidget > widget)

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 159 of file ComposeExample.C.

160 {
161  return WRun(argc, argv, &createApplication);
162 }
WApplication * createApplication(const WEnvironment &env)

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13