17 WContainerWidget *langLayout = this->addWidget(std::make_unique<WContainerWidget>());
18 langLayout->setContentAlignment(AlignmentFlag::Right);
19 langLayout->addWidget(std::make_unique<WText>(tr(
"language")));
21 const char *lang[] = {
"en",
"nl" };
23 for (
int i = 0; i < 2; ++i) {
24 WText *t = langLayout->addWidget(std::make_unique<WText>(lang[i]));
36 Form *form = this->addWidget(std::make_unique<Form>());
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");
74 app->root()->addWidget(std::make_unique<FormExample>());
76 WCssDecorationStyle langStyle;
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);
83 langStyle.setCursor(Cursor::Arrow);
84 langStyle.font().setWeight(FontWeight::Bold);
85 app->styleSheet().addRule(
".langcurrent", langStyle);