application/inc/PodcastListView.h
branch3rded
changeset 343 9c56bf585696
parent 176 1c8b56cb6409
equal deleted inserted replaced
281:1cae65a87b5e 343:9c56bf585696
    29 
    29 
    30 class CAknDoubleLargeStyleListBox;
    30 class CAknDoubleLargeStyleListBox;
    31 class CEikFormattedCellListBox;
    31 class CEikFormattedCellListBox;
    32 
    32 
    33 
    33 
    34 class MKeyEventListener {
    34 class MContainerListener {
    35 public:
    35 public:
    36 virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) = 0;
    36 virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) = 0;
    37 };
    37 virtual void SizeChanged() = 0;
    38 
       
    39 class MPointerListener {
       
    40 public:
       
    41 virtual void PointerEventL(const TPointerEvent& aPointerEvent) = 0;
    38 virtual void PointerEventL(const TPointerEvent& aPointerEvent) = 0;
    42 };
    39 };
    43 
    40 
    44 class CPodcastListContainer : public CCoeControl
    41 class CPodcastListContainer : public CCoeControl
    45     {
    42     {
    50 		void SizeChanged();
    47 		void SizeChanged();
    51         TInt CountComponentControls() const;
    48         TInt CountComponentControls() const;
    52         CCoeControl* ComponentControl( TInt aIndex ) const;
    49         CCoeControl* ComponentControl( TInt aIndex ) const;
    53 		void HandleResourceChange(TInt aType);
    50 		void HandleResourceChange(TInt aType);
    54 		virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
    51 		virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
    55 		void SetKeyEventListener(MKeyEventListener *aKeyEventListener);
    52 		void SetContainerListener(MContainerListener *aContainerListener);
    56 		void SetPointerListener(MPointerListener *aPointerListener);
    53 		void SetListboxObserver(MEikListBoxObserver *aObserver);
    57 		
       
    58 		CEikFormattedCellListBox* Listbox();
    54 		CEikFormattedCellListBox* Listbox();
       
    55 		void SetListboxIcons(CArrayPtr< CGulIcon >* aIcons);
       
    56 		CArrayPtr<CGulIcon>* ListboxIcons();
       
    57 		void SetListboxTextArrays(CDesCArray* aPortraitArray, CDesCArray* aLandscapeArray);
       
    58 		void SetEmptyText(const TDesC &aText);
    59 		void ScrollToVisible();
    59 		void ScrollToVisible();
    60     	void Draw(const TRect& aRect) const;
    60     	void Draw(const TRect& aRect) const;
    61     	
       
    62     	CEikFormattedCellListBox * iListbox;		
       
    63 
    61 
    64 	protected:
    62 	protected:
    65 		TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
    63 		TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
    66 		virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
    64 		virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
    67 
    65 
    68 	private:
    66 	private:
    69 		MKeyEventListener* iKeyEventListener;
    67     	CEikFormattedCellListBox * iListbox;		
    70 		MPointerListener* iPointerListener;
    68 		MContainerListener* iContainerListener;
       
    69 
    71         CAknsBasicBackgroundControlContext* iBgContext;
    70         CAknsBasicBackgroundControlContext* iBgContext;
    72 
    71 
    73 	};
    72 	};
    74 
    73 
    75 
    74 
    76 class CPodcastListView : public CAknView, public MPointerListener,
    75 class CPodcastListView : public CAknView, public MContainerListener,
    77 public MProgressDialogCallback, public MKeyEventListener
    76 public MEikListBoxObserver,
       
    77 public MProgressDialogCallback
    78     {
    78     {
    79     public: 
    79     public: 
    80         ~CPodcastListView();
    80         ~CPodcastListView();
    81 		TBool IsVisible();
    81 		TBool IsVisible();
    82 		
    82 		
   131 		// from MProgressDialogCallback		
   131 		// from MProgressDialogCallback		
   132 		void DialogDismissedL(TInt /*aButtonId*/) {}
   132 		void DialogDismissedL(TInt /*aButtonId*/) {}
   133 
   133 
   134 		// from MKeyEventListener
   134 		// from MKeyEventListener
   135 		virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
   135 		virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
   136 		virtual void SizeChanged() {};
       
   137 		void ResetContainer();
   136 
   138 
   137 		// from MPointerListener
   139 		// from MPointerListener
   138 		void PointerEventL(const TPointerEvent& aPointerEvent);
   140 		void PointerEventL(const TPointerEvent& aPointerEvent);
   139 
   141 
   140 	protected:
   142 	protected: