Wt examples  3.3.8
Functions
FormExample.C File Reference
#include "FormExample.h"
#include "Form.h"
#include <Wt/WApplication>
#include <Wt/WText>
#include <Wt/WStringUtil>

Go to the source code of this file.

Functions

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

Function Documentation

WApplication* createApplication ( const WEnvironment env)

Definition at line 68 of file FormExample.C.

69 {
70  WApplication *app = new WApplication(env);
71  app->messageResourceBundle().use(WApplication::appRoot() + "form-example");
72  app->setTitle("Form example");
73 
74  app->root()->addWidget(new FormExample());
75 
76  WCssDecorationStyle langStyle;
77  langStyle.font().setSize(WFont::Smaller);
78  langStyle.setCursor(PointingHandCursor);
79  langStyle.setForegroundColor(blue);
80  langStyle.setTextDecoration(WCssDecorationStyle::Underline);
81  app->styleSheet().addRule(".lang", langStyle);
82 
83  langStyle.setCursor(ArrowCursor);
84  langStyle.font().setWeight(WFont::Bold);
85  app->styleSheet().addRule(".langcurrent", langStyle);
86 
87  return app;
88 }
WMessageResourceBundle & messageResourceBundle()
void setTitle(const WString &title)
void setCursor(Cursor c)
void setWeight(Weight weight, int value=400)
void setSize(Size size, const WLength &length)
void use(const std::string &path, bool loadInMemory=true)
WCssTextRule * addRule(const std::string &selector, const WString &declarations, const std::string &ruleName=std::string())
Main widget for the Form example.
Definition: FormExample.h:29
void setForegroundColor(WColor color)
blue
virtual void addWidget(WWidget *widget)
WContainerWidget * root() const
WCssStyleSheet & styleSheet()
void setTextDecoration(WFlags< TextDecoration > decoration)
int main ( int  argc,
char **  argv 
)

Definition at line 90 of file FormExample.C.

91 {
92  return WRun(argc, argv, &createApplication);
93 }
WApplication * createApplication(const WEnvironment &env)
Definition: FormExample.C:68

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11