Wt examples 3.3.12
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}
Main widget of the Composer example.
WMessageResourceBundle & messageResourceBundle()
WContainerWidget * root() const
void setTitle(const WString &title)
void useStyleSheet(const WLink &link, const std::string &media="all")
virtual void addWidget(WWidget *widget)
void use(const std::string &path, bool loadInMemory=true)

◆ 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 Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8