#include #include #include #include #include #include #include #include using namespace Wt; // ----------------------------------------------------------------------------------- std::unique_ptr createHelloApplication(const WEnvironment &env) { std::locale::global(std::locale("en_EN.UTF-8")); // This global locale setting causes the long delays auto app = std::make_unique(env); app->setLoadingIndicator(std::make_unique()); auto theme = std::make_shared(); app->setTheme(theme); auto showDlgBt = app->root()->addNew("Show Input-Dialog"); showDlgBt->clicked().connect([=] { Wt::log("Debug") << "Time-In"; auto dialog = WApplication::instance()->addChild(std::make_unique("Input Dialog with Umlauts")); auto lineInput = dialog->contents()->addNew("Text with Umlauts öäüÖÄÜß"); auto validator = std::make_shared("[a-zA-ZäÄöÖüÜß0-9]{1}[a-zA-ZäÄöÖüÜß@\' 0-9.,_-]{0,30}"); lineInput->setValidator(validator); auto okBt = dialog->footer()->addNew("OK"); okBt->clicked().connect([=] { dialog->accept(); }); dialog->show(); Wt::log("Debug") << "Time-Out"; }); return app; } // ----------------------------------------------------------------------------------- int main(int argc, char *argv[]) { return Wt::WRun(argc, argv, &createHelloApplication); }