/** * @file XTPShortcutBarAnimation.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPSHORTCUTBARANIMATION_H__) # define __XTPSHORTCUTBARANIMATION_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** @cond */ class CXTPShortcutBar; # define XTP_TID_ANIMATION 0xACD43 class _XTP_EXT_CLASS CXTPShortcutBarAnimation { protected: struct CAnimateInfo { CAnimateInfo(); ~CAnimateInfo(); HBITMAP hbmSrc; BYTE* pSrcBits; HBITMAP hbmSrcBack; BYTE* pSrcBackBits; RECT rcPaint; int m_nAnimation; CArray arrExclude; }; public: CXTPShortcutBarAnimation(CXTPShortcutBar* pShortcutBar); ~CXTPShortcutBarAnimation(); public: void OnPaint(CPaintDC& paintDC); void RedrawRect(LPCRECT lpRect, BOOL bAnimate); void OnAnimate(); void OnDestroy(); protected: void RemoveAnimations(); void AnimateRect(CClientDC& dc, CAnimateInfo* pai); void RemoveIntersections(LPCRECT rcPaint, BOOL bAddExclude); void AlphaBlendU(PBYTE pDest, PBYTE pSrcBack, int cx, int cy, PBYTE pSrc, BYTE byAlpha); void AddAnimation(CClientDC& dc, CAnimateInfo* pai); BOOL IsAnimationEnabled() const; public: CXTPShortcutBar* m_pParent; CBitmap m_bmpCache; BOOL m_bInvalidate; UINT_PTR m_nTimer; BOOL m_bAnimation; BOOL m_bDoubleBuffer; protected: CArray m_arrAnimation; }; /** @endcond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSHORTCUTBARANIMATION_H__) /** @endcond */