chxavplaylistnavicontrol.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:2k
源码类别:

Symbian

开发平台:

C/C++

  1. /*============================================================================*
  2.  *
  3.  * (c) 1995-2002 RealNetworks, Inc. Patents pending. All rights reserved.
  4.  *
  5.  *============================================================================*/
  6. #if !defined(CHXAVPLAYLISTNAVICONTROL_INCLUDED__)
  7. #define CHXAVPLAYLISTNAVICONTROL_INCLUDED__
  8. #include "chxavrefptr.h"
  9. #include "chxavtextcontrol.h"
  10. #include "chxavplayer.h"
  11. #include "comptr.h"
  12. // class CHXAvPlaylistNaviControl
  13. class CHXAvPlaylistNaviControl
  14. : public CCoeControl
  15. , public IHXSymPlayerStateObserver
  16. {
  17. public:
  18. // ctor and dtor
  19.     CHXAvPlaylistNaviControl();
  20.     virtual ~CHXAvPlaylistNaviControl();
  21.     static CHXAvPlaylistNaviControl*  NewL(CHXAvPlayer* pPlayer, const CCoeControl& parent);
  22.     void ConstructL(CHXAvPlayer* pPlayer, const CCoeControl& parent);
  23.     void SetRefreshCommandL(const CHXAvCommand& cmd);
  24.     // IHXSymPlayerStateObserver
  25.     void OnAdvancePlaylist();
  26.     void UpdatePlaylistTextL();
  27. protected:
  28.     virtual void Draw(const TRect& rect) const;
  29.     virtual TInt CountComponentControls() const;
  30.     virtual CCoeControl* ComponentControl(TInt aIndex) const;
  31.     
  32.     void ShowPlaylistText(bool bShow);
  33.     void OnHidePlaylistTextTimer();
  34. private:
  35. // disallow assignment and copy
  36.     CHXAvPlaylistNaviControl(const CHXAvPlaylistNaviControl& rhs);
  37.     CHXAvPlaylistNaviControl& operator=(const CHXAvPlaylistNaviControl& rhs);
  38. public:
  39. // methods
  40. private:
  41. // implementation
  42. private:
  43. // data
  44.     CHXAvCommandPtr         m_spRefreshCmd;
  45.     refptr<CHXAvTextControl>    m_spPlaylistText;
  46.     TRect                       m_rcParent;
  47.     comptr<CHXAvPlayer>         m_spPlayer;
  48. };
  49. inline
  50. void CHXAvPlaylistNaviControl::SetRefreshCommandL(const CHXAvCommand& cmd)
  51. {
  52.     m_spRefreshCmd = cmd.CloneL();
  53. }
  54. #endif // CHXAVPLAYLISTNAVICONTROL_INCLUDED__