本文整理汇总了C++中DomElement::addEventSignal方法的典型用法代码示例。如果您正苦于以下问题:C++ DomElement::addEventSignal方法的具体用法?C++ DomElement::addEventSignal怎么用?C++ DomElement::addEventSignal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DomElement
的用法示例。
在下文中一共展示了DomElement::addEventSignal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateDom
void WAbstractToggleButton::updateDom(DomElement& element, bool all)
{
if (checkedChanged_ || all) {
element.setProperty(Wt::PropertyChecked, checked_ ? "true" : "false");
checkedChanged_ = false;
}
const WSignalInstance_ *changeS = getSignal(SIGNAL(changed()));
const WSignalInstance_ *checkedS = getSignal(SIGNAL(checked()));
const WSignalInstance_ *unCheckedS = getSignal(SIGNAL(unChecked()));
bool needUpdateChangeSignal =
(changeS->connectivityChanged()
|| checkedS->connectivityChanged()
|| unCheckedS->connectivityChanged()
|| changeS->staticCodeChanged()
|| checkedS->staticCodeChanged()
|| unCheckedS->staticCodeChanged());
WFormWidget::updateDom(element, all);
if (needUpdateChangeSignal || all) {
element.removeEventSignal("change");
DomElement *e = DomElement::getForUpdate(this, DomElement::INPUT);
if (isConnected(changeS))
element.addEventSignal("change", *changeS, 0, 0);
if (isConnected(checkedS))
element.addEventSignal("change", *checkedS, 0,
(e->createReference()
+ ".checked == true").c_str());
if (isConnected(unCheckedS))
element.addEventSignal("change", *unCheckedS, 0,
(e->createReference()
+ ".checked == false").c_str());
delete e;
}
}