UIAnimationTabLayout.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __UIANIMATIONTABLAYOUT_H__
  2. #define __UIANIMATIONTABLAYOUT_H__
  3. namespace DuiLib
  4. {
  5. class UILIB_API CAnimationTabLayoutUI : public CTabLayoutUI, public CUIAnimation
  6. {
  7. DECLARE_DUICONTROL(CAnimationTabLayoutUI)
  8. public:
  9. CAnimationTabLayoutUI();
  10. LPCTSTR GetClass() const;
  11. LPVOID GetInterface(LPCTSTR pstrName);
  12. bool SelectItem( int iIndex );
  13. void AnimationSwitch();
  14. void DoEvent(TEventUI& event);
  15. void OnTimer( int nTimerID );
  16. virtual void OnAnimationStart(INT nAnimationID, BOOL bFirstLoop) {}
  17. virtual void OnAnimationStep(INT nTotalFrame, INT nCurFrame, INT nAnimationID);
  18. virtual void OnAnimationStop(INT nAnimationID);
  19. void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
  20. protected:
  21. bool m_bIsVerticalDirection;
  22. int m_nPositiveDirection;
  23. RECT m_rcCurPos;
  24. RECT m_rcItemOld;
  25. CControlUI* m_pCurrentControl;
  26. bool m_bControlVisibleFlag;
  27. enum
  28. {
  29. TAB_ANIMATION_ID = 1,
  30. TAB_ANIMATION_ELLAPSE = 10,
  31. TAB_ANIMATION_FRAME_COUNT = 15,
  32. };
  33. };
  34. }
  35. #endif // __UIANIMATIONTABLAYOUT_H__