bool nuiEventTargetBase::OnEvent(const nuiEvent& rEvent) { bool handled = false; nuiEventSource* pSource = (nuiEventSource*)rEvent.GetSource(); LinksMap::const_iterator it_source = mpLinks.find(pSource); if (it_source != mpLinks.end()) { LinkList links(it_source->second); LinkList::const_iterator it = links.begin(); LinkList::const_iterator end = links.end(); for (; (it != end) && !handled; ++it) { Link* pLink = (*it); nuiDelegateMemento pFunc = pLink->mTargetFunc; rEvent.mpUser = pLink->mpUser; handled = CallEvent((void*)mpTarget, pFunc, rEvent); } } return handled; }
void nuiTreeBase::OnDelChildRequest(const nuiEvent& rEvent) { nuiTreePtr pChild = (nuiTreePtr)rEvent.mpUser; mTreeNodeEventSink.DisconnectSource(*const_cast<nuiEventSource*>(rEvent.GetSource())); DelChild(pChild); }