当前位置: 首页>>代码示例>>C++>>正文


C++ DomElement::replaceWith方法代码示例

本文整理汇总了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);
}
开发者ID:913862627,项目名称:wt,代码行数:11,代码来源:WFileUpload.C

示例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);
}
开发者ID:bytemaster,项目名称:wt-1,代码行数:11,代码来源:WLineEdit.C

示例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);
}
开发者ID:DTidd,项目名称:wt,代码行数:50,代码来源:WTable.C

示例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);
  }
}
开发者ID:SiteView,项目名称:ecc82Server,代码行数:22,代码来源:WWebWidget.Cpp


注:本文中的DomElement::replaceWith方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。