Wt examples 3.3.12
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

◆ createApplication()

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);
79 langStyle.setForegroundColor(blue);
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}
Main widget for the Form example.
Definition FormExample.h:30
WCssStyleSheet & styleSheet()
WMessageResourceBundle & messageResourceBundle()
WContainerWidget * root() const
void setTitle(const WString &title)
virtual void addWidget(WWidget *widget)
void setForegroundColor(WColor color)
void setTextDecoration(WFlags< TextDecoration > decoration)
void setCursor(Cursor c)
WCssTextRule * addRule(const std::string &selector, const WString &declarations, const std::string &ruleName=std::string())
void setSize(Size size, const WLength &length)
void setWeight(Weight weight, int value=400)
void use(const std::string &path, bool loadInMemory=true)
ArrowCursor
PointingHandCursor

◆ main()

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