Wt examples  4.10.3
Loading...
Searching...
No Matches
Functions
FormExample.C File Reference
#include "FormExample.h"
#include "Form.h"
#include <Wt/WApplication.h>
#include <Wt/WText.h>
#include <Wt/WStringUtil.h>

Go to the source code of this file.

Functions

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

Function Documentation

◆ createApplication()

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

Definition at line 67 of file FormExample.C.

68{
69 std::unique_ptr<WApplication> app
70 = std::make_unique<WApplication>(env);
71 app->messageResourceBundle().use(WApplication::appRoot() + "form-example");
72 app->setTitle("Form example");
73
74 app->root()->addWidget(std::make_unique<FormExample>());
75
77 langStyle.font().setSize(FontSize::Smaller);
78 langStyle.setCursor(Cursor::PointingHand);
79 langStyle.setForegroundColor(WColor("blue"));
80 langStyle.setTextDecoration(TextDecoration::Underline);
81 app->styleSheet().addRule(".lang", langStyle);
82
83 langStyle.setCursor(Cursor::Arrow);
84 langStyle.font().setWeight(FontWeight::Bold);
85 app->styleSheet().addRule(".langcurrent", langStyle);
86
87 return app;
88}
Wt::Auth::Dbo::UserDatabase< AuthInfo > UserDatabase
Definition Session.h:22

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 90 of file FormExample.C.

91{
93}
std::unique_ptr< WApplication > createApplication(const WEnvironment &env)
Definition FormExample.C:67