本文整理汇总了C++中DomElement::replaceWith方法的典型用法代码示例。如果您正苦于以下问题:C++ DomElement::replaceWith方法的具体用法?C++ DomElement::replaceWith怎么用?C++ DomElement::replaceWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DomElement
的用法示例。
在下文中一共展示了DomElement::replaceWith方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDomChanges
void WFileUpload::getDomChanges(std::vector<DomElement *>& result,
WApplication *app)
{
if (flags_.test(BIT_ENABLE_AJAX)) {
DomElement *plainE = DomElement::getForUpdate(this, DomElement_INPUT);
DomElement *ajaxE = createDomElement(app);
plainE->replaceWith(ajaxE);
result.push_back(plainE);
} else
WWebWidget::getDomChanges(result, app);
}
示例2: getDomChanges
void WLineEdit::getDomChanges(std::vector<DomElement *>& result,
WApplication *app)
{
if (app->environment().agentIsIE() && flags_.test(BIT_ECHO_MODE_CHANGED)) {
DomElement *e = DomElement::getForUpdate(this, domElementType());
DomElement *d = createDomElement(app);
e->replaceWith(d);
result.push_back(e);
} else
WFormWidget::getDomChanges(result, app);
}
示例3: getDomChanges
void WTable::getDomChanges(std::vector<DomElement *>& result,
WApplication *app)
{
DomElement *e = DomElement::getForUpdate(this, domElementType());
if (!isStubbed() && flags_.test(BIT_GRID_CHANGED)) {
DomElement *newE = createDomElement(app);
e->replaceWith(newE);
} else {
if (rowsChanged_) {
for (std::set<WTableRow *>::iterator i = rowsChanged_->begin();
i != rowsChanged_->end(); ++i) {
DomElement *e2 = DomElement::getForUpdate(*i, DomElement_TR);
(*i)->updateDom(*e2, false);
result.push_back(e2);
}
delete rowsChanged_;
rowsChanged_ = 0;
}
if (rowsAdded_) {
DomElement *etb = DomElement::getForUpdate(id() + "tb",
DomElement_TBODY);
for (unsigned i = 0; i < static_cast<unsigned>(rowsAdded_); ++i) {
DomElement *tr = createRowDomElement(rowCount() - rowsAdded_ + i, true, app);
etb->addChild(tr);
}
result.push_back(etb);
rowsAdded_ = 0;
}
if (flags_.test(BIT_COLUMNS_CHANGED)) {
for (unsigned i = 0; i < columns_.size(); ++i) {
DomElement *e2
= DomElement::getForUpdate(columns_[i], DomElement_COL);
columns_[i]->updateDom(*e2, false);
result.push_back(e2);
}
flags_.reset(BIT_COLUMNS_CHANGED);
}
updateDom(*e, false);
}
result.push_back(e);
}
示例4: getSDomChanges
void WWebWidget::getSDomChanges(std::vector<DomElement *>& result)
{
if (stubbed_) {
if (wApp && wApp->loading()) {
/* this is during collection of static slots */
getDomChanges(result);
} else {
DomElement *stub = DomElement::getForUpdate(this, DomElement::SPAN);
DomElement *realElement = createDomElement();
stub->replaceWith(realElement);
result.push_back(stub);
stubbed_ = false;
}
} else {
for (unsigned i = 0; i < childRemoveChanges_.size(); ++i)
result.push_back(childRemoveChanges_[i]);
childRemoveChanges_.clear();
getDomChanges(result);
}
}