本文整理汇总了C++中nuiEvent::IsCanceled方法的典型用法代码示例。如果您正苦于以下问题:C++ nuiEvent::IsCanceled方法的具体用法?C++ nuiEvent::IsCanceled怎么用?C++ nuiEvent::IsCanceled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nuiEvent
的用法示例。
在下文中一共展示了nuiEvent::IsCanceled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CallEvent
bool nuiEventTargetBase::CallEvent(void* pTarget, nuiDelegateMemento pFunc, const nuiEvent& rEvent)
{
Delegate del;
del.SetMemento(pFunc);
del(rEvent);
return rEvent.IsCanceled();
}
示例2: SendEvent
bool nuiEventSource::SendEvent(const nuiEvent& rEvent)
{
if (IsEnabled() && !mpTargets.empty())
{
rEvent.SetSource(this);
std::vector<nuiEventTargetBase*> targets(mpTargets);
std::vector<nuiEventTargetBase*>::const_iterator it = targets.begin();
std::vector<nuiEventTargetBase*>::const_iterator end = targets.end();
mEnumerating++;
bool handled = false;
while (it != end && !handled)
{
nuiEventTargetBase* pETB = *it;
if (mGraveYard.find(pETB) == mGraveYard.end())
{
pETB->OnEvent(rEvent);
handled = rEvent.IsCanceled();
}
++it;
}
mEnumerating--;
mGraveYard.clear();
return handled;
}
return false;
}
示例3: OnTargetSelected
void ProjectGenerator::OnTargetSelected(const nuiEvent& rEvent)
{
nuiDialogSelectDirectory* pDialog = (nuiDialogSelectDirectory*)rEvent.mpUser;
mProjectTargetPath = pDialog->GetSelectedDirectory();
mpProjectTarget->SetText(mProjectTargetPath);
nglPath path(mProjectTargetPath);
OnTargetTextChanged(rEvent);
if (!rEvent.IsCanceled())
{
rEvent.Cancel();
return;
}
GetPreferences().SetString(PREFERENCES_PROJECTGENERATOR, _T("nuiTargetPath"), path.GetParent().GetPathName());
}
示例4: SendEvent
bool nuiEventSource::SendEvent(const nuiEvent& rEvent)
{
if (IsEnabled() && !mpTargets.empty())
{
rEvent.SetSource(this);
std::vector<nuiEventTargetBase*> targets(mpTargets);
std::vector<nuiEventTargetBase*>::const_iterator it = targets.begin();
std::vector<nuiEventTargetBase*>::const_iterator end = targets.end();
bool handled = false;
while (it != end && !handled)
{
((*it)->OnEvent(rEvent));
handled = rEvent.IsCanceled();
++it;
}
return handled;
}
return false;
}