Files
TTDownloader/third_party/NIM_Duilib_Framework/duilib/Animation/AnimationManager.h
T
tongtong e1e26acc49 第三方框架改为仓内子集并完善构建忽略规则
完整 NIM_Duilib_Framework 仓库移至父目录,third_party 仅保留实际使用的 base、duilib、bin/resources 与许可证;.gitignore 覆盖 MSBuild 与打包产物。
2026-11-15 08:54:17 +08:00

39 lines
994 B
C++

#ifndef UI_ANIMATION_ANIMATIONMANAGER_H_
#define UI_ANIMATION_ANIMATIONMANAGER_H_
#pragma once
namespace ui
{
class UILIB_API AnimationManager
{
public:
AnimationManager();
AnimationManager(const AnimationManager& r);
AnimationManager& operator=(const AnimationManager& r) = delete;
void Init(Control* control) { m_pControl = control; }
AnimationPlayer* GetAnimationPlayer(AnimationType animationType) const;
AnimationPlayer* SetFadeHot(bool bFadeHot);
AnimationPlayer* SetFadeAlpha(bool bFadeVisible);
AnimationPlayer* SetFadeWidth(bool bFadeWidth);
AnimationPlayer* SetFadeHeight(bool bFadeHeight);
AnimationPlayer* SetFadeInOutX(bool bFade, bool bIsFromRight);
AnimationPlayer* SetFadeInOutY(bool bFade, bool bIsFromBottom);
void Appear();
void Disappear();
void MouseEnter();
void MouseLeave();
private:
Control *m_pControl;
std::map<AnimationType, std::unique_ptr<AnimationPlayer>> m_animationMap;
};
} // namespace ui
#endif // UI_ANIMATION_ANIMATIONMANAGER_H_