internetradio2.0/uiinc/irfirsttimecontainer.h
changeset 3 ee64f059b8e1
parent 2 2e1adbfc62af
child 4 3f2d53f144fe
child 5 0930554dc389
equal deleted inserted replaced
2:2e1adbfc62af 3:ee64f059b8e1
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Header for CIRFindStationsContainer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CIRFIRSTTIMECONTAINER_H_
       
    20 #define C_CIRFIRSTTIMECONTAINER_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <eiklbo.h>
       
    24 #include <aknlists.h>
       
    25 
       
    26 
       
    27 class CIRFirstTimeView;
       
    28 class CAknDoubleStyleListBox;
       
    29 
       
    30 
       
    31 /**
       
    32  * Container for First Time View.
       
    33  */
       
    34 class CIRFirstTimeContainer :  public CCoeControl, public MEikListBoxObserver
       
    35     {
       
    36     
       
    37 public:  // Methods
       
    38     
       
    39     /**
       
    40      * Second-phase constructor.
       
    41      * 
       
    42      * @param   aRect    Rect for Find Station Container
       
    43      */
       
    44     void ConstructL( const TRect& aRect );
       
    45 
       
    46     /**
       
    47      * C++ default constructor.
       
    48      *
       
    49      * @param aSetupStationsLaterItem Is Setup Station Later item in the list.
       
    50      */
       
    51     CIRFirstTimeContainer(CIRFirstTimeView& aFirstTimeView);
       
    52 
       
    53     /**
       
    54      * Destructor.
       
    55      */
       
    56     ~CIRFirstTimeContainer( );
       
    57     
       
    58      /**
       
    59       * From CCoeControl
       
    60       */
       
    61     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    62 
       
    63     /**
       
    64      * From CCoeControl
       
    65      */
       
    66     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
    67     
       
    68     /**
       
    69      * From MEikListBoxObserver HandleListBoxEventL
       
    70      */ 
       
    71     void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
       
    72     
       
    73  	/**
       
    74 	* CountComponentControls() const
       
    75 	* returns the number of components in the view.
       
    76 	*/
       
    77 	TInt CountComponentControls() const;
       
    78 	
       
    79 	/**
       
    80 	* ComponentControl()
       
    81 	* returns the pointer to the control
       
    82 	*/
       
    83 	CCoeControl* ComponentControl(TInt aIndex) const ;
       
    84 	
       
    85 	/**
       
    86 	* SizeChanged()
       
    87 	* Responds to changes to the size and position of the contents of this control.
       
    88 	*/
       
    89 	void SizeChanged();
       
    90 	
       
    91     /**
       
    92     * GetCurrentItemIndex
       
    93     * Returns the Current Selected index of the ListBox
       
    94     */
       
    95 	TInt GetCurrentItemIndex() const;
       
    96   
       
    97   	/**
       
    98 	* HandleResourceChange()
       
    99 	* Handles a change to the control's resources.
       
   100 	*/
       
   101 	void HandleResourceChange(TInt aType);
       
   102 private: //Methods
       
   103 
       
   104 
       
   105 	// from base class CCoeControl
       
   106 	/**
       
   107      * From CCoeControl
       
   108      *
       
   109      * @see Draw( const TRect& aRect ) const
       
   110 	 */
       
   111 	void Draw( const TRect& aRect) const;
       
   112     
       
   113     
       
   114 
       
   115 public: //Methods
       
   116     /**
       
   117      * PopulateFirstTimeListL
       
   118      * Sets items to the listbox.
       
   119      */
       
   120     void PopulateFindStationListL();
       
   121     void CreateFindStationDataL(TInt aTitle,TInt aDescription);
       
   122 
       
   123 private:    // Data
       
   124 	/**
       
   125 	* List box used to display the list of items.
       
   126 	* Owned.
       
   127 	*/
       
   128 	CDesCArray* iItemArray;
       
   129 
       
   130 	/**
       
   131 	* iFirstTimeView
       
   132 	* Instance of FirstTimeView
       
   133 	*/
       
   134 	CIRFirstTimeView& iFirstTimeView;
       
   135 	/**
       
   136 	* iListbox
       
   137 	* Data for the StationDirectory Listbox
       
   138 	*/
       
   139 	CAknDoubleStyleListBox* iListbox;
       
   140     
       
   141 };
       
   142 
       
   143 #endif /*C_CIRFirstTimeContainer_H_*/