Example #1
0
void IndexView::init() {
	WApplication *app = wApp;

	app->setTitle("Leaked Password Query Kit");

	render();
}
Example #2
0
WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new WApplication(env);
  app->setTitle(L"Drag & drop");
  new WText("<h1>Wt Drag &amp; drop example.</h1>", app->root());

  new WText("<p>Help these people with their decision by dragging one of "
	    "the pills.</p>", app->root());

  if (!env.javaScript()) {
    new WText("<i>This examples requires that javascript support is "
	      "enabled.</i>", app->root());
  }

  WContainerWidget *pills = new WContainerWidget(app->root());
  pills->setContentAlignment(WWidget::AlignCenter);

  createDragImage("blue-pill.jpg",
		  "blue-pill-small.png",
		  "blue-pill", pills);
  createDragImage("red-pill.jpg",
		  "red-pill-small.png",
		  "red-pill", pills);

  WContainerWidget *dropSites = new WContainerWidget(app->root());

  new Character(L"Neo", dropSites);
  new Character(L"Morpheus", dropSites);
  new Character(L"Trinity", dropSites);

  app->useStyleSheet("dragdrop.css");

  return app;
}
Example #3
0
WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new WApplication(env);
  app->setTitle(L"Hangman");
  new HangmanGame(app->root());  

  /*
   * The application style sheet (only for the highscore widget)
   */
  WCssDecorationStyle cellStyle;
  WBorder cellBorder;
  cellBorder.setStyle(WBorder::Solid);
  cellBorder.setWidth(WBorder::Explicit, WLength(1));
  cellBorder.setColor(WColor(Wt::lightGray));
  cellStyle.setBorder(cellBorder);

  app->styleSheet().addRule(".highscores * TD", cellStyle);

  cellStyle.font().setVariant(WFont::SmallCaps);

  app->styleSheet().addRule(".highscoresheader", cellStyle);

  cellStyle.font().setVariant(WFont::NormalVariant);
  cellStyle.font().setStyle(WFont::Italic);
  cellStyle.font().setWeight(WFont::Bold);

  app->styleSheet().addRule(".highscoresself", cellStyle);

  return app;
}
Example #4
0
WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new WApplication(env);
  app->setTitle(L"Style example");

  app->root()->addWidget(new StyleExample());
  return app;
}
Example #5
0
WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new TreeViewApplication(env);
  app->setTitle("WTreeView example");
  app->messageResourceBundle().use(WApplication::appRoot() + "drinks");
  app->styleSheet().addRule("button", "margin: 2px");
  //app->useStyleSheet("treeview.css");
  
  return app;
}
Example #6
0
WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new TreeViewDragDrop(env);
  app->setTwoPhaseRenderingThreshold(0);
  app->setTitle("WTreeView Drag & Drop");
  app->useStyleSheet("styles.css");
  app->messageResourceBundle().use(WApplication::appRoot() + "about");
  app->refresh();
  
  return app;
}
Cms::Cms()
    : Page(),
    m_pimpl(make_unique<Cms::Impl>())
{
    WApplication *app = WApplication::instance();
    app->setTitle(tr("cms-page-title"));

    this->clear();
    this->setId("CmsPage");
    this->setStyleClass("cms-page container-fluid");
    this->addWidget(this->Layout());

    app->root()->clear();
    app->root()->addWidget(this);

    WTimer *timer = new WTimer(this);
    timer->setInterval(60000);       // every one minute
    timer->timeout().connect(m_pimpl.get(), &Cms::Impl::ValidateSession);
    timer->start();
}