void WWidget::htmlText(std::ostream& out) { DomElement *element = createSDomElement(WApplication::instance()); DomElement::TimeoutList timeouts; EscapeOStream sout(out); EscapeOStream js; element->asHTML(sout, js, timeouts); WApplication::instance()->doJavaScript(js.str()); delete element; }
std::string WWidget::createJavaScript(std::stringstream& js, std::string insertJS) { WApplication *app = WApplication::instance(); DomElement *de = createSDomElement(app); std::string var = de->createVar(); if (!insertJS.empty()) insertJS += var + ");"; de->createElement(js, app, insertJS); delete de; return var; }
void PaintedSlider::doUpdateDom(DomElement& element, bool all) { if (all) { WApplication *app = WApplication::instance(); element.addChild(createSDomElement(app)); element.addChild(((WWebWidget *)handle_)->createSDomElement(app)); DomElement *west = DomElement::createNew(DomElement_DIV); west->setProperty(PropertyClass, "Wt-w"); element.addChild(west); DomElement *east = DomElement::createNew(DomElement_DIV); east->setProperty(PropertyClass, "Wt-e"); element.addChild(east); } }