本文整理汇总了C++中CAnimation::IsAngle方法的典型用法代码示例。如果您正苦于以下问题:C++ CAnimation::IsAngle方法的具体用法?C++ CAnimation::IsAngle怎么用?C++ CAnimation::IsAngle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAnimation
的用法示例。
在下文中一共展示了CAnimation::IsAngle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnBeginDrag
////////////////////////////////////////////////////////////////////////////
// Animations drag/drop
////////////////////////////////////////////////////////////////////////////
LRESULT AnimatorBar::OnBeginDrag(WPARAM wParam, LPARAM lParam)
{
XHTMLTREEMSGDATA *pMsg = (XHTMLTREEMSGDATA *) wParam;
ASSERT(pMsg);
XHTMLTREEDRAGMSGDATA *pData = (XHTMLTREEDRAGMSGDATA *) lParam;
LRESULT lResult = 0;
if (pMsg && pData)
{
// If it's an angle, and there's no other angles..
CAnimation* pAnimation = (CAnimation*)animations.GetItemData(pData->hItem);
if (pAnimation->IsAngle())
{
// Get parent
CAnimation* pParent = (CAnimation*)animations.GetItemData(animations.GetParentItem(pData->hItem));
if (pParent->m_SubAnimations.size() == 1)
lResult = 1;
}
}
return lResult; // return 0 to allow drag
}
示例2: RemoveAnimation
void AnimatorBar::RemoveAnimation()
{
HTREEITEM Item = animations.GetSelectedItem();
if(!Item)
return;
HTREEITEM Parent = animations.GetParentItem(Item);
CAnimation* pChildAnim = (CAnimation*)animations.GetItemData(Item);
CAnimation* pParentAnim;
if(Parent)
pParentAnim = (CAnimation*)animations.GetItemData(Parent);
else
{
pParentAnim = m_pAnimation;
if (pParentAnim->m_SubAnimations.size() == 1)
{
message_bar.Attach(this);
message_bar.SetHighlightOnMouseOver();
message_bar.SetWrapText();
message_bar.SetText(AB_CANNOTDELETEANIMATIONDESC);
return;
}
}
if (pChildAnim->IsAngle())
{
// Do a quick check for other angles
bool bFound = false;
for(list<CAnimation>::iterator i = pParentAnim->m_SubAnimations.begin(); i != pParentAnim->m_SubAnimations.end(); i ++)
if(i->IsAngle() && i->m_FixedID != pChildAnim->m_FixedID)
bFound = true;
if (!bFound)
{
message_bar.Attach(this);
message_bar.SetHighlightOnMouseOver();
message_bar.SetWrapText();
message_bar.SetText(AB_CANNOTDELETEANGLEDESC);
return;
}
}
for(list<CAnimation>::iterator i = pParentAnim->m_SubAnimations.begin();
i != pParentAnim->m_SubAnimations.end();
i ++)
{
if(&(*i) == pChildAnim)
{
pParentAnim->m_SubAnimations.erase(i);
i = pParentAnim->m_SubAnimations.end();
}
}
AnimationHasChanged();
UpdateFilmStrip();
UpdateAnimations(NULL, NULL, NULL, -2);
}