本文整理汇总了C++中MgCommand::mouseHover方法的典型用法代码示例。如果您正苦于以下问题:C++ MgCommand::mouseHover方法的具体用法?C++ MgCommand::mouseHover怎么用?C++ MgCommand::mouseHover使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MgCommand
的用法示例。
在下文中一共展示了MgCommand::mouseHover方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnMouseMove
void CDrawShapeView::OnMouseMove(UINT nFlags, CPoint point)
{
CBaseView::OnMouseMove(nFlags, point);
MgCommand* cmd = mgGetCommandManager()->getCommand();
m_proxy->motion.dragging = (!m_delayUp && (nFlags & MK_LBUTTON)
&& (m_downFlags & MK_LBUTTON));
if (m_proxy->motion.dragging)
{
m_proxy->motion.point = Point2d((float)point.x, (float)point.y);
m_proxy->motion.pointM = m_proxy->motion.point * m_graph->xf.displayToModel();
if (!m_moved && mgHypot(m_proxy->motion.point.x - m_proxy->motion.startPoint.x,
m_proxy->motion.point.y - m_proxy->motion.startPoint.y) > 5)
{
m_moved = TRUE;
if (cmd) cmd->touchBegan(&m_proxy->motion);
}
else if (m_moved)
{
if (cmd) cmd->touchMoved(&m_proxy->motion);
}
m_proxy->motion.lastPoint = m_proxy->motion.point;
m_proxy->motion.lastPointM = m_proxy->motion.pointM;
}
else if (cmd && !(nFlags & MK_LBUTTON))
{
cmd->mouseHover(&m_proxy->motion);
}
}