void CDrawShapeView::OnLButtonDblClk(UINT nFlags, CPoint point) { CBaseView::OnLButtonDblClk(nFlags, point); m_delayUp = FALSE; m_downFlags = 0; MgCommand* cmd = mgGetCommandManager()->getCommand(); if (cmd) cmd->doubleClick(&m_proxy->motion); }
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; }
bool TransformCmd::doubleClick(const MgMotion* sender) { return _lastCmd && _lastCmd->doubleClick(sender); }