本文整理汇总了C++中MgCommand::touchEnded方法的典型用法代码示例。如果您正苦于以下问题:C++ MgCommand::touchEnded方法的具体用法?C++ MgCommand::touchEnded怎么用?C++ MgCommand::touchEnded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MgCommand
的用法示例。
在下文中一共展示了MgCommand::touchEnded方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: touchEnded
bool TransformCmd::touchEnded(const MgMotion* sender)
{
bool ret = _ptIndex >= 0 || (_lastCmd && _lastCmd->touchEnded(sender));
_ptIndex = -1;
return ret;
}
示例2: gestureToCommand
bool GiCoreViewImpl::gestureToCommand(const MgMotion& motion)
{
MgDynShapeLock locker(true, motion.view);
MgCommand* cmd = _cmds->getCommand();
bool ret = false;
if (motion.gestureState == kMgGestureCancel || !cmd) {
return cmd && cmd->cancel(&motion);
}
if (motion.gestureState == kMgGesturePossible
&& motion.gestureType != kGiTwoFingersMove) {
return true;
}
switch (motion.gestureType)
{
case kGiTwoFingersMove:
ret = cmd->twoFingersMove(&motion);
break;
case kGiGesturePan:
switch (motion.gestureState)
{
case kMgGestureBegan:
ret = cmd->touchBegan(&motion);
break;
case kMgGestureMoved:
ret = cmd->touchMoved(&motion);
break;
case kMgGestureEnded:
default:
ret = cmd->touchEnded(&motion);
break;
}
break;
case kGiGestureTap:
ret = cmd->click(&motion);
break;
case kGiGestureDblTap:
ret = cmd->doubleClick(&motion);
break;
case kGiGesturePress:
ret = cmd->longPress(&motion);
break;
}
if (!ret) {
LOGD("The current command (%s) don't support #%d gesture (state=%d)",
cmd->getName(), motion.gestureType, motion.gestureState);
}
return ret;
}
示例3: OnLButtonUp
void CDrawShapeView::OnLButtonUp(UINT nFlags, CPoint point)
{
CBaseView::OnLButtonUp(nFlags, point);
ReleaseCapture();
if (m_delayUp)
{
m_delayUp = FALSE;
}
else if (m_moved)
{
MgCommand* cmd = mgGetCommandManager()->getCommand();
if (cmd) cmd->touchEnded(&m_proxy->motion);
}
else if (Point2d((float)point.x, (float)point.y) == m_proxy->motion.startPoint)
{
PostMessage(WM_DELAY_LBUTTONUP, m_downTime, m_downFlags);
m_delayUp = TRUE;
}
}