00001 // sidplay_view.h 00002 // 00003 // Copyright (c) 2001-2002 Alfred E. Heggestad 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 00016 #if !defined(SIDPLAY_VIEW_H__) 00017 #define SIDPLAY_VIEW_H__ 00018 00019 00020 // Eikon 00021 #include <eikenv.h> 00022 #include <eikclb.h> 00023 00024 // Cone 00025 #include <coecntrl.h> 00026 #include <coeutils.h> 00027 #if !defined(__ER6__) 00028 #include <coealign.h> 00029 #endif 00030 00031 // Ckon 00032 #if defined(__CRYSTAL__) 00033 #include <ckntitle.h> 00034 #include <cknctbar.h> 00035 #endif 00036 00037 // Avkon 00038 #if defined(__SERIES60__) 00039 #include <aknview.h> 00040 #endif 00041 00042 #include "sidplayer.h" 00043 00047 class CSidPlayerStatusView : public CCoeControl 00048 { 00049 public: 00050 ~CSidPlayerStatusView(); 00051 void ConstructL(const TRect& aRect, CCoeControl* aParent); 00052 private: // from CCoeControl 00053 void Draw(const TRect&) const; 00054 private: 00055 // const CFont* iNormalFont; 00056 CCoeControl* iParent; 00057 }; 00058 00059 00060 extern TInt SidPlayerTimeViewPeriodicUpdate(TAny* aPtr); 00061 00065 class CSidPlayerTimeView : public CCoeControl 00066 { 00067 friend TInt SidPlayerTimeViewPeriodicUpdate(TAny* aPtr); 00068 public: 00069 ~CSidPlayerTimeView(); 00070 void ConstructL(const TRect& aRect, CCoeControl* aParent); 00071 private: // from CCoeControl 00072 void Draw(const TRect&) const; 00073 private: 00074 CCoeControl* iParent; 00075 CPeriodic* iPeriodic; 00076 }; 00077 00078 00082 //#if defined(__SERIES60__) 00083 //class CSidPlayAppView : public CAknView 00084 //#else 00085 class CSidPlayAppView : public CCoeControl 00086 //#endif 00087 { 00088 friend class CSidPlayAppUi; 00089 public: 00090 ~CSidPlayAppView(); 00091 void ConstructL(const TRect& aRect, CSidPlayer* aThePlayer); 00092 CSidPlayer* SidPlayer() const{return iThePlayer;} 00093 private: 00094 // from CCoeControl 00095 void Draw(const TRect&) const; 00096 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); 00097 TInt CountComponentControls() const; 00098 CCoeControl* ComponentControl(TInt aIndex) const; 00099 private: 00100 // copy of stuff elsewhere 00101 CSidPlayer* iThePlayer; 00102 // CEikColumnListBox* iPlayList; 00103 CSidPlayerTimeView* iTimeView; 00104 CSidPlayerStatusView* iStatusView; 00105 #if defined(__CRYSTAL__) 00106 CCknAppTitle* iAppTitle; 00107 CCknControlBar* iVolumeView; 00108 #endif 00109 }; 00110 00111 00112 #endif // SIDPLAY_VIEW_H__